[MPlayer-users] using mencoder to extract audio
Giacomo Comes
comes at naic.edu
Fri Oct 15 00:08:30 CEST 2004
On Thu, Oct 14, 2004 at 11:09:39PM +0200, Nico Sabbi wrote:
> Giacomo Comes wrote:
>
> >On Thu, Oct 14, 2004 at 01:39:37PM -0700, bwnospam-sf1 at yahoo.com wrote:
> >
> >
> >>Every time this has come up in the past it has been
> >>dismissed with the suggestion to "use mplayer
> >>-dumpaudio".
> >>
> >>"mplayer -dumpaudio" is a poor solution because it has
> >>to play the entire selection and takes a lot more time
> >>than if you extracted it with mencoder.
> >>
> >>Before I set out to patch mencoder to properly handle
> >>the example below, can someone who is more familiar
> >>with mencoder's options tell me if there is another
> >>way to do this with the existing options?
> >>
> >>It would seem to me that -novideo is dysfunctional in
> >>mencoder. When used it would ideally cause mencoder
> >>to no look for the video stream and use an output
> >>container other than .avi (mp3 perhaps)
> >>
> >>The command I want to use:
> >>mencoder ~/media/video/old\ school.avi -novideo -oac
> >>lavc -lavcopts acodec=mp3 -noskip -ss 1441.4 -endpos
> >>260.1 -o tmp/part1.mp3
> >>
> >>The current output:
> >>...
> >>AVI file format detected.
> >>AVI_NI: No video stream found.
> >>============ Sorry, this file format is not
> >>recognized/supported =============
> >>=== If this file is an AVI, ASF or MPEG stream, please
> >>contact the author! ===
> >>Cannot open demuxer.
> >>Exiting...
> >>
> >>
> >
> >I have to admint that I don't know how to use -novideo with mencoder.
> >Probably it's only working with mplayer.
> >
> >Coming back to you request, something like this should work:
> >
> >mencoder ~/media/video/old\ school.avi -ovc copy -oac lavc -lavcopts
> >acodec=mp3 -noskip -ss 1441.4 -endpos 260.1 -o tmp/part1.avi
> >mplayer -dumpaudio -dumpfile tmp/part1.mp3 tmp/part1.avi
> >rm tmp/part1.avi
> >
> >Giacomo
> >
> >
> no, mencoder can't output raw audio files such as mp3 (except pcm), and
> btw you
> shouldn't use lavc to output mp3: use -oac mp3lame -lameopts ... instead.
> Your only chance with mencoder is
>
> $ mencoder ~/media/video/old\ school.avi -ovc frameno -oac mp3lame
> -lameopts br=128 -noskip -ss 1441.4 -endpos \
> 260.1 -o tmp/part1.avi
Mmmm. I was already sleeping when I proposed -ovc copy. Of course
-ovc frameno is better.
And the raw mp3 file can be extracted with mplayer -dumpaudio
from the avi file.
Giacomo
>
> changing -lameopts as desired, or
>
> $ mplayer ~/media/video/old\ school.avi -vc null -oa pcm -aofile
> tmp/part1.wav -ss 1441.4 -endpos 260.1
> to get a wav file to re-encode with lame
More information about the MPlayer-users
mailing list