What is a .mkv file?
video/x-matroska
MKV (Matroska) is an open, codec-agnostic multimedia container that holds unlimited video, audio, subtitle, chapter, and attachment tracks in one file. Its structure is EBML, a binary tree of length-prefixed elements, and its attachments typically carry the fonts an ASS subtitle track needs. Because it constrains nothing about the streams inside, the extension says nothing about whether a player can decode them. Steve Lhomme started the project in 2002; WebM is the restricted profile of it that browsers accept.
How to use a .mkv file
Use an example MKV to test EBML parsing and multi-track demuxing, subtitle and chapter extraction, and remux pipelines — checking that per-track language and default flags survive, that font attachments are preserved, and that a remux to MP4 reports the tracks MP4 cannot carry instead of dropping them silently.
Download example .mkv files
- MKV — Matroska H.264 ClipThe clip in a Matroska (MKV) container with H.264 video — the flexible open container used for rich multi-track media. For testing MKV demuxing and remux/conversion.
- Soft Subtitles — MKV (SRT track)A clip with a soft (muxed, toggleable) SRT subtitle track in a Matroska container — the subtitles are a separate stream, not burned in. A fixture for testing subtitle extraction, rendering, and toggling.
- Codec — FFV1 (Mathematically Lossless)The shared pan-city base plate encoded with FFV1 level 3 (lossless). Mathematically lossless: decoding reproduces the source pixels bit for bit. Used for archival preservation, and the right reference when you need to prove a processing step, not a codec, caused a change. Every clip in this group carries the identical picture, so a decoder-support matrix built from them isolates the codec as the only variable.
- Container — MatroskaOne H.264 elementary stream wrapped in Matroska. Every file in this group was produced from the SAME encode with a stream copy, so the compressed video bytes are identical and the container is genuinely the only difference. The most permissive container in common use: any codec, unlimited tracks, chapters, attachments. Not natively playable in Safari, which is its main practical limitation.
- Pixel Format — 8-bit 4:2:08-bit 4:2:0 HEVC. The universal delivery format. Chroma is stored at quarter resolution, which is invisible on photographic content and very visible on saturated text and thin graphic edges. Shipped in Matroska rather than MP4 on purpose: an exotic pixel format in an .mp4 would be advertised as browser-playable and then fail to decode. Every clip in this group is the same picture, so the pixel format is the only variable.
- Pixel Format — 8-bit 4:2:28-bit 4:2:2 HEVC. Chroma at half horizontal resolution — the broadcast and mezzanine standard. Survives one round of chroma keying and colour correction far better than 4:2:0. Shipped in Matroska rather than MP4 on purpose: an exotic pixel format in an .mp4 would be advertised as browser-playable and then fail to decode. Every clip in this group is the same picture, so the pixel format is the only variable.
- Pixel Format — 8-bit 4:4:48-bit 4:4:4 HEVC. No chroma subsampling at all. Necessary for screen content and graphics, and the only format where coloured text stays clean, but unsupported by most hardware decoders. Shipped in Matroska rather than MP4 on purpose: an exotic pixel format in an .mp4 would be advertised as browser-playable and then fail to decode. Every clip in this group is the same picture, so the pixel format is the only variable.
- Pixel Format — 10-bit 4:2:010-bit 4:2:0 HEVC. Ten bits per component gives 1024 levels instead of 256, which is what removes banding from smooth gradients. Now the norm for HDR and for high-quality SDR encodes. Shipped in Matroska rather than MP4 on purpose: an exotic pixel format in an .mp4 would be advertised as browser-playable and then fail to decode. Every clip in this group is the same picture, so the pixel format is the only variable.
and 30 more in the library.