11-10-2023, 02:21 PM
(11-10-2023, 12:35 PM)marek.marakesh Wrote: @Tim Curtis in the streams I uploaded there are 3 that I had problem with.
This is old issue with specific streams, that after song is changing in the stream, MPD stops playing and logging "Decoder is too slow; playing silence to avoid xrun".
Those streams are:
JB Radio2 (FLAC) with metadata https://maggie.torontocast.com:8076/flac
BDPST ROCK Radio (FLAC) https://s2.audiostream.hu/bdpstrock_FLAC
Radio Calico (FLAC) https://radio3.radio-calico.com:8443/calico
I overcome this issue deploying mpd-watchdog in the way described here by JackRichardson with slight modification for moode:
https://discourse.mopidy.com/t/radio-doe...hdog/424/6
If someone is interested I can share my config.
I modified original mpd-watchdog lines like that:
35c35
< INTERVAL=10
---
> INTERVAL=1
90c90,92
< $MPC status 2>/dev/null | grep -B1 '^\[playing\]' | tr '\n' ' '
---
> # $MPC status 2>/dev/null | grep -B1 '^\[playing\]' | tr '\n' ' '
> tail -n 1 /var/log/mpd/log |grep -E "playing silence to avoid xrun"
>
136c138
< log warning "restarting mpd"
---
> log warning "xrun error - restarting mpd"
@the_bertrum mentioned something similar in another thread and IIRC he also implemented a watchdog type script that looked for a particular MPD log message and then performed a stop/play sequence to "restart" the stream and hopefully achieve smooth, uninterrupted playback.
The challenge with this type of approach is that it's not really a good, universal workaround since the underlying issue has to do with the continuity of the stream itself. Unstable streams are usually due to broadcaster bandwidth or streaming server issues but sometimes can be due to poor Internet connection at the receiving side i.e., residential Internet gateway/Router. Regardless of which side the player just sees interruptions in stream data that eventually reach unrecoverable levels.
For example on my end the station BDPST ROCK Radio (FLAC) quickly starts stuttering and never recovers from stream starvation. No amount of MPD stop/play sequences results in a smooth, uninterrupted stream. The log has tons of run messages.