Extracting Audio from Videos using Mplayer

Mplayer can be used to play videos but it can also be used to strip out just the audio track to a WAV file. I figured this out one day because I wanted to have audio-only copies of some of my favorite Flight of the Conchords videos Youtube - songs that aren't on the Conchords album - to copy to my iPod.

This is really simple, if you have Mplayer installed. If you don't check my post about installing that. With mplayer working and installed you fire up a command prompt, navigate to where your video is and use the following command:

mplayer -ao pcm -vo null -vc dummy filename.ext

where 'filename.ext' is your video file. This dumps the audio out to a file called 'audiodump.wav' and it happens pretty quickly for smaller files (about the length of a single song).

That's all there is to it! You can convert that WAV file to an MP3 using iTunes by importing the file to iTunes and allowing it to convert the file to an MP3 or you can use LAME, if you're really handy. If you have LAME installed just do the following at a command prompt:

lame -h input.wav output.mp3

If you don't have LAME you can find it here

Have fun!

Syndicate content