How to: Extract Audio From Video Using ffmpeg

So, you want to extract some audio from a video ey? Sure! No problem! You can do just that using ffmpeg, here’s the command string.

In this example, i’ll extract the whole audio track to a mp3 file, with a 320k bit (constant) rate and 44100hz audio rate (high quality mp3):

ffmpeg -i “whatever.format” -vn -ac 2 -ar 44100 -ab 320k -f mp3 output.mp3

Here’s a short explanation on what every parameter does:

  • -i “input file”
  • -vn “skip the video part”
  • -ac “audio channels”
  • -ar “audio rate”
  • -ab “audio bit-rate
  • -f “file format to use”
  • (the end if the string) “output file”

NOTE: I am not responsible for any copyrighted material (ex, music videos) that get’s converted to audio using this method.

Be Sociable, Share!

    Published by

    admin

    Lovable, friendly and crazy 25-year-old-boy.