Yatoshi Video playback
Technical index
Format reference

MKV and Matroska: What the Container Carries and Where It Breaks

Matroska holds many tracks, chapters, fonts and two kinds of subtitle. What that flexibility buys, and which playback failures it explains.

Container file.mkv Video · H.264 Audio · AC3 5.1 Audio · AAC 2.0 Subtitles · ASS Attachment · font Splitter Picture Sound Text Renderer
One Matroska file separated into its tracks. Each track needs its own decoder, which is why a single file can lose its sound or its subtitles rather than failing outright.

Matroska is the reason a great many playback problems look strange. It is not a video format but a container, and a remarkably permissive one: several video tracks, a dozen audio tracks, text and image subtitles, chapter structures, attached fonts and arbitrary metadata can all sit in one file. Everything that flexibility buys, it also makes possible to get wrong.

Container, not codec

The single most useful thing to know is that the extension says almost nothing about the contents. An MKV can hold H.264, HEVC, VP9, AV1, MPEG-2 or formats that predate all of them, at any bit depth, alongside audio in AC3, DTS, AAC, FLAC, Opus or Vorbis. Two files with the same extension can therefore behave entirely differently on one machine, and neither is malformed.

This is why “MKV will not play” is never a complete diagnosis. The container opened or it did not; if it opened, the question moves to which track failed and which codec that track uses. The diagnostic index separates those cases by symptom, and the answer is usually a decoder rather than anything to do with Matroska itself.

Many tracks, and the confusion that follows

A file holding four audio tracks has to pick one, and the choice comes from flags set when the file was created rather than from anything the viewer decides. A track marked default is chosen; when none is marked, behaviour varies between players and some choose nothing.

That produces a family of reports which look like faults and are not. Audio in an unexpected language, no audio at all until a track is selected manually, commentary instead of the film, or sound that stops partway through because a second track with a different codec begins. None of these is damage, and none is fixed by installing anything. Cycling tracks identifies all of them in seconds.

Subtitles compound it, because Matroska carries two incompatible kinds. Text subtitles in SRT, or in ASS with a full styling block, are drawn by a renderer at playback time. Image subtitles in PGS, carried over from Blu-ray sources, are small bitmaps that cannot be restyled or resized meaningfully. A player that handles text tracks perfectly can show nothing for an image track, which reads as a missing subtitle rather than as an unsupported kind.

Chapters, attachments and the features nothing else has

Ordered chapters are Matroska’s most distinctive feature and its most confusing. A file can specify a playback order that differs from the physical order of its contents, and can reference segments held in other files entirely. Used as intended, this lets a series share one copy of an opening sequence across every episode. Played by software that ignores the feature, the same file repeats material or skips it.

Attachments are the quieter feature and the more consequential one for appearance. Fonts stored inside the file let a styled subtitle track look the way its author intended on a machine that has never seen those typefaces. Without them the renderer substitutes, and the result is legible but different. It is the reason a fansub release can be several megabytes larger than its content explains.

Where MKV genuinely breaks

Two container-level faults exist and both are worth recognising, because they are the cases where the container really is the problem. A file written with malformed headers may open in one player and be refused by another, since tolerance for irregularity varies. And a file with a damaged or absent index seeks badly or not at all while playing normally from the start.

Both are repaired the same way, by remuxing: rewriting the container while leaving every track untouched. It takes seconds, loses no quality, and produces a clean file. What it cannot do is conjure a decoder, which is why remuxing a file that plays with no sound changes nothing. Container faults and codec faults look similar from the outside and share no remedy, and telling them apart before acting is most of the work. For archives rather than video, the failure modes are different again and are covered under CBR and CBZ.

Common questions

Is MKV a video format?

No, and the distinction matters when troubleshooting. Matroska is a container: it describes how tracks are stored side by side, not how the pictures are compressed. The video inside can be H.264, HEVC, VP9, AV1 or almost anything else, which is why two MKV files can behave completely differently on the same machine.

What is the difference between MKV and WebM?

WebM is a deliberately restricted subset of Matroska, limited to a small set of codecs so that browsers can support it with certainty. Anything a browser plays as WebM would also be valid Matroska; the reverse is not true, which is why a general MKV usually will not play in a browser.

Why does remuxing fix a file that would not play?

Because remuxing rewrites the container without touching the tracks. If the original was written with malformed headers or an index the player cannot use, a rewrite produces a clean equivalent in seconds and without quality loss. It fixes container faults and does nothing at all for a missing decoder.

What are ordered chapters and why do they cause confusion?

Ordered chapters let a file specify a playback order that differs from the physical order of its contents, and even reference segments in other files. Players that support the feature reproduce what the author intended; players that ignore it play the raw sequence, which can repeat an opening or skip a scene.

Can fonts really be stored inside a video file?

Yes, as attachments, and styled subtitles depend on it. An ASS subtitle track specifies typefaces, and without them the renderer substitutes whatever it has, changing the appearance. Attaching the fonts makes the file self-contained, which is the whole point of the feature.

Does the file extension MKA or MKS mean anything different?

They are the same container carrying different contents: MKA holds audio only and MKS holds subtitles only. Both are read by anything that reads MKV, and both exist mainly to make the contents obvious from the filename rather than for any technical reason.

Published