[MPlayer-users] using mencoder to extract audio

Giacomo Comes comes at naic.edu
Thu Oct 14 22:59:02 CEST 2004


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




More information about the MPlayer-users mailing list