Reference · Containers

What is MKV?

MKV is the common filename extension for a Matroska multimedia container. Matroska can package far more than one video and one audio stream: it can describe multiple tracks, subtitles, chapters and editions, attachments, rich metadata, 3D layouts, HDR signalling and other presentation information.

MKV is: a container. MKV is not: a video codec. Its flexibility is a property of the wrapper; the codecs inside still determine how the picture and sound are compressed.

The container does not define the video codec

An MKV file might contain H.264, HEVC, AV1, VP9, MPEG-2 or another mapped video codec. Audio can include AAC, Opus, FLAC, AC-3/E-AC-3, TrueHD, DTS-family streams, PCM and many others. Matroska is deliberately extensible, so codec support grows through defined mappings rather than a fixed “MKV codec.”

What Matroska can represent

CapabilityWhat it means in practice
Multiple video tracksMore than one video stream can be stored and individually described/selected.
Multiple audio tracksDifferent languages, stereo/surround mixes, commentary, descriptive audio, karaoke or alternate codec versions can coexist.
Track roles and flagsDefault, forced, original-language, commentary, hearing-impaired and visual-impaired roles can help players choose appropriately.
Text and image subtitlesMappings exist for plain text/ASS/SSA and bitmap subtitle systems such as VobSub; multiple subtitle tracks and languages are normal.
ChaptersSimple chapter markers, nested chapters and more advanced chapter structures are possible.
Multiple editionsOne file can expose different editions or virtual cuts. Ordered chapters can build alternate timelines without duplicating all media.
AttachmentsCover art, fonts, transcripts, reports, annotations and other ancillary files can be embedded.
Tags / metadataMetadata can target the entire file, tracks, chapters, editions or attachments.
3D / stereo videoExplicit stereo modes cover side-by-side, top/bottom, interleaved and other layouts; multi-plane track operations can combine separate planes.
Projection / VR metadataProjection elements can describe spherical/VR video and orientation.
Alpha / overlaysContainer structures can signal alpha-related additional data and overlay relationships where mappings support them.
HDR / colour metadataColour primaries, transfer characteristics, matrix/range and mastering-display metadata can be carried.
Dolby VisionStandardized BlockAddition mappings exist for Dolby Vision configuration and HEVC enhancement-layer information.
Cues / seekingIndexing structures support efficient seeking through long files.

HDR and Dolby Vision in MKV

Matroska can carry the ordinary colour and mastering metadata used by HDR workflows, while its Block Additional Mapping specification defines identifiers for Dolby Vision configuration records and enhancement-layer information. This means Dolby Vision can be represented in Matroska rather than being inherently tied to MP4.

Player support is the limiting factor. A device may parse MKV and decode HEVC yet still ignore a Dolby Vision mapping or fall back to the base HDR/SDR representation.

3D, alternate views and multiple editions

Matroska has explicit StereoMode signalling for stereoscopic layouts and can combine separate video-plane tracks using TrackOperation. It can therefore represent 3D material either as combined frames or as separate planes/tracks.

For “multi-angle” style content, it is safer to think in terms of multiple video tracks plus chapters/editions/track selection rather than one universal angle flag. Matroska can represent alternate material and virtual timelines, but whether a player exposes that as a DVD-style angle control is implementation-dependent.

Multiple editions are especially powerful: the same underlying media can be presented as different cuts or playback orders without storing every repeated segment again.

Images, fonts and other attachments

The Attachments element is deliberately general. It can embed JPEG/PNG cover art, subtitle fonts, transcripts, text notes, reports or other files related to the media. Cover art therefore does not need to be encoded as a video stream.

Matroska also defines track types beyond ordinary video/audio/subtitles, including logo, buttons, control and timed-metadata roles, although real player support for unusual track types varies considerably.

Why one MKV plays and another does not

A device may support Matroska but not every codec, profile or feature that can be stored inside it. An older television might play H.264/AAC in MKV but fail on HEVC Main 10, TrueHD, PGS subtitles, ordered chapters or a Dolby Vision mapping.

“Supports MKV” therefore means only that the device understands some portion of the Matroska ecosystem.

Common confusion

“MKV codec” is usually a category mistake.

The real compatibility problem is often the codec/profile or subtitle/audio feature inside the MKV.

MKV does not automatically mean lossless, high quality or Blu-ray quality.

The container can hold anything from heavily compressed low-resolution video to lossless audio and high-bitrate HDR video.

Renaming .mkv to .mp4 does not convert the container.

Compatible streams must be remuxed into a real MP4 structure.