rfc9559v1-BACKUP.txt   rfc9559.txt 
Internet Engineering Task Force (IETF) S. Lhomme Internet Engineering Task Force (IETF) S. Lhomme
Request for Comments: 9559 Request for Comments: 9559
Updates: 8794 M. Bunkus Updates: 8794 M. Bunkus
Category: Standards Track Category: Standards Track
ISSN: 2070-1721 D. Rice ISSN: 2070-1721 D. Rice
April 2024 May 2024
Matroska Media Container Format Specifications Matroska Media Container Format Specification
Abstract Abstract
This document defines the Matroska audiovisual data container This document defines the Matroska audiovisual data container
structure, including definitions of its structural elements, structure, including definitions of its structural elements,
terminology, vocabulary, and application. terminology, vocabulary, and application.
This document updates RFC 8794 to permit the use of a previously This document updates RFC 8794 to permit the use of a previously
reserved Extensible Binary Meta Language (EBML) Element ID. reserved Extensible Binary Meta Language (EBML) Element ID.
skipping to change at line 488 skipping to change at line 488
* Attachments (Section 21) * Attachments (Section 21)
* Tags (Section 6.8) * Tags (Section 6.8)
The SeekHead Element (also known as MetaSeek) contains an index of The SeekHead Element (also known as MetaSeek) contains an index of
Top-Level Elements locations within the Segment. Use of the SeekHead Top-Level Elements locations within the Segment. Use of the SeekHead
Element is RECOMMENDED. Without a SeekHead Element, a Matroska Element is RECOMMENDED. Without a SeekHead Element, a Matroska
parser would have to search the entire file to find all of the other parser would have to search the entire file to find all of the other
Top-Level Elements. This is due to Matroska's flexible ordering Top-Level Elements. This is due to Matroska's flexible ordering
requirements; for instance, it is acceptable for the Chapters Element requirements; for instance, it is acceptable for the Chapters Element
to be stored after the Cluster Element. to be stored after the Cluster Element(s).
+--------------------------------+ +--------------------------------+
| SeekHead | Seek | SeekID | | SeekHead | Seek | SeekID |
| | |--------------| | | |--------------|
| | | SeekPosition | | | | SeekPosition |
+--------------------------------+ +--------------------------------+
Figure 2: Representation of a SeekHead Element Figure 2: Representation of a SeekHead Element
The Info Element contains vital information for identifying the whole The Info Element contains vital information for identifying the whole
skipping to change at line 543 skipping to change at line 543
Figure 3: Representation of an Info Element and Its Child Elements Figure 3: Representation of an Info Element and Its Child Elements
The Tracks Element defines the technical details for each track and The Tracks Element defines the technical details for each track and
can store the name, number, UID, language, and type (audio, video, can store the name, number, UID, language, and type (audio, video,
subtitles, etc.) of each track. For example, the Tracks Element MAY subtitles, etc.) of each track. For example, the Tracks Element MAY
store information about the resolution of a video track or sample store information about the resolution of a video track or sample
rate of an audio track. rate of an audio track.
The Tracks Element MUST identify all the data needed by the codec to The Tracks Element MUST identify all the data needed by the codec to
decode the data of the specified track. However, the data required decode the data of the specified track. However, the data required
is contingent on the codec used for the track. For example, a Track is contingent on the codec used for the track. For example, a Tracks
Element for uncompressed audio only requires the audio bit rate to be Element for uncompressed audio only requires the audio bit rate to be
present. A codec such as AC-3 would require that the CodecID Element present. A codec such as AC-3 would require that the CodecID Element
be present for all tracks, as it is the primary way to identify which be present for all tracks, as it is the primary way to identify which
codec to use to decode the track. codec to use to decode the track.
+------------------------------------+ +------------------------------------+
| Tracks | TrackEntry | TrackNumber | | Tracks | TrackEntry | TrackNumber |
| | |--------------| | | |--------------|
| | | TrackUID | | | | TrackUID |
| | |--------------| | | |--------------|
skipping to change at line 584 skipping to change at line 584
| | | | PixelWidth | | | | | PixelWidth |
| | | |-------------------| | | | |-------------------|
| | | | PixelHeight | | | | | PixelHeight |
| | | |-------------------| | | | |-------------------|
| | | | DisplayWidth | | | | | DisplayWidth |
| | | |-------------------| | | | |-------------------|
| | | | DisplayHeight | | | | | DisplayHeight |
| | | |-------------------| | | | |-------------------|
| | | | AspectRatioType | | | | | AspectRatioType |
| | | |-------------------| | | | |-------------------|
| | | | Color | | | | | Colour |
| | |----------------------------------| | | |----------------------------------|
| | | Audio | SamplingFrequency | | | | Audio | SamplingFrequency |
| | | |-------------------| | | | |-------------------|
| | | | Channels | | | | | Channels |
| | | |-------------------| | | | |-------------------|
| | | | BitDepth | | | | | BitDepth |
|--------------------------------------------------------| |--------------------------------------------------------|
Figure 4: Representation of the Tracks Element and a Selection of Its Figure 4: Representation of the Tracks Element and a Selection of Its
Descendant Elements Descendant Elements
skipping to change at line 626 skipping to change at line 626
| | | | ChapterDisplay | ChapString | | | | | ChapterDisplay | ChapString |
| | | | |--------------| | | | | |--------------|
| | | | | ChapLanguage | | | | | | ChapLanguage |
+------------------------------------------------------------------+ +------------------------------------------------------------------+
Figure 5: Representation of the Chapters Element and a Selection Figure 5: Representation of the Chapters Element and a Selection
of Its Descendant Elements of Its Descendant Elements
Cluster Elements contain the content for each track, e.g., video Cluster Elements contain the content for each track, e.g., video
frames. A Matroska file SHOULD contain at least one Cluster Element. frames. A Matroska file SHOULD contain at least one Cluster Element.
In the rare case it doesn't, there should be a form of Segment In the rare case it doesn't, there should be a method for Segments to
linking with other Segments, possibly using Chapters; see Section 17. link together, possibly using Chapters; see Section 17.
The Cluster Element helps to break up SimpleBlock or BlockGroup The Cluster Element helps to break up SimpleBlock or BlockGroup
Elements and helps with seeking and error protection. Every Cluster Elements and helps with seeking and error protection. Every Cluster
Element MUST contain a Timestamp Element. This SHOULD be the Element MUST contain a Timestamp Element. This SHOULD be the
Timestamp Element used to play the first Block in the Cluster Timestamp Element used to play the first Block in the Cluster
Element, unless a different value is needed to accommodate for more Element, unless a different value is needed to accommodate for more
Blocks; see Section 11.2. Blocks; see Section 11.2.
Cluster Elements contain one or more block element, such as Cluster Elements contain one or more Block element, such as
BlockGroup or SimpleBlock elements. In some situations, a Cluster BlockGroup or SimpleBlock elements. In some situations, a Cluster
Element MAY contain no block element, for example, in a live Element MAY contain no Block element, for example, in a live
recording when no data has been collected. recording when no data has been collected.
A BlockGroup Element MAY contain a Block of data and any information A BlockGroup Element MAY contain a Block of data and any information
relating directly to that Block. relating directly to that Block.
+--------------------------+ +--------------------------+
| Cluster | Timestamp | | Cluster | Timestamp |
| |----------------| | |----------------|
| | Position | | | Position |
| |----------------| | |----------------|
skipping to change at line 762 skipping to change at line 762
+------------------------------------------------+ +------------------------------------------------+
Figure 9: Representation of an Attachments Element Figure 9: Representation of an Attachments Element
The Tags Element contains metadata that describes the Segment and The Tags Element contains metadata that describes the Segment and
potentially its Tracks, Chapters, and Attachments. Each Track or potentially its Tracks, Chapters, and Attachments. Each Track or
Chapter that those tags applies to has its UID listed in the Tags. Chapter that those tags applies to has its UID listed in the Tags.
The Tags contain all extra information about the file: scriptwriters, The Tags contain all extra information about the file: scriptwriters,
singers, actors, directors, titles, edition, price, dates, genre, singers, actors, directors, titles, edition, price, dates, genre,
comments, etc. Tags can contain their values in multiple languages. comments, etc. Tags can contain their values in multiple languages.
For example, a movie's "title" Tag might contain both the original For example, a movie's "TITLE" Tag might contain both the original
English title as well as the title it was released as in Germany. English title as well as the German title.
+-------------------------------------------+ +-------------------------------------------+
| Tags | Tag | Targets | TargetTypeValue | | Tags | Tag | Targets | TargetTypeValue |
| | | |------------------| | | | |------------------|
| | | | TargetType | | | | | TargetType |
| | | |------------------| | | | |------------------|
| | | | TagTrackUID | | | | | TagTrackUID |
| | | |------------------| | | | |------------------|
| | | | TagEditionUID | | | | | TagEditionUID |
| | | |------------------| | | | |------------------|
skipping to change at line 798 skipping to change at line 798
| | | | SimpleTag | | | | | SimpleTag |
+-------------------------------------------+ +-------------------------------------------+
Figure 10: Representation of a Tags Element and Three Levels of Figure 10: Representation of a Tags Element and Three Levels of
Its Children Elements Its Children Elements
5. Matroska Schema 5. Matroska Schema
This specification includes an EBML Schema that defines the Elements This specification includes an EBML Schema that defines the Elements
and structure of Matroska using the EBML Schema elements and and structure of Matroska using the EBML Schema elements and
attributes defined in Section 11.1 of [RFC8794]. The EBML Schema attributes defined in Section 11.1 of [RFC8794].
defines every valid Matroska element in a manner defined by the EBML
specification [RFC8794].
Attributes using their default value (like minOccurs, minver, etc.) Attributes using their default value (like minOccurs, minver, etc.)
or attributes with undefined values (like length, maxver, etc.) are or attributes with undefined values (like length, maxver, etc.) are
omitted. omitted.
The definitions for each Matroska Element are provided below. The definitions for each Matroska Element are provided below.
5.1. Segment Element 5.1. Segment Element
id / type: 0x18538067 / master id / type: 0x18538067 / master
skipping to change at line 948 skipping to change at line 946
where some bits are not random, MAY also be used. where some bits are not random, MAY also be used.
usage notes: If the Segment Info contains a ChapterTranslate usage notes: If the Segment Info contains a ChapterTranslate
element, this Element is REQUIRED. element, this Element is REQUIRED.
5.1.2.8. ChapterTranslate Element 5.1.2.8. ChapterTranslate Element
id / type: 0x6924 / master id / type: 0x6924 / master
path: \Segment\Info\ChapterTranslate path: \Segment\Info\ChapterTranslate
definition: The mapping between this Segment and a segment value in definition: The mapping between this Segment and a segment value in
the given Chapter Codec. the given Chapter Codec.
rationale: Chapter Codec may need to address different segments, but rationale: Chapter Codecs may need to address different segments,
they may not know of the way to identify such segments when stored but they may not know of the way to identify such segments when
in Matroska. This element and its child elements add a way to map stored in Matroska. This element and its child elements add a way
the internal segments known to the Chapter Codec to the Segment to map the internal segments known to the Chapter Codec to the
IDs in Matroska. This allows remuxing a file with the Chapter Segment IDs in Matroska. This allows remuxing a file with Chapter
Codec without changing the content of the codec data, just the Codec without changing the content of the codec data, just the
Segment mapping. Segment mapping.
5.1.2.8.1. ChapterTranslateID Element 5.1.2.8.1. ChapterTranslateID Element
id / type: 0x69A5 / binary id / type: 0x69A5 / binary
path: \Segment\Info\ChapterTranslate\ChapterTranslateID path: \Segment\Info\ChapterTranslate\ChapterTranslateID
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: The binary value used to represent this Segment in the definition: The binary value used to represent this Segment in the
chapter codec data. The format depends on the ChapProcessCodecID chapter codec data. The format depends on the ChapProcessCodecID
used; see Section 5.1.7.1.4.15. used; see Section 5.1.7.1.4.15.
5.1.2.8.2. ChapterTranslateCodec Element 5.1.2.8.2. ChapterTranslateCodec Element
id / type: 0x69BF / uinteger id / type: 0x69BF / uinteger
path: \Segment\Info\ChapterTranslate\ChapterTranslateCodec path: \Segment\Info\ChapterTranslate\ChapterTranslateCodec
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: This ChapterTranslate applies to this chapter codec of definition: This ChapterTranslate applies to the chapter codec of
the given chapter edition(s); see Section 5.1.7.1.4.15. the given chapter edition(s); see Section 5.1.7.1.4.15.
defined values: See Table 1. defined values: See Table 1.
+=======+=================+============================+ +=======+=================+============================+
| value | label | definition | | value | label | definition |
+=======+=================+============================+ +=======+=================+============================+
| 0 | Matroska Script | Chapter commands using the | | 0 | Matroska Script | Chapter commands using the |
| | | Matroska Script codec. | | | | Matroska Script codec. |
+-------+-----------------+----------------------------+ +-------+-----------------+----------------------------+
| 1 | DVD-menu | Chapter commands using the | | 1 | DVD-menu | Chapter commands using the |
| | | DVD-like codec. | | | | DVD-like codec. |
+-------+-----------------+----------------------------+ +-------+-----------------+----------------------------+
Table 1: ChapterTranslateCodec Values Table 1: ChapterTranslateCodec Values
5.1.2.8.3. ChapterTranslateEditionUID Element 5.1.2.8.3. ChapterTranslateEditionUID Element
id / type: 0x69FC / uinteger id / type: 0x69FC / uinteger
path: \Segment\Info\ChapterTranslate\ChapterTranslateEditionUID path: \Segment\Info\ChapterTranslate\ChapterTranslateEditionUID
definition: Specify a chapter edition UID to which this definition: Specifies a chapter edition UID to which this
ChapterTranslate applies. ChapterTranslate applies.
usage notes: When no ChapterTranslateEditionUID is specified in the usage notes: When no ChapterTranslateEditionUID is specified in the
ChapterTranslate, the ChapterTranslate applies to all chapter ChapterTranslate, the ChapterTranslate applies to all chapter
editions found in the Segment using the given editions found in the Segment using the given
ChapterTranslateCodec. ChapterTranslateCodec.
5.1.2.9. TimestampScale Element 5.1.2.9. TimestampScale Element
id / type / default: 0x2AD7B1 / uinteger / 1000000 id / type / default: 0x2AD7B1 / uinteger / 1000000
range: not 0 range: not 0
skipping to change at line 1118 skipping to change at line 1116
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Block containing the actual data to be rendered and a definition: Block containing the actual data to be rendered and a
timestamp relative to the Cluster Timestamp; see Section 10.1 on timestamp relative to the Cluster Timestamp; see Section 10.1 on
Block Structure. Block Structure.
5.1.3.5.2. BlockAdditions Element 5.1.3.5.2. BlockAdditions Element
id / type: 0x75A1 / master id / type: 0x75A1 / master
path: \Segment\Cluster\BlockGroup\BlockAdditions path: \Segment\Cluster\BlockGroup\BlockAdditions
maxOccurs: 1 maxOccurs: 1
definition: Contains additional binary data to complete the main definition: Contains additional binary data to complete the Block
one; see Section 4.1.5 of [MatroskaCodec] for more information. element; see Section 4.1.5 of [MatroskaCodec] for more
An EBML parser that has no knowledge of the Block structure could information. An EBML parser that has no knowledge of the Block
still see and use/skip these data. structure could still see and use/skip these data.
5.1.3.5.2.1. BlockMore Element 5.1.3.5.2.1. BlockMore Element
id / type: 0xA6 / master id / type: 0xA6 / master
path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore
minOccurs: 1 minOccurs: 1
definition: Contains the BlockAdditional and some parameters. definition: Contains the BlockAdditional and some parameters.
5.1.3.5.2.2. BlockAdditional Element 5.1.3.5.2.2. BlockAdditional Element
skipping to change at line 1148 skipping to change at line 1146
5.1.3.5.2.3. BlockAddID Element 5.1.3.5.2.3. BlockAddID Element
id / type / default: 0xEE / uinteger / 1 id / type / default: 0xEE / uinteger / 1
range: not 0 range: not 0
path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddI path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddI
D D
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: An ID that identifies how to interpret the definition: An ID that identifies how to interpret the
BlockAdditional data; see Section 4.1.5 of [MatroskaCodec] for BlockAdditional data; see Section 4.1.5 of [MatroskaCodec] for
more information. A value of 1 indicates that the meaning of the more information. A value of 1 indicates that the BlockAdditional
BlockAdditional data is defined by the codec. Any other value data is defined by the codec. Any other value indicates that the
indicates the meaning of the BlockAdditional data is found in the BlockAdditional data should be handled according to the
BlockAddIDType found in the TrackEntry. BlockAddIDType that is located in the TrackEntry.
usage notes: Each BlockAddID value MUST be unique between all usage notes: Each BlockAddID value MUST be unique between all
BlockMore elements found in a BlockAdditions. BlockMore elements found in a BlockAdditions element. To keep
usage notes: To keep MaxBlockAdditionID as low as possible, small MaxBlockAdditionID as low as possible, small values SHOULD be
values SHOULD be used. used.
5.1.3.5.3. BlockDuration Element 5.1.3.5.3. BlockDuration Element
id / type: 0x9B / uinteger id / type: 0x9B / uinteger
path: \Segment\Cluster\BlockGroup\BlockDuration path: \Segment\Cluster\BlockGroup\BlockDuration
minOccurs / maxOccurs: see implementation notes / 1 minOccurs / maxOccurs: See Table 2 / 1
definition: The duration of the Block, expressed in Track Ticks; see definition: The duration of the Block, expressed in Track Ticks; see
Section 11.1. The BlockDuration Element can be useful at the end Section 11.1. The BlockDuration Element can be useful at the end
of a Track to define the duration of the last frame (as there is of a Track to define the duration of the last frame (as there is
no subsequent Block available) or when there is a break in a track no subsequent Block available) or when there is a break in a track
like for subtitle tracks. like for subtitle tracks.
notes: See Table 2. notes: See Table 2.
+===========+===================================================+ +===========+==================================================+
| attribute | note | | attribute | note |
+===========+===================================================+ +===========+==================================================+
| minOccurs | BlockDuration MUST be set (minOccurs=1) if the | | minOccurs | BlockDuration MUST be set (minOccurs=1) if the |
| | associated TrackEntry stores a DefaultDuration | | | associated TrackEntry stores a DefaultDuration |
| | value. | | | value. |
+-----------+---------------------------------------------------+ +-----------+--------------------------------------------------+
| default | When not written and with no DefaultDuration, the | | default | If a value is not present and no DefaultDuration |
| | value is assumed to be the difference between the | | | is defined, the value is assumed to be the |
| | timestamp of this Block and the timestamp of the | | | difference between the timestamp of this Block> |
| | next Block in "display" order (not coding order). | | | and the timestamp of the next Block in "display" |
+-----------+---------------------------------------------------+ | | order (not coding order). |
+-----------+--------------------------------------------------+
Table 2: BlockDuration Implementation Notes Table 2: BlockDuration Implementation Notes
5.1.3.5.4. ReferencePriority Element 5.1.3.5.4. ReferencePriority Element
id / type / default: 0xFA / uinteger / 0 id / type / default: 0xFA / uinteger / 0
path: \Segment\Cluster\BlockGroup\ReferencePriority path: \Segment\Cluster\BlockGroup\ReferencePriority
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: This frame is referenced and has the specified cache definition: This frame is referenced and has the specified cache
priority. In the cache, only a frame of the same or higher priority. In the cache, only a frame of the same or higher
priority can replace this frame. A value of 0 means the frame is priority can replace this frame. A value of 0 means the frame is
not referenced. not referenced.
skipping to change at line 1204 skipping to change at line 1203
5.1.3.5.5. ReferenceBlock Element 5.1.3.5.5. ReferenceBlock Element
id / type: 0xFB / integer id / type: 0xFB / integer
path: \Segment\Cluster\BlockGroup\ReferenceBlock path: \Segment\Cluster\BlockGroup\ReferenceBlock
definition: A timestamp value, relative to the timestamp of the definition: A timestamp value, relative to the timestamp of the
Block in this BlockGroup, expressed in Track Ticks; see Block in this BlockGroup, expressed in Track Ticks; see
Section 11.1. This is used to reference other frames necessary to Section 11.1. This is used to reference other frames necessary to
decode this frame. The relative value SHOULD correspond to a decode this frame. The relative value SHOULD correspond to a
valid Block that this Block depends on. Historically, Matroska valid Block that this Block depends on. Historically, Matroska
Writers didn't write the actual Block(s) that this Block depends Writers didn't write the actual Block(s) that this Block depends
on, but they did write _some_ Block(s) in the past. on, but they did write _some_ Block(s) in the past. The value "0"
MAY also be used to signify that this Block cannot be decoded on
The value "0" MAY also be used to signify that this Block cannot be its own, but the necessary reference Block(s) is unknown. In this
decoded on its own, but without knowledge of which Block is case, other ReferenceBlock Elements MUST NOT be found in the same
necessary. In this case, other ReferenceBlock Elements MUST NOT be BlockGroup. If the BlockGroup doesn't have a ReferenceBlock
found in the same BlockGroup. element, then the Block it contains can be decoded without using
any other Block data.
If the BlockGroup doesn't have a ReferenceBlock element, then the
Block it contains can be decoded without using any other Block data.
5.1.3.5.6. CodecState Element 5.1.3.5.6. CodecState Element
id / type: 0xA4 / binary id / type: 0xA4 / binary
path: \Segment\Cluster\BlockGroup\CodecState path: \Segment\Cluster\BlockGroup\CodecState
maxOccurs: 1 maxOccurs: 1
minver: 2 minver: 2
definition: The new codec state to use. Data interpretation is definition: The new codec state to use. Data interpretation is
private to the codec. This information SHOULD always be private to the codec. This information SHOULD always be
referenced by a seek entry. referenced by a seek entry.
skipping to change at line 1235 skipping to change at line 1232
id / type: 0x75A2 / integer id / type: 0x75A2 / integer
path: \Segment\Cluster\BlockGroup\DiscardPadding path: \Segment\Cluster\BlockGroup\DiscardPadding
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
definition: Duration of the silent data added to the Block, definition: Duration of the silent data added to the Block,
expressed in Matroska Ticks -- i.e., in nanoseconds; see expressed in Matroska Ticks -- i.e., in nanoseconds; see
Section 11.1 (padding at the end of the Block for positive values Section 11.1 (padding at the end of the Block for positive values
and at the beginning of the Block for negative values). The and at the beginning of the Block for negative values). The
duration of DiscardPadding is not calculated in the duration of duration of DiscardPadding is not calculated in the duration of
the TrackEntry and SHOULD be discarded during playback. the TrackEntryand SHOULD be discarded during playback.
5.1.4. Tracks Element 5.1.4. Tracks Element
id / type: 0x1654AE6B / master id / type: 0x1654AE6B / master
path: \Segment\Tracks path: \Segment\Tracks
maxOccurs: 1 maxOccurs: 1
recurring: True recurring: True
definition: A Top-Level Element of information with many tracks definition: A Top-Level Element of information with many tracks
described. described.
skipping to change at line 1326 skipping to change at line 1323
definition: Set to 1 if the track is usable. It is possible to turn definition: Set to 1 if the track is usable. It is possible to turn
a track that is not usable into a usable track using chapter a track that is not usable into a usable track using chapter
codecs or control tracks. codecs or control tracks.
5.1.4.1.5. FlagDefault Element 5.1.4.1.5. FlagDefault Element
id / type / default: 0x88 / uinteger / 1 id / type / default: 0x88 / uinteger / 1
range: 0-1 range: 0-1
path: \Segment\Tracks\TrackEntry\FlagDefault path: \Segment\Tracks\TrackEntry\FlagDefault
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Set if the track (audio, video, or subs) is eligible for definition: Set to 1 if the track (audio, video, or subtitles) is
automatic selection by the player; see Section 19 for more eligible for automatic selection by the player; see Section 19 for
details. more details.
5.1.4.1.6. FlagForced Element 5.1.4.1.6. FlagForced Element
id / type / default: 0x55AA / uinteger / 0 id / type / default: 0x55AA / uinteger / 0
range: 0-1 range: 0-1
path: \Segment\Tracks\TrackEntry\FlagForced path: \Segment\Tracks\TrackEntry\FlagForced
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Applies only to subtitles. Set if the track is eligible definition: Applies only to subtitles. Set to 1 if the track is
for automatic selection by the player if it matches the user's eligible for automatic selection by the player if it matches the
language preference, even if the user's preferences would not user's language preference, even if the user's preferences would
normally enable subtitles with the selected audio track; this can not normally enable subtitles with the selected audio track; this
be used for tracks containing only translations of audio in can be used for tracks containing only translations of audio in
foreign languages or on-screen text. See Section 19 for more foreign languages or on-screen text. See Section 19 for more
details. details.
5.1.4.1.7. FlagHearingImpaired Element 5.1.4.1.7. FlagHearingImpaired Element
id / type: 0x55AB / uinteger id / type: 0x55AB / uinteger
range: 0-1 range: 0-1
path: \Segment\Tracks\TrackEntry\FlagHearingImpaired path: \Segment\Tracks\TrackEntry\FlagHearingImpaired
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
skipping to change at line 1423 skipping to change at line 1420
5.1.4.1.14. DefaultDecodedFieldDuration Element 5.1.4.1.14. DefaultDecodedFieldDuration Element
id / type: 0x234E7A / uinteger id / type: 0x234E7A / uinteger
range: not 0 range: not 0
path: \Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration path: \Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
definition: The period between two successive fields at the output definition: The period between two successive fields at the output
of the decoding process, expressed in Matroska Ticks -- i.e., in of the decoding process, expressed in Matroska Ticks -- i.e., in
nanoseconds; see Section 11.1. See Section 9 for more information nanoseconds; see Section 11.1. See Section 9 for more
information.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.15. TrackTimestampScale Element 5.1.4.1.15. TrackTimestampScale Element
id / type / default: 0x23314F / float / 0x1p+0 id / type / default: 0x23314F / float / 0x1p+0
range: > 0x0p+0 range: > 0x0p+0
path: \Segment\Tracks\TrackEntry\TrackTimestampScale path: \Segment\Tracks\TrackEntry\TrackTimestampScale
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
maxver: 3 maxver: 3
definition: The scale to apply on this track to work at normal speed definition: The scale to apply on this track to work at normal speed
skipping to change at line 1528 skipping to change at line 1526
ignored if the LanguageBCP47 Element is used in the same ignored if the LanguageBCP47 Element is used in the same
TrackEntry. TrackEntry.
5.1.4.1.20. LanguageBCP47 Element 5.1.4.1.20. LanguageBCP47 Element
id / type: 0x22B59D / string id / type: 0x22B59D / string
path: \Segment\Tracks\TrackEntry\LanguageBCP47 path: \Segment\Tracks\TrackEntry\LanguageBCP47
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
definition: The language of the track, in the form defined in definition: The language of the track, in the form defined in
[BCP47]; see Section 12 on language codes. If this Element is [RFC5646]; see Section 12 on language codes. If this Element is
used, then any Language Elements used in the same TrackEntry MUST used, then any Language Elements used in the same TrackEntryMUST
be ignored. be ignored.
5.1.4.1.21. CodecID Element 5.1.4.1.21. CodecID Element
id / type: 0x86 / string id / type: 0x86 / string
path: \Segment\Tracks\TrackEntry\CodecID path: \Segment\Tracks\TrackEntry\CodecID
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: An ID corresponding to the codec; see [MatroskaCodec] definition: An ID corresponding to the codec; see [MatroskaCodec]
for more info. for more info.
stream copy: True (Section 8) stream copy: True (Section 8)
skipping to change at line 1599 skipping to change at line 1597
decoder MUST decode before the decoded data is valid, expressed in decoder MUST decode before the decoded data is valid, expressed in
Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. Matroska Ticks -- i.e., in nanoseconds; see Section 11.1.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.27. TrackTranslate Element 5.1.4.1.27. TrackTranslate Element
id / type: 0x6624 / master id / type: 0x6624 / master
path: \Segment\Tracks\TrackEntry\TrackTranslate path: \Segment\Tracks\TrackEntry\TrackTranslate
definition: The mapping between this TrackEntry and a track value in definition: The mapping between this TrackEntry and a track value in
the given Chapter Codec. the given Chapter Codec.
rationale: Chapter Codec may need to address content in a specific rationale: Chapter Codecs may need to address content in a specific
track, but they may not know of the way to identify tracks in track, but they may not know of the way to identify tracks in
Matroska. This element and its child elements add a way to map Matroska. This element and its child elements add a way to map
the internal tracks known to the Chapter Codec to the track IDs in the internal tracks known to the Chapter Codec to the track IDs in
Matroska. This allows remuxing a file with Chapter Codec without Matroska. This allows remuxing a file with Chapter Codec without
changing the content of the codec data, just the track mapping. changing the content of the codec data, just the track mapping.
5.1.4.1.27.1. TrackTranslateTrackID Element 5.1.4.1.27.1. TrackTranslateTrackID Element
id / type: 0x66A5 / binary id / type: 0x66A5 / binary
path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackI path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackI
skipping to change at line 1621 skipping to change at line 1619
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: The binary value used to represent this TrackEntry in definition: The binary value used to represent this TrackEntry in
the chapter codec data. The format depends on the the chapter codec data. The format depends on the
ChapProcessCodecID used; see Section 5.1.7.1.4.15. ChapProcessCodecID used; see Section 5.1.7.1.4.15.
5.1.4.1.27.2. TrackTranslateCodec Element 5.1.4.1.27.2. TrackTranslateCodec Element
id / type: 0x66BF / uinteger id / type: 0x66BF / uinteger
path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: This TrackTranslate applies to the chapter codec of the definition: Applies to the chapter codec of the given chapter
given chapter edition(s); see Section 5.1.7.1.4.15. edition(s); see Section 5.1.7.1.4.15.
defined values: See Table 4. defined values: See Table 4.
+=======+=================+============================+ +=======+=================+============================+
| value | label | definition | | value | label | definition |
+=======+=================+============================+ +=======+=================+============================+
| 0 | Matroska Script | Chapter commands using the | | 0 | Matroska Script | Chapter commands using the |
| | | Matroska Script codec. | | | | Matroska Script codec. |
+-------+-----------------+----------------------------+ +-------+-----------------+----------------------------+
| 1 | DVD-menu | Chapter commands using the | | 1 | DVD-menu | Chapter commands using the |
| | | DVD-like codec. | | | | DVD-like codec. |
skipping to change at line 1692 skipping to change at line 1690
path: \Segment\Tracks\TrackEntry\Video\FieldOrder path: \Segment\Tracks\TrackEntry\Video\FieldOrder
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: Specifies the field ordering of video frames in this definition: Specifies the field ordering of video frames in this
track. track.
defined values: See Table 6. defined values: See Table 6.
usage notes: If FlagInterlaced is not set to 1, this Element MUST be usage notes: If FlagInterlaced is not set to 1, this Element MUST be
ignored. ignored.
stream copy: True (Section 8) stream copy: True (Section 8)
+=======+==============+=========================================+ +=======+===============+=========================================+
| value | label | definition | | value | label | definition |
+=======+==============+=========================================+ +=======+===============+=========================================+
| 0 | progressive | Interlaced frames. This value SHOULD | | 0 | progressive | Interlaced frames. This value SHOULD |
| | | be avoided; setting FlagInterlaced to 2 | | | | be avoided; setting FlagInterlaced to 2 |
| | | is sufficient. | | | | is sufficient. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
| 1 | tff | Top field displayed first. Top field | | 1 | tff | Top field displayed first. Top field |
| | | stored first. | | | | stored first. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
| 2 | undetermined | Unknown field order. This value SHOULD | | 2 | undetermined | Unknown field order. This value SHOULD |
| | | be avoided. | | | | be avoided. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
| 6 | bff | Bottom field displayed first. Bottom | | 6 | bff | Bottom field displayed first. Bottom |
| | | field stored first. | | | | field stored first. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
| 9 | bff(swapped) | Top field displayed first. Fields are | | 9 | tff | Top field displayed first. Fields are |
| | | interleaved in storage with the top | | | (interleaved) | interleaved in storage with the top |
| | | line of the top field stored first. | | | | line of the top field stored first. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
| 14 | tff(swapped) | Bottom field displayed first. Fields | | 14 | bff | Bottom field displayed first. Fields |
| | | are interleaved in storage with the top | | | (interleaved) | are interleaved in storage with the top |
| | | line of the top field stored first. | | | | line of the top field stored first. |
+-------+--------------+-----------------------------------------+ +-------+---------------+-----------------------------------------+
Table 6: FieldOrder Values Table 6: FieldOrder Values
5.1.4.1.28.3. StereoMode Element 5.1.4.1.28.3. StereoMode Element
id / type / default: 0x53B8 / uinteger / 0 id / type / default: 0x53B8 / uinteger / 0
path: \Segment\Tracks\TrackEntry\Video\StereoMode path: \Segment\Tracks\TrackEntry\Video\StereoMode
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 3 minver: 3
definition: Stereo-3D video mode. See Section 18.10 for more definition: Stereo-3D video mode. See Section 18.10 for more
details. details.
restrictions: See Table 7. restrictions: See Table 7.
skipping to change at line 1773 skipping to change at line 1771
Table 7: StereoMode Values Table 7: StereoMode Values
5.1.4.1.28.4. AlphaMode Element 5.1.4.1.28.4. AlphaMode Element
id / type / default: 0x53C0 / uinteger / 0 id / type / default: 0x53C0 / uinteger / 0
path: \Segment\Tracks\TrackEntry\Video\AlphaMode path: \Segment\Tracks\TrackEntry\Video\AlphaMode
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 3 minver: 3
definition: Indicates whether the BlockAdditional Element with definition: Indicates whether the BlockAdditional Element with
BlockAddID of "1" contains Alpha data, as defined by the Codec BlockAddID of "1" contains Alpha data as defined by the Codec
Mapping for the CodecID. Undefined values SHOULD NOT be used, as Mapping for the CodecID. Undefined values (i.e., values other
the behavior of known implementations is different (considered than 0 or 1) SHOULD NOT be used, as the behavior of known
either as 0 or 1). implementations is different.
defined values: See Table 8. defined values: See Table 8.
stream copy: True (Section 8) stream copy: True (Section 8)
+=======+=========+============================================+ +=======+=========+============================================+
| value | label | definition | | value | label | definition |
+=======+=========+============================================+ +=======+=========+============================================+
| 0 | none | The BlockAdditional Element with | | 0 | none | The BlockAdditional Element with |
| | | BlockAddID of "1" does not exist or SHOULD | | | | BlockAddID of "1" does not exist or SHOULD |
| | | NOT be considered as containing such data. | | | | NOT be considered as containing such data. |
+-------+---------+--------------------------------------------+ +-------+---------+--------------------------------------------+
skipping to change at line 1801 skipping to change at line 1799
Table 8: AlphaMode Values Table 8: AlphaMode Values
5.1.4.1.28.5. OldStereoMode Element 5.1.4.1.28.5. OldStereoMode Element
id / type: 0x53B9 / uinteger id / type: 0x53B9 / uinteger
path: \Segment\Tracks\TrackEntry\Video\OldStereoMode path: \Segment\Tracks\TrackEntry\Video\OldStereoMode
maxOccurs: 1 maxOccurs: 1
maxver: 2 maxver: 2
definition: Bogus StereoMode value used in old versions of definition: Bogus StereoMode value used in old versions of
libmatroska. [libmatroska].
restrictions: See Table 9. restrictions: See Table 9.
usage notes: This Element MUST NOT be used. It was an incorrect usage notes: This Element MUST NOT be used. It was an incorrect
value used in libmatroska up to 0.9.0. value used in libmatroska up to 0.9.0.
+=======+===========+ +=======+===========+
| value | label | | value | label |
+=======+===========+ +=======+===========+
| 0 | mono | | 0 | mono |
+-------+-----------+ +-------+-----------+
| 1 | right eye | | 1 | right eye |
skipping to change at line 1948 skipping to change at line 1946
| 4 | unknown | | 4 | unknown |
+-------+----------------------+ +-------+----------------------+
Table 12: DisplayUnit Values Table 12: DisplayUnit Values
5.1.4.1.28.15. UncompressedFourCC Element 5.1.4.1.28.15. UncompressedFourCC Element
id / type: 0x2EB524 / binary id / type: 0x2EB524 / binary
length: 4 length: 4
path: \Segment\Tracks\TrackEntry\Video\UncompressedFourCC path: \Segment\Tracks\TrackEntry\Video\UncompressedFourCC
minOccurs / maxOccurs: see implementation notes / 1 minOccurs / maxOccurs: See Table 13 / 1
definition: Specifies the uncompressed pixel format used for the definition: Specifies the uncompressed pixel format used for the
Track's data as a FourCC. This value is similar in scope to the Track's data as a FourCC. This value is similar in scope to the
biCompression value of AVI's BITMAPINFO [AVIFormat]. There is biCompression value of AVI's BITMAPINFO [AVIFormat]. There is
neither a definitive list of FourCC values nor an official neither a definitive list of FourCC values nor an official
registry. Some common values for YUV pixel formats can be found registry. Some common values for YUV pixel formats can be found
at [MSYUV8], [MSYUV16], and [FourCC-YUV]. Some common values for at [MSYUV8], [MSYUV16], and [FourCC-YUV]. Some common values for
uncompressed RGB pixel formats can be found at [MSRGB] and uncompressed RGB pixel formats can be found at [MSRGB] and
[FourCC-RGB]. [FourCC-RGB].
notes: See Table 13. notes: See Table 13.
stream copy: True (Section 8) stream copy: True (Section 8)
skipping to change at line 1976 skipping to change at line 1974
+-----------+----------------------------------------------+ +-----------+----------------------------------------------+
Table 13: UncompressedFourCC Implementation Notes Table 13: UncompressedFourCC Implementation Notes
5.1.4.1.28.16. Colour Element 5.1.4.1.28.16. Colour Element
id / type: 0x55B0 / master id / type: 0x55B0 / master
path: \Segment\Tracks\TrackEntry\Video\Colour path: \Segment\Tracks\TrackEntry\Video\Colour
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
definition: Settings describing the colour format. definition: Settings describing the color format.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.28.17. MatrixCoefficients Element 5.1.4.1.28.17. MatrixCoefficients Element
id / type / default: 0x55B1 / uinteger / 2 id / type / default: 0x55B1 / uinteger / 2
path: \Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients path: \Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: The Matrix Coefficients of the video used to derive luma definition: The Matrix Coefficients of the video used to derive luma
and chroma values from red, green, and blue color primaries. For and chroma values from red, green, and blue color primaries. For
skipping to change at line 2220 skipping to change at line 2218
+-------+---------------------------------------+ +-------+---------------------------------------+
Table 18: TransferCharacteristics Values Table 18: TransferCharacteristics Values
5.1.4.1.28.27. Primaries Element 5.1.4.1.28.27. Primaries Element
id / type / default: 0x55BB / uinteger / 2 id / type / default: 0x55BB / uinteger / 2
path: \Segment\Tracks\TrackEntry\Video\Colour\Primaries path: \Segment\Tracks\TrackEntry\Video\Colour\Primaries
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: The colour primaries of the video. For clarity, the definition: The color primaries of the video. For clarity, the
value and meanings for Primaries are adopted from Table 2 of value and meanings for Primaries are adopted from Table 2 of
[ITU-H.273]. [ITU-H.273].
restrictions: See Table 19. restrictions: See Table 19.
stream copy: True (Section 8) stream copy: True (Section 8)
+=======+========================================+ +=======+========================================+
| value | label | | value | label |
+=======+========================================+ +=======+========================================+
| 0 | reserved | | 0 | reserved |
+-------+----------------------------------------+ +-------+----------------------------------------+
skipping to change at line 2462 skipping to change at line 2460
* If ProjectionType equals 1 (equirectangular), then this element * If ProjectionType equals 1 (equirectangular), then this element
MUST be present and contain the same binary data that would be MUST be present and contain the same binary data that would be
stored inside an ISOBMFF Equirectangular Projection Box stored inside an ISOBMFF Equirectangular Projection Box
("equi"). ("equi").
* If ProjectionType equals 2 (cubemap), then this element MUST be * If ProjectionType equals 2 (cubemap), then this element MUST be
present and contain the same binary data that would be stored present and contain the same binary data that would be stored
inside an ISOBMFF Cubemap Projection Box ("cbmp"). inside an ISOBMFF Cubemap Projection Box ("cbmp").
* If ProjectionType equals 3 (mesh), then this element MUST be * If ProjectionType equals 3 (mesh), then this element MUST be
present and contain the same binary data that would be stored present and contain the same binary data that would be stored
inside an ISOBMFF Mesh Projection Box ("mshp"). inside an ISOBMFF Mesh Projection Box ("mshp").
usage notes: ISOBMFF box size and fourcc fields are not included in usage notes: ISOBMFF box size and FourCC fields are not included in
the binary data, but the FullBox version and flag fields are. the binary data, but the FullBox version and flag fields are.
This is to avoid redundant framing information while preserving This is to avoid redundant framing information while preserving
versioning and semantics between the two container formats. versioning and semantics between the two container formats.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.28.44. ProjectionPoseYaw Element 5.1.4.1.28.44. ProjectionPoseYaw Element
id / type / default: 0x7673 / float / 0x0p+0 id / type / default: 0x7673 / float / 0x0p+0
range: >= -0xB4p+0, <= 0xB4p+0 range: >= -0xB4p+0, <= 0xB4p+0
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: Specifies a yaw rotation to the projection. definition: Specifies a yaw rotation to the projection. Value
represents a clockwise rotation, in degrees, around the up vector.
Value represents a clockwise rotation, in degrees, around the up This rotation must be applied before any ProjectionPosePitch or
vector. This rotation must be applied before any ProjectionPosePitch ProjectionPoseRoll rotations. The value of this element MUST be
or ProjectionPoseRoll rotations. The value of this element MUST be in the -180 to 180 degree range, both inclusive. Setting
in the -180 to 180 degree range, both included. ProjectionPoseYaw to 180 or -180 degrees with ProjectionPoseRoll
and ProjectionPosePitch set to 0 degrees flips the image
Setting ProjectionPoseYaw to 180 or -180 degrees with horizontally.
ProjectionPoseRoll and ProjectionPosePitch set to 0 degrees flips the
image horizontally.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.28.45. ProjectionPosePitch Element 5.1.4.1.28.45. ProjectionPosePitch Element
id / type / default: 0x7674 / float / 0x0p+0 id / type / default: 0x7674 / float / 0x0p+0
range: >= -0x5Ap+0, <= 0x5Ap+0 range: >= -0x5Ap+0, <= 0x5Ap+0
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitc path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitc
h h
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: Specifies a pitch rotation to the projection. definition: Specifies a pitch rotation to the projection. Value
represents a counter-clockwise rotation, in degrees, around the
Value represents a counter-clockwise rotation, in degrees, around the right vector. This rotation must be applied after the
right vector. This rotation must be applied after the ProjectionPoseYaw rotation and before the ProjectionPoseRoll
ProjectionPoseYaw rotation and before the ProjectionPoseRoll rotation. The value of this element MUST be in the -90 to 90
rotation. The value of this element MUST be in the -90 to 90 degree degree range, both inclusive.
range, both included.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.28.46. ProjectionPoseRoll Element 5.1.4.1.28.46. ProjectionPoseRoll Element
id / type / default: 0x7675 / float / 0x0p+0 id / type / default: 0x7675 / float / 0x0p+0
range: >= -0xB4p+0, <= 0xB4p+0 range: >= -0xB4p+0, <= 0xB4p+0
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 4 minver: 4
definition: Specifies a roll rotation to the projection. definition: Specifies a roll rotation to the projection. Value
represents a counter-clockwise rotation, in degrees, around the
Value represents a counter-clockwise rotation, in degrees, around the forward vector. This rotation must be applied after the
forward vector. This rotation must be applied after the ProjectionPoseYaw and ProjectionPosePitch rotations. The value of
ProjectionPoseYaw and ProjectionPosePitch rotations. The value of this element MUST be in the -180 to 180 degree range, both
this element MUST be in the -180 to 180 degree range, both included. inclusive. Setting ProjectionPoseRoll to 180 or -180 degrees and
ProjectionPoseYaw to 180 or -180 degrees with ProjectionPosePitch
Setting ProjectionPoseRoll to 180 or -180 degrees and set to 0 degrees flips the image vertically.
ProjectionPoseYaw to 180 or -180 degrees with ProjectionPosePitch set Setting ProjectionPoseRoll to 180 or -180 degrees with
to 0 degrees flips the image vertically. ProjectionPoseYaw and ProjectionPosePitch set to 0 degrees flips
the image horizontally and vertically.
Setting ProjectionPoseRoll to 180 or -180 degrees with
ProjectionPoseYaw and ProjectionPosePitch set to 0 degrees flips the
image horizontally and vertically.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.29. Audio Element 5.1.4.1.29. Audio Element
id / type: 0xE1 / master id / type: 0xE1 / master
path: \Segment\Tracks\TrackEntry\Audio path: \Segment\Tracks\TrackEntry\Audio
maxOccurs: 1 maxOccurs: 1
definition: Audio settings. definition: Audio settings.
5.1.4.1.29.1. SamplingFrequency Element 5.1.4.1.29.1. SamplingFrequency Element
skipping to change at line 2552 skipping to change at line 2541
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Sampling frequency in Hz. definition: Sampling frequency in Hz.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.29.2. OutputSamplingFrequency Element 5.1.4.1.29.2. OutputSamplingFrequency Element
id / type: 0x78B5 / float id / type: 0x78B5 / float
range: > 0x0p+0 range: > 0x0p+0
path: \Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency path: \Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency
maxOccurs: 1 maxOccurs: 1
definition: Real output sampling frequency in Hz (used for SBR definition: Real output sampling frequency in Hz that is used for
techniques). Spectral Band Replication (SBR) techniques.
notes: See Table 21. notes: See Table 21.
+===========+======================================================+ +===========+======================================================+
| attribute | note | | attribute | note |
+===========+======================================================+ +===========+======================================================+
| default | The default value for OutputSamplingFrequency of the | | default | The default value for OutputSamplingFrequency of the |
| | same TrackEntry is equal to the SamplingFrequency. | | | same TrackEntry is equal to the SamplingFrequency. |
+-----------+------------------------------------------------------+ +-----------+------------------------------------------------------+
Table 21: OutputSamplingFrequency Implementation Notes Table 21: OutputSamplingFrequency Implementation Notes
skipping to change at line 2622 skipping to change at line 2611
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.30.3. TrackPlaneUID Element 5.1.4.1.30.3. TrackPlaneUID Element
id / type: 0xE5 / uinteger id / type: 0xE5 / uinteger
range: not 0 range: not 0
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T
rackPlane\TrackPlaneUID rackPlane\TrackPlaneUID
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 3 minver: 3
definition: The trackUID number of the track representing the plane. definition: The TrackUID number of the track representing the plane.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.30.4. TrackPlaneType Element 5.1.4.1.30.4. TrackPlaneType Element
id / type: 0xE6 / uinteger id / type: 0xE6 / uinteger
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T
rackPlane\TrackPlaneType rackPlane\TrackPlaneType
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 3 minver: 3
definition: The kind of plane this track corresponds to. definition: The kind of plane this track corresponds to.
skipping to change at line 2667 skipping to change at line 2656
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.30.6. TrackJoinUID Element 5.1.4.1.30.6. TrackJoinUID Element
id / type: 0xED / uinteger id / type: 0xED / uinteger
range: not 0 range: not 0
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\Trac path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\Trac
kJoinUID kJoinUID
minOccurs: 1 minOccurs: 1
minver: 3 minver: 3
definition: The trackUID number of a track whose blocks are used to definition: The TrackUID number of a track whose blocks are used to
create this virtual track. create this virtual track.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.31. ContentEncodings Element 5.1.4.1.31. ContentEncodings Element
id / type: 0x6D80 / master id / type: 0x6D80 / master
path: \Segment\Tracks\TrackEntry\ContentEncodings path: \Segment\Tracks\TrackEntry\ContentEncodings
maxOccurs: 1 maxOccurs: 1
definition: Settings for several content encoding mechanisms like definition: Settings for several content encoding mechanisms like
compression or encryption. compression or encryption.
skipping to change at line 2695 skipping to change at line 2684
definition: Settings for one content encoding like compression or definition: Settings for one content encoding like compression or
encryption. encryption.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.31.2. ContentEncodingOrder Element 5.1.4.1.31.2. ContentEncodingOrder Element
id / type / default: 0x5031 / uinteger / 0 id / type / default: 0x5031 / uinteger / 0
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co
ntentEncodingOrder ntentEncodingOrder
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Tell in which order to apply each ContentEncoding of the definition: Defines the order to apply each ContentEncoding of the
ContentEncodings. The decoder/demuxer MUST start with the ContentEncodings. The decoder/demuxer MUST start with the
ContentEncoding with the highest ContentEncodingOrder and work its ContentEncoding with the highest ContentEncodingOrder and work its
way down to the ContentEncoding with the lowest way down to the ContentEncoding with the lowest
ContentEncodingOrder. This value MUST be unique for each ContentEncodingOrder. This value MUST be unique for each
ContentEncoding found in the ContentEncodings of this TrackEntry. ContentEncoding found in the ContentEncodings of this TrackEntry.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.4.1.31.3. ContentEncodingScope Element 5.1.4.1.31.3. ContentEncodingScope Element
id / type / default: 0x5032 / uinteger / 1 id / type / default: 0x5032 / uinteger / 1
skipping to change at line 2779 skipping to change at line 2768
ntentCompression\ContentCompAlgo ntentCompression\ContentCompAlgo
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: The compression algorithm used. definition: The compression algorithm used.
defined values: See Table 25. defined values: See Table 25.
usage notes: Compression method "1" (bzlib) and "2" (lzo1x) lack usage notes: Compression method "1" (bzlib) and "2" (lzo1x) lack
proper documentation on the format, which limits implementation proper documentation on the format, which limits implementation
possibilities. Due to licensing conflicts on commonly available possibilities. Due to licensing conflicts on commonly available
libraries' compression methods, "2" (lzo1x) does not offer libraries' compression methods, "2" (lzo1x) does not offer
widespread interoperability. A Matroska Writer SHOULD NOT use widespread interoperability. A Matroska Writer SHOULD NOT use
these compression methods by default. A Matroska Reader MAY these compression methods by default. A Matroska Reader MAY
support methods "1" and "2" as possible and SHOULD support other support methods "1" and "2" and SHOULD support other methods.
methods.
stream copy: True (Section 8) stream copy: True (Section 8)
+=======+===========+=========================================+ +=======+===========+========================================+
| value | label | definition | | value | label | definition |
+=======+===========+=========================================+ +=======+===========+========================================+
| 0 | zlib | zlib compression [RFC1950]. | | 0 | zlib | zlib compression [RFC1950]. |
+-------+-----------+-----------------------------------------+ +-------+-----------+----------------------------------------+
| 1 | bzlib | bzip2 compression [BZIP2] SHOULD NOT be | | 1 | bzlib | bzip2 compression [BZIP2] SHOULD NOT |
| | | used; see usage notes. | | | | be used; see usage notes. |
+-------+-----------+-----------------------------------------+ +-------+-----------+----------------------------------------+
| 2 | lzo1x | Lempel-Ziv-Oberhumer compression [LZO], | | 2 | lzo1x | Lempel-Ziv-Oberhumer compression [LZO] |
| | | SHOULD NOT be used; see usage notes. | | | | SHOULD NOT be used; see usage notes. |
+-------+-----------+-----------------------------------------+ +-------+-----------+----------------------------------------+
| 3 | Header | Octets in ContentCompSettings | | 3 | Header | Octets in ContentCompSettings |
| | Stripping | (Section 5.1.4.1.31.7) have been | | | Stripping | (Section 5.1.4.1.31.7) have been |
| | | stripped from each frame. | | | | stripped from each frame. |
+-------+-----------+-----------------------------------------+ +-------+-----------+----------------------------------------+
Table 25: ContentCompAlgo Values Table 25: ContentCompAlgo Values
5.1.4.1.31.7. ContentCompSettings Element 5.1.4.1.31.7. ContentCompSettings Element
id / type: 0x4255 / binary id / type: 0x4255 / binary
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co
ntentCompression\ContentCompSettings ntentCompression\ContentCompSettings
maxOccurs: 1 maxOccurs: 1
definition: Settings that might be needed by the decompressor. For definition: Settings that might be needed by the decompressor. For
Header Stripping (ContentCompAlgo=3), the bytes that were removed Header Stripping (ContentCompAlgo=3), the bytes that were removed
from the beginning of each frame of the track. from the beginning of each frame of the track.
skipping to change at line 2922 skipping to change at line 2910
| maxOccurs | AESSettingsCipherMode MUST NOT be set | | maxOccurs | AESSettingsCipherMode MUST NOT be set |
| | (maxOccurs=0) if ContentEncAlgo is not AES (5). | | | (maxOccurs=0) if ContentEncAlgo is not AES (5). |
+-----------+-------------------------------------------------+ +-----------+-------------------------------------------------+
Table 29: AESSettingsCipherMode Implementation Notes Table 29: AESSettingsCipherMode Implementation Notes
5.1.5. Cues Element 5.1.5. Cues Element
id / type: 0x1C53BB6B / master id / type: 0x1C53BB6B / master
path: \Segment\Cues path: \Segment\Cues
minOccurs / maxOccurs: see implementation notes / 1 minOccurs / maxOccurs: See Table 30 / 1
definition: A Top-Level Element to speed seeking access. All definition: A Top-Level Element to speed seeking access. All
entries are local to the Segment. entries are local to the Segment.
notes: See Table 30. notes: See Table 30.
+===========+====================================================+ +===========+====================================================+
| attribute | note | | attribute | note |
+===========+====================================================+ +===========+====================================================+
| minOccurs | This Element SHOULD be set when the Segment is not | | minOccurs | This Element SHOULD be set when the Segment is not |
| | transmitted as a live stream; see Section 23.2. | | | transmitted as a live stream; see Section 23.2. |
+-----------+----------------------------------------------------+ +-----------+----------------------------------------------------+
skipping to change at line 2950 skipping to change at line 2938
minOccurs: 1 minOccurs: 1
definition: Contains all information relative to a seek point in the definition: Contains all information relative to a seek point in the
Segment. Segment.
5.1.5.1.1. CueTime Element 5.1.5.1.1. CueTime Element
id / type: 0xB3 / uinteger id / type: 0xB3 / uinteger
path: \Segment\Cues\CuePoint\CueTime path: \Segment\Cues\CuePoint\CueTime
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Absolute timestamp of the seek point, expressed in definition: Absolute timestamp of the seek point, expressed in
Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. Segment Ticks, which are based on TimestampScale; see
Section 11.1.
5.1.5.1.2. CueTrackPositions Element 5.1.5.1.2. CueTrackPositions Element
id / type: 0xB7 / master id / type: 0xB7 / master
path: \Segment\Cues\CuePoint\CueTrackPositions path: \Segment\Cues\CuePoint\CueTrackPositions
minOccurs: 1 minOccurs: 1
definition: Contains positions for different tracks corresponding to definition: Contains positions for different tracks corresponding to
the timestamp. the timestamp.
5.1.5.1.2.1. CueTrack Element 5.1.5.1.2.1. CueTrack Element
skipping to change at line 3012 skipping to change at line 3001
maxOccurs: 1 maxOccurs: 1
definition: Number of the Block in the specified Cluster. definition: Number of the Block in the specified Cluster.
5.1.5.1.2.6. CueCodecState Element 5.1.5.1.2.6. CueCodecState Element
id / type / default: 0xEA / uinteger / 0 id / type / default: 0xEA / uinteger / 0
path: \Segment\Cues\CuePoint\CueTrackPositions\CueCodecState path: \Segment\Cues\CuePoint\CueTrackPositions\CueCodecState
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 2 minver: 2
definition: The Segment Position (Section 16) of the Codec State definition: The Segment Position (Section 16) of the Codec State
corresponding to this Cue Element. 0 means that the data is taken corresponding to this Cues Element. 0 means that the data is taken
from the initial Track Entry. from the initial TrackEntry.
5.1.5.1.2.7. CueReference Element 5.1.5.1.2.7. CueReference Element
id / type: 0xDB / master id / type: 0xDB / master
path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference
minver: 2 minver: 2
definition: The Clusters containing the referenced Blocks. definition: The Clusters containing the referenced Blocks.
5.1.5.1.2.8. CueRefTime Element 5.1.5.1.2.8. CueRefTime Element
id / type: 0x96 / uinteger id / type: 0x96 / uinteger
path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefTi path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefTi
me me
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
minver: 2 minver: 2
definition: Timestamp of the referenced Block, expressed in Matroska definition: Timestamp of the referenced Block, expressed in Segment
Ticks -- i.e., in nanoseconds; see Section 11.1. Ticks which is based on TimestampScale; see Section 11.1.
5.1.6. Attachments Element 5.1.6. Attachments Element
id / type: 0x1941A469 / master id / type: 0x1941A469 / master
path: \Segment\Attachments path: \Segment\Attachments
maxOccurs: 1 maxOccurs: 1
definition: Contains attached files. definition: Contains attached files.
5.1.6.1. AttachedFile Element 5.1.6.1. AttachedFile Element
skipping to change at line 3108 skipping to change at line 3097
path: \Segment\Chapters\EditionEntry path: \Segment\Chapters\EditionEntry
minOccurs: 1 minOccurs: 1
definition: Contains all information about a Segment edition. definition: Contains all information about a Segment edition.
5.1.7.1.1. EditionUID Element 5.1.7.1.1. EditionUID Element
id / type: 0x45BC / uinteger id / type: 0x45BC / uinteger
range: not 0 range: not 0
path: \Segment\Chapters\EditionEntry\EditionUID path: \Segment\Chapters\EditionEntry\EditionUID
maxOccurs: 1 maxOccurs: 1
definition: A UID to identify the edition. It's useful for tagging definition: A UID that identifies the edition. It's useful for
an edition. tagging an edition.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.7.1.2. EditionFlagDefault Element 5.1.7.1.2. EditionFlagDefault Element
id / type / default: 0x45DB / uinteger / 0 id / type / default: 0x45DB / uinteger / 0
range: 0-1 range: 0-1
path: \Segment\Chapters\EditionEntry\EditionFlagDefault path: \Segment\Chapters\EditionEntry\EditionFlagDefault
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Set to 1 if the edition SHOULD be used as the default definition: Set to 1 if the edition SHOULD be used as the default
one. one.
skipping to change at line 3145 skipping to change at line 3134
recursive: True recursive: True
definition: Contains the atom information to use as the chapter atom definition: Contains the atom information to use as the chapter atom
(applies to all tracks). (applies to all tracks).
5.1.7.1.4.1. ChapterUID Element 5.1.7.1.4.1. ChapterUID Element
id / type: 0x73C4 / uinteger id / type: 0x73C4 / uinteger
range: not 0 range: not 0
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterUID path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterUID
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: A UID to identify the Chapter. definition: A UID that identifies the Chapter.
stream copy: True (Section 8) stream copy: True (Section 8)
5.1.7.1.4.2. ChapterStringUID Element 5.1.7.1.4.2. ChapterStringUID Element
id / type: 0x5654 / utf-8 id / type: 0x5654 / utf-8
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterStringUID path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterStringUID
maxOccurs: 1 maxOccurs: 1
minver: 3 minver: 3
definition: A unique string ID to identify the Chapter. For definition: A unique string ID that identifies the Chapter. For
example, it is used as the storage for cue identifier values example, it is used as the storage for cue identifier values
[WebVTT]. [WebVTT].
5.1.7.1.4.3. ChapterTimeStart Element 5.1.7.1.4.3. ChapterTimeStart Element
id / type: 0x91 / uinteger id / type: 0x91 / uinteger
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeStart path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeStart
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Timestamp of the start of Chapter, expressed in Matroska definition: Timestamp of the start of Chapter, expressed in Matroska
Ticks -- i.e., in nanoseconds; see Section 11.1. Ticks -- i.e., in nanoseconds; see Section 11.1.
5.1.7.1.4.4. ChapterTimeEnd Element 5.1.7.1.4.4. ChapterTimeEnd Element
id / type: 0x92 / uinteger id / type: 0x92 / uinteger
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd
minOccurs / maxOccurs: see implementation notes / 1 minOccurs / maxOccurs: See Table 31 / 1
definition: Timestamp of the end of Chapter timestamp excluded, definition: Timestamp of the end of Chapter, expressed in Matroska
expressed in Matroska Ticks -- i.e., in nanoseconds; see Ticks -- i.e., in nanoseconds; see Section 11.1. The value MUST
Section 11.1. The value MUST be greater than or equal to the be greater than or equal to the ChapterTimeStart of the same
ChapterTimeStart of the same ChapterAtom. ChapterAtom.
usage notes: With the ChapterTimeEnd timestamp value being excluded, usage notes: With the ChapterTimeEnd timestamp value being excluded,
it MUST take into account the duration of the last frame it it MUST take into account the duration of the last frame it
includes, especially for the ChapterAtom using the last frames of includes, especially for the ChapterAtom using the last frames of
the Segment. the Segment.
notes: See Table 31. notes: See Table 31.
+===========+====================================================+ +===========+====================================================+
| attribute | note | | attribute | note |
+===========+====================================================+ +===========+====================================================+
| minOccurs | ChapterTimeEnd MUST be set (minOccurs=1) if the | | minOccurs | ChapterTimeEnd MUST be set (minOccurs=1) if the |
skipping to change at line 3198 skipping to change at line 3187
Table 31: ChapterTimeEnd Implementation Notes Table 31: ChapterTimeEnd Implementation Notes
5.1.7.1.4.5. ChapterFlagHidden Element 5.1.7.1.4.5. ChapterFlagHidden Element
id / type / default: 0x98 / uinteger / 0 id / type / default: 0x98 / uinteger / 0
range: 0-1 range: 0-1
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Set to 1 if a chapter is hidden. Hidden chapters SHOULD definition: Set to 1 if a chapter is hidden. Hidden chapters SHOULD
NOT be available to the user interface (but still to Control NOT be available to the user interface (but still be available to
Tracks; see Section 20.2.5 on Chapter flags). Control Tracks; see Section 20.2.5 on Chapter flags).
5.1.7.1.4.6. ChapterSegmentUUID Element 5.1.7.1.4.6. ChapterSegmentUUID Element
id / type: 0x6E67 / binary id / type: 0x6E67 / binary
length: 16 length: 16
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentUUID path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentUUID
minOccurs / maxOccurs: see implementation notes / 1 minOccurs / maxOccurs: See Table 32 / 1
definition: The SegmentUUID of another Segment to play during this definition: The SegmentUUID of another Segment to play during this
chapter. chapter.
usage notes: The value MUST NOT be the SegmentUUID value of the usage notes: The value MUST NOT be the SegmentUUID value of the
Segment it belongs to. Segment it belongs to.
notes: See Table 32. notes: See Table 32.
+===========+==============================================+ +===========+==============================================+
| attribute | note | | attribute | note |
+===========+==============================================+ +===========+==============================================+
| minOccurs | ChapterSegmentUUID MUST be set (minOccurs=1) | | minOccurs | ChapterSegmentUUID MUST be set (minOccurs=1) |
skipping to change at line 3278 skipping to change at line 3267
MUST be ignored if a ChapLanguageBCP47 Element is used within the MUST be ignored if a ChapLanguageBCP47 Element is used within the
same ChapterDisplay Element. same ChapterDisplay Element.
5.1.7.1.4.12. ChapLanguageBCP47 Element 5.1.7.1.4.12. ChapLanguageBCP47 Element
id / type: 0x437D / string id / type: 0x437D / string
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha
pLanguageBCP47 pLanguageBCP47
minver: 4 minver: 4
definition: A language corresponding to the ChapString, in the form definition: A language corresponding to the ChapString, in the form
defined in [BCP47]; see Section 12 on language codes. If a defined in [RFC5646]; see Section 12 on language codes. If a
ChapLanguageBCP47 Element is used, then any ChapLanguage and ChapLanguageBCP47 Element is used, then any ChapLanguage and
ChapCountry Elements used in the same ChapterDisplay MUST be ChapCountry Elements used in the same ChapterDisplay MUST be
ignored. ignored.
5.1.7.1.4.13. ChapCountry Element 5.1.7.1.4.13. ChapCountry Element
id / type: 0x437E / string id / type: 0x437E / string
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha
pCountry pCountry
definition: A country corresponding to the string, in the Matroska definition: A country corresponding to the string, in the Matroska
countries form; see Section 13 on country codes. This Element countries form; see Section 13 on country codes. This Element
MUST be ignored if a ChapLanguageBCP47 Element is used within the MUST be ignored if a ChapLanguageBCP47 Element is used within the
same ChapterDisplay Element. same ChapterDisplay Element.
5.1.7.1.4.14. ChapProcess Element 5.1.7.1.4.14. ChapProcess Element
id / type: 0x6944 / master id / type: 0x6944 / master
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess
definition: Contains all the commands associated to the Atom. definition: Contains all the commands associated with the Atom.
5.1.7.1.4.15. ChapProcessCodecID Element 5.1.7.1.4.15. ChapProcessCodecID Element
id / type / default: 0x6955 / uinteger / 0 id / type / default: 0x6955 / uinteger / 0
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr
ocessCodecID ocessCodecID
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: Contains the type of the codec used for processing. A definition: Contains the type of the codec used for processing. A
value of 0 means built-in Matroska processing (to be defined), and value of 0 means built-in Matroska processing (to be defined), and
a value of 1 means the DVD command set is used; see Section 20.3 a value of 1 means the DVD command set is used; see Section 20.3
skipping to change at line 3483 skipping to change at line 3472
+------------+--------------------+ +------------+--------------------+
| SHOT | TargetTypeValue 10 | | SHOT | TargetTypeValue 10 |
+------------+--------------------+ +------------+--------------------+
Table 35: TargetType Values Table 35: TargetType Values
5.1.8.1.1.3. TagTrackUID Element 5.1.8.1.1.3. TagTrackUID Element
id / type / default: 0x63C5 / uinteger / 0 id / type / default: 0x63C5 / uinteger / 0
path: \Segment\Tags\Tag\Targets\TagTrackUID path: \Segment\Tags\Tag\Targets\TagTrackUID
definition: A UID to identify the Track(s) that the tags belong to. definition: A UID that identifies the Track(s) that the tags belong
to.
usage notes: If the value is 0 at this level, the tags apply to all usage notes: If the value is 0 at this level, the tags apply to all
tracks in the Segment. If set to any other value, it MUST match tracks in the Segment. If set to any other value, it MUST match
the TrackUID value of a track found in this Segment. the TrackUID value of a track found in this Segment.
5.1.8.1.1.4. TagEditionUID Element 5.1.8.1.1.4. TagEditionUID Element
id / type / default: 0x63C9 / uinteger / 0 id / type / default: 0x63C9 / uinteger / 0
path: \Segment\Tags\Tag\Targets\TagEditionUID path: \Segment\Tags\Tag\Targets\TagEditionUID
definition: A UID to identify the EditionEntry(s) that the tags definition: A UID that identifies the EditionEntry(s) that the tags
belong to. belong to.
usage notes: If the value is 0 at this level, the tags apply to all usage notes: If the value is 0 at this level, the tags apply to all
editions in the Segment. If set to any other value, it MUST match editions in the Segment. If set to any other value, it MUST match
the EditionUID value of an edition found in this Segment. the EditionUID value of an edition found in this Segment.
5.1.8.1.1.5. TagChapterUID Element 5.1.8.1.1.5. TagChapterUID Element
id / type / default: 0x63C4 / uinteger / 0 id / type / default: 0x63C4 / uinteger / 0
path: \Segment\Tags\Tag\Targets\TagChapterUID path: \Segment\Tags\Tag\Targets\TagChapterUID
definition: A UID to identify the Chapter(s) that the tags belong definition: A UID that identifies the Chapter(s) that the tags
to. belong to.
usage notes: If the value is 0 at this level, the tags apply to all usage notes: If the value is 0 at this level, the tags apply to all
chapters in the Segment. If set to any other value, it MUST match chapters in the Segment. If set to any other value, it MUST match
the ChapterUID value of a chapter found in this Segment. the ChapterUID value of a chapter found in this Segment.
5.1.8.1.1.6. TagAttachmentUID Element 5.1.8.1.1.6. TagAttachmentUID Element
id / type / default: 0x63C6 / uinteger / 0 id / type / default: 0x63C6 / uinteger / 0
path: \Segment\Tags\Tag\Targets\TagAttachmentUID path: \Segment\Tags\Tag\Targets\TagAttachmentUID
definition: A UID to identify the Attachment(s) that the tags belong definition: A UID that identifies the Attachment(s) that the tags
to. belong to.
usage notes: If the value is 0 at this level, the tags apply to all usage notes: If the value is 0 at this level, the tags apply to all
the attachments in the Segment. If set to any other value, it the attachments in the Segment. If set to any other value, it
MUST match the FileUID value of an attachment found in this MUST match the FileUID value of an attachment found in this
Segment. Segment.
5.1.8.1.2. SimpleTag Element 5.1.8.1.2. SimpleTag Element
id / type: 0x67C8 / master id / type: 0x67C8 / master
path: \Segment\Tags\Tag\+SimpleTag path: \Segment\Tags\Tag\+SimpleTag
minOccurs: 1 minOccurs: 1
skipping to change at line 3551 skipping to change at line 3541
Element MUST be ignored if the TagLanguageBCP47 Element is used Element MUST be ignored if the TagLanguageBCP47 Element is used
within the same SimpleTag Element. within the same SimpleTag Element.
5.1.8.1.2.3. TagLanguageBCP47 Element 5.1.8.1.2.3. TagLanguageBCP47 Element
id / type: 0x447B / string id / type: 0x447B / string
path: \Segment\Tags\Tag\+SimpleTag\TagLanguageBCP47 path: \Segment\Tags\Tag\+SimpleTag\TagLanguageBCP47
maxOccurs: 1 maxOccurs: 1
minver: 4 minver: 4
definition: The language used in the TagString, in the form defined definition: The language used in the TagString, in the form defined
in [BCP47]; see Section 12 on language codes. If this Element is in [RFC5646]; see Section 12 on language codes. If this Element
used, then any TagLanguage Elements used in the same SimpleTag is used, then any TagLanguage Elements used in the same SimpleTag
MUST be ignored. MUST be ignored.
5.1.8.1.2.4. TagDefault Element 5.1.8.1.2.4. TagDefault Element
id / type / default: 0x4484 / uinteger / 1 id / type / default: 0x4484 / uinteger / 1
range: 0-1 range: 0-1
path: \Segment\Tags\Tag\+SimpleTag\TagDefault path: \Segment\Tags\Tag\+SimpleTag\TagDefault
minOccurs / maxOccurs: 1 / 1 minOccurs / maxOccurs: 1 / 1
definition: A boolean value to indicate if this is the default/ definition: A boolean value to indicate if this is the default/
original language to use for the given tag. original language to use for the given tag.
skipping to change at line 3750 skipping to change at line 3740
It is sometimes necessary to create a Matroska file from another It is sometimes necessary to create a Matroska file from another
Matroska file, for example, to add subtitles in a language or to edit Matroska file, for example, to add subtitles in a language or to edit
out a portion of the content. Some values from the original Matroska out a portion of the content. Some values from the original Matroska
file need to be kept the same in the destination file. For example, file need to be kept the same in the destination file. For example,
the SamplingFrequency of an audio track wouldn't change between the the SamplingFrequency of an audio track wouldn't change between the
two files. Some other values may change between the two files, for two files. Some other values may change between the two files, for
example, the TrackNumber of an audio track when another track has example, the TrackNumber of an audio track when another track has
been added. been added.
An Element is marked with a property: stream copy: True when the An Element is marked with a property "stream copy: True" when the
values of that Element need to be kept identical between the source values of that Element need to be kept identical between the source
and destination files. If that property is not set, elements may or and destination files. If that property is not set, elements may or
may not keep the same value between the source and destination files. may not keep the same value between the source and destination files.
9. DefaultDecodedFieldDuration 9. DefaultDecodedFieldDuration
The DefaultDecodedFieldDuration Element can signal to the displaying The DefaultDecodedFieldDuration Element can signal to the displaying
application how often fields of a video sequence will be available application how often fields of a video sequence will be available
for displaying. It can be used for both interlaced and progressive for displaying. It can be used for both interlaced and progressive
content. content.
skipping to change at line 3820 skipping to change at line 3810
* the lacing information (optional) * the lacing information (optional)
* the consecutive frame(s) * the consecutive frame(s)
The block header starts with the number of the Track it corresponds The block header starts with the number of the Track it corresponds
to. The value MUST correspond to the TrackNumber (Section 5.1.4.1.1) to. The value MUST correspond to the TrackNumber (Section 5.1.4.1.1)
of a TrackEntry of the Segment. of a TrackEntry of the Segment.
The TrackNumber is coded using the Variable-Size Integer (VINT) The TrackNumber is coded using the Variable-Size Integer (VINT)
mechanism described in Section 4 of [RFC8794]. To save space, the mechanism described in Section 4 of [RFC8794]. To save space, the
shortest VINT form SHOULD be used. The value can be coded on up to 8 shortest VINT form SHOULD be used. The value can be coded using up
octets. This is the only element with a variable size in the block to 8 octets. This is the only element with a variable size in the
header. block header.
The timestamp is expressed in Track Ticks; see Section 11.1. The The timestamp is expressed in Track Ticks; see Section 11.1. The
value is stored as a signed value on 16 bits. value is stored as a signed value on 16 bits.
10.1. Block Structure 10.1. Block Structure
This section describes the binary data contained in the Block Element This section describes the binary data contained in the Block Element
(Section 5.1.3.5.1). Bit 0 is the most significant bit. (Section 5.1.3.5.1). Bit 0 is the most significant bit.
As the TrackNumber size can vary between 1 and 8 octets, there are 8 As the TrackNumber size can vary between 1 and 8 octets, there are 8
skipping to change at line 3881 skipping to change at line 3871
LACING: 2 bits. Uses lacing mode. LACING: 2 bits. Uses lacing mode.
00b: no lacing (Section 10.3.1) 00b: no lacing (Section 10.3.1)
01b: Xiph lacing (Section 10.3.2) 01b: Xiph lacing (Section 10.3.2)
11b: EBML lacing (Section 10.3.3) 11b: EBML lacing (Section 10.3.3)
10b: fixed-size lacing (Section 10.3.4) 10b: fixed-size lacing (Section 10.3.4)
UNU: 1 bit. Unused bit. UNU: 1 bit. Unused bit.
The following data in the Block corresponds to the lacing data and The remaining data in the Block corresponds to the lacing data and
frames usage as described in each respective lacing mode. frames usage as described in each respective lacing mode (see
Section 10.3).
10.2. SimpleBlock Structure 10.2. SimpleBlock Structure
This section describes the binary data contained in the SimpleBlock This section describes the binary data contained in the SimpleBlock
Element (Section 5.1.3.4). Bit 0 is the most significant bit. Element (Section 5.1.3.4). Bit 0 is the most significant bit.
The SimpleBlock structure is inspired by the Block structure; see The SimpleBlock structure is inspired by the Block structure; see
Section 10.1. The main differences are the added Keyframe flag and Section 10.1. The main differences are the added Keyframe flag and
Discardable flag. Otherwise, everything is the same. Discardable flag. Otherwise, everything is the same.
skipping to change at line 3945 skipping to change at line 3936
LACING: 2 bits. Uses lacing mode. LACING: 2 bits. Uses lacing mode.
00b: no lacing (Section 10.3.1) 00b: no lacing (Section 10.3.1)
01b: Xiph lacing (Section 10.3.2) 01b: Xiph lacing (Section 10.3.2)
11b: EBML lacing (Section 10.3.3) 11b: EBML lacing (Section 10.3.3)
10b: fixed-size lacing (Section 10.3.4) 10b: fixed-size lacing (Section 10.3.4)
DIS: 1 bit. Discardable. The frames of the Block can be discarded DIS: 1 bit. Discardable. The frames of the Block can be discarded
during playing if needed. during playing if needed.
The following data in the SimpleBlock corresponds to the lacing data The remaining data in the SimpleBlock corresponds to the lacing data
and frames usage as described in each respective lacing mode. and frames usage as described in each respective lacing mode (see
Section 10.3).
10.3. Block Lacing 10.3. Block Lacing
Lacing is a mechanism to save space when storing data. It is Lacing is a mechanism to save space when storing data. It is
typically used for small blocks of data (referred to as frames in typically used for small blocks of data (referred to as frames in
Matroska). It packs multiple frames into a single Block or Matroska). It packs multiple frames into a single Block or
SimpleBlock. SimpleBlock.
Lacing MUST NOT be used to store a single frame in a Block or Lacing MUST NOT be used to store a single frame in a Block or
SimpleBlock. SimpleBlock.
There are three types of lacing: There are three types of lacing:
* Xiph, which is inspired by what is found in the Ogg container * Xiph, which is inspired by what is found in the Ogg container
[RFC3533] [RFC3533]
* EBML, which is the same with sizes coded differently * EBML, which is the same with sizes coded differently
* Fixed-size, where the size is not coded * Fixed-size, where the size is not coded
When lacing is not used, i.e., to store a single frame, lacing bits 5 When lacing is not used, i.e., to store a single frame, the lacing
and 6 of the Block or SimpleBlock MUST be set to 0. bits (bits 6 and 7) of the Block or SimpleBlock MUST be set to zero.
For example, a user wants to store three frames of the same track. For example, a user wants to store three frames of the same track.
The first frame is 800 octets long, the second is 500 octets long, The first frame is 800 octets long, the second is 500 octets long,
and the third is 1000 octets long. Because these frames are small, and the third is 1000 octets long. Because these frames are small,
they can be stored in a lace to save space. they can be stored in a lace to save space.
It is possible to not use lacing at all and just store a single frame It is possible to not use lacing at all and just store a single frame
without any extra data. When the FlagLacing (Section 5.1.4.1.12) is without any extra data. When the FlagLacing (Section 5.1.4.1.12) is
set to 0, all blocks of that track MUST NOT use lacing. set to 0, all blocks of that track MUST NOT use lacing.
10.3.1. No Lacing 10.3.1. No Lacing
When no lacing is used, the number of frames in the lace is ommitted, When no lacing is used, the number of frames in the lace is ommitted,
and only one frame can be stored in the Block. Bits 5 and 6 of the and only one frame can be stored in the Block. The LACING bits of
Block Header flags are set to 0b00. the Block Header flags are set to 00b.
The Block for an 800-octet frame is as follows: The Block for an 800-octet frame is as follows:
+=============+=========+===================+ +=============+=========+===================+
| Block Octet | Value | Description | | Block Octet | Value | Description |
+=============+=========+===================+ +=============+=========+===================+
| 4-803 | <frame> | Single frame data | | 4-803 | <frame> | Single frame data |
+-------------+---------+-------------------+ +-------------+---------+-------------------+
Table 36: No Lacing Table 36: No Lacing
When a Block contains a single frame, it MUST use this "no lacing" When a Block contains a single frame, it MUST use this "no lacing"
mode. mode.
10.3.2. Xiph Lacing 10.3.2. Xiph Lacing
The Xiph lacing uses the same coding of size as found in the Ogg The Xiph lacing uses the same coding of size as found in the Ogg
container [RFC3533]. Bits 5 and 6 of the Block Header flags are set container [RFC3533]. The LACING bits of the Block Header flags are
to 0b01. set to 01b.
The Block data with laced frames is stored as follows: The Block data with laced frames is stored as follows:
* Lacing Head on 1 octet: Number of frames in the lace minus 1. * Lacing Head on 1 octet: Number of frames in the lace minus 1.
* Lacing size of each frame except the last one. * Lacing size of each frame except the last one.
* Binary data of each frame consecutively. * Binary data of each frame consecutively.
The lacing size is split into 255 values, stored as unsigned octets The lacing size is split into 255 values, stored as unsigned octets
skipping to change at line 4052 skipping to change at line 4044
+--------------+---------------------+--------------------------+ +--------------+---------------------+--------------------------+
Table 37: Xiph Lacing Example Table 37: Xiph Lacing Example
The Block is 2311 octets, and the last frame starts at 1311, so we The Block is 2311 octets, and the last frame starts at 1311, so we
can deduce that the size of the last frame is 2311 - 1311 = 1000. can deduce that the size of the last frame is 2311 - 1311 = 1000.
10.3.3. EBML Lacing 10.3.3. EBML Lacing
The EBML lacing encodes the frame size with an EBML-like encoding The EBML lacing encodes the frame size with an EBML-like encoding
[RFC8794]. Bits 5 and 6 of the Block Header flags are set to 0b11. [RFC8794]. The LACING bits of the Block Header flags are set to 11b.
The Block data with laced frames is stored as follows: The Block data with laced frames is stored as follows:
* Lacing Head on 1 Octet: Number of frames in the lace minus 1. * Lacing Head on 1 Octet: Number of frames in the lace minus 1.
* Lacing size of each frame except the last one. * Lacing size of each frame except the last one.
* Binary data of each frame consecutively. * Binary data of each frame consecutively.
The first frame size is encoded as an EBML VINT value. The remaining The first frame size is encoded as an EBML VINT value. The remaining
skipping to change at line 4091 skipping to change at line 4083
+-----------------------------------+----------------------+ +-----------------------------------+----------------------+
| 0001 xxxx xxxx xxxx xxxx xxxx | 2^28 values from | | 0001 xxxx xxxx xxxx xxxx xxxx | 2^28 values from |
| xxxx xxxx | -(2^27-1) to 2^27 | | xxxx xxxx | -(2^27-1) to 2^27 |
+-----------------------------------+----------------------+ +-----------------------------------+----------------------+
| 0000 1xxx xxxx xxxx xxxx xxxx | 2^35 values from | | 0000 1xxx xxxx xxxx xxxx xxxx | 2^35 values from |
| xxxx xxxx xxxx xxxx | -(2^34-1) to 2^34 | | xxxx xxxx xxxx xxxx | -(2^34-1) to 2^34 |
+-----------------------------------+----------------------+ +-----------------------------------+----------------------+
Table 38: EBML Lacing Signed VINT Bits Usage Table 38: EBML Lacing Signed VINT Bits Usage
In our example, the 800-, 500- and 1000-octet frames are stored with In our example, the 800-, 500-, and 1000-octet frames are stored with
EBML lacing in a Block as follows: EBML lacing in a Block as follows:
+==============+===========+=====================================+ +==============+===========+=====================================+
| Block Octets | Value | Description | | Block Octets | Value | Description |
+==============+===========+=====================================+ +==============+===========+=====================================+
| 4 | 0x02 | Number of frames minus 1 | | 4 | 0x02 | Number of frames minus 1 |
+--------------+-----------+-------------------------------------+ +--------------+-----------+-------------------------------------+
| 5-6 | 0x43 0x20 | Size of the first frame (800 = | | 5-6 | 0x43 0x20 | Size of the first frame (800 = |
| | | 0x320 + 0x4000) | | | | 0x320 + 0x4000) |
+--------------+-----------+-------------------------------------+ +--------------+-----------+-------------------------------------+
skipping to change at line 4122 skipping to change at line 4114
Table 39: EBML Lacing Example Table 39: EBML Lacing Example
The Block is 2308 octets, and the last frame starts at 1308, so we The Block is 2308 octets, and the last frame starts at 1308, so we
can deduce that the size of the last frame is 2308 - 1308 = 1000. can deduce that the size of the last frame is 2308 - 1308 = 1000.
10.3.4. Fixed-size Lacing 10.3.4. Fixed-size Lacing
Fixed-size lacing doesn't store the frame size; rather, it only Fixed-size lacing doesn't store the frame size; rather, it only
stores the number of frames in the lace. Each frame MUST have the stores the number of frames in the lace. Each frame MUST have the
same size. The frame size of each frame is deduced from the total same size. The frame size of each frame is deduced from the total
size of the Block. Bits 5 and 6 of the Block Header flags are set to size of the Block. The LACING bits of the Block Header flags are set
0b10. to 10b.
The Block data with laced frames is stored as follows: The Block data with laced frames is stored as follows:
* Lacing Head on 1 Octet: Number of frames in the lace minus 1. * Lacing Head on 1 Octet: Number of frames in the lace minus 1.
* Binary data of each frame consecutively. * Binary data of each frame consecutively.
For example, for three frames that are 800 octets each: For example, for three frames that are 800 octets each:
+==============+==========+==========================+ +==============+==========+==========================+
skipping to change at line 4184 skipping to change at line 4176
Random Access Points (RAPs) are positions where the parser can seek Random Access Points (RAPs) are positions where the parser can seek
to and start playback without decoding what was before. In Matroska, to and start playback without decoding what was before. In Matroska,
BlockGroups and SimpleBlocks can be RAPs. To seek to these elements, BlockGroups and SimpleBlocks can be RAPs. To seek to these elements,
it is still necessary to seek to the Cluster containing them, read it is still necessary to seek to the Cluster containing them, read
the Cluster Timestamp, and start playback from the BlockGroup or the Cluster Timestamp, and start playback from the BlockGroup or
SimpleBlock that is a RAP. SimpleBlock that is a RAP.
Because a Matroska File is usually composed of multiple tracks Because a Matroska File is usually composed of multiple tracks
playing at the same time -- video, audio, and subtitles -- to seek playing at the same time -- video, audio, and subtitles -- to seek
properly to a RAP, each selected track must be taken in account. properly to a RAP, each selected track must be taken into account.
Usually, all audio and subtitle BlockGroups or SimpleBlocks are RAPs. Usually, all audio and subtitle BlockGroups or SimpleBlocks are RAPs.
They are independent of each other and can be played randomly. They are independent of each other and can be played randomly.
On the other hand, video tracks often use references to previous and On the other hand, video tracks often use references to previous and
future frames for better coding efficiency. Frames with such future frames for better coding efficiency. Frames with such
references MUST either contain one or more ReferenceBlock Elements in references MUST either contain one or more ReferenceBlock Elements in
their BlockGroup or MUST be marked as non-keyframe in a SimpleBlock; their BlockGroup or MUST be marked as non-keyframe in a SimpleBlock;
see Section 10.2. see Section 10.2.
BlockGroup with a frame that references another frame, with the EBML
tree shown as XML:
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- References a Block 40 Track Ticks before this one --> <!-- References a Block 40 Track Ticks before this one -->
<ReferenceBlock>-40</ReferenceBlock> <ReferenceBlock>-40</ReferenceBlock>
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
SimpleBlock with a frame that references another frame, with the EBML Figure 15: BlockGroup with a Frame That References Another Frame,
tree shown as XML: with the EBML Tree Shown as XML
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<SimpleBlock/> (octet 3 bit 0 not set) <SimpleBlock/> (octet 3 bit 0 not set)
... ...
</Cluster> </Cluster>
Figure 16: SimpleBlock with a Frame That References Another
Frame, with the EBML Tree Shown as XML
Frames that are RAPs (i.e., frames that don't depend on other frames) Frames that are RAPs (i.e., frames that don't depend on other frames)
MUST set the keyframe flag if they are in a SimpleBlock or their MUST set the keyframe flag if they are in a SimpleBlock or their
parent BlockGroup MUST NOT contain a ReferenceBlock. parent BlockGroup MUST NOT contain a ReferenceBlock.
BlockGroup with a frame that references no other frame, with the EBML
tree shown as XML:
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- No ReferenceBlock allowed in this BlockGroup --> <!-- No ReferenceBlock allowed in this BlockGroup -->
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
SimpleBlock with a frame that references no other frame, with the Figure 17: BlockGroup with a Frame That References No Other
EBML tree shown as XML: Frame, with the EBML Tree Shown as XML
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<SimpleBlock/> (octet 3 bit 0 set) <SimpleBlock/> (octet 3 bit 0 set)
... ...
</Cluster> </Cluster>
Figure 18: SimpleBlock with a Frame That References No Other
Frame, with the EBML Tree Shown as XML
There may be cases where the use of BlockGroup is necessary, as the There may be cases where the use of BlockGroup is necessary, as the
frame may need a BlockDuration, BlockAdditions, CodecState, or frame may need a BlockDuration, BlockAdditions, CodecState, or
DiscardPadding element. For thoses cases, a SimpleBlock MUST NOT be DiscardPadding element. For thoses cases, a SimpleBlock MUST NOT be
used; the reference information SHOULD be recovered for non-RAP used; the reference information SHOULD be recovered for non-RAP
frames. frames.
SimpleBlock with a frame that references another frame, with the EBML
tree shown as XML:
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<SimpleBlock/> (octet 3 bit 0 not set) <SimpleBlock/> (octet 3 bit 0 not set)
... ...
</Cluster> </Cluster>
Same frame that references another frame put inside a BlockGroup to Figure 19: SimpleBlock with a Frame That References Another
add BlockDuration, with the EBML tree shown as XML: Frame, with the EBML Tree Shown as XML
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- ReferenceBlock value recovered based on the codec --> <!-- ReferenceBlock value recovered based on the codec -->
<ReferenceBlock>-40</ReferenceBlock> <ReferenceBlock>-40</ReferenceBlock>
<BlockDuration>20</BlockDuration> <BlockDuration>20</BlockDuration>
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
Figure 20: Same Frame That References Another Frame Put inside a
BlockGroup to Add BlockDuration, with the EBML Tree Shown as XML
When a frame in a BlockGroup is not a RAP, the BlockGroup MUST When a frame in a BlockGroup is not a RAP, the BlockGroup MUST
contain at least a ReferenceBlock. The ReferenceBlocks MUST be used contain at least a ReferenceBlock. The ReferenceBlocks MUST be used
in one of the following ways: in one of the following ways:
* each reference frame listed as a ReferenceBlock, * each reference frame listed as a ReferenceBlock,
* some referenced frames listed as a ReferenceBlock, even if the * some referenced frames listed as a ReferenceBlock, even if the
timestamp value is accurate, or timestamp value is accurate, or
* one ReferenceBlock with the timestamp value "0" corresponding to a * one ReferenceBlock with the timestamp value "0" corresponding to a
self or unknown reference. self or unknown reference.
The lack of ReferenceBlock would mean such a frame is a RAP, and The lack of ReferenceBlock would mean such a frame is a RAP, and
seeking on that frame that actually depends on other frames may seeking on that frame that actually depends on other frames may
create a bogus output or even crash. create a bogus output or even crash.
Same frame that references another frame put inside a BlockGroup, but
the reference could not be recovered, with the EBML tree shown as
XML:
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- ReferenceBlock value not recovered from the codec --> <!-- ReferenceBlock value not recovered from the codec -->
<ReferenceBlock>0</ReferenceBlock> <ReferenceBlock>0</ReferenceBlock>
<BlockDuration>20</BlockDuration> <BlockDuration>20</BlockDuration>
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
BlockGroup with a frame that references two other frames, with the Figure 21: Same Frame That References Another Frame Put inside a
EBML tree shown as XML: BlockGroup, but the Reference Could Not Be Recovered, with the
EBML Tree Shown as XML
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- References a Block 80 Track Ticks before this one --> <!-- References a Block 80 Track Ticks before this one -->
<ReferenceBlock>-80</ReferenceBlock> <ReferenceBlock>-80</ReferenceBlock>
<!-- References a Block 40 Track Ticks after this one --> <!-- References a Block 40 Track Ticks after this one -->
<ReferenceBlock>40</ReferenceBlock> <ReferenceBlock>40</ReferenceBlock>
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
Figure 22: BlockGroup with a Frame That References Two Other
Frames, with the EBML Tree Shown as XML
Intra-only video frames, such as the ones found in AV1 or VP9, can be Intra-only video frames, such as the ones found in AV1 or VP9, can be
decoded without any other frame, but they don't reset the codec decoded without any other frame, but they don't reset the codec
state. Thus, seeking to these frames is not possible, as the next state. Thus, seeking to these frames is not possible, as the next
frames may need frames that are not known from this seeking point. frames may need frames that are not known from this seeking point.
Such intra-only frames MUST NOT be considered as keyframes, so the Such intra-only frames MUST NOT be considered as keyframes, so the
keyframe flag MUST NOT be set in the SimpleBlock or a ReferenceBlock keyframe flag MUST NOT be set in the SimpleBlock or a ReferenceBlock
MUST be used to signify the frame is not a RAP. The timestamp value MUST be used to signify the frame is not a RAP. The timestamp value
of the ReferenceBlock MUST be "0", meaning it's referencing itself. of the ReferenceBlock MUST be "0", meaning it's referencing itself.
Intra-only frame not an RAP, with the EBML tree shown as XML:
<Cluster> <Cluster>
<Timestamp>123456</Timestamp> <Timestamp>123456</Timestamp>
<BlockGroup> <BlockGroup>
<!-- References itself to mark it should not be used as RAP --> <!-- References itself to mark it should not be used as RAP -->
<ReferenceBlock>0</ReferenceBlock> <ReferenceBlock>0</ReferenceBlock>
<Block/> <Block/>
</BlockGroup> </BlockGroup>
... ...
</Cluster> </Cluster>
Figure 23: Intra-Only Frame (Not a RAP), with the EBML Tree Shown
as XML
Because a video SimpleBlock has less information on references than a Because a video SimpleBlock has less information on references than a
video BlockGroup, it is possible to remux a video track using video BlockGroup, it is possible to remux a video track using
BlockGroup into a SimpleBlock, as long as it doesn't use any other BlockGroup into a SimpleBlock, as long as it doesn't use any other
BlockGroup features than ReferenceBlock. BlockGroup features than ReferenceBlock.
11. Timestamps 11. Timestamps
Historically, timestamps in Matroska were mistakenly called Historically, timestamps in Matroska were mistakenly called
timecodes. The Timestamp Element was called Timecode, the timecodes. The Timestamp Element was called Timecode, the
TimestampScale Element was called TimecodeScale, the TimestampScale Element was called TimecodeScale, the
skipping to change at line 4358 skipping to change at line 4351
ReferenceTimestamp Element was called ReferenceTimeCode. ReferenceTimestamp Element was called ReferenceTimeCode.
11.1. Timestamp Ticks 11.1. Timestamp Ticks
All timestamp values in Matroska are expressed in multiples of a All timestamp values in Matroska are expressed in multiples of a
tick. They are usually stored as integers. There are three types of tick. They are usually stored as integers. There are three types of
ticks possible: Matroska Ticks, Segment Ticks, and Track Ticks. ticks possible: Matroska Ticks, Segment Ticks, and Track Ticks.
11.1.1. Matroska Ticks 11.1.1. Matroska Ticks
For such elements, the timestamp value is stored directly in The timestamp value is stored directly in nanoseconds.
nanoseconds.
The elements storing values in Matroska Ticks/nanoseconds are: The elements storing values in Matroska Ticks/nanoseconds are:
* TrackEntry\DefaultDuration; defined in Section 5.1.4.1.13 * TrackEntry\DefaultDuration; defined in Section 5.1.4.1.13
* TrackEntry\DefaultDecodedFieldDuration; defined in * TrackEntry\DefaultDecodedFieldDuration; defined in
Section 5.1.4.1.14 Section 5.1.4.1.14
* TrackEntry\SeekPreRoll; defined in Section 5.1.4.1.26 * TrackEntry\SeekPreRoll; defined in Section 5.1.4.1.26
* TrackEntry\CodecDelay; defined in Section 5.1.4.1.25 * TrackEntry\CodecDelay; defined in Section 5.1.4.1.25
* BlockGroup\DiscardPadding; defined in Section 5.1.3.5.7 * BlockGroup\DiscardPadding; defined in Section 5.1.3.5.7
* ChapterAtom\ChapterTimeStart; defined in Section 5.1.7.1.4.3 * ChapterAtom\ChapterTimeStart; defined in Section 5.1.7.1.4.3
* ChapterAtom\ChapterTimeEnd; defined in Section 5.1.7.1.4.4 * ChapterAtom\ChapterTimeEnd; defined in Section 5.1.7.1.4.4
* CuePoint\CueTime; defined in Section 5.1.5.1.1
* CueReference\CueRefTime; defined in Section 5.1.5.1.1
11.1.2. Segment Ticks 11.1.2. Segment Ticks
Elements in Segment Ticks involve the use of the TimestampScale Elements in Segment Ticks involve the use of the TimestampScale
Element of the Segment to get the timestamp in nanoseconds of the Element of the Segment to get the timestamp in nanoseconds of the
element, with the following formula: element, with the following formula:
timestamp in nanosecond = element value * TimestampScale timestamp in nanosecond = element value * TimestampScale
This allows for storage of smaller integer values in the elements. This allows for storage of smaller integer values in the elements.
When using the default value of "1,000,000" for TimestampScale, one When using the default value of "1,000,000" for TimestampScale, one
Segment Tick represents one millisecond. Segment Tick represents one millisecond.
The elements storing values in Segment Ticks are: The elements storing values in Segment Ticks are:
* Cluster\Timestamp; defined in Section 5.1.3.1 * Cluster\Timestamp; defined in Section 5.1.3.1
* Info\Duration is stored as a floating-point, but the same formula * Info\Duration is stored as a floating-point, but the same formula
applies; defined in Section 5.1.2.10 applies; defined in Section 5.1.2.10
* CuePoint\CueTime; defined in Section 5.1.5.1.1
* CuePoint\CueTrackPositions\CueDuration; defined in * CuePoint\CueTrackPositions\CueDuration; defined in
Section 5.1.5.1.2.4 Section 5.1.5.1.2.4
* CueReference\CueRefTime; defined in Section 5.1.5.1.1
11.1.3. Track Ticks 11.1.3. Track Ticks
Elements in Track Ticks involve the use of the TimestampScale Element Elements in Track Ticks involve the use of the TimestampScale Element
of the Segment and the TrackTimestampScale Element of the Track to of the Segment and the TrackTimestampScale Element of the Track to
get the timestamp in nanoseconds of the element, with the following get the timestamp in nanoseconds of the element, with the following
formula: formula:
timestamp in nanoseconds = timestamp in nanoseconds =
element value * TrackTimestampScale * TimestampScale element value * TrackTimestampScale * TimestampScale
skipping to change at line 4497 skipping to change at line 4489
12. Language Codes 12. Language Codes
Matroska versions 1 through 3 use language codes that can be either Matroska versions 1 through 3 use language codes that can be either
the three-letter bibliographic ISO 639-2 form [ISO639-2] (like "fre" the three-letter bibliographic ISO 639-2 form [ISO639-2] (like "fre"
for French) or such a language code followed by a dash and a country for French) or such a language code followed by a dash and a country
code for specialities in languages (like "fre-ca" for Canadian code for specialities in languages (like "fre-ca" for Canadian
French). The ISO 639-2 Language Elements are "Language Element", French). The ISO 639-2 Language Elements are "Language Element",
"TagLanguage Element", and "ChapLanguage Element". "TagLanguage Element", and "ChapLanguage Element".
Starting in Matroska version 4, either [ISO639-2] or [BCP47] MAY be Starting in Matroska version 4, the forms defined in either
used, although BCP 47 is RECOMMENDED. The BCP 47 Language Elements [ISO639-2] or [RFC5646] MAY be used, although the form in [RFC5646]
are "LanguageBCP47 Element", "TagLanguageBCP47 Element", and is RECOMMENDED. The Language Elements in the [RFC5646] form are
"ChapLanguageBCP47 Element". If a BCP 47 Language Element and an ISO "LanguageBCP47 Element", "TagLanguageBCP47 Element", and
639-2 Language Element are used within the same Parent Element, then "ChapLanguageBCP47 Element". If both an [ISO639-2] Language Element
the ISO 639-2 Language Element MUST be ignored and precedence given and an [RFC5646] Language Element are used within the same Parent
to the BCP 47 Language Element. Element, then the Language Element in the [ISO639-2] form MUST be
ignored and precedence given to the Language Element in the [RFC5646]
form.
In this document, "BCP47" in element names refers specifically to
[RFC5646], which is part of BCP 47.
13. Country Codes 13. Country Codes
Country codes are the [BCP47] two-letter region subtags, without the Country codes are the [RFC5646] two-letter region subtags, without
UK exception. the UK exception.
14. Encryption 14. Encryption
This Matroska specification provides no interoperable solution for This Matroska specification provides no interoperable solution for
securing the data container with any assurances of confidentiality, securing the data container with any assurances of confidentiality,
integrity, authenticity, or to provide authorization. The integrity, authenticity, or authorization. The ContentEncryption
ContentEncryption Element (Section 5.1.4.1.31.8) and associated sub- Element (Section 5.1.4.1.31.8) and associated sub-fields
fields (Section 5.1.4.1.31.9 to Section 5.1.4.1.31.12) are defined (Section 5.1.4.1.31.9 to Section 5.1.4.1.31.12) are defined only for
only for the benefit of implementers to construct their own the benefit of implementers to construct their own proprietary
proprietary solution or as the basis for further standardization solution or as the basis for further standardization activities. How
activities. How to use these fields to secure a Matroska data to use these fields to secure a Matroska data container is out of
container is out of scope, as are any related issues such as key scope, as are any related issues such as key management and
management and distribution. distribution.
A Matroska Reader who encounters containers that use the fields A Matroska Reader who encounters containers that use the fields
defined in this section MUST rely on out-of-scope guidance to decode defined in this section MUST rely on out-of-scope guidance to decode
the associated content. the associated content.
Because encryption occurs within the Block Element, it is possible to Because encryption occurs within the Block Element, it is possible to
manipulate encrypted streams without decrypting them. The streams manipulate encrypted streams without decrypting them. The streams
could potentially be copied, deleted, cut, appended, or any number of could potentially be copied, deleted, cut, appended, or any number of
other possible editing techniques without decryption. The data can other possible editing techniques without decryption. The data can
be used without having to expose it or go through the decrypting be used without having to expose it or go through the decrypting
skipping to change at line 4573 skipping to change at line 4570
these algorithms to read previously made archives or streams. these algorithms to read previously made archives or streams.
15. Image Presentation 15. Image Presentation
15.1. Cropping 15.1. Cropping
The PixelCrop Elements (PixelCropTop, PixelCropBottom, The PixelCrop Elements (PixelCropTop, PixelCropBottom,
PixelCropRight, and PixelCropLeft) indicate when, and by how much, PixelCropRight, and PixelCropLeft) indicate when, and by how much,
encoded video frames SHOULD be cropped for display. These Elements encoded video frames SHOULD be cropped for display. These Elements
allow edges of the frame that are not intended for display (such as allow edges of the frame that are not intended for display (such as
the sprockets of a full-frame film scan or the VANC area of a the sprockets of a full-frame film scan or the Video ANCillary (VANC)
digitized analog videotape) to be stored but hidden. PixelCropTop area of a digitized analog videotape) to be stored but hidden.
and PixelCropBottom store an integer of how many rows of pixels PixelCropTop and PixelCropBottom store an integer of how many rows of
SHOULD be cropped from the top and bottom of the image, respectively. pixels SHOULD be cropped from the top and bottom of the image,
PixelCropLeft and PixelCropRight store an integer of how many columns respectively. PixelCropLeft and PixelCropRight store an integer of
of pixels SHOULD be cropped from the left and right of the image, how many columns of pixels SHOULD be cropped from the left and right
respectively. of the image, respectively.
For example, a pillar-boxed video that stores a 1440x1080 visual For example, a pillar-boxed video that stores a 1440x1080 visual
image within the center of a padded 1920x1080 encoded image may set image within the center of a padded 1920x1080 encoded image may set
both PixelCropLeft and PixelCropRight to "240", so a Matroska Player both PixelCropLeft and PixelCropRight to "240", so a Matroska Player
should crop off 240 columns of pixels from the left and right of the should crop off 240 columns of pixels from the left and right of the
encoded image to present the image with the pillar-boxes hidden. encoded image to present the image with the pillar-boxes hidden.
Cropping has to be performed before resizing and the display Cropping has to be performed before resizing and the display
dimensions given by DisplayWidth, DisplayHeight, and DisplayUnit dimensions given by DisplayWidth, DisplayHeight, and DisplayUnit
apply to the already-cropped image. apply to the already-cropped image.
15.2. Rotation 15.2. Rotation
The ProjectionPoseRoll Element (Section 5.1.4.1.28.46) can be used to The ProjectionPoseRollElement (Section 5.1.4.1.28.46) can be used to
indicate that the image from the associated video track SHOULD be indicate that the image from the associated video track SHOULD be
rotated for presentation. For instance, the following example of the rotated for presentation. For instance, the following example of the
Projection Element (Section 5.1.4.1.28.41) and the ProjectionPoseRoll Projection Element (Section 5.1.4.1.28.41) and the ProjectionPoseRoll
Element represents a video track where the image SHOULD be presented Element represents a video track where the image SHOULD be presented
with a 90-degree counter-clockwise rotation, with the EBML tree shown with a 90-degree counter-clockwise rotation, with the EBML tree shown
as XML: as XML:
<Projection> <Projection>
<ProjectionPoseRoll>90</ProjectionPoseRoll> <ProjectionPoseRoll>90</ProjectionPoseRoll>
</Projection> </Projection>
Figure 15: Rotation Example Figure 24: Rotation Example
16. Segment Position 16. Segment Position
The Segment Position of an Element refers to the position of the The Segment Position of an Element refers to the position of the
first octet of the Element ID of that Element, measured in octets, first octet of the Element ID of that Element, measured in octets,
from the beginning of the Element Data section of the containing from the beginning of the Element Data section of the containing
Segment Element. In other words, the Segment Position of an Element Segment Element. In other words, the Segment Position of an Element
is the distance in octets from the beginning of its containing is the distance in octets from the beginning of its containing
Segment Element minus the size of the Element ID and Element Data Segment Element minus the size of the Element ID and Element Data
Size of that Segment Element. The Segment Position of the first Size of that Segment Element. The Segment Position of the first
skipping to change at line 4789 skipping to change at line 4786
|end.mkv |6c92285fa6d3e827| n/a | Invalid | |end.mkv |6c92285fa6d3e827| n/a | Invalid |
| |b198d120ea3ac674| | | | |b198d120ea3ac674| | |
+----------+----------------+------------------+------------------+ +----------+----------------+------------------+------------------+
Table 44: Hard Linking with Mixed UID Links Table 44: Hard Linking with Mixed UID Links
17.2. Medium Linking 17.2. Medium Linking
Medium Linking creates relationships between Segments using Ordered Medium Linking creates relationships between Segments using Ordered
Chapters (Section 20.1.3) and the ChapterSegmentUUID Element. A Chapters (Section 20.1.3) and the ChapterSegmentUUID Element. A
Chapter Edition with Ordered Chapters MAY contain Chapter elements Chapter Edition with Ordered Chapters MAY contain Chapters elements
that reference timestamp ranges from other Segments. The Segment that reference timestamp ranges from other Segments. The Segment
referenced by the Ordered Chapter via the ChapterSegmentUUID Element referenced by the Ordered Chapter via the ChapterSegmentUUID Element
SHOULD be played as part of a Linked Segment. SHOULD be played as part of a Linked Segment.
The timestamps of Segment content referenced by Ordered Chapters MUST The timestamps of Segment content referenced by Ordered Chapters MUST
be adjusted according to the cumulative duration of the previous be adjusted according to the cumulative duration of the previous
Ordered Chapters. Ordered Chapters.
As an example, a file named intro.mkv could have a SegmentUUID of As an example, a file named intro.mkv could have a SegmentUUID of
"0xb16a58609fc7e60653a60c984fc11ead". Another file called "0xb16a58609fc7e60653a60c984fc11ead". Another file called
skipping to change at line 4821 skipping to change at line 4818
NOT be the SegmentUUID of its own Segment. NOT be the SegmentUUID of its own Segment.
There are two ways to use a chapter link: There are two ways to use a chapter link:
* Linked-Duration linking * Linked-Duration linking
* Linked-Edition linking * Linked-Edition linking
17.2.1. Linked-Duration 17.2.1. Linked-Duration
A Matroska Player MUST play the content of the linked Segment from A Matroska Player MUST play the content of the Linked Segment from
the ChapterTimeStart until the ChapterTimeEnd timestamp in place of the ChapterTimeStart until the ChapterTimeEnd timestamp in place of
the Linked Chapter. the Linked Chapter.
ChapterTimeStart and ChapterTimeEnd represent timestamps in the ChapterTimeStart and ChapterTimeEnd represent timestamps in the
Linked Segment matching the value of ChapterSegmentUUID. Their Linked Segment matching the value of ChapterSegmentUUID. Their
values MUST be in the range of the linked Segment duration. values MUST be in the range of the Linked Segment duration.
The ChapterTimeEnd value MUST be set when using Linked-Duration The ChapterTimeEnd value MUST be set when using Linked-Duration
chapter linking. ChapterSegmentEditionUID MUST NOT be set. chapter linking. ChapterSegmentEditionUID MUST NOT be set.
17.2.2. Linked-Edition 17.2.2. Linked-Edition
A Matroska Player MUST play the whole Linked Edition of the linked A Matroska Player MUST play the whole Linked Edition of the Linked
Segment in place of the Linked Chapter. Segment in place of the Linked Chapter.
ChapterSegmentEditionUID represents a valid Edition from the Linked ChapterSegmentEditionUID represents a valid Edition from the Linked
Segment matching the value of ChapterSegmentUUID. Segment matching the value of ChapterSegmentUUID.
When using Linked-Edition chapter linking, ChapterTimeEnd is When using Linked-Edition chapter linking, ChapterTimeEnd is
OPTIONAL. OPTIONAL.
18. Track Flags 18. Track Flags
skipping to change at line 4875 skipping to change at line 4872
any subtitles to be displayed alongside the audio track that is any subtitles to be displayed alongside the audio track that is
currently selected. This can be used to indicate that a track currently selected. This can be used to indicate that a track
contains translations of on-screen text or dialogue spoken in a contains translations of on-screen text or dialogue spoken in a
different language than the track's primary language. different language than the track's primary language.
18.3. Hearing-Impaired Flag 18.3. Hearing-Impaired Flag
The Hearing-Impaired flag tells the Matroska Player that it SHOULD The Hearing-Impaired flag tells the Matroska Player that it SHOULD
prefer this track when selecting a default track for a user with a prefer this track when selecting a default track for a user with a
hearing impairment and that it MAY prefer to select a different track hearing impairment and that it MAY prefer to select a different track
when selecting a default track for a user that is not hearing- when selecting a default track for a user that is not hearing
impaired. impaired.
18.4. Visual-Impaired Flag 18.4. Visual-Impaired Flag
The Visual-Impaired flag tells the Matroska Player that it SHOULD The Visual-Impaired flag tells the Matroska Player that it SHOULD
prefer this track when selecting a default track for a user with a prefer this track when selecting a default track for a user with a
visual impairment and that it MAY prefer to select a different track visual impairment and that it MAY prefer to select a different track
when selecting a default track for a user that is not visually when selecting a default track for a user that is not visually
impaired. impaired.
skipping to change at line 4897 skipping to change at line 4894
The Descriptions flag tells the Matroska Player that this track is The Descriptions flag tells the Matroska Player that this track is
suitable to play via a text-to-speech system for a user with a visual suitable to play via a text-to-speech system for a user with a visual
impairment and that it SHOULD NOT automatically select this track impairment and that it SHOULD NOT automatically select this track
when selecting a default track for a user that is not visually when selecting a default track for a user that is not visually
impaired. impaired.
18.6. Original Flag 18.6. Original Flag
The Original flag tells the Matroska Player that this track is in the The Original flag tells the Matroska Player that this track is in the
original language and that it SHOULD prefer the original language if original language and that it SHOULD prefer this track if configured
configured to prefer original-language tracks of this track's type. to prefer original-language tracks of this track's type.
18.7. Commentary Flag 18.7. Commentary Flag
The Commentary flag tells the Matroska Player that this track The Commentary flag tells the Matroska Player that this track
contains commentary on the content. contains commentary on the content.
18.8. Track Operation 18.8. Track Operation
TrackOperation allows for the combination of multiple tracks to make TrackOperation allows for the combination of multiple tracks to make
a virtual one. It uses two separate system to combine tracks. One a virtual one. It uses two separate system to combine tracks. One
skipping to change at line 4929 skipping to change at line 4926
In the case of TrackJoinBlocks, the Block Elements (from BlockGroup In the case of TrackJoinBlocks, the Block Elements (from BlockGroup
and SimpleBlock) of all the tracks SHOULD be used as if they were and SimpleBlock) of all the tracks SHOULD be used as if they were
defined for this new virtual Track. When two Block Elements have defined for this new virtual Track. When two Block Elements have
overlapping start or end timestamps, it's up to the underlying system overlapping start or end timestamps, it's up to the underlying system
to either drop some of these frames or render them the way they to either drop some of these frames or render them the way they
overlap. This situation SHOULD be avoided when creating such tracks, overlap. This situation SHOULD be avoided when creating such tracks,
as you can never be sure of the end result on different platforms. as you can never be sure of the end result on different platforms.
18.9. Overlay Track 18.9. Overlay Track
Overlay tracks SHOULD be rendered in the same channel as the track An overlay track SHOULD be rendered in the same channel as the track
it's linked to. When content is found in such a track, it SHOULD be it's linked to. When content is found in such a track, it SHOULD be
played on the rendering channel instead of the original track. played on the rendering channel instead of the original track.
18.10. Multi-planar and 3D Videos 18.10. Multi-planar and 3D Videos
There are two different ways to compress 3D videos: have each eye There are two different ways to compress 3D videos: have each eye
track in a separate track and have one track have both eyes combined track in a separate track and have one track have both eyes combined
inside (which is more efficient compression-wise). Matroska supports inside (which is more efficient compression-wise). Matroska supports
both ways. both ways.
For the single-track variant, there is the StereoMode Element, which For the single-track variant, there is the StereoMode Element, which
defines how planes are assembled in the track (mono or left-right defines how planes are assembled in the track (mono or left-right
combined). Odd values of StereoMode means the left plane comes first combined). Odd values of StereoMode means the left plane comes first
for more convenient reading. The pixel count of the track for more convenient reading. The pixel count of the track
(PixelWidth/PixelHeight) is the raw number of pixels (for example, (PixelWidth/PixelHeight) is the raw number of pixels (for example,
3840x1080 for full HD side by side), and the DisplayWidth/ 3840x1080 for full HD side by side), and the DisplayWidth/
DisplayHeight in pixels is the number of pixels for one plane DisplayHeight in pixels is the number of pixels for one plane
(1920x1080 for that full HD stream). Old stereo 3D were displayed (1920x1080 for that full HD stream). Old stereo 3D movies were
using anaglyph (cyan and red colors separated). For compatibility displayed using anaglyph (cyan and red colors separated). For
with such movies, there is a value of the StereoMode that corresponds compatibility with such movies, there is a value of the StereoMode
to AnaGlyph. that corresponds to anaglyph.
There is also a "packed" mode (values 13 and 14) that consists of There is also a "packed" mode (values 13 and 14) that consists of
packing two frames together in a Block that uses lacing. The first packing two frames together in a Block that uses lacing. The first
frame is the left eye and the other frame is the right eye (or vice 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 versa). The frames SHOULD be decoded in that order and are possibly
dependent on each other (P and B frames). dependent on each other (P and B frames).
For separate tracks, Matroska needs to define exactly which track For separate tracks, Matroska needs to define exactly which track
does what. TrackOperation with TrackCombinePlanes does that. For does what. TrackOperation with TrackCombinePlanes does that. For
more details, see Section 18.8 on how TrackOperation works. more details, see Section 18.8 on how TrackOperation works.
The 3D support is still in infancy and may evolve to support more The 3D support is still in infancy and may evolve to support more
features. features.
The StereoMode used to be part of Matroska v2, but it didn't meet the The 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 requirement for multiple tracks. There was also a bug in
prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8; [libmatroska] prior to 0.9.0 that would save/read it as 0x53B9
see OldStereoMode (Section 5.1.4.1.28.5). Matroska Readers MAY instead of 0x53B8; see OldStereoMode (Section 5.1.4.1.28.5).
support these legacy files by checking Matroska v2 or 0x53B9. The Matroska Readers MAY support these legacy files by checking Matroska
older values of StereoMode were 0 (mono), 1 (right eye), 2 (left v2 or 0x53B9. The older values of StereoMode were 0 (mono), 1 (right
eye), and 3 (both eyes); these are the only values that can be found eye), 2 (left eye), and 3 (both eyes); these are the only values that
in OldStereoMode. They are not compatible with the StereoMode values can be found in OldStereoMode. They are not compatible with the
found in Matroska v3 and above. StereoMode values found in Matroska v3 and above.
19. Default Track Selection 19. Default Track Selection
This section provides some example sets of Tracks and hypothetical This section provides some example sets of Tracks and hypothetical
user settings, along with indications of which ones a similarly user settings, along with indications of which ones a similarly
configured Matroska Player SHOULD automatically select for playback configured Matroska Player SHOULD automatically select for playback
by default in such a situation. A player MAY provide additional by default in such a situation. A player MAY provide additional
settings with more detailed controls for more nuanced scenarios. settings with more detailed controls for more nuanced scenarios.
These examples are provided as guidelines to illustrate the intended These examples are provided as guidelines to illustrate the intended
usages of the various supported Track flags and their expected usages of the various supported Track flags and their expected
skipping to change at line 5028 skipping to change at line 5025
The table above shows a file with seven audio tracks -- five in The table above shows a file with seven audio tracks -- five in
English and two in Spanish. English and two in Spanish.
The English tracks all have the Original flag, indicating that The English tracks all have the Original flag, indicating that
English is the original content language. English is the original content language.
Generally, the player will first consider the track languages. If Generally, the player will first consider the track languages. If
the player has an option to prefer original-language audio and the the player has an option to prefer original-language audio and the
user has enabled it, then it should prefer one of the tracks with the user has enabled it, then it should prefer one of the tracks with the
Original flag. If configured to specifically prefer audio tracks in Original flag. If the user has configured to specifically prefer
English or Spanish, the player should select one of the tracks in the audio tracks in English or Spanish, the player should select one of
corresponding language. The player may also wish to prefer a track the tracks in the corresponding language. The player may also wish
with the Original flag if no tracks matching any of the user's to prefer a track with the Original flag if no tracks matching any of
explicitly preferred languages are available. the user's explicitly preferred languages are available.
Two of the tracks have the Visual-Impaired flag. If the player has Two of the tracks have the Visual-Impaired flag. If the player has
been configured to prefer such tracks, it should select one; been configured to prefer such tracks, it should select one;
otherwise, it should avoid them if possible. otherwise, it should avoid them if possible.
If selecting an English track, when other settings have left multiple If selecting an English track, when other settings have left multiple
possible options, it may be useful to exclude the tracks that lack possible options, it may be useful to exclude the tracks that lack
the Default flag. Here, one provides descriptive service for the Default flag. Here, one provides descriptive service for
individuals with visual impairments (which has its own flag and may individuals with visual impairments (which has its own flag and may
be automatically selected by user configuration but is unsuitable for be automatically selected by user configuration but is unsuitable for
skipping to change at line 5071 skipping to change at line 5068
If the player finishes analyzing all of the available audio tracks If the player finishes analyzing all of the available audio tracks
and finds that more than one seem equally and maximally preferable, and finds that more than one seem equally and maximally preferable,
it SHOULD default to the first of the group. it SHOULD default to the first of the group.
19.2. Subtitle Selection 19.2. Subtitle Selection
Example track set: Example track set:
+===+=========+====+========+=======+======+========+==============+ +===+=========+====+========+=======+======+========+==============+
|No.|Type |Lang|Original|Default|Forced|Other | Name | |No.|Type |Lang|Original|Default|Forced|Other | Name |
| | | | | | |flags | | | | | | | | |Flags | |
+===+=========+====+========+=======+======+========+==============+ +===+=========+====+========+=======+======+========+==============+
|1 |Video |und |N/A |N/A |N/A |None | | |1 |Video |und |N/A |N/A |N/A |None | |
+---+---------+----+--------+-------+------+--------+--------------+ +---+---------+----+--------+-------+------+--------+--------------+
|2 |Audio |fra |1 |1 |N/A |None | | |2 |Audio |fra |1 |1 |N/A |None | |
+---+---------+----+--------+-------+------+--------+--------------+ +---+---------+----+--------+-------+------+--------+--------------+
|3 |Audio |por |0 |1 |N/A |None | | |3 |Audio |por |0 |1 |N/A |None | |
+---+---------+----+--------+-------+------+--------+--------------+ +---+---------+----+--------+-------+------+--------+--------------+
|4 |Subtitles|fra |1 |1 |0 |None | | |4 |Subtitles|fra |1 |1 |0 |None | |
+---+---------+----+--------+-------+------+--------+--------------+ +---+---------+----+--------+-------+------+--------+--------------+
|5 |Subtitles|fra |1 |0 |0 |Hearing-| Captions for | |5 |Subtitles|fra |1 |0 |0 |Hearing-| Captions for |
skipping to change at line 5218 skipping to change at line 5215
another Edition of Ordered Chapters can use Chapters that only mark another Edition of Ordered Chapters can use Chapters that only mark
the intended presentation with the colorbars and other ancillary the intended presentation with the colorbars and other ancillary
visual information excluded. If an Edition of Ordered Chapters is visual information excluded. If an Edition of Ordered Chapters is
enabled, then the Matroska Player MUST play those Chapters in their enabled, then the Matroska Player MUST play those Chapters in their
stored order from the timestamp marked in the ChapterTimeStart stored order from the timestamp marked in the ChapterTimeStart
Element to the timestamp marked in to ChapterTimeEnd Element. Element to the timestamp marked in to ChapterTimeEnd Element.
If the EditionFlagOrdered flag evaluates to "0", Simple Chapters are If the EditionFlagOrdered flag evaluates to "0", Simple Chapters are
used and only the ChapterTimeStart of a Chapter is used as a chapter used and only the ChapterTimeStart of a Chapter is used as a chapter
mark to jump to the predefined point in the timeline. With Simple mark to jump to the predefined point in the timeline. With Simple
Chapters, a Matroska Player MUST ignore certain Chapter Elements. In Chapters, a Matroska Player MUST ignore certain elements inside a
that case, these elements are informational only. Chapters Element. In that case, these elements are informational
only.
The following list shows the different Chapter elements only found in The following list shows the different Chapters elements only found
Ordered Chapters. in Ordered Chapters.
* ChapterAtom/ChapterSegmentUUID * ChapterAtom/ChapterSegmentUUID
* ChapterAtom/ChapterSegmentEditionUID * ChapterAtom/ChapterSegmentEditionUID
* ChapterAtom/ChapterTrack * ChapterAtom/ChapterTrack
* ChapterAtom/ChapProcess * ChapterAtom/ChapProcess
* Info/ChapterTranslate * Info/ChapterTranslate
skipping to change at line 5320 skipping to change at line 5318
The ChapterTimeEnd of the lowest level of Nested Chapters MUST be set The ChapterTimeEnd of the lowest level of Nested Chapters MUST be set
for Ordered Chapters. for Ordered Chapters.
When used with Ordered Chapters, the ChapterTimeEnd value of a Parent When used with Ordered Chapters, the ChapterTimeEnd value of a Parent
Chapter is useless for playback, as the proper playback sections are Chapter is useless for playback, as the proper playback sections are
described in its Nested Chapters. The ChapterTimeEnd SHOULD NOT be described in its Nested Chapters. The ChapterTimeEnd SHOULD NOT be
set in Parent Chapters and MUST be ignored for playback. set in Parent Chapters and MUST be ignored for playback.
20.2.5. ChapterFlagHidden 20.2.5. ChapterFlagHidden
Each Chapter ChapterFlagHidden flag works independently of Parent Each Chapter's ChapterFlagHidden flag works independently of Parent
Chapters. A Nested Chapter with a ChapterFlagHidden flag that Chapters. A Nested Chapter with a ChapterFlagHidden flag that
evaluates to "0" remains visible in the user interface even if the evaluates to "0" remains visible in the user interface even if the
Parent Chapter ChapterFlagHidden flag is set to "1". Parent Chapter's ChapterFlagHidden flag is set to "1".
+==========================+===================+=========+ +==========================+===================+=========+
| Chapter + Nested Chapter | ChapterFlagHidden | visible | | Chapter + Nested Chapter | ChapterFlagHidden | visible |
+==========================+===================+=========+ +==========================+===================+=========+
| Chapter 1 | 0 | yes | | Chapter 1 | 0 | yes |
+--------------------------+-------------------+---------+ +--------------------------+-------------------+---------+
| Nested Chapter 1.1 | 0 | yes | | Nested Chapter 1.1 | 0 | yes |
+--------------------------+-------------------+---------+ +--------------------------+-------------------+---------+
| Nested Chapter 1.2 | 1 | no | | Nested Chapter 1.2 | 1 | no |
+--------------------------+-------------------+---------+ +--------------------------+-------------------+---------+
skipping to change at line 5351 skipping to change at line 5349
Table 51: ChapterFlagHidden Nested Visibility Table 51: ChapterFlagHidden Nested Visibility
20.3. Menu Features 20.3. Menu Features
The menu features are handled like a chapter codec. That means each The menu features are handled like a chapter codec. That means each
codec has a type, some private data, and some data in the chapters. codec has a type, some private data, and some data in the chapters.
The type of the menu system is defined by the ChapProcessCodecID The type of the menu system is defined by the ChapProcessCodecID
parameter. For now, only two values are supported: 0 (Matroska parameter. For now, only two values are supported: 0 (Matroska
Script) and 1 (menu borrowed from the DVD [DVD-Video]). The private Script) and 1 (menu borrowed from the DVD [DVD-Video]). The private
data depend on the type of menu system (stored in data stored in ChapProcessPrivate and ChapProcessData depends on the
ChapProcessPrivate), idem for the data in the chapters (stored in ChapProcessCodecID value.
ChapProcessData).
The menu system, as well as Chapter Codecs in general, can perform The menu system, as well as Chapter Codecs in general, can perform
actions on the Matroska Player, such as jumping to another Chapter or actions on the Matroska Player, such as jumping to another Chapter or
Edition, selecting different tracks, and possibly more. The scope of Edition, selecting different tracks, and possibly more. The scope of
all the possibilities of Chapter Codecs is not covered in this all the possibilities of Chapter Codecs is not covered in this
document, as it depends on the Chapter Codec features and its document, as it depends on the Chapter Codec features and its
integration in a Matroska Player. integration in a Matroska Player.
20.4. Physical Types 20.4. Physical Types
skipping to change at line 5410 skipping to change at line 5407
20.5.1. Example 1: Basic Chaptering 20.5.1. Example 1: Basic Chaptering
In this example, a movie is split in different chapters. It could In this example, a movie is split in different chapters. It could
also just be an audio file (album) in which each track corresponds to also just be an audio file (album) in which each track corresponds to
a chapter. a chapter.
* 00000 ms - 05000 ms: Intro * 00000 ms - 05000 ms: Intro
* 05000 ms - 25000 ms: Before the crime * 05000 ms - 25000 ms: Before the crime
* 25000 ms - 27500 ms: The crime * 25000 ms - 27500 ms: The crime
* 27500 ms - 38000 ms: The killer arrested * 27500 ms - 38000 ms: After the crime
* 38000 ms - 43000 ms: Credits * 38000 ms - 43000 ms: Credits
This would translate in the following Matroska form, with the EBML This translates to Matroska form, with the EBML tree shown as follows
tree shown as XML: in XML:
<Chapters> <Chapters>
<EditionEntry> <EditionEntry>
<EditionUID>16603393396715046047</EditionUID> <EditionUID>16603393396715046047</EditionUID>
<ChapterAtom> <ChapterAtom>
<ChapterUID>1193046</ChapterUID> <ChapterUID>1193046</ChapterUID>
<ChapterTimeStart>0</ChapterTimeStart> <ChapterTimeStart>0</ChapterTimeStart>
<ChapterTimeEnd>5000000000</ChapterTimeEnd> <ChapterTimeEnd>5000000000</ChapterTimeEnd>
<ChapterDisplay> <ChapterDisplay>
<ChapString>Intro</ChapString> <ChapString>Intro</ChapString>
skipping to change at line 5478 skipping to change at line 5475
<ChapString>Credits</ChapString> <ChapString>Credits</ChapString>
</ChapterDisplay> </ChapterDisplay>
<ChapterDisplay> <ChapterDisplay>
<ChapString>Generique</ChapString> <ChapString>Generique</ChapString>
<ChapLanguage>fra</ChapLanguage> <ChapLanguage>fra</ChapLanguage>
</ChapterDisplay> </ChapterDisplay>
</ChapterAtom> </ChapterAtom>
</EditionEntry> </EditionEntry>
</Chapters> </Chapters>
Figure 16: Basic Chapters Example Figure 25: Basic Chapters Example
20.5.2. Example 2: Nested Chapters 20.5.2. Example 2: Nested Chapters
In this example, an (existing) album is split into different In this example, an (existing) album is split into different
chapters, and one of them contains another splitting. chapters, and one of them contains another splitting.
20.5.2.1. The Micronauts "Bleep To Bleep" 20.5.2.1. The Micronauts "Bleep To Bleep"
* 00:00 - 12:28: Baby wants to Bleep/Rock * 00:00 - 12:28: Baby wants to Bleep/Rock
- 00:00 - 04:38: Baby wants to bleep (pt.1) - 00:00 - 04:38: Baby wants to bleep (pt.1)
- 04:38 - 07:12: Baby wants to rock - 04:38 - 07:12: Baby wants to rock
- 07:12 - 10:33: Baby wants to bleep (pt.2) - 07:12 - 10:33: Baby wants to bleep (pt.2)
- 10:33 - 12:28: Baby wants to bleep (pt.3) - 10:33 - 12:28: Baby wants to bleep (pt.3)
* 12:30 - 19:38: Bleeper_O+2 * 12:30 - 19:38: Bleeper_O+2
* 19:40 - 22:20: Baby wants to bleep (pt.4) * 19:40 - 22:20: Baby wants to bleep (pt.4)
* 22:22 - 25:18: Bleep to bleep * 22:22 - 25:18: Bleep to bleep
* 25:20 - 33:35: Baby wants to bleep (k) * 25:20 - 33:35: Baby wants to bleep (k)
* 33:37 - 44:28: Bleeper * 33:37 - 44:28: Bleeper
This would translate in the following Matroska form, with the EBML This translates to Matroska form, with the EBML tree shown as follows
tree shown as XML: in XML:
<Chapters> <Chapters>
<EditionEntry> <EditionEntry>
<EditionUID>1281690858003401414</EditionUID> <EditionUID>1281690858003401414</EditionUID>
<ChapterAtom> <ChapterAtom>
<ChapterUID>1</ChapterUID> <ChapterUID>1</ChapterUID>
<ChapterTimeStart>0</ChapterTimeStart> <ChapterTimeStart>0</ChapterTimeStart>
<ChapterTimeEnd>748000000</ChapterTimeEnd> <ChapterTimeEnd>748000000</ChapterTimeEnd>
<ChapterDisplay> <ChapterDisplay>
<ChapString>Baby wants to Bleep/Rock</ChapString> <ChapString>Baby wants to Bleep/Rock</ChapString>
skipping to change at line 5587 skipping to change at line 5584
<ChapterUID>10</ChapterUID> <ChapterUID>10</ChapterUID>
<ChapterTimeStart>2017000000</ChapterTimeStart> <ChapterTimeStart>2017000000</ChapterTimeStart>
<ChapterTimeEnd>2668000000</ChapterTimeEnd> <ChapterTimeEnd>2668000000</ChapterTimeEnd>
<ChapterDisplay> <ChapterDisplay>
<ChapString>Bleeper</ChapString> <ChapString>Bleeper</ChapString>
</ChapterDisplay> </ChapterDisplay>
</ChapterAtom> </ChapterAtom>
</EditionEntry> </EditionEntry>
</Chapters> </Chapters>
Figure 17: Nested Chapters Example Figure 26: Nested Chapters Example
21. Attachments 21. Attachments
Matroska supports storage of related files and data in the Matroska supports storage of related files and data in the
Attachments Element (a Top-Level Element). Attachment Elements can Attachments Element (a Top-Level Element). An Attachments Element
be used to store related cover art, font files, transcripts, reports, can be used to store related cover art, font files, transcripts,
error recovery files, pictures, text-based annotations, copies of reports, error recovery files, pictures, text-based annotations,
specifications, or other ancillary files related to the Segment. copies of specifications, or other ancillary files related to the
Segment.
Matroska Readers MUST NOT execute files stored as Attachment Matroska Readers MUST NOT execute files stored as an Attachments
Elements. Element.
21.1. Cover Art 21.1. Cover Art
This section defines a set of guidelines for the storage of cover art This section defines a set of guidelines for the storage of cover art
in Matroska files. A Matroska Reader MAY use embedded cover art to in Matroska files. A Matroska Reader MAY use embedded cover art to
display a representational still-image depiction of the multimedia display a representational still-image depiction of the multimedia
contents of the Matroska file. contents of the Matroska file.
Only [JPEG] and PNG [RFC2083] image formats SHOULD be used for cover Only [JPEG] and PNG [RFC2083] image formats SHOULD be used for cover
art pictures. art pictures.
skipping to change at line 5622 skipping to change at line 5620
There can be two versions of the same cover: the normal cover and the There can be two versions of the same cover: the normal cover and the
small cover. The dimension of the normal cover SHOULD be 600 pixels small cover. The dimension of the normal cover SHOULD be 600 pixels
on the smallest side (e.g., 960x600 for landscape, 600x800 for on the smallest side (e.g., 960x600 for landscape, 600x800 for
portrait, or 600x600 for square). The dimension of the small cover portrait, or 600x600 for square). The dimension of the small cover
SHOULD be 120 pixels on the smallest side (e.g., 192x120 or 120x160). SHOULD be 120 pixels on the smallest side (e.g., 192x120 or 120x160).
Versions of cover art can be differentiated by the filename, which is Versions of cover art can be differentiated by the filename, which is
stored in the FileName Element. The default filename of the normal stored in the FileName Element. The default filename of the normal
cover in square or portrait mode is cover.(jpg|png). When stored, cover in square or portrait mode is cover.(jpg|png). When stored,
the normal cover SHOULD be the first Attachment in storage order. the normal cover SHOULD be the first Attachments Element in storage
The small cover SHOULD be prefixed with "small_", such as order. The small cover SHOULD be prefixed with "small_", such as
small_cover.(jpg|png). The landscape variant SHOULD be suffixed with small_cover.(jpg|png). The landscape variant SHOULD be suffixed with
"_land", such as cover_land.(jpg|png). The filenames are case- "_land", such as cover_land.(jpg|png). The filenames are case-
sensitive. sensitive.
The following table provides examples of file names for cover art in The following table provides examples of file names for cover art in
Attachments. Attachments.
+======================+===================+=================+ +======================+===================+=================+
| File Name | Image Orientation | Pixel Length of | | File Name | Image Orientation | Pixel Length of |
| | | Smallest Side | | | | Smallest Side |
skipping to change at line 5793 skipping to change at line 5791
23.1. File Access 23.1. File Access
File access can simply be reading a file located on your computer, File access can simply be reading a file located on your computer,
but it also includes accessing a file from an HTTP (web) server or but it also includes accessing a file from an HTTP (web) server or
Common Internet File System (CIFS) (Windows share) server. These Common Internet File System (CIFS) (Windows share) server. These
protocols are usually safe from reading errors, and seeking in the protocols are usually safe from reading errors, and seeking in the
stream is possible. However, when a file is stored far away or on a stream is possible. However, when a file is stored far away or on a
slow server, seeking can be an expensive operation and should be slow server, seeking can be an expensive operation and should be
avoided. When followed, the guidelines in Section 25 help reduce the avoided. When followed, the guidelines in Section 25 help reduce the
number of seeking operations for regular playback and also have the number of seeking operations for regular playback and also have the
playback start quickly without a lot of data needed to read first playback start quickly without needing to read lot of data first
(like a Cues Element, Attachment Element, or SeekHead Element). (like a Cues Element, Attachments Element, or SeekHead Element).
Matroska, having a small overhead, is well suited for storing music/ Matroska, having a small overhead, is well suited for storing music/
videos on file servers without a big impact on the bandwidth used. videos on file servers without a big impact on the bandwidth used.
Matroska does not require the index to be loaded before playing, Matroska does not require the index to be loaded before playing,
which allows playback to start very quickly. The index can be loaded which allows playback to start very quickly. The index can be loaded
only when seeking is requested the first time. only when seeking is requested the first time.
23.2. Livestreaming 23.2. Livestreaming
Livestreaming is the equivalent of television broadcasting on the Livestreaming is the equivalent of television broadcasting on the
skipping to change at line 5844 skipping to change at line 5842
the new values instead. the new values instead.
24. Tags 24. Tags
24.1. Tags Precedence 24.1. Tags Precedence
Tags allow tagging all kinds of Matroska parts with very detailed Tags allow tagging all kinds of Matroska parts with very detailed
metadata in multiple languages. metadata in multiple languages.
Some Matroska elements also contain their own string value, like the Some Matroska elements also contain their own string value, like the
Track Name (Section 5.1.4.1.18) or the Chapter String Name element (Section 5.1.4.1.18) or the ChapString element
(Section 5.1.7.1.4.10). (Section 5.1.7.1.4.10).
The following Matroska elements can also be defined with tags: The following Matroska elements can also be defined with tags:
* The Track Name Element (Section 5.1.4.1.18) corresponds to a tag * The Name Element (Section 5.1.4.1.18) corresponds to a tag with
with the TagTrackUID (Section 5.1.8.1.1.3) set to the given track, the TagTrackUID (Section 5.1.8.1.1.3) set to the given track, a
a TagName of TITLE (Section 5.1.8.1.2.1), and a TagLanguage TagName of TITLE (Section 5.1.8.1.2.1), and a TagLanguage
(Section 5.1.8.1.2.2) or TagLanguageBCP47 (Section 5.1.8.1.2.3) of (Section 5.1.8.1.2.2) or TagLanguageBCP47 (Section 5.1.8.1.2.3) of
"und". "und".
* The Chapter String Element (Section 5.1.7.1.4.10) corresponds to a * The ChapString Element (Section 5.1.7.1.4.10) corresponds to a tag
tag with the TagChapterUID (Section 5.1.8.1.1.5) set to the same with the TagChapterUID (Section 5.1.8.1.1.5) set to the same
chapter UID, a TagName of TITLE (Section 5.1.8.1.2.1), and a chapter UID, a TagName of TITLE (Section 5.1.8.1.2.1), and a
TagLanguage (Section 5.1.8.1.2.2) or TagLanguageBCP47 TagLanguage (Section 5.1.8.1.2.2) or TagLanguageBCP47
(Section 5.1.8.1.2.3) matching the ChapLanguage (Section 5.1.8.1.2.3) matching the ChapLanguage
(Section 5.1.7.1.4.11) or ChapLanguageBCP47 (Section 5.1.7.1.4.11) or ChapLanguageBCP47
(Section 5.1.7.1.4.12), respectively. (Section 5.1.7.1.4.12), respectively.
* The FileDescription Element (Section 5.1.6.1.1) of an attachment * The FileDescription Element (Section 5.1.6.1.1) of an attachment
corresponds to a tag with the TagAttachmentUID corresponds to a tag with the TagAttachmentUID
(Section 5.1.8.1.1.6) set to the given attachment, a TagName of (Section 5.1.8.1.1.6) set to the given attachment, a TagName of
TITLE (Section 5.1.8.1.2.1), and a TagLanguage TITLE (Section 5.1.8.1.2.1), and a TagLanguage
skipping to change at line 5879 skipping to change at line 5877
When both values exist in the file, the value found in Tags takes When both values exist in the file, the value found in Tags takes
precedence over the value found in the original location of the precedence over the value found in the original location of the
element. For example, if you have a TrackEntry\Name element and Tag element. For example, if you have a TrackEntry\Name element and Tag
TITLE for that track in a Matroska Segment, the Tag string SHOULD be TITLE for that track in a Matroska Segment, the Tag string SHOULD be
used instead of the TrackEntry\Name string to identify the track. used instead of the TrackEntry\Name string to identify the track.
As the Tag element is optional, a lot of Matroska Readers do not As the Tag element is optional, a lot of Matroska Readers do not
handle it and will not use the tags value when it's found. Thus, for handle it and will not use the tags value when it's found. Thus, for
maximum compatibility, it's usually better to put the strings in the maximum compatibility, it's usually better to put the strings in the
TrackEntry, ChapterAtom, and Attachment and keep the tags matching TrackEntry, ChapterAtom, and Attachments Element and keep the tags
these values if tags are also used. matching these values if tags are also used.
24.2. Tag Levels 24.2. Tag Levels
Tag elements allow tagging information on multiple levels, with each Tag elements allow tagging information on multiple levels, with each
level having a TargetTypeValue Section 5.1.8.1.1.1. An element for a level having a TargetTypeValue Section 5.1.8.1.1.1. An element for a
given TargetTypeValue also applies to the lower levels denoted by given TargetTypeValue also applies to the lower levels denoted by
smaller TargetTypeValue values. If an upper value doesn't apply to a smaller TargetTypeValue values. If an upper value doesn't apply to a
level but the actual value to use is not known, an empty TagString level but the actual value to use is not known, an empty TagString
(Section 5.1.8.1.2.5) or an empty TagBinary (Section 5.1.8.1.2.6) (Section 5.1.8.1.2.5) or an empty TagBinary (Section 5.1.8.1.2.6)
MUST be used as the tag value for this level. MUST be used as the tag value for this level.
skipping to change at line 5910 skipping to change at line 5908
more than five seconds or five megabytes of content. more than five seconds or five megabytes of content.
25.2. SeekHead 25.2. SeekHead
It is RECOMMENDED that the first SeekHead Element be followed by a It is RECOMMENDED that the first SeekHead Element be followed by a
Void Element to allow for the SeekHead Element to be expanded to Void Element to allow for the SeekHead Element to be expanded to
cover new Top-Level Elements that could be added to the Matroska cover new Top-Level Elements that could be added to the Matroska
file, such as Tags, Chapters, and Attachments Elements. file, such as Tags, Chapters, and Attachments Elements.
The size of this Void Element should be adjusted depending on the The size of this Void Element should be adjusted depending on the
Matroska file already having Tags, Chapters, and Attachments Tags, Chapters, and Attachments Elements in the Matroska file.
Elements.
25.3. Optimum Layouts 25.3. Optimum Layouts
While there can be Top-Level Elements in any order, some orderings of While there can be Top-Level Elements in any order, some orderings of
Elements are better than others. The following subsections detail Elements are better than others. The following subsections detail
optimum layouts for different use cases. optimum layouts for different use cases.
25.3.1. Optimum Layout for a Muxer 25.3.1. Optimum Layout for a Muxer
This is the basic layout muxers should be using for an efficient This is the basic layout muxers should be using for an efficient
skipping to change at line 5985 skipping to change at line 5982
Clusters MUST be placed before the Clusters. Clusters MUST be placed before the Clusters.
* Info * Info
* Tracks * Tracks
* Attachments (rare) * Attachments (rare)
* Tags * Tags
* Clusters * Clusters
26. Security Considerations 26. Security Considerations
Matroska inherits security considerations from EBML. Matroska inherits security considerations from EBML [RFC8794].
Attacks on a Matroska Reader could include: Attacks on a Matroska Reader could include:
* Storage of an arbitrary and potentially executable data within an * Storage of an arbitrary and potentially executable data within an
Attachment Element. Matroska Readers that extract or use data Attachments Element. Matroska Readers that extract or use data
from Matroska Attachments SHOULD check that the data adheres to from Matroska Attachments SHOULD check that the data adheres to
expectations or not use the attachment. expectations or not use the attachment.
* A Matroska Attachment with an inaccurate media type. * A Matroska Attachment with an inaccurate media type.
* Damage to the Encryption and Compression fields (Section 14) that * Damage to the Encryption and Compression fields (Section 14) that
would result in bogus binary data interpreted by the decoder. would result in bogus binary data interpreted by the decoder.
* Chapter Codecs running unwanted commands on the host system. * Chapter Codecs running unwanted commands on the host system.
The same error handling done for EBML applies to Matroska files. The same error handling done for EBML applies to Matroska files.
Particular error handling is not covered in this specification, as Particular error handling is not covered in this specification, as
this is depends on the goal of the Matroska Readers. It is up to the this is depends on the goal of the Matroska Readers. Matroska
decision of the Matroska Readers on how to handle the errors if they Readers decide how to handle the errors whether or not they are
are recoverable in their code or not. For example, if the checksum recoverable in their code. For example, if the checksum of the
of the \Segment\Tracks is invalid, some could decide to try to read \Segment\Tracks is invalid, some could decide to try to read the data
the data anyway, some will just reject the file, and most will not anyway, some will just reject the file, and most will not even check
even check it. it.
Matroska Reader implementations need to be robust against malicious Matroska Reader implementations need to be robust against malicious
payloads. Those related to denial of service are outlined in payloads. Those related to denial of service are outlined in
Section 2.1 of [RFC4732]. Section 2.1 of [RFC4732].
Although rarer, the same may apply to a Matroska Writer. Malicious Although rarer, the same may apply to a Matroska Writer. Malicious
stream data must not cause the Matroska Writer to misbehave, as this stream data must not cause the Matroska Writer to misbehave, as this
might allow an attacker access to transcoding gateways. might allow an attacker access to transcoding gateways.
As an audio and visual container format, a Matroska file or stream As an audio/video container format, a Matroska file or stream will
will potentially encapsulate numerous byte streams created with a potentially encapsulate numerous byte streams created with a variety
variety of codecs. Implementers will need to consider the security of codecs. Implementers will need to consider the security
considerations of these encapsulated formats. considerations of these encapsulated formats.
27. IANA Considerations 27. IANA Considerations
27.1. Matroska Element IDs Registry 27.1. Matroska Element IDs Registry
IANA has created a new registry called the "Matroska Element IDs" IANA has created a new registry called the "Matroska Element IDs"
registry. registry.
The following are needed to register a new Element ID in this To register a new Element ID in this registry, one needs an Element
registry: an Element ID, a Change Controller (IETF or email of ID, an Element Name, a Change Controller (IETF or email of
registrant), and an optional Reference to a document describing the registrant), and an optional Reference to a document describing the
Element ID. Element ID.
Element IDs are encoded using the VINT mechanism described in Element IDs are encoded using the VINT mechanism described in
Section 4 of [RFC8794] and can be between one and five octets long. Section 4 of [RFC8794] and can be between one and five octets long.
Five-octet Element IDs are possible only if declared in the EBML Five-octet Element IDs are possible only if declared in the EBML
Header. Header.
Element IDs are described in Section 5 of [RFC8794], with the changes Element IDs are described in Section 5 of [RFC8794], with the changes
in [Err7189] and [Err7191]. in [Err7189] and [Err7191].
One-octet Matroska Element IDs are to be allocated according to the One-octet Matroska Element IDs (range 0x00-0xFF) are to be allocated
"RFC Required" policy [RFC8126]. according to the "RFC Required" policy [RFC8126].
Two-octet Matroska Element IDs are to be allocated according to the Two-octet Matroska Element IDs (range 0x0100-0xFFFF) are to be
"Specification Required" policy [RFC8126]. allocated according to the "Specification Required" policy [RFC8126].
Three-octet and four-octet Matroska Element IDs are to be allocated Three-octet and four-octet Matroska Element IDs (range
according to the "First Come First Served" policy [RFC8126]. 0x00010000-0xFFFFFFFF) are to be allocated according to the "First
Come First Served" policy [RFC8126].
The allowed values in the "Matroska Element IDs" registry are similar The allowed values in the "Matroska Element IDs" registry are similar
to the ones found in the "EBML Element IDs" registry defined in to the ones found in the "EBML Element IDs" registry defined in
Section 17.1 of [RFC8794]. Section 17.1 of [RFC8794].
EBML Element IDs defined for the EBML Header -- as defined in EBML Element IDs defined for the EBML Header -- as defined in
Section 17.1 of [RFC8794] -- MUST NOT be used as Matroska Element Section 17.1 of [RFC8794] -- MUST NOT be used as Matroska Element
IDs. IDs.
Given the scarcity of one-octet Element IDs, they should only be Given the scarcity of one-octet Element IDs, they should only be
created to save space for elements found many times in a file (for created to save space for elements found many times in a file (for
example, within a BlockGroup or Chapters). The four-octet Element example, BlockGroup or Chapters). The four-octet Element IDs are
IDs are mostly for synchronization of large elements. They should mostly for synchronization of large elements. They should only be
only be used for such high-level elements. Elements that are not used for such high-level elements. Elements that are not expected to
expected to be used often should use three-octet Element IDs. be used often should use three-octet Element IDs.
Elements found in Appendix A have an assigned Matroska Element ID for Elements found in Appendix A have an assigned Matroska Element ID for
historical reasons. These elements are not in use and SHOULD NOT be historical reasons. These elements are not in use and SHOULD NOT be
reused unless there are no other IDs available with the desired size. reused unless there are no other IDs available with the desired size.
Such IDs are marked as "Reclaimed" in the "Matroska Element IDs" Such IDs are marked as "Reclaimed" in the "Matroska Element IDs"
registry, as they could be used for other things in the future. registry, as they could be used for other things in the future.
Table 54 shows the initial contents of the "Matroska Element IDs" Table 54 shows the initial contents of the "Matroska Element IDs"
registry. registry. Note that the Change Controller for all entries in
Table 54 is "IETF".
+============+=============================+======================+ +============+=============================+======================+
| Element ID | Element Name | Reference | | Element ID | Element Name | Reference |
+============+=============================+======================+ +============+=============================+======================+
| 0x80 | ChapterDisplay | RFC 9559, | | 0x80 | ChapterDisplay | RFC 9559, |
| | | Section 5.1.7.1.4.9 | | | | Section 5.1.7.1.4.9 |
+------------+-----------------------------+----------------------+ +------------+-----------------------------+----------------------+
| 0x83 | TrackType | RFC 9559, | | 0x83 | TrackType | RFC 9559, |
| | | Section 5.1.4.1.3 | | | | Section 5.1.4.1.3 |
+------------+-----------------------------+----------------------+ +------------+-----------------------------+----------------------+
skipping to change at line 6839 skipping to change at line 6838
Table 54: Initial Contents of "Matroska Element IDs" Registry Table 54: Initial Contents of "Matroska Element IDs" Registry
27.2. Chapter Codec IDs Registry 27.2. Chapter Codec IDs Registry
IANA has created a new registry called the "Matroska Chapter Codec IANA has created a new registry called the "Matroska Chapter Codec
IDs" registry. The values correspond to the unsigned integer IDs" registry. The values correspond to the unsigned integer
ChapProcessCodecID value described in Section 5.1.7.1.4.15. ChapProcessCodecID value described in Section 5.1.7.1.4.15.
To register a new Chapter Codec ID in this registry, one needs a To register a new Chapter Codec ID in this registry, one needs a
Chapter Codec ID, a Change Controller (IETF or email of registrant), Chapter Codec ID, description, a Change Controller (IETF or email of
and an optional Reference to a document describing the Chapter Codec registrant), and an optional Reference to a document describing the
ID. Chapter Codec ID.
The Chapter Codec IDs are to be allocated according to the "First The Chapter Codec IDs are to be allocated according to the "First
Come First Served" policy [RFC8126]. Come First Served" policy [RFC8126].
Values of "0" and "1" are reserved for future use (with the IETF as Values of "0" and "1" are reserved for future use (with the IETF as
the Change Controller). the Change Controller).
27.3. Media Types 27.3. Media Types
Matroska files and streams are found in three main forms: audio-video Matroska files and streams are found in three main forms: audio-
files, audio-only, and occasionally with stereoscopic video tracks. video, audio-only, and (occasionally) stereoscopic video.
Historically, Matroska files and streams have used the following Historically, Matroska files and streams have used the following
media types with an "x-" prefix. For better compatibility, a system media types with an "x-" prefix. For better compatibility, a system
SHOULD be able to handle both formats. Newer systems SHOULD NOT use SHOULD be able to handle both formats. Newer systems SHOULD NOT use
the historic format and use the format that follows the format in the historic format and use the format that follows the format in
[RFC6838] instead. [RFC6838] instead.
IANA has registered three media types per the templates (see IANA has registered three media types per the templates (see
[RFC6838]) in the following subsections. [RFC6838]) in the following subsections.
skipping to change at line 6885 skipping to change at line 6884
Security considerations: See Section 26 of RFC 9559. Security considerations: See Section 26 of RFC 9559.
Interoperability considerations: Due to the extensibility of Interoperability considerations: Due to the extensibility of
Matroska, it is possible to encounter files with unknown but valid Matroska, it is possible to encounter files with unknown but valid
EBML Elements. Readers should be ready to handle this case. The EBML Elements. Readers should be ready to handle this case. The
fixed byte order, octet boundaries, and UTF-8 usage allow for fixed byte order, octet boundaries, and UTF-8 usage allow for
broad interoperability. broad interoperability.
Published specification: RFC 9559 Published specification: RFC 9559
Applications that use this media type: FFmpeg, VLC, ... Applications that use this media type: FFmpeg, VLC, etc.
Fragment identifier considerations: N/A Fragment identifier considerations: N/A
Additional information: Additional information:
Deprecated alias names for this type: video/x-matroska Deprecated alias names for this type: video/x-matroska
Magic number(s): N/A Magic number(s): N/A
File extension(s): mkv File extension(s): mkv
Macintosh file type code(s): N/A Macintosh file type code(s): N/A
skipping to change at line 6999 skipping to change at line 6998
Restrictions on usage: None Restrictions on usage: None
Author: IETF CELLAR WG Author: IETF CELLAR WG
Change controller: IETF Change controller: IETF
28. References 28. References
28.1. Normative References 28.1. Normative References
[BCP47] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <https://www.rfc-editor.org/info/rfc5646>.
[CIE-1931] Wikipedia, "CIE 1931 color space", [CIE-1931] Wikipedia, "CIE 1931 color space",
<https://en.wikipedia.org/wiki/CIE_1931_color_space>. <https://en.wikipedia.org/wiki/CIE_1931_color_space>.
[ISO639-2] International Organization for Standardization, "Codes for [ISO639-2] International Organization for Standardization, "Codes for
the Representation of Names of Languages", ISO 639-2, the Representation of Names of Languages", ISO 639-2,
December 2017, <https://www.loc.gov/standards/iso639- December 2017, <https://www.loc.gov/standards/iso639-
2/php/code_list.php>. 2/php/code_list.php>.
[ISO9899] International Organization for Standardization, [ISO9899] International Organization for Standardization,
"Information technology -- Programming languages -- C", "Information technology -- Programming languages -- C",
skipping to change at line 7037 skipping to change at line 7032
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
Unique IDentifier (UUID) URN Namespace", RFC 4122, Unique IDentifier (UUID) URN Namespace", RFC 4122,
DOI 10.17487/RFC4122, July 2005, DOI 10.17487/RFC4122, July 2005,
<https://www.rfc-editor.org/info/rfc4122>. <https://www.rfc-editor.org/info/rfc4122>.
[RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
September 2009, <https://www.rfc-editor.org/info/rfc5646>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, Specifications and Registration Procedures", BCP 13,
RFC 6838, DOI 10.17487/RFC6838, January 2013, RFC 6838, DOI 10.17487/RFC6838, January 2013,
<https://www.rfc-editor.org/info/rfc6838>. <https://www.rfc-editor.org/info/rfc6838>.
[RFC8081] Lilley, C., "The "font" Top-Level Media Type", RFC 8081, [RFC8081] Lilley, C., "The "font" Top-Level Media Type", RFC 8081,
DOI 10.17487/RFC8081, February 2017, DOI 10.17487/RFC8081, February 2017,
<https://www.rfc-editor.org/info/rfc8081>. <https://www.rfc-editor.org/info/rfc8081>.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
skipping to change at line 7073 skipping to change at line 7072
2023, <https://docs.microsoft.com/en- 2023, <https://docs.microsoft.com/en-
us/windows/win32/directshow/avi-riff-file-reference>. us/windows/win32/directshow/avi-riff-file-reference>.
[Blowfish] Schneier, B., "The Blowfish Encryption Algorithm", 1993, [Blowfish] Schneier, B., "The Blowfish Encryption Algorithm", 1993,
<https://www.schneier.com/academic/blowfish/>. <https://www.schneier.com/academic/blowfish/>.
[BZIP2] Seward, J., "bzip2", July 2019, [BZIP2] Seward, J., "bzip2", July 2019,
<https://sourceware.org/bzip2/>. <https://sourceware.org/bzip2/>.
[DivXTrickTrack] [DivXTrickTrack]
"DivX Trick Track Extensions", December 2010, "Smooth FF/RW", December 2010,
<https://web.archive.org/web/20101222001148/ <https://web.archive.org/web/20101222001148/
http://labs.divx.com/node/16601>. http://labs.divx.com/node/16601>.
[DivXWorldFonts] [DivXWorldFonts]
"World Fonts", December 2010, "World Fonts", December 2010,
<https://web.archive.org/web/20110214132246/ <https://web.archive.org/web/20110214132246/
http://labs.divx.com/node/16602>. http://labs.divx.com/node/16602>.
[DVD-Video] [DVD-Video]
DVD Forum, "DVD-Books: Part 3 DVD-Video Book", November DVD Forum, "DVD-Books: Part 3 DVD-Video Book", November
skipping to change at line 7114 skipping to change at line 7113
[FourCC-RGB] [FourCC-RGB]
FOURCC, "RGB pixel formats", FOURCC, "RGB pixel formats",
<https://web.archive.org/web/20160609214806/ <https://web.archive.org/web/20160609214806/
https://www.fourcc.org/rgb.php>. https://www.fourcc.org/rgb.php>.
[FourCC-YUV] [FourCC-YUV]
FOURCC, "YUV pixel formats", FOURCC, "YUV pixel formats",
<https://web.archive.org/web/20160609214806/ <https://web.archive.org/web/20160609214806/
https://www.fourcc.org/yuv.php>. https://www.fourcc.org/yuv.php>.
[JPEG] ITU, "INFORMATION TECHNOLOGY - DIGITAL COMPRESSION AND [JPEG] ITU-T, "INFORMATION TECHNOLOGY - DIGITAL COMPRESSION AND
CODING OF CONTINUOUS-TONE STILL IMAGES - REQUIREMENTS AND CODING OF CONTINUOUS-TONE STILL IMAGES - REQUIREMENTS AND
GUIDELINES", ITU Recommendation T.81, September 1992, GUIDELINES", ITU-T Recommendation T.81, September 1992,
<https://www.w3.org/Graphics/JPEG/itu-t81.pdf>. <https://www.w3.org/Graphics/JPEG/itu-t81.pdf>.
[libmatroska]
"libmatroska", March 2024,
<https://github.com/Matroska-Org/libmatroska>.
[LZO] Tarreau, W. and R. Rodgman, "LZO stream format as [LZO] Tarreau, W. and R. Rodgman, "LZO stream format as
understood by Linux's LZO decompressor", October 2018, understood by Linux's LZO decompressor", October 2018,
<https://www.kernel.org/doc/Documentation/lzo.txt>. <https://www.kernel.org/doc/Documentation/lzo.txt>.
[MatroskaCodec] [MatroskaCodec]
Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media
Container Codec Specifications", Work in Progress, Container Codec Specifications", Work in Progress,
Internet-Draft, draft-ietf-cellar-codec-12, 27 January Internet-Draft, draft-ietf-cellar-codec-13, 5 May 2024,
2024, <https://datatracker.ietf.org/doc/html/draft-ietf- <https://datatracker.ietf.org/doc/html/draft-ietf-cellar-
cellar-codec-12>. codec-13>.
[MatroskaTags] [MatroskaTags]
Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media
Container Tag Specifications", Work in Progress, Internet- Container Tag Specifications", Work in Progress, Internet-
Draft, draft-ietf-cellar-tags-12, 22 October 2023, Draft, draft-ietf-cellar-tags-13, 5 May 2024,
<https://datatracker.ietf.org/doc/html/draft-ietf-cellar- <https://datatracker.ietf.org/doc/html/draft-ietf-cellar-
tags-12>. tags-13>.
[MCF] "MCF specification, introduction", [MCF] "MCF specification, introduction",
<http://mukoli.free.fr/mcf/>. <http://mukoli.free.fr/mcf/>.
[MSRGB] Microsoft Corporation, "Compression Enumeration", June [MSRGB] Microsoft Corporation, "Compression Enumeration", June
2021, <https://learn.microsoft.com/en- 2021, <https://learn.microsoft.com/en-
us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f- us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-
b77f-35d0feaf7a57>. b77f-35d0feaf7a57>.
[MSYUV16] Microsoft Corporation, "10-bit and 16-bit YUV Video [MSYUV16] Microsoft Corporation, "10-bit and 16-bit YUV Video
skipping to change at line 7200 skipping to change at line 7203
[SP800-67] National Institute of Standards and Technology (NIST), [SP800-67] National Institute of Standards and Technology (NIST),
"Recommendation for the Triple Data Encryption Algorithm "Recommendation for the Triple Data Encryption Algorithm
(TDEA) Block Cipher", DOI 10.6028/NIST.SP.800-67r2, NIST (TDEA) Block Cipher", DOI 10.6028/NIST.SP.800-67r2, NIST
Special Publication 800-67, November 2017, Special Publication 800-67, November 2017,
<https://nvlpubs.nist.gov/nistpubs/SpecialPublications/ <https://nvlpubs.nist.gov/nistpubs/SpecialPublications/
NIST.SP.800-67r2.pdf>. NIST.SP.800-67r2.pdf>.
[Twofish] Schneier, B., Kelsey, J., Whiting, D., Wagner, D., Hall, [Twofish] Schneier, B., Kelsey, J., Whiting, D., Wagner, D., Hall,
C., and N. Ferguson, "Twofish: A 128-Bit Block Cipher", C., and N. Ferguson, "Twofish: A 128-Bit Block Cipher",
June 1998, <https://www.schneier.com/academic/twofish/>. June 1998,
<https://www.schneier.com/academic/archives/1998/06/
twofish_a_128-bit_bl.html>.
[WebM-Enc] Galligan, F., "WebM Encryption", September 2016, [WebM-Enc] Galligan, F., "WebM Encryption", September 2016,
<https://www.webmproject.org/docs/webm-encryption/>. <https://www.webmproject.org/docs/webm-encryption/>.
[WebVTT] Pieters, S., Pfeiffer, S., Ed., Jaegenstedt, P., and I. [WebVTT] Pieters, S., Pfeiffer, S., Ed., Jaegenstedt, P., and I.
Hickson, "WebVTT: The Web Video Text Tracks Format", W3C Hickson, "WebVTT: The Web Video Text Tracks Format", W3C
Candidate Recommendation, April 2019, Candidate Recommendation, April 2019,
<https://www.w3.org/TR/2019/CR-webvtt1-20190404/>. <https://www.w3.org/TR/2019/CR-webvtt1-20190404/>.
Appendix A. Historic Deprecated Elements Appendix A. Historic Deprecated Elements
skipping to change at line 7348 skipping to change at line 7353
path: \Segment\Tracks\TrackEntry\MinCache path: \Segment\Tracks\TrackEntry\MinCache
documentation: The minimum number of frames a player should be able documentation: The minimum number of frames a player should be able
to cache during playback. If set to 0, the reference pseudo-cache to cache during playback. If set to 0, the reference pseudo-cache
system is not used. system is not used.
A.17. MaxCache Element A.17. MaxCache Element
type / id: uinteger / 0x6DF8 type / id: uinteger / 0x6DF8
path: \Segment\Tracks\TrackEntry\MaxCache path: \Segment\Tracks\TrackEntry\MaxCache
documentation: The maximum cache size necessary to store referenced documentation: The maximum cache size necessary to store referenced
frames in and the current frame. 0 means no cache is needed. frames in and the current frame. 0 means no cache is needed.
A.18. TrackOffset Element A.18. TrackOffset Element
type / id: integer / 0x537F type / id: integer / 0x537F
path: \Segment\Tracks\TrackEntry\TrackOffset path: \Segment\Tracks\TrackEntry\TrackOffset
documentation: A value to add to the Block's Timestamp, expressed in documentation: A value to add to the Block's Timestamp, expressed in
Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. This Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. This
can be used to adjust the playback offset of a track. can be used to adjust the playback offset of a track.
A.19. CodecSettings Element A.19. CodecSettings Element
skipping to change at line 7374 skipping to change at line 7379
A.20. CodecInfoURL Element A.20. CodecInfoURL Element
type / id: string / 0x3B4040 type / id: string / 0x3B4040
path: \Segment\Tracks\TrackEntry\CodecInfoURL path: \Segment\Tracks\TrackEntry\CodecInfoURL
documentation: A URL to find information about the codec used. documentation: A URL to find information about the codec used.
A.21. CodecDownloadURL Element A.21. CodecDownloadURL Element
type / id: string / 0x26B240 type / id: string / 0x26B240
path: \Segment\Tracks\TrackEntry\CodecDownloadURL path: \Segment\Tracks\TrackEntry\CodecDownloadURL
documentation: A URL to download about the codec used. documentation: A URL to download information about the codec used.
A.22. CodecDecodeAll Element A.22. CodecDecodeAll Element
type / id: uinteger / 0xAA type / id: uinteger / 0xAA
path: \Segment\Tracks\TrackEntry\CodecDecodeAll path: \Segment\Tracks\TrackEntry\CodecDecodeAll
documentation: Set to 1 if the codec can decode potentially damaged documentation: Set to 1 if the codec can decode potentially damaged
data. data.
A.23. TrackOverlay Element A.23. TrackOverlay Element
skipping to change at line 7398 skipping to change at line 7403
Track specified (in the u-integer). This means that when this Track specified (in the u-integer). This means that when this
track has a gap on SilentTracks, the overlay track should be used track has a gap on SilentTracks, the overlay track should be used
instead. The order of multiple TrackOverlay matters; the first instead. The order of multiple TrackOverlay matters; the first
one is the one that should be used. If the first one is not one is the one that should be used. If the first one is not
found, it should be the second, etc. found, it should be the second, etc.
A.24. AspectRatioType Element A.24. AspectRatioType Element
type / id: uinteger / 0x54B3 type / id: uinteger / 0x54B3
path: \Segment\Tracks\TrackEntry\Video\AspectRatioType path: \Segment\Tracks\TrackEntry\Video\AspectRatioType
documentation: Specify the possible modifications to the aspect documentation: Specifies the possible modifications to the aspect
ratio. ratio.
A.25. GammaValue Element A.25. GammaValue Element
type / id: float / 0x2FB523 type / id: float / 0x2FB523
path: \Segment\Tracks\TrackEntry\Video\GammaValue path: \Segment\Tracks\TrackEntry\Video\GammaValue
documentation: Gamma value. documentation: Gamma value.
A.26. FrameRate Element A.26. FrameRate Element
skipping to change at line 7515 skipping to change at line 7520
mber mber
documentation: Number of the referenced Block of Track X in the documentation: Number of the referenced Block of Track X in the
specified Cluster. specified Cluster.
A.39. CueRefCodecState Element A.39. CueRefCodecState Element
type / id: uinteger / 0xEB type / id: uinteger / 0xEB
path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCo path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCo
decState decState
documentation: The Segment Position of the Codec State corresponding documentation: The Segment Position of the Codec State corresponding
to this referenced Element. 0 means that the data is taken from to this referenced Element. 0 means that the data is taken from
the initial Track Entry. the initial TrackEntry.
A.40. FileReferral Element A.40. FileReferral Element
type / id: binary / 0x4675 type / id: binary / 0x4675
path: \Segment\Attachments\AttachedFile\FileReferral path: \Segment\Attachments\AttachedFile\FileReferral
documentation: A binary value that a track/codec can refer to when documentation: A binary value that a track/codec can refer to when
the attachment is needed. the attachment is needed.
A.41. FileUsedStartTime Element A.41. FileUsedStartTime Element
 End of changes. 154 change blocks. 
373 lines changed or deleted 378 lines changed or added

This html diff was produced by rfcdiff 1.48.