[MPlayer-users] encoding realplayer audio only streams to mp3

Giacomo Comes comes at naic.edu
Wed Jul 27 21:07:18 CEST 2005


On Wed, Jul 27, 2005 at 12:28:02PM -0600, Kevin DeKorte wrote:
> On Wednesday 27 July 2005 12:12 pm, Dominik 'Rathann' Mierzejewski wrote:
> > On Wednesday, 27 July 2005 at 20:08, Nigel Jenkins wrote:
> > > Hi
> > >
> > > I'm trying to work out if there is a one pass way of recording a
> > > realaudio stream (off the web) into a mp3 file.
> > >
> > > I've currently worked out I can stream the file and output it as a wave
> > > file using the following command:
> > >
> > >   mplayer rtsp://someserver/somefile.ra -ao pcm
> > >
> > > Then I can use lame to encode to mp3.
> > >
> > > What I'd like to do is something like:
> > >
> > >   mplayer rtsp://someserver/somefile.ra -ao mp3
> > >
> > > and encode directly to mp3 format.
> >
> > Well, there isn't and probably won't be something like that in MPlayer.
> > But you can use a fifo and encode directly from -ao pcm.
> > There are numerous examples all over this mailing list.
> >
> 
> Here is an example I use to convert an mms stream to mp3. Probably would work 
> for an rtsp as well.
> 
> more mms2mp3
> --------------------------------
> mplayer -ao pcm -aofile $2.pcm -vo null -cache 2048 "$1"

Old syntax. It does not work with 1.0pre7

> lame $2.pcm $2.mp3
> rm $2.pcm
> --------------------------------

I suggest two ways to encode directly to mp3:

mplayer source -vo null -ao pcm:file=/dev/fd/3 3>&1 1>&2 | lame <lame options> - out.mp3

or

mencoder source -ovc frameno -oac mp3lame -lameopts <lame options> -o /dev/fd/3 3>&1 1>&2 | mplayer - -dumpaudio -dumpfile out.mp3 &>/dev/null

Giacomo




More information about the MPlayer-users mailing list