[MPlayer-users] Mplayer restart when stream stops working

Jesper Weiland jesper at servicez.org
Mon Oct 11 00:16:23 CEST 2004


Hi Guys,

For my client I had to build a streaming-relay system to relay any kind 
of data into mp3. The system is kinda dirty
but it works (80%) fine. The problem is that it's unstable.

I use Mplayer to play a stream and output is as PCM into an fifo. That 
works fine. Then I read the fifo in darkice and
I re-encode and stream it to an icecast server.

When a stream goes down, one of my cronjobs checks if darkice *or* 
mplayer is down, and it restarts the process.

My Question: Mplayer has to STOP when a stream stops working. Sometimes 
it does, sometimes not. Sometimes it's just
'sleeping'. Not buffering, nor playing. I cannot see this 'downtime' in 
my scripts, because nothing is down.. but the stream is
not working anymore.

Is it possible to stop mplayer when an audio-stream stopped working? Or, 
does anybody have a clue why it doesn't stop?

I use this mplayer command:

mplayer -v -ao pcm http://www.streaming.com/stream.asf -aofile 
/fifo/stream1 -nowaveheader -srate 22050 -cache 32 -channels 1

Thanks a lot guys!

Jesper / Deltasolutions




More information about the MPlayer-users mailing list