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

Nico Sabbi nicola_sabbi at fastwebnet.it
Mon Aug 27 00:49:57 CEST 2007


Christopher Gokey wrote:
> 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
> 
> 

it's not guaranteed to work because a lot of crappy code in
mplayer pollutes stdout, but with some luck:
$ mencoder -really-quiet -oac mp3lame -ovc frameno -lameopts -of 
rawaudio ... -o /dev/stdout SRC | myprogram



More information about the MPlayer-users mailing list