Reliable stream playout on raspberry pi

Everything technical about radio can be discussed here, whether it's transmitting or receiving. Guides, charts, diagrams, etc. are all welcome.
Post Reply
jvok
tower block dreamin
tower block dreamin
Posts: 346
Joined: Sun Aug 16, 2020 2:44 pm

Reliable stream playout on raspberry pi

Post by jvok » Fri Sep 05, 2025 12:19 pm

Anyone ever use a pi playing out a stream for linking? How did you get it to handle internet drop outs? I've tried both mplayer and vlc and they both just hang if the connection goes out, won't resume when it comes back. If it actually crashed out and returned to console it would be ok cus I could set it playing in a loop. But instead it just sits there doing nothing until I manually restart it

Both vlc and mplayer have --loop as a parameter on command line but it only works if the stream itself ends. If the connection goes down it doesn't see it as the stream ending so just carries on doing nothing

Any ideas?

King Croccy
big in da game.. trust
big in da game.. trust
Posts: 56
Joined: Sat Aug 26, 2023 3:20 pm

Re: Reliable stream playout on raspberry pi

Post by King Croccy » Fri Sep 05, 2025 2:02 pm

You are correct, VLC is not resilient enough to handle network glitches, mine used to just stop dead and you would have to log in manually. Sometimes it would stop after a week, sometimes an hour. It seems to do it on every platform (rasbian, linux mint even on mobile phone). I have seen a few threads on the net where people have told the developer but he seems to be in denial! :lol:

The way I've seen people get round the issue is to use the jack version of stereotool. There is a software called silentjack which is some kind of plugin for jack. It can detect silence and if you write a script, it can be used to refire vlc when it glitches. :tup

It would be nice if there was a plug in for vlc to make things simple but unfortunately I don't think there is any available.

Albert H
proppa neck!
proppa neck!
Posts: 3067
Joined: Tue Apr 05, 2016 1:23 am

Re: Reliable stream playout on raspberry pi

Post by Albert H » Sun Sep 14, 2025 2:33 am

Net drop-outs can be a pain, I wrote a routine for auto-reconnection, and this will normally restore the stream in a couple of seconds. I have a further routine that logs the number of drop-outs, and if they're happening too often, it'll play out a local pre-record for the balance of the hour, then continue with the recordings if a stable connection can't be obtained.

Another trick we've used is to send an hour's programme speeded up so that it gets there in a few seconds. Each programme can be uploaded to the playout Pi, so that programmes can be almost contemporaneous, just an hour or two behind!
"Why is my rig humming?"
"Because it doesn't know the words!"
;)

User avatar
EFR
no manz can test innit
no manz can test innit
Posts: 232
Joined: Mon May 20, 2024 5:39 pm

Re: Reliable stream playout on raspberry pi

Post by EFR » Sun Sep 14, 2025 5:08 pm

Anyone done it with old Android phones? I have sjoebox full of these.
Fight For Free Radio!

Post Reply