How to extract an audio track from an MP4 video file on Windows?

38

18

Having an MP4 video file I'd like to get just the audio track of it. What makes my question different from the others is that I don't want to convert it (like to MP3 or anything) - I'd prefer to keep exactly the same AAC audio stream that is embedded in the MP4 file without recoding.

I use to play such MP4 files with an audio player (foobar2000, which just ignores the video track in it) on my desktop PC but I'd like to strip the video track off to save space and battery of my handheld.

Ivan

Posted 2013-08-19T15:39:58.373

Reputation: 6 173

Answers

53

With FFmpeg, which you can download as a static build (no installation needed) for every major OS:

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

vn and sn disable video and subtitle streams, if there are any. -c:a copy tells it to copy the audio bitstream as-is, without re-encoding the file. This will take less than a few seconds.

slhck

Posted 2013-08-19T15:39:58.373

Reputation: 182 472

1avconv worked with the same arguments. – Robert Siemer – 2014-05-09T18:11:10.423

@RobertSiemer Yes – avconv is a fork of ffmpeg. You may be interested in reading this Stack Overflow post.

– slhck – 2014-05-09T18:13:19.013

5

VLC can also do this, which is handy as you probably already have it on your system:

https://wiki.videolan.org/Extract_audio/#Extracting_audio_in_original_format

Matthew Lock

Posted 2013-08-19T15:39:58.373

Reputation: 4 254

2The VLC wiki unfortunately only gives an example for extracting DVD Audio: a very cryptic command with zero explanation or syntax for extracting other formats. – Dai – 2016-11-26T11:10:29.087

1I spent 15 minutes trying to do that with vlc (both GUI and command-line routes) and it just failed every time, producing an output file with no data in it. ffmpeg option worked on the very first try though – YePhIcK – 2018-05-02T04:12:34.490