FFmpeg Map Only English Audio Tracks from MKV

This article explains how to use FFmpeg to select and keep only the English audio tracks from an MKV file containing multiple language tracks. By utilizing FFmpeg’s stream specifiers and metadata filtering, you can extract the video and only the English audio without re-encoding the streams, preserving the original quality while saving file space.

The Basic Command

To map only the English audio tracks along with the original video (and optional subtitles), use the following FFmpeg command:

ffmpeg -i input.mkv -map 0:v -map 0:a:m:language:eng -map 0:s? -c copy output.mkv

Command Breakdown

Dealing with 2-Letter Language Codes

While standard MKV files use 3-letter ISO 639-2 codes (like eng), some files might use 2-letter ISO 639-1 codes (like en). If your file uses 2-letter codes, adjust the mapping syntax accordingly:

ffmpeg -i input.mkv -map 0:v -map 0:a:m:language:en -map 0:s? -c copy output.mkv

How to Verify Track Languages First

Before running the command, you can inspect the file’s streams and metadata tags using ffprobe to confirm how the languages are labeled:

ffprobe -v error -show_entries stream=index:stream_tags=language -of default=noprint_wrappers=1 input.mkv

This command will output a list of stream indexes alongside their respective language tags, allowing you to verify if the English tracks are marked as eng or en.