[MPlayer-users] using mencoder to extract audio
Nico Sabbi
nsabbi at tiscali.it
Thu Oct 14 23:09:39 CEST 2004
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
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