[MPlayer-users] mplayer -in [url] > [mp3 file] (stdout as mp3?)

Christopher Gokey cgokey at comcast.net
Mon Aug 27 00:37:59 CEST 2007


I have unix application that could be simplified greatly if it could
receive a mp3 stream directly from mplayer rather than having to pipe
the .wav file through lame to get a mp3 stream...   These streams are
dynamic from a internet stream, so right now I'm sending them through
fifos, like so:

internet stream  (real audio/windows media)
   |
   |---->  mplayer ------> wav_fifo
                                                |
                                                |---->lame-----> mp3_fifo

            |

            |---------> unix application read

                             from mp3fifo

Unfortunately, this very unix specific with lots of fifos...    Can
mplayer or some other
client (?) do this without fifos, i.e.,

internet stream ------> mplayer -----> unix application that only
reads mp3 format

So in short, I'd like to give mplayer a real audio/windows media
stream and instead of
sending the results to a file (as a wav), instead have "mplayer"
transcode this to mp3 and send the results to stdout where my unix
application can capture the stdout and do something with it.

Is this possbile with mplayer?  This seems like a typical scenario for
those building applications that might use mplayer, I figured it would
be worth emailing the group and save me some time before having to dig
into the the libraries and build my own client.  I'd like something
that preferably works across platforms and since mplayer works on a
variety of platforms, I'm hoping that I'm missing some command
arguments and it already has this capability!

Thanks in advance.
Chris



More information about the MPlayer-users mailing list