Turns out ZeroMQ exists and it’s very useful
# Now I only need the jukebox
while true; for f in (ls | shuf); sox $f -C 9 --comment "" -t ogg - pad 0 5; end; end | ffmpeg -readrate 1 -f ogg -i - -b:a 48k -f opus zmq:tcp://localhost:2763
The efforts I have to make for a private “Internet radio”
# The jukebox
for f in (ls | grep " " | grep -iv "compress" | shuf); sox $f -C 9 --comment "" -t ogg - pad 0 5; end | ffmpeg -readrate 1 -f ogg -i - -b:a 320k -f mpegts "udp://127.0.0.1:7060"
# Meanwhile, in another SSH connection, the sound system
# (needed because SSH doesn't support UDP tunneling)
while true; ffmpeg -v -8 -f mpegts -i "udp://127.0.0.1:7060" -f matroska -bufsize 3000k -c:a libopus "tcp://127.0.0.1:7070?listen"; end
your workload can either be 90% dependencies or 90% pure suffering, no in-between
i mean
one of the iterations of the soundsys pipes the stream of the jukebox to
fdkaacfirst beforeffmpegsince someone maintaining the
ffmpegArch package doesn’t build it with--enable-libfdk-aacand I want to use HE-AACv2 because the network on my boarding house can’t cope with a continuous 48 kbps Opus stream reliablythat’s another dependency =’)