1
0
Fork 0

Integrate fakesilence tool.

liquidsoap-2.2
Icedream 2022-03-09 09:39:45 +01:00
parent 1fb6e42d95
commit 2c724258e8
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
4 changed files with 16 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "icedreammusic/ndi-feeder/fakesilence"]
path = icedreammusic/ndi-feeder/fakesilence
url = https://github.com/icedream/fakesilence.git

View File

@ -6,6 +6,15 @@ RUN chmod -v +x *.sh
### ###
FROM golang:1 AS fakesilence
WORKDIR /usr/src/fakesilence
COPY fakesilence/ .
RUN go build -v .
RUN cp fakesilence /usr/local/bin/
###
# yay build # yay build
FROM archlinux FROM archlinux
@ -23,6 +32,8 @@ RUN yay --noconfirm -S pod2man && sudo rm -r ~/.cache /var/cache/pacman/*
RUN yay --noconfirm -S ndi-advanced-sdk && sudo rm -r ~/.cache /var/cache/pacman/* RUN yay --noconfirm -S ndi-advanced-sdk && sudo rm -r ~/.cache /var/cache/pacman/*
RUN yay --noconfirm -S ffmpeg-ndi && sudo rm -r ~/.cache /var/cache/pacman/* RUN yay --noconfirm -S ffmpeg-ndi && sudo rm -r ~/.cache /var/cache/pacman/*
COPY --from=fakesilence /usr/local/bin/fakesilence /usr/local/bin/
COPY --from=0 /target/ / COPY --from=0 /target/ /
CMD ["ndi-feeder.sh"] CMD ["ndi-feeder.sh"]

@ -0,0 +1 @@
Subproject commit 9d9a9581df7b36bb9ef54b593dc725b6db4cc888

View File

@ -65,6 +65,7 @@ while true; do
call_ffmpeg -loglevel warning \ call_ffmpeg -loglevel warning \
-analyzeduration 1 -f libndi_newtek -extra_ips 192.168.188.21 -i "$found_audio_source" \ -analyzeduration 1 -f libndi_newtek -extra_ips 192.168.188.21 -i "$found_audio_source" \
-map a -c:a pcm_s16le -ar 48000 -ac 2 -f s16le - | -map a -c:a pcm_s16le -ar 48000 -ac 2 -f s16le - |
fakesilence --samplerate 48000 --channels 2 |
call_ffmpeg -loglevel warning \ call_ffmpeg -loglevel warning \
-ar 48000 -channels 2 -f s16le -i - \ -ar 48000 -channels 2 -f s16le -i - \
-map a -c:a flac -f ogg -content_type application/ogg "${target_url}" || true -map a -c:a flac -f ogg -content_type application/ogg "${target_url}" || true