<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
 <!ENTITY nbsp    "&#160;">
 <!ENTITY zwsp   "&#8203;">
 <!ENTITY nbhy   "&#8209;">
 <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="draft-ietf-cellar-codec-17" sortRefs="true" tocDepth="4" submissionType="IETF" category="std" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" tocInclude="true" symRefs="true" indexInclude="true">

<front>
<title abbrev="Matroska Codec">Matroska Media Container Codec Specifications</title><seriesInfo value="draft-ietf-cellar-codec-17" stream="IETF" status="standard" name="Internet Draft"></seriesInfo>
<author initials="S." surname="Lhomme" fullname="Steve Lhomme"><organization></organization><address><postal>
</postal><email>slhomme@matroska.org</email>
</address></author><author initials="M." surname="Bunkus" fullname="Moritz Bunkus"><organization></organization><address><postal>
</postal><email>moritz@bunkus.org</email>
</address></author><author initials="D." surname="Rice" fullname="Dave Rice"><organization></organization><address><postal>
</postal><email>dave@dericed.com</email>
</address></author><date year="2026" month="February" day="15"></date>
<area>art</area>
<workgroup>cellar</workgroup>
<keyword>binary</keyword>
<keyword>storage</keyword>
<keyword>matroska</keyword>
<keyword>ebml</keyword>
<keyword>webm</keyword>
<keyword>codec</keyword>

<abstract>
<t>This document defines the Matroska multimedia container codec mappings, including the codec ID, layout of data
in a <tt>Block</tt> element and in an optional <tt>CodecPrivate</tt> element.</t>
</abstract>

</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>Matroska is a multimedia container format.
It stores interleaved and timestamped audiovisual data using various codecs.
To interpret the codec data, a mapping between the way the data is stored in Matroska and
how it is understood by such a codec is necessary.</t>
<t>This document defines this mapping for many commonly used codecs in Matroska.</t>
</section>

<section anchor="notation-and-conventions"><name>Notation and Conventions</name>
<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
"<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
"<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
"<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
to be interpreted as described in BCP 14 <xref target="RFC2119"/>
<xref target="RFC8174"/> when, and only when, they appear in all capitals,
as shown here.</t>
</section>

<section anchor="codec-mappings"><name>Codec Mappings</name>
<t>A <tt>Codec Mapping</tt> is a set of attributes to identify, name, and contextualize the format
and characteristics of encoded data that can be contained within Matroska Clusters.</t>
<t>Each <tt>TrackEntry</tt> used within Matroska <bcp14>MUST</bcp14> reference a defined <tt>Codec Mapping</tt> using the
<tt>CodecID</tt> to identify and describe the format of the encoded data in its associated Clusters.
This <tt>CodecID</tt> is an identifier, uniquely defined in the Matroska Codec IDs Registry <xref target="matroska-codec-ids-registry"/>, that represents the encoding stored within
the <tt>Track</tt>. Certain encodings <bcp14>MAY</bcp14> also require some form of codec initialization
to provide its decoder with context and technical metadata.</t>
<t>The intention behind this list is not to list all existing audio and video codecs,
but rather to list those codecs that are currently supported in Matroska and therefore
need a well defined <tt>CodecID</tt> so that all developers supporting Matroska will use the
same <tt>CodecID</tt>. If you feel we missed support for a very important codec, please tell
us on our development mailing list (cellar at ietf.org).</t>

<section anchor="defining-matroska-codec-support"><name>Defining Matroska Codec Support</name>
<t>Support for a codec is defined in Matroska with the following values.</t>

<section anchor="codec-id"><name>Codec ID</name>
<t>Each codec supported for storage in Matroska <bcp14>MUST</bcp14> have a unique <tt>CodecID</tt>.
Each <tt>CodecID</tt> <bcp14>MUST</bcp14> be prefixed with the string from the following table according to
the associated Track Type of the codec. All characters of a <tt>Codec ID Prefix</tt> <bcp14>MUST</bcp14> be
capital letters (A-Z) except for the last character of a <tt>Codec ID Prefix</tt> which <bcp14>MUST</bcp14> be
an underscore ("_").</t>
<table anchor="CodecPrefix"><name>Codec ID Prefix by Track Type</name>
<thead>
<tr>
<th>Track Type</th>
<th>Codec ID Prefix</th>
</tr>
</thead>

<tbody>
<tr>
<td>Video (1)</td>
<td>"V_"</td>
</tr>

<tr>
<td>Audio (2)</td>
<td>"A_"</td>
</tr>

<tr>
<td>Complex (3)</td>
<td>"O_"</td>
</tr>

<tr>
<td>Logo (16)</td>
<td>"L_"</td>
</tr>

<tr>
<td>Subtitle (17)</td>
<td>"S_"</td>
</tr>

<tr>
<td>Button (18)</td>
<td>"B_"</td>
</tr>

<tr>
<td>Control (32)</td>
<td>"C_"</td>
</tr>

<tr>
<td>Metadata (33)</td>
<td>"M_"</td>
</tr>
</tbody>
</table><t>Each <tt>CodecID</tt> <bcp14>MUST</bcp14> include a <tt>Major Codec ID</tt> immediately following the <tt>Codec ID Prefix</tt>.
A <tt>Major Codec ID</tt> <bcp14>MAY</bcp14> be followed by an <bcp14>OPTIONAL</bcp14> <tt>Codec ID Suffix</tt> to communicate a refinement
of the <tt>Major Codec ID</tt>. If a <tt>Codec ID Suffix</tt> is used, then the <tt>CodecID</tt> <bcp14>MUST</bcp14> include a
forward slash ("/") as a separator between the <tt>Major Codec ID</tt> and the <tt>Codec ID Suffix</tt>.
The <tt>Major Codec ID</tt> <bcp14>MUST</bcp14> be composed of only capital letters (A-Z) and numbers (0-9).
The <tt>Codec ID Suffix</tt> <bcp14>MUST</bcp14> be composed of only capital letters (A-Z), numbers (0-9),
underscore ("_"), and forward slash ("/").</t>
<t>The following table provides examples of valid <tt>Codec IDs</tt> and their components:</t>
<table anchor="CodecComponents"><name>Codec ID Components</name>
<thead>
<tr>
<th>Codec ID Prefix</th>
<th align="left">Major Codec ID</th>
<th align="left">Separator</th>
<th align="left">Codec ID Suffix</th>
<th align="left">Codec ID</th>
</tr>
</thead>

<tbody>
<tr>
<td>A_</td>
<td align="left">AAC</td>
<td align="left">/</td>
<td align="left">MPEG2/LC/SBR</td>
<td align="left">A_AAC/MPEG2/LC/SBR</td>
</tr>

<tr>
<td>V_</td>
<td align="left">MPEG4</td>
<td align="left">/</td>
<td align="left">ISO/ASP</td>
<td align="left">V_MPEG4/ISO/ASP</td>
</tr>

<tr>
<td>V_</td>
<td align="left">MPEG1</td>
<td align="left"></td>
<td align="left"></td>
<td align="left">V_MPEG1</td>
</tr>
</tbody>
</table>
</section>

<section anchor="codec-name"><name>Codec Name</name>
<t>Each encoding supported for storage in Matroska <bcp14>MUST</bcp14> have a <tt>Codec Name</tt>.
The <tt>Codec Name</tt> provides a readable label for the encoding.</t>
</section>

<section anchor="description"><name>Description</name>
<t>An optional description for the encoding. This value is only intended for human consumption.</t>
</section>

<section anchor="initialization"><name>Initialization</name>
<t>Each encoding supported for storage in Matroska <bcp14>MUST</bcp14> have a defined Initialization.
The Initialization <bcp14>MUST</bcp14> describe the storage of data necessary to initialize the decoder,
which <bcp14>MUST</bcp14> be stored within the <tt>CodecPrivate</tt> element. When the Initialization is updated
within a track, then that updated Initialization data <bcp14>MUST</bcp14> be written into the <tt>CodecState</tt> element
of the first <tt>Cluster</tt> to require it. If the encoding does not require any form of Initialization,
then <tt>none</tt> <bcp14>MUST</bcp14> be used to define the Initialization and the <tt>CodecPrivate</tt> element
<bcp14>SHOULD NOT</bcp14> be written and <bcp14>MUST</bcp14> be ignored.
If the <tt>TrackEntry</tt> contains a <tt>CodecPrivate</tt> element, its data <bcp14>MUST</bcp14> be provided to the decoder.</t>
</section>

<section anchor="codec-blockadditions"><name>Codec BlockAdditions</name>
<t>Additional data that contextualizes or supplements a <tt>Block</tt> can be stored within
the <tt>BlockAdditional</tt> element of a <tt>BlockMore</tt> element <xref target="RFC9559" sectionFormat="of" section="5.1.3.5.2.1"/>.
Each <tt>BlockAdditional</tt> is coupled with a <tt>BlockAddID</tt> that identifies the kind of data it contains.</t>
<t>A <tt>BlockAddID</tt> of 1 means the data in the <tt>BlockAdditional</tt> element are tied to the codec.
This <tt>BlockAdditional</tt> data with a <tt>BlockAddID</tt> of 1 <bcp14>MAY</bcp14> be passed to the associated decoder alongside the <tt>Block</tt> content .</t>
<t>A codec definition <bcp14>MUST</bcp14> contain a "Codec BlockAdditions" section if the codec can use <tt>BlockAdditional</tt> data with a <tt>BlockAddID</tt> of 1.</t>
<t>The <tt>BlockAddID</tt> values are defined in <xref target="block-addition-mappings"/>.</t>
</section>

<section anchor="citation"><name>Citation</name>
<t>Documentation of the associated normative and informative references for the codec is <bcp14>RECOMMENDED</bcp14>.</t>
</section>

<section anchor="superseded-by"><name>Superseded By</name>
<t>When a <tt>Superseded By</tt> is set, the superseding <tt>CodecID</tt> value <bcp14>MUST</bcp14> be used instead of the superseded <tt>CodecID</tt>.</t>
<t>Files <bcp14>MAY</bcp14> exist with the superseded <tt>CodecID</tt> and <bcp14>MAY</bcp14> be supported by Matroska Players.</t>
</section>
</section>

<section anchor="recommendations-for-the-creation-of-new-codec-mappings"><name>Recommendations for the Creation of New Codec Mappings</name>
<t>Creators of new <tt>Codec Mappings</tt> to be used in the context of Matroska:</t>

<ul>
<li><t><bcp14>MUST</bcp14> assume that all <tt>Codec Mappings</tt> they create might become standardized, public,
commonly deployed, or usable across multiple implementations.</t>
</li>
<li><t><bcp14>MUST</bcp14> employ meaningful values for <tt>CodecID</tt> and <tt>Codec Name</tt> that
are not already included in the Matroska Codec IDs Registry, and are not otherwise known or suspected to be in use, even if they are not already registered.</t>
</li>
<li><t><bcp14>MUST NOT</bcp14> prefix their <tt>CodecID</tt> with "X_" or similar constructs.</t>
</li>
</ul>
<t>These recommendations are based on <xref target="RFC6648" sectionFormat="of" section="3"/>.</t>
</section>

<section anchor="video-codec-mappings"><name>Video Codec Mappings</name>
<t>All codecs described in this section <bcp14>MUST</bcp14> have a <tt>TrackType</tt> (<xref target="RFC9559" sectionFormat="of" section="5.1.4.1.3"/>) value of "1" for video.
The track using these codecs <bcp14>MUST</bcp14> contain a <tt>Video</tt> element -- i.e., EBML Path <tt>\Segment\Tracks\TrackEntry\Video</tt>.</t>
<t>Most video codec contain meta information about the data they contain, like encoded width and height, chroma subsampling, etc.
Whenever possible these information inside the codec <bcp14>SHOULD</bcp14> be extracted and repeated at the Matroska level with
the appropriate element(s) inside the <tt>\Segment\Tracks\TrackEntry\Video</tt> and <tt>\Segment\Tracks\TrackEntry</tt> elements.
These values <bcp14>MUST</bcp14> be valid for the whole Segment.</t>

<section anchor="v-av1"><name>V_AV1</name>
<t>Codec ID: <tt>V_AV1</tt></t>
<t>Codec Name: Alliance for Open Media AV1 Video codec</t>
<t>Description: Only one <tt>Sequence Header OBU</tt>, as defined in section 6.4 of <xref target="AV1"/>, is supported per Matroska Segment.
Each <tt>Block</tt> contains one <tt>Temporal Unit</tt> containing one or more OBUs. Each OBU stored in the Block <bcp14>MUST</bcp14> contain its header and its payload.
The OBUs in the <tt>Block</tt> follow the <tt>Low Overhead Bitstream Format syntax</tt>.
They <bcp14>MUST</bcp14> have the <tt>obu_has_size_field</tt> set to 1 except for the last OBU in the frame, for which <tt>obu_has_size_field</tt> <bcp14>MAY</bcp14> be set to 0, in which case it is assumed to fill the remainder of the frame.
A <tt>SimpleBlock</tt> <bcp14>MUST NOT</bcp14> be marked as a Keyframe if it doesn't contain a <tt>Frame OBU</tt>.
A <tt>SimpleBlock</tt> <bcp14>MUST NOT</bcp14> be marked as a Keyframe if the first <tt>Frame OBU</tt> doesn't have a <tt>frame_type</tt> of <tt>KEY_FRAME</tt>.
A <tt>SimpleBlock</tt> <bcp14>MUST NOT</bcp14> be marked as a Keyframe if it doesn't contains a <tt>Sequence Header OBU</tt>.
A <tt>Block</tt> inside a <tt>BlockGroup</tt> <bcp14>MUST</bcp14> use <tt>ReferenceBlock</tt> elements if the first <tt>Frame OBU</tt> in the <tt>Block</tt> has a <tt>frame_type</tt> other than <tt>KEY_FRAME</tt>.
A <tt>Block</tt> inside a <tt>BlockGroup</tt> <bcp14>MUST</bcp14> use <tt>ReferenceBlock</tt> elements if the <tt>Block</tt> doesn't contain a <tt>Sequence Header OBU</tt>.
A <tt>Block</tt> with <tt>frame_header_obu</tt> where the <tt>frame_type</tt> is <tt>INTRA_ONLY_FRAME</tt> <bcp14>MUST</bcp14> use a <tt>ReferenceBlock</tt> with a value of 0 to reference itself.</t>
<t>Initialization: The <tt>CodecPrivate</tt> consists of the <tt>AV1CodecConfigurationRecord</tt> described in section 2.3 of <xref target="AV1-ISOBMFF"/>.</t>
<t>PixelWidth:  <bcp14>MUST</bcp14> be <tt>max_frame_width_minus_1</tt>+1 of the <tt>Sequence Header OBU</tt>.</t>
<t>PixelHeight: <bcp14>MUST</bcp14> be <tt>max_frame_height_minus_1</tt>+1 of the <tt>Sequence Header OBU</tt>.</t>
</section>

<section anchor="v-avs2"><name>V_AVS2</name>
<t>Codec ID: V_AVS2</t>
<t>Codec Name: AVS2-P2/IEEE.1857.4</t>
<t>Description: Individual pictures of AVS2-P2 stored as described in the second part of <xref target="IEEE.1857-4"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-avs3"><name>V_AVS3</name>
<t>Codec ID: V_AVS3</t>
<t>Codec Name: AVS3-P2/IEEE.1857.10</t>
<t>Description: Individual pictures of AVS3-P2 stored as described in the second part of <xref target="IEEE.1857-10"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-cavs"><name>V_CAVS</name>
<t>Codec ID: V_CAVS</t>
<t>Codec Name: AVS1-P2, JiZhun profile</t>
<t>Description: Individual pictures of AVS1-P2 stored as described in <xref target="IEEE.1857-3"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-dirac"><name>V_DIRAC</name>
<t>Codec ID: V_DIRAC</t>
<t>Codec Name: BBC Dirac</t>
<t>Description: A video codec developed by the BBC <xref target="Dirac"/>. The Intra-only version of Dirac, also known as Dirac Pro, resulted in SMPTE VC-2 <xref target="SMPTE.ST2042-1"/>.
Each Matroska frame corresponds to a Sequence as defined in <xref target="Dirac"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-ffv1"><name>V_FFV1</name>
<t>Codec ID: V_FFV1</t>
<t>Codec Name: FF Video Codec 1</t>
<t>Description: FFV1 is a lossless intra-frame video encoding format designed to efficiently compress video data in a variety of pixel formats.
Compared to uncompressed video, FFV1 offers storage compression, frame fixity, and self-description,
which makes FFV1 useful as a preservation or intermediate video format. <xref target="RFC9043"/></t>
<t>Initialization: For FFV1 versions 0 or 1, <tt>CodecPrivate</tt> <bcp14>SHOULD NOT</bcp14> be written.
For FFV1 version 3 or greater, the <tt>CodecPrivate</tt> <bcp14>MUST</bcp14> contain the FFV1 Configuration Record structure, as defined in <xref target="RFC9043" sectionFormat="of" section="4.3"/>, and no other data.</t>
</section>

<section anchor="v-jpeg2000"><name>V_JPEG2000</name>
<t>Codec ID: V_JPEG2000</t>
<t>Codec Name: JPEG 2000</t>
<t>Description: Each Matroska frame corresponds to a JPEG 2000 image, as defined in <xref target="JPEG2000"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mjpeg"><name>V_MJPEG</name>
<t>Codec ID: V_MJPEG</t>
<t>Codec Name: Motion JPEG</t>
<t>Description: Motion JPEG is a video compression format in which each video frame or interlaced field  is compressed separately as a <xref target="JPEG"/> image.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpegh-iso-hevc"><name>V_MPEGH/ISO/HEVC</name>
<t>Codec ID: V_MPEGH/ISO/HEVC</t>
<t>Codec Name: HEVC/H.265</t>
<t>Description: Individual pictures (which could be a frame, a field, or 2 fields having the same timestamp) of HEVC/H.265 stored as described in <xref target="ISO.14496-15"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>HEVCDecoderConfigurationRecord</tt> structure, as defined in <xref target="ISO.14496-15"/>.</t>
</section>

<section anchor="v-mpegi-iso-vvc"><name>V_MPEGI/ISO/VVC</name>
<t>Codec ID: V_MPEGI/ISO/VVC</t>
<t>Codec Name: VVC/H.266</t>
<t>Description: Individual pictures (which could be a frame, a field, or 2 fields having the same timestamp) of VVC/H.266 stored as described in <xref target="ISO.14496-15"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>VVCDecoderConfigurationRecord</tt> structure, as defined in <xref target="ISO.14496-15"/>.</t>
</section>

<section anchor="v-mpeg1"><name>V_MPEG1</name>
<t>Codec ID: V_MPEG1</t>
<t>Codec Name: MPEG 1</t>
<t>Description: Frames correspond to a Video Sequence as defined in <xref target="ISO.11172-2"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpeg2"><name>V_MPEG2</name>
<t>Codec ID: V_MPEG2</t>
<t>Codec Name: MPEG 2</t>
<t>Description: Frames correspond to a Video Sequence as defined in <xref target="ISO.13818-2"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpeg4-iso-avc"><name>V_MPEG4/ISO/AVC</name>
<t>Codec ID: V_MPEG4/ISO/AVC</t>
<t>Codec Name: AVC/H.264</t>
<t>Description: Individual pictures (which could be a frame, a field, or 2 fields having the same timestamp) of AVC/H.264 stored as described in <xref target="ISO.14496-15"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains an <tt>AVCDecoderConfigurationRecord</tt> structure, as defined in <xref target="ISO.14496-15"/>.
For legacy reasons, because <tt>Block Additional Mappings</tt> are preferred; see <xref target="block-addition-mappings"/>,
the <tt>AVCDecoderConfigurationRecord</tt> structure <bcp14>MAY</bcp14> be followed by an extension block beginning
with a 4-byte extension block size field in big-endian byte order which is the size of the extension block
minus 4 (excluding the size of the extension block size field) and a 4-byte field corresponding
to a <tt>BlockAddIDType</tt> of "mvcC" followed by a content corresponding to the content of <tt>BlockAddIDExtraData</tt> for <tt>mvcC</tt>; see <xref target="mvcc"/>.</t>
</section>

<section anchor="v-mpeg4-iso-ap"><name>V_MPEG4/ISO/AP</name>
<t>Codec ID: V_MPEG4/ISO/AP</t>
<t>Codec Name: MPEG4 ISO Advanced Profile</t>
<t>Description: Frames correspond to frames defined in <xref target="ISO.14496-2"/>.
Stream was created via improved codec API (UCI) or transmuxed from MP4, not simply transmuxed from AVI.
Note there are differences how b-frames are handled in these original streams,
when being compared to a VfW created stream, as here there are <tt>no</tt> dummy frames inserted.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpeg4-iso-asp"><name>V_MPEG4/ISO/ASP</name>
<t>Codec ID: V_MPEG4/ISO/ASP</t>
<t>Codec Name: MPEG4 ISO Advanced Simple Profile (DivX5, XviD)</t>
<t>Description: Frames correspond to frames defined in <xref target="ISO.14496-2"/>.
Stream was created via improved codec API (UCI) or transmuxed from MP4, not simply transmuxed from AVI.
Note there are differences how b-frames are handled in these original streams,
when being compared to a VfW created stream, as here there are <tt>no</tt> dummy frames inserted.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpeg4-iso-sp"><name>V_MPEG4/ISO/SP</name>
<t>Codec ID: V_MPEG4/ISO/SP</t>
<t>Codec Name: MPEG4 ISO Simple Profile (DivX4)</t>
<t>Description: Frames correspond to frames defined in <xref target="ISO.14496-2"/>.
Stream was created via improved codec API (UCI) or even transmuxed from AVI (no b-frames in Simple Profile).</t>
<t>Initialization: none</t>
</section>

<section anchor="v-mpeg4-ms-v3"><name>V_MPEG4/MS/V3</name>
<t>Codec ID: V_MPEG4/MS/V3</t>
<t>Codec Name: Microsoft MPEG4 V3</t>
<t>Description: Microsoft MPEG4 V3 and derivatives, means DivX3, Angelpotion, SMR, etc.; stream was created using
VfW codec or transmuxed from AVI; note that V1/V2 are covered by the "V_MS/VFW/FOURCC" <tt>CodecID</tt> <xref target="v-ms-vfw-fourcc"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-ms-vfw-fourcc"><name>V_MS/VFW/FOURCC</name>
<t>Codec ID: <tt>V_MS/VFW/FOURCC</tt></t>
<t>Codec Name: Microsoft Video Codec Manager (VCM)</t>
<t>Description: Video frames originating from Video For Windows, using the Microsoft Video Codec Manager codecs.
This is a codec designed to be transmuxed back and forth from AVI sources.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the VCM structure BITMAPINFOHEADER including
the extra private bytes, as defined in <xref target="BITMAPINFOHEADER"/>.
The data are stored in little-endian format (like on IA32 machines).</t>
</section>

<section anchor="v-quicktime"><name>V_QUICKTIME</name>
<t>Codec ID: V_QUICKTIME</t>
<t>Codec Name: Video taken from QuickTime files</t>
<t>Description: Several codecs as stored in QuickTime (e.g., Sorenson or Cinepak).</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains all additional data that is stored in the 'stsd' (sample description) atom
in the QuickTime file <strong>after</strong> the mandatory video descriptor structure
(starting with the size and FourCC fields). For an explanation of the QuickTime file format read <xref target="QTFF"/>.</t>
</section>

<section anchor="v-prores"><name>V_PRORES</name>
<t>Codec ID: V_PRORES</t>
<t>Codec Name: Apple ProRes</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the FourCC as found in MP4 movies:</t>

<ul>
<li><t>ap4x: ProRes 4444 XQ</t>
</li>
<li><t>ap4h: ProRes 4444</t>
</li>
<li><t>apch: ProRes 422 High Quality</t>
</li>
<li><t>apcn: ProRes 422 Standard Definition</t>
</li>
<li><t>apcs: ProRes 422 LT</t>
</li>
<li><t>apco: ProRes 422 Proxy</t>
</li>
<li><t>aprh: ProRes RAW High Quality</t>
</li>
<li><t>aprn: ProRes RAW Standard Definition</t>
</li>
</ul>
<t>ProRes is defined as <xref target="SMPTE.RDD36"/>.</t>
</section>

<section anchor="v-real-rv10"><name>V_REAL/RV10</name>
<t>Codec ID: V_REAL/RV10</t>
<t>Codec Name: RealVideo 1.0 aka RealVideo 5</t>
<t>Description: Individual slices from the Real container are combined into a single frame.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>real_video_props_t</tt> structure in big-endian byte order as found in <xref target="librmff"/>.</t>
</section>

<section anchor="v-real-rv20"><name>V_REAL/RV20</name>
<t>Codec ID: V_REAL/RV20</t>
<t>Codec Name: RealVideo G2 and RealVideo G2+SVT</t>
<t>Description: Individual slices from the Real container are combined into a single frame.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>real_video_props_t</tt> structure in big-endian byte order as found in <xref target="librmff"/>.</t>
</section>

<section anchor="v-real-rv30"><name>V_REAL/RV30</name>
<t>Codec ID: V_REAL/RV30</t>
<t>Codec Name: RealVideo 8</t>
<t>Description: Individual slices from the Real container are combined into a single frame.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>real_video_props_t</tt> structure in big-endian byte order as found in <xref target="librmff"/>.</t>
</section>

<section anchor="v-real-rv40"><name>V_REAL/RV40</name>
<t>Codec ID: V_REAL/RV40</t>
<t>Codec Name: rv40 : RealVideo 9</t>
<t>Description: Individual slices from the Real container are combined into a single frame.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains a <tt>real_video_props_t</tt> structure in big-endian byte order as found in <xref target="librmff"/>.</t>
</section>

<section anchor="v-theora"><name>V_THEORA</name>
<t>Codec ID: V_THEORA</t>
<t>Codec Name: Theora</t>
<t>Description: Frames correspond to a Theora Frame as defined in <xref target="Theora"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the first three Theora packets in order. The lengths of the packets precedes them. The actual layout is:</t>

<ul>
<li><t>Byte 1: number of distinct packets <tt>#p</tt> minus one inside the <tt>CodecPrivate</tt> block. This <bcp14>MUST</bcp14> be "2" for current (as of 2016-07-08) Theora headers.</t>
</li>
<li><t>Bytes 2..n: lengths of the first <tt>#p</tt> packets, coded in Xiph-style lacing. The length of the last packet is the length of the <tt>CodecPrivate</tt> block minus the lengths coded in these bytes minus one.</t>
</li>
<li><t>Bytes n+1..: The Theora identification header, followed by the commend header followed by the codec setup header. Those are described in the <xref target="Theora"/>.</t>
</li>
</ul>
</section>

<section anchor="v-uncompressed"><name>V_UNCOMPRESSED</name>
<t>Codec ID: V_UNCOMPRESSED</t>
<t>Codec Name: Video, raw uncompressed video frames</t>
<t>Description: The codec doesn't use any form of compression. All the relevant fields of the <tt>TrackEntry\Video</tt> element <bcp14>MUST</bcp14> be filled to play this content correctly.
In addition the packing of RGB, YUV, etc. pixels <bcp14>MUST</bcp14> be declared with a <tt>TrackEntry\Video\UncompressedFourCC</tt> element with values defined in <xref target="RFC9559" sectionFormat="of" section="5.1.4.1.28.15"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-vp8"><name>V_VP8</name>
<t>Codec ID: V_VP8</t>
<t>Codec Name: VP8 Codec format</t>
<t>Description: VP8 is an open and royalty free video compression format developed by Google and created by On2 Technologies as a successor to VP7. <xref target="RFC6386"/></t>
<t>Codec BlockAdditions: A single-channel encoding of an alpha channel <bcp14>MAY</bcp14> be stored in <tt>BlockAdditions</tt>. The <tt>BlockAddID</tt> of the <tt>BlockMore</tt> containing these data <bcp14>MUST</bcp14> be 1.</t>
<t>Initialization: none</t>
</section>

<section anchor="v-vp9"><name>V_VP9</name>
<t>Codec ID: V_VP9</t>
<t>Codec Name: VP9 Codec format</t>
<t>Description: VP9 is an open and royalty free video compression format developed by Google as a successor to VP8. <xref target="VP9"/></t>
<t>Codec BlockAdditions: A single-channel encoding of an alpha channel <bcp14>MAY</bcp14> be stored in <tt>BlockAdditions</tt>. The <tt>BlockAddID</tt> of the <tt>BlockMore</tt> containing these data <bcp14>MUST</bcp14> be 1.</t>
<t>Initialization: Encoders are strongly encouraged to provide a <tt>CodecPrivate</tt> that contains a list of specific VP9 codec features as described in the "VP9 Codec Feature Metadata" section of <xref target="WebMContainer"/>.
This piece of data helps to select a decoder on playback, but as many muxers don't provide the <tt>CodecPrivate</tt> for "V_VP9" it is not a hard requirement.
It is possible for the decoder to reconstruct the "VP9 Codec Feature Metadata" from the first frame in case the <tt>CodecPrivate</tt> is not present.</t>
<t>Note that the format differs from the <tt>VPCodecConfigurationRecord</tt> structure, as defined in <xref target="VP-ISOBMFF"/>.</t>
</section>
</section>

<section anchor="audio-codec-mappings"><name>Audio Codec Mappings</name>
<t>All codecs described in this section <bcp14>MUST</bcp14> have a <tt>TrackType</tt> (<xref target="RFC9559" sectionFormat="of" section="5.1.4.1.3"/>) value of "2" for audio.
The track using these codecs <bcp14>MUST</bcp14> contain an <tt>Audio</tt> element -- i.e., EBML Path <tt>\Segment\Tracks\TrackEntry\Audio</tt>.</t>
<t>Most audio codec contain meta information about the data they contain, like encoded sampling frequency, channel count, etc.
Whenever possible these information inside the codec <bcp14>SHOULD</bcp14> be extracted and repeated at the Matroska level with
the appropriate element(s) inside the <tt>\Segment\Tracks\TrackEntry\Audio</tt> and <tt>\Segment\Tracks\TrackEntry</tt> elements.
These values <bcp14>MUST</bcp14> be valid for the whole Segment.</t>

<section anchor="a-aac"><name>A_AAC</name>
<t>Codec ID: A_AAC</t>
<t>Codec Name: Advanced Audio Coding (AAC)</t>
<t>Description: Individual frames of AAC <tt>raw_data_block()</tt>, stored as defined in subpart 4 of <xref target="ISO.14496-3"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains an <tt>AudioSpecificConfig</tt> structure, as defined in <xref target="ISO.14496-3"/>.</t>
</section>

<section anchor="a-aac-mpeg2-lc"><name>A_AAC/MPEG2/LC</name>
<t>Codec ID: A_AAC/MPEG2/LC</t>
<t>Codec Name: Low Complexity</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg2-lc-sbr"><name>A_AAC/MPEG2/LC/SBR</name>
<t>Codec ID: A_AAC/MPEG2/LC/SBR</t>
<t>Codec Name: Low Complexity with Spectral Band Replication</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg2-main"><name>A_AAC/MPEG2/MAIN</name>
<t>Codec ID: A_AAC/MPEG2/MAIN</t>
<t>Codec Name: MPEG2 Main Profile</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg2-ssr"><name>A_AAC/MPEG2/SSR</name>
<t>Codec ID: A_AAC/MPEG2/SSR</t>
<t>Codec Name: Scalable Sampling Rate</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg4-lc"><name>A_AAC/MPEG4/LC</name>
<t>Codec ID: A_AAC/MPEG4/LC</t>
<t>Codec Name: Low Complexity</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg4-lc-sbr"><name>A_AAC/MPEG4/LC/SBR</name>
<t>Codec ID: A_AAC/MPEG4/LC/SBR</t>
<t>Codec Name: Low Complexity with Spectral Band Replication</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg4-ltp"><name>A_AAC/MPEG4/LTP</name>
<t>Codec ID: A_AAC/MPEG4/LTP</t>
<t>Codec Name: Long Term Prediction</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg4-main"><name>A_AAC/MPEG4/MAIN</name>
<t>Codec ID: A_AAC/MPEG4/MAIN</t>
<t>Codec Name: MPEG4 Main Profile</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-aac-mpeg4-ssr"><name>A_AAC/MPEG4/SSR</name>
<t>Codec ID: A_AAC/MPEG4/SSR</t>
<t>Codec Name: Scalable Sampling Rate</t>
<t>Description: The audio stream is stripped from ADTS headers and normal Matroska frame based muxing scheme is applied.</t>
<t>Initialization: none</t>
<t>Superseded By: <tt>A_AAC</tt> (<xref target="a-aac"/>)</t>
</section>

<section anchor="a-ac3"><name>A_AC3</name>
<t>Codec ID: A_AC3</t>
<t>Codec Name: Dolby Digital / AC-3</t>
<t>Description: Individual frames of AC-3 <tt>syncframe()</tt> stored as described in <xref target="ATSC.A52"/> or <xref target="ETSI.TS102-366"/> when the value of the <tt>bsid</tt> field defined in Section 5.4.2.1 of <xref target="ATSC.A52"/> or Section 4.4.2.1 of <xref target="ETSI.TS102-366"/> is 10 or below.
Channel number have to be read from the corresponding audio element</t>
<t>Initialization: none</t>
</section>

<section anchor="a-ac3-bsid9"><name>A_AC3/BSID9</name>
<t>Codec ID: A_AC3/BSID9</t>
<t>Codec Name: Dolby Digital / AC-3</t>
<t>Description: Individual frames of AC-3 <tt>syncframe()</tt> stored as described in <xref target="ATSC.A52"/> or <xref target="ETSI.TS102-366"/> when the value of the <tt>bsid</tt> field defined in Section 5.4.2.1 of <xref target="ATSC.A52"/> or Section 4.4.2.1 of <xref target="ETSI.TS102-366"/> is 9.
Note that the value 9 in the <tt>bsid</tt> field is not standard but it is defacto used for dividing the sampling rate defined in Section 5.4.1.3 of <xref target="ATSC.A52"/> or Section 4.4.2.1 of <xref target="ETSI.TS102-366"/> by 2.</t>
<t>Using this Codec ID is <bcp14>NOT RECOMMENDED</bcp14> as many Matroska Players don't support it. The generic <tt>A_AC3</tt> Codec ID <bcp14>SHOULD</bcp14> be used instead as it supports a <tt>bsid</tt> of 9 as well.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-ac3-bsid10"><name>A_AC3/BSID10</name>
<t>Codec ID: A_AC3/BSID10</t>
<t>Codec Name: Dolby Digital / AC-3</t>
<t>Description: Individual frames of AC-3 <tt>syncframe()</tt> stored as described in <xref target="ATSC.A52"/> or <xref target="ETSI.TS102-366"/> when the value of the <tt>bsid</tt> field defined in Section 5.4.2.1 of <xref target="ATSC.A52"/> or Section 4.4.2.1 of <xref target="ETSI.TS102-366"/> is 10.
Note that the value 10 in the <tt>bsid</tt> field is not standard but it is defacto used for dividing the sampling rate defined in Section 5.4.1.3 of <xref target="ATSC.A52"/> or Section 4.4.2.1 of <xref target="ETSI.TS102-366"/> by 4.</t>
<t>Using this Codec ID is <bcp14>NOT RECOMMENDED</bcp14> as many Matroska Players don't support it. The generic <tt>A_AC3</tt> Codec ID <bcp14>SHOULD</bcp14> be used instead as it supports a <tt>bsid</tt> of 10 as well.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-alac"><name>A_ALAC</name>
<t>Codec ID: A_ALAC</t>
<t>Codec Name: ALAC (Apple Lossless Audio Codec)</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains ALAC's magic cookie (both the codec specific configuration as well as the optional channel layout information).
Its format is described in the "Magic Cookie" defined in <xref target="ALAC"/>.</t>
</section>

<section anchor="a-atrac-at1"><name>A_ATRAC/AT1</name>
<t>Codec ID: A_ATRAC/AT1</t>
<t>Codec Name: Sony ATRAC1 Codec</t>
<t>Description: The original ATRAC codec by Sony, mainly used in MiniDisc platforms. The core technical details on ATRAC1 can be found in <xref target="AtracAES"/>. An example encoder/decoder can be found at <xref target="atracdenc"/>.</t>
<t>Initialization: None</t>
</section>

<section anchor="a-dts"><name>A_DTS</name>
<t>Codec ID: A_DTS</t>
<t>Codec Name: Digital Theatre System</t>
<t>Description: Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution Audio and DTS-HD Master Audio. It corresponds to the base codec defined in <xref target="ETSI.TS102-114"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-dts-express"><name>A_DTS/EXPRESS</name>
<t>Codec ID: A_DTS/EXPRESS</t>
<t>Codec Name: Digital Theatre System Express</t>
<t>Description: DTS Express (a.k.a. LBR) audio streams.  It corresponds to the LBR extension of the DTS codec defined in section 9 of <xref target="ETSI.TS102-114"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-dts-lossless"><name>A_DTS/LOSSLESS</name>
<t>Codec ID: A_DTS/LOSSLESS</t>
<t>Codec Name: Digital Theatre System Lossless</t>
<t>Description: DTS Lossless audio that does not have a core substream. It corresponds to the Lossless extension (XLL) of the DTS codec defined in section 8 of <xref target="ETSI.TS102-114"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-eac3"><name>A_EAC3</name>
<t>Codec ID: A_EAC3</t>
<t>Codec Name: Dolby Digital Plus / E-AC-3</t>
<t>Description: Individual frames of E-AC-3 <tt>syncframe()</tt> stored as described in <xref target="ATSC.A52"/> or <xref target="ETSI.TS102-366"/> when the value of the <tt>bsid</tt> field defined in Annex E Section 2.1 of <xref target="ATSC.A52"/> or Section E.1.3.1.6 of <xref target="ETSI.TS102-366"/> is 11, 12, 13, 14, 15 or 16.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-flac"><name>A_FLAC</name>
<t>Codec ID: A_FLAC</t>
<t>Codec Name: FLAC (Free Lossless Audio Codec)</t>
<t>Description: The mapping of the FLAC framing and <tt>CodecPrivate</tt> is described in <xref target="RFC9639" sectionFormat="of" section="10.2"/>.</t>
<t>Initialization: All FLAC data before the first audio frame; see <xref target="RFC9639" sectionFormat="of" section="10.2"/>.</t>
</section>

<section anchor="a-mlp"><name>A_MLP</name>
<t>Codec ID: A_MLP</t>
<t>Codec Name: Meridian Lossless Packing / MLP</t>
<t>Description: A lossless audio codec used in DVD-Audio discs. The format is similar to Dolby TrueHD (<xref target="a-truehd"/>) but with fewer channels.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-mpeg-l1"><name>A_MPEG/L1</name>
<t>Codec ID: A_MPEG/L1</t>
<t>Codec Name: MPEG Audio 1, 2 Layer I</t>
<t>Description: Frames correspond to Audio Frames of a Layer I bitstream as defined in <xref target="ISO.11172-3"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-mpeg-l2"><name>A_MPEG/L2</name>
<t>Codec ID: A_MPEG/L2</t>
<t>Codec Name: MPEG Audio 1, 2 Layer II</t>
<t>Description: Frames correspond to Audio Frames of a Layer II bitstream as defined in <xref target="ISO.11172-3"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-mpeg-l3"><name>A_MPEG/L3</name>
<t>Codec ID: A_MPEG/L3</t>
<t>Codec Name: MPEG Audio 1, 2, 2.5 Layer III</t>
<t>Description: Frames correspond to Audio Frames of a Layer III bitstream as defined in <xref target="ISO.11172-3"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-ms-acm"><name>A_MS/ACM</name>
<t>Codec ID: A_MS/ACM</t>
<t>Codec Name: Microsoft Audio Codec Manager (ACM)</t>
<t>Description: The data are stored in little-endian format (like on IA32 machines).</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the <xref target="WAVEFORMATEX"/> structure including the extra format information bytes.
The structure is stored without packing or padding bytes.
A <tt>WORD</tt> corresponds to a signed 2 octets integer, <tt>DWORD</tt> corresponds to a signed 4 octets integer.
The extra format information are appended after the WAVEFORMATEX octets.</t>
</section>

<section anchor="a-real-14-4"><name>A_REAL/14_4</name>
<t>Codec ID: A_REAL/14_4</t>
<t>Codec Name: Real Audio 1</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-real-28-8"><name>A_REAL/28_8</name>
<t>Codec ID: A_REAL/28_8</t>
<t>Codec Name: Real Audio 2</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-real-atrc"><name>A_REAL/ATRC</name>
<t>Codec ID: A_REAL/ATRC</t>
<t>Codec Name: Sony Atrac3 Codec</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-real-cook"><name>A_REAL/COOK</name>
<t>Codec ID: A_REAL/COOK</t>
<t>Codec Name: Real Audio Cook Codec (codename: Gecko)</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-real-ralf"><name>A_REAL/RALF</name>
<t>Codec ID: A_REAL/RALF</t>
<t>Codec Name: Real Audio Lossless Format</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-real-sipr"><name>A_REAL/SIPR</name>
<t>Codec ID: A_REAL/SIPR</t>
<t>Codec Name: Sipro Voice Codec</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; big-endian byte order) as found in [librmff].</t>
</section>

<section anchor="a-opus"><name>A_OPUS</name>
<t>Codec ID: A_OPUS</t>
<t>Codec Name: Opus interactive speech and audio codec</t>
<t>Description: The OPUS audio codec defined by <xref target="RFC6716"/> using a similar encapsulation as the Ogg Encapsulation <xref target="RFC7845"/>.</t>
<t>Initialization: The track <tt>CodecPrivate</tt> <bcp14>MUST</bcp14> be present and contain the <tt>Identification Header</tt> defined in <xref target="RFC7845" sectionFormat="of" section="5.1"/>.</t>
<t>Channels: The track <tt>Channels</tt> element value <bcp14>MUST</bcp14> be the "Output Channel Count" value of the <tt>Identification Header</tt>.</t>
<t>SamplingFrequency: The track <tt>SamplingFrequency</tt> element value <bcp14>MUST</bcp14> be the "Input Sample Rate" value of the <tt>Identification Header</tt>.</t>
<t>CodecDelay: The track <tt>CodecDelay</tt> element <bcp14>MUST</bcp14> be present and set to the "Pre-skip" value of the <tt>Identification Header</tt> translated to Matroska Ticks.
The "Pre-skip" value is in samples at 48,000 Hz. The formula to get the <tt>CodecDelay</tt> is:</t>

<artwork><![CDATA[CodecDelay = pre-skip * 1,000,000,000 / 48,000.
]]></artwork>
<t>SeekPreRoll: The track <tt>SeekPreRoll</tt> element <bcp14>SHOULD</bcp14> be present and set to 80,000,000 -- 80 ms in Matroska Ticks --
in order to ensure that the output audio is correct by the time it reaches the seek target.</t>
</section>

<section anchor="a-pcm-float-ieee"><name>A_PCM/FLOAT/IEEE</name>
<t>Codec ID: A_PCM/FLOAT/IEEE</t>
<t>Codec Name: Floating-Point, IEEE compatible</t>
<t>Description: The audio bit depth <bcp14>MUST</bcp14> be read and set from the <tt>BitDepth</tt> element (32 bits in most cases).
The floats are stored as defined in <xref target="IEEE.754"/> and in little-endian order.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-pcm-int-big"><name>A_PCM/INT/BIG</name>
<t>Codec ID: A_PCM/INT/BIG</t>
<t>Codec Name: PCM Integer Big Endian</t>
<t>Description: The audio bit depth <bcp14>MUST</bcp14> be read and set from the <tt>BitDepth</tt> element. Audio samples <bcp14>MUST</bcp14> be considered as signed values,
unless the audio bit depth is 8 which <bcp14>MUST</bcp14> be interpreted as unsigned values.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-pcm-int-lit"><name>A_PCM/INT/LIT</name>
<t>Codec ID: A_PCM/INT/LIT</t>
<t>Codec Name: PCM Integer Little Endian</t>
<t>Description: The audio bit depth <bcp14>MUST</bcp14> be read and set from the <tt>BitDepth</tt> element. Audio samples <bcp14>MUST</bcp14> be considered as signed values,
unless the audio bit depth is 8 which <bcp14>MUST</bcp14> be interpreted as unsigned values.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-quicktime"><name>A_QUICKTIME</name>
<t>Codec ID: A_QUICKTIME</t>
<t>Codec Name: Audio taken from QuickTime files</t>
<t>Description: Several codecs as stored in QuickTime (e.g., QDesign Music v1 or v2).</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains all additional data that is stored in the 'stsd' (sample description) atom
in the QuickTime file <strong>after</strong> the mandatory sound descriptor structure (starting with the size and FourCC fields).
For an explanation of the QuickTime file format read <xref target="QTFF"/>.</t>
</section>

<section anchor="a-quicktime-qdmc"><name>A_QUICKTIME/QDMC</name>
<t>Codec ID: A_QUICKTIME/QDMC</t>
<t>Codec Name: QDesign Music</t>
<t>Description:</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains all additional data that is stored in the 'stsd' (sample description) atom
in the QuickTime file <strong>after</strong> the mandatory sound descriptor structure (starting with the size and FourCC fields).
For an explanation of the QuickTime file format read <xref target="QTFF"/>.</t>
<t>Superseded By: <tt>A_QUICKTIME</tt> (<xref target="a-quicktime"/>)</t>
</section>

<section anchor="a-quicktime-qdm2"><name>A_QUICKTIME/QDM2</name>
<t>Codec ID: A_QUICKTIME/QDM2</t>
<t>Codec Name: QDesign Music v2</t>
<t>Description:</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains all additional data that is stored in the 'stsd' (sample description) atom
in the QuickTime file <strong>after</strong> the mandatory sound descriptor structure (starting with the size and FourCC fields).
For an explanation of the QuickTime file format read <xref target="QTFF"/>.</t>
<t>Superseded By: <tt>A_QUICKTIME</tt> (<xref target="a-quicktime"/>)</t>
</section>

<section anchor="a-truehd"><name>A_TRUEHD</name>
<t>Codec ID: A_TRUEHD</t>
<t>Codec Name: Dolby TrueHD</t>
<t>Description: Lossless audio codec from Dolby. Each Matroska frame corresponds to a single Access Unit as defined in <xref target="TRUEHD"/>.</t>
<t>Initialization: none</t>
</section>

<section anchor="a-tta1"><name>A_TTA1</name>
<t>Codec ID: A_TTA1</t>
<t>Codec Name: The True Audio lossless audio compressor</t>
<t>Description: The format is described in <xref target="TTA"/>.
Each frame is kept intact, including the CRC32. The header and seektable are dropped. <tt>SamplingFrequency</tt>, <tt>Channels</tt> and <tt>BitDepth</tt> are used in the <tt>TrackEntry</tt>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the TTA Header Structure, as defined in <xref target="TTA"/>.</t>
</section>

<section anchor="a-vorbis"><name>A_VORBIS</name>
<t>Codec ID: A_VORBIS</t>
<t>Codec Name: Vorbis</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the first three Vorbis packet in order. The lengths of the packets precedes them. The actual layout is:</t>

<ul>
<li><t>Byte 1: number of distinct packets <tt>#p</tt> minus one inside the <tt>CodecPrivate</tt> block.
This <bcp14>MUST</bcp14> be "2" for current (as of 2016-07-08) Vorbis headers.</t>
</li>
<li><t>Bytes 2..n: lengths of the first <tt>#p</tt> packets, coded in Xiph-style lacing.
The length of the last packet is the length of the <tt>CodecPrivate</tt> block minus the lengths coded in these bytes minus one.</t>
</li>
<li><t>Bytes n+1..: The "Identification Header" as defined in Section 4.2.2 of <xref target="VORBIS"/>,
followed by the "Comment Header" as defined in Section 5 of <xref target="VORBIS"/>,
followed by the "Setup Header" as defined in Section 4.2.4 of <xref target="VORBIS"/>.</t>
</li>
</ul>
</section>

<section anchor="a-wavpack4"><name>A_WAVPACK4</name>
<t>Codec ID: A_WAVPACK4</t>
<t>Codec Name: WavPack lossless audio compressor</t>
<t>Description: The WavPack packets consist of a block defined in <xref target="WAVPACK"/> with a <tt>WavpackHeader</tt> header.
For multichannel (&gt; 2 channels) a frame consists of many packets. For more details, check the WavPack muxing description <xref target="wavpack"/>.</t>
<t>Codec BlockAdditions: For hybrid <tt>A_WAVPACK4</tt> encodings (that include a lossy encoding with a supplemental correction
to produce a lossless encoding), the correction part is stored in <tt>BlockAdditional</tt>.
The <tt>BlockAddID</tt> of the <tt>BlockMore</tt> containing these data <bcp14>MUST</bcp14> be 1.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the <tt>version</tt> 16-bit integer from the <tt>WavpackHeader</tt> of <xref target="WAVPACK"/> stored in little-endian.</t>
</section>
</section>

<section anchor="subtitle-codec-mappings"><name>Subtitle Codec Mappings</name>
<t>All codecs described in this section <bcp14>MUST</bcp14> have a <tt>TrackType</tt> (<xref target="RFC9559" sectionFormat="of" section="5.1.4.1.3"/>) value of "17" for subtitles.</t>
<t>Subtitle codec often contain meta information about the data they contain, like expected output dimension, language, etc.
Whenever possible these information inside the codec <bcp14>SHOULD</bcp14> be extracted and repeated at the Matroska level with
the appropriate element(s) inside the <tt>\Segment\Tracks\TrackEntry\Video</tt> and <tt>\Segment\Tracks\TrackEntry</tt> elements.
These values <bcp14>MUST</bcp14> be valid for the whole Segment.</t>

<section anchor="s-aribsub"><name>S_ARIBSUB</name>
<t>Codec ID: S_ARIBSUB</t>
<t>Codec Name: ARIB STD-B24 subtitles</t>
<t>Description: This is the textual subtitle format used in the ISDB/ARIB broadcasting standard.
For more information see <xref target="arib-isdb-subtitles"/> on ARIB (ISDB) subtitles.</t>
<t>Initialization: The <tt>CodecPrivate</tt> data are defined in <xref target="track-parameters-4"/>.</t>
</section>

<section anchor="s-dvbsub"><name>S_DVBSUB</name>
<t>Codec ID: S_DVBSUB</t>
<t>Codec Name: Digital Video Broadcasting (DVB) subtitles</t>
<t>Description: This is the graphical subtitle format used in the Digital Video Broadcasting standard.
For more information see <xref target="digital-video-broadcasting-dvb-subtitles"/> on  Digital Video Broadcasting (DVB).</t>
<t>Initialization: The <tt>CodecPrivate</tt> data are defined in <xref target="track-parameters-3"/>.</t>
</section>

<section anchor="s-hdmv-pgs"><name>S_HDMV/PGS</name>
<t>Codec ID: S_HDMV/PGS</t>
<t>Codec Name: HDMV presentation graphics subtitles (PGS)</t>
<t>Description: This is the graphical subtitle format used on Blu-rays. For more information,
see <xref target="hdmv-text-subtitles"/> on HDMV text presentation.</t>
<t>Initialization: none</t>
</section>

<section anchor="s-hdmv-textst"><name>S_HDMV/TEXTST</name>
<t>Codec ID: S_HDMV/TEXTST</t>
<t>Codec Name: HDMV text subtitles</t>
<t>Description: This is the textual subtitle format used on Blu-rays. For more information,
see <xref target="hdmv-presentation-graphics-subtitles"/> on HDMV graphics presentation.</t>
<t>Initialization: The <tt>CodecPrivate</tt> data are defined in <xref target="track-parameters-2"/>.</t>
</section>

<section anchor="s-kate"><name>S_KATE</name>
<t>Codec ID: S_KATE</t>
<t>Codec Name: Karaoke And Text Encapsulation</t>
<t>Description: A subtitle format developed for ogg. The mapping for Matroska is described
on the "Matroska mapping" section of <xref target="OggKate"/>.</t>
<t>The codec <bcp14>MAY</bcp14> use embedded fonts from attachments, as defined in <xref target="RFC9559" sectionFormat="of" section="21.2"/>, in that case the <tt>TrackEntry</tt> <bcp14>MUST</bcp14> contain an <tt>AttachmentLink</tt> element.</t>
<t>Initialization: Kate headers are stored in the <tt>CodecPrivate</tt> as xiph-laced packets.
The length of the last packet isn't encoded, it is deduced from the sizes of the other packets and the total size of the <tt>CodecPrivate</tt>.</t>
</section>

<section anchor="s-image-bmp"><name>S_IMAGE/BMP</name>
<t>Codec ID: S_IMAGE/BMP</t>
<t>Codec Name: Bitmap</t>
<t>Description: Basic image based subtitle format; The subtitles are stored as images, like in the DVD <xref target="DVD-Video"/>.
The timestamp in the block header of Matroska indicates the start display time,
the duration is set with the <tt>BlockDuration</tt> element. The full data for the subtitle bitmap
is stored in the Block's data section.</t>
<t>Initialization: none</t>
</section>

<section anchor="s-text-ass"><name>S_TEXT/ASS</name>
<t>Codec ID: S_TEXT/ASS</t>
<t>Codec Name: Advanced SubStation Alpha Format</t>
<t>Description: Each event is stored in its own <tt>Block</tt>.
For more information see <xref target="ssa-ass-subtitles"/> on SSA/ASS.</t>
<t>This codec ID <bcp14>MUST</bcp14> be used when "ScriptType: v4.00+" or "[V4+ Styles]" sections are found in the original SSA script.</t>
<t>The codec <bcp14>MAY</bcp14> use embedded fonts from attachments, as defined in <xref target="RFC9559" sectionFormat="of" section="21.2"/>, in that case the <tt>TrackEntry</tt> <bcp14>MUST</bcp14> contain an <tt>AttachmentLink</tt> element.</t>
<t>The codec <bcp14>MAY</bcp14> also be found with the Codec ID <tt>S_ASS</tt> in legacy media containers, but using that value is <bcp14>NOT RECOMMENDED</bcp14>.</t>
<t>Initialization: The "[Script Info]" and "[V4 Styles]" sections are stored in the <tt>CodecPrivate</tt>.</t>
</section>

<section anchor="s-text-ascii"><name>S_TEXT/ASCII</name>
<t>Codec ID: S_TEXT/ASCII</t>
<t>Codec Name: ASCII Plain Text</t>
<t>Description: Basic text subtitles with only ASCII characters allowed.</t>
<t>Initialization: none</t>
</section>

<section anchor="s-text-ssa"><name>S_TEXT/SSA</name>
<t>Codec ID: S_TEXT/SSA</t>
<t>Codec Name: SubStation Alpha Format</t>
<t>Description: Each event is stored in its own <tt>Block</tt>.
For more information see <xref target="ssa-ass-subtitles"/> on SSA/ASS.</t>
<t>This codec ID <bcp14>MUST NOT</bcp14> be used when "ScriptType: v4.00+" or "[V4+ Styles]" sections are found in the original SSA script.</t>
<t>The codec <bcp14>MAY</bcp14> use embedded fonts from attachments, as defined in <xref target="RFC9559" sectionFormat="of" section="21.2"/>, in that case the <tt>TrackEntry</tt> <bcp14>MUST</bcp14> contain an <tt>AttachmentLink</tt> element.</t>
<t>The codec <bcp14>MAY</bcp14> also be found with the Codec ID <tt>S_SSA</tt>, but using that value is <bcp14>NOT RECOMMENDED</bcp14>.</t>
<t>Initialization: The "[Script Info]" and "[V4+ Styles]" sections are stored in the <tt>CodecPrivate</tt>.</t>
</section>

<section anchor="s-text-usf"><name>S_TEXT/USF</name>
<t>Codec ID: S_TEXT/USF</t>
<t>Codec Name: Universal Subtitle Format</t>
<t>Description: An XML based subtitle format.
Each <tt>BlockGroup</tt> contains XML data from a "subtitle" XML element as defined in section 3.4 of <xref target="USF"/>,
without the "subtitle" element itself and with the start, stop duration mapped to the <tt>BlockGroup</tt> timestamp and <tt>BlockDuration</tt> element.
The "image" XML elements are turned into Matroska attachments and replaced in the stream with their attachment filename.</t>
<t>The codec <bcp14>MAY</bcp14> use embedded fonts from attachments, as defined in <xref target="RFC9559" sectionFormat="of" section="21.2"/>, in that case the <tt>TrackEntry</tt> <bcp14>MUST</bcp14> contain an <tt>AttachmentLink</tt> element.</t>
<t>Initialization: The <tt>CodecPrivate</tt> element <bcp14>MAY</bcp14> be present.
If present it <bcp14>MAY</bcp14> contain "metadata", "styles" and "effects" XML elements usable in the whole stream inside a parent "USFSubtitles" XML parent element,
similar to the "USFSubtitles" element of a standalone USF file but without the "subtitles" XML element.</t>
</section>

<section anchor="s-text-utf8"><name>S_TEXT/UTF8</name>
<t>Codec ID: S_TEXT/UTF8</t>
<t>Codec Name: UTF-8 Plain Text</t>
<t>Description: Basic text subtitles. For more information see <xref target="subtitles"/> on Subtitles.</t>
<t>Initialization: none</t>
</section>

<section anchor="s-text-webvtt"><name>S_TEXT/WEBVTT</name>
<t>Codec ID: S_TEXT/WEBVTT</t>
<t>Codec Name: Web Video Text Tracks Format (WebVTT)</t>
<t>Description: Advanced text subtitles defined by <xref target="WebVTT"/>. For more information see <xref target="webvtt"/>.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the WebVTT file body up to the first <tt>WebVTT cue block</tt>.</t>
<t>Codec BlockAdditions: Intermediate non-Cue Blocks <bcp14>SHOULD</bcp14> be stored in <tt>BlockAdditions</tt>. The <tt>BlockAddID</tt> of the <tt>BlockMore</tt> containing these data <bcp14>MUST</bcp14> be 1.</t>
</section>

<section anchor="s-vobsub"><name>S_VOBSUB</name>
<t>Codec ID: S_VOBSUB</t>
<t>Codec Name: VobSub subtitles</t>
<t>Description: Uses data from <xref target="VobSub"/> files. The data represent subtitle data used on DVDs <xref target="DVD-Video"/>.
VobSubs consist of two files, the .idx containing information, and the .sub, containing the actual data.
Only version 7 and newer of VobSubs files are supported.</t>
<t>The line of the .idx file beginning with "id:" <bcp14>MUST</bcp14> be transformed into the appropriate Matroska track language element.</t>
<t>For each line of the .idx file containing a "timestamp:" and "filepos:" data is read from the appropriate
position in the .sub file. This data consists of a MPEG program stream which in turn
contains SPU packets. The MPEG program stream data is discarded, and each SPU packet
is put into one Matroska frame.</t>
<t>Initialization: The <tt>CodecPrivate</tt> contains the "palette:" and "size:" lines from the .idx file.
Other lines from the .idx file not containing empty lines, comments, or starting with "alt:"; "langidx:", "id:",
or "timestamp:" <bcp14>MAY</bcp14> be added in the <tt>CodecPrivate</tt> data for preservation.</t>
</section>
</section>

<section anchor="button-codec-mappings"><name>Button Codec Mappings</name>
<t>All codecs described in this section <bcp14>MUST</bcp14> have a <tt>TrackType</tt> (<xref target="RFC9559" sectionFormat="of" section="5.1.4.1.3"/>) value of "18" for buttons.</t>

<section anchor="b-vobbtn"><name>B_VOBBTN</name>
<t>Codec ID: B_VOBBTN</t>
<t>Codec Name: VobBtn Buttons</t>
<t>Description: Based on MPEG/VOB PCI packets.
The frame contains a header consisting of the string "butonDVD" followed by the width and height
in pixels (16-bit unsigned integer each) and 4 reserved bytes. The rest is a full PCI packet described in <xref target="DVD-Info.PCI"/>.</t>
</section>
</section>
</section>

<section anchor="block-addition-mappings"><name>Block Addition Mappings</name>
<t>This section describes the various types of <tt>BlockAdditionMapping</tt> that can be stored in Matroska.
These help the player interpret the multiple <tt>BlockAdditions</tt> that can be added to each Matroska <tt>BlockGroup</tt>.
More details can be found in section <xref target="block-additional-mapping"/>.</t>

<section anchor="defining-block-addition-mappings"><name>Defining Block Addition Mappings</name>
<t>Support for a Block Addition mapping is defined in Matroska with the following values.</t>

<section anchor="block-type-identifier"><name>Block Type Identifier</name>
<t>Each <tt>BlockAdditionMapping</tt> supported in Matroska <bcp14>MUST</bcp14> have a unique <tt>BlockAddIDType</tt>.
It <bcp14>MUST</bcp14> be defined for each Block Addition Mapping.</t>
</section>

<section anchor="block-type-name"><name>Block Type Name</name>
<t>Each <tt>BlockAdditionMapping</tt> supported in Matroska <bcp14>MAY</bcp14> have a <tt>BlockAddIDName</tt>.
The <tt>BlockAddIDName</tt> provides a readable label for the encoding.</t>
</section>

<section anchor="description-1"><name>Description</name>
<t>An optional description for the encoding. This value is only intended for human consumption.</t>
</section>
</section>

<section anchor="initial-block-addition-mappings"><name>Initial Block Addition Mappings</name>

<section anchor="use-blockaddidvalue"><name>Use BlockAddIDValue</name>
<t>Block type identifier: 0</t>
<t>Block type name: "Use BlockAddIDValue"</t>
<t>Description: This value indicates that the actual type is stored in <tt>BlockAddIDValue</tt> instead.
This value is used when it is important to have a strong compatibility
with players or derived formats not supporting <tt>BlockAdditionMapping</tt> but using <tt>BlockAdditions</tt>
with an unknown <tt>BlockAddIDValue</tt>, and <bcp14>SHOULD NOT</bcp14> be used if it is possible to use another value.</t>
</section>

<section anchor="opaque-data"><name>Opaque Data</name>
<t>Block type identifier: 1</t>
<t>Block type name: "Opaque data"</t>
<t>Description: the <tt>BlockAdditional</tt> data is interpreted as opaque additional data passed to the codec
with the Block data.
The usage of these <tt>BlockAdditional</tt> data is defined in the "Codec BlockAdditions" section of the codec; see <xref target="codec-blockadditions"/>.</t>
</section>

<section anchor="itu-t-35-metadata"><name>ITU T.35 Metadata</name>
<t>Block type identifier: 4</t>
<t>Block type name: "ITU T.35 metadata"</t>
<t>Description: the <tt>BlockAdditional</tt> data is interpreted as ITU T.35 metadata, as defined by <xref target="ITU-T.35"/>
terminal codes. <tt>BlockAddIDValue</tt> <bcp14>MUST</bcp14> be 4.</t>
<t>HDR10+ dynamic metadata can be stored as ITU T.35 terminal codes as defined in Table 8 of <xref target="CTA.861-4"/>.</t>
</section>

<section anchor="smpte-st-12-1-timecode"><name>SMPTE ST 12-1 Timecode</name>
<t>Block type identifier: 121</t>
<t>Block type name: "SMPTE ST 12-1 timecode"</t>
<t>Description: the <tt>BlockAdditional</tt> data is defined in <xref target="smpte-st-12-1-timecode-description"/>.</t>
</section>

<section anchor="avce"><name>avcE</name>
<t>Block type identifier: 0x61766345</t>
<t>Block type name: Dolby Vision enhancement-layer AVC configuration</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as the Dolby Vision enhancement-layer AVC
configuration box as described in <xref target="DolbyVision-ISOBMFF"/>. This extension <bcp14>MUST NOT</bcp14>
be used if <tt>CodecID</tt> is not <tt>V_MPEG4/ISO/AVC</tt>.</t>
</section>

<section anchor="hvce"><name>hvcE</name>
<t>Block type identifier: 0x68766345</t>
<t>Block type name: "Dolby Vision enhancement-layer HEVC configuration"</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as the Dolby Vision enhancement-layer HEVC configuration as described in <xref target="DolbyVision-ISOBMFF"/>.
This extension <bcp14>MUST NOT</bcp14> be used if <tt>CodecID</tt> is not <tt>V_MPEGH/ISO/HEVC</tt>.</t>
</section>

<section anchor="dvcc"><name>dvcC</name>
<t>Block type identifier: 0x64766343</t>
<t>Block type name: "Dolby Vision configuration dvcC"</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as <tt>DOVIDecoderConfigurationRecord</tt> structure, as defined in <xref target="DolbyVision-ISOBMFF"/>,
for Dolby Vision profiles 0 to 7 inclusive.</t>
</section>

<section anchor="dvvc"><name>dvvC</name>
<t>Block type identifier: 0x64767643</t>
<t>Block type name: "Dolby Vision configuration dvvC"</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as <tt>DOVIDecoderConfigurationRecord</tt> structure, as defined in <xref target="DolbyVision-ISOBMFF"/>,
for Dolby Vision profiles 8 to 10 inclusive and 20.</t>
</section>

<section anchor="dvwc"><name>dvwC</name>
<t>Block type identifier: 0x64767743</t>
<t>Block type name: "Dolby Vision configuration dvwC"</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as <tt>DOVIDecoderConfigurationRecord</tt> structure, as defined in <xref target="DolbyVision-ISOBMFF"/>,
for Dolby Vision profiles 11 to 19 inclusive.</t>
</section>

<section anchor="mvcc"><name>mvcC</name>
<t>Block type identifier: 0x6D766343</t>
<t>Block type name: "MVC configuration"</t>
<t>Description: the <tt>BlockAddIDExtraData</tt> data is interpreted as <tt>MVCDecoderConfigurationRecord</tt> structure, as defined in <xref target="ISO.14496-15"/>.
This extension <bcp14>MUST NOT</bcp14> be used if <tt>CodecID</tt> is not <tt>V_MPEG4/ISO/AVC</tt>.</t>
</section>
</section>
</section>

<section anchor="audio-codecs"><name>Audio Codecs</name>

<section anchor="wavpack"><name>WavPack</name>
<t>WavPack is an audio codec primarily designed for lossless audio, but it can also be used as a lossy codec.</t>
<t><xref target="WAVPACK"/> stores each data in variable length frames. That means each frame can have a different number of samples.</t>
<t>Each WavPack block starts with a <tt>WavpackHeader</tt> header as defined in <xref target="WAVPACK"/>, stored in little-endian.</t>
<t>To save space and avoid redundant information in Matroska some data from the <tt>WavpackHeader</tt> header are removed, when saved in Matroska.
All the data from the <tt>WavpackHeader</tt> are kept in little-endian.</t>
<t>The <tt>CodecPrivate</tt> contains the <tt>version</tt> 16-bit integer from the <tt>WavpackHeader</tt> of <xref target="WAVPACK"/> stored in little-endian.</t>
<t>Depending on the number of audio channels and whether the hybrid mode is kept or not, the storage of WavPack blocks in Matroska differ.</t>

<section anchor="lossless-and-lossy-storage"><name>Lossless And Lossy Storage</name>
<t>For multichannel files (more than 2 channels, like for 5.1), a frame consists of multiple WavPack blocks.
The first one having the <tt>INITIAL_BLOCK</tt> (bit 11) flag set and the last one the <tt>FINAL_BLOCK</tt> (bit 12) flag set.
For a mono or stereo file, both flags are set in each WavPack block.</t>

<section anchor="mono-stereo"><name>Mono/Stereo</name>
<t>A <tt>Block</tt> or <tt>SimpleBlock</tt> frame contains the following header with the some fields taken from the <tt>WavpackHeader</tt>
of a single WavPack block followed by the data of that WavPack block.</t>

<sourcecode type="c"><![CDATA[{
  uint32_t block_samples; // # samples in this block
  uint32_t flags;         // various flags for id and decoding
  uint32_t crc;           // crc for actual decoded data
}
[ block data ]
]]></sourcecode>
</section>

<section anchor="multichannel"><name>Multichannel</name>
<t>For multichannel files, a WavPack file uses multiple WavPack block to store all channels of a frame.
The WavPack blocks for each channels of a frame are stored consecutively into a Matroska <tt>Block</tt> or <tt>SimpleBlock</tt>.</t>
<t>Each WavPack block is preceded by a header.
The header for the first WavPack block is similar to the mono/stereo one (<xref target="mono-stereo"/>)
with the addition of a "blocksize" field, which is the size of the first WavPack block minus the <tt>WavpackHeader</tt> size.
The header for the following WavPack blocks use the "flags" and "crc" of the <tt>WavpackHeader</tt> of each respective WavPack block,
followed with the size of each respective WavPack block minus the <tt>WavpackHeader</tt> size.</t>

<sourcecode type="c"><![CDATA[{
  uint32_t block_samples; // # samples in this block
  uint32_t flags;         // various flags for id and decoding
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ block data # 1 ]
{
  uint32_t flags;         // various flags for id and decoding
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ block data # 2 ]
{
  uint32_t flags;         // various flags for id and decoding
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ block data # 3 ]
...
]]></sourcecode>
</section>
</section>

<section anchor="hybrid-storage"><name>Hybrid Storage</name>
<t>WavPack has a hybrid mode that splits the audio frames between lossy and correction packets.
Adding both gives a lossless version of the original audio.
It is possible to only store the lossy part in Matroska or both together.
Storing only the lossy part is equivalent to the format described in <xref target="lossless-and-lossy-storage"/>.
This section explains how to store all hybrid data in Matroska.</t>
<t>Hybrid WavPack is encoded in 2 files.
The first one has a lossy part and the second file has the correction part to reconstruct the original audio losslessly.</t>
<t>Each WavPack block in the correction file corresponds to a WavPack block in the lossy file with the same number of samples, that's also true for a multichannel file.
This means that if a frame is made of 4 WavPack blocks, the correction file will have 4 WavPack blocks in the corresponding frame.
The header of the correction WavPack block is exactly the same as in the lossy WavPack block, except for the CRC.</t>
<t>In Matroska, the correction part is stored as an additional data available to the <tt>Block</tt> (see <xref target="block-additional-mapping"/>).
This way a file could be remuxed and not keep the Block Additional data and still be usable as a lossy WavPack file.
The <tt>Block</tt> data of the lossy file are stored exactly the same as for lossy storage defined in <xref target="lossless-and-lossy-storage"/>.</t>
<t>A <tt>BlockAdditionMapping</tt> <bcp14>MUST</bcp14> be used for hybrid WavPack <tt>TrackEntry</tt>'.</t>
<t>The <tt>BlockAddIDType</tt> of that <tt>BlockAdditionMapping</tt> <bcp14>MUST</bcp14> be set to 1 for hybrid WavPack, corresponding to Opaque data; see <xref target="opaque-data"/>.</t>
<t>Each WavPack frame is stored in a <tt>BlockGroup</tt> that <bcp14>MUST</bcp14> have at least a <tt>BlockMore</tt> to hold the correction data.</t>
<t>The <tt>BlockAddID</tt> of that <tt>BlockMore</tt> <bcp14>MUST</bcp14> be 1, i.e., the default value.</t>

<section anchor="mono-stereo-1"><name>Mono/Stereo</name>
<t>The <tt>BlockAdditional</tt> element of the correction data <tt>BlockMore</tt> contains the following header with the "crc" field from the <tt>WavpackHeader</tt> of the WavPack block of the correction file
matching the WavPack block of the lossy frame used to fill the <tt>Block</tt> data, followed by the data of that correction file WavPack block.</t>

<sourcecode type="c"><![CDATA[{
  uint32_t crc;           // crc for actual decoded data
}
[ correction block data ]
]]></sourcecode>
</section>

<section anchor="multichannel-1"><name>Multichannel</name>
<t>The <tt>BlockAdditional</tt> element of the correction data <tt>BlockMore</tt> contains the following header with the data from the each <tt>WavpackHeader</tt> of the WavPack block of the correction file
matching the WavPack block in the lossy file used to fill the <tt>Block</tt> data, followed by the data of the correction file WavPack block.</t>

<sourcecode type="c"><![CDATA[{
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ correction block data # 1 ]
{
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ correction block data # 2 ]
{
  uint32_t crc;           // crc for actual decoded data
  uint32_t blocksize;     // size of the data to follow
}
[ correction block data # 3 ]
...
]]></sourcecode>
</section>
</section>
</section>
</section>

<section anchor="subtitles"><name>Subtitles</name>
<t>Here is a list of guidelines for storing subtitles in Matroska:</t>

<ul>
<li><t>As a general rule of thumb for all codecs, information that is global to an entire stream
<bcp14>SHOULD</bcp14> be stored in the <tt>CodecPrivate</tt> element, although not all codec mappings are designed this way.</t>
</li>
<li><t>As subtitles usually come with a start and stop timestamps or a start timestamp and a duration,
<tt>SimpleBlock</tt> is usually not used as it doesn't allow storing the <tt>BlockDuration</tt>.
One exception would be if the subtitle track has a <tt>DefaultDuration</tt> which doesn't require a <tt>BlockDuration</tt>.</t>
</li>
<li><t>Start and stop timestamps that are used in a timestamps original storage format <bcp14>SHOULD</bcp14>
be removed when being placed in Matroska as they could interfere if the file is edited
afterwards. Instead, the <tt>Block</tt>'s timestamp and <tt>BlockDuration</tt> <bcp14>SHOULD</bcp14> be used to say when the timestamp is displayed.</t>
</li>
<li><t>Because a "subtitle" stream is actually just an overlay stream, anything with a transparency
layer could be used, including video.</t>
</li>
</ul>

<section anchor="images-subtitles"><name>Images Subtitles</name>
<t>A common image format imported into Matroska is the VobSub subtitle format.
This subtitle type is generated by exporting the subtitles from a DVD <xref target="DVD-Video"/>.</t>
<t>If the subtitle version in the .IDX file is less than v7,
the content has to be remuxed as the <tt>S_VOBSUB</tt> <tt>CodecID</tt> only supports version 7 and newer of VobSubs files; see <xref target="s-vobsub"/>.
One way to remux the subtitles is to use the SubResync utility from VobSub 2.23 (or MPC) into v7 format.
Generally any newly created subs will be in v7 format.</t>
<t>The .IFO file will not be used at all.</t>
<t>If there is more than one subtitle stream in the VobSub set, each stream is
separated into separate tracks for storage in Matroska. E.g. the VobSub file contains
streams for both English and German subtitles. Then the resulting Matroska file will
contain multiple tracks, and language information can be mapped
to Matroska's language tags and dropped from the streams.</t>
<t>The .IDX file is reformatted (see below) and placed in the <tt>CodecPrivate</tt>.</t>
<t>Each .BMP will be stored in its own Block. The Timestamp will be stored in the <tt>Block</tt> timestamp
and the duration will be stored in the Default Duration.</t>
<t>Here is an example .IDX file:</t>

<sourcecode type="vobsub"><![CDATA[ # VobSub index file, v7 (do not modify this line!)
 #
 # To repair desynchronization, you can insert gaps this way:
 # (it usually happens after vob id changes)
 #
 # delay: [sign]hh:mm:ss:ms
 #
 # Where:
 # [sign]: +, - (optional)
 # hh: hours (0 <= hh)
 # mm/ss: minutes/seconds (0 <= mm/ss <= 59)
 # ms: milliseconds (0 <= ms <= 999)
 #
 # You can also modify timestamps or delete a few subs you don't
 # like. Just make sure they stay in increasing order.

 # Settings

 # Original frame size
 size: 720x480

 # Origin, relative to the upper-left corner, can be overloaded by
 # alignment
 org: 0, 0

 # Image scaling (hor,ver), origin is at the upper-left corner or at
 # the alignment coord (x, y)
 scale: 100%, 100%

 # Alpha blending
 alpha: 100%

 # Smoothing for very blocky images (use OLD for no filtering)
 smooth: OFF

 # In millisecs
 fadein/out: 50, 50

 # Force subtitle placement relative to (org.x, org.y)
 align: OFF at LEFT TOP

 # For correcting non-progressive desync. (in millisecs or
 # hh:mm:ss:ms)
 # Note: Not effective in DirectVobSub, use "delay: ... " instead.
 time offset: 0

 # ON: displays only forced subtitles, OFF: shows everything
 forced subs: OFF

 # The original palette of the DVD
 palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \
 b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, \
 fdfdfd

 # Custom colors (transp idxs and the four colors)
 custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \
 000000

 # Language index in use
 langidx: 0

 # English
 id: en, index: 0
 # Uncomment next line to activate alternative name in DirectVobSub /
 # Windows Media Player 6.x
 # alt: English
 # Vob/Cell ID: 1, 1 (PTS: 0)
 timestamp: 00:00:01:101, filepos: 000000000
 timestamp: 00:00:08:708, filepos: 000001000
]]></sourcecode>
<t>First, lines beginning with "#" are removed. These are comments to make text file editing easier,
and as this is not a text file, they aren't needed.</t>
<t>Next remove the "langidx" and "id" lines. These are used to differentiate the subtitle
streams and define the language. As the streams will be stored separately anyway,
there is no need to differentiate them here. Also, the language setting will be stored
in the Matroska tags, so there is no need to store it here.</t>
<t>Finally, the "timestamp" will be used to set the <tt>Block</tt>'s timestamp. Once it is set there,
there is no need for it to be stored here. Also, as it may interfere if the file is edited,
it <bcp14>SHOULD NOT</bcp14> be stored here and it <bcp14>MUST NOT</bcp14> be used by the decoder.</t>
<t>Once all of these items are removed, the data to store in the <tt>CodecPrivate</tt> <bcp14>SHOULD</bcp14> look like this:</t>

<sourcecode type="vobsub"><![CDATA[ size: 720x480
 org: 0, 0
 scale: 100%, 100%
 alpha: 100%
 smooth: OFF
 fadein/out: 50, 50
 align: OFF at LEFT TOP
 time offset: 0
 forced subs: OFF
 palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \
 b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, \
 fdfdfd
 custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \
 000000
]]></sourcecode>
<t>There <bcp14>SHOULD</bcp14> also be two Blocks containing one image each with the timestamps "00:00:01:101" and "00:00:08:708".</t>
</section>

<section anchor="srt-subtitles"><name>SRT Subtitles</name>
<t>SRT is perhaps the most basic of all subtitle formats.</t>
<t>It consists of four parts, all in text:</t>

<ol>
<li><t>A number indicating which subtitle it is in the sequence.</t>
</li>
<li><t>The time that the subtitle appears on the screen, and then disappears.</t>
</li>
<li><t>The subtitle itself.</t>
</li>
<li><t>A blank line indicating the start of a new subtitle.</t>
</li>
</ol>
<t>When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/UTF8) and placed
in the data portion of the Block. Part 2 is used to set the timestamp of the Block,
and <tt>BlockDuration</tt> element. Nothing else is used.</t>
<t>Here is an example SRT file:</t>

<sourcecode type="srt"><![CDATA[1
00:02:17,440 --> 00:02:20,375
Senator, we're making
our final approach into Coruscant.

2
00:02:20,476 --> 00:02:22,501
Very good, Lieutenant.
]]></sourcecode>
<t>In this example, the text "Senator, we're making our final approach into Coruscant."
would be converted into UTF-8 and placed in the Block. The timestamp of the block would
be set to "00:02:17,440". And the <tt>BlockDuration</tt> element would be set to "00:00:02,935".</t>
<t>The same is repeated for the next subtitle.</t>
<t>Because there are no general settings for SRT, the <tt>CodecPrivate</tt> is left blank.</t>
</section>

<section anchor="ssa-ass-subtitles"><name>SSA/ASS Subtitles</name>
<t>SSA stands for Sub Station Alpha. It's the file format used by the popular subtitle editor SubStation Alpha.
It allows you to do some advanced display features, like positioning, karaoke, or style managements...</t>
<t>For detailed information on SSA/ASS, see the SSA specs <xref target="SSA"/>.
It includes an SSA specs description and the advanced features added by ASS format (standing for Advanced SSA).
Because SSA and ASS are so similar, they are treated the same here.</t>
<t>Like SRT, this format is text based with a particular syntax.</t>
<t>A file consists of 4 or 5 parts, declared similar to an INI file.</t>
<t>The first, "[Script Info]" contains some information about the subtitle file,
such as its title, who created it, type of script and "PlayResY",
which is very important, because everything in your script (font size, positioning) is scaled by it.
Sub Station Alpha uses your desktops Y resolution to write this value, so if a friend
with a large monitor and a high screen resolution gives you an edited script,
you can mess everything up by saving the script in SSA with your low-resolution monitor.</t>
<t>The second, "[V4 Styles]" or "[V4+ Styles]", is a list of style definitions.
A style describes how a text will look on the screen.
It defines font, font size, primary/.../outline color, position, alignment, etc.</t>
<t>For example, this:</t>

<sourcecode type="ssa"><![CDATA[Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, \
TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, \
Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,\
0,1,1,2,2,5,5,30,0,0
]]></sourcecode>
<t>The third, "[Events]", is the list of text you want to display at the right timing.
You can specify some attributes here, such as the style to use for this event
(<bcp14>MUST</bcp14> be defined in the list), the position of the text (Left, Right, Vertical Margin),
or some effect.  The Name is used by the translator to know who said this sentence.
Timing is in h:mm:ss.cc (centisec).</t>

<sourcecode type="ssa"><![CDATA[Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, \
Effect, Text
Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,\
0000,,Et les enregistrements de ses ondes delta ?
Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,\
0000,,Toujours rien.
]]></sourcecode>
<t>"[Pictures]" or "[Fonts]" part can be found in some SSA files. These parts contain UUE-encoded
pictures/font. These features are only used by Sub Station Alpha -- i.e.,
no filter (Vobsub/Avery Lee Subtiler filter) uses them.</t>
<t>Now, how are they stored in Matroska?</t>

<ul>
<li><t>All text is converted to UTF-8</t>
</li>
<li><t>All the headers, "[Script Info]" and the "[V4 Styles]"/"[V4+ Styles]" list, are stored in <tt>CodecPrivate</tt>.</t>
</li>
<li><t>Start &amp; End field are used to set TimeStamp
and the <tt>BlockDuration</tt> element. the data stored is:</t>
</li>
<li><t>Events are stored in the Block
in this order: ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect,
Text (Layer comes from ASS specs ... it's empty for SSA.) "ReadOrder field is needed
for the decoder to be able to reorder the streamed samples as they were placed originally in the file."</t>
</li>
</ul>
<t>Here is an example of an SSA file.</t>

<sourcecode type="ssa"><![CDATA[[Script Info]
; This is a Sub Station Alpha v4 script.
Title: Wolf's rain 2
Original Script: Anime-spirit Ishin-francais
Original Translation: Coolman
Original Editing: Spikewolfwood
Original Timing: Lord_alucard
Original Script Checking: Spikewolfwood
ScriptType: v4.00
Collisions: Normal
PlayResY: 1024
PlayDepth: 0
Wav: 0, 128697,D:\Alex\Anime\- Fansub -\- TAFF -\WR_-_02_Wav.wav
Wav: 0, 120692,H:\team truc\WR_-_02.wav
Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav
LastWav: 3
Timer: 100,0000

[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, \
TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, \
Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,\
30,30,30,0,0
Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,\
0,3,30,30,30,0,0
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,\
0,1,1,2,2,5,5,30,0,0

[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, \
Effect, Text
Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,\
0000,,Et les enregistrements de ses ondes delta ?
Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,\
0000,,Toujours rien.
]]></sourcecode>
<t>Here is what would be placed into the <tt>CodecPrivate</tt> element.</t>

<sourcecode type="ssa"><![CDATA[[Script Info]
; This is a Sub Station Alpha v4 script.
Title: Wolf's rain 2
Original Script: Anime-spirit Ishin-francais
Original Translation: Coolman
Original Editing: Spikewolfwood
Original Timing: Lord_alucard
Original Script Checking: Spikewolfwood
ScriptType: v4.00
Collisions: Normal
PlayResY: 1024
PlayDepth: 0
Wav: 0, 128697,D:\Alex\Anime\- Fansub -\- TAFF -\WR_-_02_Wav.wav
Wav: 0, 120692,H:\team truc\WR_-_02.wav
Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav
LastWav: 3
Timer: 100,0000

[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, \
TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, \
Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,\
30,30,30,0,0
Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,\
0,3,30,30,30,0,0
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,\
0,1,1,2,2,5,5,30,0,0
]]></sourcecode>
<t>And here are the two blocks that would be generated.</t>
<t><tt>Block</tt>'s timestamp: 00:02:40.650
<tt>BlockDuration</tt>: 00:00:01.140</t>

<sourcecode type="ssa"><![CDATA[1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses \
ondes delta ?
]]></sourcecode>
<t><tt>Block</tt>'s timestamp: 00:02:42.420
<tt>BlockDuration</tt>: 00:00:01.730</t>

<sourcecode type="ssa"><![CDATA[2,,Wolf main,autre,0000,0000,0000,,Toujours rien.
]]></sourcecode>
</section>

<section anchor="webvtt"><name>WebVTT</name>
<t>The "Web Video Text Tracks Format" (short: WebVTT) is developed by the World Wide Web Consortium (W3C).
Its specifications are freely available at <xref target="WebVTT"/>.</t>
<t>The guiding principles for the storage of WebVTT in Matroska are:</t>

<ul>
<li><t>Consistency: store data in a similar way to other subtitle codecs</t>
</li>
<li><t>Simplicity: making decoding and remuxing as easy as possible for existing infrastructures</t>
</li>
<li><t>Completeness: keeping as much data as possible from the original WebVTT file</t>
</li>
</ul>

<section anchor="track-parameters"><name>Track Parameters</name>
<t>The <tt>CodecID</tt> to use is <tt>S_TEXT/WEBVTT</tt>.</t>
<t>This <tt>CodecPrivate</tt> contains all global blocks before the first subtitle entry. This starts at the "<tt>WEBVTT</tt>"
file identification marker but excludes the optional byte order mark.</t>
</section>

<section anchor="storage-of-non-global-webvtt-blocks"><name>Storage of non-global WebVTT blocks</name>
<t>Non-global WebVTT blocks (e.g., "NOTE") before a <tt>WebVTT caption or subtitle cue text</tt> are stored in Matroska's BlockAddition
element together with the Matroska Block containing the <tt>WebVTT caption or subtitle cue text</tt> these blocks precede
(see below for the actual format).</t>
</section>

<section anchor="storage-of-cues-in-matroska-blocks"><name>Storage of Cues in Matroska blocks</name>
<t>Each <tt>WebVTT caption or subtitle cue text</tt> is stored directly in the Matroska Block.</t>
<t>A muxer <bcp14>MUST</bcp14> change all <tt>WebVTT cue timestamp</tt>(s) present within the <tt>WebVTT caption or subtitle cue text</tt> to be relative
to the Matroska <tt>Block</tt>'s timestamp.</t>
<t>The Cue's start timestamp is used as the Matroska <tt>Block</tt>'s timestamp.</t>
<t>The difference between the Cue's end timestamp and its start timestamp is used as
the Matroska <tt>BlockDuration</tt>.</t>
</section>

<section anchor="blockadditions"><name>BlockAdditions</name>
<t>Each Matroska Block may be accompanied by one <tt>BlockAdditions</tt> element. Its format is as follows:</t>

<ol>
<li><t>The first line contains the <tt>WebVTT caption or subtitle cue text</tt>'s optional <tt>WebVTT cue settings list</tt> followed by
one line feed character (U+0x000a). The <tt>WebVTT cue settings list</tt> may be empty, in which case
the line consists of the line feed character only.</t>
</li>
<li><t>The second line contains the <tt>WebVTT caption or subtitle cue text</tt>'s optional <tt>WebVTT cue identifier</tt> followed by
one line feed character (U+0x000a). The line may be empty indicating that there was
no <tt>WebVTT cue identifier</tt> in the source file, in which case the line consists of the line feed character only.</t>
</li>
<li><t>The third and all following lines contain all <tt>WebVTT comment block</tt>(s) that precede
the current <tt>WebVTT cue block</tt>. These may be absent.
Each <tt>WebVTT comment block</tt> includes its <tt>WebVTT line terminator</tt> and is followed by one line feed character (U+0x000a).
The last <tt>WebVTT comment block</tt> <bcp14>MAY</bcp14> omit the <tt>WebVTT line terminator</tt> and the line feed character.</t>
</li>
</ol>
<t>If there is no Matroska BlockAddition element stored together with the Matroska Block,
then <tt>WebVTT cue settings list</tt>, <tt>WebVTT cue identifier</tt>, and <tt>WebVTT comment block</tt>(s) <bcp14>MUST</bcp14> be assumed to be absent.</t>
</section>

<section anchor="example-of-matroska-muxing"><name>Example of Matroska Muxing</name>
<t>Here's an example how a WebVTT is transformed.</t>
<t>Consider the following example WebVTT file:</t>

<sourcecode type="webvtt"><![CDATA[WEBVTT with text after the signature

STYLE
::cue {
  background-image: linear-gradient(to bottom, dimgray, lightgray);
  color: papayawhip;
}
/* Style blocks cannot use blank lines nor "dash dash greater \
than" */

NOTE comment blocks can be used between style blocks.

STYLE
::cue(b) {
  color: peachpuff;
}

REGION
id:bill
width:40%
lines:3
regionanchor:0%,100%
viewportanchor:10%,90%
scroll:up

NOTE
Notes always span a whole block and can cover multiple
lines. Like this one.
An empty line ends the block.

hello
00:00:00.000 --> 00:00:10.000
Example entry 1: Hello <b>world</b>.

NOTE style blocks can't appear after the first cue.

00:00:25.000 --> 00:00:35.000
Example entry 2: Another entry.
This one has multiple lines.

00:01:03.000 --> 00:01:06.500 position:90% align:right size:35%
Entry 3: That stuff to the right of the \
timestamps are cue settings.

00:03:10.000 --> 00:03:20.000
Entry 4: Entries can even include timestamps.
For example:<00:03:15.000>This becomes visible five seconds
after the first part.
]]></sourcecode>

<section anchor="codecprivate"><name>CodecPrivate</name>
<t>The following XML depicts the <tt>CodecPrivate</tt> element contains the UTF-8 text of all global WebVTT blocks before the first subtitle entry:</t>

<sourcecode type="xml"><![CDATA[<TrackEntry>
  <CodecPrivate>WEBVTT with text after the signature

STYLE
::cue {
  background-image: linear-gradient(to bottom, dimgray, lightgray);
  color: papayawhip;
}
/* Style blocks cannot use blank lines nor "dash dash greater \
than" */

NOTE comment blocks can be used between style blocks.

STYLE
::cue(b) {
  color: peachpuff;
}

REGION
id:bill
width:40%
lines:3
regionanchor:0%,100%
viewportanchor:10%,90%
scroll:up

NOTE
Notes always span a whole block and can cover multiple
lines. Like this one.
An empty line ends the block.</CodecPrivate>
</TrackEntry>
]]></sourcecode>
</section>

<section anchor="cue-block-1"><name>Cue Block 1</name>
<t>The following XML depicts the nested elements of a <tt>BlockGroup</tt> element with of the first <tt>WebVTT cue block</tt>.
The cue block timings are turned into Matroska timestamps.
The last line feed character (U+0x000a) is stripped.</t>
<t>The <tt>BlockAddition</tt> content starts with one empty line as there's no <tt>WebVTT cue settings list</tt>:</t>

<sourcecode type="xml"><![CDATA[<BlockGroup>
  <Block timestamp="0">Example entry 1: Hello <b>world</b>.</Block>
  <BlockDuration>10000</BlockDuration> <!-- 10000 Ticks of 1 ms -->
  <BlockAdditions>
    <BlockMore>
      <BlockAddID>1</BlockAddID>
      <BlockAdditional>

hello</BlockAdditional>
    </BlockMore>
  </BlockAdditions>
</BlockGroup>
]]></sourcecode>
</section>

<section anchor="cue-block-2"><name>Cue Block 2</name>
<t>The following XML depicts the nested elements of a <tt>BlockGroup</tt> element with of the second <tt>WebVTT cue block</tt>.
The last line feed character (U+0x000a) is stripped.</t>
<t>The <tt>BlockAddition</tt> content starts with two empty lines as there's neither a <tt>WebVTT cue settings list</tt> nor a <tt>WebVTT cue identifier</tt>,
Then follows the content of the <tt>WebVTT comment block</tt>(s). The last line feed character (U+0x000a) is stripped.</t>

<sourcecode type="xml"><![CDATA[<BlockGroup>
  <Block timestamp="25000">Example entry 2: Another entry.
This one has multiple lines.</Block>
  <BlockDuration>10000</BlockDuration>
  <BlockAdditions>
    <BlockMore>
      <BlockAddID>1</BlockAddID>
      <BlockAdditional>

NOTE style blocks can't appear after the first cue.</BlockAdditional>
    </BlockMore>
  </BlockAdditions>
</BlockGroup>
]]></sourcecode>
</section>

<section anchor="cue-block-3"><name>Cue Block 3</name>
<t>The following XML depicts the nested elements of a <tt>BlockGroup</tt> element with of the third <tt>WebVTT cue block</tt>.
The last line feed character (U+0x000a) is stripped.</t>
<t>The <tt>BlockAddition</tt> content ends with an empty line as there is no <tt>WebVTT cue identifier</tt> and
there were no <tt>WebVTT comment block</tt>.</t>

<sourcecode type="xml"><![CDATA[<BlockGroup>
  <Block timestamp="63000">Entry 3: That stuff to the right of the \
timestamps are cue settings.</Block>
  <BlockDuration>3500</BlockDuration>
  <BlockAdditions>
    <BlockMore>
      <BlockAddID>1</BlockAddID>
      <BlockAdditional>
position:90% align:right size:35%

</BlockAdditional>
    </BlockMore>
  </BlockAdditions>
</BlockGroup>
]]></sourcecode>
</section>

<section anchor="cue-block-4"><name>Cue Block 4</name>
<t>The following XML depicts the nested elements of a <tt>BlockGroup</tt> element with of the fourth <tt>WebVTT cue block</tt>.
The last line feed character (U+0x000a) is stripped.</t>
<t>No <tt>BlockAddition</tt> is used.</t>

<sourcecode type="xml"><![CDATA[<BlockGroup>
  <Block timestamp="190000">Entry 4: Entries can even include
  timestamps.
For example:<00:03:15.000>This becomes visible five seconds
after the first part.</Block>
  <BlockDuration>10000</BlockDuration>
</BlockGroup>
]]></sourcecode>
</section>
</section>

<section anchor="storage-of-webvtt-in-matroska-vs-webm"><name>Storage of WebVTT in Matroska vs. WebM</name>
<t>Note: the storage of WebVTT in Matroska is not the same as the design document for storage
of WebVTT in WebM <xref target="WebM-WebVTT"/>. There are several reasons for this including but not limited to:
the WebM document is old (from February 2012) and was based on an earlier draft of WebVTT
and ignores several parts that were added to WebVTT later; WebM does still not support subtitles at all <xref target="WebMContainer"/>;
the proposal suggests splitting the information across multiple tracks making
demuxer's and remuxer's life very difficult.</t>
<t>WebM uses the "D_WEBVTT/SUBTITLES", "D_WEBVTT/CAPTIONS", "D_WEBVTT/DESCRIPTIONS", and "D_WEBVTT/METADATA" <tt>CodecID</tt>
with different tracks depending on the data type and without a <tt>CodecPrivate</tt>.</t>
</section>
</section>

<section anchor="hdmv-presentation-graphics-subtitles"><name>HDMV Presentation Graphics Subtitles</name>
<t>The specifications for the HDMV Presentation Graphics Subtitle format (short: HDMV PGS)
can be found in
in section 9.14 "HDMV graphics streams" of the Blu-ray specifications <xref target="Blu-ray.Part3"/>.</t>

<section anchor="track-parameters-1"><name>Track Parameters</name>
<t>The <tt>CodecID</tt> to use is <tt>S_HDMV/PGS</tt>. A <tt>CodecPrivate</tt> element is not used.</t>
</section>

<section anchor="matroska-blocks"><name>Matroska Blocks</name>
<t>Each HDMV PGS Segment (short: Segment) will be stored in a Matroska Block.
A Segment is the data structure described in section 9.14.2.1 "Segment coding structure and parameters"
of the Blu-ray specifications <xref target="Blu-ray.Part3"/>.</t>
<t>Each Segment contains a presentation timestamp. This timestamp will be used as
the timestamp for the Matroska Block.</t>
<t>A Segment is normally shown until a subsequent Segment is encountered. Therefore, the Matroska Block
<bcp14>MAY</bcp14> have no Duration. In that case, a player <bcp14>MUST</bcp14> display a Segment within a Matroska Block
until the next Segment is encountered.</t>
<t>A muxer <bcp14>MAY</bcp14> use a Duration, e.g., by calculating the distance between two subsequent Segments.
If a Matroska Block has a Duration, a player <bcp14>MUST</bcp14> display that Segment only for
the duration of the <tt>BlockDuration</tt>.</t>
</section>
</section>

<section anchor="hdmv-text-subtitles"><name>HDMV Text Subtitles</name>
<t>The specifications for the HDMV Text Subtitle format (short: HDMV TextST) can be found
in section 9.15 "HDMV text subtitle streams" of the Blu-ray specifications <xref target="Blu-ray.Part3"/>.</t>

<section anchor="track-parameters-2"><name>Track Parameters</name>
<t>The <tt>CodecID</tt> to use is <tt>S_HDMV/TEXTST</tt>.</t>
<t>A <tt>CodecPrivate</tt> element is required. It <bcp14>MUST</bcp14> contain the stream's Dialog Style Segment
as described in section 9.15.4.2 "Dialog Style Segment" of the Blu-ray specifications <xref target="Blu-ray.Part3"/>.</t>
</section>

<section anchor="matroska-blocks-1"><name>Matroska Blocks</name>
<t>Each HDMV Dialog Presentation Segment (short: Segment) will be stored in a Matroska Block.
A Segment is the data structure described in section 9.15.4.3 "Dialog presentation segment"
of the Blu-ray specifications <xref target="Blu-ray.Part3"/>.</t>
<t>Each Segment contains a start and an end presentation timestamp (short: start PTS &amp; end PTS).
The start PTS will be used as the timestamp for the Matroska Block. The Matroska Block <bcp14>MUST</bcp14>
have a Duration, and that Duration is the difference between the end PTS and the start PTS.</t>
<t>A player <bcp14>MUST</bcp14> use the Matroska <tt>Block</tt>'s timestamp and <tt>BlockDuration</tt> instead of the Segment's
start and end PTS for determining when and how long to show the Segment.</t>
</section>

<section anchor="character-set"><name>Character set</name>
<t>When TextST subtitles are stored inside Matroska, the only allowed character set is UTF-8.</t>
<t>Each HDMV text subtitle stream in a Blu-ray can use one of a handful of character sets.
This information is not stored in the MPEG2 Transport Stream itself but in the accompanying Clip Information file.</t>
<t>Therefore, a muxer <bcp14>MUST</bcp14> parse the accompanying Clip Information file. If the information
indicates a character set other than UTF-8, it <bcp14>MUST</bcp14> re-encode all text Dialog Presentation Segments
from the indicated character set to UTF-8 prior to storing them in Matroska.</t>
</section>
</section>

<section anchor="digital-video-broadcasting-dvb-subtitles"><name>Digital Video Broadcasting (DVB) subtitles</name>
<t>The specifications for the Digital Video Broadcasting subtitle bitstream format (short: DVB subtitles)
can be found in the <xref target="ETSI.EN300-743"/> document.
The storage of DVB subtitles in MPEG transport streams is specified in the <xref target="ETSI.EN300-468"/> document.</t>

<section anchor="track-parameters-3"><name>Track Parameters</name>
<t>The <tt>CodecID</tt> to use is <tt>S_DVBSUB</tt>.</t>
<t>The <tt>CodecPrivate</tt> element is five bytes long and has the following structure:</t>

<ul>
<li><t>2 bytes: composition page ID (bit string, left bit first)</t>
</li>
<li><t>2 bytes: ancillary page ID (bit string, left bit first)</t>
</li>
<li><t>1 byte: subtitling type (bit string, left bit first)</t>
</li>
</ul>
<t>The semantics of these bytes are the same as the ones described in
section 6.2.41 "Subtitling descriptor" of <xref target="ETSI.EN300-468"/>.</t>
</section>

<section anchor="matroska-blocks-2"><name>Matroska Blocks</name>
<t>Each Matroska Block consists of one or more DVB Subtitle Segments as described
in section 7.2 "Syntax and semantics of the subtitling segment" of <xref target="ETSI.EN300-743"/>.</t>
<t>Each Matroska Block <bcp14>SHOULD</bcp14> have a Duration indicating how long the DVB Subtitle Segments
in that Block <bcp14>SHOULD</bcp14> be displayed.</t>
</section>
</section>

<section anchor="arib-isdb-subtitles"><name>ARIB (ISDB) subtitles</name>
<t>The specifications for the ARIB B-24 subtitle bitstream format (short: ARIB subtitles)
and its storage in MPEG transport streams can be found in the documents
<xref target="ARIB.STD-B24"/>, <xref target="ARIB.STD-B10"/>, and <xref target="ARIB.TR-B14"/>.</t>

<section anchor="track-parameters-4"><name>Track Parameters</name>
<t>The <tt>CodecID</tt> to use is <tt>S_ARIBSUB</tt>.</t>
<t>The <tt>CodecPrivate</tt> element is three bytes long and has the following structure:</t>

<ul>
<li><t>1 byte: component tag (bit string, left bit first)</t>
</li>
<li><t>2 bytes: data component ID (bit string, left bit first)</t>
</li>
</ul>
<t>The semantics of the component tag are the same as those described in <xref target="ARIB.STD-B10"/>, part 2, Annex J.
The semantics of the data component ID are the same as those described in <xref target="ARIB.TR-B14"/>, fascicle 2, Vol. 3, Section 2, 4.2.8.1.</t>
</section>

<section anchor="matroska-blocks-3"><name>Matroska Blocks</name>
<t>Each Matroska Block consists of a single synchronized PES data structure as described in
chapter 5 "Independent PES transmission protocol" of <xref target="ARIB.STD-B24"/>, volume 3, with a
Synchronized_PES_data_byte block containing one or more ISDB Caption Data Groups as described
in chapter 9 "Transmission of caption and superimpose" of <xref target="ARIB.STD-B24"/>, volume 1, part 3.
All of the Caption Statement Data Groups in a given Matroska Track <bcp14>MUST</bcp14> use the same language index.</t>
<t>A Data Group is normally shown until a subsequent Group provides instructions to clear it.
Therefore, the Matroska Block <bcp14>SHOULD NOT</bcp14> have a Duration.
A player <bcp14>SHOULD</bcp14> display a Data Group within a Matroska Block until its internal duration elapses,
or until a subsequent Data Group removes it.</t>
</section>
</section>
</section>

<section anchor="block-additional-mapping"><name>Block Additional Mapping</name>
<t>Extra data or metadata can be added to each <tt>Block</tt> using <tt>BlockAdditional</tt> data.
Each <tt>BlockAdditional</tt> contains a <tt>BlockAddID</tt> that identifies the kind of data it contains.
When the <tt>BlockAddID</tt> is set to "1" the contents of the <tt>BlockAdditional</tt> element
are defined by the "Codec BlockAdditions" section of the codec; see <xref target="codec-blockadditions"/>.</t>
<t>The following XML depicts the nested elements of a <tt>BlockGroup</tt> element with an example of <tt>BlockAdditions</tt> with a <tt>BlockAddID</tt> of "1":</t>

<sourcecode type="xml"><![CDATA[<BlockGroup>
  <Block>{Binary data of a VP9 video frame in YUV}</Block>
  <BlockAdditions>
    <BlockMore>
      <BlockAddID>1</BlockAddID>
      <BlockAdditional>
        {alpha channel encoding to supplement the VP9 frame}
      </BlockAdditional>
    </BlockMore>
  </BlockAdditions>
</BlockGroup>
]]></sourcecode>
<t>When the <tt>BlockAddID</tt> is set a value greater than "1", then the contents of the
<tt>BlockAdditional</tt> element are defined by the <tt>BlockAdditionMapping</tt> element, within
the associated <tt>TrackEntry</tt> element, where the <tt>BlockAddID</tt> element of <tt>BlockAdditional</tt> element
equals the <tt>BlockAddIDValue</tt> of the associated <tt>TrackEntry</tt>'s <tt>BlockAdditionMapping</tt> element.
That <tt>BlockAdditionMapping</tt> element identifies a particular <tt>Block Additional Mapping</tt> by the <tt>BlockAddIDType</tt>.</t>
<t>The values of <tt>BlockAddID</tt> that are 2 or greater have no semantic meaning, but simply
associate the <tt>BlockMore</tt> element with a <tt>BlockAdditionMapping</tt> of the associated <tt>Track</tt>.
See <xref target="block-additional-mapping"/> on <tt>Block Additional Mappings</tt> for more information.</t>
<t>It is <bcp14>RECOMMENDED</bcp14> to not use a value of 4 for <tt>BlockAddID</tt> and <tt>BlockAddIDValue</tt> when <tt>BlockAddIDType</tt> is not 4 -- i.e., ITU T.35 metadata <xref target="itu-t-35-metadata"/>,
as some WebM-oriented demuxers consider a block with <tt>BlockAddID</tt> of 4 as ITU T.35 metadata
without checking the <tt>BlockAddIDType</tt> element.</t>
<t>The following XML depicts a use of a <tt>Block Additional Mapping</tt> to associate a timecode value with a <tt>Block</tt>:</t>

<sourcecode type="xml"><![CDATA[<Segment>
  <!--Mandatory elements omitted for readability-->
  <Tracks>
    <TrackEntry>
      <TrackNumber>1</TrackNumber>
      <TrackUID>568001708</TrackUID>
      <TrackType>1</TrackType>
      <BlockAdditionMapping>
        <BlockAddIDValue>2</BlockAddIDValue><!--arbitrary value
          used in BlockAddID-->
        <BlockAddIDName>timecode</BlockAddIDName>
        <BlockAddIDType>121</BlockAddIDType>
      </BlockAdditionMapping>
      <CodecID>V_FFV1</CodecID>
      <Video>
        <PixelWidth>1920</PixelWidth>
        <PixelHeight>1080</PixelHeight>
      </Video>
    </TrackEntry>
  </Tracks>
  <Cluster>
    <Timestamp>3000</Timestamp>
    <BlockGroup>
      <Block>{binary video frame}</Block>
      <BlockAdditions>
        <BlockMore>
          <BlockAddID>2</BlockAddID><!--arbitrary value from
            BlockAdditionMapping-->
          <BlockAdditional>01:00:00:00</BlockAdditional><!--presented
           as a string for readability but should use binary encoding
           defined in the associated mapping -->
        </BlockMore>
      </BlockAdditions>
    </BlockGroup>
  </Cluster>
</Segment>
]]></sourcecode>
<t><tt>Block Additional Mappings</tt> detail how additional data is stored in the <tt>BlockMore</tt> element
with a <tt>BlockAdditionMapping</tt> element, within the <tt>Track</tt> element, which identifies the <tt>BlockAdditional</tt> content.
<tt>Block Additional Mappings</tt> define the <tt>BlockAddIDType</tt> value reserved to identify that
type of data as well as providing an optional label stored within the <tt>BlockAddIDName</tt> element.
When the <tt>Block Additional Mapping</tt> is dependent on additional contextual information,
then the Mapping <bcp14>SHOULD</bcp14> describe how such additional contextual information is stored within the <tt>BlockAddIDExtraData</tt> element.</t>

<section anchor="smpte-st-12-1-timecode-description"><name>SMPTE ST 12-1 Timecode Description</name>
<t>SMPTE ST 12-1 timecode values can be stored in the <tt>BlockMore</tt> element to associate
the content of a Matroska Block with a particular timecode value.
If the Block uses Lacing, the timecode value is associated with the first frame of the Lace.</t>
<t>The <tt>Block Additional Mapping</tt> contains a full binary representation of a 64-bit SMPTE timecode
value stored in big-endian format and expressed exactly as defined in Section 8 and 9
of SMPTE 12M <xref target="SMPTE.ST12-1"/>, without the 16-bit synchronization word.
For convenience, here are the time address bit assignments as described in <xref target="RFC5484" sectionFormat="of" section="6.2"/>:</t>
<table anchor="ST12Bits"><name>SMPTE ST 12-1 Time Address Bit Positions</name>
<thead>
<tr>
<th align="center">Bit Positions</th>
<th align="left">Label</th>
</tr>
</thead>

<tbody>
<tr>
<td align="center">0--3</td>
<td align="left">Units of frames</td>
</tr>

<tr>
<td align="center">8--9</td>
<td align="left">Tens of frames</td>
</tr>

<tr>
<td align="center">16--19</td>
<td align="left">Units of seconds</td>
</tr>

<tr>
<td align="center">24--26</td>
<td align="left">Tens of seconds</td>
</tr>

<tr>
<td align="center">32--35</td>
<td align="left">Units of minutes</td>
</tr>

<tr>
<td align="center">40--42</td>
<td align="left">Tens of minutes</td>
</tr>

<tr>
<td align="center">48--51</td>
<td align="left">Units of hours</td>
</tr>

<tr>
<td align="center">56--57</td>
<td align="left">Tens of hours</td>
</tr>
</tbody>
</table><t>For example, a timecode value of "07:12:26;18" can be expressed as a 64-bit SMPTE 12M value as:</t>

<artwork><![CDATA[10000000 01100000 01100000 01010000
00100000 00110000 01110000 00000000
]]></artwork>
<t>Or with the irrelevant bits marked with an "x" which gives 26 usable bits:</t>

<artwork><![CDATA[1000xxxx 01xxxxxx 0110xxxx 010xxxxx
0010xxxx 001xxxxx 0111xxxx 00xxxxxx
]]></artwork>
<t>This is interpreted in hexadecimal:</t>

<ul spacing="compact">
<li>0x8 units of frames</li>
<li>0x1 tens of frames</li>
<li>0x6 units of seconds</li>
<li>0x2 tens of seconds</li>
<li>0x2 units of minutes</li>
<li>0x1 tens of minutes</li>
<li>0x7 units of hours</li>
<li>0x0 tens of hours</li>
</ul>
<t>Given no value is above 9, the BCD coding correspond to the actual values:</t>

<ul spacing="compact">
<li>8 units of frames</li>
<li>1 tens of frames</li>
<li>6 units of seconds</li>
<li>2 tens of seconds</li>
<li>2 units of minutes</li>
<li>1 tens of minutes</li>
<li>7 units of hours</li>
<li>0 tens of hours</li>
</ul>
<t>Or:</t>

<ul spacing="compact">
<li>18 frames</li>
<li>26 seconds</li>
<li>12 minutes</li>
<li>07 hours</li>
</ul>
</section>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>This document inherits security considerations from the EBML <xref target="RFC8794"/> and Matroska <xref target="RFC9559"/> documents.</t>
<t>Codec handling may be one of the more error-prone aspect of using Matroska.
The parsing and interpretation of binary data can lead to many types of security issues.
Although these issues don't come from Matroska itself, it's worth noting some issues that need to be considered.</t>
<t>The <tt>CodecPrivate</tt> may be missing from the <tt>TrackEntry</tt> description. The <tt>TrackEntry</tt> <bcp14>MAY</bcp14> be discarded in that case.</t>
<t>An existing <tt>CodecPrivate</tt> data may be corrupted or incomplete or too big. The <tt>TrackEntry</tt> <bcp14>MAY</bcp14> be discarded in that case.</t>
<t>A lot of codec have internal fields to hold values that are already found in the <tt>TrackEntry</tt>
like the video dimensions or the audio sampling frequency.
If these values differ that can lead to playback issues and even crashes.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>

<section anchor="matroska-codec-ids-registry"><name>Matroska Codec IDs Registry</name>
<t>This document defines registries for Codec IDs stored in the <tt>CodecID</tt> element.
A <tt>CodecID</tt> is a case-sensitive ASCII string with a prefix defined in <xref target="CodecPrefix"/>.
The details of the string format are found in <xref target="codec-id"/>.</t>
<t>To register a new Codec ID in this registry, one needs a Codec ID string, a TrackType value,
a description, a Change Controller, and an optional Reference to a document describing the Codec ID.</t>
<t>Some Codec IDs values are deprecated.
Such Codec IDs are marked as "Reclaimed" in the "Matroska Codec IDs" registry.</t>
<t>"Matroska Codec IDs" are to be allocated according to the "First Come First Served" policy <xref target="RFC8126"/>.</t>
<t><xref target="codec-id-registry-table"/> shows the initial contents of the "Matroska Codec IDs" registry.
The Change Controller for the initial entries is the IETF.</t>
<table anchor="codec-id-registry-table"><name>Initial Contents of "Matroska Codec IDs" Registry</name>
<thead>
<tr>
<th align="right">Codec ID</th>
<th align="center">Track Type</th>
<th align="left">Description</th>
<th align="left">Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td align="right">V_AV1</td>
<td align="center">1</td>
<td align="left">Alliance for Open Media AV1</td>
<td align="left">This document, <xref target="v-av1"/></td>
</tr>

<tr>
<td align="right">V_AVS2</td>
<td align="center">1</td>
<td align="left">AVS2-P2/IEEE.1857.4</td>
<td align="left">This document, <xref target="v-avs2"/></td>
</tr>

<tr>
<td align="right">V_AVS3</td>
<td align="center">1</td>
<td align="left">AVS3-P2/IEEE.1857.10</td>
<td align="left">This document, <xref target="v-avs3"/></td>
</tr>

<tr>
<td align="right">V_CAVS</td>
<td align="center">1</td>
<td align="left">AVS1-P2/IEEE.1857.3</td>
<td align="left">This document, <xref target="v-cavs"/></td>
</tr>

<tr>
<td align="right">V_DIRAC</td>
<td align="center">1</td>
<td align="left">Dirac / VC-2</td>
<td align="left">This document, <xref target="v-dirac"/></td>
</tr>

<tr>
<td align="right">V_FFV1</td>
<td align="center">1</td>
<td align="left">FFV1</td>
<td align="left">This document, <xref target="v-ffv1"/></td>
</tr>

<tr>
<td align="right">V_JPEG2000</td>
<td align="center">1</td>
<td align="left">JPEG 2000</td>
<td align="left">This document, <xref target="v-jpeg2000"/></td>
</tr>

<tr>
<td align="right">V_MJPEG</td>
<td align="center">1</td>
<td align="left">Motion JPEG</td>
<td align="left">This document, <xref target="v-mjpeg"/></td>
</tr>

<tr>
<td align="right">V_MPEGH/ISO/HEVC</td>
<td align="center">1</td>
<td align="left">HEVC/H.265</td>
<td align="left">This document, <xref target="v-mpegh-iso-hevc"/></td>
</tr>

<tr>
<td align="right">V_MPEGI/ISO/VVC</td>
<td align="center">1</td>
<td align="left">VVC/H.266</td>
<td align="left">This document, <xref target="v-mpegi-iso-vvc"/></td>
</tr>

<tr>
<td align="right">V_MPEG1</td>
<td align="center">1</td>
<td align="left">MPEG 1</td>
<td align="left">This document, <xref target="v-mpeg1"/></td>
</tr>

<tr>
<td align="right">V_MPEG2</td>
<td align="center">1</td>
<td align="left">MPEG 2</td>
<td align="left">This document, <xref target="v-mpeg2"/></td>
</tr>

<tr>
<td align="right">V_MPEG4/ISO/AVC</td>
<td align="center">1</td>
<td align="left">AVC/H.264</td>
<td align="left">This document, <xref target="v-mpeg4-iso-avc"/></td>
</tr>

<tr>
<td align="right">V_MPEG4/ISO/AP</td>
<td align="center">1</td>
<td align="left">MPEG4 ISO advanced profile</td>
<td align="left">This document, <xref target="v-mpeg4-iso-ap"/></td>
</tr>

<tr>
<td align="right">V_MPEG4/ISO/ASP</td>
<td align="center">1</td>
<td align="left">MPEG4 ISO advanced simple profile</td>
<td align="left">This document, <xref target="v-mpeg4-iso-asp"/></td>
</tr>

<tr>
<td align="right">V_MPEG4/ISO/SP</td>
<td align="center">1</td>
<td align="left">MPEG4 ISO simple profile</td>
<td align="left">This document, <xref target="v-mpeg4-iso-sp"/></td>
</tr>

<tr>
<td align="right">V_MPEG4/MS/V3</td>
<td align="center">1</td>
<td align="left">Microsoft MPEG4 V3</td>
<td align="left">This document, <xref target="v-mpeg4-ms-v3"/></td>
</tr>

<tr>
<td align="right">V_MS/VFW/FOURCC</td>
<td align="center">1</td>
<td align="left">Microsoft Video Codec Manager</td>
<td align="left">This document, <xref target="v-ms-vfw-fourcc"/></td>
</tr>

<tr>
<td align="right">V_QUICKTIME</td>
<td align="center">1</td>
<td align="left">Video taken from QuickTime files</td>
<td align="left">This document, <xref target="v-quicktime"/></td>
</tr>

<tr>
<td align="right">V_PRORES</td>
<td align="center">1</td>
<td align="left">Apple ProRes</td>
<td align="left">This document, <xref target="v-prores"/></td>
</tr>

<tr>
<td align="right">V_REAL/RV10</td>
<td align="center">1</td>
<td align="left">RealVideo 1.0 aka RealVideo 5</td>
<td align="left">This document, <xref target="v-real-rv10"/></td>
</tr>

<tr>
<td align="right">V_REAL/RV20</td>
<td align="center">1</td>
<td align="left">RealVideo G2 and RealVideo G2+SVT</td>
<td align="left">This document, <xref target="v-real-rv20"/></td>
</tr>

<tr>
<td align="right">V_REAL/RV30</td>
<td align="center">1</td>
<td align="left">RealVideo 8</td>
<td align="left">This document, <xref target="v-real-rv30"/></td>
</tr>

<tr>
<td align="right">V_REAL/RV40</td>
<td align="center">1</td>
<td align="left">rv40 : RealVideo 9</td>
<td align="left">This document, <xref target="v-real-rv40"/></td>
</tr>

<tr>
<td align="right">V_THEORA</td>
<td align="center">1</td>
<td align="left">Theora</td>
<td align="left">This document, <xref target="v-theora"/></td>
</tr>

<tr>
<td align="right">V_UNCOMPRESSED</td>
<td align="center">1</td>
<td align="left">Raw uncompressed video frames</td>
<td align="left">This document, <xref target="v-uncompressed"/></td>
</tr>

<tr>
<td align="right">V_VP8</td>
<td align="center">1</td>
<td align="left">VP8 Codec format</td>
<td align="left">This document, <xref target="v-vp8"/></td>
</tr>

<tr>
<td align="right">V_VP9</td>
<td align="center">1</td>
<td align="left">VP9 Codec format</td>
<td align="left">This document, <xref target="v-vp9"/></td>
</tr>

<tr>
<td align="right">A_AAC</td>
<td align="center">2</td>
<td align="left">Advanced Audio Coding</td>
<td align="left">This document, <xref target="a-aac"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG2/LC</td>
<td align="center">2</td>
<td align="left">Low Complexity</td>
<td align="left">This document, <xref target="a-aac-mpeg2-lc"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG2/LC/SBR</td>
<td align="center">2</td>
<td align="left">Low Complexity with Spectral Band Replication</td>
<td align="left">This document, <xref target="a-aac-mpeg2-lc-sbr"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG2/MAIN</td>
<td align="center">2</td>
<td align="left">MPEG2 Main Profile</td>
<td align="left">This document, <xref target="a-aac-mpeg2-main"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG2/SSR</td>
<td align="center">2</td>
<td align="left">Scalable Sampling Rate</td>
<td align="left">This document, <xref target="a-aac-mpeg2-ssr"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG4/LC</td>
<td align="center">2</td>
<td align="left">Low Complexity</td>
<td align="left">This document, <xref target="a-aac-mpeg4-lc"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG4/LC/SBR</td>
<td align="center">2</td>
<td align="left">Low Complexity with Spectral Band Replication</td>
<td align="left">This document, <xref target="a-aac-mpeg4-lc-sbr"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG4/LTP</td>
<td align="center">2</td>
<td align="left">Long Term Prediction</td>
<td align="left">This document, <xref target="a-aac-mpeg4-ltp"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG4/MAIN</td>
<td align="center">2</td>
<td align="left">MPEG4 Main Profile</td>
<td align="left">This document, <xref target="a-aac-mpeg4-main"/></td>
</tr>

<tr>
<td align="right">A_AAC/MPEG4/SSR</td>
<td align="center">2</td>
<td align="left">Scalable Sampling Rate</td>
<td align="left">This document, <xref target="a-aac-mpeg4-ssr"/></td>
</tr>

<tr>
<td align="right">A_AC3</td>
<td align="center">2</td>
<td align="left">Dolby Digital / AC-3</td>
<td align="left">This document, <xref target="a-ac3"/></td>
</tr>

<tr>
<td align="right">A_AC3/BSID9</td>
<td align="center">2</td>
<td align="left">Dolby Digital / AC-3</td>
<td align="left">This document, <xref target="a-ac3-bsid9"/></td>
</tr>

<tr>
<td align="right">A_AC3/BSID10</td>
<td align="center">2</td>
<td align="left">Dolby Digital / AC-3</td>
<td align="left">This document, <xref target="a-ac3-bsid10"/></td>
</tr>

<tr>
<td align="right">A_ALAC</td>
<td align="center">2</td>
<td align="left">ALAC (Apple Lossless Audio Codec)</td>
<td align="left">This document, <xref target="a-alac"/></td>
</tr>

<tr>
<td align="right">A_ATRAC/AT1</td>
<td align="center">2</td>
<td align="left">Sony ATRAC1 Codec</td>
<td align="left">This document, <xref target="a-atrac-at1"/></td>
</tr>

<tr>
<td align="right">A_DTS</td>
<td align="center">2</td>
<td align="left">Digital Theatre System</td>
<td align="left">This document, <xref target="a-dts"/></td>
</tr>

<tr>
<td align="right">A_DTS/EXPRESS</td>
<td align="center">2</td>
<td align="left">Digital Theatre System Express</td>
<td align="left">This document, <xref target="a-dts-express"/></td>
</tr>

<tr>
<td align="right">A_DTS/LOSSLESS</td>
<td align="center">2</td>
<td align="left">Digital Theatre System Lossless</td>
<td align="left">This document, <xref target="a-dts-lossless"/></td>
</tr>

<tr>
<td align="right">A_EAC3</td>
<td align="center">2</td>
<td align="left">Dolby Digital Plus / E-AC-3</td>
<td align="left">This document, <xref target="a-eac3"/></td>
</tr>

<tr>
<td align="right">A_FLAC</td>
<td align="center">2</td>
<td align="left">FLAC</td>
<td align="left">This document, <xref target="a-flac"/></td>
</tr>

<tr>
<td align="right">A_MLP</td>
<td align="center">2</td>
<td align="left">Meridian Lossless Packing / MLP</td>
<td align="left">This document, <xref target="a-mlp"/></td>
</tr>

<tr>
<td align="right">A_MPEG/L1</td>
<td align="center">2</td>
<td align="left">MPEG Audio 1, 2 Layer I</td>
<td align="left">This document, <xref target="a-mpeg-l1"/></td>
</tr>

<tr>
<td align="right">A_MPEG/L2</td>
<td align="center">2</td>
<td align="left">MPEG Audio 1, 2 Layer II</td>
<td align="left">This document, <xref target="a-mpeg-l2"/></td>
</tr>

<tr>
<td align="right">A_MPEG/L3</td>
<td align="center">2</td>
<td align="left">MPEG Audio 1, 2, 2.5 Layer III</td>
<td align="left">This document, <xref target="a-mpeg-l3"/></td>
</tr>

<tr>
<td align="right">A_MS/ACM</td>
<td align="center">2</td>
<td align="left">Microsoft Audio Codec Manager (ACM)</td>
<td align="left">This document, <xref target="a-ms-acm"/></td>
</tr>

<tr>
<td align="right">A_REAL/14_4</td>
<td align="center">2</td>
<td align="left">Real Audio 1</td>
<td align="left">This document, <xref target="a-real-14-4"/></td>
</tr>

<tr>
<td align="right">A_REAL/28_8</td>
<td align="center">2</td>
<td align="left">Real Audio 2</td>
<td align="left">This document, <xref target="a-real-28-8"/></td>
</tr>

<tr>
<td align="right">A_REAL/ATRC</td>
<td align="center">2</td>
<td align="left">Sony Atrac3 Codec</td>
<td align="left">This document, <xref target="a-real-atrc"/></td>
</tr>

<tr>
<td align="right">A_REAL/COOK</td>
<td align="center">2</td>
<td align="left">Real Audio Cook Codec</td>
<td align="left">This document, <xref target="a-real-cook"/></td>
</tr>

<tr>
<td align="right">A_REAL/RALF</td>
<td align="center">2</td>
<td align="left">Real Audio Lossless Format</td>
<td align="left">This document, <xref target="a-real-ralf"/></td>
</tr>

<tr>
<td align="right">A_REAL/SIPR</td>
<td align="center">2</td>
<td align="left">Sipro Voice Codec</td>
<td align="left">This document, <xref target="a-real-sipr"/></td>
</tr>

<tr>
<td align="right">A_OPUS</td>
<td align="center">2</td>
<td align="left">Opus interactive speech and audio codec</td>
<td align="left">This document, <xref target="a-opus"/></td>
</tr>

<tr>
<td align="right">A_PCM/FLOAT/IEEE</td>
<td align="center">2</td>
<td align="left">Floating-Point, IEEE compatible</td>
<td align="left">This document, <xref target="a-pcm-float-ieee"/></td>
</tr>

<tr>
<td align="right">A_PCM/INT/BIG</td>
<td align="center">2</td>
<td align="left">PCM Integer Big Endian</td>
<td align="left">This document, <xref target="a-pcm-int-big"/></td>
</tr>

<tr>
<td align="right">A_PCM/INT/LIT</td>
<td align="center">2</td>
<td align="left">PCM Integer Little Endian</td>
<td align="left">This document, <xref target="a-pcm-int-lit"/></td>
</tr>

<tr>
<td align="right">A_QUICKTIME</td>
<td align="center">2</td>
<td align="left">Audio taken from QuickTime files</td>
<td align="left">This document, <xref target="a-quicktime"/></td>
</tr>

<tr>
<td align="right">A_QUICKTIME/QDMC</td>
<td align="center">2</td>
<td align="left">QDesign Music</td>
<td align="left">This document, <xref target="a-quicktime-qdmc"/></td>
</tr>

<tr>
<td align="right">A_QUICKTIME/QDM2</td>
<td align="center">2</td>
<td align="left">QDesign Music v2</td>
<td align="left">This document, <xref target="a-quicktime-qdm2"/></td>
</tr>

<tr>
<td align="right">A_TRUEHD</td>
<td align="center">2</td>
<td align="left">Dolby TrueHD</td>
<td align="left">This document, <xref target="a-truehd"/></td>
</tr>

<tr>
<td align="right">A_TTA1</td>
<td align="center">2</td>
<td align="left">The True Audio</td>
<td align="left">This document, <xref target="a-tta1"/></td>
</tr>

<tr>
<td align="right">A_VORBIS</td>
<td align="center">2</td>
<td align="left">Vorbis</td>
<td align="left">This document, <xref target="a-vorbis"/></td>
</tr>

<tr>
<td align="right">A_WAVPACK4</td>
<td align="center">2</td>
<td align="left">WavPack</td>
<td align="left">This document, <xref target="a-wavpack4"/></td>
</tr>

<tr>
<td align="right">S_ARIBSUB</td>
<td align="center">17</td>
<td align="left">ARIB STD-B24 subtitles</td>
<td align="left">This document, <xref target="s-aribsub"/></td>
</tr>

<tr>
<td align="right">S_DVBSUB</td>
<td align="center">17</td>
<td align="left">Digital Video Broadcasting subtitles</td>
<td align="left">This document, <xref target="s-dvbsub"/></td>
</tr>

<tr>
<td align="right">S_HDMV/PGS</td>
<td align="center">17</td>
<td align="left">HDMV presentation graphics subtitles</td>
<td align="left">This document, <xref target="s-hdmv-pgs"/></td>
</tr>

<tr>
<td align="right">S_HDMV/TEXTST</td>
<td align="center">17</td>
<td align="left">HDMV text subtitles</td>
<td align="left">This document, <xref target="s-hdmv-textst"/></td>
</tr>

<tr>
<td align="right">S_KATE</td>
<td align="center">17</td>
<td align="left">Karaoke And Text Encapsulation</td>
<td align="left">This document, <xref target="s-kate"/></td>
</tr>

<tr>
<td align="right">S_IMAGE/BMP</td>
<td align="center">17</td>
<td align="left">Bitmap</td>
<td align="left">This document, <xref target="s-image-bmp"/></td>
</tr>

<tr>
<td align="right">S_ASS</td>
<td align="center">17</td>
<td align="left">Advanced SubStation Alpha Format</td>
<td align="left">Reclaimed, <xref target="s-text-ass"/></td>
</tr>

<tr>
<td align="right">S_TEXT/ASS</td>
<td align="center">17</td>
<td align="left">Advanced SubStation Alpha Format</td>
<td align="left">This document, <xref target="s-text-ass"/></td>
</tr>

<tr>
<td align="right">S_TEXT/ASCII</td>
<td align="center">17</td>
<td align="left">ASCII Plain Text</td>
<td align="left">This document, <xref target="s-text-ascii"/></td>
</tr>

<tr>
<td align="right">S_TEXT/SSA</td>
<td align="center">17</td>
<td align="left">SubStation Alpha Format</td>
<td align="left">This document, <xref target="s-text-ssa"/></td>
</tr>

<tr>
<td align="right">S_TEXT/USF</td>
<td align="center">17</td>
<td align="left">Universal Subtitle Format</td>
<td align="left">This document, <xref target="s-text-usf"/></td>
</tr>

<tr>
<td align="right">S_TEXT/UTF8</td>
<td align="center">17</td>
<td align="left">UTF-8 Plain Text</td>
<td align="left">This document, <xref target="s-text-utf8"/></td>
</tr>

<tr>
<td align="right">S_TEXT/WEBVTT</td>
<td align="center">17</td>
<td align="left">Web Video Text Tracks (WebVTT)</td>
<td align="left">This document, <xref target="s-text-webvtt"/></td>
</tr>

<tr>
<td align="right">S_SSA</td>
<td align="center">17</td>
<td align="left">SubStation Alpha Format</td>
<td align="left">Reclaimed, <xref target="s-text-ass"/></td>
</tr>

<tr>
<td align="right">S_VOBSUB</td>
<td align="center">17</td>
<td align="left">VobSub subtitles</td>
<td align="left">This document, <xref target="s-vobsub"/></td>
</tr>

<tr>
<td align="right">B_VOBBTN</td>
<td align="center">18</td>
<td align="left">VobBtn Buttons</td>
<td align="left">This document, <xref target="b-vobbtn"/></td>
</tr>
</tbody>
</table>
</section>

<section anchor="matroska-blockadditional-type-ids-registry"><name>Matroska BlockAdditional Type IDs Registry</name>
<t>This document defines registries for BlockAdditional Type IDs stored in the <tt>BlockAddIDType</tt> element.
The values correspond to the unsigned integer <tt>BlockAddIDType</tt> value described in <xref target="RFC9559" sectionFormat="of" section="5.1.4.1.17.3"/>.</t>
<t>To register a new BlockAdditional Type ID in this registry, one needs a <tt>BlockAddIDType</tt> unsigned integer,
a <tt>BlockAddIDName</tt> string value, a Change Controller, and an optional Reference to a document describing the BlockAdditional Type ID.</t>
<t>"Matroska BlockAdditional Type IDs" are to be allocated according to the "First Come First Served" policy <xref target="RFC8126"/>.</t>
<t><xref target="blockadd-id-registry-table"/> shows the initial contents of the "Matroska BlockAdditional Type IDs" registry.
The Change Controller for the initial entries is the IETF.</t>
<table anchor="blockadd-id-registry-table"><name>Initial Contents of "Matroska BlockAdditional Type IDs" Registry</name>
<thead>
<tr>
<th align="right">BlockAddIDType</th>
<th align="left">BlockAddIDName</th>
<th align="left">Reference</th>
</tr>
</thead>

<tbody>
<tr>
<td align="right">0</td>
<td align="left">Use BlockAddIDValue</td>
<td align="left">This document, <xref target="use-blockaddidvalue"/></td>
</tr>

<tr>
<td align="right">1</td>
<td align="left">Opaque data</td>
<td align="left">This document, <xref target="opaque-data"/></td>
</tr>

<tr>
<td align="right">4</td>
<td align="left">ITU T.35 metadata</td>
<td align="left">This document, <xref target="itu-t-35-metadata"/></td>
</tr>

<tr>
<td align="right">121</td>
<td align="left">SMPTE ST 12-1 timecode</td>
<td align="left">This document, <xref target="smpte-st-12-1-timecode"/></td>
</tr>

<tr>
<td align="right">0x61766345</td>
<td align="left">Dolby Vision enhancement-layer AVC configuration</td>
<td align="left">This document, <xref target="avce"/></td>
</tr>

<tr>
<td align="right">0x68766345</td>
<td align="left">Dolby Vision enhancement-layer HEVC configuration</td>
<td align="left">This document, <xref target="hvce"/></td>
</tr>

<tr>
<td align="right">0x64766343</td>
<td align="left">Dolby Vision configuration dvcC</td>
<td align="left">This document, <xref target="dvcc"/></td>
</tr>

<tr>
<td align="right">0x64767643</td>
<td align="left">Dolby Vision configuration dvvC</td>
<td align="left">This document, <xref target="dvvc"/></td>
</tr>

<tr>
<td align="right">0x64767743</td>
<td align="left">Dolby Vision configuration dvwC</td>
<td align="left">This document, <xref target="dvwc"/></td>
</tr>

<tr>
<td align="right">0x6D766343</td>
<td align="left">MVC configuration</td>
<td align="left">This document, <xref target="mvcc"/></td>
</tr>
</tbody>
</table>
</section>
</section>

</middle>

<back>
<references><name>References</name>
<references><name>Normative References</name>

<reference anchor="ALAC" target="https://github.com/macosforge/alac/blob/master/ALACMagicCookieDescription.txt">
  <front>
    <title>Apple Lossless Format &#34;Magic Cookie&#34; Description</title>
    <author>
      <organization>Apple Inc.</organization>
    </author>
    <date year="2012" month="December" day="12"></date>
  </front>
</reference>

<reference anchor="ARIB.STD-B10" target="https://www.arib.or.jp/english/std_tr/broadcasting/desc/std-b10.html">
  <front>
    <title>Service Information for Digital Broadcasting System</title>
    <author>
      <organization>ARIB</organization>
    </author>
    <date year="2019" month="December" day="5"></date>
  </front>
</reference>

<reference anchor="ARIB.STD-B24" target="https://www.arib.or.jp/english/std_tr/broadcasting/desc/std-b24.html">
  <front>
    <title>Data Coding and Transmission Specification for Digital Broadcasting</title>
    <author>
      <organization>ARIB</organization>
    </author>
    <date year="2022" month="October" day="6"></date>
  </front>
</reference>

<reference anchor="ARIB.TR-B14" target="https://www.arib.or.jp/english/std_tr/broadcasting/desc/tr-b14.html">
  <front>
    <title>Operational Guidelines for Digital Terrestrial Television Broadcasting</title>
    <author>
      <organization>ARIB</organization>
    </author>
    <date year="2022" month="October" day="6"></date>
  </front>
</reference>

<reference anchor="ATSC.A52" target="https://www.atsc.org/wp-content/uploads/2021/04/A52-2018.pdf">
  <front>
    <title>ATSC Standard: Digital Audio Compression (AC-3, E-AC-3)</title>
    <author>
      <organization>Advanced Television Systems Committee</organization>
    </author>
    <date year="2018" month="January" day="25"></date>
  </front>
</reference>

<reference anchor="AV1" target="https://aomediacodec.github.io/av1-spec/av1-spec.pdf">
  <front>
    <title>AV1 Bitstream &amp; Decoding Process Specification</title>
    <author>
      <organization>Alliance for Open Media</organization>
    </author>
    <date year="2019" month="January" day="8"></date>
  </front>
</reference>

<reference anchor="AV1-ISOBMFF" target="https://aomediacodec.github.io/av1-isobmff/">
  <front>
    <title>AV1 Codec ISO Media File Format Binding</title>
    <author>
      <organization>Alliance for Open Media</organization>
    </author>
    <date year="2024" month="April" day="3"></date>
  </front>
</reference>

<reference anchor="BITMAPINFOHEADER" target="https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapinfoheader">
  <front>
    <title>BITMAPINFOHEADER structure</title>
    <author>
      <organization>Microsoft Corporation</organization>
    </author>
    <date year="2024" month="January" day="26"></date>
  </front>
</reference>

<reference anchor="Blu-ray.Part3" target="https://blu-raydisc.info/format-spec/re2-spec.php">
  <front>
    <title>System Description Blu-ray Disc Read-Only Format - Part 3: Audio Visual Basic Specifications Ver 2.01</title>
    <author>
      <organization>Blu-ray Disc Association</organization>
    </author>
    <date year="2007" month="January"></date>
  </front>
</reference>

<reference anchor="DVD-Info.PCI" target="https://dvd.sourceforge.net/dvdinfo/pci_pkt.html">
  <front>
    <title>Presentation Control Information (PCI) Packet Layout</title>
    <author></author>
  </front>
</reference>

<reference anchor="Dirac" target="https://web.archive.org/web/20150503015104/http://diracvideo.org/download/specification/dirac-spec-latest.pdf">
  <front>
    <title>Dirac Specification</title>
    <author>
      <organization>British Broadcasting Corporation</organization>
    </author>
    <date year="2008" month="September" day="23"></date>
  </front>
</reference>

<reference anchor="DolbyVision-ISOBMFF" target="https://dolby.my.salesforce.com/sfc/p/700000009YuG/a/4u000000l6FB/076wHYEmyEfz09m0V1bo85_25hlUJjaiWTbzorNmYY4">
  <front>
    <title>Dolby Vision Streams Within the ISO Base MediaFile Format</title>
    <author>
      <organization>Dolby</organization>
    </author>
    <date year="2023" month="November" day="7"></date>
  </front>
</reference>

<reference anchor="ETSI.EN300-468" target="https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.18.01_60/en_300468v011801p.pdf">
  <front>
    <title>Digital Video Broadcasting (DVB); Specification for Service Information (SI) in DVB systems</title>
    <author>
      <organization>European Telecommunications Standards Institute</organization>
    </author>
    <date year="2023" month="December"></date>
  </front>
  <seriesInfo name="ETSI" value="EN 300 468"></seriesInfo>
</reference>

<reference anchor="ETSI.EN300-743" target="https://www.etsi.org/deliver/etsi_en/300700_300799/300743/01.06.01_60/en_300743v010601p.pdf">
  <front>
    <title>Digital Video Broadcasting (DVB); Subtitling systems</title>
    <author>
      <organization>European Telecommunications Standards Institute</organization>
    </author>
    <date year="2018" month="October"></date>
  </front>
  <seriesInfo name="ETSI" value="EN 300 743"></seriesInfo>
</reference>

<reference anchor="ETSI.TS102-114" target="https://www.etsi.org/deliver/etsi_ts/102100_102199/102114/01.06.01_60/ts_102114v010601p.pdf">
  <front>
    <title>DTS Coherent Acoustics; Core and Extensions with Additional Profiles</title>
    <author>
      <organization>European Telecommunications Standards Institute</organization>
    </author>
    <date year="2019" month="August"></date>
  </front>
  <seriesInfo name="ETSI" value="TS 102 114"></seriesInfo>
</reference>

<reference anchor="ETSI.TS102-366" target="https://www.etsi.org/deliver/etsi_ts/102300_102399/102366/01.04.01_60/ts_102366v010401p.pdf">
  <front>
    <title>Digital Audio Compression (AC-3, Enhanced AC-3) Standard</title>
    <author>
      <organization>European Telecommunications Standards Institute</organization>
    </author>
    <date year="2017" month="September"></date>
  </front>
  <seriesInfo name="ETSI" value="TS 102 366"></seriesInfo>
</reference>

<reference anchor="IEEE.1857-10" target="https://standards.ieee.org/ieee/1857.10/7722/">
  <front>
    <title>IEEE Standard for Third Generation Video Coding</title>
    <author>
      <organization>IEEE</organization>
    </author>
    <date year="2021" month="November" day="9"></date>
  </front>
</reference>

<reference anchor="IEEE.1857-3" target="https://standards.ieee.org/ieee/1857.3/10645/">
  <front>
    <title>IEEE Standard for a System of Advanced Audio and Video Coding</title>
    <author>
      <organization>IEEE</organization>
    </author>
    <date year="2023" month="November" day="8"></date>
  </front>
</reference>

<reference anchor="IEEE.1857-4" target="https://standards.ieee.org/ieee/1857.4/5817/">
  <front>
    <title>IEEE Standard for Second-Generation IEEE 1857 Video Coding</title>
    <author>
      <organization>IEEE</organization>
    </author>
    <date year="2018" month="October" day="23"></date>
  </front>
</reference>

<reference anchor="IEEE.754" target="https://standards.ieee.org/standard/754-2019.html">
  <front>
    <title>IEEE Standard for Binary Floating-Point Arithmetic</title>
    <author>
      <organization>IEEE</organization>
    </author>
    <date year="2019" month="June" day="13"></date>
  </front>
</reference>

<reference anchor="ISO.11172-2" target="">
  <front>
    <title>Information technology - Coding of moving pictures and associated audio for digital storage median at up to about 1,5 Mbit/s - Part 2: Video</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="1993" month="August"></date>
  </front>
  <seriesInfo name="ISO" value="11172-2:1993"></seriesInfo>
</reference>

<reference anchor="ISO.11172-3" target="">
  <front>
    <title>Information technology - Coding of moving pictures and associated audio for digital storage median at up to about 1,5 Mbit/s - Part 3: Audio</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="1993" month="August"></date>
  </front>
  <seriesInfo name="ISO" value="11172-2:1993"></seriesInfo>
</reference>

<reference anchor="ISO.13818-2" target="">
  <front>
    <title>Information technology - Generic coding of moving pictures and associated audio information - Part 2: Video</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="2013" month="October"></date>
  </front>
  <seriesInfo name="ISO" value="13818-2:2013"></seriesInfo>
</reference>

<reference anchor="ISO.14496-15" target="">
  <front>
    <title>Information technology - Coding of audio-visual objects - Part 15: Carriage of network abstraction layer (NAL) unit structured video in ISO base media file format</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="2024" month="October"></date>
  </front>
  <seriesInfo name="ISO" value="14496-15:2024"></seriesInfo>
</reference>

<reference anchor="ISO.14496-2" target="">
  <front>
    <title>Information technology - Coding of audio-visual objects - Part 2: Visual</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="2004" month="June"></date>
  </front>
  <seriesInfo name="ISO" value="14496-2:2004"></seriesInfo>
</reference>

<reference anchor="ISO.14496-3" target="">
  <front>
    <title>Information technology - Coding of audio-visual objects - Part 3: Audio</title>
    <author>
      <organization>International Organization for Standardization</organization>
    </author>
    <date year="2019" month="December"></date>
  </front>
  <seriesInfo name="ISO" value="14496-3:2019"></seriesInfo>
</reference>

<reference anchor="JPEG" target="https://www.w3.org/Graphics/JPEG/itu-t81.pdf">
  <front>
    <title>INFORMATION TECHNOLOGY - DIGITAL COMPRESSION AND CODING OF CONTINUOUS-TONE STILL IMAGES - REQUIREMENTS AND GUIDELINES</title>
    <author>
      <organization>ITU-T</organization>
    </author>
    <date year="1992" month="September"></date>
  </front>
  <seriesInfo name="ITU-T Recommendation" value="T.81"></seriesInfo>
</reference>

<reference anchor="JPEG2000" target="https://www.itu.int/rec/T-REC-T.800-202407-I/en">
  <front>
    <title>Information technology - JPEG 2000 image coding system: Core coding system</title>
    <author>
      <organization>ITU-T</organization>
    </author>
    <date year="2024" month="July"></date>
  </front>
  <seriesInfo name="ITU-T Recommendation" value="T.800"></seriesInfo>
</reference>

<reference anchor="OggKate" target="http://wiki.xiph.org/index.php/OggKate">
  <front>
    <title>OggKate</title>
    <author>
      <organization>Xiph.Org Foundation</organization>
    </author>
    <date year="2023" month="February" day="21"></date>
  </front>
</reference>

<reference anchor="QTFF" target="https://developer.apple.com/documentation/quicktime-file-format">
  <front>
    <title>QuickTime File Format</title>
    <author>
      <organization>Apple Inc.</organization>
    </author>
    <date year="2024" month="January" day="26"></date>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6648.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6716.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7845.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8794.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9043.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9559.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9639.xml"/>

<reference anchor="SMPTE.RDD36" target="https://pub.smpte.org/doc/rdd36/20220909-pub/">
  <front>
    <title>Apple ProRes Bitstream Syntax and Decoding Process</title>
    <author>
      <organization>SMPTE</organization>
    </author>
    <date year="2022" month="September" day="9"></date>
  </front>
</reference>

<reference anchor="SMPTE.ST12-1" target="https://pub.smpte.org/doc/st12-1/20140220-pub/">
  <front>
    <title>Time and Control Code</title>
    <author>
      <organization>SMPTE</organization>
    </author>
    <date year="2014" month="February" day="20"></date>
  </front>
  <seriesInfo name="ST" value="12-1:2014, DOI 10.5594/SMPTE.ST12-1.2014"></seriesInfo>
</reference>

<reference anchor="SSA" target="http://www.tcax.org/docs/ass-specs.htm">
  <front>
    <title>Sub Station Alpha v4.00+ Script Format</title>
    <author></author>
  </front>
</reference>

<reference anchor="TRUEHD" target="https://web.archive.org/web/20250810135349/https://developer.dolby.com/globalassets/technology/dolby-truehd/dolbytruehdhighlevelbitstreamdescription.pdf">
  <front>
    <title>Dolby TrueHD (MLP) high-level bitstream description</title>
    <author>
      <organization>Dolby</organization>
    </author>
    <date year="2018" month="February"></date>
  </front>
</reference>

<reference anchor="TTA" target="https://tausoft.org/en/tta-%d0%be%d0%bf%d0%b8%d1%81%d0%b0%d0%bd%d0%b8%d0%b5-%d1%84%d0%be%d1%80%d0%bc%d0%b0%d1%82%d0%b0/">
  <front>
    <title>TTA</title>
    <author>
      <organization>Tau Software</organization>
    </author>
  </front>
</reference>

<reference anchor="Theora" target="https://www.theora.org/doc/Theora.pdf">
  <front>
    <title>Theora Specification</title>
    <author>
      <organization>Xiph.Org Foundation</organization>
    </author>
    <date year="2017" month="June" day="3"></date>
  </front>
</reference>

<reference anchor="USF" target="https://subtitld.org/en/development/usf">
  <front>
    <title>Universal Subtitle Format</title>
    <author fullname="Christophe PARIS"></author>
    <author fullname="Ludovic Vialle">
      <organization>CoreCodec</organization>
    </author>
    <author fullname="Uffe Hammer"></author>
    <date year="2010" month="November" day="28"></date>
  </front>
</reference>

<reference anchor="VORBIS" target="https://xiph.org/vorbis/doc/Vorbis_I_spec.pdf">
  <front>
    <title>Vorbis I specification</title>
    <author>
      <organization>Xiph.Org Foundation</organization>
    </author>
    <date year="2020" month="July" day="4"></date>
  </front>
</reference>

<reference anchor="VP9" target="https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp9-bitstream-specification-v0.7-20170222-draft.pdf">
  <front>
    <title>VP9 Bitstream &amp; Decoding Process Specification - version 0.7</title>
    <author fullname="Adrian Grange" initials="A." surname="Grange">
      <organization>Google</organization>
    </author>
    <author fullname="Peter de Rivaz" initials="P." surname="de Rivaz">
      <organization>Argon Design</organization>
    </author>
    <author fullname="Jonathan Hunt" initials="J." surname="Hunt">
      <organization>Argon Design</organization>
    </author>
    <date year="2017" month="February" day="22"></date>
  </front>
</reference>

<reference anchor="VobSub" target="https://wiki.multimedia.cx/index.php?title=VOBsub">
  <front>
    <title>VOBSub</title>
    <author>
      <organization>MultimediaWiki</organization>
    </author>
    <date year="2007" month="March" day="21"></date>
  </front>
</reference>

<reference anchor="WAVEFORMATEX" target="https://docs.microsoft.com/en-us/windows/win32/api/mmeapi/ns-mmeapi-waveformatex">
  <front>
    <title>WAVEFORMATEX structure</title>
    <author>
      <organization>Microsoft Corporation</organization>
    </author>
    <date year="2021" month="April" day="04"></date>
  </front>
</reference>

<reference anchor="WAVPACK" target="https://www.wavpack.com/WavPack5FileFormat.pdf">
  <front>
    <title>WavPack 4 &amp; 5 Binary File / Block Format</title>
    <author fullname="David Bryant" initials="D." surname="Bryant"></author>
    <date year="2020" month="April" day="12"></date>
  </front>
</reference>

<reference anchor="WebVTT" target="https://www.w3.org/TR/2019/CR-webvtt1-20190404/">
  <front>
    <title>WebVTT: The Web Video Text Tracks Format</title>
    <author fullname="Simon Pieters">
      <organization>Opera Software AS</organization>
    </author>
    <author fullname="Silvia Pfeiffer" role="editor">
      <organization>NICTA</organization>
    </author>
    <author fullname="Philip Jaegenstedt">
      <organization>Opera Software ASA</organization>
    </author>
    <author fullname="Ian Hickson">
      <organization>Google</organization>
    </author>
    <date year="2019" month="April"></date>
  </front>
  <refcontent>W3C Candidate Recommendation</refcontent>
</reference>

<reference anchor="librmff" target="https://gitlab.com/mbunkus/mkvtoolnix/-/blob/main/lib/librmff/librmff.h">
  <front>
    <title>RealMedia file format access library</title>
    <author fullname="Moritz Bunkus" initials="M." surname="Bunkus"></author>
    <date year="2021" month="February" day="20"></date>
  </front>
</reference>
</references>
<references><name>Informative References</name>

<reference anchor="AtracAES" target="https://www.minidisc.wiki/technology/atrac/aes">
  <front>
    <title>ATRAC: Adaptive Transform Acoustic Coding for MiniDisc</title>
    <author>
      <organization>Sony Corporate Research Laboratories</organization>
    </author>
    <date year="1992" month="October" day="1"></date>
  </front>
</reference>

<reference anchor="CTA.861-4" target="https://shop.cta.tech/products/updates-to-dynamic-hdr-metadata-signaling">
  <front>
    <title>Updates to Dynamic HDR Metadata Signaling</title>
    <author>
      <organization>Consumer Technology Association</organization>
    </author>
    <date year="2019" month="March"></date>
  </front>
  <seriesInfo name="CTA" value="861-4"></seriesInfo>
</reference>

<reference anchor="DVD-Video" target="http://www.dvdforum.org/">
  <front>
    <title>DVD-Books: Part 3 DVD-Video Book</title>
    <author>
      <organization>DVD Forum</organization>
    </author>
    <date year="1995" month="November"></date>
  </front>
</reference>

<reference anchor="ITU-T.35" target="https://www.itu.int/rec/T-REC-T.35/en">
  <front>
    <title>Procedure for the allocation of ITU-T defined codes for non-standard facilities</title>
    <author>
      <organization>ITU-T</organization>
    </author>
    <date year="2000" month="February"></date>
  </front>
  <seriesInfo name="ITU-T Recommendation" value="T.35"></seriesInfo>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5484.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6386.xml"/>

<reference anchor="SMPTE.ST2042-1" target="https://pub.smpte.org/pub/st2042-1/st2042-1-2022.pdf">
  <front>
    <title>VC-2 Video Compression</title>
    <author>
      <organization>SMPTE</organization>
    </author>
    <date year="2022" month="December" day="8"></date>
  </front>
  <seriesInfo name="ST" value="2042-1:2022, DOI 10.5594/SMPTE.ST2042-1.2022"></seriesInfo>
</reference>

<reference anchor="VP-ISOBMFF" target="https://www.webmproject.org/vp9/mp4/">
  <front>
    <title>VP Codec ISO Media File Format Binding</title>
    <author fullname="Frank Galligan">
      <organization>Google</organization>
    </author>
    <author fullname="Kilroy Hughes">
      <organization>Microsoft</organization>
    </author>
    <author fullname="Thomás Inskip">
      <organization>Google</organization>
    </author>
    <author fullname="David Ronca">
      <organization>Netflix</organization>
    </author>
    <date year="2017" month="March" day="31"></date>
  </front>
</reference>

<reference anchor="WebM-WebVTT" target="https://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm">
  <front>
    <title>WebVTT in WebM</title>
    <author fullname="Matthew Heaney">
      <organization>Google</organization>
    </author>
    <author fullname="Frank Galligan">
      <organization>Google</organization>
    </author>
    <date year="2012" month="February" day="01"></date>
  </front>
</reference>

<reference anchor="WebMContainer" target="https://www.webmproject.org/docs/container/">
  <front>
    <title>WebM Container Guidelines</title>
    <author>
      <organization>The WebM Project</organization>
    </author>
    <date year="2023" month="October" day="16"></date>
  </front>
</reference>

<reference anchor="atracdenc" target="https://github.com/dcherednik/atracdenc">
  <front>
    <title>atracdenc - ATRAC1 and ATRAC3 Decoder/Encoder</title>
    <author fullname="Daniil Cherednik" initials="D." surname="Cherednik"></author>
    <date year="2022" month="October" day="12"></date>
  </front>
</reference>
</references>
</references>

</back>

</rfc>
