[MPlayer-users] Graceful failure when listening to a stream
Joey Parrish
joey.parrish at gmail.com
Wed Apr 18 01:09:26 CEST 2007
On 4/17/07, Walter Belhaven <wbelhaven at yahoo.com> wrote:
> --- "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?
I think we're talking across purposes. The -dumpstream option is
intended to dump the raw data from the network to the disk. Then you
take a second pass with -ao pcm on the dumped data to convert to wav.
This doesn't solve the connection issues. It just moves them away
from -ao pcm. :) It seems that isn't what you want, though.
Sorry,
--Joey
More information about the MPlayer-users
mailing list