Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to extract the audio out of any video file (not dvds).

I have easy access to OS X and Bash and I'm very comfortable with both.


share|improve this question

The command-line tool ffmpeg can do this.

ffmpeg -i input.mp4 -map 0:a -c copy output.m4a

The above will work for MPEG audio (MP3, AAC), and AC3 and ALAC audio. If it is MP3 audio, you'd be better off using output.mp3; if it's FLAC or Vorbis, use output.ogg.

If you want to extract any audio to a fairly high-quality MP3, use

ffmpeg -i input.mp4 -map 0:a -c libmp3lame -q:a 2 output.mp3

If your video uses more than one audio track (different languages, for example) you can select a single audio track with: -map 0:a:0to select the first audio only, -map 0:a:1 to select the second audio track, and so on.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.