User avatar
nommo
Posts: 40
Joined: Sun Jun 10, 2012 10:17 am
Location: UK

MPD/MPC and icecast streams - has anyone used mpd-watchdog?

Tue Aug 28, 2018 10:26 pm

Hi all,

A friend asked for some help today in setting up a RasPi to pick up a hospital radio icecast mp3 stream to replace some defunct Windows box... It needs to run headless and have resilience to power and network outages etc.

I suggested MPD and MPC and we got it working fairly quickly, managed to get it to start the stream as soon as Raspbian boots (in case of power failure) using crontab and created a bit of resilience to network/stream dropouts by enabling 'repeat' to the stream in MPC, however it doesn't seem to recover from prolonged network outage. We tried increasing the 'connection_timeout SECONDS' from the default 60 secs in MPD but can't seem to find a way to set it to 'infinity'... and it doesn't seem to make any difference anyway...

We came across this thing called mpd-watchdog which is no longer being developed, but seems to be included in all the main players like volumio, mopidy, rune etc. We can't find a recipe on installing the github blob manually for 'vanilla' MPD though, it seems people were using a personal repository that no longer exists - can anyone help?

Thanks very much!
I ate all the Pi

User avatar
nommo
Posts: 40
Joined: Sun Jun 10, 2012 10:17 am
Location: UK

Re: MPD/MPC and icecast streams - has anyone used mpd-watchdog?

Wed Aug 29, 2018 3:20 pm

Well, we worked out it just needs to be made executable - it's not an MPD extension/plugin or anything, it runs independently. Doesn't resume playback of the stream after extended network downtime though, and returns "ERROR: Failed to decode http://ip-iddress:8525/stream"

Does anyone know of a better way to do get an mp3 stream to reconnect after a prolonged network outage of more than 60 secs?
I ate all the Pi

User avatar
nommo
Posts: 40
Joined: Sun Jun 10, 2012 10:17 am
Location: UK

Re: MPD/MPC and icecast streams - has anyone used mpd-watchdog?

Thu Aug 30, 2018 1:11 pm

Code: Select all

sudo apt-get install mplayer

crontab -e

@reboot     sleep 29; nohup mplayer -loop 0 http://ip-address/stream 2>&1 > /dev/null
:D
I ate all the Pi

Return to “Graphics, sound and multimedia”