Skip to Content.
Sympa Menu

baslinux - Re: [BL] MPlayer

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: "David Moberg" <davidjmoberg AT lycos.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] MPlayer
  • Date: Sat, 07 May 2005 13:47:31 -0500

----- Original Message -----
From: "sindi keesan" <keesan AT sdf.lonestar.org>

> > Try:
> >
> > mkfifo audiodump.wav
> > mplayer -ao pcm http://(URL of streaming mp3) & play audiodump.wav & fg;
> > fg
>
>
> I tried various combinations (using the latest compiled mplayer,
> which now installs properly) and if I mkfifo audiodump.wav, mplayer
> does not seem to write anything to audiodump.wav (I have a 0 file)
> though it says something about filling a cache.

An explanation of FIFOs is in order. Basically, a FIFO is a file
which behaves like a pipe. If you tell something like MPlayer to
write to a file, it will write to it, _and stop_ when the FIFO
is full. Nothing will happen until you tell something to read
from the FIFO (e.g. play from sox). So you need to:

1) Make a FIFO (mkfifo)
2) Tell MPlayer to start sending data to the FIFO
3) Tell play to play the FIFO
4) If any of the above programs have gone into the background,
you must awaken them with fg (at least, I have to with bash)

It may be best to do everything manually:

1) In VT1, mkfifo audiodump.wav
2) Still in VT1, mplayer -ao pcm http://(URL of streaming mp3)
3) Switch to VT2 and play audiodump.wav

You can automate this once you verify that it works.

> If I just type in the part before the & and then play audiodump.wav
> (which I did now) it plays just fine but my file keeps getting
> larger. I will try this on realaudio some time. We are going to
> work on the 600 and 750MHz models now instead.

The FIFO is what is supposed to keep the size in check. Once a byte
is read from a FIFO, whatever is writing into a FIFO is allowed to
send another byte in. The original byte is lost, so the FIFO does
not grow.

> I started the play only about 30 sec after I started mplayer, and
> it is still playing a few minutes later, so as long as I have lots
> of free hard drive space I will be okay, but wav files are large.
> I am already at 18MB in 5 minutes. 60 minutes would be 200MB. I
> suppose I could delete and restart at the end of each piece.

Or have a kludgey shell script do this for you by waiting a set period,
deleting the file, and restarting everything. I would prefer the FIFO
method, as this method will result in gaps in the audio.

> I see at the end of the screen:
>
> Starting playback...
> mpg123: Can't rewind stream by 62 bits!
> A: 5:40.2 (the time?) 93.5% 0%
>
>
> But ps says I am using sox, not mpg123.

Perhaps MPlayer uses mpg123 if it exists?

> I will try this on a realaudio file next (same URL harvesting
> technique as for mp3 files).

David
--
_______________________________________________
NEW! Lycos Dating Search. The only place to search multiple dating sites at
once.
http://datingsearch.lycos.com





Archive powered by MHonArc 2.6.24.

Top of Page