Decoder is to slow

I also have this issue and as a workaround waiting for a fix I am using a simple script to watch the mpd log and restart it again. I then installed cron and run this script on reboot. Here is the script:

#!/bin/bash

while :
do
  OUT=$(tail -n 1 /var/log/mpd.log)

if [[ $OUT == *"Decoder is too slow"* ]]; then

  /usr/bin/mpc stop
fi

  sleep 1
done
2 Likes

Made a quick account to anyone that finds this thread!

The solution by Johan is a great workaround for the issue, thought I’d write this up for any beginners to follow:

  1. Copy the script Johan has posted:
#!/bin/bash

while :
do
  OUT=$(tail -n 1 /var/log/mpd.log)

if [[ $OUT == *"Decoder is too slow"* ]]; then

  /usr/bin/mpc stop
fi

  sleep 1
done
  1. Login to your Volumio server via ssh (I’m assuming you still have the standard volumio user)
  2. Type and enter into console: nano ~/mpd_radio_fix.sh
  3. Paste the script into this file then save it
  4. Type and enter into console: sudo chmod u+x ~/mpd_radio_fix.sh
  5. Type and enter into console: sudo nano /etc/systemd/system/mpd_radio_fix.service
  6. Paste the below:
Description=Fix For MPD Radio Play With Volumio

[Service]
ExecStart=/home/volumio/mpd_radio_fix.sh

[Install]
WantedBy=multi-user.target
  1. Save the file and run: sudo systemctl start mpd_radio_fix
  2. It should be working! To enable it to start automatically on boot enter: sudo systemctl enable mpd_radio_fix

The cron method would also work but I find this a bit cleaner personally.

Thanks again to Johan!

3 Likes

Thanks for this mini how to

Just trying it :slight_smile:

What are the new “buster releases”, could you expand on it a bit?

I get the same by simply playing flac files from USB.

it is very hard to fix as explained it occurs only in some non defined case. Unfortunately, you are in this case. I’m running several (up to 7) various volumio devices (rpi2,3,4, Asus thinkerboard, Sparky, c4, vim3l) and never met it.
Now, can you try :


or

according to to your HW

To others having this issue, are you connected via WIFI or Wired?

Thanks

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…