<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' []>
<rfc ipr="trust200902" category="std" docName="draft-lhomme-cellar-matroska-00">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc private=""?>
<?rfc topblock="yes"?>
<?rfc comments="no"?>
<front>
<title abbrev="Matroska">Matroska</title>

<author initials="S." surname="Lhomme" fullname="Steve Lhomme">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email></email>
<uri></uri>
</address>
</author>
<author initials="M." surname="Bunkus" fullname="Moritz Bunkus">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email></email>
<uri></uri>
</address>
</author>
<author initials="D." surname="Rice" fullname="Dave Rice">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email></email>
<uri></uri>
</address>
</author>
<date year="2016" month="July" day="8"/>

<area>art</area>
<workgroup>cellar</workgroup>
<keyword></keyword>


<abstract>
<t>This document defines the Matroska audiovisual container, including definitions of its structural Elements, as well as its terminology, vocabulary, and application.
</t>
</abstract>


</front>

<middle>

<section anchor="introduction" title="Introduction">
<t>Matroska aims to become THE standard of multimedia container formats. It was derived from a project called <eref target="http://mukoli.free.fr/mcf/mcf.html">MCF</eref>, but differentiates from it significantly because it is based on <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">EBML</eref> (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.
</t>
<t>First, it is essential to clarify exactly &quot;What an Audio/Video container is&quot;, to avoid any misunderstandings:
</t>
<t>
<list style="symbols">
<t>It is NOT a video or audio compression format (video codec)</t>
<t>It is an envelope for which there can be many audio, video and subtitles streams, allowing the user to store a complete movie or CD in a single file.</t>
</list>
</t>
<t>Matroska is designed with the future in mind. It incorporates features like:
</t>
<t>
<list style="symbols">
<t>Fast seeking in the file</t>
<t>Chapter entries</t>
<t>Full metadata (tags) support</t>
<t>Selectable subtitle/audio/video streams</t>
<t>Modularly expandable</t>
<t>Error resilience (can recover playback even when the stream is damaged)</t>
<t>Streamable over the internet and local networks (HTTP, CIFS, FTP, etc)</t>
<t>Menus (like DVDs have)</t>
</list>
</t>
<t>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.
</t>
</section>

<section anchor="status-of-this-document" title="Status of this document">
<t>This document is a work-in-progress specification defining the Matroska file format as part of the <eref target="https://datatracker.ietf.org/wg/cellar/charter/">IETF Cellar working group</eref>. 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 <eref target="https://matroska.org/files/matroska.pdf">here</eref> (PDF doc by Alexander Noé -- outdated).
</t>
<t>For a simplified diagram of the layout of a Matroska file, see the <eref target="{{site.baseurl}}/diagram.html">Diagram page</eref>.
</t>
<t>A more refined and detailed version of the EBML specifications is being <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">worked on here</eref>.
</t>
<t>The table found below is now generated from the &quot;source&quot; of the Matroska specification. This <eref target="https://github.com/Matroska-Org/foundation-source/blob/master/spectool/specdata.xml">XML file</eref> 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.
</t>
<t>Note that versions 1, 2 and 3 have been finalized. Version 4 is currently work in progress. There MAY be further additions to v4.
</t>
</section>

<section anchor="security-considerations" title="Security Considerations">
<t>Matroska inherits security considerations from EBML. Other security considerations are to be determined.
</t>
</section>

<section anchor="iana-considerations" title="IANA Considerations">
<t>To be determined.
</t>
</section>

<section anchor="notations-and-conventions" title="Notations and Conventions">
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in <eref target="https://tools.ietf.org/html/rfc2119">RFC 2119</eref>.
</t>
</section>

<section anchor="basis-in-ebml" title="Basis in EBML">
<t>Matroska is a Document Type of EBML (Extensible Binary Meta Language). This specification is dependent on the <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">EBML Specification</eref>. For an understanding of Matroska's EBML Schema, see in particular the sections of the EBML Specification covering <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#ebml-element-types">EBML Element Types</eref>, <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#ebml-schema">EBML Schema</eref>, and <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#structure">EBML Structure</eref>.
</t>

<section anchor="added-constaints-on-ebml" title="Added Constaints on EBML">
<t>As an EBML Document Type, Matroska adds the following constraints to the EBML specification.
</t>
<t>
<list style="symbols">
<t>The <spanx style="verb">docType</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be 'matroska'.</t>
<t>The <spanx style="verb">EBMLMaxIDLength</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be <spanx style="verb">4</spanx>.</t>
<t>The <spanx style="verb">EBMLMaxSizeLength</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be <spanx style="verb">8</spanx> or less.</t>
</list>
</t>
</section>

<section anchor="matroska-design" title="Matroska Design">
<t>All top-levels elements (Segment and direct sub-elements) are coded on 4 octets, i.e. class D elements.
</t>

<section anchor="language-codes" title="Language Codes">
<t>Language codes can be either the 3 letters <eref target="http://www.loc.gov/standards/iso639-2/php/English_list.php">bibliographic ISO-639-2</eref> form (like &quot;fre&quot; for french), or such a language code followed by a dash and a country code for specialities in languages (like &quot;fre-ca&quot; for Canadian French). Country codes are the same as used for <eref target="http://www.iana.org/cctld/cctld-whois.htm">internet domains</eref>.
</t>
</section>

<section anchor="physical-types" title="Physical Types">
<t>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 :
</t>
<texttable>
<ttcol align="center">ChapterPhysicalEquiv</ttcol>
<ttcol align="center">Audio</ttcol>
<ttcol align="center">Video</ttcol>
<ttcol align="center">Comment</ttcol>

<c>70</c><c>SET / PACKAGE</c><c>SET / PACKAGE</c><c>the collection of different media</c>
<c>60</c><c>CD / 12&quot; / 10&quot; / 7&quot; / TAPE / MINIDISC / DAT</c><c>DVD / VHS / LASERDISC</c><c>the physical medium like a CD or a DVD</c>
<c>50</c><c>SIDE</c><c>SIDE</c><c>when the original medium (LP/DVD) has different sides</c>
<c>40</c><c>-</c><c>LAYER</c><c>another physical level on DVDs</c>
<c>30</c><c>SESSION</c><c>SESSION</c><c>as found on CDs and DVDs</c>
<c>20</c><c>TRACK</c><c>-</c><c>as found on audio CDs</c>
<c>10</c><c>INDEX</c><c>-</c><c>the first logical level of the side/medium</c>
</texttable>
</section>

<section anchor="block-structure" title="Block Structure">
<t>Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
</t>
<t>Bit 0 is the most significant bit.
</t>
<t>Frames using references SHOULD be stored in &quot;coding order&quot;. 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.
</t>
<t>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.
</t>
<t>| Block Header |
| Offset | Player | Description |
| 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range). |
| 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) |
| 0x03+ | - |
</t>
<t>| 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
</t>
<t>
<list style="symbols">
<t>00 : no lacing</t>
<t>01 : Xiph lacing</t>
<t>11 : EBML lacing</t>
<t>10 : fixed-size lacing</t>
</list>
</t>
<t>|
| 7 | - | not used |
</t>
<t>|
| 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 |
</t>
</section>

<section anchor="lacing" title="Lacing">
<t>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...
</t>
<t>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:
</t>

<section anchor="xiph-lacing" title="Xiph lacing">
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 01)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 500 octets one)</t>
<t>Lacing sizes: only the 2 first ones will be coded, 800 gives 255;255;255;35, 500 gives 255;245. The size of the last frame is deduced from the total size of the Block.</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
<t>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.
</t>
</section>

<section anchor="ebml-lacing" title="EBML lacing">
<t>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 :
</t>
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 11)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 400 octets one)</t>
<t>Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320 0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000 = 0x5ED3. The size of the last frame is deduced from the total size of the Block.</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
</section>

<section anchor="fixedsize-lacing" title="Fixed-size lacing">
<t>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 :
</t>
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 10)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
</section>

<section anchor="simpleblock-structure" title="SimpleBlock Structure">
<t>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.
</t>
<t>Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
</t>
<t>Bit 0 is the most significant bit.
</t>
<t>Frames using references SHOULD be stored in &quot;coding order&quot;. 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.
</t>
<t>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.
</t>
<t>| SimpleBlock Header |
| Offset | Player | Description |
| 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range). |
| 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) |
| 0x03+ | - |
</t>
<t>| 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
</t>
<t>
<list style="symbols">
<t>00 : no lacing</t>
<t>01 : Xiph lacing</t>
<t>11 : EBML lacing</t>
<t>10 : fixed-size lacing</t>
</list>
</t>
<t>|
| 7 | - | Discardable, the frames of the Block can be discarded during playing if needed |
</t>
<t>|
| 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 |
</t>
</section>

<section anchor="encryptedblock-structure" title="EncryptedBlock Structure">
<t>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.
</t>
<t>The other difference is that the number of frames in the lace are not saved if &quot;no lacing&quot; is specified (bits 5 and 6 set to 0).
</t>
<t>The Transformation is specified by a TransformID in the Block (MUST be the same for all frames within the EncryptedBlock).
</t>
<t>Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.
</t>
<t>Bit 0 is the most significant bit.
</t>
<t>Frames using references SHOULD be stored in &quot;coding order&quot;. 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.
</t>
<t>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.
</t>
<t>| EncryptedBlock Header |
| Offset | Player | Description |
| 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range). |
| 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) |
| 0x03+ | - |
</t>
<t>| 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
</t>
<t>
<list style="symbols">
<t>00 : no lacing</t>
<t>01 : Xiph lacing</t>
<t>11 : EBML lacing</t>
<t>10 : fixed-size lacing</t>
</list>
</t>
<t>|
| 7 | - | Discardable, the frames of the Block can be discarded during playing if needed |
</t>
<t>|
| Lace (when lacing bit is set) |
| 0x00 | MUST* | Number of frames in the lace-1 (uint8) <spanx style="emph">Only available if bit 5 or bit 6 of the EncryptedBlock flag is set to one. |
| 0x01 / 0xXX | MUST</spanx> | 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 |
</t>
</section>

<section anchor="virtual-block" title="Virtual Block">
<t>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.
</t>
<t>The structure is a scaled down version of the normal <eref target="{{site.baseurl}}/index.html#block">Block</eref>.
</t>
<t>| 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 &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range). |
| 0x01+ | MUST | Timecode (relative to Cluster timecode, signed int16) |
| 0x03+ | - |
</t>
<t>| Flags |
| Bit | Player | Description |
| 7-0 | - | Reserved, set to 0 |
</t>
<t>|
</t>
</section>
</section>
</section>
</section>

<section anchor="matroska-schema" title="Matroska Schema">
<t>This specification includes an <spanx style="verb">EBML Schema</spanx> 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.
</t>
<t>For convenience the section of the EBML specification that defines EBML Schema Element Attributes is restated here:
</t>

<section anchor="ebml-schema-element-attributes" title="EBML Schema Element Attributes">
<t>Within an EBML Schema the <spanx style="verb">&lt;EBMLSchema&gt;</spanx> uses the following attributes to define the EBML Schema:
</t>
<texttable>
<ttcol align="left">attribute name</ttcol>
<ttcol align="left">required</ttcol>
<ttcol align="left">definition</ttcol>

<c>docType</c><c>Yes</c><c>The <spanx style="verb">docType</spanx> lists the official name of the EBML Document Type that is defined by the EBML Schema; for example, <spanx style="verb">&lt;EBMLSchema docType="matroska"&gt;</spanx>.</c>
<c>version</c><c>Yes</c><c>The <spanx style="verb">version</spanx> 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 <spanx style="verb">minver</spanx> and <spanx style="verb">maxver</spanx> attributes of .</c>
</texttable>
<t>Within an EBML Schema the <spanx style="verb">&lt;element&gt;</spanx> uses the following attributes to define an EBML Element.
</t>
<texttable>
<ttcol align="left">attribute name</ttcol>
<ttcol align="left">required</ttcol>
<ttcol align="left">definition</ttcol>

<c>name</c><c>Yes</c><c>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 <eref target="http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-decl">XML Schema specification</eref>.</c>
<c>level</c><c>Yes</c><c>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 <spanx style="verb">global</spanx> and <spanx style="verb">recursive</spanx> MAY occur at a level greater than or equal to the defined <spanx style="verb">level</spanx>.</c>
<c>global</c><c>No</c><c>A boolean to express if an EBML Element MUST occur at its defined level or may occur within any Parent EBML Element. If the <spanx style="verb">global</spanx> attribute is not expressed for that Element then that element is to be considered not global.</c>
<c>id</c><c>Yes</c><c>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.</c>
<c>minOccurs</c><c>No</c><c>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 <eref target="https://www.w3.org/TR/xmlschema-0/#ref6">XML Schema</eref>. Note that Elements with minOccurs set to &quot;1&quot; that also have a default value declared are not required to be stored but are required to be interpretted, see the <spanx style="verb">Note on the Use of default attributes to define Mandatory EBML Elements</spanx>.</c>
<c>maxOccurs</c><c>No</c><c>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 <spanx style="verb">unbounded</spanx> to indicate there is no maximum number of occurrences or the term <spanx style="verb">identical</spanx> to indicate that the Element is an <spanx style="verb">Identically Recurring Element</spanx>. 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 <eref target="https://www.w3.org/TR/xmlschema-0/#ref6">XML Schema</eref>, with EBML Schema adding the concept of Identically Recurring Elements.</c>
<c>range</c><c>No</c><c>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 <spanx style="verb">section of Expressions of range</spanx> for rules applied to expression of range values.</c>
<c>default</c><c>No</c><c>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.</c>
<c>type</c><c>Yes</c><c>As defined within the <spanx style="verb">section on EBML Element Types</spanx>, 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'.</c>
<c>unknownsizeallowed</c><c>No</c><c>A boolean to express if an EBML Element MAY be used as an <spanx style="verb">Unknown-Sized Element</spanx> (having all VINT_DATA bits of Element Data Size set to 1). The <spanx style="verb">unknownsizeallowed</spanx> attribute only applies to Master-elements. If the <spanx style="verb">unknownsizeallowed</spanx> attribute is not used it is assumed that the element is not allowed to use an unknown Element Data Size.</c>
<c>recursive</c><c>No</c><c>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 <spanx style="verb">level</spanx> attribute if the Element is a Child Element of a Parent Element with the same Element ID. The <spanx style="verb">recursive</spanx> attribute only applies to Master-elements. If the <spanx style="verb">recursive</spanx> attribute is not used it is assumed that the element is not allowed to be used recursively.</c>
<c>minver</c><c>No</c><c>The <spanx style="verb">minver</spanx> (minimum version) attribute stores a non-negative integer that represents the first version of the docType to support the element. If the <spanx style="verb">minver</spanx> attribute is not used it is assumed that the element has a minimum version of &quot;1&quot;.</c>
<c>maxver</c><c>No</c><c>The <spanx style="verb">maxver</spanx> (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 <spanx style="verb">maxver</spanx> attribute is not used it is assumed that the element has a maximum version equal to the value stored in the <spanx style="verb">version</spanx> attribute of .</c>
</texttable>
<t>The <spanx style="verb">&lt;element&gt;</spanx> nodes shall contain a description of the meaning and use of the EBML Element stored within one or many <spanx style="verb">&lt;documentation&gt;</spanx> sub-elements. The <spanx style="verb">&lt;documentation&gt;</spanx> sub-element may use a <spanx style="verb">lang</spanx> attribute which may be set to the RFC 5646 value of the language of the element's documentation. The <spanx style="verb">&lt;documentation&gt;</spanx> sub-element may use a <spanx style="verb">type</spanx> attribute to distinguish the meaning of the documentation. Recommended values for the <spanx style="verb">&lt;documentation&gt;</spanx> sub-element's <spanx style="verb">type</spanx> attribute include: <spanx style="verb">definition</spanx>, <spanx style="verb">rationale</spanx>, <spanx style="verb">usage notes</spanx>, and <spanx style="verb">references</spanx>.
</t>
<t>The <spanx style="verb">&lt;element&gt;</spanx> nodes MUST be arranged hierarchically according to the permitted structure of the EBML Document Type. An <spanx style="verb">&lt;element&gt;</spanx> 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 <spanx style="verb">&lt;element&gt;</spanx> node that defines the Parent Element. <spanx style="verb">&lt;element&gt;</spanx> nodes that define Level 0 Elements and Global Elements should be sub-elements of <spanx style="verb">&lt;EBMLSchema&gt;</spanx>.
</t>
</section>

<section anchor="matroska-additions-to-schema-element-attributes" title="Matroska Additions to Schema Element Attributes">
<t>In addition to the EBML Schema definition provided by the EBML Specification, Matroska adds the following additional attributes:
</t>
<texttable>
<ttcol align="left">attribute name</ttcol>
<ttcol align="left">required</ttcol>
<ttcol align="left">definition</ttcol>

<c>webm</c><c>No</c><c>A boolean to express if the Matroska Element is also supported within version 2 of the <spanx style="verb">webm</spanx> specification. Please consider the <eref target="http://www.webmproject.org/docs/container/">webm specification</eref> as the authoritative on <spanx style="verb">webm</spanx>.</c>
</texttable>
</section>

<section anchor="matroska-schema-1" title="Matroska Schema">
<t>Here the definition of each Matroska Element is provided.
</t>
<t>% concatenate with Matroska EBML Schema converted to markdown %
</t>
</section>
</section>

<section anchor="segment" title="Segment">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Segment</ttcol>

<c>Element ID</c><c>0x18538067</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c>None</c>
<c>Child Elements</c><c><xref target="seekhead"/> <xref target="info"/> <xref target="cluster"/> <xref target="tracks"/> <xref target="cues"/> <xref target="attachments"/> <xref target="chapters"/> <xref target="tags"/></c>
<c>Element Context</c><c>None</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The Root Element that contains all other Top-Level Elements (Elements defined only at Level 1). A Matroska file is composed of 1 Segment.</c>
</texttable>
</section>

<section anchor="seekhead" title="SeekHead">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SeekHead</ttcol>

<c>Element ID</c><c>0x114D9B74</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="seek"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/SeekHead</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains the position of other Top-Level Elements.</c>
</texttable>
</section>

<section anchor="seek" title="Seek">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Seek</ttcol>

<c>Element ID</c><c>0x4DBB</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="seekhead"/></c>
<c>Child Elements</c><c><xref target="seekid"/> <xref target="seekposition"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="seekhead"/>/Seek</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains a single seek entry to an EBML Element.</c>
</texttable>
</section>

<section anchor="seekid" title="SeekID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SeekID</ttcol>

<c>Element ID</c><c>0x53AB</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="seek"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="seekhead"/>/<xref target="seek"/>/SeekID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The binary ID corresponding to the Element name.</c>
</texttable>
</section>

<section anchor="seekposition" title="SeekPosition">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SeekPosition</ttcol>

<c>Element ID</c><c>0x53AC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="seek"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="seekhead"/>/<xref target="seek"/>/SeekPosition</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The position of the Element in the Segment in octets (0 = first level 1 Element).</c>
</texttable>
</section>

<section anchor="info" title="Info">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Info</ttcol>

<c>Element ID</c><c>0x1549A966</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="segmentuid"/> <xref target="segmentfilename"/> <xref target="prevuid"/> <xref target="prevfilename"/> <xref target="nextuid"/> <xref target="nextfilename"/> <xref target="segmentfamily"/> <xref target="chaptertranslate"/> <xref target="timecodescale"/> <xref target="duration"/> <xref target="dateutc"/> <xref target="title"/> <xref target="muxingapp"/> <xref target="writingapp"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Info</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains general information about the Segment.</c>
</texttable>
</section>

<section anchor="segmentuid" title="SegmentUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SegmentUID</ttcol>

<c>Element ID</c><c>0x73A4</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/SegmentUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A randomly generated unique ID to identify the Segment amongst many others (128 bits).</c>
</texttable>
</section>

<section anchor="segmentfilename" title="SegmentFilename">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SegmentFilename</ttcol>

<c>Element ID</c><c>0x7384</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/SegmentFilename</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A filename corresponding to this Segment.</c>
</texttable>
</section>

<section anchor="prevuid" title="PrevUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrevUID</ttcol>

<c>Element ID</c><c>0x3CB923</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/PrevUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A unique ID to identify the previous Segment of a Linked Segment (128 bits).</c>
</texttable>
</section>

<section anchor="prevfilename" title="PrevFilename">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrevFilename</ttcol>

<c>Element ID</c><c>0x3C83AB</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/PrevFilename</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A filename corresponding to the file of the previous Linked Segment.</c>
</texttable>
</section>

<section anchor="nextuid" title="NextUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">NextUID</ttcol>

<c>Element ID</c><c>0x3EB923</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/NextUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A unique ID to identify the next Segment of a Linked Segment (128 bits).</c>
</texttable>
</section>

<section anchor="nextfilename" title="NextFilename">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">NextFilename</ttcol>

<c>Element ID</c><c>0x3E83BB</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/NextFilename</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A filename corresponding to the file of the next Linked Segment.</c>
</texttable>
</section>

<section anchor="segmentfamily" title="SegmentFamily">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SegmentFamily</ttcol>

<c>Element ID</c><c>0x4444</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/SegmentFamily</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A randomly generated unique ID that all Segments of a Linked Segment MUST share (128 bits).</c>
</texttable>
</section>

<section anchor="chaptertranslate" title="ChapterTranslate">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTranslate</ttcol>

<c>Element ID</c><c>0x6924</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c><xref target="chaptertranslateeditionuid"/> <xref target="chaptertranslatecodec"/> <xref target="chaptertranslateid"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/ChapterTranslate</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A tuple of corresponding ID used by chapter codecs to represent this Segment.</c>
</texttable>
</section>

<section anchor="chaptertranslateeditionuid" title="ChapterTranslateEditionUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTranslateEditionUID</ttcol>

<c>Element ID</c><c>0x69FC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chaptertranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/<xref target="chaptertranslate"/>/ChapterTranslateEditionUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the Segment.</c>
</texttable>
</section>

<section anchor="chaptertranslatecodec" title="ChapterTranslateCodec">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTranslateCodec</ttcol>

<c>Element ID</c><c>0x69BF</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chaptertranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/<xref target="chaptertranslate"/>/ChapterTranslateCodec</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).</c>
</texttable>
</section>

<section anchor="chaptertranslateid" title="ChapterTranslateID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTranslateID</ttcol>

<c>Element ID</c><c>0x69A5</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chaptertranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/<xref target="chaptertranslate"/>/ChapterTranslateID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The binary value used to represent this Segment in the chapter codec data. The format depends on the ChapProcessCodecID used.</c>
</texttable>
</section>

<section anchor="timecodescale" title="TimecodeScale">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TimecodeScale</ttcol>

<c>Element ID</c><c>0x2AD7B1</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/TimecodeScale</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Timestamp scale in nanoseconds (1.000.000 means all timestamps in the Segment are expressed in milliseconds).</c>
</texttable>
</section>

<section anchor="duration" title="Duration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Duration</ttcol>

<c>Element ID</c><c>0x4489</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/Duration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Duration of the Segment in nanoseconds based on TimecodeScale.</c>
</texttable>
</section>

<section anchor="dateutc" title="DateUTC">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DateUTC</ttcol>

<c>Element ID</c><c>0x4461</c>
<c>Element Type</c><c>date</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/DateUTC</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The date and time that the Segment was created by the muxing application or library.</c>
</texttable>
</section>

<section anchor="title" title="Title">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Title</ttcol>

<c>Element ID</c><c>0x7BA9</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/Title</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>General name of the Segment.</c>
</texttable>
</section>

<section anchor="muxingapp" title="MuxingApp">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MuxingApp</ttcol>

<c>Element ID</c><c>0x4D80</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/MuxingApp</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Muxing application or library (example: &quot;libmatroska-0.4.3&quot;).</c>
</texttable>
</section>

<section anchor="writingapp" title="WritingApp">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">WritingApp</ttcol>

<c>Element ID</c><c>0x5741</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="info"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="info"/>/WritingApp</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Writing application (example: &quot;mkvmerge-0.3.3&quot;).</c>
</texttable>
</section>

<section anchor="cluster" title="Cluster">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Cluster</ttcol>

<c>Element ID</c><c>0x1F43B675</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="timecode"/> <xref target="silenttracks"/> <xref target="position"/> <xref target="prevsize"/> <xref target="simpleblock"/> <xref target="blockgroup"/> <xref target="encryptedblock"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Cluster</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The Top-Level Element containing the (monolithic) Block structure.</c>
</texttable>
</section>

<section anchor="timecode" title="Timecode">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Timecode</ttcol>

<c>Element ID</c><c>0xE7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/Timecode</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Absolute timestamp of the cluster (based on TimecodeScale).</c>
</texttable>
</section>

<section anchor="silenttracks" title="SilentTracks">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SilentTracks</ttcol>

<c>Element ID</c><c>0x5854</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c><xref target="silenttracknumber"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/SilentTracks</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="silenttracknumber" title="SilentTrackNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SilentTrackNumber</ttcol>

<c>Element ID</c><c>0x58D7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="silenttracks"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="silenttracks"/>/SilentTrackNumber</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="position" title="Position">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Position</ttcol>

<c>Element ID</c><c>0xA7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/Position</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The Position of the Cluster in the Segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.</c>
</texttable>
</section>

<section anchor="prevsize" title="PrevSize">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrevSize</ttcol>

<c>Element ID</c><c>0xAB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/PrevSize</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Size of the previous Cluster, in octets. Can be useful for backward playing.</c>
</texttable>
</section>

<section anchor="simpleblock" title="SimpleBlock">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SimpleBlock</ttcol>

<c>Element ID</c><c>0xA3</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/SimpleBlock</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed. (see SimpleBlock Structure)</c>
</texttable>
</section>

<section anchor="blockgroup" title="BlockGroup">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockGroup</ttcol>

<c>Element ID</c><c>0xA0</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c><xref target="block"/> <xref target="blockvirtual"/> <xref target="blockadditions"/> <xref target="blockduration"/> <xref target="referencepriority"/> <xref target="referenceblock"/> <xref target="referencevirtual"/> <xref target="codecstate"/> <xref target="discardpadding"/> <xref target="slices"/> <xref target="referenceframe"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/BlockGroup</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock.</c>
</texttable>
</section>

<section anchor="block" title="Block">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Block</ttcol>

<c>Element ID</c><c>0xA1</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/Block</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)</c>
</texttable>
</section>

<section anchor="blockvirtual" title="BlockVirtual">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockVirtual</ttcol>

<c>Element ID</c><c>0xA2</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/BlockVirtual</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="blockadditions" title="BlockAdditions">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockAdditions</ttcol>

<c>Element ID</c><c>0x75A1</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c><xref target="blockmore"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/BlockAdditions</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="blockmore" title="BlockMore">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockMore</ttcol>

<c>Element ID</c><c>0xA6</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockadditions"/></c>
<c>Child Elements</c><c><xref target="blockaddid"/> <xref target="blockadditional"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="blockadditions"/>/BlockMore</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contain the BlockAdditional and some parameters.</c>
</texttable>
</section>

<section anchor="blockaddid" title="BlockAddID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockAddID</ttcol>

<c>Element ID</c><c>0xEE</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockmore"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="blockadditions"/>/<xref target="blockmore"/>/BlockAddID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>An ID to identify the BlockAdditional level.</c>
</texttable>
</section>

<section anchor="blockadditional" title="BlockAdditional">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockAdditional</ttcol>

<c>Element ID</c><c>0xA5</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockmore"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="blockadditions"/>/<xref target="blockmore"/>/BlockAdditional</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Interpreted by the codec as it wishes (using the BlockAddID).</c>
</texttable>
</section>

<section anchor="blockduration" title="BlockDuration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockDuration</ttcol>

<c>Element ID</c><c>0x9B</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/BlockDuration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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 &quot;display&quot; 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.</c>
</texttable>
</section>

<section anchor="referencepriority" title="ReferencePriority">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferencePriority</ttcol>

<c>Element ID</c><c>0xFA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/ReferencePriority</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="referenceblock" title="ReferenceBlock">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferenceBlock</ttcol>

<c>Element ID</c><c>0xFB</c>
<c>Element Type</c><c>integer</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/ReferenceBlock</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to.</c>
</texttable>
</section>

<section anchor="referencevirtual" title="ReferenceVirtual">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferenceVirtual</ttcol>

<c>Element ID</c><c>0xFD</c>
<c>Element Type</c><c>integer</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/ReferenceVirtual</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Relative position of the data that would otherwise be in position of the virtual block.</c>
</texttable>
</section>

<section anchor="codecstate" title="CodecState">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecState</ttcol>

<c>Element ID</c><c>0xA4</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/CodecState</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The new codec state to use. Data interpretation is private to the codec. This information SHOULD always be referenced by a seek entry.</c>
</texttable>
</section>

<section anchor="discardpadding" title="DiscardPadding">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DiscardPadding</ttcol>

<c>Element ID</c><c>0x75A2</c>
<c>Element Type</c><c>integer</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/DiscardPadding</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="slices" title="Slices">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Slices</ttcol>

<c>Element ID</c><c>0x8E</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c><xref target="timeslice"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/Slices</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains slices description.</c>
</texttable>
</section>

<section anchor="timeslice" title="TimeSlice">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TimeSlice</ttcol>

<c>Element ID</c><c>0xE8</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="slices"/></c>
<c>Child Elements</c><c><xref target="lacenumber"/> <xref target="framenumber"/> <xref target="blockadditionid"/> <xref target="delay"/> <xref target="sliceduration"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/TimeSlice</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="lacenumber" title="LaceNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">LaceNumber</ttcol>

<c>Element ID</c><c>0xCC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="timeslice"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/<xref target="timeslice"/>/LaceNumber</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="framenumber" title="FrameNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FrameNumber</ttcol>

<c>Element ID</c><c>0xCD</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="timeslice"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/<xref target="timeslice"/>/FrameNumber</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame).</c>
</texttable>
</section>

<section anchor="blockadditionid" title="BlockAdditionID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BlockAdditionID</ttcol>

<c>Element ID</c><c>0xCB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="timeslice"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/<xref target="timeslice"/>/BlockAdditionID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The ID of the BlockAdditional Element (0 is the main Block).</c>
</texttable>
</section>

<section anchor="delay" title="Delay">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Delay</ttcol>

<c>Element ID</c><c>0xCE</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="timeslice"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/<xref target="timeslice"/>/Delay</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The (scaled) delay to apply to the Element.</c>
</texttable>
</section>

<section anchor="sliceduration" title="SliceDuration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SliceDuration</ttcol>

<c>Element ID</c><c>0xCF</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="timeslice"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="slices"/>/<xref target="timeslice"/>/SliceDuration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The (scaled) duration to apply to the Element.</c>
</texttable>
</section>

<section anchor="referenceframe" title="ReferenceFrame">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferenceFrame</ttcol>

<c>Element ID</c><c>0xC8</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>0-4</c>
<c>Parent Element</c><c><xref target="blockgroup"/></c>
<c>Child Elements</c><c><xref target="referenceoffset"/> <xref target="referencetimecode"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/ReferenceFrame</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="referenceoffset" title="ReferenceOffset">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferenceOffset</ttcol>

<c>Element ID</c><c>0xC9</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>0-4</c>
<c>Parent Element</c><c><xref target="referenceframe"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="referenceframe"/>/ReferenceOffset</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="referencetimecode" title="ReferenceTimeCode">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ReferenceTimeCode</ttcol>

<c>Element ID</c><c>0xCA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>0-4</c>
<c>Parent Element</c><c><xref target="referenceframe"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/<xref target="blockgroup"/>/<xref target="referenceframe"/>/ReferenceTimeCode</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="encryptedblock" title="EncryptedBlock">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EncryptedBlock</ttcol>

<c>Element ID</c><c>0xAF</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cluster"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cluster"/>/EncryptedBlock</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed). (see EncryptedBlock Structure)</c>
</texttable>
</section>

<section anchor="tracks" title="Tracks">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Tracks</ttcol>

<c>Element ID</c><c>0x1654AE6B</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="trackentry"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Tracks</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A Top-Level Element of information with many tracks described.</c>
</texttable>
</section>

<section anchor="trackentry" title="TrackEntry">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackEntry</ttcol>

<c>Element ID</c><c>0xAE</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tracks"/></c>
<c>Child Elements</c><c><xref target="tracknumber"/> <xref target="trackuid"/> <xref target="tracktype"/> <xref target="flagenabled"/> <xref target="flagdefault"/> <xref target="flagforced"/> <xref target="flaglacing"/> <xref target="mincache"/> <xref target="maxcache"/> <xref target="defaultduration"/> <xref target="defaultdecodedfieldduration"/> <xref target="tracktimecodescale"/> <xref target="trackoffset"/> <xref target="maxblockadditionid"/> <xref target="name"/> <xref target="language"/> <xref target="codecid"/> <xref target="codecprivate"/> <xref target="codecname"/> <xref target="attachmentlink"/> <xref target="codecsettings"/> <xref target="codecinfourl"/> <xref target="codecdownloadurl"/> <xref target="codecdecodeall"/> <xref target="trackoverlay"/> <xref target="codecdelay"/> <xref target="seekpreroll"/> <xref target="tracktranslate"/> <xref target="video"/> <xref target="audio"/> <xref target="trackoperation"/> <xref target="tricktrackuid"/> <xref target="tricktracksegmentuid"/> <xref target="tricktrackflag"/> <xref target="trickmastertrackuid"/> <xref target="trickmastertracksegmentuid"/> <xref target="contentencodings"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/TrackEntry</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Describes a track with all Elements.</c>
</texttable>
</section>

<section anchor="tracknumber" title="TrackNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackNumber</ttcol>

<c>Element ID</c><c>0xD7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackNumber</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number).</c>
</texttable>
</section>

<section anchor="trackuid" title="TrackUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackUID</ttcol>

<c>Element ID</c><c>0x73C5</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackUID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="tracktype" title="TrackType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackType</ttcol>

<c>Element ID</c><c>0x83</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackType</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control).</c>
</texttable>
</section>

<section anchor="flagenabled" title="FlagEnabled">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FlagEnabled</ttcol>

<c>Element ID</c><c>0xB9</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/FlagEnabled</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Set if the track is usable. (1 bit)</c>
</texttable>
</section>

<section anchor="flagdefault" title="FlagDefault">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FlagDefault</ttcol>

<c>Element ID</c><c>0x88</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/FlagDefault</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)</c>
</texttable>
</section>

<section anchor="flagforced" title="FlagForced">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FlagForced</ttcol>

<c>Element ID</c><c>0x55AA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/FlagForced</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="flaglacing" title="FlagLacing">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FlagLacing</ttcol>

<c>Element ID</c><c>0x9C</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/FlagLacing</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Set if the track MAY contain blocks using lacing. (1 bit)</c>
</texttable>
</section>

<section anchor="mincache" title="MinCache">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MinCache</ttcol>

<c>Element ID</c><c>0x6DE7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/MinCache</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="maxcache" title="MaxCache">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MaxCache</ttcol>

<c>Element ID</c><c>0x6DF8</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/MaxCache</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The maximum cache size necessary to store referenced frames in and the current frame. 0 means no cache is needed.</c>
</texttable>
</section>

<section anchor="defaultduration" title="DefaultDuration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DefaultDuration</ttcol>

<c>Element ID</c><c>0x23E383</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/DefaultDuration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one Element put into a (Simple)Block).</c>
</texttable>
</section>

<section anchor="defaultdecodedfieldduration" title="DefaultDecodedFieldDuration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DefaultDecodedFieldDuration</ttcol>

<c>Element ID</c><c>0x234E7A</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/DefaultDecodedFieldDuration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The period in nanoseconds (not scaled by TimcodeScale)</c>
</texttable>

<figure align="center"><artwork align="center">
  between two successive fields at the output of the decoding process (see the notes)
</artwork></figure>
</section>

<section anchor="tracktimecodescale" title="TrackTimecodeScale">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackTimecodeScale</ttcol>

<c>Element ID</c><c>0x23314F</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-3 DEPRECATED</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackTimecodeScale</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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).</c>
</texttable>
</section>

<section anchor="trackoffset" title="TrackOffset">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackOffset</ttcol>

<c>Element ID</c><c>0x537F</c>
<c>Element Type</c><c>integer</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackOffset</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track.</c>
</texttable>
</section>

<section anchor="maxblockadditionid" title="MaxBlockAdditionID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MaxBlockAdditionID</ttcol>

<c>Element ID</c><c>0x55EE</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/MaxBlockAdditionID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.</c>
</texttable>
</section>

<section anchor="name" title="Name">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Name</ttcol>

<c>Element ID</c><c>0x536E</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/Name</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A human-readable track name.</c>
</texttable>
</section>

<section anchor="language" title="Language">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Language</ttcol>

<c>Element ID</c><c>0x22B59C</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/Language</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specifies the language of the track in the Matroska languages form.</c>
</texttable>
</section>

<section anchor="codecid" title="CodecID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecID</ttcol>

<c>Element ID</c><c>0x86</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>An ID corresponding to the codec, see the codec page for more info.</c>
</texttable>
</section>

<section anchor="codecprivate" title="CodecPrivate">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecPrivate</ttcol>

<c>Element ID</c><c>0x63A2</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecPrivate</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Private data only known to the codec.</c>
</texttable>
</section>

<section anchor="codecname" title="CodecName">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecName</ttcol>

<c>Element ID</c><c>0x258688</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecName</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A human-readable string specifying the codec.</c>
</texttable>
</section>

<section anchor="attachmentlink" title="AttachmentLink">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">AttachmentLink</ttcol>

<c>Element ID</c><c>0x7446</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/AttachmentLink</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The UID of an attachment that is used by this codec.</c>
</texttable>
</section>

<section anchor="codecsettings" title="CodecSettings">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecSettings</ttcol>

<c>Element ID</c><c>0x3A9697</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecSettings</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A string describing the encoding setting used.</c>
</texttable>
</section>

<section anchor="codecinfourl" title="CodecInfoURL">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecInfoURL</ttcol>

<c>Element ID</c><c>0x3B4040</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecInfoURL</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A URL to find information about the codec used.</c>
</texttable>
</section>

<section anchor="codecdownloadurl" title="CodecDownloadURL">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecDownloadURL</ttcol>

<c>Element ID</c><c>0x26B240</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecDownloadURL</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A URL to download about the codec used.</c>
</texttable>
</section>

<section anchor="codecdecodeall" title="CodecDecodeAll">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecDecodeAll</ttcol>

<c>Element ID</c><c>0xAA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecDecodeAll</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The codec can decode potentially damaged data (1 bit).</c>
</texttable>
</section>

<section anchor="trackoverlay" title="TrackOverlay">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackOverlay</ttcol>

<c>Element ID</c><c>0x6FAB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackOverlay</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="codecdelay" title="CodecDelay">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CodecDelay</ttcol>

<c>Element ID</c><c>0x56AA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/CodecDelay</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="seekpreroll" title="SeekPreRoll">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SeekPreRoll</ttcol>

<c>Element ID</c><c>0x56BB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/SeekPreRoll</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder MUST decode before the decoded data is valid.</c>
</texttable>
</section>

<section anchor="tracktranslate" title="TrackTranslate">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackTranslate</ttcol>

<c>Element ID</c><c>0x6624</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c><xref target="tracktranslateeditionuid"/> <xref target="tracktranslatecodec"/> <xref target="tracktranslatetrackid"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackTranslate</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The track identification for the given Chapter Codec.</c>
</texttable>
</section>

<section anchor="tracktranslateeditionuid" title="TrackTranslateEditionUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackTranslateEditionUID</ttcol>

<c>Element ID</c><c>0x66FC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tracktranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="tracktranslate"/>/TrackTranslateEditionUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the Segment.</c>
</texttable>
</section>

<section anchor="tracktranslatecodec" title="TrackTranslateCodec">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackTranslateCodec</ttcol>

<c>Element ID</c><c>0x66BF</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tracktranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="tracktranslate"/>/TrackTranslateCodec</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).</c>
</texttable>
</section>

<section anchor="tracktranslatetrackid" title="TrackTranslateTrackID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackTranslateTrackID</ttcol>

<c>Element ID</c><c>0x66A5</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tracktranslate"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="tracktranslate"/>/TrackTranslateTrackID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.</c>
</texttable>
</section>

<section anchor="video" title="Video">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Video</ttcol>

<c>Element ID</c><c>0xE0</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c><xref target="flaginterlaced"/> <xref target="fieldorder"/> <xref target="stereomode"/> <xref target="alphamode"/> <xref target="oldstereomode"/> <xref target="pixelwidth"/> <xref target="pixelheight"/> <xref target="pixelcropbottom"/> <xref target="pixelcroptop"/> <xref target="pixelcropleft"/> <xref target="pixelcropright"/> <xref target="displaywidth"/> <xref target="displayheight"/> <xref target="displayunit"/> <xref target="aspectratiotype"/> <xref target="colourspace"/> <xref target="gammavalue"/> <xref target="framerate"/> <xref target="colour"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/Video</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Video settings.</c>
</texttable>
</section>

<section anchor="flaginterlaced" title="FlagInterlaced">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FlagInterlaced</ttcol>

<c>Element ID</c><c>0x9A</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/FlagInterlaced</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="fieldorder" title="FieldOrder">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FieldOrder</ttcol>

<c>Element ID</c><c>0x9D</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/FieldOrder</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="stereomode" title="StereoMode">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">StereoMode</ttcol>

<c>Element ID</c><c>0x53B8</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/StereoMode</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="alphamode" title="AlphaMode">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">AlphaMode</ttcol>

<c>Element ID</c><c>0x53C0</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/AlphaMode</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain Alpha data.</c>
</texttable>
</section>

<section anchor="oldstereomode" title="OldStereoMode">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">OldStereoMode</ttcol>

<c>Element ID</c><c>0x53B9</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-0 DEPRECATED</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/OldStereoMode</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes).</c>
</texttable>
</section>

<section anchor="pixelwidth" title="PixelWidth">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelWidth</ttcol>

<c>Element ID</c><c>0xB0</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelWidth</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Width of the encoded video frames in pixels.</c>
</texttable>
</section>

<section anchor="pixelheight" title="PixelHeight">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelHeight</ttcol>

<c>Element ID</c><c>0xBA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelHeight</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Height of the encoded video frames in pixels.</c>
</texttable>
</section>

<section anchor="pixelcropbottom" title="PixelCropBottom">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelCropBottom</ttcol>

<c>Element ID</c><c>0x54AA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelCropBottom</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The number of video pixels to remove at the bottom of the image (for HDTV content).</c>
</texttable>
</section>

<section anchor="pixelcroptop" title="PixelCropTop">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelCropTop</ttcol>

<c>Element ID</c><c>0x54BB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelCropTop</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The number of video pixels to remove at the top of the image.</c>
</texttable>
</section>

<section anchor="pixelcropleft" title="PixelCropLeft">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelCropLeft</ttcol>

<c>Element ID</c><c>0x54CC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelCropLeft</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The number of video pixels to remove on the left of the image.</c>
</texttable>
</section>

<section anchor="pixelcropright" title="PixelCropRight">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PixelCropRight</ttcol>

<c>Element ID</c><c>0x54DD</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/PixelCropRight</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The number of video pixels to remove on the right of the image.</c>
</texttable>
</section>

<section anchor="displaywidth" title="DisplayWidth">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DisplayWidth</ttcol>

<c>Element ID</c><c>0x54B0</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/DisplayWidth</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="displayheight" title="DisplayHeight">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DisplayHeight</ttcol>

<c>Element ID</c><c>0x54BA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/DisplayHeight</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="displayunit" title="DisplayUnit">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">DisplayUnit</ttcol>

<c>Element ID</c><c>0x54B2</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/DisplayUnit</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>How DisplayWidth &amp; DisplayHeight are interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio).</c>
</texttable>
</section>

<section anchor="aspectratiotype" title="AspectRatioType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">AspectRatioType</ttcol>

<c>Element ID</c><c>0x54B3</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/AspectRatioType</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed).</c>
</texttable>
</section>

<section anchor="colourspace" title="ColourSpace">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ColourSpace</ttcol>

<c>Element ID</c><c>0x2EB524</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/ColourSpace</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Same value as in AVI (32 bits).</c>
</texttable>
</section>

<section anchor="gammavalue" title="GammaValue">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">GammaValue</ttcol>

<c>Element ID</c><c>0x2FB523</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/GammaValue</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Gamma Value.</c>
</texttable>
</section>

<section anchor="framerate" title="FrameRate">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FrameRate</ttcol>

<c>Element ID</c><c>0x2383E3</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/FrameRate</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Number of frames per second. Informational only.</c>
</texttable>
</section>

<section anchor="colour" title="Colour">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Colour</ttcol>

<c>Element ID</c><c>0x55B0</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="video"/></c>
<c>Child Elements</c><c><xref target="matrixcoefficients"/> <xref target="bitsperchannel"/> <xref target="chromasubsamplinghorz"/> <xref target="chromasubsamplingvert"/> <xref target="cbsubsamplinghorz"/> <xref target="cbsubsamplingvert"/> <xref target="chromasitinghorz"/> <xref target="chromasitingvert"/> <xref target="range"/> <xref target="transfercharacteristics"/> <xref target="primaries"/> <xref target="maxcll"/> <xref target="maxfall"/> <xref target="masteringmetadata"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/Colour</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Settings describing the colour format.</c>
</texttable>
</section>

<section anchor="matrixcoefficients" title="MatrixCoefficients">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MatrixCoefficients</ttcol>

<c>Element ID</c><c>0x55B1</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/MatrixCoefficients</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="bitsperchannel" title="BitsPerChannel">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BitsPerChannel</ttcol>

<c>Element ID</c><c>0x55B2</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/BitsPerChannel</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified.</c>
</texttable>
</section>

<section anchor="chromasubsamplinghorz" title="ChromaSubsamplingHorz">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChromaSubsamplingHorz</ttcol>

<c>Element ID</c><c>0x55B3</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/ChromaSubsamplingHorz</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="chromasubsamplingvert" title="ChromaSubsamplingVert">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChromaSubsamplingVert</ttcol>

<c>Element ID</c><c>0x55B4</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/ChromaSubsamplingVert</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="cbsubsamplinghorz" title="CbSubsamplingHorz">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CbSubsamplingHorz</ttcol>

<c>Element ID</c><c>0x55B5</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/CbSubsamplingHorz</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="cbsubsamplingvert" title="CbSubsamplingVert">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CbSubsamplingVert</ttcol>

<c>Element ID</c><c>0x55B6</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/CbSubsamplingVert</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The amount of pixels to remove in the Cb channel for every pixel not removed vertically. This is additive with ChromaSubsamplingVert.</c>
</texttable>
</section>

<section anchor="chromasitinghorz" title="ChromaSitingHorz">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChromaSitingHorz</ttcol>

<c>Element ID</c><c>0x55B7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/ChromaSitingHorz</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>How chroma is subsampled horizontally. (0: Unspecified, 1: Left Collocated, 2: Half)</c>
</texttable>
</section>

<section anchor="chromasitingvert" title="ChromaSitingVert">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChromaSitingVert</ttcol>

<c>Element ID</c><c>0x55B8</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/ChromaSitingVert</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>How chroma is subsampled vertically. (0: Unspecified, 1: Top Collocated, 2: Half)</c>
</texttable>
</section>

<section anchor="range" title="Range">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Range</ttcol>

<c>Element ID</c><c>0x55B9</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/Range</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Clipping of the color ranges. (0: Unspecified, 1: Broadcast Range, 2: Full range (no clipping), 3: Defined by MatrixCoefficients/TransferCharacteristics)</c>
</texttable>
</section>

<section anchor="transfercharacteristics" title="TransferCharacteristics">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TransferCharacteristics</ttcol>

<c>Element ID</c><c>0x55BA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/TransferCharacteristics</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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))</c>
</texttable>
</section>

<section anchor="primaries" title="Primaries">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Primaries</ttcol>

<c>Element ID</c><c>0x55BB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/Primaries</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="maxcll" title="MaxCLL">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MaxCLL</ttcol>

<c>Element ID</c><c>0x55BC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/MaxCLL</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Maximum brightness of a single pixel (Maximum Content Light Level) in candelas per square meter (cd/m²).</c>
</texttable>
</section>

<section anchor="maxfall" title="MaxFALL">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MaxFALL</ttcol>

<c>Element ID</c><c>0x55BD</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/MaxFALL</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Maximum brightness of a single full frame (Maximum Frame-Average Light Level) in candelas per square meter (cd/m²).</c>
</texttable>
</section>

<section anchor="masteringmetadata" title="MasteringMetadata">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">MasteringMetadata</ttcol>

<c>Element ID</c><c>0x55D0</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="colour"/></c>
<c>Child Elements</c><c><xref target="primaryrchromaticityx"/> <xref target="primaryrchromaticityy"/> <xref target="primarygchromaticityx"/> <xref target="primarygchromaticityy"/> <xref target="primarybchromaticityx"/> <xref target="primarybchromaticityy"/> <xref target="whitepointchromaticityx"/> <xref target="whitepointchromaticityy"/> <xref target="luminancemax"/> <xref target="luminancemin"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/MasteringMetadata</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>SMPTE 2086 mastering data.</c>
</texttable>
</section>

<section anchor="primaryrchromaticityx" title="PrimaryRChromaticityX">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryRChromaticityX</ttcol>

<c>Element ID</c><c>0x55D1</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryRChromaticityX</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Red X chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="primaryrchromaticityy" title="PrimaryRChromaticityY">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryRChromaticityY</ttcol>

<c>Element ID</c><c>0x55D2</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryRChromaticityY</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Red Y chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="primarygchromaticityx" title="PrimaryGChromaticityX">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryGChromaticityX</ttcol>

<c>Element ID</c><c>0x55D3</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryGChromaticityX</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Green X chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="primarygchromaticityy" title="PrimaryGChromaticityY">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryGChromaticityY</ttcol>

<c>Element ID</c><c>0x55D4</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryGChromaticityY</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Green Y chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="primarybchromaticityx" title="PrimaryBChromaticityX">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryBChromaticityX</ttcol>

<c>Element ID</c><c>0x55D5</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryBChromaticityX</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Blue X chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="primarybchromaticityy" title="PrimaryBChromaticityY">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">PrimaryBChromaticityY</ttcol>

<c>Element ID</c><c>0x55D6</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/PrimaryBChromaticityY</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Blue Y chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="whitepointchromaticityx" title="WhitePointChromaticityX">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">WhitePointChromaticityX</ttcol>

<c>Element ID</c><c>0x55D7</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/WhitePointChromaticityX</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>White X chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="whitepointchromaticityy" title="WhitePointChromaticityY">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">WhitePointChromaticityY</ttcol>

<c>Element ID</c><c>0x55D8</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/WhitePointChromaticityY</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>White Y chromaticity coordinate as defined by CIE 1931.</c>
</texttable>
</section>

<section anchor="luminancemax" title="LuminanceMax">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">LuminanceMax</ttcol>

<c>Element ID</c><c>0x55D9</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/LuminanceMax</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Maximum luminance. Represented in candelas per square meter (cd/m²).</c>
</texttable>
</section>

<section anchor="luminancemin" title="LuminanceMin">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">LuminanceMin</ttcol>

<c>Element ID</c><c>0x55DA</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="masteringmetadata"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="video"/>/<xref target="colour"/>/<xref target="masteringmetadata"/>/LuminanceMin</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Mininum luminance. Represented in candelas per square meter (cd/m²).</c>
</texttable>
</section>

<section anchor="audio" title="Audio">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Audio</ttcol>

<c>Element ID</c><c>0xE1</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c><xref target="samplingfrequency"/> <xref target="outputsamplingfrequency"/> <xref target="channels"/> <xref target="channelpositions"/> <xref target="bitdepth"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/Audio</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Audio settings.</c>
</texttable>
</section>

<section anchor="samplingfrequency" title="SamplingFrequency">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SamplingFrequency</ttcol>

<c>Element ID</c><c>0xB5</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="audio"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="audio"/>/SamplingFrequency</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Sampling frequency in Hz.</c>
</texttable>
</section>

<section anchor="outputsamplingfrequency" title="OutputSamplingFrequency">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">OutputSamplingFrequency</ttcol>

<c>Element ID</c><c>0x78B5</c>
<c>Element Type</c><c>float</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="audio"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="audio"/>/OutputSamplingFrequency</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Real output sampling frequency in Hz (used for SBR techniques).</c>
</texttable>
</section>

<section anchor="channels" title="Channels">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Channels</ttcol>

<c>Element ID</c><c>0x9F</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="audio"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="audio"/>/Channels</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Numbers of channels in the track.</c>
</texttable>
</section>

<section anchor="channelpositions" title="ChannelPositions">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChannelPositions</ttcol>

<c>Element ID</c><c>0x7D7B</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="audio"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="audio"/>/ChannelPositions</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Table of horizontal angles for each successive channel, see appendix.</c>
</texttable>
</section>

<section anchor="bitdepth" title="BitDepth">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">BitDepth</ttcol>

<c>Element ID</c><c>0x6264</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="audio"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="audio"/>/BitDepth</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Bits per sample, mostly used for PCM.</c>
</texttable>
</section>

<section anchor="trackoperation" title="TrackOperation">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackOperation</ttcol>

<c>Element ID</c><c>0xE2</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c><xref target="trackcombineplanes"/> <xref target="trackjoinblocks"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrackOperation</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject.</c>
</texttable>
</section>

<section anchor="trackcombineplanes" title="TrackCombinePlanes">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackCombinePlanes</ttcol>

<c>Element ID</c><c>0xE3</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackoperation"/></c>
<c>Child Elements</c><c><xref target="trackplane"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/TrackCombinePlanes</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains the list of all video plane tracks that need to be combined to create this 3D track</c>
</texttable>
</section>

<section anchor="trackplane" title="TrackPlane">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackPlane</ttcol>

<c>Element ID</c><c>0xE4</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackcombineplanes"/></c>
<c>Child Elements</c><c><xref target="trackplaneuid"/> <xref target="trackplanetype"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/<xref target="trackcombineplanes"/>/TrackPlane</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains a video plane track that need to be combined to create this 3D track</c>
</texttable>
</section>

<section anchor="trackplaneuid" title="TrackPlaneUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackPlaneUID</ttcol>

<c>Element ID</c><c>0xE5</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackplane"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/<xref target="trackcombineplanes"/>/<xref target="trackplane"/>/TrackPlaneUID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The trackUID number of the track representing the plane.</c>
</texttable>
</section>

<section anchor="trackplanetype" title="TrackPlaneType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackPlaneType</ttcol>

<c>Element ID</c><c>0xE6</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackplane"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/<xref target="trackcombineplanes"/>/<xref target="trackplane"/>/TrackPlaneType</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background).</c>
</texttable>
</section>

<section anchor="trackjoinblocks" title="TrackJoinBlocks">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackJoinBlocks</ttcol>

<c>Element ID</c><c>0xE9</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackoperation"/></c>
<c>Child Elements</c><c><xref target="trackjoinuid"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/TrackJoinBlocks</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains the list of all tracks whose Blocks need to be combined to create this virtual track</c>
</texttable>
</section>

<section anchor="trackjoinuid" title="TrackJoinUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrackJoinUID</ttcol>

<c>Element ID</c><c>0xED</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="trackjoinblocks"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="trackoperation"/>/<xref target="trackjoinblocks"/>/TrackJoinUID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The trackUID number of a track whose blocks are used to create this virtual track.</c>
</texttable>
</section>

<section anchor="tricktrackuid" title="TrickTrackUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrickTrackUID</ttcol>

<c>Element ID</c><c>0xC0</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrickTrackUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="tricktracksegmentuid" title="TrickTrackSegmentUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrickTrackSegmentUID</ttcol>

<c>Element ID</c><c>0xC1</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrickTrackSegmentUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="tricktrackflag" title="TrickTrackFlag">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrickTrackFlag</ttcol>

<c>Element ID</c><c>0xC6</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrickTrackFlag</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="trickmastertrackuid" title="TrickMasterTrackUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrickMasterTrackUID</ttcol>

<c>Element ID</c><c>0xC7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrickMasterTrackUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="trickmastertracksegmentuid" title="TrickMasterTrackSegmentUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TrickMasterTrackSegmentUID</ttcol>

<c>Element ID</c><c>0xC4</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/TrickMasterTrackSegmentUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX trick track extenstions</c>
</texttable>
</section>

<section anchor="contentencodings" title="ContentEncodings">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncodings</ttcol>

<c>Element ID</c><c>0x6D80</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="trackentry"/></c>
<c>Child Elements</c><c><xref target="contentencoding"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/ContentEncodings</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Settings for several content encoding mechanisms like compression or encryption.</c>
</texttable>
</section>

<section anchor="contentencoding" title="ContentEncoding">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncoding</ttcol>

<c>Element ID</c><c>0x6240</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencodings"/></c>
<c>Child Elements</c><c><xref target="contentencodingorder"/> <xref target="contentencodingscope"/> <xref target="contentencodingtype"/> <xref target="contentcompression"/> <xref target="contentencryption"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/ContentEncoding</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Settings for one content encoding like compression or encryption.</c>
</texttable>
</section>

<section anchor="contentencodingorder" title="ContentEncodingOrder">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncodingOrder</ttcol>

<c>Element ID</c><c>0x5031</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencoding"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/ContentEncodingOrder</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="contentencodingscope" title="ContentEncodingScope">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncodingScope</ttcol>

<c>Element ID</c><c>0x5032</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencoding"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/ContentEncodingScope</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="contentencodingtype" title="ContentEncodingType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncodingType</ttcol>

<c>Element ID</c><c>0x5033</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencoding"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/ContentEncodingType</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption</c>
</texttable>
</section>

<section anchor="contentcompression" title="ContentCompression">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentCompression</ttcol>

<c>Element ID</c><c>0x5034</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencoding"/></c>
<c>Child Elements</c><c><xref target="contentcompalgo"/> <xref target="contentcompsettings"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/ContentCompression</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="contentcompalgo" title="ContentCompAlgo">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentCompAlgo</ttcol>

<c>Element ID</c><c>0x4254</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentcompression"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentcompression"/>/ContentCompAlgo</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header Stripping</c>
</texttable>
</section>

<section anchor="contentcompsettings" title="ContentCompSettings">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentCompSettings</ttcol>

<c>Element ID</c><c>0x4255</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentcompression"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentcompression"/>/ContentCompSettings</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="contentencryption" title="ContentEncryption">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncryption</ttcol>

<c>Element ID</c><c>0x5035</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencoding"/></c>
<c>Child Elements</c><c><xref target="contentencalgo"/> <xref target="contentenckeyid"/> <xref target="contentsignature"/> <xref target="contentsigkeyid"/> <xref target="contentsigalgo"/> <xref target="contentsighashalgo"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/ContentEncryption</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Settings describing the encryption used. This Element MUST be present if the value of ContentEncodingType is 1 and absent otherwise.</c>
</texttable>
</section>

<section anchor="contentencalgo" title="ContentEncAlgo">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncAlgo</ttcol>

<c>Element ID</c><c>0x47E1</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentEncAlgo</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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</c>
</texttable>
</section>

<section anchor="contentenckeyid" title="ContentEncKeyID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentEncKeyID</ttcol>

<c>Element ID</c><c>0x47E2</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentEncKeyID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>For public key algorithms this is the ID of the public key the the data was encrypted with.</c>
</texttable>
</section>

<section anchor="contentsignature" title="ContentSignature">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentSignature</ttcol>

<c>Element ID</c><c>0x47E3</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentSignature</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A cryptographic signature of the contents.</c>
</texttable>
</section>

<section anchor="contentsigkeyid" title="ContentSigKeyID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentSigKeyID</ttcol>

<c>Element ID</c><c>0x47E4</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentSigKeyID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>This is the ID of the private key the data was signed with.</c>
</texttable>
</section>

<section anchor="contentsigalgo" title="ContentSigAlgo">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentSigAlgo</ttcol>

<c>Element ID</c><c>0x47E5</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentSigAlgo</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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</c>
</texttable>
</section>

<section anchor="contentsighashalgo" title="ContentSigHashAlgo">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ContentSigHashAlgo</ttcol>

<c>Element ID</c><c>0x47E6</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="contentencryption"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tracks"/>/<xref target="trackentry"/>/<xref target="contentencodings"/>/<xref target="contentencoding"/>/<xref target="contentencryption"/>/ContentSigHashAlgo</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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</c>
</texttable>
</section>

<section anchor="cues" title="Cues">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Cues</ttcol>

<c>Element ID</c><c>0x1C53BB6B</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="cuepoint"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Cues</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A Top-Level Element to speed seeking access. All entries are local to the Segment. This Element SHOULD be mandatory for non &quot;live&quot; streams.</c>
</texttable>
</section>

<section anchor="cuepoint" title="CuePoint">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CuePoint</ttcol>

<c>Element ID</c><c>0xBB</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cues"/></c>
<c>Child Elements</c><c><xref target="cuetime"/> <xref target="cuetrackpositions"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/CuePoint</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains all information relative to a seek point in the Segment.</c>
</texttable>
</section>

<section anchor="cuetime" title="CueTime">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueTime</ttcol>

<c>Element ID</c><c>0xB3</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuepoint"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/CueTime</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Absolute timestamp according to the Segment time base.</c>
</texttable>
</section>

<section anchor="cuetrackpositions" title="CueTrackPositions">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueTrackPositions</ttcol>

<c>Element ID</c><c>0xB7</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuepoint"/></c>
<c>Child Elements</c><c><xref target="cuetrack"/> <xref target="cueclusterposition"/> <xref target="cuerelativeposition"/> <xref target="cueduration"/> <xref target="cueblocknumber"/> <xref target="cuecodecstate"/> <xref target="cuereference"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/CueTrackPositions</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contain positions for different tracks corresponding to the timestamp.</c>
</texttable>
</section>

<section anchor="cuetrack" title="CueTrack">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueTrack</ttcol>

<c>Element ID</c><c>0xF7</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueTrack</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The track for which a position is given.</c>
</texttable>
</section>

<section anchor="cueclusterposition" title="CueClusterPosition">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueClusterPosition</ttcol>

<c>Element ID</c><c>0xF1</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueClusterPosition</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The position of the Cluster containing the associated Block.</c>
</texttable>
</section>

<section anchor="cuerelativeposition" title="CueRelativePosition">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueRelativePosition</ttcol>

<c>Element ID</c><c>0xF0</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueRelativePosition</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The relative position of the referenced block inside the cluster with 0 being the first possible position for an Element inside that cluster.</c>
</texttable>
</section>

<section anchor="cueduration" title="CueDuration">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueDuration</ttcol>

<c>Element ID</c><c>0xB2</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>4-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueDuration</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="cueblocknumber" title="CueBlockNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueBlockNumber</ttcol>

<c>Element ID</c><c>0x5378</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueBlockNumber</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Number of the Block in the specified Cluster.</c>
</texttable>
</section>

<section anchor="cuecodecstate" title="CueCodecState">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueCodecState</ttcol>

<c>Element ID</c><c>0xEA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueCodecState</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The position of the Codec State corresponding to this Cue Element. 0 means that the data is taken from the initial Track Entry.</c>
</texttable>
</section>

<section anchor="cuereference" title="CueReference">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueReference</ttcol>

<c>Element ID</c><c>0xDB</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="cuetrackpositions"/></c>
<c>Child Elements</c><c><xref target="cuereftime"/> <xref target="cuerefcluster"/> <xref target="cuerefnumber"/> <xref target="cuerefcodecstate"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/CueReference</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The Clusters containing the referenced Blocks.</c>
</texttable>
</section>

<section anchor="cuereftime" title="CueRefTime">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueRefTime</ttcol>

<c>Element ID</c><c>0x96</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>2-4</c>
<c>Parent Element</c><c><xref target="cuereference"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/<xref target="cuereference"/>/CueRefTime</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Timestamp of the referenced Block.</c>
</texttable>
</section>

<section anchor="cuerefcluster" title="CueRefCluster">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueRefCluster</ttcol>

<c>Element ID</c><c>0x97</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuereference"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/<xref target="cuereference"/>/CueRefCluster</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The Position of the Cluster containing the referenced Block.</c>
</texttable>
</section>

<section anchor="cuerefnumber" title="CueRefNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueRefNumber</ttcol>

<c>Element ID</c><c>0x535F</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuereference"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/<xref target="cuereference"/>/CueRefNumber</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Number of the referenced Block of Track X in the specified Cluster.</c>
</texttable>
</section>

<section anchor="cuerefcodecstate" title="CueRefCodecState">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">CueRefCodecState</ttcol>

<c>Element ID</c><c>0xEB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="cuereference"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="cues"/>/<xref target="cuepoint"/>/<xref target="cuetrackpositions"/>/<xref target="cuereference"/>/CueRefCodecState</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The position of the Codec State corresponding to this referenced Element. 0 means that the data is taken from the initial Track Entry.</c>
</texttable>
</section>

<section anchor="attachments" title="Attachments">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Attachments</ttcol>

<c>Element ID</c><c>0x1941A469</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="attachedfile"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Attachments</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contain attached files.</c>
</texttable>
</section>

<section anchor="attachedfile" title="AttachedFile">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">AttachedFile</ttcol>

<c>Element ID</c><c>0x61A7</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachments"/></c>
<c>Child Elements</c><c><xref target="filedescription"/> <xref target="filename"/> <xref target="filemimetype"/> <xref target="filedata"/> <xref target="fileuid"/> <xref target="filereferral"/> <xref target="fileusedstarttime"/> <xref target="fileusedendtime"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/AttachedFile</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>An attached file.</c>
</texttable>
</section>

<section anchor="filedescription" title="FileDescription">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileDescription</ttcol>

<c>Element ID</c><c>0x467E</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileDescription</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A human-friendly name for the attached file.</c>
</texttable>
</section>

<section anchor="filename" title="FileName">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileName</ttcol>

<c>Element ID</c><c>0x466E</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileName</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Filename of the attached file.</c>
</texttable>
</section>

<section anchor="filemimetype" title="FileMimeType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileMimeType</ttcol>

<c>Element ID</c><c>0x4660</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileMimeType</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>MIME type of the file.</c>
</texttable>
</section>

<section anchor="filedata" title="FileData">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileData</ttcol>

<c>Element ID</c><c>0x465C</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileData</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The data of the file.</c>
</texttable>
</section>

<section anchor="fileuid" title="FileUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileUID</ttcol>

<c>Element ID</c><c>0x46AE</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileUID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Unique ID representing the file, as random as possible.</c>
</texttable>
</section>

<section anchor="filereferral" title="FileReferral">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileReferral</ttcol>

<c>Element ID</c><c>0x4675</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileReferral</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A binary value that a track/codec can refer to when the attachment is needed.</c>
</texttable>
</section>

<section anchor="fileusedstarttime" title="FileUsedStartTime">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileUsedStartTime</ttcol>

<c>Element ID</c><c>0x4661</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileUsedStartTime</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX font extension</c>
</texttable>
</section>

<section anchor="fileusedendtime" title="FileUsedEndTime">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">FileUsedEndTime</ttcol>

<c>Element ID</c><c>0x4662</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="attachedfile"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="attachments"/>/<xref target="attachedfile"/>/FileUsedEndTime</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>DivX font extension</c>
</texttable>
</section>

<section anchor="chapters" title="Chapters">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Chapters</ttcol>

<c>Element ID</c><c>0x1043A770</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="editionentry"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Chapters</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.</c>
</texttable>
</section>

<section anchor="editionentry" title="EditionEntry">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EditionEntry</ttcol>

<c>Element ID</c><c>0x45B9</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapters"/></c>
<c>Child Elements</c><c><xref target="editionuid"/> <xref target="editionflaghidden"/> <xref target="editionflagdefault"/> <xref target="editionflagordered"/> <xref target="chapteratom"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/EditionEntry</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains all information about a Segment edition.</c>
</texttable>
</section>

<section anchor="editionuid" title="EditionUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EditionUID</ttcol>

<c>Element ID</c><c>0x45BC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="editionentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/EditionUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A unique ID to identify the edition. It's useful for tagging an edition.</c>
</texttable>
</section>

<section anchor="editionflaghidden" title="EditionFlagHidden">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EditionFlagHidden</ttcol>

<c>Element ID</c><c>0x45BD</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="editionentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/EditionFlagHidden</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="editionflagdefault" title="EditionFlagDefault">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EditionFlagDefault</ttcol>

<c>Element ID</c><c>0x45DB</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="editionentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/EditionFlagDefault</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>If a flag is set (1) the edition SHOULD be used as the default one. (1 bit)</c>
</texttable>
</section>

<section anchor="editionflagordered" title="EditionFlagOrdered">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">EditionFlagOrdered</ttcol>

<c>Element ID</c><c>0x45DD</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="editionentry"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/EditionFlagOrdered</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)</c>
</texttable>
</section>

<section anchor="chapteratom" title="ChapterAtom">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterAtom</ttcol>

<c>Element ID</c><c>0xB6</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="editionentry"/></c>
<c>Child Elements</c><c><xref target="chapteruid"/> <xref target="chapterstringuid"/> <xref target="chaptertimestart"/> <xref target="chaptertimeend"/> <xref target="chapterflaghidden"/> <xref target="chapterflagenabled"/> <xref target="chaptersegmentuid"/> <xref target="chaptersegmenteditionuid"/> <xref target="chapterphysicalequiv"/> <xref target="chaptertrack"/> <xref target="chapterdisplay"/> <xref target="chapprocess"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/ChapterAtom</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Recursive</c>
<c>Documentation</c><c>Contains the atom information to use as the chapter atom (apply to all tracks).</c>
</texttable>
</section>

<section anchor="chapteruid" title="ChapterUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterUID</ttcol>

<c>Element ID</c><c>0x73C4</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterUID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A unique ID to identify the Chapter.</c>
</texttable>
</section>

<section anchor="chapterstringuid" title="ChapterStringUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterStringUID</ttcol>

<c>Element ID</c><c>0x5654</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>3-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterStringUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage.</c>
</texttable>
</section>

<section anchor="chaptertimestart" title="ChapterTimeStart">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTimeStart</ttcol>

<c>Element ID</c><c>0x91</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterTimeStart</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Timestamp of the start of Chapter (not scaled).</c>
</texttable>
</section>

<section anchor="chaptertimeend" title="ChapterTimeEnd">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTimeEnd</ttcol>

<c>Element ID</c><c>0x92</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterTimeEnd</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Timestamp of the end of Chapter (timestamp excluded, not scaled).</c>
</texttable>
</section>

<section anchor="chapterflaghidden" title="ChapterFlagHidden">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterFlagHidden</ttcol>

<c>Element ID</c><c>0x98</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterFlagHidden</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="chapterflagenabled" title="ChapterFlagEnabled">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterFlagEnabled</ttcol>

<c>Element ID</c><c>0x4598</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterFlagEnabled</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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)</c>
</texttable>
</section>

<section anchor="chaptersegmentuid" title="ChapterSegmentUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterSegmentUID</ttcol>

<c>Element ID</c><c>0x6E67</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterSegmentUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The SegmentUID of another Segment to play during this chapter.</c>
</texttable>
</section>

<section anchor="chaptersegmenteditionuid" title="ChapterSegmentEditionUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterSegmentEditionUID</ttcol>

<c>Element ID</c><c>0x6EBC</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterSegmentEditionUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The EditionUID to play from the Segment linked in ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no Edition of the linked Segment is used.</c>
</texttable>
</section>

<section anchor="chapterphysicalequiv" title="ChapterPhysicalEquiv">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterPhysicalEquiv</ttcol>

<c>Element ID</c><c>0x63C3</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterPhysicalEquiv</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specify the physical equivalent of this ChapterAtom like &quot;DVD&quot; (60) or &quot;SIDE&quot; (50), see complete list of values.</c>
</texttable>
</section>

<section anchor="chaptertrack" title="ChapterTrack">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTrack</ttcol>

<c>Element ID</c><c>0x8F</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c><xref target="chaptertracknumber"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterTrack</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>List of tracks on which the chapter applies. If this Element is not present, all tracks apply</c>
</texttable>
</section>

<section anchor="chaptertracknumber" title="ChapterTrackNumber">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterTrackNumber</ttcol>

<c>Element ID</c><c>0x89</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chaptertrack"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chaptertrack"/>/ChapterTrackNumber</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="chapterdisplay" title="ChapterDisplay">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapterDisplay</ttcol>

<c>Element ID</c><c>0x80</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c><xref target="chapstring"/> <xref target="chaplanguage"/> <xref target="chapcountry"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapterDisplay</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains all possible strings to use for the chapter display.</c>
</texttable>
</section>

<section anchor="chapstring" title="ChapString">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapString</ttcol>

<c>Element ID</c><c>0x85</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapterdisplay"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapterdisplay"/>/ChapString</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains the string to use as the chapter atom.</c>
</texttable>
</section>

<section anchor="chaplanguage" title="ChapLanguage">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapLanguage</ttcol>

<c>Element ID</c><c>0x437C</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapterdisplay"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapterdisplay"/>/ChapLanguage</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The languages corresponding to the string, in the bibliographic ISO-639-2 form.</c>
</texttable>
</section>

<section anchor="chapcountry" title="ChapCountry">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapCountry</ttcol>

<c>Element ID</c><c>0x437E</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapterdisplay"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapterdisplay"/>/ChapCountry</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The countries corresponding to the string, same 2 octets as in Internet domains.</c>
</texttable>
</section>

<section anchor="chapprocess" title="ChapProcess">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcess</ttcol>

<c>Element ID</c><c>0x6944</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapteratom"/></c>
<c>Child Elements</c><c><xref target="chapprocesscodecid"/> <xref target="chapprocessprivate"/> <xref target="chapprocesscommand"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/ChapProcess</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains all the commands associated to the Atom.</c>
</texttable>
</section>

<section anchor="chapprocesscodecid" title="ChapProcessCodecID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcessCodecID</ttcol>

<c>Element ID</c><c>0x6955</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapprocess"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapprocess"/>/ChapProcessCodecID</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="chapprocessprivate" title="ChapProcessPrivate">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcessPrivate</ttcol>

<c>Element ID</c><c>0x450D</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapprocess"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapprocess"/>/ChapProcessPrivate</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the &quot;DVD level&quot; equivalent.</c>
</texttable>
</section>

<section anchor="chapprocesscommand" title="ChapProcessCommand">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcessCommand</ttcol>

<c>Element ID</c><c>0x6911</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapprocess"/></c>
<c>Child Elements</c><c><xref target="chapprocesstime"/> <xref target="chapprocessdata"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapprocess"/>/ChapProcessCommand</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contains all the commands associated to the Atom.</c>
</texttable>
</section>

<section anchor="chapprocesstime" title="ChapProcessTime">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcessTime</ttcol>

<c>Element ID</c><c>0x6922</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapprocesscommand"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapprocess"/>/<xref target="chapprocesscommand"/>/ChapProcessTime</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Defines when the process command SHOULD be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter).</c>
</texttable>
</section>

<section anchor="chapprocessdata" title="ChapProcessData">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">ChapProcessData</ttcol>

<c>Element ID</c><c>0x6933</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="chapprocesscommand"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="chapters"/>/<xref target="editionentry"/>/<xref target="chapteratom"/>/<xref target="chapprocess"/>/<xref target="chapprocesscommand"/>/ChapProcessData</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="tags" title="Tags">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Tags</ttcol>

<c>Element ID</c><c>0x1254C367</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="segment"/></c>
<c>Child Elements</c><c><xref target="tag"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/Tags</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Element containing Elements specific to Tracks/Chapters. A list of valid tags can be found here.</c>
</texttable>
</section>

<section anchor="tag" title="Tag">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Tag</ttcol>

<c>Element ID</c><c>0x7373</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tags"/></c>
<c>Child Elements</c><c><xref target="targets"/> <xref target="simpletag"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/Tag</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Element containing Elements specific to Tracks/Chapters.</c>
</texttable>
</section>

<section anchor="targets" title="Targets">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">Targets</ttcol>

<c>Element ID</c><c>0x63C0</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tag"/></c>
<c>Child Elements</c><c><xref target="targettypevalue"/> <xref target="targettype"/> <xref target="tagtrackuid"/> <xref target="tageditionuid"/> <xref target="tagchapteruid"/> <xref target="tagattachmentuid"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/Targets</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Contain all UIDs where the specified meta data apply. It is empty to describe everything in the Segment.</c>
</texttable>
</section>

<section anchor="targettypevalue" title="TargetTypeValue">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TargetTypeValue</ttcol>

<c>Element ID</c><c>0x68CA</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TargetTypeValue</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>A number to indicate the logical level of the target (see TargetType).</c>
</texttable>
</section>

<section anchor="targettype" title="TargetType">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TargetType</ttcol>

<c>Element ID</c><c>0x63CA</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TargetType</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>An informational string that can be used to display the logical level of the target like &quot;ALBUM&quot;, &quot;TRACK&quot;, &quot;MOVIE&quot;, &quot;CHAPTER&quot;, etc (see TargetType).</c>
</texttable>
</section>

<section anchor="tagtrackuid" title="TagTrackUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagTrackUID</ttcol>

<c>Element ID</c><c>0x63C5</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TagTrackUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="tageditionuid" title="TagEditionUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagEditionUID</ttcol>

<c>Element ID</c><c>0x63C9</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TagEditionUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="tagchapteruid" title="TagChapterUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagChapterUID</ttcol>

<c>Element ID</c><c>0x63C4</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TagChapterUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="tagattachmentuid" title="TagAttachmentUID">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagAttachmentUID</ttcol>

<c>Element ID</c><c>0x63C6</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="targets"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="targets"/>/TagAttachmentUID</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>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.</c>
</texttable>
</section>

<section anchor="simpletag" title="SimpleTag">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">SimpleTag</ttcol>

<c>Element ID</c><c>0x67C8</c>
<c>Element Type</c><c>master</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="tag"/></c>
<c>Child Elements</c><c><xref target="tagname"/> <xref target="taglanguage"/> <xref target="tagdefault"/> <xref target="tagstring"/> <xref target="tagbinary"/></c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/SimpleTag</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Repeatable</c>
<c>Recursive</c><c>Recursive</c>
<c>Documentation</c><c>Contains general information about the target.</c>
</texttable>
</section>

<section anchor="tagname" title="TagName">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagName</ttcol>

<c>Element ID</c><c>0x45A3</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="simpletag"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="simpletag"/>/TagName</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The name of the Tag that is going to be stored.</c>
</texttable>
</section>

<section anchor="taglanguage" title="TagLanguage">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagLanguage</ttcol>

<c>Element ID</c><c>0x447A</c>
<c>Element Type</c><c>string</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="simpletag"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="simpletag"/>/TagLanguage</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Specifies the language of the tag specified, in the Matroska languages form.</c>
</texttable>
</section>

<section anchor="tagdefault" title="TagDefault">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagDefault</ttcol>

<c>Element ID</c><c>0x4484</c>
<c>Element Type</c><c>uinteger</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="simpletag"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="simpletag"/>/TagDefault</c>
<c>Mandatory</c><c>Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>Indication to know if this is the default/original language to use for the given tag. (1 bit)</c>
</texttable>
</section>

<section anchor="tagstring" title="TagString">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagString</ttcol>

<c>Element ID</c><c>0x4487</c>
<c>Element Type</c><c>utf-8</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="simpletag"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="simpletag"/>/TagString</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The value of the Tag.</c>
</texttable>
</section>

<section anchor="tagbinary" title="TagBinary">
<texttable>
<ttcol align="center">Element Name</ttcol>
<ttcol align="center">TagBinary</ttcol>

<c>Element ID</c><c>0x4485</c>
<c>Element Type</c><c>binary</c>
<c>Version</c><c>1-4</c>
<c>Parent Element</c><c><xref target="simpletag"/></c>
<c>Child Elements</c><c>None</c>
<c>Element Context</c><c>/<xref target="segment"/>/<xref target="tags"/>/<xref target="tag"/>/<xref target="simpletag"/>/TagBinary</c>
<c>Mandatory</c><c>Not Mandatory</c>
<c>Repeatability</c><c>Not Repeatable</c>
<c>Recursive</c><c>Not Recursive</c>
<c>Documentation</c><c>The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.</c>
</texttable>
<t>If you intend to implement a Matroska player, make sure you can handle all the files in <eref target="http://www.matroska.org/downloads/test_w1.html">our test suite</eref>, or at least the features presented there, not necessarily the same codecs.
</t>
</section>

<section anchor="beginning-of-file" title="Beginning of File">
<t>An EBML file always starts with 0x1A. The 0x1A makes the DOS command &quot;type&quot; 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.
</t>
<t>Next the EBML header is stored. This allows the the parser to know what type of EBML file it is parsing.
</t>
</section>

<section anchor="block-timecodes" title="Block Timecodes">
<t>The Block's timecode is signed interger that represents the Raw Timecode relative to the <eref target="{{site.baseurl}}/index.html#Cluster">Cluster's</eref> <eref target="{{site.baseurl}}/index.html#Timecode">Timecode</eref>, multiplied by the TimecodeScale (see the <eref target="{{site.baseurl}}/notes.html#TimecodeScale">TimecodeScale notes</eref>).
</t>
<t>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.
</t>
<t>If a <eref target="{{site.baseurl}}/index.html#Cluster">Cluster's</eref> <eref target="{{site.baseurl}}/index.html#Timecode">Timecode</eref> is set to zero, it is possible to have Blocks with a negative Raw Timecode. Blocks with a negative Raw Timecode are not valid.
</t>
</section>

<section anchor="default-decoded-field-duration" title="Default decoded field duration">
<t>The <spanx style="verb">DefaultDecodedFieldDuration</spanx> 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.
</t>
<t>If the video sequence is signaled as interlaced, then the period between two successive fields at the output of the decoding process equals DefaultDecodedFieldDuration.
</t>
<t>For video sequences signaled as progressive it is twice the value of DefaultDecodedFieldDuration.
</t>
<t>These values are valid at the end of the decoding process before post-processing like deinterlacing or inverse telecine is applied.
</t>
<t>Examples:
</t>
<t>
<list style="symbols">
<t>Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns</t>
<t>PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns</t>
<t>N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns</t>
<t>hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 encoded interlaced fields per second)</t>
<t>soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 encoded interlaced fields per second, with &quot;repeat_first_field = 1&quot;)</t>
</list>
</t>
</section>

<section anchor="default-values" title="Default Values">
<t>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 <spanx style="verb">Language</spanx> in the scope of the <spanx style="verb">Track</spanx> element). If the <spanx style="verb">Parent Element</spanx> is not present or assumed, then the Element cannot be assumed.
</t>
</section>

<section anchor="drm" title="DRM">
<t>Digital Rights Management. See <eref target="{{site.baseurl}}/notes.html#Encryption">Encryption</eref>.
</t>
</section>

<section anchor="ebml-class" title="EBML Class">
<t>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.
</t>
</section>

<section anchor="encryption" title="Encryption">
<t>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.
</t>
<t>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.
</t>
<t>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.
</t>
<t>Encryption information is stored in the <spanx style="verb">ContentEncodings</spanx> Master-element under the <spanx style="verb">ContentEncryption</spanx> Element.
</t>
</section>

<section anchor="image-cropping" title="Image cropping">
<t>Thanks to the PixelCropXXX elements, it's possible to crop the image before being resized. That means the image size follows this path:
</t>
<t>PixelXXX (size of the coded image) -&gt; PixelCropXXX (size of the image to keep) -&gt; DisplayXXX (resized cropped image)
</t>
</section>

<section anchor="matroska-version-indicators" title="Matroska version indicators">
<t>The EBML Header each Matroska file starts with contains two version number fields that inform a reading application about what to expect. These are <spanx style="verb">DocTypeVersion</spanx> and <spanx style="verb">DocTypeReadVersion</spanx>.
</t>
<t><spanx style="verb">DocTypeVersion</spanx> 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 <spanx style="verb">DocTypeVersion</spanx> of at least 2 while a file containing <spanx style="verb">CueRelativePosition</spanx> Elements MUST have a <spanx style="verb">DocTypeVersion</spanx> of at least 4.
</t>
<t>The <spanx style="verb">DocTypeReadVersion</spanx> 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 <spanx style="verb">CueRelativePosition</spanx> (which is a version 4 Matroska Element) then <spanx style="verb">DocTypeReadVersion</spanx> SHOULD still be set to 2 and not 4 because evaluating <spanx style="verb">CueRelativePosition</spanx> is not REQUIRED for standard playback -- it only makes seeking more precise if used.
</t>
<t><spanx style="verb">DocTypeVersion</spanx> MUST always be equal to or greater than <spanx style="verb">DocTypeReadVersion</spanx>.
</t>
<t>A reading application supporting Matroska version <spanx style="verb">V</spanx> MUST NOT refuse to read an application with <spanx style="verb">DocReadTypeVersion</spanx> equal to or lower than <spanx style="verb">V</spanx> even if <spanx style="verb">DocTypeVersion</spanx> is greater than <spanx style="verb">V</spanx>. See also the note about <eref target="{{site.baseurl}}/notes.html#unknown-elements">Unknown Elements</eref>.
</t>
</section>

<section anchor="mime-types" title="Mime Types">
<t>There is no IETF endorsed MIME type for Matroska files. But you can use the ones we have defined on our web server:
</t>
<t>
<list style="symbols">
<t>.mka : Matroska audio <spanx style="verb">audio/x-matroska</spanx></t>
<t>.mkv : Matroska video <spanx style="verb">video/x-matroska</spanx></t>
<t>.mk3d : Matroska 3D video <spanx style="verb">video/x-matroska-3d</spanx></t>
</list>
</t>
</section>

<section anchor="octet" title="Octet">
<t>An Octet refers to a byte made of 8 bits.
</t>
</section>

<section anchor="overlay-track" title="Overlay Track">
<t>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.
</t>
</section>

<section anchor="position-references" title="Position References">
<t>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 <xref target="linked-segments"/> (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.
</t>
</section>

<section anchor="raw-timecode" title="Raw Timecode">
<t>The exact time of an object represented in nanoseconds. To find out a Block's Raw Timecode, you need the Block's timecode, the <eref target="{{site.baseurl}}/index.html#Cluster">Cluster's</eref> <eref target="{{site.baseurl}}/index.html#Timecode">Timecode</eref>, and the TimecodeScale. For calculation, please see the see the TimecodeScale notes.
</t>
</section>

<section anchor="linked-segments" title="Linked Segments">
<t>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 <spanx style="verb">SegmentUID</spanx>.
</t>

<section anchor="hard-linking" title="Hard Linking">
<t>Hard Linking (also called splitting) is the process of creating a Linked Segment by relating multiple Segments using the <spanx style="verb">PrevUID</spanx> and <spanx style="verb">NextUID</spanx> 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 <spanx style="verb">NextUID</spanx> and <spanx style="verb">PrevUID</spanx> MUST reference the respective <spanx style="verb">SegmentUID</spanx> values of the next and previous Segments. The first Segment of a Linked Segment MUST have a <spanx style="verb">NextUID</spanx> Element and MUST NOT have a <spanx style="verb">PrevUID</spanx> Element. The last Segment of a Linked Segment MUST have a <spanx style="verb">PrevUID</spanx> Element and MUST NOT have a <spanx style="verb">NextUID</spanx> Element. The middle Segments of a Linked Segment MUST have both a <spanx style="verb">NextUID</spanx> Element and a <spanx style="verb">PrevUID</spanx> Element.
</t>
<t>As an example four Segments MAY be Hard Linked as a Linked Segment through cross-referencing each other with <spanx style="verb">SegmentUID</spanx>, <spanx style="verb">PrevUID</spanx>, and <spanx style="verb">NextUID</spanx> as in this table.
</t>
<texttable>
<ttcol align="left">file name</ttcol>
<ttcol align="left">SegmentUID</ttcol>
<ttcol align="left">PrevUID</ttcol>
<ttcol align="left">NextUID</ttcol>

<c><spanx style="verb">start.mkv</spanx></c><c><spanx style="verb">71000c23cd31099853fbc94dd984a5dd</spanx></c><c>n/a</c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c>
<c><spanx style="verb">middle.mkv</spanx></c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c><c><spanx style="verb">71000c23cd31099853fbc94dd984a5dd</spanx></c><c><spanx style="verb">6c92285fa6d3e827b198d120ea3ac674</spanx></c>
<c><spanx style="verb">end.mkv</spanx></c><c><spanx style="verb">6c92285fa6d3e827b198d120ea3ac674</spanx></c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c><c>n/a</c>
</texttable>
</section>

<section anchor="soft-linking" title="Soft Linking">
<t>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 <spanx style="verb">Info</spanx> Element (such as <spanx style="verb">ChapterTranslate</spanx>) that can translate a value representing a Segment in the chapter codec and to the current <spanx style="verb">SegmentUID</spanx>. 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.
</t>
</section>

<section anchor="medium-linking" title="Medium Linking">
<t>WMedium Linking creates relationships between Segments using Ordered Chapters and the <spanx style="verb">ChapterSegmentUID</spanx> 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 <spanx style="verb">ChapterSegmentUID</spanx> 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.
</t>
<t>As an example a file named <spanx style="verb">intro.mkv</spanx> could have a <spanx style="verb">SegmentUID</spanx> of <spanx style="verb">0xb16a58609fc7e60653a60c984fc11ead</spanx>. Another file called <spanx style="verb">program.mkv</spanx> could use a Chapter Edition that contains two Ordered Chapters. The first chapter references the Segment of <spanx style="verb">intro.mkv</spanx> with the use of a <spanx style="verb">ChapterSegmentUID</spanx>, <spanx style="verb">ChapterSegmentEditionUID</spanx>, <spanx style="verb">ChapterTimeStart</spanx> and optionally a <spanx style="verb">ChapterTimeEnd</spanx> element. The second chapter references content within the Segment of <spanx style="verb">program.mkv</spanx>. A player SHOULD recognize the Linked Segment created by the use of <spanx style="verb">ChapterSegmentUID</spanx> in an enabled Edition and present the reference content of the two Segments together.
</t>
</section>
</section>

<section anchor="timecode-types" title="Timecode Types">
<t>
<list style="symbols">
<t>Absolute Timecode = Block+Cluster</t>
<t>Relative Timecode = Block</t>
<t>Scaled Timecode = Block+Cluster</t>
<t>Raw Timecode = (Block+Cluster)<spanx style="emph">TimecodeScale</spanx>TrackTimecodeScale</t>
</list>
</t>
</section>

<section anchor="timecodescale-1" title="TimecodeScale">
<t>The <eref target="{{site.baseurl}}/index.html#TimecodeScale">TimecodeScale</eref> is used to calculate the Raw Timecode of a Block. The timecode is obtained by adding the Block's timecode to the <eref target="{{site.baseurl}}/index.html#Cluster">Cluster's</eref> <eref target="{{site.baseurl}}/index.html#Timecode">Timecode</eref>, 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:
</t>

<figure align="center"><artwork align="center">
(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)
</artwork></figure>
<t>An example of this is, assume a <eref target="{{site.baseurl}}/index.html#Cluster">Cluster's</eref> <eref target="{{site.baseurl}}/index.html#Timecode">Timecode</eref> has a value of 564264, the Block has a Timecode of 1233, and the timecodescale is the default of 1000000.
</t>

<figure align="center"><artwork align="center">
(1233 + 564264) * 1000000 = 565497000000
</artwork></figure>
<t>So, the Block in this example has a specific time of 565497000000 in nanoseconds. In milliseconds this would be 565497ms.
</t>
</section>

<section anchor="timecodescale-rounding" title="TimecodeScale Rounding">
<t>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.
</t>
<t>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.
</t>
<t>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.
</t>
<t>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.
</t>
<t>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 <spanx style="verb">RawTimecode = round(1000000000 * sample_number / sample_rate)</spanx>. 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 <spanx style="verb">RawTimecode = round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 1186848073</spanx>.
</t>
<t>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: <spanx style="verb">AbsoluteTimecode = round(RawTimecode / TimecodeScale_facotr)</spanx> which will result in the following for our example: <spanx style="verb">AbsoluteTimecode = round(1186848073 / 22675) = round(52341.7011245866) = 52342</spanx>. This number is the one the application has to write to the file.
</t>
<t>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?
</t>
<t>First it has to calculate the Raw Timecode of the block it has just read. Here's no rounding involved, just an integer multiplication: <spanx style="verb">RawTimecode = AbsoluteTimecode * TimecodeScale_factor</spanx>. In our example: <spanx style="verb">RawTimecode = 52342 * 22675 = 1186854850</spanx>.
</t>
<t>The conversion from the RawTimecode to the sample number again requires rounding: <spanx style="verb">sample_number = round(RawTimecode * sample_rate / 1000000000)</spanx>. In our example: <spanx style="verb">sample_number = round(1186854850 * 44100 / 1000000000) = round(52340.298885) = 52340</spanx>. This is exactly the sample number that the previous program started with.
</t>
<t>Some general notes for a program:
</t>
<t>
<list style="numbers">
<t>Always calculate the timestamps / sample numbers with floating point numbers of at least 64bit precision (called 'double' in most modern programming languages). If you're calculating with integers then make sure they're 64bit long, too.</t>
<t>Always round if you divide. Always! If you don't you'll end up with situations in which you have a timecode in the Matroska file that does not correspond to the sample number that it started with. Using a slightly lower timecode scale factor can help here in that it removes the need for proper rounding in the conversion from sample number to Raw Timecode.</t>
</list>
</t>
<t>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.
</t>
</section>

<section anchor="track-flags" title="Track Flags">

<section anchor="default-flag" title="Default flag">
<t>The &quot;default track&quot; 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 &quot;default track&quot; flag is set to &quot;1&quot;. If no such track is found then the first track of this kind SHOULD be chosen.
</t>
<t>Only one track of a kind MAY have its &quot;default track&quot; flag set in a segment. If a track entry does not contain the &quot;default track&quot; flag element then its default value &quot;1&quot; is to be used.
</t>
</section>

<section anchor="forced-flag" title="Forced flag">
<t>The &quot;forced&quot; flag tells the playback application that it MUST display/play this track or another track of the same kind that also has its &quot;forced&quot; flag set. When there are multiple &quot;forced&quot; 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 &quot;forced&quot; flag may be use simultaneously with the &quot;forced&quot; track (like DVD subtitles for example).
</t>
</section>
</section>

<section anchor="tracktimecodescale-1" title="TrackTimecodeScale">
<t>The <eref target="{{site.baseurl}}/index.html#TrackTimeCodeScale">TrackTimecodeScale</eref> 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.
</t>
<t>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:
</t>

<figure align="center"><artwork align="center">
Track 1: Video
Track 2: NTSC Audio
Track 3: PAL Audio
</artwork></figure>
<t>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.
</t>
<t>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:
</t>

<figure align="center"><artwork align="center">
(25 / 24) = ~ 1.04166666666666666667
</artwork></figure>
<t>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 <eref target="{{site.baseurl}}/notes.html#raw-timecode">Raw Timecode</eref> in the order handed back from the encoder. The Raw Timecode of a Block from a track using TrackTimecodeScale is calculated using:
</t>
<t><spanx style="verb">(Block's Timecode + Cluster's Timecode) * TimecodeScale * TrackTimecodeScale</spanx>
</t>
<t>So, a Block from the PAL track above that had a <eref target="{{site.baseurl}}/notes.html#timecode-types">Scaled Timecode</eref> of 100 seconds would have a Raw Timecode of 104.66666667 seconds, and so would be stored in that part of the file.
</t>
<t>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.
</t>
<t>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.
</t>
<t>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.
</t>
</section>

<section anchor="unknown-elements" title="Unknown elements">
<t>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 <eref target="{{site.baseurl}}/notes.html#matroska-version-indicators-doctypeversion-and-doctypereadversion">version indicators</eref> that tell a reading application what to expect.
</t>
<t>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.
</t>
</section>

<section anchor="multiplanar-and-3d-videos" title="Multi-planar and 3D videos">
<t>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.
</t>
<t>For the single track variant, there is the <eref target="{{site.baseurl}}/index.html#StereoMode">StereoMode</eref> 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.
</t>
<t>There is also a &quot;packed&quot; 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).
</t>
<t>For separate tracks, Matroska needs to define exactly which track does what. <eref target="{{site.baseurl}}/index.html#TrackOperation">TrackOperation</eref> with <eref target="{{site.baseurl}}/index.html#TrackCombinePlanes">TrackCombinePlanes</eref> do that. For more details look at <eref target="{{site.baseurl}}/notes.html#track-operation">how TrackOperation works</eref>.
</t>
<t>The 3D support is still in infancy and may evolve to support more features.
</t>
<t>
<figure align="center"><artwork align="center">

</artwork></figure>
/index.html#StereoMode) used to be part of Matroska v2 but it didn't meet the requirement for multiple tracks. There was also a bug in libmatroska prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8. Readers may support these legacy files by checking Matroska v2 or 0x53B9. The olders values were 0: mono, 1: right eye, 2: left eye, 3: both eyes
</t>
</section>

<section anchor="track-operation" title="Track Operation">
<t><eref target="{{site.baseurl}}/index.html#TrackOperation">TrackOperation</eref> allows combining multiple tracks to make a virtual one. It uses 2 separate system to combine tracks. One to create a 3D &quot;composition&quot; (left/right/background planes) and one to simplify join 2 tracks together to make a single track.
</t>
<t>A track created with TrackOperation is a proper track with a UID and all its flags. However the codec ID is meaningless because each &quot;sub&quot; track needs to be decoded by its own decoder before the &quot;operation&quot; 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).
</t>
<t>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.
</t>
</section>

<section anchor="matroska-element-ordering-guidelines" title="Matroska Element Ordering Guidelines">
<t>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.
</t>

<section anchor="toplevel-elements" title="Top-Level Elements">
<t>A valid Matroska file requires only one Top-Level Element, the <spanx style="verb">Info</spanx> Element; however, to be playable Matroska MUST also contain at least one <spanx style="verb">Tracks</spanx> and <spanx style="verb">Cluster</spanx> Element. The first <spanx style="verb">Info</spanx> Element and the first <spanx style="verb">Tracks</spanx> Element MUST either be stored before the first <spanx style="verb">Cluster</spanx> Element or both be referenced by a <spanx style="verb">SeekHead</spanx> Element which occurs before the first <spanx style="verb">Cluster</spanx> Element.
</t>
<t>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 <spanx style="verb">SeekHead</spanx> Element(s) MUST be updated so that the <spanx style="verb">SeekHead</spanx> 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.
</t>
</section>

<section anchor="crc32" title="CRC-32">
<t>As noted by the EBML specification, if a <spanx style="verb">CRC-32</spanx> Element is used then the <spanx style="verb">CRC-32</spanx> Element MUST be the first ordered Element within its Parent Element. The Matroska specification recommends that <spanx style="verb">CRC-32</spanx> Elements SHOULD NOT be used as an immediate Child Element of the <spanx style="verb">Segment</spanx> Element; however all Top-Level Elements of an EBML Document SHOULD include a CRC-32 Element as a Child Element.
</t>
</section>

<section anchor="seekhead-1" title="SeekHead">
<t>If used, the first <spanx style="verb">SeekHead</spanx> Element SHOULD be the first non-<spanx style="verb">CRC-32</spanx> Child Element of the <spanx style="verb">Segment</spanx> Element. If a second <spanx style="verb">SeekHead</spanx> Element is used then the first <spanx style="verb">SeekHead</spanx> MUST reference the identity and position of the second <spanx style="verb">SeekHead</spanx>, the second <spanx style="verb">SeekHead</spanx> MUST only reference <spanx style="verb">Cluster</spanx> Elements and not any other Top-Level Element, and the second <spanx style="verb">SeekHead</spanx> MAY be stored in any order relative to the other Top-Level Elements. Whether one or two <spanx style="verb">SeekHead</spanx> Elements is used, the <spanx style="verb">SeekHead</spanx> Element(s) MUST reference the identify and position of all Top-Level Elements except for the first <spanx style="verb">SeekHead</spanx>.
</t>
<t>It is RECOMMENDED that the first <spanx style="verb">SeekHead</spanx> Element be followed by some padding (a <spanx style="verb">Void</spanx> Element) to allow for the <spanx style="verb">SeekHead</spanx> Element to be expanded to cover new Top-Level Elements that could be added to the Matroska file, such as <spanx style="verb">Tags</spanx>, <spanx style="verb">Chapters</spanx> and <spanx style="verb">Attachments</spanx> Elements.
</t>
</section>

<section anchor="cues-index" title="Cues (index)">
<t>The <spanx style="verb">Cues</spanx> Element is RECOMMENDED to optimize seeking access in Matroska. It is programmatically simpler to add the <spanx style="verb">Cues</spanx> Element after all of the <spanx style="verb">Cluster</spanx> Elements are written because this does not require a prediction of how much space to reserve before writing the <spanx style="verb">Cluster</spanx> Elements. On the other hand, storing the <spanx style="verb">Cues</spanx> Element before the <spanx style="verb">Clusters</spanx> can provide some seeking advantages.
</t>
</section>

<section anchor="info-1" title="Info">
<t>The first <spanx style="verb">Info</spanx> Element SHOULD occur before the first <spanx style="verb">Tracks</spanx> and first <spanx style="verb">Cluster</spanx> Element.
</t>
</section>

<section anchor="chapters-1" title="Chapters">
<t>The <spanx style="verb">Chapters</spanx> Element SHOULD be placed before the <spanx style="verb">Cluster</spanx> Element(s). The <spanx style="verb">Chapters</spanx> 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 <spanx style="verb">Chapters</spanx> Element SHOULD be placed before the first <spanx style="verb">Tracks</spanx> Element and after the first <spanx style="verb">Info</spanx> Element.
</t>
</section>

<section anchor="attachments-1" title="Attachments">
<t>The <spanx style="verb">Attachments</spanx> 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 <spanx style="verb">Attachments</spanx> Element MAY be placed before the first <spanx style="verb">Cluster</spanx> Element; however if the <spanx style="verb">Attachments</spanx> Element is likely to be edited, then it SHOULD be placed after the last <spanx style="verb">Cluster</spanx> Element.
</t>
</section>

<section anchor="tags-1" title="Tags">
<t>The <spanx style="verb">Tags</spanx> Element is the one that is most subject to changes after the file was originally created. So for easier editing the <spanx style="verb">Tags</spanx> Element SHOULD be placed at the end of the <spanx style="verb">Segment</spanx> Element, even after the <spanx style="verb">Attachments</spanx> Element. On the other hand, it is inconvenient to have to seek in the <spanx style="verb">Segment</spanx> for tags especially for network streams. So it's better if the <spanx style="verb">Tags</spanx> Element(s) are found early in the stream. When editing the <spanx style="verb">Tags</spanx> Element(s), the original <spanx style="verb">Tags</spanx> Element at the beginning can be <eref target="{{site.baseurl}}/index.html#Void">voided</eref> and a new one <eref target="{{site.baseurl}}/order_guidelines.html#tags-end">written right at the end</eref> of the <spanx style="verb">Segment</spanx> Element. The file size will only marginally change.
</t>
</section>

<section anchor="optimum-layout-from-a-muxer" title="Optimum layout from a muxer">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Tags</t>
<t>Clusters</t>
<t>Cues</t>
</list>
</t>
</section>

<section anchor="optimum-layout-after-editing-tags" title="Optimum layout after editing tags">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Void</t>
<t>Clusters</t>
<t>Cues</t>
<t>Tags</t>
</list>
</t>
</section>

<section anchor="optimum-layout-with-cues-at-the-front" title="Optimum layout with Cues at the front">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Tags</t>
<t>Cues</t>
<t>Clusters</t>
</list>
</t>
</section>

<section anchor="cluster-timecode" title="Cluster Timecode">
<t>As each <spanx style="verb">BlockGroup</spanx> and <spanx style="verb">SimpleBlock</spanx> of a <spanx style="verb">Cluster</spanx> Element needs the Cluster <spanx style="verb">Timecode</spanx>, the <spanx style="verb">Timecode</spanx> Element MUST occur as the first Child Element within the <spanx style="verb">Cluster</spanx> Element.
</t>
</section>
</section>

<section anchor="codecid-1" title="CodecID">
<t>As an additional resource to this page Haali has created a <eref target="http://haali.su/mkv/codecs.pdf">list of codec IDs in a PDF</eref>.
</t>
<t>For each TrackEntry inside <eref target="{{site.baseurl}}/index.html">matroska</eref>, there has to be a <eref target="{{site.baseurl}}/index.html#CodecID">CodecID</eref> 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 &quot;initialisation&quot; :
</t>
<t>
<list style="symbols">
<t>CodecPrivate in the TrackEntry</t>
<t>CodecState in the BlockGroup</t>
</list>
</t>
<t>Each of these elements contain the same kind of data. And these data depend on the codec used.
</t>
<t>Important Note:
</t>
<t>Please, when reading through this list, always keep in mind that the intention behind it is <spanx style="verb">NOT</spanx> to list all existing audio and video codecs, but more to list those codecs that are <spanx style="verb">currently supported</spanx> 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 <eref target="http://www.corecodec.com/modules.php?op=modload&amp;name=PNphpBB2&amp;file=viewtopic&amp;t=227">can be found on the CoreCodec forum</eref> (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).
</t>
<t>See
</t>
<t>| 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 <eref target="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_1rw2.asp">defined by Microsoft</eref>. 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. |
</t>
<t>| 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 <spanx style="verb">no</spanx> 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) |
</t>
<t>|
| 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 <eref target="http://forum.doom9.org/showthread.php?s=&amp;threadid=55773&amp;perpage=20&amp;pagenumber=2#post331855">Karl Lillevold on Doom9</eref>. The CodecPrivate element contains a &quot;real_video_props_t&quot; structure in Big Endian byte order as found in <eref target="https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/librmff.h">librmff</eref>. |
</t>
<t>| 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. |
</t>
<t>|
| 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 <spanx style="strong">after</spanx> the mandatory video descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read <eref target="http://developer.apple.com/documentation/quicktime/QTFF/qtff.pdf">Apple's PDF on QuickTime</eref>. |
</t>
<t>| 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:
</t>
<t>
<list style="symbols">
<t>Byte 1: number of distinct packets '<spanx style="verb">#p</spanx>' minus one inside the CodecPrivate block. This MUST be '2' for current (as of 2016-07-08) Theora headers.</t>
<t>Bytes 2..n: lengths of the first '<spanx style="verb">#p</spanx>' packets, coded in <eref target="{{site.baseurl}}/index.html#lacing">Xiph-style lacing</eref>. The length of the last packet is the length of the CodecPrivate block minus the lengths coded in these bytes minus one.</t>
<t>Bytes n+1..: The Theora identification header, followed by the commend header followed by the codec setup header. Those are described in the <eref target="http://www.theora.org/doc/Theora_I_spec.pdf">Theora specs</eref>.</t>
</list>
</t>
<t>|
| V_PRORES | Apple ProRes | The private data contains the fourcc as found in MP4 movies:
</t>
<t>
<list style="symbols">
<t>apch: ProRes 422 High Quality</t>
<t>apcn: ProRes 422 Standard Definition</t>
<t>apcs: ProRes 422 LT</t>
<t>apco: ProRes 422 Proxy</t>
<t>ap4h: ProRes 4444</t>
</list>
</t>
<t><eref target="http://wiki.multimedia.cx/index.php?title=Apple_ProRes#Frame_layout">this page for more technical details on ProRes</eref>
</t>
<t>|
| Audio |
| A_MPEG/L3 | MPEG Audio 1, 2, 2.5 Layer III |
</t>
<t>The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
</t>
<t>Corresponding ACM wFormatTag : 0x0055
</t>
<t>|
| A_MPEG/L2 | MPEG Audio 1, 2 Layer II |
</t>
<t>The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
</t>
<t>Corresponding ACM wFormatTag : 0x0050
</t>
<t>|
| A_MPEG/L1 | MPEG Audio 1, 2 Layer I |
</t>
<t>The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame.
</t>
<t>Corresponding ACM wFormatTag : 0x0050
</t>
<t>|
| A_PCM/INT/BIG | PCM Integer Big Endian |
</t>
<t>The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element
</t>
<t>Corresponding ACM wFormatTag : ???
</t>
<t>|
| A_PCM/INT/LIT | PCM Integer Little Endian |
</t>
<t>The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element
</t>
<t>Corresponding ACM wFormatTag : 0x0001
</t>
<t>|
| A_PCM/FLOAT/IEEE | Floating Point, IEEE compatible |
</t>
<t>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).
</t>
<t>Corresponding ACM wFormatTag : 0x0003
</t>
<t>|
| 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. |
|
</t>
<t>A_AC3
</t>
<t>A_AC3/BSID9
</t>
<t>A_AC3/BSID10
</t>
<t>| (Dolby™) AC3 |
</t>
<t>BSID &lt;= 8 !! The private data is void ??? Corresponding ACM wFormatTag : 0x2000 ; channel number have to be read from the corresponding audio element
</t>
<t>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
</t>
<t>|
| 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 <eref target="http://alac.macosforge.org/trac/browser/trunk/ALACMagicCookieDescription.txt">ALAC's official source code</eref>. |
</t>
<t>| 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 |
</t>
<t>| A_DTS/EXPRESS | Digital Theatre System Express | DTS Express (a.k.a. LBR) audio streams. The private data is void. Corresponding ACM wFormatTag : 0x2001 |
</t>
<t>| 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 |
</t>
<t>| 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 '<spanx style="verb">#p</spanx>' 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 '<spanx style="verb">#p</spanx>' packets, coded in <eref target="{{site.baseurl}}/index.html#lacing">Xiph-style lacing</eref>. 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 <eref target="http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html">Vorbis identification header</eref>, followed by the <eref target="http://www.xiph.org/ogg/vorbis/doc/v-comment.html">Vorbis comment header</eref> followed by the <eref target="http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html">codec setup header</eref>. |
</t>
<t>| A_FLAC | <eref target="http://flac.sourceforge.net/">FLAC (Free Lossless Audio Codec)</eref> | The private data contains all the header/metadata packets before the first data packet. These include the first header packet containing only the word <spanx style="verb">fLaC</spanx> 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 &quot;real_audio_v4_props_t&quot; or the &quot;real_audio_v5_props_t&quot; structure (differentiated by their &quot;version&quot; field; Big Endian byte order) as found in <eref target="https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/librmff.h">librmff</eref>. |
</t>
<t>| 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 |
</t>
<t>|
| A_MS/ACM | Microsoft(TM) Audio Codec Manager (ACM) | The private data contains the ACM structure WAVEFORMATEX including the extra private bytes, as <eref target="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/mmstr_625u.asp">defined by Microsoft</eref>. 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 |
</t>
<t>| 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. |
</t>
<t>|
| 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 <spanx style="strong">after</spanx> the mandatory sound descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read <eref target="http://developer.apple.com/documentation/quicktime/QTFF/qtff.pdf">Apple's PDF on QuickTime</eref>. |
</t>
<t>| 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. |
</t>
<t>A_QUICKTIME/QDMC | QDesign Music |
</t>
<t>| A_QUICKTIME/QDM2 | QDesign Music v2 |
</t>
<t>| A_TTA1 | <eref target="http://tausoft.org/">The True Audio</eref> lossles audio compressor | <eref target="http://tausoft.org/wiki/True_Audio_Codec_Format">TTA format description</eref>
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 |
</t>
<t>| A_WAVPACK4 | <eref target="http://www.wavpack.com/">WavPack</eref> lossles audio compressor | The Wavpack packets consist of a stripped header followed by the frame data. For multi-track (&gt; 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 <eref target="wavpack.html">WavPack muxing description</eref>. |
| Subtitle |
| S_TEXT/UTF8 | UTF-8 Plain Text | Basic text subtitles. For more information, please look at the <eref target="{{site.baseurl}}/subtitles.html">Subtitle specifications</eref>. |
| 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 <eref target="../subtitles/ssa.html">specs for SSA/ASS</eref>. |
| 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 <eref target="{{site.baseurl}}/subtitles.html">specs for SSA/ASS</eref>. |
| S_TEXT/USF | Universal Subtitle Format | This is mostly defined, but not typed out yet. It will first be available on the <eref target="{{site.baseurl}}/subtitles.html">USF specs page</eref>. |
| S_TEXT/WEBVTT | Web Video Text Tracks Format (WebVTT) | Advanced text subtitles. For more information about the storage please look at the <eref target="{{site.baseurl}}/subtitles.html">WebVTT in Matroska specifications</eref>. |
| 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 <spanx style="verb">alt:</spanx> or <spanx style="verb">langidx:</spanx>. The line beginning with <spanx style="verb">id:</spanx> 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 <spanx style="verb">CodecPrivate</spanx> 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 <eref target="http://wiki.xiph.org/index.php/OggKate#Matroska_mapping">Xiph wiki</eref>. As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets. |
| Buttons |
| B_VOBBTN | VobBtn Buttons | Based on <eref target="http://dvd.sourceforge.net/dvdinfo/pci_pkt.html">MPEG/VOB PCI packets</eref>. The file contains a header consisting of the string &quot;butonDVD&quot; followed by the width and height in pixels (16 bits integer each) and 4 reserved bytes. The rest is full <eref target="http://dvd.sourceforge.net/dvdinfo/pci_pkt.html">PCI packets</eref>. |
</t>
<t>To be supported later :
</t>
<t>'V_MSWMV'; Video, Microsoft Video
</t>
<t>'V_INDEO5'; Video, Indeo 5; transmuxed from AVI or created using VfW codec
</t>
<t>'V_MJPEG'; Video, MJpeg codec (lossy mode, general)
</t>
<t>'V_MJPEG2000'; Video, MJpeg 2000
</t>
<t>'V_MJPEG2000LL'; Video, MJpeg Lossless
</t>
<t>'V_DV'; Video, DV Video, type 1 (audio and video mixed)
</t>
<t>'V_TARKIN'; Video, Ogg Tarkin
</t>
<t>'V_ON2VP4'; Video, ON2, VP4
</t>
<t>'V_ON2VP5'; Video, ON2, VP5
</t>
<t>'V_3IVX'; Video, 3ivX (is D4 decoder downwards compatible?)
</t>
<t>'V_HUFFYUV'; Video, HuffYuv, lossless; auch als VfW möglich
</t>
<t>'V_COREYUV'; Video, CoreYuv, lossless; auch als VfW möglich
</t>
<t>'V_RUDUDU'; Nicola's Rududu Wavelet codec
</t>
<t>...... to be continued---
#Chapters
</t>

<section anchor="example-1--basic-chaptering" title="Example 1 : basic chaptering">
<t>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.
</t>
<t>
<list style="symbols">
<t>00000ms - 05000ms : Intro</t>
<t>05000ms - 25000ms : Before the crime</t>
<t>25000ms - 27500ms : The crime</t>
<t>27500ms - 38000ms : The killer arrested</t>
<t>38000ms - 43000ms : Credits</t>
</list>
</t>
<t>This would translate in the following matroska form :
</t>
<t>| 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 |
</t>
</section>

<section anchor="example-2--nested-chapters" title="Example 2 : nested chapters">
<t>In this example an (existing) album is split into different chapters, and one of them contain another splitting.
</t>

<section anchor="the-micronauts-bleep-to-bleep" title="The Micronauts &quot;Bleep To Bleep&quot;">
<t>
<list style="symbols">
<t>00:00 - 12:28 : Baby Wants To Bleep/Rock
<list style="symbols">
<t>00:00 - 04:38 : Baby wants to bleep (pt.1)</t>
<t>04:38 - 07:12 : Baby wants to rock</t>
<t>07:12 - 10:33 : Baby wants to bleep (pt.2)</t>
<t>10:33 - 12:28 : Baby wants to bleep (pt.3)</t>
</list></t>
<t>12:30 - 19:38 : Bleeper_O+2</t>
<t>19:40 - 22:20 : Baby wants to bleep (pt.4)</t>
<t>22:22 - 25:18 : Bleep to bleep</t>
<t>25:20 - 33:35 : Baby wants to bleep (k)</t>
<t>33:37 - 44:28 : Bleeper</t>
</list>
</t>
<t>| 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 |
</t>
</section>
</section>

<section anchor="edition-and-chapter-flags" title="Edition and chapter flags">

<section anchor="chapter-flags" title="Chapter flags">
<t>There are two important flags that apply to chapter atoms: <spanx style="emph">enabled</spanx> and <spanx style="emph">hidden</spanx>. The effect of those flags always applies to child atoms of an atom affected by that flag.
</t>
<t>For example: Let's assume a parent atom with flag <spanx style="emph">hidden</spanx> set to <spanx style="emph">true</spanx>; that parent contains two child atom, the first with <spanx style="emph">hidden</spanx> set to <spanx style="emph">true</spanx> as well and the second child with the flag either set to <spanx style="emph">false</spanx> or not present at all (in which case the default value applies, and that again is <spanx style="emph">false</spanx>).
</t>
<t>As the parent is hidden all of its children are initially hidden as well. However, when a control track toggles the parent's <spanx style="emph">hidden</spanx> flag to <spanx style="emph">false</spanx> 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 <spanx style="emph">false</spanx> by a control track.
</t>
<t>Corresponding behavior applies to the <spanx style="emph">enabled</spanx> flag.
</t>
</section>

<section anchor="edition-flags" title="Edition flags">
<t>The edition's <spanx style="emph">hidden</spanx> flag behaves much the same as the chapter's <spanx style="emph">hidden</spanx> flag: if an edition is hidden then none of its children SHALL be visible, no matter their own <spanx style="emph">hidden</spanx> flags. If the edition is toggled to being visible then the chapter atom's <spanx style="emph">hidden</spanx> flags decide whether or not the chapter is visible.
</t>
</section>
</section>

<section anchor="menu-features" title="Menu features">
<t>The menu features are handled like a <spanx style="emph">chapter codec</spanx>. That means each codec has a type, some private data and some data in the chapters.
</t>
<t>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).
</t>

<section anchor="matroska-script-0" title="Matroska Script (0)">
<t>This is the case when <eref target="{{site.baseurl}}/index.html#ChapProcessCodecID">ChapProcessCodecID</eref> = 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 &quot;;&quot;. You can also include comments at the end of lines with &quot;//&quot; or comment many lines using &quot;/* */&quot;. The scripts are stored in ChapProcessData. For the moment ChapProcessPrivate is not used.
</t>
<t>The one and only command existing for the moment is <spanx style="verb">GotoAndPlay( ChapterUID );</spanx>. 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.
</t>
</section>

<section anchor="dvd-menu-1" title="DVD menu (1)">
<t>This is the case when <eref target="{{site.baseurl}}/index.html#ChapProcessCodecID">ChapProcessCodecID</eref> = 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:
</t>
<t>| 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 | - |
</t>
<t>You can also recover wether a Segment is a Video Manager (VMG), Video Title Set (VTS) or Video Title Set Menu (VTSM) from the <eref target="{{site.baseurl}}/index.html#ChapterTranslateID">ChapterTranslateID</eref> element found in the Segment Info. This field uses 2 octets as follows:
</t>
<t>
<list style="numbers">
<t>Domain Type: 0 for VMG, the domain number for VTS and VTSM</t>
<t>Domain Value: 0 for VMG and VTSM, 1 for the VTS source.</t>
</list>
</t>
<t>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]
</t>
<t>The following octets of ChapProcessPrivate are as follows:
</t>
<t>| 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)] |
</t>
<t>If the level specified in ChapProcessPrivate is a PGC (0x20), there is an octet called the Playback Type, specifying the kind of PGC defined:
</t>
<t>
<list style="symbols">
<t>0x00: entry only/basic PGC</t>
<t>0x82: Title+Entry Menu (only found in the Video Manager domain)</t>
<t>0x83: Root Menu (only found in the VTSM domain)</t>
<t>0x84: Subpicture Menu (only found in the VTSM domain)</t>
<t>0x85: Audio Menu (only found in the VTSM domain)</t>
<t>0x86: Angle Menu (only found in the VTSM domain)</t>
<t>0x87: Chapter Menu (only found in the VTSM domain)</t>
</list>
</t>
<t>The next 4 following octets correspond to the <eref target="http://dvd.sourceforge.net/dvdinfo/uops.html">User Operation flags</eref> in the standard PGC. When a bit is set, the command SHOULD be disabled.
</t>
<t>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)].
</t>
<t>More information on the DVD commands and format on <eref target="http://www.dvd-replica.com/DVD/">DVD-replica</eref>, where we got most of the info about it. You can also get information on DVD from <eref target="http://dvd.sourceforge.net/dvdinfo/">the DVDinfo project</eref>.---
</t>
</section>
</section>
</section>

<section anchor="subtitles" title="Subtitles">
<t>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.
</t>
<t>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.
</t>
<t>Here is a list of pointers for storing subtitles in Matroska:
</t>
<t>
<list style="symbols">
<t>Any Matroska file containing only subtitles SHOULD use the extension &quot;.mks&quot;.</t>
<t>As a general rule of thumb for all codecs, information that is global to an entire stream SHOULD be stored in the CodecPrivate element.</t>
<t>Start and stop timecodes that are used in a timecodes native storage format SHOULD be removed when being placed in Matroska as they could interfere if the file is edited afterwards. Instead, the Blocks timecode and Duration SHOULD be used to say when the timecode is displayed.</t>
<t>Because a &quot;subtitle&quot; stream is actually just an overlay stream, anything with a transparency layer could be use, including video.</t>
</list>
</t>
</section>

<section anchor="images-subtitles" title="Images Subtitles">
<t>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.
</t>
<t>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.
</t>
<t>The .IFO file will not be used at all.
</t>
<t>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.
</t>
<t>The .IDX file is reformatted (see below) and placed in the CodecPrivate.
</t>
<t>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.
</t>
<t>Here is an example .IDX file:
</t>

<figure align="center"><artwork align="center">
  # 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 &lt;= hh)
  # mm/ss: minutes/seconds (0 &lt;= mm/ss &lt;= 59)
  # ms: milliseconds (0 &lt;= ms &lt;= 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
</artwork></figure>
<t>First, lines beginning with &quot;#&quot; are removed. These are comments to make text file editing easier, and as this is not a text file, they aren't needed.
</t>
<t>Next remove the &quot;langidx&quot; and &quot;id&quot; 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.
</t>
<t>Finally, the &quot;timestamp&quot; 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.
</t>
<t>Once all of these items are removed, the data to store in the CodecPrivate SHOULD look like this:
</t>

<figure align="center"><artwork align="center">
  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
</artwork></figure>
<t>There SHOULD also be two Blocks containing one image each with the timecodes &quot;00:00:01:101&quot; and &quot;00:00:08:708&quot;.
</t>
</section>

<section anchor="srt-subtitles" title="SRT Subtitles">
<t>SRT is perhaps the most basic of all subtitle formats.
</t>
<t>It consists of four parts, all in text..
</t>
<t>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.
</t>
<t>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.
</t>
<t>Here is an example SRT file:
</t>
<t>|
</t>
<t>1
00:02:17,440 --&gt; 00:02:20,375
Senator, we're making
our final approach into Coruscant.
</t>
<t>2
00:02:20,476 --&gt; 00:02:22,501
Very good, Lieutenant.
</t>
<t>|
</t>
<t>In this example, the text &quot;Senator, we're making our final approach into Coruscant.&quot; would be converted into UTF-8 and placed in the Block. The timecode of the block would be set to &quot;00:02:17,440&quot;. And the BlockDuration element would be set to &quot;00:00:02,935&quot;.
</t>
<t>The same is repeated for the next subtitle.
</t>
<t>Because there are no general settings for SRT, the CodecPrivate is left blank.
</t>
</section>

<section anchor="ssaass-subtitles" title="SSA/ASS Subtitles">
<t>SSA stands for Sub Station Alpha. It's the file format used by the popular subtitle editor, <eref target="http://wiki.multimedia.cx/index.php?title=SubStation_Alpha">SubStation Alpha</eref>. This format is widely used by fansubbers.
</t>
<t>It allows you to do some advanced display features, like positioning, karaoke, style managements...
</t>
<t>For detailed information on SSA/ASS, see the <eref target="http://moodub.free.fr/video/ass-specs.doc">SSA specs</eref>. 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.
</t>
<t>Like SRT, this format is text based with a particular syntax.
</t>
<t>A file consists of 4 or 5 parts, declared ala INI file (but it's not an INI !)
</t>
<t>The first, &quot;[Script Info]&quot; contains some information about the subtitle file, such as it's title, who created it, type of script and a very important one : &quot;PlayResY&quot;. 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.
</t>
<t>The second, &quot;[V4 Styles]&quot;, 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 ...
</t>
<t>For example this :
</t>
<t>|
</t>
<t>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
</t>
<t>|
</t>
<t>The third, &quot;[Events]&quot;, 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).
</t>
<t>|
</t>
<t>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.
</t>
<t>|
</t>
<t>&quot;[Pictures]&quot; or &quot;[Fonts]&quot; 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.
</t>
<t>Now, how are they stored in Matroska ?
</t>
<t>
<list style="symbols">
<t>All text is converted to UTF-8*   All the headers are stored in CodecPrivate ( Script Info and the Styles list)*   Start &amp; End field are used to set TimeStamp and the BlockDuration element. the data stored is :*   Events are stored in the Block in this order: ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text (Layer comes from ASS specs ... it's empty for SSA.) &quot;ReadOrder field is needed for the decoder to be able to reorder the streamed samples as they were placed originally in the file.&quot;</t>
</list>
</t>
<t>Here is an example of an SSA file.
</t>
<t>| [Script Info]
; This is a Sub Station Alpha v4 script.
; For Sub Station Alpha info and downloads,
; go to <eref target="http://www.eswat.demon.co.uk/">http://www.eswat.demon.co.uk/</eref>
; or email <eref target="mailto:kotus@eswat.demon.co.uk">kotus@eswat.demon.co.uk</eref>
Title: Wolf's rain 2
Original Script: Anime-spirit Ishin-francais
Original Translation: Coolman
Original Editing: Spikewolfwood
Original Timing: Lord<spanx style="emph">alucard
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</spanx>-_02<spanx style="emph">Wav.wav
Wav: 0, 120692,H:\team truc\WR</spanx>-_02.wav
Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav
LastWav: 3
Timer: 100,0000
</t>
<t>[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
</t>
<t>[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. |
</t>
<t>Here is what would be placed into the CodecPrivate element.
</t>
<t>| [Script Info]
; This is a Sub Station Alpha v4 script.
; For Sub Station Alpha info and downloads,
; go to <eref target="http://www.eswat.demon.co.uk/">http://www.eswat.demon.co.uk/</eref>
; or email <eref target="mailto:kotus@eswat.demon.co.uk">kotus@eswat.demon.co.uk</eref>
Title: Wolf's rain 2
Original Script: Anime-spirit Ishin-francais
Original Translation: Coolman
Original Editing: Spikewolfwood
Original Timing: Lord<spanx style="emph">alucard
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</spanx>-_02<spanx style="emph">Wav.wav
Wav: 0, 120692,H:\team truc\WR</spanx>-_02.wav
Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav
LastWav: 3
Timer: 100,0000
</t>
<t>[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 |
</t>
<t>And here are the two blocks that would be generated.
</t>
<t>Block's timecode: 00:02:40.650
BlockDuration: 00:00:01.140
</t>
<t>| 1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? |
</t>
<t>Block's timecode: 00:02:42.420
BlockDuration: 00:00:01.730
</t>
<t>| 2,,Wolf main,autre,0000,0000,0000,,Toujours rien. |
</t>
</section>

<section anchor="usf-subtitles" title="USF Subtitles">
<t>Under construction
</t>
</section>

<section anchor="webvtt" title="WebVTT">
<t>The &quot;Web Video Text Tracks Format&quot; (short: WebVTT) is developed by the <eref target="https://www.w3.org/">World Wide Web Consortium (W3C)</eref>. Its specifications are <eref target="https://w3c.github.io/webvtt/">freely available</eref>.
</t>
<t>The guiding principles for the storage of WebVTT in Matroska are:
</t>
<t>
<list style="symbols">
<t>Consistency: store data in a similar way to other subtitle codecs</t>
<t>Simplicity: making decoding and remuxing as easy as possible for existing infrastructures</t>
<t>Completeness: keeping as much data as possible from the original WebVTT file</t>
</list>
</t>

<section anchor="storage-of-webvtt-in-matroska" title="Storage of WebVTT in Matroska">

<section anchor="codecid-codec-identification" title="CodecID: codec identification">
<t>The CodecID to use is S_TEXT/WEBVTT.
</t>
</section>

<section anchor="codecprivate-storage-of-gloal-webvtt-blocks" title="CodecPrivate: storage of gloal WebVTT blocks">
<t>This element contains all global blocks before the first subtitle entry. This starts at the &quot;WEBVTT&quot; file identification marker but excludes the optional byte order mark.
</t>
</section>

<section anchor="storage-of-nonglobal-webvtt-blocks" title="Storage of non-global WebVTT blocks">
<t>Non-global WebVTT blocks (e.g. &quot;NOTE&quot;) 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).
</t>
</section>

<section anchor="storage-of-cues-in-matroska-blocks" title="Storage of Cues in Matroska blocks">
<t>Each WebVTT Cue Text is stored directly in the Matroska Block.
</t>
<t>A muxer MUST change all WebVTT Cue Timestamps present within the Cue Text to be relative to the Matroska Block's timestamp.
</t>
<t>The Cue's start timestamp is used as the Matroska Block's timestamp.
</t>
<t>The difference between the Cue's end timestamp and its start timestamp is used as the Matroska Block's duration.
</t>
</section>

<section anchor="blockadditions-storing-nonglobal-webvtt-blocks-cue-settings-lists-and-cue-identifiers" title="BlockAdditions: storing non-global WebVTT blocks, Cue Settings Lists and Cue identifiers">
<t>Each Matroska Block may be accompanied by one BlockAdditions element. Its format is as follows:
</t>
<t>
<list style="numbers">
<t>The first line contains the WebVTT Cue Text's optional Cue Settings List followed by one line feed character (U+0x000a). The Cue Settings List may be empty in which case the line consists of the line feed character only.</t>
<t>The second line contains the WebVTT Cue Text's optional Cue Identifier followed by one line feed character (U+0x000a). The line may be empty indicating that there was no Cue Identifier in the source file in which case the line consists of the line feed character only.</t>
<t>The third and all following lines contain all WebVTT Comment Blocks that precede the current WebVTT Cue Block. These may be absent.</t>
</list>
</t>
<t>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.
</t>
</section>
</section>

<section anchor="examples-of-transformation" title="Examples of transformation">
<t>Here's an example how a WebVTT is transformed.
</t>

<section anchor="example-webvtt-file" title="Example WebVTT file">
<t>Let's take the following example file:
</t>
</section>

<section anchor="codecprivate-1" title="CodecPrivate">
<t>The resulting CodecPrivate element will look like this:
</t>
</section>

<section anchor="storage-of-cue-1" title="Storage of Cue 1">
<t>Example Cue 1: timestamp 00:00:00.000, duration 00:00:10.000, Block's content:
</t>
<t>BlockAddition's content starts with one empty line as there's no Cue Settings List:
</t>
</section>

<section anchor="storage-of-cue-2" title="Storage of Cue 2">
<t>Example Cue 2: timestamp 00:00:25.000, duration 00:00:10.000, Block's content:
</t>
<t>BlockAddition's content starts with two empty lines as there's neither a Cue Settings List nor a Cue Identifier:
</t>
</section>

<section anchor="storage-of-cue-3" title="Storage of Cue 3">
<t>Example Cue 3: timestamp 00:01:03.000, duration 00:00:03.500, Block's content:
</t>
<t>BlockAddition's content ends with an empty line as there's no Cue Identifier and there were no WebVTT Comment blocks:
</t>
</section>

<section anchor="storage-of-cue-4" title="Storage of Cue 4">
<t>Example Cue 4: timestamp 00:03:10.000, duration 00:00:10.000, Block's content:
</t>
<t>Example entry 4: Entries can even include timestamps. For example:<eref target="00:00:05.000"/>This becomes visible five seconds after the first part.
</t>
<t>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.
</t>
</section>
</section>

<section anchor="storage-of-webvtt-in-matroska-vs-webm" title="Storage of WebVTT in Matroska vs. WebM">
<t>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 <eref target="http://www.webmproject.org/docs/container/">not support subtitles at all</eref>; the proposal suggests splitting the information across multiple tracks making demuxer's and remuxer's life very difficult.---
</t>
</section>
</section>

<section anchor="tagging" title="Tagging">
<t>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 <eref target="http://www.matroska.org/files/tags/matroskatags.dtd">following XML syntax is proposed</eref> <eref target="http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge.html#mkvmerge.tags">used in mkvmerge</eref>. Binary data SHOULD be stored using BASE64 encoding if it is being stored at authoring time.
</t>

<section anchor="why-official-tags-matter" title="Why official tags matter">
<t>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.
</t>
<t>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.
</t>
<t>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).
</t>
</section>

<section anchor="tag-translations" title="Tag translations">
<t>To be able to save tags from other systems to Matroska we need to translate them to our system. There is a translation table <eref target="othertagsystems/comparetable.html">on our site</eref>.
</t>
</section>

<section anchor="tag-formatting" title="Tag Formatting">
<t>
<list style="symbols">
<t>The TagName SHOULD always be written in all capital letters and contain no space.</t>
<t>The fields with dates SHOULD have the following format: YYYY-MM-DD
HH:MM:SS.MSS YYYY = Year, -MM = Month, -DD = Days, HH = Hours, :MM = Minutes,
:SS = Seconds, :MSS = Milliseconds. To store less accuracy, you remove items
starting from the right. To store only the year, you would use, &quot;2004&quot;.
To store a specific day such as May 1st, 2003, you would use &quot;2003-05-01&quot;.</t>
<t>Fields that require a Float SHOULD use the &quot;.&quot;
mark instead of the &quot;,&quot; mark. To display it differently for another
local, applications SHOULD support auto replacement on display. Also, a thousandths
separator SHOULD NOT be used.</t>
<t>For currency amounts, there SHOULD only be a numeric value in the Tag. Only
numbers, no letters or symbols other than &quot;.&quot;. For instance, you
would store &quot;15.59&quot; instead of &quot;$15.59USD&quot;.</t>
</list>
</t>
</section>

<section anchor="target-types" title="Target types">
<t>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.
</t>
<t>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 &amp; 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).
</t>
<t>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 &quot;&quot;).
</t>
<t>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.
</t>
<t>Here is an example of how these <spanx style="verb">organizational</spanx> 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.
</t>
</section>

<section anchor="official-tags" title="Official tags">
<t>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.
</t>
</section>

<section anchor="notes" title="Notes">
<t>
<list style="symbols">
<t>In the Target list, a logicial OR is applied on all tracks, a logicial OR is applied on all chapters. Then a logical AND is applied between the Tracks list and the Chapters list to know if an element belongs to this Target.</t>
</list>
</t>
<t>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.
</t>
<t>The pictures SHOULD only use the JPEG and PNG picture formats.
</t>
<t>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).
</t>
<t>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).
</t>
<t>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 &quot;big&quot; 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 &quot;small_&quot;, ie small_cover.(jpg/png). The landscape variant SHOULD be suffixed with &quot;_land&quot;, ie cover_land.jpg. The filenames are case sensitive and SHOULD all be lower case.
</t>
<t>
<list style="symbols">
<t>cover.jpg (portrait/square 600)</t>
<t>small_cover.png (portrait/square 120)</t>
<t>cover_land.png (landscape 600)</t>
<t>small_cover_land.jpg (landscape 120)</t>
</list>
</t>
<t>There is a <eref target="https://sourceforge.net/projects/matroska/files/test_files/cover_art.mkv/download">sample file</eref> available to test player compatibility or to demonstrate the use of cover art in Matroska files.---
</t>
</section>
</section>

<section anchor="matroska-streaming" title="Matroska Streaming">
<t>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.
</t>
<t>In the case of Matroska, there are mostly 2 different kinds of stream: file access and live streaming.
</t>
</section>

<section anchor="file-access" title="File Access">
<t>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 <eref target="{{site.baseurl}}/index.html">few guidelines</eref> 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).
</t>
<t>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.
</t>
</section>

<section anchor="live-streaming" title="Live Streaming">
<t>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.
</t>
<t>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 &quot;unknown&quot; 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).
</t>
<t>The Segment(s) being continuous, certain elements like Meta Seek, Cues, Chapters, Attachments MUST NOT be used in this context.
</t>
<t>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.
</t>
<t>In the context of a live radio or even web TV it is possible to &quot;Tag&quot; 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).
</t>
</section>

<section anchor="menu-specifications" title="Menu Specifications">
</section>

<section anchor="introduction-1" title="Introduction">
<t>This document is a <spanx style="emph">draft of the Menu system</spanx> that will be the default one in Matroska. As it will just be composed of a Control Track, it will be seen as a &quot;codec&quot; and could be replaced later by something else if needed.
</t>
<t>A menu is like what you see on DVDs, when you have some screens to select the audio format, subtitles or scene selection.
</t>
</section>

<section anchor="requirements" title="Requirements">
<t>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.
</t>
<t>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.
</t>

<section anchor="highlightshotspots" title="Highlights/Hotspots">
<t>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.
</t>
<t>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 <eref target="{{site.baseurl}}/chapters/menu.html#playback-features">Playback features</eref>)
</t>
<t>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).
</t>
<t>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.
</t>
<t>The format used for storing images SHOULD be extensible. For the moment we'll use PNG and BMP, both with alpha channel.
</t>
</section>

<section anchor="playback-features" title="Playback features">
<t>All the following features will be sent from the Control Track to the Player :
</t>
<t>
<list style="symbols">
<t>Jump to chapter (UID, prev, next, number)</t>
<t>Disable all tracks of a kind (audio, video, subtitle)</t>
<t>Enable track UID (the kind doesn't matter)</t>
<t>Define/Disable a highlight</t>
<t>Enable/Disable jumping</t>
<t>Enable/Disable track selection of a kind</t>
<t>Select Edition ID (see chapters)</t>
<t>Pause playback</t>
<t>Stop playback</t>
<t>Enable/Disable a Chapter UID</t>
<t>Hide/Unhide a Chapter UID</t>
</list>
</t>
<t>All the actions will be writen in a normal Matroska track, with a timecode. A &quot;Menu Frame&quot; SHOULD be able to contain more that one action/highlight for a given timecode. (to be determined, EBML format structure)
</t>
</section>

<section anchor="player-requirements" title="Player requirements">
<t>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.
</t>
</section>
</section>

<section anchor="working-graph" title="Working Graph">
</section>

<section anchor="ideas" title="Ideas">
</section>

<section anchor="data-structure" title="Data Structure">
<t>As a Matroska side project, the obvious choice for storing binary data is EBML.---
</t>
</section>

<section anchor="overhead" title="Overhead">
<t>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.
</t>
<t>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.
</t>

<section anchor="example-1--low-bitrate-audio" title="Example 1 - low bitrate audio">
<t>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.
</t>
<texttable>
<ttcol align="center">bitrate</ttcol>
<ttcol align="center">pkt size</ttcol>
<ttcol align="center">No lacing</ttcol>
<ttcol align="center">2 in lace</ttcol>
<ttcol align="center">3 in lace</ttcol>
<ttcol align="center">4 in lace</ttcol>
<ttcol align="center">5 in lace</ttcol>
<ttcol align="center">6 in lace</ttcol>
<ttcol align="center">7 in lace</ttcol>

<c>8kbps</c><c>100</c><c>1+1+4+0+100 (6%)</c><c>1+2+4+2+200 (4.5%)</c><c>1+2+4+3+300 (3.3%)</c><c>1+2+4+4+400 (2.8%)</c><c>1+2+4+5+500 (2.4%)</c><c>1+2+4+6+600 (2.2%)</c><c>1+2+4+7+700 (2%)</c>
<c>16kbps</c><c>200</c><c>1+2+4+0+200 (3.5%)</c><c>1+2+4+2+400 (2.3%)</c><c>1+2+4+3+600 (1.7%)</c><c>1+2+4+4+800 (1.4%)</c><c>1+2+4+5+1000 (1.2%)</c><c>1+2+4+6+1200 (1.1%)</c><c>1+2+4+7+1400 (1%)</c>
<c>24kbps</c><c>300</c><c>1+2+4+0+300 (2%)</c><c>1+2+4+3+600 (1.8%)</c><c>1+2+4+5+900 (1.3%)</c><c>1+2+4+7+1200 (1.2%)</c><c>1+2+4+9+1500 (1.1%)</c><c>1+2+4+11+1800 (1%)</c><c>1+2+4+13+2100 (0.95%)</c>
<c>32kbps</c><c>400</c><c>1+2+4+0+400 (1.8%)</c><c>1+2+4+3+800 (1.3%)</c><c>1+2+4+5+1200 (1%)</c><c>1+2+4+7+1600 (0.88%)</c><c>1+2+4+9+2000 (0.8%)</c><c>1+2+4+11+2400 (0.67%)</c><c>1+2+4+13+2800 (0.71%)</c>
<c>48kbps</c><c>600</c><c>1+2+4+0+600 (1%)</c><c>1+2+4+4+1200 (0.92%)</c><c>1+2+4+7+1800 (0.78%)</c><c>1+2+4+10+2400 (0.71%)</c><c>1+2+4+13+3000 (0.75%)</c><c>1+2+4+16+3600 (0.64%)</c><c>1+2+4+19+4200 (0.62%)</c>
<c>64kbps</c><c>800</c><c>1+2+4+0+800 (0.88%)</c><c>1+2+4+5+1600 (0.75%)</c><c>1+2+4+9+2400 (0.67%)</c><c>1+2+4+13+3200 (0.63%)</c><c>1+2+4+17+4000 (0.60%)</c><c>1+2+4+21+4800 (0.58%)</c><c>1+2+4+26+5600 (0.59%)</c>
</texttable>
<t><spanx style="strong">explanations :</spanx> 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).
</t>
<t>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
</t>
<t>the second number is the pourcentage of overhead for each packet
</t>
<t>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).
</t>
<texttable>
<ttcol align="center">1 Block per Cluster</ttcol>

<c>bitrate</c>
<c>---</c>
<c>8kbps</c>
<c>16kbps</c>
<c>24kbps</c>
<c>32kbps</c>
<c>48kbps</c>
<c>64kbps</c>
</texttable>
<texttable>
<ttcol align="center">2 Blocks per Cluster</ttcol>

<c>bitrate</c>
<c>---</c>
<c>8kbps</c>
<c>16kbps</c>
<c>24kbps</c>
<c>32kbps</c>
<c>48kbps</c>
<c>64kbps</c>
</texttable>
<texttable>
<ttcol align="center">3 Blocks per Cluster</ttcol>

<c>bitrate</c>
<c>---</c>
<c>8kbps</c>
<c>16kbps</c>
<c>24kbps</c>
<c>32kbps</c>
<c>48kbps</c>
<c>64kbps</c>
</texttable>
<t><spanx style="strong">explanations :</spanx> 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.
</t>

<section anchor="conclusions" title="Conclusions">
<t>
<list style="symbols">
<t>For the same error-recovery (1.2s, 2.4s) we clearly see that it's better to put as much data in one Block and use lacing. In this case there will be 1 Block per Cluster. One of the drawback is that only the first packet of data has a timecode (one timecode every second).</t>
<t>If we agree that 2% overhead is OK for low bitrates (the same as for MP3), the minimum bitrate acceptable is between 8kbps and 16kbps (probably closer to 16 kbps). Actually this value depend on the block size and not really the bitrate.</t>
<t>For bitrates higher than 48kbps (or a fixed packet rate of 600 bytes) the overhead is very good even with one frame per packet.</t>
</list>
</t>
</section>
</section>

<section anchor="example-2--medium-bitrate-audio" title="Example 2 - medium bitrate audio">
</section>

<section anchor="example-3--high-bitrate-audio" title="Example 3 - high bitrate audio">
</section>

<section anchor="example-4--low-bitrate-video" title="Example 4 - low bitrate video">
<t>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.
</t>
<t>One of the major difference in video is that the number of frame per second is fixed (10 to 30 for low bitrates).
</t>
<t>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.
</t>
<t>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.
</t>

<section anchor="first-example--all-i-frames-cbr" title="First example - all I frames (CBR)">
<t>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.
</t>
<t>Lacing SHOULD NOT be used for better seeking in the file. But it is still possible for use in this particular case.
</t>
<texttable>
<ttcol align="center">1 I frame/Block per Cluster (5ms)</ttcol>

<c>bitrate</c>
<c>---</c>
<c>64kbps</c>
<c>128kbps</c>
<c>256kbps</c>
</texttable>
<texttable>
<ttcol align="center">2 I frame/Block per Cluster (10ms)</ttcol>

<c>bitrate</c>
<c>---</c>
<c>64kbps</c>
<c>128kbps</c>
<c>256kbps</c>
</texttable>
<texttable>
<ttcol align="center">4 I frame/Block per Cluster (20ms)</ttcol>

<c>bitrate</c>
<c>---</c>
<c>64kbps</c>
<c>128kbps</c>
<c>256kbps</c>
</texttable>
<texttable>
<ttcol align="center">8 I frame/Block per Cluster (40ms)</ttcol>

<c>bitrate</c>
<c>---</c>
<c>64kbps</c>
<c>128kbps</c>
<c>256kbps</c>
</texttable>
<t>We clearly see that there is another more interresting table (lacing use is dropped) :
</t>
<texttable>
<ttcol align="center">bitrate</ttcol>
<ttcol align="center">pkt size</ttcol>
<ttcol align="center">1 Block/C (50ms)</ttcol>
<ttcol align="center">2 Blocks/C (100ms)</ttcol>
<ttcol align="center">4 Blocks/C (200ms)</ttcol>
<ttcol align="center">8 Blocks/C (400ms)</ttcol>
<ttcol align="center">16 Blocks/C (800ms)</ttcol>
<ttcol align="center">20 Blocks/C (1s)</ttcol>

<c>64kbps</c><c>400</c><c>4+2+1*(1+2+4+400) (3.3%)</c><c>4+2+2*(1+2+4+400) (2.5%)</c><c>4+2+4*(1+2+4+400) (2.1%)</c><c>4+2+8*(1+2+4+400) (1.9%)</c><c>4+2+16*(1+2+4+400) (1.8%)</c><c>4+2+20*(1+2+4+400) (1.8%)</c>
<c>128kbps</c><c>800</c><c>4+2+1*(1+2+4+800) (1.63%)</c><c>4+2+2*(1+2+4+800) (1.3%)</c><c>4+2+4*(1+2+4+800) (1.06%)</c><c>4+2+8*(1+2+4+800) (0.97%)</c><c>4+2+16*(1+2+4+800) (0.92%)</c><c>4+2+20*(1+2+4+800) (0.91%)</c>
<c>256kbps</c><c>1200</c><c>4+2+1*(1+2+4+1200) (1.08%)</c><c>4+2+2*(1+2+4+1200) (0.83%)</c><c>4+2+4*(1+2+4+1200) (1.06%)</c><c>4+2+8*(1+2+4+1200) (0.65%)</c><c>4+2+16*(1+2+4+1200) (0.61%)</c><c>4+2+20*(1+2+4+1200) (0.61%)</c>
</texttable>
<t><spanx style="strong">Conslusions :</spanx>
</t>
<t>
<list style="symbols">
<t>In most cases, the best result is when 8 Blocks are packed in a Cluster. Bigger values don't improve the overhead much. It also seems to be a good value to stop using lacing in the low audio bitrate example. <spanx style="strong">So both lacing and clustering will be limited to 8 elements in libmatroska</spanx> on writing.</t>
<t>In an agressive case like a 64kbps CBR video codec at 20 frames/sec can still achieve an overhead of less than 2% which is quite good.</t>
<t>Upper 128kbps an overhead of less than 1% can always be achieved.</t>
<t>Having 2 frames in a lace can improve substantially the overhead. But as I frames SHOULD always have a proper timecode, it is not possible to use this solution.</t>
</list>
</t>
</section>

<section anchor="second-example--1-i-frame-for-1-b-frame" title="Second example - 1 I frame for 1 B frame">
<t>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.
</t>
<t>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).
</t>
<texttable>
<ttcol align="center">bitrate</ttcol>
<ttcol align="center">pkt size</ttcol>
<ttcol align="center">2 Blocks/C (100ms)</ttcol>
<ttcol align="center">4 Blocks/C (200ms)</ttcol>
<ttcol align="center">8 Blocks/C (400ms)</ttcol>
<ttcol align="center">16 Blocks/C (800ms)</ttcol>
<ttcol align="center">20 Blocks/C (1s)</ttcol>

<c>64kbps</c><c>600/200</c><c>4+2+(1+2+4+600)+(1+2+4+200+1+1+2) (3%)</c><c>4+2+2*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.6%)</c><c>4+2+4*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.4%)</c><c>4+2+8*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.3%)</c><c>4+2+10*((1+2+4+600)+(1+2+4+200+1+1+2)) (2.3%)</c>
<c>128kbps</c><c>1200/400</c><c>4+2+(1+2+4+1200)+(1+2+4+400+1+1+2) (1.5%)</c><c>4+2+2*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.3%)</c><c>4+2+4*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.2%)</c><c>4+2+8*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.1%)</c><c>4+2+10*((1+2+4+1200)+(1+2+4+400+1+1+2)) (1.1%)</c>
<c>256kbps</c><c>1800/600</c><c>4+2+(1+2+4+1800)+(1+2+4+600+1+1+2) (1.01%)</c><c>4+2+2*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.88%)</c><c>4+2+4*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.81%)</c><c>4+2+8*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.78%)</c><c>4+2+10*((1+2+4+1800)+(1+2+4+600+1+1+2)) (0.78%)</c>
</texttable>
<t><spanx style="strong">Conclusions :</spanx>
</t>
<t>
<list style="symbols">
<t>As for the previous case, 8 Blocks per Cluster seem to be the optimum value.</t>
<t>The use of B frame degrades the overhead by approximately 0.5%. It is due to the additional backward reference.</t>
<t>A bitrate of over 128 kbps still have a good overhead. But the 2.4% for 64kbps is still acceptable.</t>
</list>
</t>
</section>
</section>

<section anchor="example-5--medium-bitrate-video" title="Example 5 - medium bitrate video">
</section>

<section anchor="example-6--high-bitrate-video" title="Example 6 - high bitrate video">
</section>

<section anchor="example-7--low-bitrate-video--low-bitrate-audio" title="Example 7 - low bitrate video + low bitrate audio">
</section>

<section anchor="example-8--medium-bitrate-video--medium-bitrate-audio" title="Example 8 - medium bitrate video + medium bitrate audio">
</section>

<section anchor="example-9--high-bitrate-video--high-bitrate-audio" title="Example 9 - high bitrate video + high bitrate audio">
</section>
</section>

</middle>
</rfc>
