Extract AC3 from MP4 without Re-encoding using FFmpeg

This article provides a quick, step-by-step guide on how to extract a raw AC3 audio bitstream from an MP4 video container without re-encoding using FFmpeg. By utilizing stream copying, you can preserve the original audio quality and complete the extraction process almost instantly.

The FFmpeg Command

To extract the AC3 audio track without re-encoding, use the following FFmpeg command in your terminal or command prompt:

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

Command Breakdown

Extracting a Specific Audio Stream

If your MP4 file contains multiple audio tracks and you want to extract a specific AC3 stream, you must map the correct stream. First, inspect the file’s streams:

ffmpeg -i input.mp4

Identify the index of the AC3 stream (for example, Stream #0:2). You can then target and extract only that stream using the -map option:

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

Using this method ensures you get the exact raw AC3 file you need without losing quality or wasting CPU cycles on re-encoding.