cellar | S. Lhomme |
Internet-Draft | |
Intended status: Standards Track | M. Bunkus |
Expires: January 9, 2017 | |
D. Rice | |
July 8, 2016 |
Matroska
draft-lhomme-cellar-matroska-00
This document defines the Matroska audiovisual container, including definitions of its structural Elements, as well as its terminology, vocabulary, and application.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 9, 2017.
Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Matroska aims to become THE standard of multimedia container formats. It was derived from a project called MCF, but differentiates from it significantly because it is based on EBML (Extensible Binary Meta Language), a binary derivative of XML. EBML enables significant advantages in terms of future format extensibility, without breaking file support in old parsers.
First, it is essential to clarify exactly "What an Audio/Video container is", to avoid any misunderstandings:
Matroska is designed with the future in mind. It incorporates features like:
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.
This document is a work-in-progress specification defining the Matroska file format as part of the IETF Cellar working group. But since it's quite complete it is used as a reference for the development of libmatroska. Legacy versions of the specification can be found here (PDF doc by Alexander Noé -- outdated).
For a simplified diagram of the layout of a Matroska file, see the Diagram page.
A more refined and detailed version of the EBML specifications is being worked on here.
The table found below is now generated from the "source" of the Matroska specification. This XML file is also used to generate the semantic data used in libmatroska and libmatroska2. We encourage anyone to use and monitor its changes so your code is spec-proof and always up to date.
Note that versions 1, 2 and 3 have been finalized. Version 4 is currently work in progress. There MAY be further additions to v4.
Matroska inherits security considerations from EBML. Other security considerations are to be determined.
To be determined.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Matroska is a Document Type of EBML (Extensible Binary Meta Language). This specification is dependent on the EBML Specification. For an understanding of Matroska's EBML Schema, see in particular the sections of the EBML Specification covering EBML Element Types, EBML Schema, and EBML Structure.
As an EBML Document Type, Matroska adds the following constraints to the EBML specification.
All top-levels elements (Segment and direct sub-elements) are coded on 4 octets, i.e. class D elements.
Language codes can be either the 3 letters bibliographic ISO-639-2 form (like "fre" for french), or such a language code followed by a dash and a country code for specialities in languages (like "fre-ca" for Canadian French). Country codes are the same as used for internet domains.
Each level can have different meanings for audio and video. The ORIGINAL_MEDIUM tag can be used to specify a string for ChapterPhysicalEquiv = 60. Here is the list of possible levels for both audio and video :
ChapterPhysicalEquiv | Audio | Video | Comment |
---|---|---|---|
70 | SET / PACKAGE | SET / PACKAGE | the collection of different media |
60 | CD / 12" / 10" / 7" / TAPE / MINIDISC / DAT | DVD / VHS / LASERDISC | the physical medium like a CD or a DVD |
50 | SIDE | SIDE | when the original medium (LP/DVD) has different sides |
40 | - | LAYER | another physical level on DVDs |
30 | SESSION | SESSION | as found on CDs and DVDs |
20 | TRACK | - | as found on audio CDs |
10 | INDEX | - | the first logical level of the side/medium |
Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
Bit 0 is the most significant bit.
Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timecodes MAY NOT be consecutive. But a frame with a past timecode MUST reference a frame already known, otherwise it's considered bad/void.
There can be many Blocks in a BlockGroup provided they all have the same timecode. It is used with different parts of a frame with different priorities.
| Block Header | | Offset | Player | Description | | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is < 0x80, 2 if < 0x4000, etc) (most significant bits set to increase the range). | | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - |
| Flags | | Bit | Player | Description | | 0-3 | - | Reserved, set to 0 | | 4 | - | Invisible, the codec SHOULD decode this frame but not display it | | 5-6 | MUST | Lacing
| | 7 | - | not used |
| | Lace (when lacing bit is set) | | 0x00 | MUST | Number of frames in the lace-1 (uint8) | | 0x01 / 0xXX | MUST* | Lace-coded size of each frame of the lace, except for the last one (multiple uint8). *This is not used with Fixed-size lacing as it is calculated automatically from (total size of lace) / (number of frames in lace). | | (possibly) Laced Data | | 0x00 | MUST | Consecutive laced frames |
Lacing is a mechanism to save space when storing data. It is typically used for small blocks of data (refered to as frames in matroska). There are 3 types of lacing : the Xiph one inspired by what is found in the Ogg container, the EBML one which is the same with sizes coded differently and the fixed-size one where the size is not coded. As an example is better than words...
Let's say you want to store 3 frames of the same track. The first frame is 800 octets long, the second is 500 octets long and the third is 1000 octets long. As these data are small, you can store them in a lace to save space. They will then be solved in the same block as follows:
A frame with a size multiple of 255 is coded with a 0 at the end of the size, for example 765 is coded 255;255;255;0.
In this case the size is not coded as blocks of 255 bytes, but as a difference with the previous size and this size is coded as in EBML. The first size in the lace is unsigned as in EBML. The others use a range shifting to get a sign on each value :
In this case only the number of frames in the lace is saved, the size of each frame is deduced from the total size of the Block. For example, for 3 frames of 800 octets each :
The SimpleBlock is very inspired by the [Block structure](({{site.baseurl}}/index.html#block-structure). The main differences are the added Keyframe flag and Discardable flag. Otherwise everything is the same.
Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
Bit 0 is the most significant bit.
Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timecodes MAY NOT be consecutive. But a frame with a past timecode MUST reference a frame already known, otherwise it's considered bad/void.
There can be many Blocks in a BlockGroup provided they all have the same timecode. It is used with different parts of a frame with different priorities.
| SimpleBlock Header | | Offset | Player | Description | | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is < 0x80, 2 if < 0x4000, etc) (most significant bits set to increase the range). | | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - |
| Flags | | Bit | Player | Description | | 0 | - | Keyframe, set when the Block contains only keyframes | | 1-3 | - | Reserved, set to 0 | | 4 | - | Invisible, the codec SHOULD decode this frame but not display it | | 5-6 | MUST | Lacing
| | 7 | - | Discardable, the frames of the Block can be discarded during playing if needed |
| | Lace (when lacing bit is set) | | 0x00 | MUST | Number of frames in the lace-1 (uint8) | | 0x01 / 0xXX | MUST* | Lace-coded size of each frame of the lace, except for the last one (multiple uint8). *This is not used with Fixed-size lacing as it is calculated automatically from (total size of lace) / (number of frames in lace). | | (possibly) Laced Data | | 0x00 | MUST | Consecutive laced frames |
The EncryptedBlock is very inspired by the [SimpleBlock structure](({{site.baseurl}}/index.html#simpleblock_structure). The main differences is that the raw data are Transformed. That means the data after the lacing definition (if present) have been processed before put into the Block. The laced sizes apply on the decoded (Inverse Transform) data. This size of the Transformed data MAY NOT match the size of the initial chunk of data.
The other difference is that the number of frames in the lace are not saved if "no lacing" is specified (bits 5 and 6 set to 0).
The Transformation is specified by a TransformID in the Block (MUST be the same for all frames within the EncryptedBlock).
Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
Bit 0 is the most significant bit.
Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timecodes MAY NOT be consecutive. But a frame with a past timecode MUST reference a frame already known, otherwise it's considered bad/void.
There can be many Blocks in a BlockGroup provided they all have the same timecode. It is used with different parts of a frame with different priorities.
| EncryptedBlock Header | | Offset | Player | Description | | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is < 0x80, 2 if < 0x4000, etc) (most significant bits set to increase the range). | | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - |
| Flags | | Bit | Player | Description | | 0 | - | Keyframe, set when the Block contains only keyframes | | 1-3 | - | Reserved, set to 0 | | 4 | - | Invisible, the codec SHOULD decode this frame but not display it | | 5-6 | MUST | Lacing
| | 7 | - | Discardable, the frames of the Block can be discarded during playing if needed |
| | Lace (when lacing bit is set) | | 0x00 | MUST* | Number of frames in the lace-1 (uint8) Only available if bit 5 or bit 6 of the EncryptedBlock flag is set to one. | | 0x01 / 0xXX | MUST | Lace-coded size of each frame of the lace, except for the last one (multiple uint8). *This is not used with Fixed-size lacing as it is calculated automatically from (total size of lace) / (number of frames in lace). | | (possibly) Laced Data | | 0x00 | MUST | TransformID (EBML coded integer value). Value 0 = Null Transform | | 0x01+ | MUST | Consecutive laced frames |
The data in matroska is stored in coding order. But that means if you seek to a particular point and a frame has been referenced far away, you won't know while playing and you might miss this frame (true for independent frames and overlapping of dependent frames). So the idea is to have a placeholder for the original frame in the timecode (display) order.
The structure is a scaled down version of the normal Block.
| Virtual Block Header | | Offset | Player | Description | | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is < 0x80, 2 if < 0x4000, etc) (most significant bits set to increase the range). | | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - |
| Flags | | Bit | Player | Description | | 7-0 | - | Reserved, set to 0 |
|
This specification includes an EBML Schema which defines the Elements and structure of Matroska as an EBML Document Type. The EBML Schema defines every valid Matroska element in a manner defined by the EBML specification.
For convenience the section of the EBML specification that defines EBML Schema Element Attributes is restated here:
Within an EBML Schema the <EBMLSchema> uses the following attributes to define the EBML Schema:
attribute name | required | definition |
---|---|---|
docType | Yes | The docType lists the official name of the EBML Document Type that is defined by the EBML Schema; for example, <EBMLSchema docType="matroska">. |
version | Yes | The version lists an incremental non-negative integer that specifies the version of the docType documented by the EBML Schema. Unlike XML Schemas, an EBML Schema documents all versions of a docType's definition rather than using separate EBML Schemas for each version of a docType. Elements may be introduced and deprecated by using the minver and maxver attributes of . |
Within an EBML Schema the <element> uses the following attributes to define an EBML Element.
attribute name | required | definition |
---|---|---|
name | Yes | The official human-readable name of the EBML Element. The value of the name MUST be in the form of an NCName as defined by the XML Schema specification. |
level | Yes | The level notes at what hierarchical depth the EBML Element may occur within an EBML Document. The Root Element of an EBML Document is at level 0 and the Elements that it may contain are at level 1. The level MUST be expressed as an integer. Note that Elements defined as global and recursive MAY occur at a level greater than or equal to the defined level. |
global | No | A boolean to express if an EBML Element MUST occur at its defined level or may occur within any Parent EBML Element. If the global attribute is not expressed for that Element then that element is to be considered not global. |
id | Yes | The Element ID expressed in hexadecimal notation prefixed by a '0x'. To reduce the risk of false positives while parsing EBML Streams, the IDs of the Root Element and Top-Level Elements SHOULD be at least 4 octets in length. Element IDs defined for use at Level 0 or Level 1 MAY use shorter octet lengths to facilitate padding and optimize edits to EBML Documents; for instance, the EBML Void Element uses an Element ID with a one octet length to allow its usage in more writing and editing scenarios. |
minOccurs | No | An integer to express the minimal number of occurrences that the EBML Element MUST occur within its Parent Element if its Parent Element is used. If the Element has no Parent Level (as is the case with Elements at Level 0), then minOccurs refers to constaints on the Element's occurrence within the EBML Document. If the minOccurs attribute is not expressed for that Element then that Element shall be considered to have a minOccurs value of 0. This value of minOccurs MUST be a positive integer. The semantic meaning of minOccurs within an EBML Schema is considered analogous to the meaning of minOccurs within an XML Schema. Note that Elements with minOccurs set to "1" that also have a default value declared are not required to be stored but are required to be interpretted, see the Note on the Use of default attributes to define Mandatory EBML Elements. |
maxOccurs | No | A value to express the maximum number of occurrences that the EBML Element MAY occur within its Parent Element if its Parent Element is used. If the Element has no Parent Level (as is the case with Elements at Level 0), then maxOccurs refers to constaints on the Element's occurrence within the EBML Document. This value may be either a positive integer or the term unbounded to indicate there is no maximum number of occurrences or the term identical to indicate that the Element is an Identically Recurring Element. If the maxOccurs attribute is not expressed for that Element then that Element shall be considered to have a maxOccurs value of 1. The semantic meaning of maxOccurs within an EBML Schema is considered analogous to the meaning of minOccurs within an XML Schema, with EBML Schema adding the concept of Identically Recurring Elements. |
range | No | For Elements which are of numerical types (Unsigned Integer, Signed Integer, Float, and Date) a numerical range may be specified. If specified that the value of the EBML Element MUST be within the defined range inclusively. See the section of Expressions of range for rules applied to expression of range values. |
default | No | A default value may be provided. If an Element is mandatory but not written within its Parent EBML Element, then the parser of the EBML Document MUST insert the defined default value of the Element. EBML Elements that are Master-elements MUST NOT declare a default value. |
type | Yes | As defined within the section on EBML Element Types, the type MUST be set to one of the following values: 'integer' (signed integer), 'uinteger' (unsigned integer), 'float', 'string', 'date', 'utf-8', 'master', or 'binary'. |
unknownsizeallowed | No | A boolean to express if an EBML Element MAY be used as an Unknown-Sized Element (having all VINT_DATA bits of Element Data Size set to 1). The unknownsizeallowed attribute only applies to Master-elements. If the unknownsizeallowed attribute is not used it is assumed that the element is not allowed to use an unknown Element Data Size. |
recursive | No | A boolean to express if an EBML Element MAY be stored recursively. In this case the Element MAY be stored at levels greater that defined in the level attribute if the Element is a Child Element of a Parent Element with the same Element ID. The recursive attribute only applies to Master-elements. If the recursive attribute is not used it is assumed that the element is not allowed to be used recursively. |
minver | No | The minver (minimum version) attribute stores a non-negative integer that represents the first version of the docType to support the element. If the minver attribute is not used it is assumed that the element has a minimum version of "1". |
maxver | No | The maxver (maximum version) attribute stores a non-negative integer that represents the last or most recent version of the docType to support the element. If the maxver attribute is not used it is assumed that the element has a maximum version equal to the value stored in the version attribute of . |
The <element> nodes shall contain a description of the meaning and use of the EBML Element stored within one or many <documentation> sub-elements. The <documentation> sub-element may use a lang attribute which may be set to the RFC 5646 value of the language of the element's documentation. The <documentation> sub-element may use a type attribute to distinguish the meaning of the documentation. Recommended values for the <documentation> sub-element's type attribute include: definition, rationale, usage notes, and references.
The <element> nodes MUST be arranged hierarchically according to the permitted structure of the EBML Document Type. An <element> node that defines an EBML Element which is a Child Element of another Parent Element MUST be stored as an immediate sub-element of the <element> node that defines the Parent Element. <element> nodes that define Level 0 Elements and Global Elements should be sub-elements of <EBMLSchema>.
In addition to the EBML Schema definition provided by the EBML Specification, Matroska adds the following additional attributes:
attribute name | required | definition |
---|---|---|
webm | No | A boolean to express if the Matroska Element is also supported within version 2 of the webm specification. Please consider the webm specification as the authoritative on webm. |
Here the definition of each Matroska Element is provided.
% concatenate with Matroska EBML Schema converted to markdown %
Element Name | Segment |
---|---|
Element ID | 0x18538067 |
Element Type | master |
Version | 1-4 |
Parent Element | None |
Child Elements | Section 9 Section 13 Section 31 Section 62 Section 172 Section 187 Section 197 Section 225 |
Element Context | None |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The Root Element that contains all other Top-Level Elements (Elements defined only at Level 1). A Matroska file is composed of 1 Segment. |
Element Name | SeekHead |
---|---|
Element ID | 0x114D9B74 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 10 |
Element Context | /Section 8/SeekHead |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains the position of other Top-Level Elements. |
Element Name | Seek |
---|---|
Element ID | 0x4DBB |
Element Type | master |
Version | 1-4 |
Parent Element | Section 9 |
Child Elements | Section 11 Section 12 |
Element Context | /Section 8/Section 9/Seek |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains a single seek entry to an EBML Element. |
Element Name | SeekID |
---|---|
Element ID | 0x53AB |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 10 |
Child Elements | None |
Element Context | /Section 8/Section 9/Section 10/SeekID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The binary ID corresponding to the Element name. |
Element Name | SeekPosition |
---|---|
Element ID | 0x53AC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 10 |
Child Elements | None |
Element Context | /Section 8/Section 9/Section 10/SeekPosition |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The position of the Element in the Segment in octets (0 = first level 1 Element). |
Element Name | Info |
---|---|
Element ID | 0x1549A966 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 14 Section 15 Section 16 Section 17 Section 18 Section 19 Section 20 Section 21 Section 25 Section 26 Section 27 Section 28 Section 29 Section 30 |
Element Context | /Section 8/Info |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains general information about the Segment. |
Element Name | SegmentUID |
---|---|
Element ID | 0x73A4 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/SegmentUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A randomly generated unique ID to identify the Segment amongst many others (128 bits). |
Element Name | SegmentFilename |
---|---|
Element ID | 0x7384 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/SegmentFilename |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A filename corresponding to this Segment. |
Element Name | PrevUID |
---|---|
Element ID | 0x3CB923 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/PrevUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the previous Segment of a Linked Segment (128 bits). |
Element Name | PrevFilename |
---|---|
Element ID | 0x3C83AB |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/PrevFilename |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A filename corresponding to the file of the previous Linked Segment. |
Element Name | NextUID |
---|---|
Element ID | 0x3EB923 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/NextUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the next Segment of a Linked Segment (128 bits). |
Element Name | NextFilename |
---|---|
Element ID | 0x3E83BB |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/NextFilename |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A filename corresponding to the file of the next Linked Segment. |
Element Name | SegmentFamily |
---|---|
Element ID | 0x4444 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/SegmentFamily |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A randomly generated unique ID that all Segments of a Linked Segment MUST share (128 bits). |
Element Name | ChapterTranslate |
---|---|
Element ID | 0x6924 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | Section 22 Section 23 Section 24 |
Element Context | /Section 8/Section 13/ChapterTranslate |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A tuple of corresponding ID used by chapter codecs to represent this Segment. |
Element Name | ChapterTranslateEditionUID |
---|---|
Element ID | 0x69FC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 21 |
Child Elements | None |
Element Context | /Section 8/Section 13/Section 21/ChapterTranslateEditionUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the Segment. |
Element Name | ChapterTranslateCodec |
---|---|
Element ID | 0x69BF |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 21 |
Child Elements | None |
Element Context | /Section 8/Section 13/Section 21/ChapterTranslateCodec |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The chapter codec using this ID (0: Matroska Script, 1: DVD-menu). |
Element Name | ChapterTranslateID |
---|---|
Element ID | 0x69A5 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 21 |
Child Elements | None |
Element Context | /Section 8/Section 13/Section 21/ChapterTranslateID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The binary value used to represent this Segment in the chapter codec data. The format depends on the ChapProcessCodecID used. |
Element Name | TimecodeScale |
---|---|
Element ID | 0x2AD7B1 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/TimecodeScale |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Timestamp scale in nanoseconds (1.000.000 means all timestamps in the Segment are expressed in milliseconds). |
Element Name | Duration |
---|---|
Element ID | 0x4489 |
Element Type | float |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/Duration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Duration of the Segment in nanoseconds based on TimecodeScale. |
Element Name | DateUTC |
---|---|
Element ID | 0x4461 |
Element Type | date |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/DateUTC |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The date and time that the Segment was created by the muxing application or library. |
Element Name | Title |
---|---|
Element ID | 0x7BA9 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/Title |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | General name of the Segment. |
Element Name | MuxingApp |
---|---|
Element ID | 0x4D80 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/MuxingApp |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Muxing application or library (example: "libmatroska-0.4.3"). |
Element Name | WritingApp |
---|---|
Element ID | 0x5741 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 13 |
Child Elements | None |
Element Context | /Section 8/Section 13/WritingApp |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Writing application (example: "mkvmerge-0.3.3"). |
Element Name | Cluster |
---|---|
Element ID | 0x1F43B675 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 32 Section 33 Section 35 Section 36 Section 37 Section 38 Section 61 |
Element Context | /Section 8/Cluster |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The Top-Level Element containing the (monolithic) Block structure. |
Element Name | Timecode |
---|---|
Element ID | 0xE7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | None |
Element Context | /Section 8/Section 31/Timecode |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Absolute timestamp of the cluster (based on TimecodeScale). |
Element Name | SilentTracks |
---|---|
Element ID | 0x5854 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | Section 34 |
Element Context | /Section 8/Section 31/SilentTracks |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking or to decide what track to use. |
Element Name | SilentTrackNumber |
---|---|
Element ID | 0x58D7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 33 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 33/SilentTrackNumber |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster. |
Element Name | Position |
---|---|
Element ID | 0xA7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | None |
Element Context | /Section 8/Section 31/Position |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The Position of the Cluster in the Segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams. |
Element Name | PrevSize |
---|---|
Element ID | 0xAB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | None |
Element Context | /Section 8/Section 31/PrevSize |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Size of the previous Cluster, in octets. Can be useful for backward playing. |
Element Name | SimpleBlock |
---|---|
Element ID | 0xA3 |
Element Type | binary |
Version | 2-4 |
Parent Element | Section 31 |
Child Elements | None |
Element Context | /Section 8/Section 31/SimpleBlock |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed. (see SimpleBlock Structure) |
Element Name | BlockGroup |
---|---|
Element ID | 0xA0 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | Section 39 Section 40 Section 41 Section 45 Section 46 Section 47 Section 48 Section 49 Section 50 Section 51 Section 58 |
Element Context | /Section 8/Section 31/BlockGroup |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock. |
Element Name | Block |
---|---|
Element ID | 0xA1 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Block |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure) |
Element Name | BlockVirtual |
---|---|
Element ID | 0xA2 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/BlockVirtual |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A Block with no data. It MUST be stored in the stream at the place the real Block would be in display order. (see Block Virtual) |
Element Name | BlockAdditions |
---|---|
Element ID | 0x75A1 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | Section 42 |
Element Context | /Section 8/Section 31/Section 38/BlockAdditions |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data. |
Element Name | BlockMore |
---|---|
Element ID | 0xA6 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 41 |
Child Elements | Section 43 Section 44 |
Element Context | /Section 8/Section 31/Section 38/Section 41/BlockMore |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contain the BlockAdditional and some parameters. |
Element Name | BlockAddID |
---|---|
Element ID | 0xEE |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 42 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 41/Section 42/BlockAddID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | An ID to identify the BlockAdditional level. |
Element Name | BlockAdditional |
---|---|
Element ID | 0xA5 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 42 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 41/Section 42/BlockAdditional |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Interpreted by the codec as it wishes (using the BlockAddID). |
Element Name | BlockDuration |
---|---|
Element ID | 0x9B |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/BlockDuration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The duration of the Block (based on TimecodeScale). This Element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This Element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe. |
Element Name | ReferencePriority |
---|---|
Element ID | 0xFA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/ReferencePriority |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced. |
Element Name | ReferenceBlock |
---|---|
Element ID | 0xFB |
Element Type | integer |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/ReferenceBlock |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to. |
Element Name | ReferenceVirtual |
---|---|
Element ID | 0xFD |
Element Type | integer |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/ReferenceVirtual |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Relative position of the data that would otherwise be in position of the virtual block. |
Element Name | CodecState |
---|---|
Element ID | 0xA4 |
Element Type | binary |
Version | 2-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/CodecState |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The new codec state to use. Data interpretation is private to the codec. This information SHOULD always be referenced by a seek entry. |
Element Name | DiscardPadding |
---|---|
Element ID | 0x75A2 |
Element Type | integer |
Version | 4-4 |
Parent Element | Section 38 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/DiscardPadding |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and SHOULD be discarded during playback. |
Element Name | Slices |
---|---|
Element ID | 0x8E |
Element Type | master |
Version | 1-4 |
Parent Element | Section 38 |
Child Elements | Section 52 |
Element Context | /Section 8/Section 31/Section 38/Slices |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains slices description. |
Element Name | TimeSlice |
---|---|
Element ID | 0xE8 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 51 |
Child Elements | Section 53 Section 54 Section 55 Section 56 Section 57 |
Element Context | /Section 8/Section 31/Section 38/Section 51/TimeSlice |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains extra time information about the data contained in the Block. While there are a few files in the wild with this Element, it is no longer in use and has been deprecated. Being able to interpret this Element is not REQUIRED for playback. |
Element Name | LaceNumber |
---|---|
Element ID | 0xCC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 52 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 51/Section 52/LaceNumber |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this Element, it is no longer in use and has been deprecated. Being able to interpret this Element is not REQUIRED for playback. |
Element Name | FrameNumber |
---|---|
Element ID | 0xCD |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 52 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 51/Section 52/FrameNumber |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame). |
Element Name | BlockAdditionID |
---|---|
Element ID | 0xCB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 52 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 51/Section 52/BlockAdditionID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The ID of the BlockAdditional Element (0 is the main Block). |
Element Name | Delay |
---|---|
Element ID | 0xCE |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 52 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 51/Section 52/Delay |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The (scaled) delay to apply to the Element. |
Element Name | SliceDuration |
---|---|
Element ID | 0xCF |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 52 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 51/Section 52/SliceDuration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The (scaled) duration to apply to the Element. |
Element Name | ReferenceFrame |
---|---|
Element ID | 0xC8 |
Element Type | master |
Version | 0-4 |
Parent Element | Section 38 |
Child Elements | Section 59 Section 60 |
Element Context | /Section 8/Section 31/Section 38/ReferenceFrame |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | ReferenceOffset |
---|---|
Element ID | 0xC9 |
Element Type | uinteger |
Version | 0-4 |
Parent Element | Section 58 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 58/ReferenceOffset |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | ReferenceTimeCode |
---|---|
Element ID | 0xCA |
Element Type | uinteger |
Version | 0-4 |
Parent Element | Section 58 |
Child Elements | None |
Element Context | /Section 8/Section 31/Section 38/Section 58/ReferenceTimeCode |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | EncryptedBlock |
---|---|
Element ID | 0xAF |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 31 |
Child Elements | None |
Element Context | /Section 8/Section 31/EncryptedBlock |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed). (see EncryptedBlock Structure) |
Element Name | Tracks |
---|---|
Element ID | 0x1654AE6B |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 63 |
Element Context | /Section 8/Tracks |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A Top-Level Element of information with many tracks described. |
Element Name | TrackEntry |
---|---|
Element ID | 0xAE |
Element Type | master |
Version | 1-4 |
Parent Element | Section 62 |
Child Elements | Section 64 Section 65 Section 66 Section 67 Section 68 Section 69 Section 70 Section 71 Section 72 Section 73 Section 74 Section 75 Section 76 Section 77 Section 78 Section 79 Section 80 Section 81 Section 82 Section 83 Section 84 Section 85 Section 86 Section 87 Section 88 Section 89 Section 90 Section 91 Section 95 Section 139 Section 145 Section 152 Section 153 Section 154 Section 155 Section 156 Section 157 |
Element Context | /Section 8/Section 62/TrackEntry |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Describes a track with all Elements. |
Element Name | TrackNumber |
---|---|
Element ID | 0xD7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackNumber |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number). |
Element Name | TrackUID |
---|---|
Element ID | 0x73C5 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackUID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the Track. This SHOULD be kept the same when making a direct stream copy of the Track to another file. |
Element Name | TrackType |
---|---|
Element ID | 0x83 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackType |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control). |
Element Name | FlagEnabled |
---|---|
Element ID | 0xB9 |
Element Type | uinteger |
Version | 2-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/FlagEnabled |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Set if the track is usable. (1 bit) |
Element Name | FlagDefault |
---|---|
Element ID | 0x88 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/FlagDefault |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit) |
Element Name | FlagForced |
---|---|
Element ID | 0x55AA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/FlagForced |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player SHOULD select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit) |
Element Name | FlagLacing |
---|---|
Element ID | 0x9C |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/FlagLacing |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Set if the track MAY contain blocks using lacing. (1 bit) |
Element Name | MinCache |
---|---|
Element ID | 0x6DE7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/MinCache |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The minimum number of frames a player SHOULD be able to cache during playback. If set to 0, the reference pseudo-cache system is not used. |
Element Name | MaxCache |
---|---|
Element ID | 0x6DF8 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/MaxCache |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The maximum cache size necessary to store referenced frames in and the current frame. 0 means no cache is needed. |
Element Name | DefaultDuration |
---|---|
Element ID | 0x23E383 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/DefaultDuration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one Element put into a (Simple)Block). |
Element Name | DefaultDecodedFieldDuration |
---|---|
Element ID | 0x234E7A |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/DefaultDecodedFieldDuration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The period in nanoseconds (not scaled by TimcodeScale) |
between two successive fields at the output of the decoding process (see the notes)
Element Name | TrackTimecodeScale |
---|---|
Element ID | 0x23314F |
Element Type | float |
Version | 1-3 DEPRECATED |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackTimecodeScale |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs). |
Element Name | TrackOffset |
---|---|
Element ID | 0x537F |
Element Type | integer |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackOffset |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track. |
Element Name | MaxBlockAdditionID |
---|---|
Element ID | 0x55EE |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/MaxBlockAdditionID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track. |
Element Name | Name |
---|---|
Element ID | 0x536E |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Name |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A human-readable track name. |
Element Name | Language |
---|---|
Element ID | 0x22B59C |
Element Type | string |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Language |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specifies the language of the track in the Matroska languages form. |
Element Name | CodecID |
---|---|
Element ID | 0x86 |
Element Type | string |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | An ID corresponding to the codec, see the codec page for more info. |
Element Name | CodecPrivate |
---|---|
Element ID | 0x63A2 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecPrivate |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Private data only known to the codec. |
Element Name | CodecName |
---|---|
Element ID | 0x258688 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecName |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A human-readable string specifying the codec. |
Element Name | AttachmentLink |
---|---|
Element ID | 0x7446 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/AttachmentLink |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The UID of an attachment that is used by this codec. |
Element Name | CodecSettings |
---|---|
Element ID | 0x3A9697 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecSettings |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A string describing the encoding setting used. |
Element Name | CodecInfoURL |
---|---|
Element ID | 0x3B4040 |
Element Type | string |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecInfoURL |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A URL to find information about the codec used. |
Element Name | CodecDownloadURL |
---|---|
Element ID | 0x26B240 |
Element Type | string |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecDownloadURL |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A URL to download about the codec used. |
Element Name | CodecDecodeAll |
---|---|
Element ID | 0xAA |
Element Type | uinteger |
Version | 2-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecDecodeAll |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The codec can decode potentially damaged data (1 bit). |
Element Name | TrackOverlay |
---|---|
Element ID | 0x6FAB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrackOverlay |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track SHOULD be used instead. The order of multiple TrackOverlay matters, the first one is the one that SHOULD be used. If not found it SHOULD be the second, etc. |
Element Name | CodecDelay |
---|---|
Element ID | 0x56AA |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/CodecDelay |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | CodecDelay is The codec-built-in delay in nanoseconds. This value MUST be subtracted from each block timestamp in order to get the actual timestamp. The value SHOULD be small so the muxing of tracks with the same actual timestamp are in the same Cluster. |
Element Name | SeekPreRoll |
---|---|
Element ID | 0x56BB |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/SeekPreRoll |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder MUST decode before the decoded data is valid. |
Element Name | TrackTranslate |
---|---|
Element ID | 0x6624 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | Section 92 Section 93 Section 94 |
Element Context | /Section 8/Section 62/Section 63/TrackTranslate |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The track identification for the given Chapter Codec. |
Element Name | TrackTranslateEditionUID |
---|---|
Element ID | 0x66FC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 91 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 91/TrackTranslateEditionUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the Segment. |
Element Name | TrackTranslateCodec |
---|---|
Element ID | 0x66BF |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 91 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 91/TrackTranslateCodec |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The chapter codec using this ID (0: Matroska Script, 1: DVD-menu). |
Element Name | TrackTranslateTrackID |
---|---|
Element ID | 0x66A5 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 91 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 91/TrackTranslateTrackID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used. |
Element Name | Video |
---|---|
Element ID | 0xE0 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | Section 96 Section 97 Section 98 Section 99 Section 100 Section 101 Section 102 Section 103 Section 104 Section 105 Section 106 Section 107 Section 108 Section 109 Section 110 Section 111 Section 112 Section 113 Section 114 |
Element Context | /Section 8/Section 62/Section 63/Video |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Video settings. |
Element Name | FlagInterlaced |
---|---|
Element ID | 0x9A |
Element Type | uinteger |
Version | 2-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/FlagInterlaced |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A flag to declare is the video is known to be progressive or interlaced and if applicable to declare details about the interlacement. (0: undetermined, 1: interlaced, 2: progressive) |
Element Name | FieldOrder |
---|---|
Element ID | 0x9D |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/FieldOrder |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Declare the field ordering of the video. If FlagInterlaced is not set to 1, this Element MUST be ignored. (0: Progressive, 1: Interlaced with top field display first and top field stored first, 2: Undetermined field order, 6: Interlaced with bottom field displayed first and bottom field stored first, 9: Interlaced with bottom field displayed first and top field stored first, 14: Interlaced with top field displayed first and bottom field stored first) |
Element Name | StereoMode |
---|---|
Element ID | 0x53B8 |
Element Type | uinteger |
Version | 3-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/StereoMode |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes. |
Element Name | AlphaMode |
---|---|
Element ID | 0x53C0 |
Element Type | uinteger |
Version | 3-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/AlphaMode |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain Alpha data. |
Element Name | OldStereoMode |
---|---|
Element ID | 0x53B9 |
Element Type | uinteger |
Version | 1-0 DEPRECATED |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/OldStereoMode |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes). |
Element Name | PixelWidth |
---|---|
Element ID | 0xB0 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelWidth |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Width of the encoded video frames in pixels. |
Element Name | PixelHeight |
---|---|
Element ID | 0xBA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelHeight |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Height of the encoded video frames in pixels. |
Element Name | PixelCropBottom |
---|---|
Element ID | 0x54AA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelCropBottom |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The number of video pixels to remove at the bottom of the image (for HDTV content). |
Element Name | PixelCropTop |
---|---|
Element ID | 0x54BB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelCropTop |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The number of video pixels to remove at the top of the image. |
Element Name | PixelCropLeft |
---|---|
Element ID | 0x54CC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelCropLeft |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The number of video pixels to remove on the left of the image. |
Element Name | PixelCropRight |
---|---|
Element ID | 0x54DD |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/PixelCropRight |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The number of video pixels to remove on the right of the image. |
Element Name | DisplayWidth |
---|---|
Element ID | 0x54B0 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/DisplayWidth |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Width of the video frames to display. Applies to the video frame after cropping (PixelCrop* Elements). The default value is only valid when DisplayUnit is 0. |
Element Name | DisplayHeight |
---|---|
Element ID | 0x54BA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/DisplayHeight |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Height of the video frames to display. Applies to the video frame after cropping (PixelCrop* Elements). The default value is only valid when DisplayUnit is 0. |
Element Name | DisplayUnit |
---|---|
Element ID | 0x54B2 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/DisplayUnit |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | How DisplayWidth & DisplayHeight are interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio). |
Element Name | AspectRatioType |
---|---|
Element ID | 0x54B3 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/AspectRatioType |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed). |
Element Name | ColourSpace |
---|---|
Element ID | 0x2EB524 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/ColourSpace |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Same value as in AVI (32 bits). |
Element Name | GammaValue |
---|---|
Element ID | 0x2FB523 |
Element Type | float |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/GammaValue |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Gamma Value. |
Element Name | FrameRate |
---|---|
Element ID | 0x2383E3 |
Element Type | float |
Version | 1-4 |
Parent Element | Section 95 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/FrameRate |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Number of frames per second. Informational only. |
Element Name | Colour |
---|---|
Element ID | 0x55B0 |
Element Type | master |
Version | 4-4 |
Parent Element | Section 95 |
Child Elements | Section 115 Section 116 Section 117 Section 118 Section 119 Section 120 Section 121 Section 122 Section 123 Section 124 Section 125 Section 126 Section 127 Section 128 |
Element Context | /Section 8/Section 62/Section 63/Section 95/Colour |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Settings describing the colour format. |
Element Name | MatrixCoefficients |
---|---|
Element ID | 0x55B1 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/MatrixCoefficients |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The Matrix Coefficients of the video used to derive luma and chroma values from reg, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2013/DCOR1. (0:GBR, 1: BT709, 2: Unspecified, 3: Reserved, 4: FCC, 5: BT470BG, 6: SMPTE 170M, 7: SMPTE 240M, 8: YCOCG, 9: BT2020 Non-constant Luminance, 10: BT2020 Constant Luminance) |
Element Name | BitsPerChannel |
---|---|
Element ID | 0x55B2 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/BitsPerChannel |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified. |
Element Name | ChromaSubsamplingHorz |
---|---|
Element ID | 0x55B3 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/ChromaSubsamplingHorz |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The amount of pixels to remove in the Cr and Cb channels for every pixel not removed horizontally. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set to 1. |
Element Name | ChromaSubsamplingVert |
---|---|
Element ID | 0x55B4 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/ChromaSubsamplingVert |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The amount of pixels to remove in the Cr and Cb channels for every pixel not removed vertically. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be set to 1. |
Element Name | CbSubsamplingHorz |
---|---|
Element ID | 0x55B5 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/CbSubsamplingHorz |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The amount of pixels to remove in the Cb channel for every pixel not removed horizontally. This is additive with ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and CbSubsamplingHorz SHOULD be set to 1. |
Element Name | CbSubsamplingVert |
---|---|
Element ID | 0x55B6 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/CbSubsamplingVert |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The amount of pixels to remove in the Cb channel for every pixel not removed vertically. This is additive with ChromaSubsamplingVert. |
Element Name | ChromaSitingHorz |
---|---|
Element ID | 0x55B7 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/ChromaSitingHorz |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | How chroma is subsampled horizontally. (0: Unspecified, 1: Left Collocated, 2: Half) |
Element Name | ChromaSitingVert |
---|---|
Element ID | 0x55B8 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/ChromaSitingVert |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | How chroma is subsampled vertically. (0: Unspecified, 1: Top Collocated, 2: Half) |
Element Name | Range |
---|---|
Element ID | 0x55B9 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Range |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Clipping of the color ranges. (0: Unspecified, 1: Broadcast Range, 2: Full range (no clipping), 3: Defined by MatrixCoefficients/TransferCharacteristics) |
Element Name | TransferCharacteristics |
---|---|
Element ID | 0x55BA |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/TransferCharacteristics |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The transfer characteristics of the video. For clarity, the value and meanings for TransferCharacteristics 1-15 are adopted from Table 3 of ISO/IEC 23001-8:2013/DCOR1. TransferCharacteristics 16-18 are proposed values. (0: Reserved, 1: ITU-R BT.709, 2: Unspecified, 3: Reserved, 4: Gamma 2.2 curve, 5: Gamma 2.8 curve, 6: SMPTE 170M, 7: SMPTE 240M, 8: Linear, 9: Log, 10: Log Sqrt, 11: IEC 61966-2-4, 12: ITU-R BT.1361 Extended Colour Gamut, 13: IEC 61966-2-1, 14: ITU-R BT.2020 10 bit, 15: ITU-R BT.2020 12 bit, 16: SMPTE ST 2084, 17: SMPTE ST 428-1 18: ARIB STD-B67 (HLG)) |
Element Name | Primaries |
---|---|
Element ID | 0x55BB |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Primaries |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23001-8:2013/DCOR1. (0: Reserved, 1: ITU-R BT.709, 2: Unspecified, 3: Reserved, 4: ITU-R BT.470M, 5: ITU-R BT.470BG, 6: SMPTE 170M, 7: SMPTE 240M, 8: FILM, 9: ITU-R BT.2020, 10: SMPTE ST 428-1, 22: JEDEC P22 phosphors) |
Element Name | MaxCLL |
---|---|
Element ID | 0x55BC |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/MaxCLL |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Maximum brightness of a single pixel (Maximum Content Light Level) in candelas per square meter (cd/m²). |
Element Name | MaxFALL |
---|---|
Element ID | 0x55BD |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/MaxFALL |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Maximum brightness of a single full frame (Maximum Frame-Average Light Level) in candelas per square meter (cd/m²). |
Element Name | MasteringMetadata |
---|---|
Element ID | 0x55D0 |
Element Type | master |
Version | 4-4 |
Parent Element | Section 114 |
Child Elements | Section 129 Section 130 Section 131 Section 132 Section 133 Section 134 Section 135 Section 136 Section 137 Section 138 |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/MasteringMetadata |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | SMPTE 2086 mastering data. |
Element Name | PrimaryRChromaticityX |
---|---|
Element ID | 0x55D1 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryRChromaticityX |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Red X chromaticity coordinate as defined by CIE 1931. |
Element Name | PrimaryRChromaticityY |
---|---|
Element ID | 0x55D2 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryRChromaticityY |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Red Y chromaticity coordinate as defined by CIE 1931. |
Element Name | PrimaryGChromaticityX |
---|---|
Element ID | 0x55D3 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryGChromaticityX |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Green X chromaticity coordinate as defined by CIE 1931. |
Element Name | PrimaryGChromaticityY |
---|---|
Element ID | 0x55D4 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryGChromaticityY |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Green Y chromaticity coordinate as defined by CIE 1931. |
Element Name | PrimaryBChromaticityX |
---|---|
Element ID | 0x55D5 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryBChromaticityX |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Blue X chromaticity coordinate as defined by CIE 1931. |
Element Name | PrimaryBChromaticityY |
---|---|
Element ID | 0x55D6 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/PrimaryBChromaticityY |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Blue Y chromaticity coordinate as defined by CIE 1931. |
Element Name | WhitePointChromaticityX |
---|---|
Element ID | 0x55D7 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/WhitePointChromaticityX |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | White X chromaticity coordinate as defined by CIE 1931. |
Element Name | WhitePointChromaticityY |
---|---|
Element ID | 0x55D8 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/WhitePointChromaticityY |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | White Y chromaticity coordinate as defined by CIE 1931. |
Element Name | LuminanceMax |
---|---|
Element ID | 0x55D9 |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/LuminanceMax |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Maximum luminance. Represented in candelas per square meter (cd/m²). |
Element Name | LuminanceMin |
---|---|
Element ID | 0x55DA |
Element Type | float |
Version | 4-4 |
Parent Element | Section 128 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 95/Section 114/Section 128/LuminanceMin |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Mininum luminance. Represented in candelas per square meter (cd/m²). |
Element Name | Audio |
---|---|
Element ID | 0xE1 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | Section 140 Section 141 Section 142 Section 143 Section 144 |
Element Context | /Section 8/Section 62/Section 63/Audio |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Audio settings. |
Element Name | SamplingFrequency |
---|---|
Element ID | 0xB5 |
Element Type | float |
Version | 1-4 |
Parent Element | Section 139 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 139/SamplingFrequency |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Sampling frequency in Hz. |
Element Name | OutputSamplingFrequency |
---|---|
Element ID | 0x78B5 |
Element Type | float |
Version | 1-4 |
Parent Element | Section 139 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 139/OutputSamplingFrequency |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Real output sampling frequency in Hz (used for SBR techniques). |
Element Name | Channels |
---|---|
Element ID | 0x9F |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 139 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 139/Channels |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Numbers of channels in the track. |
Element Name | ChannelPositions |
---|---|
Element ID | 0x7D7B |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 139 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 139/ChannelPositions |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Table of horizontal angles for each successive channel, see appendix. |
Element Name | BitDepth |
---|---|
Element ID | 0x6264 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 139 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 139/BitDepth |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Bits per sample, mostly used for PCM. |
Element Name | TrackOperation |
---|---|
Element ID | 0xE2 |
Element Type | master |
Version | 3-4 |
Parent Element | Section 63 |
Child Elements | Section 146 Section 150 |
Element Context | /Section 8/Section 62/Section 63/TrackOperation |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject. |
Element Name | TrackCombinePlanes |
---|---|
Element ID | 0xE3 |
Element Type | master |
Version | 3-4 |
Parent Element | Section 145 |
Child Elements | Section 147 |
Element Context | /Section 8/Section 62/Section 63/Section 145/TrackCombinePlanes |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains the list of all video plane tracks that need to be combined to create this 3D track |
Element Name | TrackPlane |
---|---|
Element ID | 0xE4 |
Element Type | master |
Version | 3-4 |
Parent Element | Section 146 |
Child Elements | Section 148 Section 149 |
Element Context | /Section 8/Section 62/Section 63/Section 145/Section 146/TrackPlane |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains a video plane track that need to be combined to create this 3D track |
Element Name | TrackPlaneUID |
---|---|
Element ID | 0xE5 |
Element Type | uinteger |
Version | 3-4 |
Parent Element | Section 147 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 145/Section 146/Section 147/TrackPlaneUID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The trackUID number of the track representing the plane. |
Element Name | TrackPlaneType |
---|---|
Element ID | 0xE6 |
Element Type | uinteger |
Version | 3-4 |
Parent Element | Section 147 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 145/Section 146/Section 147/TrackPlaneType |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background). |
Element Name | TrackJoinBlocks |
---|---|
Element ID | 0xE9 |
Element Type | master |
Version | 3-4 |
Parent Element | Section 145 |
Child Elements | Section 151 |
Element Context | /Section 8/Section 62/Section 63/Section 145/TrackJoinBlocks |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains the list of all tracks whose Blocks need to be combined to create this virtual track |
Element Name | TrackJoinUID |
---|---|
Element ID | 0xED |
Element Type | uinteger |
Version | 3-4 |
Parent Element | Section 150 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 145/Section 150/TrackJoinUID |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The trackUID number of a track whose blocks are used to create this virtual track. |
Element Name | TrickTrackUID |
---|---|
Element ID | 0xC0 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrickTrackUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | TrickTrackSegmentUID |
---|---|
Element ID | 0xC1 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrickTrackSegmentUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | TrickTrackFlag |
---|---|
Element ID | 0xC6 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrickTrackFlag |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | TrickMasterTrackUID |
---|---|
Element ID | 0xC7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrickMasterTrackUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | TrickMasterTrackSegmentUID |
---|---|
Element ID | 0xC4 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/TrickMasterTrackSegmentUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX trick track extenstions |
Element Name | ContentEncodings |
---|---|
Element ID | 0x6D80 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 63 |
Child Elements | Section 158 |
Element Context | /Section 8/Section 62/Section 63/ContentEncodings |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Settings for several content encoding mechanisms like compression or encryption. |
Element Name | ContentEncoding |
---|---|
Element ID | 0x6240 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 157 |
Child Elements | Section 159 Section 160 Section 161 Section 162 Section 165 |
Element Context | /Section 8/Section 62/Section 63/Section 157/ContentEncoding |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Settings for one content encoding like compression or encryption. |
Element Name | ContentEncodingOrder |
---|---|
Element ID | 0x5031 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 158 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/ContentEncodingOrder |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder Elements in the Segment. |
Element Name | ContentEncodingScope |
---|---|
Element ID | 0x5032 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 158 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/ContentEncodingScope |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A bit field that describes which Elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption) |
Element Name | ContentEncodingType |
---|---|
Element ID | 0x5033 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 158 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/ContentEncodingType |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption |
Element Name | ContentCompression |
---|---|
Element ID | 0x5034 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 158 |
Child Elements | Section 163 Section 164 |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/ContentCompression |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Settings describing the compression used. This Element MUST be present if the value of ContentEncodingType is 0 and absent otherwise. Each block MUST be decompressable even if no previous block is available in order not to prevent seeking. |
Element Name | ContentCompAlgo |
---|---|
Element ID | 0x4254 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 162 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 162/ContentCompAlgo |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header Stripping |
Element Name | ContentCompSettings |
---|---|
Element ID | 0x4255 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 162 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 162/ContentCompSettings |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track. |
Element Name | ContentEncryption |
---|---|
Element ID | 0x5035 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 158 |
Child Elements | Section 166 Section 167 Section 168 Section 169 Section 170 Section 171 |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/ContentEncryption |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Settings describing the encryption used. This Element MUST be present if the value of ContentEncodingType is 1 and absent otherwise. |
Element Name | ContentEncAlgo |
---|---|
Element ID | 0x47E1 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentEncAlgo |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES |
Element Name | ContentEncKeyID |
---|---|
Element ID | 0x47E2 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentEncKeyID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | For public key algorithms this is the ID of the public key the the data was encrypted with. |
Element Name | ContentSignature |
---|---|
Element ID | 0x47E3 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentSignature |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A cryptographic signature of the contents. |
Element Name | ContentSigKeyID |
---|---|
Element ID | 0x47E4 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentSigKeyID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | This is the ID of the private key the data was signed with. |
Element Name | ContentSigAlgo |
---|---|
Element ID | 0x47E5 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentSigAlgo |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA |
Element Name | ContentSigHashAlgo |
---|---|
Element ID | 0x47E6 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 165 |
Child Elements | None |
Element Context | /Section 8/Section 62/Section 63/Section 157/Section 158/Section 165/ContentSigHashAlgo |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5 |
Element Name | Cues |
---|---|
Element ID | 0x1C53BB6B |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 173 |
Element Context | /Section 8/Cues |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A Top-Level Element to speed seeking access. All entries are local to the Segment. This Element SHOULD be mandatory for non "live" streams. |
Element Name | CuePoint |
---|---|
Element ID | 0xBB |
Element Type | master |
Version | 1-4 |
Parent Element | Section 172 |
Child Elements | Section 174 Section 175 |
Element Context | /Section 8/Section 172/CuePoint |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains all information relative to a seek point in the Segment. |
Element Name | CueTime |
---|---|
Element ID | 0xB3 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 173 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/CueTime |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Absolute timestamp according to the Segment time base. |
Element Name | CueTrackPositions |
---|---|
Element ID | 0xB7 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 173 |
Child Elements | Section 176 Section 177 Section 178 Section 179 Section 180 Section 181 Section 182 |
Element Context | /Section 8/Section 172/Section 173/CueTrackPositions |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contain positions for different tracks corresponding to the timestamp. |
Element Name | CueTrack |
---|---|
Element ID | 0xF7 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueTrack |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The track for which a position is given. |
Element Name | CueClusterPosition |
---|---|
Element ID | 0xF1 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueClusterPosition |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The position of the Cluster containing the associated Block. |
Element Name | CueRelativePosition |
---|---|
Element ID | 0xF0 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueRelativePosition |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The relative position of the referenced block inside the cluster with 0 being the first possible position for an Element inside that cluster. |
Element Name | CueDuration |
---|---|
Element ID | 0xB2 |
Element Type | uinteger |
Version | 4-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueDuration |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The duration of the block according to the Segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues. |
Element Name | CueBlockNumber |
---|---|
Element ID | 0x5378 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueBlockNumber |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Number of the Block in the specified Cluster. |
Element Name | CueCodecState |
---|---|
Element ID | 0xEA |
Element Type | uinteger |
Version | 2-4 |
Parent Element | Section 175 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueCodecState |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The position of the Codec State corresponding to this Cue Element. 0 means that the data is taken from the initial Track Entry. |
Element Name | CueReference |
---|---|
Element ID | 0xDB |
Element Type | master |
Version | 2-4 |
Parent Element | Section 175 |
Child Elements | Section 183 Section 184 Section 185 Section 186 |
Element Context | /Section 8/Section 172/Section 173/Section 175/CueReference |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The Clusters containing the referenced Blocks. |
Element Name | CueRefTime |
---|---|
Element ID | 0x96 |
Element Type | uinteger |
Version | 2-4 |
Parent Element | Section 182 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/Section 182/CueRefTime |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Timestamp of the referenced Block. |
Element Name | CueRefCluster |
---|---|
Element ID | 0x97 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 182 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/Section 182/CueRefCluster |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The Position of the Cluster containing the referenced Block. |
Element Name | CueRefNumber |
---|---|
Element ID | 0x535F |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 182 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/Section 182/CueRefNumber |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Number of the referenced Block of Track X in the specified Cluster. |
Element Name | CueRefCodecState |
---|---|
Element ID | 0xEB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 182 |
Child Elements | None |
Element Context | /Section 8/Section 172/Section 173/Section 175/Section 182/CueRefCodecState |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The position of the Codec State corresponding to this referenced Element. 0 means that the data is taken from the initial Track Entry. |
Element Name | Attachments |
---|---|
Element ID | 0x1941A469 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 188 |
Element Context | /Section 8/Attachments |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contain attached files. |
Element Name | AttachedFile |
---|---|
Element ID | 0x61A7 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 187 |
Child Elements | Section 189 Section 190 Section 191 Section 192 Section 193 Section 194 Section 195 Section 196 |
Element Context | /Section 8/Section 187/AttachedFile |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | An attached file. |
Element Name | FileDescription |
---|---|
Element ID | 0x467E |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileDescription |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A human-friendly name for the attached file. |
Element Name | FileName |
---|---|
Element ID | 0x466E |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileName |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Filename of the attached file. |
Element Name | FileMimeType |
---|---|
Element ID | 0x4660 |
Element Type | string |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileMimeType |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | MIME type of the file. |
Element Name | FileData |
---|---|
Element ID | 0x465C |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileData |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The data of the file. |
Element Name | FileUID |
---|---|
Element ID | 0x46AE |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileUID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Unique ID representing the file, as random as possible. |
Element Name | FileReferral |
---|---|
Element ID | 0x4675 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileReferral |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A binary value that a track/codec can refer to when the attachment is needed. |
Element Name | FileUsedStartTime |
---|---|
Element ID | 0x4661 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileUsedStartTime |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX font extension |
Element Name | FileUsedEndTime |
---|---|
Element ID | 0x4662 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 188 |
Child Elements | None |
Element Context | /Section 8/Section 187/Section 188/FileUsedEndTime |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | DivX font extension |
Element Name | Chapters |
---|---|
Element ID | 0x1043A770 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 198 |
Element Context | /Section 8/Chapters |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation. |
Element Name | EditionEntry |
---|---|
Element ID | 0x45B9 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 197 |
Child Elements | Section 199 Section 200 Section 201 Section 202 Section 203 |
Element Context | /Section 8/Section 197/EditionEntry |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains all information about a Segment edition. |
Element Name | EditionUID |
---|---|
Element ID | 0x45BC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 198 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/EditionUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the edition. It's useful for tagging an edition. |
Element Name | EditionFlagHidden |
---|---|
Element ID | 0x45BD |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 198 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/EditionFlagHidden |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | If an edition is hidden (1), it SHOULD NOT be available to the user interface (but still to Control Tracks; see flag notes). (1 bit) |
Element Name | EditionFlagDefault |
---|---|
Element ID | 0x45DB |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 198 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/EditionFlagDefault |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | If a flag is set (1) the edition SHOULD be used as the default one. (1 bit) |
Element Name | EditionFlagOrdered |
---|---|
Element ID | 0x45DD |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 198 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/EditionFlagOrdered |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit) |
Element Name | ChapterAtom |
---|---|
Element ID | 0xB6 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 198 |
Child Elements | Section 204 Section 205 Section 206 Section 207 Section 208 Section 209 Section 210 Section 211 Section 212 Section 213 Section 215 Section 219 |
Element Context | /Section 8/Section 197/Section 198/ChapterAtom |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Recursive |
Documentation | Contains the atom information to use as the chapter atom (apply to all tracks). |
Element Name | ChapterUID |
---|---|
Element ID | 0x73C4 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterUID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the Chapter. |
Element Name | ChapterStringUID |
---|---|
Element ID | 0x5654 |
Element Type | utf-8 |
Version | 3-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterStringUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage. |
Element Name | ChapterTimeStart |
---|---|
Element ID | 0x91 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterTimeStart |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Timestamp of the start of Chapter (not scaled). |
Element Name | ChapterTimeEnd |
---|---|
Element ID | 0x92 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterTimeEnd |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Timestamp of the end of Chapter (timestamp excluded, not scaled). |
Element Name | ChapterFlagHidden |
---|---|
Element ID | 0x98 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterFlagHidden |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | If a chapter is hidden (1), it SHOULD NOT be available to the user interface (but still to Control Tracks; see flag notes). (1 bit) |
Element Name | ChapterFlagEnabled |
---|---|
Element ID | 0x4598 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterFlagEnabled |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie SHOULD skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit) |
Element Name | ChapterSegmentUID |
---|---|
Element ID | 0x6E67 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterSegmentUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The SegmentUID of another Segment to play during this chapter. |
Element Name | ChapterSegmentEditionUID |
---|---|
Element ID | 0x6EBC |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterSegmentEditionUID |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The EditionUID to play from the Segment linked in ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no Edition of the linked Segment is used. |
Element Name | ChapterPhysicalEquiv |
---|---|
Element ID | 0x63C3 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterPhysicalEquiv |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values. |
Element Name | ChapterTrack |
---|---|
Element ID | 0x8F |
Element Type | master |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | Section 214 |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterTrack |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | List of tracks on which the chapter applies. If this Element is not present, all tracks apply |
Element Name | ChapterTrackNumber |
---|---|
Element ID | 0x89 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 213 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 213/ChapterTrackNumber |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this Element indicates that the Chapter SHOULD be applied to any currently used Tracks. |
Element Name | ChapterDisplay |
---|---|
Element ID | 0x80 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | Section 216 Section 217 Section 218 |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapterDisplay |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains all possible strings to use for the chapter display. |
Element Name | ChapString |
---|---|
Element ID | 0x85 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 215 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 215/ChapString |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains the string to use as the chapter atom. |
Element Name | ChapLanguage |
---|---|
Element ID | 0x437C |
Element Type | string |
Version | 1-4 |
Parent Element | Section 215 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 215/ChapLanguage |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The languages corresponding to the string, in the bibliographic ISO-639-2 form. |
Element Name | ChapCountry |
---|---|
Element ID | 0x437E |
Element Type | string |
Version | 1-4 |
Parent Element | Section 215 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 215/ChapCountry |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | The countries corresponding to the string, same 2 octets as in Internet domains. |
Element Name | ChapProcess |
---|---|
Element ID | 0x6944 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 203 |
Child Elements | Section 220 Section 221 Section 222 |
Element Context | /Section 8/Section 197/Section 198/Section 203/ChapProcess |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains all the commands associated to the Atom. |
Element Name | ChapProcessCodecID |
---|---|
Element ID | 0x6955 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 219 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 219/ChapProcessCodecID |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later. |
Element Name | ChapProcessPrivate |
---|---|
Element ID | 0x450D |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 219 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 219/ChapProcessPrivate |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent. |
Element Name | ChapProcessCommand |
---|---|
Element ID | 0x6911 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 219 |
Child Elements | Section 223 Section 224 |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 219/ChapProcessCommand |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Contains all the commands associated to the Atom. |
Element Name | ChapProcessTime |
---|---|
Element ID | 0x6922 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 222 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 219/Section 222/ChapProcessTime |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Defines when the process command SHOULD be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter). |
Element Name | ChapProcessData |
---|---|
Element ID | 0x6933 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 222 |
Child Elements | None |
Element Context | /Section 8/Section 197/Section 198/Section 203/Section 219/Section 222/ChapProcessData |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contains the command information. The data SHOULD be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands. |
Element Name | Tags |
---|---|
Element ID | 0x1254C367 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 8 |
Child Elements | Section 226 |
Element Context | /Section 8/Tags |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Element containing Elements specific to Tracks/Chapters. A list of valid tags can be found here. |
Element Name | Tag |
---|---|
Element ID | 0x7373 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 225 |
Child Elements | Section 227 Section 234 |
Element Context | /Section 8/Section 225/Tag |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | Element containing Elements specific to Tracks/Chapters. |
Element Name | Targets |
---|---|
Element ID | 0x63C0 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 226 |
Child Elements | Section 228 Section 229 Section 230 Section 231 Section 232 Section 233 |
Element Context | /Section 8/Section 225/Section 226/Targets |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Contain all UIDs where the specified meta data apply. It is empty to describe everything in the Segment. |
Element Name | TargetTypeValue |
---|---|
Element ID | 0x68CA |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TargetTypeValue |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | A number to indicate the logical level of the target (see TargetType). |
Element Name | TargetType |
---|---|
Element ID | 0x63CA |
Element Type | string |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TargetType |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | An informational string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType). |
Element Name | TagTrackUID |
---|---|
Element ID | 0x63C5 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TagTrackUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment. |
Element Name | TagEditionUID |
---|---|
Element ID | 0x63C9 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TagEditionUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment. |
Element Name | TagChapterUID |
---|---|
Element ID | 0x63C4 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TagChapterUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment. |
Element Name | TagAttachmentUID |
---|---|
Element ID | 0x63C6 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 227 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 227/TagAttachmentUID |
Mandatory | Not Mandatory |
Repeatability | Repeatable |
Recursive | Not Recursive |
Documentation | A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment. |
Element Name | SimpleTag |
---|---|
Element ID | 0x67C8 |
Element Type | master |
Version | 1-4 |
Parent Element | Section 226 |
Child Elements | Section 235 Section 236 Section 237 Section 238 Section 239 |
Element Context | /Section 8/Section 225/Section 226/SimpleTag |
Mandatory | Mandatory |
Repeatability | Repeatable |
Recursive | Recursive |
Documentation | Contains general information about the target. |
Element Name | TagName |
---|---|
Element ID | 0x45A3 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 234 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 234/TagName |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The name of the Tag that is going to be stored. |
Element Name | TagLanguage |
---|---|
Element ID | 0x447A |
Element Type | string |
Version | 1-4 |
Parent Element | Section 234 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 234/TagLanguage |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Specifies the language of the tag specified, in the Matroska languages form. |
Element Name | TagDefault |
---|---|
Element ID | 0x4484 |
Element Type | uinteger |
Version | 1-4 |
Parent Element | Section 234 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 234/TagDefault |
Mandatory | Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | Indication to know if this is the default/original language to use for the given tag. (1 bit) |
Element Name | TagString |
---|---|
Element ID | 0x4487 |
Element Type | utf-8 |
Version | 1-4 |
Parent Element | Section 234 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 234/TagString |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The value of the Tag. |
Element Name | TagBinary |
---|---|
Element ID | 0x4485 |
Element Type | binary |
Version | 1-4 |
Parent Element | Section 234 |
Child Elements | None |
Element Context | /Section 8/Section 225/Section 226/Section 234/TagBinary |
Mandatory | Not Mandatory |
Repeatability | Not Repeatable |
Recursive | Not Recursive |
Documentation | The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString. |
If you intend to implement a Matroska player, make sure you can handle all the files in our test suite, or at least the features presented there, not necessarily the same codecs.
An EBML file always starts with 0x1A. The 0x1A makes the DOS command "type" ends display. That way you can include ASCII text before the EBML data and it can be displayed. The EBML parser is safe from false-alarm with these ASCII only codes.
Next the EBML header is stored. This allows the the parser to know what type of EBML file it is parsing.
The Block's timecode is signed interger that represents the Raw Timecode relative to the Cluster's Timecode, multiplied by the TimecodeScale (see the TimecodeScale notes).
The Block's timecode is represented by a 16bit signed interger (sint16). This means that the Block's timecode has a range of -32768 to +32767 units. When using the default value of TimecodeScale, each integer represents 1ms. So, the maximum time span of Blocks in a Cluster using the default TimecodeScale of 1ms is 65536ms.
If a Cluster's Timecode is set to zero, it is possible to have Blocks with a negative Raw Timecode. Blocks with a negative Raw Timecode are not valid.
The DefaultDecodedFieldDuration Element can signal to the displaying application how often fields of a video sequence will be available for displaying. It can be used for both interlaced and progressive content.
If the video sequence is signaled as interlaced, then the period between two successive fields at the output of the decoding process equals DefaultDecodedFieldDuration.
For video sequences signaled as progressive it is twice the value of DefaultDecodedFieldDuration.
These values are valid at the end of the decoding process before post-processing like deinterlacing or inverse telecine is applied.
Examples:
The default value of an Element is assumed when not present in the data stream. It is assumed only in the scope of its Parent Element (for example Language in the scope of the Track element). If the Parent Element is not present or assumed, then the Element cannot be assumed.
Digital Rights Management. See Encryption.
A larger EBML Class typically means the Element has a lower probability/importance. A larger Class-ID can be used as a synch word in case the file is damaged. Elements that are used frequently, but do not need to act as a synch word, SHOULD have a small Class-ID. For example, the Cluster has a 4 octet ID and can be used as a synch word if the file is damaged. However, the every common Element in the BlockGroup has a single octet ID to conserve space because of how frequently it is used.
Encryption in Matroska is designed in a very generic style that allows people to implement whatever form of encryption is best for them. It is easily possible to use the encryption framework in Matroska as a type of DRM.
Because the encryption occurs within the Block, it is possible to manipulate encrypted streams without decrypting them. The streams could potentially be copied, deleted, cut, appended, or any number of other possible editing techniques without ever decrypting them. This means that the data is more useful, without having to expose it, or go through the intensive process of decrypting.
Encryption can also be layered within Matroska. This means that two completely different types of encryption can be used, requiring two seperate keys to be able to decrypt a stream.
Encryption information is stored in the ContentEncodings Master-element under the ContentEncryption Element.
Thanks to the PixelCropXXX elements, it's possible to crop the image before being resized. That means the image size follows this path:
PixelXXX (size of the coded image) -> PixelCropXXX (size of the image to keep) -> DisplayXXX (resized cropped image)
The EBML Header each Matroska file starts with contains two version number fields that inform a reading application about what to expect. These are DocTypeVersion and DocTypeReadVersion.
DocTypeVersion MUST contain the highest Matroska version number of any Element present in the Matroska file. For example, a file using the SimpleBlock Element MUST have a DocTypeVersion of at least 2 while a file containing CueRelativePosition Elements MUST have a DocTypeVersion of at least 4.
The DocTypeReadVersion MUST contain the minimum version number a reading application MUST at least suppost properly in order to play the file back (optionally with a reduced feature set). For example, if a file contains only Elements of version 2 or lower except for CueRelativePosition (which is a version 4 Matroska Element) then DocTypeReadVersion SHOULD still be set to 2 and not 4 because evaluating CueRelativePosition is not REQUIRED for standard playback -- it only makes seeking more precise if used.
DocTypeVersion MUST always be equal to or greater than DocTypeReadVersion.
A reading application supporting Matroska version V MUST NOT refuse to read an application with DocReadTypeVersion equal to or lower than V even if DocTypeVersion is greater than V. See also the note about Unknown Elements.
There is no IETF endorsed MIME type for Matroska files. But you can use the ones we have defined on our web server:
An Octet refers to a byte made of 8 bits.
Overlay tracks SHOULD be rendered in the same 'channel' as the track it's linked to. When content is found in such a track it is played on the rendering channel instead of the original track.
The position in some Elements refers to the position, in octets, from the beginning of an Element. The reference is the beginning of the first Segment (= its position + the size of its ID and size fields). 0 = first possible position of a level 1 Element in the Segment. When data is spanned over mutiple Segments within a Section 254 (in the same file or in different files), the position represents the accumulated offset of each Segment. For example to reference a position in the third Segment, the position will be: the first segment total size + second segment total size + offset of the Element in the third segment.
The exact time of an object represented in nanoseconds. To find out a Block's Raw Timecode, you need the Block's timecode, the Cluster's Timecode, and the TimecodeScale. For calculation, please see the see the TimecodeScale notes.
Matroska provides several methods to link two or many Segments together to create a Linked Segment. A Linked Segment is a set of multiple Segments related together into a single presentation by using Hard Linking, Soft Linking, or Medium Linking. All Segments within a Linked Segment MUST utilize the same track numbers and timescale. All Segments within a Linked Segment MUST be stored within the same directory. All Segments within a Linked Segment MUST store a SegmentUID.
Hard Linking (also called splitting) is the process of creating a Linked Segment by relating multiple Segments using the PrevUID and NextUID Elements. Within a Linked Segment the timestamps of each Segment MUST follow consecutively in linking order. With Hard Linking, the chapters of any Segment within the Linked Segment MUST only reference the current Segment. With Hard Linking, the NextUID and PrevUID MUST reference the respective SegmentUID values of the next and previous Segments. The first Segment of a Linked Segment MUST have a NextUID Element and MUST NOT have a PrevUID Element. The last Segment of a Linked Segment MUST have a PrevUID Element and MUST NOT have a NextUID Element. The middle Segments of a Linked Segment MUST have both a NextUID Element and a PrevUID Element.
As an example four Segments MAY be Hard Linked as a Linked Segment through cross-referencing each other with SegmentUID, PrevUID, and NextUID as in this table.
file name | SegmentUID | PrevUID | NextUID |
---|---|---|---|
start.mkv | 71000c23cd31099853fbc94dd984a5dd | n/a | a77b3598941cb803eac0fcdafe44fac9 |
middle.mkv | a77b3598941cb803eac0fcdafe44fac9 | 71000c23cd31099853fbc94dd984a5dd | 6c92285fa6d3e827b198d120ea3ac674 |
end.mkv | 6c92285fa6d3e827b198d120ea3ac674 | a77b3598941cb803eac0fcdafe44fac9 | n/a |
Soft Linking is used by codec chapters. They can reference another Segment and jump to that Segment. The way the Segments are described are internal to the chapter codec and unknown to the Matroska level. But there are Elements within the Info Element (such as ChapterTranslate) that can translate a value representing a Segment in the chapter codec and to the current SegmentUID. All Segments that could be used in a Linked Segment in this way SHOULD be marked as members of the same family via the SegmentFamily Element, so that the player can quickly switch from one to the other.
WMedium Linking creates relationships between Segments using Ordered Chapters and the ChapterSegmentUID Element. A Segment Edition with Ordered Chapters MAY contain Chapters that reference timestamp ranges from other Segments. The Segment referenced by the Ordered Chapter via the ChapterSegmentUID Element SHOULD be played as part of a Linked Segment. The timestamps of Segment content referenced by Ordered Chapters MUST be adjusted according to the cumulative duration of the the previous Ordered Chapters.
As an example a file named intro.mkv could have a SegmentUID of 0xb16a58609fc7e60653a60c984fc11ead. Another file called program.mkv could use a Chapter Edition that contains two Ordered Chapters. The first chapter references the Segment of intro.mkv with the use of a ChapterSegmentUID, ChapterSegmentEditionUID, ChapterTimeStart and optionally a ChapterTimeEnd element. The second chapter references content within the Segment of program.mkv. A player SHOULD recognize the Linked Segment created by the use of ChapterSegmentUID in an enabled Edition and present the reference content of the two Segments together.
The TimecodeScale is used to calculate the Raw Timecode of a Block. The timecode is obtained by adding the Block's timecode to the Cluster's Timecode, and then multiplying that result by the TimecodeScale. The result will be the Block's Raw Timecode in nanoseconds. The formula for this would look like:
(a + b) * c a = [Block's Timecode]({{site.baseurl}}/index.html#block-header) b = [Cluster's](#cluster) [Timecode](#timecode) c = [TimeCodeScale]({{site.baseurl}}/index.html#TimeCodeScale)
An example of this is, assume a Cluster's Timecode has a value of 564264, the Block has a Timecode of 1233, and the timecodescale is the default of 1000000.
(1233 + 564264) * 1000000 = 565497000000
So, the Block in this example has a specific time of 565497000000 in nanoseconds. In milliseconds this would be 565497ms.
Because the default value of TimecodeScale is 1000000, which makes each integer in the Cluster and Block timecodes equal 1ms, this is the most commonly used. When dealing with audio, this causes innaccuracy with where you are seeking to. When the audio is combined with video, this is not an issue. For most cases the the synch of audio to video does not need to be more than 1ms accurate. This becomes obvious when one considers that sound will take 2-3ms to travel a single meter, so distance from your speakers will have a greater effect on audio/visual synch than this.
However, when dealing with audio only files, seeking accuracy can become critical. For instance, when storing a whole CD in a single track, you want to be able to seek to the exact sample that a song begins at. If you seek a few sample ahead or behind then a 'crack' or 'pop' may result as a few odd samples are rendered. Also, when performing precise editing, it may be very useful to have the audio accuracy down to a single sample.
It is usually true that when storing timecodes for an audio stream, the TimecodeScale MUST have an accuracy of at least that of the audio samplerate, otherwise there are rounding errors that prevent you from knowing the precise location of a sample. Here's how a program has to round each timecode in order to be able to recreate the sample number accurately.
Let's assume that the application has an audio track with a sample rate of 44100. As written above the TimecodeScale MUST have at least the accuracy of the sample rate itself: 1000000000 / 44100 = 22675.7369614512. This value MUST always be truncated. Otherwise the accuracy will not suffice. So in this example the application wil use 22675 for the TimecodeScale. The application could even use some lower value like 22674 which would allow it to be a little bit imprecise about the original timecodes. But more about that in a minute.
Next the application wants to write sample number 52340 and calculates the timecode. This is easy. In order to calculate the Raw Timecode in ns all it has to do is calculate RawTimecode = round(1000000000 * sample_number / sample_rate). Rounding at this stage is very important! The application might skip it if it choses a slightly smaller value for the TimecodeScale factor instead of the truncated one like shown above. Otherwise it has to round or the results won't be reversible. For our example we get RawTimecode = round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 1186848073.
The next step is to calculate the Absolute Timecode - that is the timecode that will be stored in the Matroska file. Here the application has to divide the Raw Timecode from the previous paragraph by the TimecodeScale factor and round the result: AbsoluteTimecode = round(RawTimecode / TimecodeScale_facotr) which will result in the following for our example: AbsoluteTimecode = round(1186848073 / 22675) = round(52341.7011245866) = 52342. This number is the one the application has to write to the file.
Now our file is complete, and we want to play it back with another application. Its task is to find out which sample the first application wrote into the file. So it starts reading the Matroska file and finds the TimecodeScale factor 22675 and the audio sample rate 44100. Later it finds a data block with the Absolute Timecode of 52342. But how does it get the sample number from these numbers?
First it has to calculate the Raw Timecode of the block it has just read. Here's no rounding involved, just an integer multiplication: RawTimecode = AbsoluteTimecode * TimecodeScale_factor. In our example: RawTimecode = 52342 * 22675 = 1186854850.
The conversion from the RawTimecode to the sample number again requires rounding: sample_number = round(RawTimecode * sample_rate / 1000000000). In our example: sample_number = round(1186854850 * 44100 / 1000000000) = round(52340.298885) = 52340. This is exactly the sample number that the previous program started with.
Some general notes for a program:
If you want some sample code for all these calculations you can have a look at this small C program. For a given sample rate it will iterate over each sample, calculate the AbsoluteTimestamp and then re-calculate the sample number.
The "default track" flag is a hint for the playback application and SHOULD always be changeable by the user. If the user wants to see or hear a track of a certain kind (audio, video, subtitles) and she hasn't chosen a specific track then the player SHOULD use the first track of that kind whose "default track" flag is set to "1". If no such track is found then the first track of this kind SHOULD be chosen.
Only one track of a kind MAY have its "default track" flag set in a segment. If a track entry does not contain the "default track" flag element then its default value "1" is to be used.
The "forced" flag tells the playback application that it MUST display/play this track or another track of the same kind that also has its "forced" flag set. When there are multiple "forced" tracks, the player SHOULD determined based upon the language of the forced flag or use the default flag if no track matches the use languages. Another track of the same kind without the "forced" flag may be use simultaneously with the "forced" track (like DVD subtitles for example).
The TrackTimecodeScale is used align tracks that would otherwise be played at different speeds. An example of this would be if you have a film that was originally recorded at 24fps video. When playing this back through a PAL broadcasting system, it is standard to speed up the film to 25fps to match the 25fps display speed of the PAL broadcasting standard. However, when broadcasting the video through NTSC, it is typical to leave the film at its original speed. If you wanted to make a single file where there was one video stream, and an audio stream used from the PAL broadcast, as well as an audio stream used from the NTSC broadcast, you would have the problem that the PAL audio stream would be 1/24th faster than the NTSC audio stream, quickly leading to problems. It is possible to stretch out the PAL audio track and reencode it at a slower speed, however when dealing with lossy audio codecs, this often results in a loss of audio quality and/or larger file sizes.
This is the type of problem that TrackTimecodeScale was designed to fix. Using it, the video can be played back at a speed that will synch with either the NTSC or the PAL audio stream, depending on which is being used for playback. To continue the above example:
Track 1: Video Track 2: NTSC Audio Track 3: PAL Audio
Because the NTSC track is at the original speed, it will used as the default value of 1.0 for its TrackTimecodeScale. The video will also be aligned to the NTSC track with the default value of 1.0.
The TrackTimecodeScale value to use for the PAL track would be calculated by determining how much faster the PAL track is than the NTSC track. In this case, because we know the video for the NTSC audio is being played back at 24fps and the video for the PAL audio is being played back at 25fps, the calculation would be:
(25 / 24) = ~ 1.04166666666666666667
When writing a file that uses a non-default TrackTimecodeScale, the values of the Block's timecode are whatever they would be when normally storing the track with a default value for the TrackTimecodeScale. However, the data is interleaved a little differently. Data SHOULD be interleaved by its Raw Timecode in the order handed back from the encoder. The Raw Timecode of a Block from a track using TrackTimecodeScale is calculated using:
(Block's Timecode + Cluster's Timecode) * TimecodeScale * TrackTimecodeScale
So, a Block from the PAL track above that had a Scaled Timecode of 100 seconds would have a Raw Timecode of 104.66666667 seconds, and so would be stored in that part of the file.
When playing back a track using the TrackTimecodeScale, if the track is being played by itself, there is no need to scale it. From the above example, when playing the Video with the NTSC Audio, neither are scaled. However, when playing back the Video with the PAL Audio, the timecodes from the PAL Audio track are scaled using the TrackTimecodeScale, resulting in the video playing back in synch with the audio.
It would be possible for a player to also adjust the audio's samplerate at the same time as adjusting the timecodes if you wanted to play the two audio streams synchronously. It would also be possible to adjust the video to match the audio's speed. However, for playback, the selected track(s) timecodes SHOULD be adjusted if they need to be scaled.
While the above example deals specifically with audio tracks, this element can be used to align video, audio, subtitles, or any other type of track contained in a Matroska file.
Matroska is based upon the principal that a reading application does not have to support 100% of the specifications in order to be able to play the file. A Matroska file therefore contains version indicators that tell a reading application what to expect.
It is possible and valid to have the version fields indicate that the file contains Matroska Elements from a higher specification version number while signalling that a reading application MUST only support a lower version number properly in order to play it back (possibly with a reduced feature set). This implies that a reading application supporting at least Matroska version V reading a file whose DocTypeReadVersion field is equal to or lower than V MUST skip Matroska/EBML Elements it encounters but which it does not know about if that unknown element fits into the size constraints set by the current parent element.
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). Matroska supports both ways.
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) is the raw amount of pixels (for example 3840x1080 for full HD side by side) and the DisplayWidth/Height in pixels is 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. For more details look at how TrackOperation works.
The 3D support is still in infancy and may evolve to support more features.
TrackOperation allows combining multiple tracks to make a virtual one. It uses 2 separate system to combine tracks. One to create a 3D "composition" (left/right/background planes) and one to simplify join 2 tracks together to make a single track.
A track created with TrackOperation is a proper track with a UID and all its flags. However the codec ID is meaningless because each "sub" track needs to be decoded by its own decoder before the "operation" is applied. The Cues corresponding to such a virtual track SHOULD be the sum of the Cues elements for each of the tracks it's composed of (when the Cues are defined per track).
In the case of TrackJoinBlocks, the Blocks (from BlockGroup and SimpleBlock) of all the tracks SHOULD be used as if they were defined for this new virtual Track. When 2 Blocks have overlapping start or end timecodes, it's up to the underlying system to either drop some of these frames or render them the way they overlap. In the end this situation SHOULD be avoided when creating such tracks as you can never be sure of the end result on different platforms.
Except for the EBML Header and the CRC-32 Element, the EBML specification does not require any particular storage order for Elements. The Matroska specification however defines mandates and recommendations for the ordering certain Elements in order facilitate better playback, seeking, and editing efficiency. This section describes and offers rationale for ordering requirements and recommendations for Matroska.
A valid Matroska file requires only one Top-Level Element, the Info Element; however, to be playable Matroska MUST also contain at least one Tracks and Cluster Element. The first Info Element and the first Tracks Element MUST either be stored before the first Cluster Element or both be referenced by a SeekHead Element which occurs before the first Cluster Element.
After a Matroska file has been created it could still be edited. For example chapters, tags or attachments can be added. When new Top-Level Elements are added to a Matroska file the SeekHead Element(s) MUST be updated so that the SeekHead Element(s) itemize the identify and position of all Top-Level Elements. Editing, removing, or adding Elements to a Matroska file often requires that some existing Elements be voided or extended; therefore, it is RECOMMENDED to use Void Elements as padding in between Top-Level Elements.
As noted by the EBML specification, if a CRC-32 Element is used then the CRC-32 Element MUST be the first ordered Element within its Parent Element. The Matroska specification recommends that CRC-32 Elements SHOULD NOT be used as an immediate Child Element of the Segment Element; however all Top-Level Elements of an EBML Document SHOULD include a CRC-32 Element as a Child Element.
If used, the first SeekHead Element SHOULD be the first non-CRC-32 Child Element of the Segment Element. If a second SeekHead Element is used then the first SeekHead MUST reference the identity and position of the second SeekHead, the second SeekHead MUST only reference Cluster Elements and not any other Top-Level Element, and the second SeekHead MAY be stored in any order relative to the other Top-Level Elements. Whether one or two SeekHead Elements is used, the SeekHead Element(s) MUST reference the identify and position of all Top-Level Elements except for the first SeekHead.
It is RECOMMENDED that the first SeekHead Element be followed by some padding (a Void Element) to allow for the SeekHead Element to be expanded to cover new Top-Level Elements that could be added to the Matroska file, such as Tags, Chapters and Attachments Elements.
The Cues Element is RECOMMENDED to optimize seeking access in Matroska. It is programmatically simpler to add the Cues Element after all of the Cluster Elements are written because this does not require a prediction of how much space to reserve before writing the Cluster Elements. On the other hand, storing the Cues Element before the Clusters can provide some seeking advantages.
The first Info Element SHOULD occur before the first Tracks and first Cluster Element.
The Chapters Element SHOULD be placed before the Cluster Element(s). The Chapters Element can be used during playback even if the user doesn't need to seek. It immediately gives the user information of what section is being read and what other sections are available. In the case of Ordered Chapters it RECOMMENDED to evaluate the logical linking even before starting playing anything. The Chapters Element SHOULD be placed before the first Tracks Element and after the first Info Element.
The Attachments Element is not meant to use by default when playing the file, but could contain the cover art and/or fonts. Cover art is useful even before the file is played and fonts could be needed before playback starts for initialization of subtitles that could use them. The Attachments Element MAY be placed before the first Cluster Element; however if the Attachments Element is likely to be edited, then it SHOULD be placed after the last Cluster Element.
The Tags Element is the one that is most subject to changes after the file was originally created. So for easier editing the Tags Element SHOULD be placed at the end of the Segment Element, even after the Attachments Element. On the other hand, it is inconvenient to have to seek in the Segment for tags especially for network streams. So it's better if the Tags Element(s) are found early in the stream. When editing the Tags Element(s), the original Tags Element at the beginning can be voided and a new one written right at the end of the Segment Element. The file size will only marginally change.
As each BlockGroup and SimpleBlock of a Cluster Element needs the Cluster Timecode, the Timecode Element MUST occur as the first Child Element within the Cluster Element.
As an additional resource to this page Haali has created a list of codec IDs in a PDF.
For each TrackEntry inside matroska, there has to be a CodecID defined. This ID is represent the codec used to encode data in the Track. The codec works with the coded data in the stream, but also with some codec initialisation. There are 2 different kind of codec "initialisation" :
Each of these elements contain the same kind of data. And these data depend on the codec used.
Important Note:
Please, when reading through this list, always keep in mind that the intention behind it is NOT to list all existing audio and video codecs, but more to list those codecs that are currently supported in matroska (or will be supported soon), and therfore need a well defined codec ID so that all developers supporting matroska will use the same ID. A list of all the codecs we plan to support in the future can be found on the CoreCodec forum (subject to be changed constantly). If you feel we missed support for a very important codec, please tell us on our development mailing list (matroska-devel at freelists.org).
See
| Codec ID | Name | Description | | Video | | V_MS/VFW/FOURCC | Microsoft (TM) Video Codec Manager (VCM) | V_MS/VFW/FOURCC - Microsoft (TM) Video Codec Manager (VCM) The private data contains the VCM structure BITMAPINFOHEADER including the extra private bytes, as defined by Microsoft. The data are stored in little endian format (like on IA32 machines). Where is the Huffman table stored in HuffYUV, not AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ??? | | V_UNCOMPRESSED | Video, raw uncompressed video frames | The private data is void, all details about the used colour specs and bit depth are to be put/read from the KaxCodecColourSpace elements. | | V_MPEG4/ISO/??? | MPEG4 ISO Profile Video | The stream complies with, and uses the CodecID for, one of the MPEG-4 profiles listed below. |
| V_MPEG4/ISO/SP | MPEG4 ISO simple profile (DivX4) | stream was created via improved codec API (UCI) or even transmuxed from AVI (no b-frames in Simple Profile), frame order is coding order | | V_MPEG4/ISO/ASP | MPEG4 ISO advanced simple profile (DivX5, XviD, FFMPEG) | stream was created via improved codec API (UCI) or transmuxed from MP4, not simply transmuxed from AVI! Note there are differences how b-frames are handled in these native streams, when being compared to a VfW created stream, as here there are no dummy frames inserted, the frame order is exactly the same as the coding order, same as in MP4 streams! | | V_MPEG4/ISO/AP | MPEG4 ISO advanced profile | stream was created ... (see above) |
| | V_MPEG4/MS/V3 | Microsoft (TM) MPEG4 V3 | and derivates, means DivX3, Angelpotion, SMR, etc.; stream was created using VfW codec or transmuxed from AVI; note that V1/V2 are covered in VfW compatibility mode | | V_MPEG1 | MPEG 1 | The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations | | V_MPEG2 | MPEG 2 | The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations | | V_REAL/???? | Real Video(TM) | The stream is one of the Real Video(TM) video streams listed below. Source for the codec names are from Karl Lillevold on Doom9. The CodecPrivate element contains a "real_video_props_t" structure in Big Endian byte order as found in librmff. |
| V_REAL/RV10 | RealVideo 1.0 aka RealVideo 5 | Individual slices from the Real container are combined into a single frame. | | V_REAL/RV20 | RealVideo G2 and RealVideo G2+SVT | Individual slices from the Real container are combined into a single frame. | | V_REAL/RV30 | RealVideo 8 | Individual slices from the Real container are combined into a single frame. | | V_REAL/RV40 | rv40 : RealVideo 9 | Individual slices from the Real container are combined into a single frame. |
| | V_QUICKTIME | Video taken from QuickTime(TM) files | Several codecs as stored in QuickTime, e.g. Sorenson or Cinepak. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file after the mandatory video descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read Apple's PDF on QuickTime. |
| V_THEORA | Theora | The private data contains the first three Theora packets in order. The lengths of the packets precedes them. The actual layout is:
| | V_PRORES | Apple ProRes | The private data contains the fourcc as found in MP4 movies:
this page for more technical details on ProRes
| | Audio | | A_MPEG/L3 | MPEG Audio 1, 2, 2.5 Layer III |
The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
Corresponding ACM wFormatTag : 0x0055
| | A_MPEG/L2 | MPEG Audio 1, 2 Layer II |
The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
Corresponding ACM wFormatTag : 0x0050
| | A_MPEG/L1 | MPEG Audio 1, 2 Layer I |
The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
Corresponding ACM wFormatTag : 0x0050
| | A_PCM/INT/BIG | PCM Integer Big Endian |
The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element
Corresponding ACM wFormatTag : ???
| | A_PCM/INT/LIT | PCM Integer Little Endian |
The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element
Corresponding ACM wFormatTag : 0x0001
| | A_PCM/FLOAT/IEEE | Floating Point, IEEE compatible |
The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element (32 bit in most cases). The float are stored in little endian order (most common float format).
Corresponding ACM wFormatTag : 0x0003
| | A_MPC | MPC (musepack) SV8 | The main developer for musepack has requested that we wait until the SV8 framing has been fully defined for musepack before defining how to store it in Matroska. | |
A_AC3
A_AC3/BSID9
A_AC3/BSID10
| (Dolby™) AC3 |
BSID <= 8 !! The private data is void ??? Corresponding ACM wFormatTag : 0x2000 ; channel number have to be read from the corresponding audio element
AC3/BSID9 and AC3/BSID10 (DolbyNet) : The ac3 frame header has, similar to the mpeg-audio header a version field. Normal ac3 is defiened as bitstream id 8 (5 Bits, numbers are 0-15). Everything below 8 is still compatible with all decoders that handle 8 correctly. Everything higher are additions that break decoder compatibility. For the samplerates 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10
| | A_ALAC | ALAC (Apple Lossless Audio Codec) | The private data contains ALAC's magic cookie (both the codec specific configuration as well as the optional channel layout information). Its format is described in ALAC's official source code. |
| A_DTS | Digital Theatre System | Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution Audio and DTS-HD Master Audio. The private data is void. Corresponding ACM wFormatTag : 0x2001 |
| A_DTS/EXPRESS | Digital Theatre System Express | DTS Express (a.k.a. LBR) audio streams. The private data is void. Corresponding ACM wFormatTag : 0x2001 |
| A_DTS/LOSSLESS | Digital Theatre System Lossless | DTS Lossless audio that does not have a core substream. The private data is void. Corresponding ACM wFormatTag : 0x2001 |
| A_VORBIS | Vorbis | The private data contains the first three Vorbis packet in order. The lengths of the packets precedes them. The actual layout is: Byte 1: number of distinct packets '#p' minus one inside the CodecPrivate block. This MUST be '2' for current (as of 2016-07-08) Vorbis headers. Bytes 2..n: lengths of the first '#p' packets, coded in Xiph-style lacing. The length of the last packet is the length of the CodecPrivate block minus the lengths coded in these bytes minus one. Bytes n+1..: The Vorbis identification header, followed by the Vorbis comment header followed by the codec setup header. |
| A_FLAC | FLAC (Free Lossless Audio Codec) | The private data contains all the header/metadata packets before the first data packet. These include the first header packet containing only the word fLaC as well as all metadata packets. | | A_REAL/???? | Realmedia Audio codecs | The stream contains one of the following audio codecs. In each case the CodecPrivate element contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure (differentiated by their "version" field; Big Endian byte order) as found in librmff. |
| A_REAL/14_4 | Real Audio 1 | | A_REAL/28_8 | Real Audio 2 | | A_REAL/COOK | Real Audio Cook Codec (codename: Gecko) | | A_REAL/SIPR | Sipro Voice Codec | | A_REAL/RALF | Real Audio Lossless Format | | A_REAL/ATRC | Sony Atrac3 Codec |
| | A_MS/ACM | Microsoft(TM) Audio Codec Manager (ACM) | The private data contains the ACM structure WAVEFORMATEX including the extra private bytes, as defined by Microsoft. The data are stored in little endian format (like on IA32 machines). | | A_AAC/?????/??? | AAC Profile Audio | The stream complies with, and uses the CodecID for, one of the AAC profiles listed below. AAC audio always uses wFormatTag 0xFF |
| A_AAC/MPEG2/MAIN | MPEG2 Main Profile | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG2/LC | Low Complexity | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG2/LC/SBR | Low Complexity with Spectral Band Replication | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG2/SSR | Scalable Sampling Rate | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG4/MAIN | MPEG4 Main Profile | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG4/LC | Low Complexity | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG4/LC/SBR | Low Complexity with Spectral Band Replication | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG4/SSR | Scalable Sampling Rate | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. | | A_AAC/MPEG4/LTP | Long Term Prediction | The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. |
| | A_QUICKTIME | Audio taken from QuickTime(TM) files | Several codecs as stored in QuickTime, e.g. QDesign Music v1 or v2. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file after the mandatory sound descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read Apple's PDF on QuickTime. |
| A_QUICKTIME/???? | QuickTime audio codecs | This CodecID is deprecated in favor of A_QUICKTIME (without a trailing codec name). Otherwise the storage is identical; see A_QUICKTIME for details. |
A_QUICKTIME/QDMC | QDesign Music |
| A_QUICKTIME/QDM2 | QDesign Music v2 |
| A_TTA1 | The True Audio lossles audio compressor | TTA format description Each frame is kept intact, including the CRC32. The header and seektable are dropped. The private data is void. SamplingFrequency, Channels and BitDepth are used in the TrackEntry. wFormatTag = 0x77A1 |
| A_WAVPACK4 | WavPack lossles audio compressor | The Wavpack packets consist of a stripped header followed by the frame data. For multi-track (> 2 tracks) a frame consists of many packets. For hybrid files (lossy part + correction part), the correction part is stored in an additional block (level 1). For more details, check the WavPack muxing description. | | Subtitle | | S_TEXT/UTF8 | UTF-8 Plain Text | Basic text subtitles. For more information, please look at the Subtitle specifications. | | S_TEXT/SSA | Subtitles Format | The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS. | | S_TEXT/ASS | Advanced Subtitles Format | The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS. | | S_TEXT/USF | Universal Subtitle Format | This is mostly defined, but not typed out yet. It will first be available on the USF specs page. | | S_TEXT/WEBVTT | Web Video Text Tracks Format (WebVTT) | Advanced text subtitles. For more information about the storage please look at the WebVTT in Matroska specifications. | | S_IMAGE/BMP | Bitmap | Basic image based subtitle format; The subtitles are stored as images, like in the DVD. The timestamp in the block header of matroska indicates the start display time, the duration is set with the Duration element. The full data for the subtitle bitmap is stored in the Block's data section. | | S_VOBSUB | VobSub subtitles | The same subtitle format used on DVDs. Supoprted is only format version 7 and newer. VobSubs consist of two files, the .idx containing information, and the .sub, containing the actual data. The .idx file is stripped of all empty lines, of all comments and of lines beginning with alt: or langidx:. The line beginning with id: SHOULD be transformed into the appropriate Matroska track language element and is discarded. All remaining lines but the ones containing timestamps and file positions are put into the CodecPrivate element. For each line containing the timestamp and file position data is read from the appropriate position in the .sub file. This data consists of a MPEG program stream which in turn contains SPU packets. The MPEG program stream data is discarded, and each SPU packet is put into one Matroska frame. | | S_KATE | Karaoke And Text Encapsulation | A subtitle format developped for ogg. The mapping for Matroska is described on the Xiph wiki. As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets. | | Buttons | | B_VOBBTN | VobBtn Buttons | Based on MPEG/VOB PCI packets. The file contains a header consisting of the string "butonDVD" followed by the width and height in pixels (16 bits integer each) and 4 reserved bytes. The rest is full PCI packets. |
To be supported later :
'V_MSWMV'; Video, Microsoft Video
'V_INDEO5'; Video, Indeo 5; transmuxed from AVI or created using VfW codec
'V_MJPEG'; Video, MJpeg codec (lossy mode, general)
'V_MJPEG2000'; Video, MJpeg 2000
'V_MJPEG2000LL'; Video, MJpeg Lossless
'V_DV'; Video, DV Video, type 1 (audio and video mixed)
'V_TARKIN'; Video, Ogg Tarkin
'V_ON2VP4'; Video, ON2, VP4
'V_ON2VP5'; Video, ON2, VP5
'V_3IVX'; Video, 3ivX (is D4 decoder downwards compatible?)
'V_HUFFYUV'; Video, HuffYuv, lossless; auch als VfW möglich
'V_COREYUV'; Video, CoreYuv, lossless; auch als VfW möglich
'V_RUDUDU'; Nicola's Rududu Wavelet codec
...... to be continued--- #Chapters
In this example a movie is split in different chapters. It could also just be an audio file (album) on which each track corresponds to a chapter.
This would translate in the following matroska form :
| Chapters | EditionEntry | ChapterAtom | ChapterUID | 0x123456 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 5,000,000 ns | ChapterDisplay | ChapterString | Intro | ChapterLanguage | eng | ChapterAtom | ChapterUID | 0x234567 | ChapterTimeStart | 5,000,000 ns | ChapterTimeEnd | 25,000,000 ns | ChapterDisplay | ChapterString | Before the crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Avant le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x345678 | ChapterTimeStart | 25,000,000 ns | ChapterTimeEnd | 27,500,000 ns | ChapterDisplay | ChapterString | The crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 27,500,000 ns | ChapterTimeEnd | 38,000,000 ns | ChapterDisplay | ChapterString | After the crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Après le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 38,000,000 ns | ChapterTimeEnd | 43,000,000 ns | ChapterDisplay | ChapterString | Credits | ChapterLanguage | eng | ChapterDisplay | ChapterString | Générique | ChapterLanguage | fra |
In this example an (existing) album is split into different chapters, and one of them contain another splitting.
| Chapters | EditionEntry | ChapterAtom | ChapterUID | 0x654321 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 748,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep/rock | ChapterAtom | ChapterUID | 0x123456 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 278,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.1) | ChapterAtom | ChapterUID | 0x234567 | ChapterTimeStart | 278,000,000 ns | ChapterTimeEnd | 432,000,000 ns | ChapterDisplay | ChapterString | Baby wants to rock | ChapterAtom | ChapterUID | 0x345678 | ChapterTimeStart | 432,000,000 ns | ChapterTimeEnd | 633,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.2) | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 633,000,000 ns | ChapterTimeEnd | 748,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.3) | ChapterAtom | ChapterUID | 0x567890 | ChapterTimeStart | 750,000,000 ns | ChapterTimeEnd | 1,178,500,000 ns | ChapterDisplay | ChapterString | Bleeper_O+2 | ChapterAtom | ChapterUID | 0x678901 | ChapterTimeStart | 1,180,500,000 ns | ChapterTimeEnd | 1,340,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.4) | ChapterAtom | ChapterUID | 0x789012 | ChapterTimeStart | 1,342,000,000 ns | ChapterTimeEnd | 1,518,000,000 ns | ChapterDisplay | ChapterString | Bleep to bleep | ChapterAtom | ChapterUID | 0x890123 | ChapterTimeStart | 1,520,000,000 ns | ChapterTimeEnd | 2,015,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (k) | ChapterAtom | ChapterUID | 0x901234 | ChapterTimeStart | 2,017,000,000 ns | ChapterTimeEnd | 2,668,000,000 ns | ChapterDisplay | ChapterString | Bleeper |
There are two important flags that apply to chapter atoms: enabled and hidden. The effect of those flags always applies to child atoms of an atom affected by that flag.
For example: Let's assume a parent atom with flag hidden set to true; that parent contains two child atom, the first with hidden set to true as well and the second child with the flag either set to false or not present at all (in which case the default value applies, and that again is false).
As the parent is hidden all of its children are initially hidden as well. However, when a control track toggles the parent's hidden flag to false then only the the parent and its second child will be visible. The first child's explicitely set flag retains its value until its value is toggled to false by a control track.
Corresponding behavior applies to the enabled flag.
The edition's hidden flag behaves much the same as the chapter's hidden flag: if an edition is hidden then none of its children SHALL be visible, no matter their own hidden flags. If the edition is toggled to being visible then the chapter atom's hidden flags decide whether or not the chapter is visible.
The menu features are handled like a chapter codec. That means each codec has a type, some private data and some data in the chapters.
The type of the menu system is defined by the ChapProcessCodecID parameter. For now only 2 values are supported : 0 matroska script, 1 menu borrowed from the DVD. The private data depend on the type of menu system (stored in ChapProcessPrivate), idem for the data in the chapters (stored in ChapProcessData).
This is the case when ChapProcessCodecID = 0. This is a script language build for Matroska purposes. The inspiration comes from ActionScript, javascript and other similar scripting languages. The commands are stored as text commands, in UTF-8. The syntax is C like, with commands spanned on many lines, each terminating with a ";". You can also include comments at the end of lines with "//" or comment many lines using "/* */". The scripts are stored in ChapProcessData. For the moment ChapProcessPrivate is not used.
The one and only command existing for the moment is GotoAndPlay( ChapterUID );. As the same suggests, it means that when this command is encountered, the playback SHOULD jump to the Chapter specified by the UID and play it.
This is the case when ChapProcessCodecID = 1. Each level of a chapter corresponds to a logical level in the DVD system that is stored in the first octet of the ChapProcessPrivate. This DVD hierarchy is as follows:
| ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible | Comment | | 0x30 | SS | DVD domain | - | First Play, Video Manager, Video Title | | 0x2A | LU | Language Unit | - | Contains only PGCs | | 0x28 | TT | Title | - | Contains only PGCs | | 0x20 | PGC | Program Group Chain (PGC) | * | | 0x18 | PG | Program 1 | Program 2 | Program 3 | - | | 0x10 | PTT | Part Of Title 1 | Part Of Title 2 | - | Equivalent to the chapters on the sleeve. | | 0x08 | CN | Cell 1 | Cell 2 | Cell 3 | Cell 4 | Cell 5 | Cell 6 | - |
You can also recover wether a Segment is a Video Manager (VMG), Video Title Set (VTS) or Video Title Set Menu (VTSM) from the ChapterTranslateID element found in the Segment Info. This field uses 2 octets as follows:
For instance, the menu part from VTS_01_0.VOB would be coded [1,0] and the content part from VTS_02_3.VOB would be [2,1]. The VMG is always [0,0]
The following octets of ChapProcessPrivate are as follows:
| Octet 1 | DVD Name | Following Octets | | 0x30 | SS | Domain name code (1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) number (2) | | 0x2A | LU | Language code (2) + Language extension (1) | | 0x28 | TT | global Title number (2) + corresponding TTN of the VTS (1) | | 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User Operations (4) | | 0x18 | PG | Program number (2) | | 0x10 | PTT | PTT-chapter number (1) | | 0x08 | CN | Cell number [VOB ID(2)][Cell ID(1)][Angle Num(1)] |
If the level specified in ChapProcessPrivate is a PGC (0x20), there is an octet called the Playback Type, specifying the kind of PGC defined:
The next 4 following octets correspond to the User Operation flags in the standard PGC. When a bit is set, the command SHOULD be disabled.
ChapProcessData contains the pre/post/cell commands in binary format as there are stored on a DVD. There is just an octet preceeding these data to specify the number of commands in the element. As follows: [# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)].
More information on the DVD commands and format on DVD-replica, where we got most of the info about it. You can also get information on DVD from the DVDinfo project.---
Because Matroska is a general container format, we try to avoid specifying the formats to store in it. This type of work is really outside of the scope of a container-only format. However, because the use of subtitles in A/V containers has been so limited (with the exception of DVD) we are taking the time to specify how to store some of the more common subtitle formats in Matroska. This is being done to help facilitate their growth. Otherwise, incompatabilities could prevent the standardization and use of subtitle storage.
This page is not meant to be a complete listing of all subtitle formats that will be used in Matroska, it is only meant to be a guide for the more common, current formats. It is possible that we will add future formats to this page as they are created, but it is not likely as any other new subtitle format designer would likely have their own specifications. Any specification listed here SHOULD be strictly adhered to or it SHOULD NOT use the corresponding Codec ID.
Here is a list of pointers for storing subtitles in Matroska:
The first image format that is a goal to import into Matroska is the VobSub subtitle format. This subtitle type is generated by exporting the subtitles from a DVD.
The requirement for muxing VobSub into Matroska is v7 subtitles (see first line of the .IDX file). If the version is smaller, you must remux them using the SubResync utility from VobSub 2.23 (or MPC) into v7 format. Generally any newly created subs will be in v7 format.
The .IFO file will not be used at all.
If there is more than one subtitle stream in the VobSub set, each stream will need to be seperated into seperate tracks for storage in Matroska. E.g. the VobSub file contains streams for both English and German subtitles. Then the resulting Matroska file SHOULD contain two tracks. That way the language information can be 'dropped' and mapped to Matroska's language tags.
The .IDX file is reformatted (see below) and placed in the CodecPrivate.
Each .BMP will be stored in its own Block. The Timestamp with be stored in the Blocks Timecode and the duration will be stored in the Default Duration.
Here is an example .IDX file:
# VobSub index file, v7 (do not modify this line!) # # To repair desyncronization, you can insert gaps this way: # (it usually happens after vob id changes) # # delay: [sign]hh:mm:ss:ms # # Where: # [sign]: +, - (optional) # hh: hours (0 <= hh) # mm/ss: minutes/seconds (0 <= mm/ss <= 59) # ms: milliseconds (0 <= ms <= 999) # # Note: You can't position a sub before the previous with a negative # value. # # You can also modify timestamps or delete a few subs you don't like. # Just make sure they stay in increasing order. # Settings # Original frame size size: 720x480 # Origin, relative to the upper-left corner, can be overloaded by # aligment org: 0, 0 # Image scaling (hor,ver), origin is at the upper-left corner or at # the alignment coord (x, y) scale: 100%, 100% # Alpha blending alpha: 100% # Smoothing for very blocky images (use OLD for no filtering) smooth: OFF # In millisecs fadein/out: 50, 50 # Force subtitle placement relative to (org.x, org.y) align: OFF at LEFT TOP # For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms) # Note: Not effective in DirectVobSub, use "delay: ... " instead. time offset: 0 # ON: displays only forced subtitles, OFF: shows everything forced subs: OFF # The original palette of the DVD palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd # Custom colors (transp idxs and the four colors) custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 000000 # Language index in use langidx: 0 # English id: en, index: 0 # Decomment next line to activate alternative name in DirectVobSub / # Windows Media Player 6.x # alt: English # Vob/Cell ID: 1, 1 (PTS: 0) timestamp: 00:00:01:101, filepos: 000000000 timestamp: 00:00:08:708, filepos: 000001000
First, lines beginning with "#" are removed. These are comments to make text file editing easier, and as this is not a text file, they aren't needed.
Next remove the "langidx" and "id" lines. These are used to differenciate the subtitle streams and define the language. As the streams will be stored seperately anyway, there is no need to differenciate them here. Also, the language setting will be stored in the Matroska tags, so there is no need to store it here.
Finally, the "timestamp" will be used to set the Block's timecode. Once it is set there, there is no need for it to be stored here. Also, as it may interfere if the file is edited, it SHOULD NOT be stored here.
Once all of these items are removed, the data to store in the CodecPrivate SHOULD look like this:
size: 720x480 org: 0, 0 scale: 100%, 100% alpha: 100% smooth: OFF fadein/out: 50, 50 align: OFF at LEFT TOP time offset: 0 forced subs: OFF palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 000000
There SHOULD also be two Blocks containing one image each with the timecodes "00:00:01:101" and "00:00:08:708".
SRT is perhaps the most basic of all subtitle formats.
It consists of four parts, all in text..
1. A number indicating which subtitle it is in the sequence. 2. The time that the subtitle appears on the screen, and then disappears. 3. The subtitle itself. 4. A blank line indicating the start of a new subtitle.
When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/UTF8) and placed in the data portion of the Block. Part 2 is used to set the timecode of the Block, and BlockDuration element. Nothing else is used.
Here is an example SRT file:
|
1 00:02:17,440 --> 00:02:20,375 Senator, we're making our final approach into Coruscant.
2 00:02:20,476 --> 00:02:22,501 Very good, Lieutenant.
|
In this example, the text "Senator, we're making our final approach into Coruscant." would be converted into UTF-8 and placed in the Block. The timecode of the block would be set to "00:02:17,440". And the BlockDuration element would be set to "00:00:02,935".
The same is repeated for the next subtitle.
Because there are no general settings for SRT, the CodecPrivate is left blank.
SSA stands for Sub Station Alpha. It's the file format used by the popular subtitle editor, SubStation Alpha. This format is widely used by fansubbers.
It allows you to do some advanced display features, like positioning, karaoke, style managements...
For detailed information on SSA/ASS, see the SSA specs. It includes an SSA specs description and the avanced features added by ASS format (standing for Advanced SSA). Because SSA and ASS are so similar, they are treated the same here.
Like SRT, this format is text based with a particular syntax.
A file consists of 4 or 5 parts, declared ala INI file (but it's not an INI !)
The first, "[Script Info]" contains some information about the subtitle file, such as it's title, who created it, type of script and a very important one : "PlayResY". Be carefull of this value, everything in your script (font size, positioning) is scaled by it. Sub Station Alpha uses your desktops Y resolution to write this value, so if a friend with a large monitor and a high screen resolution gives you an edited script, you can mess everything up by saving the script in SSA with your low-cost monitor.
The second, "[V4 Styles]", is a list of style definitions. A style describe how will look a text on the screen. It defines font, font size, primary/.../outile colour, position, aligment etc ...
For example this :
|
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0
|
The third, "[Events]", is the list of text you want to display at the right timing. You can specify some attribute here. Like the style to use for this event (MUST be defined in the list), the position of the text (Left, Right, Vertical Margin), an effect. Name is mostly used by translator to know who said this sentence. Timing is in h:mm:ss.cc (centisec).
|
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien.
|
"[Pictures]" or "[Fonts]" part can be found in some SSA file, they contains UUE-encoded pictures/font but those features are only used by Sub Station Alpha, i.e. no filter (Vobsub/Avery Lee Subtiler filter) use them.
Now, how are they stored in Matroska ?
Here is an example of an SSA file.
| [Script Info] ; This is a Sub Station Alpha v4 script. ; For Sub Station Alpha info and downloads, ; go to http://www.eswat.demon.co.uk/ ; or email kotus@eswat.demon.co.uk Title: Wolf's rain 2 Original Script: Anime-spirit Ishin-francais Original Translation: Coolman Original Editing: Spikewolfwood Original Timing: Lordalucard Original Script Checking: Spikewolfwood ScriptType: v4.00 Collisions: Normal PlayResY: 1024 PlayDepth: 0 Wav: 0, 128697,D:\Alex\Anime- Fansub -- TAFF -\Wolf's Rain\WR-_02Wav.wav Wav: 0, 120692,H:\team truc\WR-_02.wav Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav LastWav: 3 Timer: 100,0000
[V4 Styles] Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0
[Events] Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien. |
Here is what would be placed into the CodecPrivate element.
| [Script Info] ; This is a Sub Station Alpha v4 script. ; For Sub Station Alpha info and downloads, ; go to http://www.eswat.demon.co.uk/ ; or email kotus@eswat.demon.co.uk Title: Wolf's rain 2 Original Script: Anime-spirit Ishin-francais Original Translation: Coolman Original Editing: Spikewolfwood Original Timing: Lordalucard Original Script Checking: Spikewolfwood ScriptType: v4.00 Collisions: Normal PlayResY: 1024 PlayDepth: 0 Wav: 0, 128697,D:\Alex\Anime- Fansub -- TAFF -\Wolf's Rain\WR-_02Wav.wav Wav: 0, 120692,H:\team truc\WR-_02.wav Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav LastWav: 3 Timer: 100,0000
[V4 Styles] Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 |
And here are the two blocks that would be generated.
Block's timecode: 00:02:40.650 BlockDuration: 00:00:01.140
| 1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? |
Block's timecode: 00:02:42.420 BlockDuration: 00:00:01.730
| 2,,Wolf main,autre,0000,0000,0000,,Toujours rien. |
Under construction
The "Web Video Text Tracks Format" (short: WebVTT) is developed by the World Wide Web Consortium (W3C). Its specifications are freely available.
The guiding principles for the storage of WebVTT in Matroska are:
The CodecID to use is S_TEXT/WEBVTT.
This element contains all global blocks before the first subtitle entry. This starts at the "WEBVTT" file identification marker but excludes the optional byte order mark.
Non-global WebVTT blocks (e.g. "NOTE") before a WebVTT Cue Text are stored in Matroska's BlockAddition element together with the Matroska Block containing the WebVTT Cue Text these blocks precede (see below for the actual format).
Each WebVTT Cue Text is stored directly in the Matroska Block.
A muxer MUST change all WebVTT Cue Timestamps present within the Cue Text to be relative to the Matroska Block's timestamp.
The Cue's start timestamp is used as the Matroska Block's timestamp.
The difference between the Cue's end timestamp and its start timestamp is used as the Matroska Block's duration.
Each Matroska Block may be accompanied by one BlockAdditions element. Its format is as follows:
If there is no Matroska BlockAddition element stored together with the Matroska Block then all three components (Cue Settings List, Cue Identifier, Cue Comments) MUST be assumed to be absent.
Here's an example how a WebVTT is transformed.
Let's take the following example file:
The resulting CodecPrivate element will look like this:
Example Cue 1: timestamp 00:00:00.000, duration 00:00:10.000, Block's content:
BlockAddition's content starts with one empty line as there's no Cue Settings List:
Example Cue 2: timestamp 00:00:25.000, duration 00:00:10.000, Block's content:
BlockAddition's content starts with two empty lines as there's neither a Cue Settings List nor a Cue Identifier:
Example Cue 3: timestamp 00:01:03.000, duration 00:00:03.500, Block's content:
BlockAddition's content ends with an empty line as there's no Cue Identifier and there were no WebVTT Comment blocks:
Example Cue 4: timestamp 00:03:10.000, duration 00:00:10.000, Block's content:
Example entry 4: Entries can even include timestamps. For example:<00:00:05.000>This becomes visible five seconds after the first part.
This Block does not need a BlockAddition as the Cue did not contain an Identifier, nor a Settings List, and it wasn't preceded by Comment blocks.
Note: the storage of WebVTT in Matroska is not the same as the design document for storage of WebVTT in WebM. There are several reasons for this including but not limited to: the WebM document is old (from February 2012) and was based on an earlier draft of WebVTT and ignores several parts that were added to WebVTT later; WebM does still not support subtitles at all; the proposal suggests splitting the information across multiple tracks making demuxer's and remuxer's life very difficult.---
When a Tag is nested within another Tag, the nested Tag becomes an attribute of the base tag. For instance, if you wanted to store the dates that a singer used certain addresses for, that singer being the lead singer for a track that included multiple bands simultaneously, then your tag tree would look something like this: Targets - TrackUID BAND - LEADPERFORMER -- ADDRESS --- DATE --- DATEEND -- ADDRESS --- DATE In this way, it becomes possible to store any Tag as attributes of another tag. Multiple items SHOULD never be stored as a list in a single TagString. If there is more than one tag of a certain type to be stored, then more than one SimpleTag SHOULD be used. For authoring Tags outside of EBML, the following XML syntax is proposed used in mkvmerge. Binary data SHOULD be stored using BASE64 encoding if it is being stored at authoring time.
There is a debate between people who think all tags SHOULD be free and those who think all tags SHOULD be strict. If you look at this page you will realise we are in between.
Advanced-users application might let you put any tag in your file. But for the rest of the applications, they usually give you a basic list of tags you can use. Both have their needs. But it's usually a bad idea to use custom/exotic tags because you will probably be the only person to use this information even though everyone else could benefit from it. So hopefully when someone wants to put information in one's file, they will find an official one that fit them and hopefully use it ! If it's not in the list, this person can contact us any time for addition of such a missing tag. But it doesn't mean it will be accepted... Matroska files are not meant the become a whole database of people who made costumes for a film. A website would be better for that... It's hard to define what SHOULD be in and what doesn't make sense in a file. So we'll treat each request carefully.
We also need an official list simply for developpers to be able to display relevant information in their own design (if they choose to support a list of meta-information they SHOULD know which tag has the wanted meaning so that other apps could understand the same meaning).
To be able to save tags from other systems to Matroska we need to translate them to our system. There is a translation table on our site.
The TargetType element allows tagging of different parts that are inside or outside a given file. For example in an audio file with one song you could have information about the album it comes from and even the CD set even if it's not found in the file.
For application to know what kind of information (like TITLE) relates to a certain level (CD title or track title), we also need a set of official TargetType names. For now audio and video will have different values & names. That also means the same tag name can have different meanings depending on where it is (otherwise we would end up with 15 TITLE_ tags).
An upper level value tag applies to the lower level. That means if a CD has the same artist for all tracks, you just need to set the ARTIST tag at level 50 (ALBUM) and not to each TRACK (but you can). That also means that if some parts of the CD have no known ARTIST the value MUST be set to nothing (a void string "").
When a level doesn't exist it MUST NOT be specified in the files, so that the TOTAL_PARTS and PART_NUMBER elements match the same levels.
Here is an example of how these organizational tags work: If you set 10 TOTAL_PARTS to the ALBUM level (40) it means the album contains 10 lower parts. The lower part in question is the first lower level that is specified in the file. So if it's TRACK (30) then that means it contains 10 tracks. If it's MOVEMENT (20) that means it's 10 movements, etc.
The following is a complete list of the supported Matroska Tags. While it is possible to use Tag names that are not listed below, this is not reccommended as compatability will be compromised. If you find that there is a Tag missing that you would like to use, then please contact the Matroska team for its inclusion in the specifications before the format reaches 1.0.
With the rise of Media Centers and even programs to manage large amounts of audio files, it's becoming necessary to visualize your files easily, not just browse by names. It is also a lot nicer to browse for the user. Matroska supports attachments and they can be used for cover arts. This document defines a set of guidelines for coders and file creators to add cover arts correctly in Matroska files. These guidelines will ensure the user experience is good and consistent wherever you put your files.
The pictures SHOULD only use the JPEG and PNG picture formats.
There can be 2 different cover for a movie/album. A portrait one (like a DVD case) and a landscape one (like a banner ad for example, looking better on a wide screen).
There can be 2 versions of the same cover, the normal one and the small one. The dimension of the normal one SHOULD be 600 on the smallest side (eg 960x600 for landscape and 600x800 for portrait, 600x600 for square). The dimension of the small one SHOULD be 120 (192x120 or 120x160).
The way to differentiate between all these versions is by the filename. The default filename is cover.(png/jpg) for backward compatibility reasons. That is the "big" version of the file (600) in square or portrait mode. It SHOULD also be the first file in the attachments. The smaller resolution SHOULD be prefixed with "small_", ie small_cover.(jpg/png). The landscape variant SHOULD be suffixed with "_land", ie cover_land.jpg. The filenames are case sensitive and SHOULD all be lower case.
There is a sample file available to test player compatibility or to demonstrate the use of cover art in Matroska files.---
There exist multiple ways to stream a content. The term streaming itself is very vague. It means reading a file stored on a server. But the server could be very distant or very close. The transport system and the protocol used for streaming makes the whole difference.
In the case of Matroska, there are mostly 2 different kinds of stream: file access and live streaming.
File access can simply be reading a file located on your computer, but also accessing it from an HTTP (web) server or CIFS (windows share) server. All these protocols are usually safe from reading errors and seeking in the stream is possible. On other hand when the file is stored far away or on a slow server, seeking can be an expensive operation and SHOULD be avoided. That's why we set a few guidelines that, when followed, help reduce the number of seeking for regular playback and also have the playback start quickly without a lot of data needed to read first (like the Cues (index), Attachments or Meta Seek of all the Clusters).
Matroska having a small overhead, it is well suited for storing music/videos on file servers without having a big impact on the bandwidth used. It doesn't require to load the index before playing (the index can be loaded only when seeking is requested the first time), so playback can start very quickly too.
Live streaming is the equivalent of TV broadcasting on the internet. There are 2 families of servers for that. The RTP/RTSP ones and the HTTP servers. Matroska is not meant to be used over RTP. RTP already has timing and channel mechanisms that would wasted if doubled in Matroska. On the other hand live streaming of Matroska over HTTP (or any other plain protocol based on TCP) is very possible.
A live Matroska stream is different than a file, because it may have no known end (only when the client disconnects). For that the Segment MUST use the "unknown" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example).
The Segment(s) being continuous, certain elements like Meta Seek, Cues, Chapters, Attachments MUST NOT be used in this context.
On the player side, it is possible to detect that a stream is not seekable. If the stream does not have a Meta Seek list or a Cues list at the beginning of the stream, it SHOULD be considered as non seekable. Even though it's still theoretically possible to seek blindly forward in the stream, if the server supports it.
In the context of a live radio or even web TV it is possible to "Tag" the content that is currently playing. The Tags level 1 element can be placed between Clusters each time necessary. In that case, the new Tags found MUST reset the previously encountered tags and use the new values instead (be they empty).
This document is a draft of the Menu system that will be the default one in Matroska. As it will just be composed of a Control Track, it will be seen as a "codec" and could be replaced later by something else if needed.
A menu is like what you see on DVDs, when you have some screens to select the audio format, subtitles or scene selection.
What we'll try to have is a system that can do almost everything done on a DVD, or more, or better, or drop the unused features if necessary.
As the name suggests, a Control Track is a track that can control the playback of the file and/or all the playback features. To make it as simple as possible for players, the Control Track will just give orders to the player and get the actions associated with the highlights/hotspots.
A hightlight is basically a rectangle/key associated with an action UID. When that rectangle/key is activated, the player send the UID of the action to the Control Track handler (codec). The fact that it can also be a key means that even for audio only files, a keyboard shortcut or button panel could be used for menues. But in that case, the hotspot will have to be associated with a name to display.
So this hightlight is sent from the Control Track to the Player. Then the player has to handle that highlight until it's disactivated (see Playback features)
The hightlight contains a UID of the action, a displayable name (UTF-8), an associated key (list of keys to be defined, probably up/down/left/right/select), a screen position/range and an image to display. The image will be displayed either when the user place the mouse over the rectangle (or any other shape), or when an option of the screen is selected (not activated). There could be a second image used when the option is activated. And there could be a third image that can serve as background. This way you could have a still image (like in some DVDs) for the menu and behind that image blank video (small bitrate).
When a highlight is activated by the user, the player has to send the UID of the action to the Control Track. Then the Control Track codec will handle the action and possibly give new orders to the player.
The format used for storing images SHOULD be extensible. For the moment we'll use PNG and BMP, both with alpha channel.
All the following features will be sent from the Control Track to the Player :
All the actions will be writen in a normal Matroska track, with a timecode. A "Menu Frame" SHOULD be able to contain more that one action/highlight for a given timecode. (to be determined, EBML format structure)
Some players might not support the control track. That mean they will play the active/looped parts as part of the data. So I suggest putting the active/looped parts of a movie at the end of a movie. When a Menu-aware player encouter the default Control Track of a Matroska file, the first order SHOULD be to jump at the start of the active/looped part of the movie.
As a Matroska side project, the obvious choice for storing binary data is EBML.---
One of the way to compare containers is to analyze the overhead produced for the same raw data. The overhead is the amount of data added to these raw data, due to the internal structure of the format.
This document is only giving the overhead introduced by matroska. It is intended for the matroska team to better tune the format for efficiency. And also specify where matroska is best suited.
Low bitrate audio (like speex or vorbis) is usually using very small packets of data, all independent ones (no reference to previous or future frames). The bitrate can be as low as 8kbps (to 64kbps). For 8kbps you have 1kBps. If you cut that into 20ms parts, that makes approximately 100 bytes (to 1000 bytes) per part (packet). Low bitrate codec are usually tuned for real-time conferencing on limited bandwidth lines, so the VBR aspect is usually limited. That's why we will consider that bitrate to be constant, ie the size of packets.
bitrate | pkt size | No lacing | 2 in lace | 3 in lace | 4 in lace | 5 in lace | 6 in lace | 7 in lace |
---|---|---|---|---|---|---|---|---|
8kbps | 100 | 1+1+4+0+100 (6%) | 1+2+4+2+200 (4.5%) | 1+2+4+3+300 (3.3%) | 1+2+4+4+400 (2.8%) | 1+2+4+5+500 (2.4%) | 1+2+4+6+600 (2.2%) | 1+2+4+7+700 (2%) |
16kbps | 200 | 1+2+4+0+200 (3.5%) | 1+2+4+2+400 (2.3%) | 1+2+4+3+600 (1.7%) | 1+2+4+4+800 (1.4%) | 1+2+4+5+1000 (1.2%) | 1+2+4+6+1200 (1.1%) | 1+2+4+7+1400 (1%) |
24kbps | 300 | 1+2+4+0+300 (2%) | 1+2+4+3+600 (1.8%) | 1+2+4+5+900 (1.3%) | 1+2+4+7+1200 (1.2%) | 1+2+4+9+1500 (1.1%) | 1+2+4+11+1800 (1%) | 1+2+4+13+2100 (0.95%) |
32kbps | 400 | 1+2+4+0+400 (1.8%) | 1+2+4+3+800 (1.3%) | 1+2+4+5+1200 (1%) | 1+2+4+7+1600 (0.88%) | 1+2+4+9+2000 (0.8%) | 1+2+4+11+2400 (0.67%) | 1+2+4+13+2800 (0.71%) |
48kbps | 600 | 1+2+4+0+600 (1%) | 1+2+4+4+1200 (0.92%) | 1+2+4+7+1800 (0.78%) | 1+2+4+10+2400 (0.71%) | 1+2+4+13+3000 (0.75%) | 1+2+4+16+3600 (0.64%) | 1+2+4+19+4200 (0.62%) |
64kbps | 800 | 1+2+4+0+800 (0.88%) | 1+2+4+5+1600 (0.75%) | 1+2+4+9+2400 (0.67%) | 1+2+4+13+3200 (0.63%) | 1+2+4+17+4000 (0.60%) | 1+2+4+21+4800 (0.58%) | 1+2+4+26+5600 (0.59%) |
explanations : This is the overhead introduced by the Block level. There is more overhead in a matroska file, ie the Cluster head (that contains many Blocks) and the file header (containing various meta information).
the first number is the number is the size of the total Block+Data, ie element ID (1), size (1 to 8), Block head (4), lacing (0 to infinite), data
the second number is the pourcentage of overhead for each packet
In matroska, synchronisation and error recovery is done with a Cluster. A cluster contains 1 to many Blocks. So let's see the effect of having 1 Block per Cluster, 2 Blocks per Cluster and 3 Blocks per Cluster. These are the worst cases where synchronisation is necessary often, ie every 20, 40 and 60ms (with 1 block only). A value of 1s is a pretty agressive case and is the minimum supported here (just to save me from a few calculus).
1 Block per Cluster |
---|
bitrate |
--- |
8kbps |
16kbps |
24kbps |
32kbps |
48kbps |
64kbps |
2 Blocks per Cluster |
---|
bitrate |
--- |
8kbps |
16kbps |
24kbps |
32kbps |
48kbps |
64kbps |
3 Blocks per Cluster |
---|
bitrate |
--- |
8kbps |
16kbps |
24kbps |
32kbps |
48kbps |
64kbps |
explanations : the third number is the max time between 2 error recoveries (re-sync) in milliseconds. This is based on the example of all frames have a 20ms granularity.
Low bitrate video is, like low bitrate audio, the worst case for overhead. The range we will use here is 64 kbps to 256kbps. I think these are reasonable values for what can be considered as low video bitrate.
One of the major difference in video is that the number of frame per second is fixed (10 to 30 for low bitrates).
Another difference is that the frames usually depend on others to save some compression bits. One of the effect is that all frames don't have the same size. You have key frames (I) that don't depend on other frames, (P) frames that depend on an older frame and (B) frames that rely on an older and a future frame.
It is mandatory that all I frames have an actual timecode coming from the container, because the P and B frames will rely on that timecode for reference.
With all I frames, the average data is easy to compute. For 64kbps=8kBps we have a frame=1/20s. That means each frame is 400 bytes big. So the results are similar to 32kbps audio.
Lacing SHOULD NOT be used for better seeking in the file. But it is still possible for use in this particular case.
1 I frame/Block per Cluster (5ms) |
---|
bitrate |
--- |
64kbps |
128kbps |
256kbps |
2 I frame/Block per Cluster (10ms) |
---|
bitrate |
--- |
64kbps |
128kbps |
256kbps |
4 I frame/Block per Cluster (20ms) |
---|
bitrate |
--- |
64kbps |
128kbps |
256kbps |
8 I frame/Block per Cluster (40ms) |
---|
bitrate |
--- |
64kbps |
128kbps |
256kbps |
We clearly see that there is another more interresting table (lacing use is dropped) :
bitrate | pkt size | 1 Block/C (50ms) | 2 Blocks/C (100ms) | 4 Blocks/C (200ms) | 8 Blocks/C (400ms) | 16 Blocks/C (800ms) | 20 Blocks/C (1s) |
---|---|---|---|---|---|---|---|
64kbps | 400 | 4+2+1*(1+2+4+400) (3.3%) | 4+2+2*(1+2+4+400) (2.5%) | 4+2+4*(1+2+4+400) (2.1%) | 4+2+8*(1+2+4+400) (1.9%) | 4+2+16*(1+2+4+400) (1.8%) | 4+2+20*(1+2+4+400) (1.8%) |
128kbps | 800 | 4+2+1*(1+2+4+800) (1.63%) | 4+2+2*(1+2+4+800) (1.3%) | 4+2+4*(1+2+4+800) (1.06%) | 4+2+8*(1+2+4+800) (0.97%) | 4+2+16*(1+2+4+800) (0.92%) | 4+2+20*(1+2+4+800) (0.91%) |
256kbps | 1200 | 4+2+1*(1+2+4+1200) (1.08%) | 4+2+2*(1+2+4+1200) (0.83%) | 4+2+4*(1+2+4+1200) (1.06%) | 4+2+8*(1+2+4+1200) (0.65%) | 4+2+16*(1+2+4+1200) (0.61%) | 4+2+20*(1+2+4+1200) (0.61%) |
Conslusions :
In this case, each frame has to be separated in a Block (no lacing possible). The reference timecode in matroska (of the previous frame) is written in a separate element ([BlockAddition][TimecodeReference]). So more overhead is introduced.
We will establish that the P frame is 3x smaller than the I frame (I hope this is a realistic case). That means that, at 20 frames per second, for 64 kbps the I frame is 600 bytes and the B frame is 200 bytes (2 frames are 2*400 bytes big).
bitrate | pkt size | 2 Blocks/C (100ms) | 4 Blocks/C (200ms) | 8 Blocks/C (400ms) | 16 Blocks/C (800ms) | 20 Blocks/C (1s) |
---|---|---|---|---|---|---|
64kbps | 600/200 | 4+2+(1+2+4+600)+(1+2+4+200+1+1+2) (3%) | 4+2+2*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.6%) | 4+2+4*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.4%) | 4+2+8*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.3%) | 4+2+10*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.3%) |
128kbps | 1200/400 | 4+2+(1+2+4+1200)+(1+2+4+400+1+1+2) (1.5%) | 4+2+2*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.3%) | 4+2+4*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.2%) | 4+2+8*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.1%) | 4+2+10*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.1%) |
256kbps | 1800/600 | 4+2+(1+2+4+1800)+(1+2+4+600+1+1+2) (1.01%) | 4+2+2*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.88%) | 4+2+4*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.81%) | 4+2+8*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.78%) | 4+2+10*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.78%) |
Conclusions :