You are not logged in.
Hello folks,
I'm using an arch linux system on Raspberry Pi to constantly stream webradio. Currently, I'm using moc, which has one problem: When the connection the stream gets lost, it stops playing.
Can anyone tell me a console player with the capability of auto-reconnect when the connection is lost?
Wolle
Offline
sounds like a really short bash script.
check status of moc. when status is "stopped", try to play every couple of seconds, until status constantly changes.
without knowing moc, something like this:
#!/bin/bash
mocpstate=`mocp --info | grep State | cut -d" " -f2`
if [[ $mocpstate = "STOP" ]];
then
while true; do
mocp play
sleep 1
done
else
echo "moc is still playing"
elif(NOT tested, but its something like this)
Last edited by Rasi (2014-01-09 04:51:28)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
The problem is, moc doesn't switch to status Stop when the connection is lost...
Offline
The problem is, moc doesn't switch to status Stop when the connection is lost...
...which you totally forgot to mention in your first post ![]()
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Just to let you know: I found a --timeout parameter on mpg123, working great.
Offline