Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Is there a command line tool for Windows to extract audio aac from mp4 ?

share|improve this question
    
How to change compatible brand with mp4box? -brand doesn't work! – Mr.Hyde Nov 10 '15 at 11:13
up vote 2 down vote accepted

FFmpeg can do it. Here is a list of commands that might come useful for you. Go here for instructions.

Example:

ffmpeg -i INPUT.mp4 -c copy -map 0:a:0 Output.aac
  • -i: input file
  • -c copy: copies the bitstreams without re-encoding
  • -map 0:a:0: selects track from: 1st input file -> audio tracks -> first track (1st audio track from 1st input file)

Note that it would work similarly with avconv, which is a fork of ffmpeg.

share|improve this answer
1  
Only linking to a solution is bad practice. At least give some examples. – erik Jul 4 '15 at 21:58
1  
If there's only one audio stream inside the MP4, the -map argument is not necessary, ie. writing this is enough: ffmpeg -i INPUT.mp4 -c copy Output.aac – miyalys Sep 22 '15 at 12:21

mp4box can also do this.

To demux/extract aac from mp4 (assuming audio is the 2nd track):

mp4box -raw 2 video.mp4

This will automatically create output file "video_track2.aac"

If you wanted control over the output filename, you would do

mp4box -raw 2 video.mp4 -out audio.aac

If you wanted to remux back into mp4 container (i.e. for iTunes) you could do:

mp4box -single 2 video.mp4 -out audio.m4a

note: gpac 0.5.0 has a bug that forces output filename to always end in .mp4, so if you wanted to use above command line you would need gpac 0.5.1

You could then put this in a batch script to operate over all the files in a directory:

for %%f in ("*.mp4") do (

mp4box -single 2 "%%f" -out "%%~nf.m4a"

)

(batch script inspired by videohelp and stackoverflow)

Download links:

share|improve this answer
1  
+1 Thank you, the -single command is exactly what I was looking for (it adds MP4 info to -raw) – Martin Sep 16 '15 at 21:44

Here’s the actual commands to use since all the provided links don’t actually give them, and anyway: links rot and die so should always be replaced with actual answers on stackexchange.

avconv -i input.mp4 -vn -c:a copy output.m4a
share|improve this answer

Super can do it also.

SUPER © "The Player" surpasses any known player by supporting just any Multimedia file format. SUPER © plays files that cannot be played with WMP or even other libavcodec-based players like MPC and VLC. SUPER © also plays and saves Internet Media Streams of different protocols ( mms:// rtsp:// http://)

SUPER © "The Encoder" is the fastest and simplest tool to encode full length movies to any other format without any time or function limitation.

share|improve this answer

I think that FFmpeg should be able to do it, there are probably Windows binaries floating about the internet, or you could build your own.

Edit: Here's some locations of Windows downloads.

share|improve this answer
2  
Only links, no solution. – erik Jul 4 '15 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .