FFmpeg Cookbook
JA

Codec Compatibility Matrix

Shows which codecs (H.264, H.265, AV1, VP9 and more) fit in which containers (MP4, MKV, MOV, WebM, AVI, TS, FLV).

✓ Supported
△ Limited / Non-standard
✗ Not supported
Container H.264 H.265 AV1 VP9 MPEG-4 ProRes AAC MP3 Opus
.mp4 ✓ ✓ ✓ △ ✓ △ ✓ ✓ △
.mkv ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
.mov ✓ ✓ ✗ ✗ ✓ ✓ ✓ △ ✗
.webm ✗ ✗ ✓ ✓ ✗ ✗ ✗ ✗ ✓
.avi ✓ △ ✗ ✗ ✓ ✗ △ ✓ ✗
.ts ✓ ✓ ✗ ✗ ✓ ✗ ✓ ✓ ✗
.flv ✓ ✗ ✗ ✗ △ ✗ ✓ ✓ ✗
Popular uses
Diagnose playback incompatibilityChoose container and codec pairsCheck web delivery compatibility

How to use

  1. Pick the container you needMP4 plays on almost every device.
  2. Check the codecsThe table shows ✓ (supported), △ (limited) or ✗ (not supported).
  3. Re-mux if neededIf the codecs fit, you can change only the container, without re-encoding.

Recommended settings

Phone / SNS sharing
MP4 + H.264
Plays on almost every device and browser.
Web embed
WebM + VP9 / AV1
Efficient compression. VP9 can also carry transparency (alpha).
Editorial pipeline
MOV + ProRes / DNxHD
Little quality loss, and easy for editing software to handle.

When it goes wrong

No audio after MP4 conversion

Cause: The audio is still AC-3, DTS or Vorbis. MP4 can hold it, but some devices and browsers cannot play it.

Fix: Convert only the audio to AAC (-c:v copy -c:a aac).

AV1 won’t play

Cause: Older browsers and operating systems cannot play AV1.

Fix: Convert to H.264, which plays almost everywhere.

Questions

Fastest way to convert MKV → MP4?

If the codecs are H.264 and AAC, change only the container without re-encoding (ffmpeg -i in.mkv -c copy out.mp4).

AV1 vs H.265?

AV1 is a newer, efficient format, but older devices may not play it. Some browsers cannot play H.265 either. If it has to play everywhere, H.264 is the safe choice.

More detail (settings, limits, FFmpeg commands)

What each setting means

Container
MP4 / MKV / MOV / etc — the wrapper file.
Codec
H.264 / H.265 / AV1 — the compression scheme.

Browsers and limits

  • The table shows what a container can hold. Whether it plays depends on the browser and OS version.

The same job with the FFmpeg command line

Just change container
ffmpeg -i input.mkv -c copy output.mp4
No re-encoding, so it finishes quickly. Works when the codecs are allowed in MP4.