[MPlayer-users] extract audio

The Wanderer inverseparadox at comcast.net
Sun Dec 28 20:00:51 CET 2003


Guldo K wrote:

> The Wanderer writes:
> 
>> The canonical method is
>> 
>> mplayer filename.avi -dumpaudio -dumpfile filename.audio
>> 
>> but I've sometimes had problems getting that to produce a valid,
>> MPlayer-playable file.
>> 
>> If it doesn't work for you, and you're willing to lose some audio
>> quality, you can try
>> 
>> mplayer -ao pcm -vo null -vc dummy
>> 
>> and encode the resulting WAV file with your audio encoder of
>> choice. This results in lower audio quality than was present in the
>> original AVI, but it's nearly foolproof in getting *some* version
>> of the audio into a separate form.
> 
> Thanks a lot!
> The first method produces a quite 'low-quality' mp3, is there a
> better way? lameopts cannot be used, can it?
> I think I'd use the second one.

The first method should produce an MP3 of the exact same quality as is
used in the AVI itself; if it doesn't, then either you're doing
something wrong or there's a bug in MPlayer. Many video files use
low-quality MP3 to compress their audio; there is no way to get a better
quality than what was used with the video itself.

Using the second method *cannot* produce a higher-quality audio file
than the first one does. It can produce a file with a higher bitrate,
but all of the extra bits are being wasted on compressing noise and
artifacts; there is no improvement whatsoever, and there can be a
considerable decrease in quality.

No, -lameopts can't be used (unless I'm missing a lot); that's for
MEncoder only, and carries the same audio-quality problems as the second
method I described. Really, if you can get a playable audio file out of
-dumpaudio at all, then that should be by far the best method of getting
audio out of the file using MPlayer.

-- 
       The Wanderer

A government exists to serve its citizens, not to control them.




More information about the MPlayer-users mailing list