Decoder is to slow

Okay well either way, I was having assorted problems including the above and switching to a wired connection has solved all of them.

I have had this problem, PI 2B, Volumio 2.806, wired network connection, Radio Paradise.
The PI is built into my HiFi which displays the song titles from the source.
The source would be playing for a few minutes and then the audio would dissapear but the titles continued to update. I have found that powering the PI off completely and re-powering, selecting the source again, does enable it to work again without a problem. However the problem reappears the next cycle.
I have tried to implement the ‘mpd_radio_fix’ listed above but the service fails to start, can’t see why! Doesn’t appear to be permissions.

Fix_status

Bump. No suggestions?

This to me seems an issue with Radio Paradise plugin. I suggest to contact the plugin developer

Thanks for the reply.
Not an MPD/Buster issue?

Hi,

Just to inform that i’m facing the issue with tidal, never used the radio paradise plugin.

Here my fresh logs on x86:
http://logs.volumio.org/volumio/FW7zWes.html

Thanks;

Luca

Unfortunately, Raspbian is released with a very out-of-date version of the Music Player daemon. The version released with Buster is 0.21.5 is some twenty versions behind the latest version 0.21.25. You should install MPD version 0.21.5 first. When it is all working if you are having problems playing certain it is well worth installing the latest version of MPD. Although the thought of compiling MPD may be a frightening one for some of you it is probably worth doing. I have described the process in a PDF document which can be found at https://www.bobrathbone.com/raspberrypi/compiling_mpd.html. I cannot guarantee that the latest version of MPD will cure this particular problem but I have tested version 0.21.25 and it has cleared a number of problems relating to playback issues.

1 Like

Volumio uses a custom compiled version of mpd. In the next release (buster) there will be the latest one…for those who have Thai problem, could you please try the buster release and let us know if this solves the issue?

Wired.

Nice workaround! I hope we can fix the root cause of the problem sometime soon, but until then, this makes things better.

Nice workaround! It does also work with moOde Audio Player (with a couple minor modifications):

  • MPD log is located at /var/log/mpd/log;
  • Needed to add /usr/bin/mpc start right after the stop command (otherwise the stream would not be restarted).

Difficult to tell just from that screenshot you provided. I would say test if the .sh script isn’t erroring on you. Bash scripts are extremely volatile, even wrong indentations (as there are many in the original script by @Johan) can break it.
Try running the script manually:

  • Make sure you’re in the current directory where you saved the script;
  • Then enter: ./mpd_radio_fix.sh
    If there’s any errors, the output should tell you which they are, and the number of the offending line.

(Since this script is an endless loop, you can exit by pressing Ctrl-C.)

It is an old thread but I recently had the same issue and after a lot of head scratching I solved the issue: It was a broken network cable that gave intermittent problems.
So check your network…

Just hit this since upgrading to v3.182
Logs here
http://logs.volumio.org/volumio/w1xtvhX.html

I too am experiencing this issue, on Raspberry Pi Zero WH running Volumio 3.198 (the latest version available for live update). I had used earlier versions, certainly 2.x, without the problem, so its seems to be a regression.

Playback stops in the middle of an album.

The following message shows in /var/log/mpd.log:

alsa_output: Decoder is too slow; playing silence to avoid xrun
1 Like

I am experiencing this issue with only 1 stream: https://maggie.torontocast.com:8076/flac.
While the stream http://176.57.184.130:8889/flac (without metadata) works flawlessly.
Reinstall mpd did not work, side effect: mpd.log stops logging “Decoder is too slow…”
The workaround suggested by throwawuser works.
I am using version Volumio for x86_64 (5.10.112-volumio x86_64) V3.324, hope this helps Volumio to fix the issue permanently.

Hi all, this issue was linked over in an MPD issue and I know the exact reason why this is happening (for FLAC radio streams, anyway), leaving a message here to hopefully help out the Volumio devs.

See - Reproducible alsa_output: Decoder is too slow; playing silence to avoid xrun while streaming HD Radio ¡ Issue #1771 ¡ MusicPlayerDaemon/MPD ¡ GitHub

Core issue is these radio streams are putting the FLAC into an Ogg bitstream and using Ogg Chaining to update the metadata. At least that’s my guess after spot-checking a few and confirming that’s what they’re doing. I haven’t checked every single stream mentioned in this issue.

For those unfamiliar - Ogg Chaining is when you take multiple Ogg streams and just concatenate them together. So the player gets a “hey this stream is ending” ogg page followed immediately with another page starting up a new stream, with new metadata, etc. It’s a method used a lot with Opus and Vorbis internet radio streams. In theory this should work for FLAC but in reality it usually doesn’t.

MPD’s default decoder for Ogg FLAC is the reference FLAC decoder, and the reference FLAC decoder doesn’t support chained Ogg - see Ogg chaining support? · Issue #254 · xiph/flac · GitHub

So when the track changes, the radio stream closes out the Ogg bitstream and starts sending a new one, and the reference FLAC decoder goes into an infinite loop - see FLAC decoder falls into an infinite read loop if ogg stream serialno changes ¡ Issue #568 ¡ xiph/flac ¡ GitHub

MPD can’t detect this (the FLAC library doesn’t report any error or anything). As far as it can tell the decoder just isn’t spitting out audio fast enough.

One kinda/sorta work-around may be to disable the FLAC-based decoder plugin and switch to the ffmpeg-based on. If you edit your mpd.conf to have:

decoder {
    plugin "oggflac"
    enabled "no"
}

That will make MPD switch to the ffmpeg decoder.

Now, issue there is that ffmpeg won’t ever update the “now playing” data, I have an issue for that here: #9778 (Chained Ogg stream with FLAC audio never sets AVSTREAM_EVENT_FLAG_METADATA_UPDATED flag) – FFmpeg

Of interest to the volumio devs - it looks like somebody may have figured out a patch to ffmpeg to enable it here - #10364 (Missing metadata in chained ogg/flac streams) – FFmpeg - I don’t know if Volumio compiles its own ffmpeg or anything but if you do, you may be able to apply a patch.

Of note: the couple of streams I’ve tested - odds are they would be better off by changing how they’re sending metadata in the first place and not use Ogg chaining.

Every stream I’ve looked at is only sending a single tag - TITLE - and it contains the artist and title, joined by a hyphen. So basically: the exact same metadata you’d get if you used Shoutcast metadata instead of Ogg chaining: a single text string. And since it’s in a Vorbis TITLE tag, most players are probably assuming they’ll see more tags, and don’t try to parse out the “artist - title” format like they would for Shoutcast metadata.

If they switched to the Shoutcast method they would dramatically increase their stream compatibility. Pretty much every player on the planet can process Shoutcast metadata, while a lot of players have a hard time with chained Ogg FLAC. The benefit of using chained Ogg files is getting to use structured, rich metadata - which these streams aren’t, they’re really just sending a single text string. So they’re having all of the compatibility problems with none of the benefits.

1 Like

I’m getting this error every now and then on both of my Volumio units running the latest software. One is a Rpi3b with Innomaker DAC and the other is a Rpi4 with IQAudio Pro DAC. The thing is that I get this only on YouTube music streams, never on web radio or anything else. I have reported this to the YouTube plugin creator and he cannot reproduce it but it does seem to an mpd issue as there are lots of references on the web regarding this problem.

Any ideas?

Regards,

Volumio 3.569 Ik have also still the problem of stopping radio streams and in the mpd log is:
“alsa_output: Decoder is too slow; playing silence to avoid xrun” When you pause the number en start it is playing again. It is very annoying. The workaround with mpd_radio_fix.sh works but is not the solution.