Extracting the Audio Track From a Video File

May 22, 2008 – 2:40 pm by \m/ike

So now you’ve got that video off youtube saved locally, but what you really want is to use its audio to burn an audio CD.  Yeah…let’s do that.

Chances are you have mplayer installed already, but just to make sure:

sudo aptitude update && sudo aptitude install mplayer

Next, all we have to do is invoke mplayer using some special commands:

mplayer <input filename> -novideo -ao pcm:fast:file=audio.wav -channels 2

This will drop “audio.wav” into the current folder.  You can then encode it into the format of your choosing or easily create an audio CD using your favorite burning app (Brasero being mine).  I sometimes like to use this to extract the audio from youtube videos.

  1. One Response to “Extracting the Audio Track From a Video File”

  2. a better solution to this that doesn’t involve transcoding is this:

    mplayer input.flv -dumpaudio -dumpfile audio.mp3

    youtube videos all have their audio coded as mp3, and this is what i’m often looking for in any case.

    By peter woodman on Aug 6, 2008

Post a Comment