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 downloaded a few MP4-encoded videos from which I'd like to extract the audio stream into MP3 files for easy listening on my digital player.

Most likely, VLC can do this, but the instructions followed on their forums gave out a "bubbly" sound file.

Here are the files specs:

  • Audio mp4a 44100Hz
  • Video avc1
share|improve this question
    
Are you certain of the file specs you've listed here? Often the bubbly sound indicates that you're resampling the audio. –  JDB Oct 19 '10 at 20:04

8 Answers 8

Use ffmpeg:

ffmpeg -i input_file.mp4 -vn -b:a 128k -c:a libmp3lame output_file.mp3

(Don't forget to adjust the audio bitrate, -b:a, otherwise you might get a huge file even for a low quality source.)

Many digital players actually support AAC audio as well, so you can try extracting the original AAC audio stream, without having to reduce quality even more:

ffmpeg -i input_file.mp4 -vn -c:a copy output_file.m4a

For older versions of ffmpeg, you'll need to use -ab & -acodec options instead of -b:a & -c:a.

share|improve this answer
    
works perfectly and is cross platform solution! –  Girardi Mar 3 '13 at 2:57
4  
-abr is not a valid option: -b:a or -ab can be used instead. (I know this is an old answer, but users are still referencing this.) –  LordNeckbeard May 8 '13 at 0:35
    
+1 Thanks for this awesome answer! –  Venemo Jun 23 '13 at 9:56

if you prefer a GUI, grab SUPER © (Simplified Universal Player Encoder & Renderer), it will do the job (and much more).

SUPER © is a GUI to FFmpeg, MEncoder, MPlayer, x264, musepack, monkey's audio, true audio, wavpack, ffmpeg2theora and the theora/vorbis RealProducer plugIn.

Drag & drop any Audio file or even any Video/Audio file and EXTRACT the Audio part by checking the Disable Video box, thereby converting it to:

  • aac
  • ac3
  • amr_nb
  • amr_wb
  • ape Monkey's Audio (Lossless)
  • flac FLAC (Lossless)
  • mmf
  • mp2
  • mp3
  • mpc
  • ogg FLAC (Lossless) or Vorbis High Quality
  • tta True Audio (Lossless)
  • wv WavPack (Lossless)
  • wav
  • wma

You can speed up the audio extraction by checking the Stream Copy box, which rips out the internal audio without conversion into another format.

SUPER © is freeware.

Note that SUPER comes bundled with OpenCandy adware. Mitigations:

  • Install in a virtual machine
  • Disable the network after the first step of the installation. The installer verifies that an internet connection is present. After that you can disable it and ignore all warnings. I'm not entirely sure that this prevents all AdWare from being installed, though.
  • You can remove OpenCandy after installation: http://www.malwaredictionary.com/2011/06/opencandy/
share|improve this answer
1  
Thanks, Super did it. I then combined the MP3 files into a single file using "Merge MP3". –  OverTheRainbow Jan 15 '10 at 18:14
1  
you're more than welcome. SUPER is truly the Swiss Army knife for multimedia file conversion. –  Molly7244 Jan 15 '10 at 18:18
3  
but god, what an awful site. can they hide that download link any deeper?? –  quack quixote Jan 16 '10 at 8:47
2  
Yup, their web site sure needs an overhaul. Super's UI is also a bit "unusual" ;-) –  OverTheRainbow Jan 18 '10 at 9:56
    
oh god ... searched for the download link for 30 seconds, no clue ... then read about the adware ... no thanks. Yamb worked fine! –  Anthony Alberto Jan 12 '13 at 17:46

Most MP4 videos use AAC audio, and most player devices can play AAC audio, normally in an M4A (differently-named MP4) container. Re-encoding to MP3, especially with a low bitrate input (most internet video), can lead to noticeable loss, even on low-end headphones. I would recommend using avconv/ffmpeg on the command-line

avconv -i input.mp4 -vn -c:a copy output.m4a

or

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

To convert every MP4 in a directory:

for f in *.mp4; do avconv -i "$f" -vn -c:a copy "${f/mp4/m4a}"; done

Some players (like my cheapy cheapo mobile phone) can play AAC audio, but not in an M4A container, and for that you have to use

avconv -i input.mp4 -vn -c:a copy output.aac

Now, some older devices genuinely can't play anything but MP3, and for those you can either use grawity's solution, or

avconv -i input.mp4 -vn -c:a libmp3lame -q:a 2 output.mp3

This will create a variable bit rate (VBR) MP3 which, apart from specialised needs like streaming, should be preferred. -q:a 2 will get you an average (over a number of files) bit rate of around 190 kbit/s; for more information on encoding VBR MP3s, see here.

share|improve this answer

Use Yamb to extract the raw audio (mp4a is AAC) then use a suitable MP3 encoder.

share|improve this answer

If you are on a Mac, a simpler method in the future may be to right-click on the the file in the Finder, choose "Get Info", and change the extension from .mp4 to .m4a. Then open it in iTunes and convert it to an mp3.

share|improve this answer

On Windows 7, Any Video Converter worked right out of the box for me. Looks like Mac is supported as well.

share|improve this answer

On Windows I use Pazera Free Audio Extractor. Very lightweight, intuitive, portable. Excellent frontend to ffmpeg tool

share|improve this answer

If you perform a lot of audio editing, there's a reasonable chance you already have (and love!) Audacity.

It will open the mp4 file and allow you to "Save as" a number of file types, including mp3. It also provides a simple dialog for any parameters you might want to change, including things such as sampling rate and MP3 tags.

If you don't have Audacity, it might not be the most direct path, but it's far more versatile than a simple converter program. It's a fully functional audio editor, open source, and cross platform.

share|improve this answer
1  
Hi. Doesn't work. Tried to open 'video.mp4' but Audacity v2.0.4 reported "video.mp4 is an Advanced Audio Coding file. Audacity cannot open this type of file. You need to convert it to a supported audio format, such as WAV or AIFF." Doh! ffmpeg worked perfect, though. –  judoman Oct 11 '13 at 18:37

protected by Community Oct 20 at 16:53

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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