[MPlayer-users] Encoding Streaming Radio to an MP3?

Brett Kosinski brettk at frodo.dyn.gno.org
Sat Apr 5 20:46:26 CEST 2003

> First, let me apologize if this is in the man page or
> hidden somewhere else.  I have searcjed fpr this and
> done my best to find the answer, but can't, so now I'm
> humbly asking for help.
> I'm trying to encode a streaming radio station to an
> MP3 file.  I thought this would work:
> mencoder http://www.wuwm.com/listen/wuwmlive.asx -oac
> mp3lame
> But it doesn't.  It ends with this error:
[... snip ...]
> The best I have been able to come up with is this:
> mplayer http://www.wuwm.com/listen/wuwmlive.asx -ao
> pcm
> then....
> lame -b 128 audiodump.wav audiofile.mp3
> I'd like to setup a job that would automatically
> record 30 minutes of radio in the morning so I can
> quickly transfer it to my MP3 player and listen to it
> as I ride my bike to work.

As, A'rpi, I think, mentioned on the list, mencoder can't created
audio-only files.  You best option is to create a FIFO, use mplayer to
dump the PCM, and cat the FIFO to lame.  eg:



$LAME_OPTS="blah blah"

mkfifo $FIFO
mplayer -vo null -vc dummy -ao pcm -aofile $FIFO $URL < /dev/null &
rm $FIFO


Note, I didn't test that... just off the top of my head. :)


More information about the MPlayer-users mailing list