mopidy
mopidy copied to clipboard
add continuous output for use with icecast
when trying to set up icecast with mopidy for streaming to my devices, i've encountered some issues with pausing, where listening clients are disconnected when the stream is paused or the tracklist ends.
the current "official" solution for this is to have icecast use a fallback audio file containing only silence but this has the other issue that icecast will serve the fallback file as quickly as it's able to, resulting in clients quickly being swamped with hours of silent audio and falling well behind the real-time stream within minutes of pausing playback. (and i've had very inconsistent experiences with actually having clients switch to and from the fallback mount, anyway)
i've settled for now on having mopidy output to a pulseaudio null sink, while another instance of gstreamer monitors the sink and streams it to icecast in opus format (cbr is the only way to keep the latency stable), but this loses all the track metadata which is not acceptable since i want the audio player to display track names and artists.
it would be much better if mopidy could instead insert silent samples instead of ending the stream while playback is paused. this would allow people like me to stream audio in real time and not have to worry about clients falling behind or being disconnected if i pause playback temporarily, and without introducing pulseaudio into the mix or losing out on track metadata.
I've found that using a 0.1s silent track will keep the stream relatively on time, for what that's worth. You may not put a nice message in your silent stream, but it should be an adequate workaround.