Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

Thoughts?

share|improve this question

2 Answers 2

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

 
discard

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.