[MPlayer-users] Graceful failure when listening to a stream

Walter Belhaven wbelhaven at yahoo.com
Wed Apr 18 00:55:30 CEST 2007


--- "info at danielerossi.net" <info at danielerossi.net> wrote:
> > 
> > I'm using mplayer, rather successfully in most cases, to
> > record streamed audio files, using the -ao pcm options.
> > But, unfortunately, mplayer is not failing "gracefully" when
> > the audio stream is interrupted due to net congestion,
> > server problems, or otherwise.  Ideally, if the stream is
> > interrupted for some number of seconds, I'd like mplayer to
> > just give up, close the PCM (.wav) file, and exit.
>   
> normally I use -dumpstream option and after I run a second
> instance of Mplayer to listen _*or *_convert. The time between
> my first and second command line act as a cache. You can write
> a simple two line script for that.
> It never fails.
> Otherwise you can use the -cache otpion like "-cache 8192".
> daniele

Thanks Daniele and Joey.  Is "-dumpstream" materially different than
"-ao pcm", especially with respect to mplayer hanging when the stream
gets interrupted for any significant amount of time?  I ran some
experiments and couldn't really tell a difference.  After interrupting
the stream for a minute or so, the "-dumpstream" mplayer never
reconnected with the server and, therefore, never continued writing to
stream.dump.  Nor did it give up and exit.  I pulled the Ethernet cable
between my router and modem to simulate a "long" interruption, though
perhaps that's an invalid test.  Any more thoughts on this?  Any way to
tell mplayer to aggressively attempt to reconnect when there's a
disruption? -- or to just quit when it can't reconnect?

Thanks,
WB


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the MPlayer-users mailing list