[MPlayer-users] [Streaming setup] Reconnecting after disconnect

Jesper Weiland jesper at servicez.nl
Fri Mar 26 16:16:13 CET 2004


D Richard Felker III wrote:

>On Fri, Mar 26, 2004 at 02:38:12PM +0100, Jesper Weiland wrote:
>  
>
>>Hi Guys,
>>
>>I'm currently making a (little dirty) streaming setup. My goal is to 
>>relay streams in different formats (real,wma etc) to mp3 output. I've 
>>downloaded and installed mplayer and it plays all the formats perfectly. 
>>I use darkice to stream my signal to my relay-servers, but my setup is 
>>really unstable.
>>
>>We stream to a FIFO with the following command:
>>
>>./mplayer -ao pcm http://stream1.bcast.oggradio.nl:8005/jep -aofile 
>>/fifo/fif01 -nowaveheader -srate 22050 -cache 16 -channels 1
>>
>>Darkice uses the /fifo/fifo01 and it plays well. So far so good.
>>
>>But: If mplayer looses it's connection (for example due some short 
>>routing problems), it just stops and closes the fifo. Thereafter, 
>>darkice also stops because the signal stops.
>>
>>My question (Excuse me for the long story):
>>
>>Is there a way to keep mplayer running and to let it reconnect till the 
>>stream is back again? In that case darkice wouldn't stop and we're back 
>>online when the source-stream is back. I've found the loop function, but 
>>that shows a mplayer crash when I use it in combination with the command 
>>i've pasted.
>>
>>Does anybody have a clue? I'm about to give my presentation to some big 
>>clients, so any help would be very nice.
>>    
>>
>
>To keep the fifo from getting closed, leave another process running
>with /fifo/fif01 opened in write mode. For example "cat>/fifo/fif01".
>  
>
Maybe that helps, but isn't there an option to keep mplayer running and 
reconnect to the streaming
server? Then I don't need this workaround and I don't have to cron any 
scripts to start mplayer if it
stops.

>Rich
>  
>
Thanks!




More information about the MPlayer-users mailing list