Reference · Compatibility

Codec and container compatibility

A codec and a container are separate layers. Some pairings are standard and widespread, some are technically possible but unusual, and some are intentionally restricted by a container profile or playback ecosystem.

Legend: Common = widely used and expected; Supported = valid/implemented but less universal; Unusual = possible in some tooling but poor for interchange. Always check the target device or platform.

Why the pairing matters

The codec defines how the audio or video is compressed. The container defines how streams, timestamps and metadata are packaged. A player must understand both layers—and the specific profile, level, bit depth and track types inside the file.

Video codec → container relationships

CodecMP4/MOVMKVWebMMPEG-TS/M2TSAVI
H.264 / AVCCommonCommonNot WebM profileCommonSupported, legacy/interchange caveats
HEVC / H.265CommonCommonNot WebM profileCommonUnusual
AV1Common and growingCommonCommonLess common / ecosystem dependentUnusual
VP9Supported in some MP4 workflowsCommonCommonUnusualUnusual
MPEG-2 VideoSupported but not the usual modern MP4 pairingSupportedNot WebM profileCommonCommon historically
MPEG-4 Part 2 / DivX/XvidSupportedCommon historicallyNot WebM profilePossible in some systems, uncommonVery common historically
ProResCommon in MOV; supported in MP4-family tooling variesSupportedNot WebM profileUnusualUnusual

Audio codec → container relationships

CodecMP4/M4AMKVWebMOggMPEG-TS
AACCommonCommonNot WebM profileUnusualCommon
OpusSupported in modern specifications/softwareCommonCommonCommonLess common / implementation dependent
VorbisUnusualCommonCommonCommonUnusual
FLACSupported by modern ecosystems but not universalCommonNot WebM profileSupported as Ogg FLACUnusual
AC-3Common in some MP4 delivery ecosystemsCommonNot WebM profileUnusualCommon
E-AC-3Common in streaming/device ecosystemsCommonNot WebM profileUnusualCommon
Dolby TrueHDUncommonCommon for disc-rip/archive workflowsNot WebM profileUnusualM2TS/Blu-ray use

Technical support is not the same as practical compatibility

FFmpeg may be able to mux a combination that a television, browser or hardware decoder will never accept. For interchange, the most widely deployed pairing is usually safer than the most permissive one.

Likewise, WebM is deliberately narrower than general Matroska even though it is Matroska-derived.

Common confusion

“MKV supports HEVC” does not mean every MKV player supports HEVC.

The container can carry the stream; the player still needs an HEVC decoder with the required profile/level/bit-depth capability.

Changing containers may not require transcoding.

If both source and destination containers support the existing streams, a remux can preserve the encoded media unchanged.