Tool

Keep Only Some Audio and Subtitle Tracks

A multi-language MKV often carries several audio and subtitle tracks, and you only use one or two of them. Paste the ffprobe output and the tool draws a bar showing how much space each track takes. Check only the tracks you want to keep and it calculates an ffmpeg -map command that copies just those tracks without re-encoding, plus the size you save. Your input is processed only inside this browser and is never sent anywhere.

The examples are made-up inputs to show how the tool works. For your own file, paste the whole output of ffprobe -hide_banner -i "input.mkv". If you need per-track sizes, the JSON output (ffprobe -v error -show_streams -show_format -print_format json "input.mkv") is also read.

How do I get the ffprobe output?

If ffmpeg is installed, run this in a terminal (Command Prompt on Windows) with your own file name, then paste everything it prints.

ffprobe -hide_banner -i "input.mkv"

The tool also reads JSON output (-v error -show_streams -show_format -print_format json), which carries the file size and per-track bitrates more accurately. If you don't have ffmpeg installed, you can first see which tracks a file has with the Video File Info Inspector.

Why does -c copy alone leave only one track of each kind?

If you give no -map at all, ffmpeg automatically picks just one track for each type of stream the output container can hold. The criteria in the ffmpeg documentation are: for video, the one with the highest resolution; for audio, the one with the most channels; for subtitles, the first one found. So if you copy a file with three audio tracks using only -c copy, you keep just the one with the most channels. Conversely, as soon as you use even one -map, this automatic selection is switched off entirely, so you have to write the video explicitly too, as -map 0:v. List only the audio tracks and leave out the video, and you get a file with sound only.

The -map syntax at a glance

UsageMeaning
-map 0Every track of the first input (including attachments and data)
-map 0:vAll video tracks
-map 0:a:1The second audio track (numbering starts at 0 and counts within each type)
-map 0:3The fourth track in the whole file (a position that ignores type)
-map 0:a:m:language:korAll audio tracks whose language tag is kor
-map "0:s:m:language:kor?"The trailing ? means “skip it if there is none.” Without the ?, ffmpeg stops with an error when no such track exists
-map 0 -map -0:a:2Keep everything except the third audio track (the leading - means exclude)

An argument containing ? may not be passed through literally in zsh (the default shell on macOS), so this tool wraps the arguments in quotation marks. Double quotes also work as-is in the Windows Command Prompt.

Pick by track number or by language?

  • By track number: keeps exactly the tracks you checked, at exactly those positions. This is the safer choice when there are two or more tracks in the same language (for example the main English track and an English commentary) and you want only one.
  • By language: maps by tag, as in m:language:kor, which is convenient when you run the same command on many files. However, it keeps every track in that language, so if there is an unchecked track in the same language, the tool warns you that it will come along too. Tracks without a language tag cannot be selected this way, so they are mapped by number.
  • Write the language code exactly as ffprobe shows it (usually three letters such as kor or eng). Some files use another form such as ko, so trust the letters shown on the tool's chips.

Tracks that don't fit in some containers

These are the rules the tool warns about. They summarize widely known compatibility, and this site has not converted every combination to check.

TrackGoing into MKVGoing into MP4
PGS (hdmv_pgs_subtitle)Copied as isKnown not to fit, so an error warning is shown
SRT, ASS and WebVTT text subtitlesCopied as isConverted with -c:s mov_text (ASS styling is lost)
mov_text (MP4 subtitles)Known not to copy, so converted with -c:s srtCopied as is
TrueHD, DTS and PCM audioCopied as isKnown to have limited compatibility, so a “needs checking” warning is shown
Attachments (fonts and so on)Copied as isCannot be held, so they are left out of the command

If you first want to know whether you should be moving MKV to MP4 at all, the MKV to MP4 Remux Feasibility Checker weighs it for each track layout.

Where do the per-track sizes come from?

The tool decides one track's size in the order below and writes under each track which method it used. When there is no information, it does not make a number up and shows “unknown.”

  1. If the track has a NUMBER_OF_BYTES tag, that value is used as is.
  2. Otherwise, it multiplies the track's bitrate (the BPS tag or the kb/s figure) by the duration. For a variable-bitrate track, this is only as accurate as the average bitrate.
  3. The default output for MKV often lacks the video bitrate. If there is just one video track and the total size is known (the file size, or failing that the container bitrate × duration), the video is estimated as “total − the other tracks” and marked as an estimate.

Statistics tags such as BPS and NUMBER_OF_BYTES are known to be common in MKV files made with MKVToolNix or ffmpeg, but they may be missing from files made with other tools or from MP4. In such files, a small track such as a subtitle can come out as “unknown” size and is left out of the savings calculation. If you want to work out what share of the file the audio bitrate takes, codec by codec, continue with the audio bitrate picker.

Suggested workflow

  1. Paste the ffprobe output and first look at the tracks with the biggest share on the bars (usually the video and lossless audio). Even several subtitle tracks are often small in size.
  2. Pick the tracks to keep with the language chips or the checkboxes, choose the output container, and read the warnings. If a red “May fail” warning appears, switch the container to MKV or uncheck that track.
  3. Copy the command and run it in the same folder as the source. For a first try, you can test on a short section by adding an option such as -t 60 before -i or before the output.
  4. Run ffprobe again on the result and check that the track list is what you intended. If the default-track flag went missing, use the tool's “Mark the first audio track of the output as default” option.
  5. If you need to pull picture-based subtitles out as text, continue with the MKV Subtitle Extractor. If the problem is a TV playing no sound, continue with the TV USB audio codec checker.

Limits

  • The tool builds a command that only selects tracks by copying them (-c copy), with no re-encoding. The size figures are arithmetic on the values in the text you pasted, and they can differ from the real output file by the container overhead. This site has not run the commands on real files and measured the resulting sizes.
  • The container compatibility warnings are a rule set summarizing known support. Codecs and combinations not listed there cannot be judged, and when a case cannot be judged, the tool says so.
  • It handles only the tracks of a single input (number 0). It does not build commands that merge external subtitle files or mix several inputs.
  • Chapters, global metadata and track titles follow ffmpeg's default behavior, and the tool does not alter them. The default-track flag applies only to audio.
  • The ffprobe output format varies a little between versions, so if a line cannot be read, that track may be missing. Check first that the track count is right. The text you enter is never sent to a server.