Tool

Which Container Should You Use? MP4, MKV, WebM and MOV Picker by Codec Combo

Choose the video, audio and subtitle codecs of a file you are about to make (or already have) and the tool tells you whether each of the four containers can hold them, which tracks you would have to convert or drop, and builds example FFmpeg -map and -c options. Your input is processed only inside this browser and is never sent anywhere.

Common combinations

Video

Audio (pick several; the order you pick is the track order)

Subtitles (pick several; the order you pick is the track order)

Fill from ffprobe output

Paste the output of ffprobe -v error -show_entries stream=codec_type,codec_name -of csv=p=0 file, or the Stream lines from ffmpeg -i file. The text is read only inside this browser.

MKV is the safest container for this combination

‘Fits in the container’ is not the same as ‘plays on your device’. When verdicts tie, the one earlier in the list (MP4 → MKV → WebM → MOV) is shown first.

  • MP4Works if you drop some subtitles
    • Video · HEVC (H.265) Fits as-isAdd -tag:v hvc1 so it plays on Apple devices.
    • Audio · Opus Fits, but check compatibilityOpus can go into MP4, but some players and editors are reportedly silent with it.
    • Subtitles · PGS (Blu-ray bitmap) Does not fitBitmap subtitles can't be converted to text, so they are left out. To keep them, you can OCR them into an SRT or burn them into the video.
  • MKVWorks — everything fits as-is
    • Video · HEVC (H.265) Fits as-is
    • Audio · Opus Fits as-is
    • Subtitles · PGS (Blu-ray bitmap) Fits as-is
  • WebMWorks only if you re-encode some tracks
    • Video · HEVC (H.265) Does not fit
    • Audio · Opus Fits as-is
    • Subtitles · PGS (Blu-ray bitmap) Does not fit
  • MOVWorks if you drop some subtitles
    • Video · HEVC (H.265) Fits as-isAdd -tag:v hvc1 so it plays on Apple devices.
    • Audio · Opus Fits, but check compatibilityOpus in MOV has uncertain support.
    • Subtitles · PGS (Blu-ray bitmap) Does not fit

FFmpeg command example for MKV

ffmpeg -i input.mkv \
  -map 0:v:0 \
  -map 0:a:0 \
  -map 0:s:0 \
  -c:v libx265 -crf 24 -preset medium \
  -c:a:0 libopus -b:a 128k \
  -c:s copy \
  output.mkv

The -crf and -b:a values are starting examples, not values this tool measured. Track numbers (0:a:0 etc.) follow the order you picked, so change them to match the real file. Play the result on the device or app you plan to use and check it yourself.

A container is just a box — it doesn’t decide quality

MP4, MKV, WebM and MOV are boxes (containers) that hold video, audio and subtitle streams. Whether you put the same H.264 stream in MP4 or in MKV, the stream itself is identical, so switching containers does not change the quality. Two things matter when you choose a container: “does that box accept my combination of streams?” and “will the devices and apps I use open that box?” This tool answers the first question; the second you have to check yourself, as explained under the limitations below.

What each of the four containers is like

  • MP4: known as the container that plays most widely on phones, TVs and in browsers. In return, the codecs and subtitle formats it can hold are limited.
  • MKV: a storage-friendly box that can hold virtually any codec, multiple audio tracks and multiple subtitles (including bitmap subtitles). Playback in the default player of a device is reportedly not guaranteed.
  • WebM: a format defined for the web that allows only VP8, VP9 and AV1 video, Vorbis and Opus audio, and WebVTT subtitles. It cannot hold H.264 or AAC.
  • MOV: Apple’s QuickTime-family container, commonly used in work that involves editing codecs such as ProRes.

How the verdicts are decided

  • Fits as-is: a combination where the stream can go into that container without re-encoding.
  • Fits after conversion: cases such as subtitles that must change format to fit. SRT → mov_text (MP4, MOV) or WebVTT (WebM) is the typical example, and ASS loses its styling in the process.
  • Fits, but check compatibility: FFmpeg can put it in, but it is not a standard combination, or it is reportedly not opened by some playback apps. MP4+Opus is the typical case.
  • Does not fit: a combination that cannot go into that container. Video or audio has to be re-encoded with another codec, and bitmap subtitles have to be dropped.

The table behind these verdicts is this site’s summary of the container specifications and FFmpeg’s usual behavior, and it can vary with the FFmpeg version. Codecs that are not in the table are not judged, so that the tool never says “it works” about something it doesn’t know.

How to use it

  1. If you already know the combination you will make, pick the video, audio and subtitle chips. If you already have a file, paste its ffprobe output to fill them in.
  2. Read the top line for the safest container, then read the per-track verdicts and reasons on the four cards.
  3. If you see “re-encode needed” or “subtitle dropped”, decide whether to accept that loss or switch to another container or codec. For example, x265+Opus+PGS fits everything as-is only in MKV.
  4. Once you have chosen a container, use “Show command” to copy the -map and -c example and run it. Choose “Encode new” when you are encoding fresh, or “Copy existing tracks” when you are moving tracks that are already encoded.
  5. Play the result on the device or app you will actually use and check the sound, subtitles and sync.

This tool is a pre-selection tool for a combination you are going to make. To find out whether an MKV file you already have can be moved to MP4 without quality loss, the MKV to MP4 Remux Feasibility Checker, which reads the tracks directly, is more accurate. When choosing a video codec, use Codec Support Check and the Codec String Decoder alongside it, and for audio codecs the Audio Bitrate Picker. If you put HEVC in MP4 and it won’t open on an Apple device, the hvc1/hev1 Tag Checker can help.

What the commands do

  • -map 0:v:0 -map 0:a:0 -map 0:s:0: pulls in the video, audio and subtitle tracks by explicit number. Subtitles that do not fit are left out here.
  • -c:v copy and -c:a:0 copy: copy without re-encoding. For tracks that do not fit, a re-encoding option is used instead.
  • -c:s mov_text, -c:s webvtt and -c:s copy: convert the subtitles to the format that suits the container (MP4, MOV, WebM) or copy them as they are (MKV).
  • -tag:v hvc1: added when putting HEVC in MP4 or MOV. Without this tag, playback on Apple devices is known to have problems.
  • -movflags +faststart: puts the playback information of MP4 and MOV at the front of the file so it can start playing right away on the web.

Limitations worth knowing

  • The tool decides from codec names, container specifications and FFmpeg’s usual behavior. It is not a table built by playing files on each device, so “fits” does not mean “plays on that device”. AV1, VP9, Opus and FLAC may not play depending on the device and app.
  • The -crf and -b:a values in the commands are starting examples, not values this tool measured. For values that match your quality target, see the CRF Recommender or the measurement articles.
  • FFmpeg’s encoders for DTS and TrueHD are experimental or missing, so even in encode mode they are put in by copying. To put such audio into MP4, MOV or WebM you would convert it to another codec such as AAC or Opus.
  • Extras such as chapters, attachments (fonts), metadata, multiple video tracks and HDR metadata are not handled. Fonts attached to an MKV do not fit in MP4.
  • Track numbers in the commands follow the order you picked, so fix them by hand if they differ from the stream order in the real file. Pasting ffprobe output reads only the codec names, not other details of the file.