You are unsing the input.mplayer function and it crashes sometimes without being restarted although you have chosen restart_on_error=true? Tune it with a wrapper!
def input.mplayer_s16le_eternal(~id="input.mplayer_s16le",
~restart=true,~restart_on_error=true,
~buffer=2.,~max=3.,s) =
input.external(id=id,restart=restart,
restart_on_error=restart_on_error,
buffer=buffer,max=max,
"xwrapper mplayer -really-quiet \
-format s16le \
-ao pcm:file=/dev/stdout \
-vc null -vo null #{quote(s)} \
2>/dev/null")
end
The xwrapper:
#!/bin/bash
while true; do
$@
done
exit