Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

Matroska Multimedia Container

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name Matroska Multimedia Container
Description Audiovisual file format that can wrap an unlimited number of video, audio, still picture, and/or subtitle tracks. A wide range of audio and video encodings are supported, as described on the Matroska Codec Page, consulted May 11, 2012. The Matroska developer's site calls attention to the ways in which the format overcomes some of the limitations of the AVI wrapper, supporting "all known audio and video compression formats by design." 1 The code is written in Extensible Binary Meta Language (EBML), and the developers state that this provides "significant advantages in terms of future format extensibility, without breaking file support in old parsers." Large essences, like video, are broken into blocks, which are grouped into blockgroups and clusters each carrying a header. Practice guidance from the Matroska Codec Page states that "there is no set limit to how much data a Cluster can contain . . . but so far developers seem to like to place the limit at 5 seconds or 5 megabytes." Header data is a part of the format structure that supports playback; other parts include the optional metaseek section, which contains an index of the other groups in the file, e.g., track information, chapters, tags, cues, etc.
Production phase A final state format for enduser delivery.
Relationship to other formats
    Has subtype Matroska_FFV1, Matroska File Format with FFV1 video encoding
    Has subtype Matroska_AVC, Matroska File Format with MPEG-4, Advanced Video Coding (Part 10) (H.264)
    Has subtype Matroska_MPEG-2, Matroska File Format with MPEG-2 Video Encoding (H.262)
    Has subtype Matroska_LPCM, Matroska File Format with LPCM Audio Encoding
    Has subtype Matroska_MP3, Matroska File Format with MP3 Audio Encoding
    Other EBML, Extensible Binary Meta Language, not described at this Web site at this time. Language used to code the Matroska file format.

Local use Explanation of format description terms

LC experience or existing holdings None
LC preference  

Sustainability factors Explanation of format description terms

Disclosure Fully documented. Developed as an open source project; see history section of the Notes below which also reports on the CELLAR IETF standardization project launched in 2015.

Published online at


Modest adoption in heritage repositories. The City of Vancouver Archives uses FFV1 encoded video wrapped in the Matroska container, as discussed briefly on the archives' blog. This implementation is connected to the open source Archivematica project, whose Wiki lists Matroska-wrapped FFV1 video and LPCM audio as one of its preservation formats. Matroska also plays a critical role in the WebM open media project.

According to the Wikipedia article Matroska, consulted on May 11, 2012, a number of software applications support Matroska, including Zoom Player, MPlayer, VLC, KMPlayer, ALLPlayer, Elmedia Player, foobar2000, HandBrake, Pinnacle Studio, and PowerDVD, as well as media centers such as Plex, Boxee, PS3 Media Server and XBMC, and the Web browser Google Chrome. Hardware support is provided on some Blu-ray players and media centers like Asus, OPPO Digital, Panasonic, LG, Samsung, Sharp, LaCie and Western Digital.

Originally introduced in the 8.1 update for Windows 8, Microsoft's Windows 10 built-in media player apps include native support for Matroska video.

Adoption is expected to increase thanks to several outcomes of the European Union-based PREFORMA project, including IETF-sponsored format specification standardization through the CELLAR project and the open source MediaConch toolset, an implementation checker, policy checker, reporter, and fixer for FFV1, Matroska and LPCM.

    Licensing and patents The Matroska website says this: "Matroska is an open standards project. This means for personal use it is absolutely free to use and that the technical specifications describing the bitstream are open to everybody, even to companies that would like to support it in their products. The source code of the libraries developed by the Matroska Development Team is licensed under GNU L-GPL. In addition to that, there are also free parsing and playback libraries available under the BSD license, for commercial software and Hardware adoption." According to Wikipedia, consulted May 10, 2012, "CoreCodec owns the copyrights and trademarks for the Matroska specification."
Transparency Depends upon included encodings, some of which will depend upon algorithms and tools to read and require sophistication to build tools.

The Matroska website provides a diagram of the sections of the wrapper. Technical and descriptive metadata can be found in a few different places in the wrapper. Technical metadata appears in the Track section, as described on the Matroska developer website: "The Track section has basic information about each of the tracks. For instance, is it a video, audio or subtitle track? What resolution is the video? What sample rate is the audio? The Track section also says what codec to use to view the track, and has the codec's private data for the track." Matroska has established identifiers for the codecs it supports, similar to the FOURCC and other identifiers that provide a higher level of specificity (often to the coding profile level) than Internet Media Types (aka MIME types). Timecode metadata is provided in the headers for blocks, blockgroups, and clusters.

At least two locations may contain descriptive metadata, according to the developer's website:

  • "The Segment Information section contains basic information relating to the whole file. This includes the title for the file, a unique ID so that the file can be identified around the world, and if it is part of a series of files, the ID of the next file."
  • Descriptive metadata can be embedded in the Tagging section. According to the website: "The Tagging section contains all of the Tags that relate to the the file and each of the tracks. These tags are just like the ID3 tags found in MP3's. It has information such as the singer or writer of a song, actors that were in the video, or who made the video."
External dependencies The Matroska website states that Matroska files need a DirectShow parser filter [CCCP (Combined Community Codec Pack) is the current choice] to playback through DirectShow media players such as Windows Mediaplayer on Windows-machines. Other non-DirectShow players like VLC and MPV can play MKV files without the need for a parser. Mac and Linus operating systems similarly don't need a DirectShow parser since it's a Windows-only concern.
Technical protection considerations Encryption is supported and the Matroska website states that "It is easily possible to use the encryption framework in Matroska as a type of DRM."

Quality and functionality factors Explanation of format description terms

Moving Image
Normal rendering Good support.
Clarity (high image resolution) Varies according to encoding. See FFV1, MPEG-4_AVC and MPEG-2.
Functionality beyond normal rendering

A common use of Matroska is to harvest the information from an authored DVD in a way that preserves some of the functionality of the DVD. The Matroska website lists several of the features of the container that can help the user retain some of the experience of an authored DVD:

  • Selectable subtitle/audio/video streams
  • Modularly expandable
  • Error resilience (can recover playback even when the stream is damaged)
  • Menus (like DVDs have)

More about converting DVDs to Matroska can be found on the Matroska website.

Matroska can also contain 3D video. The authors of this document do not know of examples of 3D video in Matroska files so comments are welcome. The Matroska website notes that "3D support is still in infancy and may evolve to support more features." See Notes below for more about 3D.

Normal rendering Good support.
Fidelity (high audio resolution) Varies according to encoding. See LPCM and MP3_ENC.
Functionality beyond normal rendering

Matroska can be used to contain audio-only content in ways that simulate the experience of a CD. The Matroska website lists several of the features of the container that can help the user retain some of the experience of an audio CD:

  • All tracks to a CD can be in a single file. You have the option of dividing the tracks into separate Tracks, or separate Chapters. You could make your own compilation in a single file, even using different audio formats, such as MP3 and Vorbis.
  • It is easy to delete portions of the audio without reencoding because you just throw away those blocks. You don't even have to be able to play that format back, you could edit by just knowing timecodes.
  • Detecting differences between two audio streams would be easy because you could store both in a single file, start playback, and then just switch between tracks.
  • You can embed lyrics or transcriptions (e.g. from srt subtitles) in the audio file.

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension mkv
For video (which can contain audio and/or subtitles) files
Filename extension mka
For audio-only files
Filename extension mks
For subtitles-only files
Filename extension mk3d
For stereoscopic video files. See Notes below.
Internet Media Type video/x-matroska
Selected from The File Extension Source.
Magic numbers 1A 45 DF A3 93 42 82 88 6D 61 74 72 6F 73 6B 61
From Gary Kessler's File Signatures Table. The first four hex characters in this string are used to identify Extensible Binary Meta Language (EMBL).
Pronom PUID fmt/569
Matroska v. 1-4. See
Wikidata Title ID Q223535
No versions declared. See

Notes Explanation of format description terms


Matroska is an English word derived from the Russian word Matryoshka which means nesting doll, a reference to this format's ability to wrap a number of component elements.

Regarding Extensible Binary Meta Language (EBML): The File Extension Guide has a page about the Matroska mkv extension that includes this description: "EBML specifies a binary and octet (byte) aligned format inspired by the principle of XML. EBML itself is a generalized description of the technique of binary markup. Like XML, it is completely agnostic to any data that it might contain. . . . Matroska is a specific implementation [that] seeks to define a subset of the EBML language in the context of audio and video data (though it obviously isn't limited to this purpose). The format is made of 2 parts: the semantic and the syntax. The semantic specifies a number of IDs and their basic type and is not included in the data file/stream."

Regarding timecodes, the Matroska website reports that the Block's timecode is a signed integer that represents the raw timecode relative to the Cluster's Timecode, multiplied by the TimecodeScale (value expressed in header metadata). The Block's timecode is represented by a 16bit signed integer (sint16). The default value of TimecodeScale consists of integers that represent 1ms, meaning that the maximum time span of Blocks in a Cluster is 65536ms. The compiler of this format description was unable to determine whether a Matroska-file-producing application might be able to carry over the pre-existing timecode found on a source videotape, an outcome sought in some preservation reformatting activities.

Regarding 3D, multi-planar, and stereoscopic video footage, the same Matroska Web page offers an extensive discussion, excerpted here: "There are 2 different ways to compress 3D videos: have each 'eye' track in a separate track and have one track have both 'eyes' combined inside (which is more efficient, compression-wise). . . . For the single track variant, there is the StereoMode element which defines how planes are assembled in the track (mono or left-right combined). Odd values of StereoMode means the left plane comes first for more convenient reading. The pixel count of the track (PixelWidth/PixelHeight) should be the raw amount of pixels (for example 3840x1080 for full HD side by side) and the DisplayWidth/Height in pixels should be the amount of pixels for one plane (1920x1080 for that full HD stream). Old stereo 3D were displayed using anaglyph (cyan and red colours separated). For compatibility with such movies, there is a value of the StereoMode that corresponds to AnaGlyph. There is also a "packed" mode (values 13 and 14) which consists of packing 2 frames together in a Block using lacing. The first frame is the left eye and the other frame is the right eye (or vice versa). The frames should be decoded in that order and are possibly dependent on each other (P and B frames). For separate tracks, Matroska needs to define exactly which track does what. TrackOperation with TrackCombinePlanes do that."

An MKV file can also contain associated essences that are not moving image or audio in the "Attachment" section of the container. From the Matroska website: "The Attachment section is for attaching any type of file you want to a Matroska file. You could attach anything, pictures, webpages, programs, even the codec needed to play back the file. What you attach is up to you."


Matroska is an offshoot of the Multimedia Container Format project. According to Wikipedia, consulted May 10, 2012, Matroska "was announced on 6 December 2002 as a fork of the Multimedia Container Format (MCF), after disagreements between MCF lead developer Lasse Kärkkäinen and soon-to-be Matroska founder Steve Lhomme about the use of the Extensible Binary Meta Language (EBML) instead of a binary format. This coincided with a long coding break by the MCF's lead developer, during which most of the community quickly migrated to the new project."

An offshoot of the European-based PREFORMA project, which aims "to address the challenge of implementing good quality standardised file formats for preserving data content in the long term," Codec Encoding for LossLess Archiving and Realtime transmission (cellar) is an IETF-approved project to standardize Matroska, FFV1 and FLAC.

Format specifications Explanation of format description terms

Useful references


1The Matroska developers' website has this to say about Matroska and AVI: "The AVI container was originally introduced by Microsoft in the early 90s, and was designed as a very flexible A/V container format for the video and audio compression formats of those days. It is necessary to understand that AVI is only one ( but important ) part of a complete multimedia framework called 'Video For Windows' ( VfW ), offering programmers not only a container but also a complete set of API commands to be able to program their own video and audio codecs, using either the VfW or the ACM interface... Unfortunately this VfW framework cannot support many of the more advanced features that modern audio and video compression formats will offer, such as Variable Bitrate audio encoding ( VBR ), or Variable Framerate video encoding ( VFR ). Although AVI was extended with an additional standard called 'Open DML AVI' in the mid/late 90s, overcoming most of its very annoying limitations like the 2 GB file size limit, there is still no proper and spec compliant way to support modern compression formats like the excellent, opensource Ogg Vorbis audio compression format."

Last Updated: 07/27/2017