CodecID
As an additional resource to this page Haali has created a list of codec IDs in a PDF.
For each TrackEntry inside matroska, there has to be a CodecID defined. This ID is represent the codec used to encode data in the Track. The codec works with the coded data in the stream, but also with some codec initialisation. There are 2 different kind of codec "initialisation" :
- CodecPrivate in the TrackEntry
- CodecState in the BlockGroup
Each of these elements contain the same kind of data. And these data depend on the codec used.
Important Note:
Please, when reading through this list, always keep in mind that the intention behind it is NOT to list all existing audio and video codecs, but more to list those codecs that are currently supported in matroska (or will be supported soon), and therfore need a well defined codec ID so that all developers supporting matroska will use the same ID. A list of all the codecs we plan to support in the future can be found on the CoreCodec forum (subject to be changed constantly). If you feel we missed support for a very important codec, please tell us on our development mailing list (matroska-devel at freelists.org).
Codec ID | Name | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Video | |||||||||||||||||||||||||||||
V_MS/VFW/FOURCC | Microsoft (TM) Video Codec Manager (VCM) | V_MS/VFW/FOURCC - Microsoft (TM) Video Codec Manager (VCM) The private data contains the VCM structure BITMAPINFOHEADER including the extra private bytes, as defined by Microsoft. The data are stored in little endian format (like on IA32 machines). Where is the Huffman table stored in HuffYUV, not AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ??? |
|||||||||||||||||||||||||||
V_UNCOMPRESSED | Video, raw uncompressed video frames | The private data is void, all details about the used colour specs and bit depth are to be put/read from the KaxCodecColourSpace elements. | |||||||||||||||||||||||||||
V_MPEG4/ISO/??? | MPEG4 ISO Profile Video | The stream complies with, and uses the CodecID for, one of the MPEG-4 profiles listed below. | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
V_MPEG4/MS/V3 | Microsoft (TM) MPEG4 V3 | and derivates, means DivX3, Angelpotion, SMR, etc.; stream was created using VfW codec or transmuxed from AVI; note that V1/V2 are covered in VfW compatibility mode | |||||||||||||||||||||||||||
V_MPEG1 | MPEG 1 | The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its recommended to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations | |||||||||||||||||||||||||||
V_MPEG2 | MPEG 2 | The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its recommended to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations | |||||||||||||||||||||||||||
V_REAL/???? | Real Video(TM) | The stream is one of the Real Video(TM) video streams listed below. Source for the codec names are from Karl Lillevold on Doom9. The CodecPrivate element contains a "real_video_props_t" structure in Big Endian byte order as found in librmff. | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
V_QUICKTIME | Video taken from QuickTime(TM) files | Several codecs as stored in QuickTime, e.g. Sorenson or Cinepak. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file after the mandatory video descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read Apple's PDF on QuickTime. | |||||||||||||||||||||||||||
V_THEORA | Theora | The private data contains the first three Theora packets in order. The
lengths of the packets precedes them. The actual layout is: Byte 1: number of distinct packets ' #p ' minus one inside the
CodecPrivate block. This should be '2' for current Theora headers.Bytes 2..n: lengths of the first ' #p ' packets, coded in
Xiph-style lacing. The length of the last
packet is the length of the CodecPrivate block minus the lengths coded in
these bytes minus one.Bytes n+1..: The Theora identification header, followed by the commend header followed by the codec setup header. Those are described in the Theora specs. |
|||||||||||||||||||||||||||
V_PRORES | Apple ProRes | The private data contains the fourcc as found in MP4 movies:
|
See
|||||||||||||||||||||||||||
Audio | |||||||||||||||||||||||||||||
A_MPEG/L3 | MPEG Audio 1, 2, 2.5 Layer III | The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0055 |
|||||||||||||||||||||||||||
A_MPEG/L2 | MPEG Audio 1, 2 Layer II | The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0050 |
|||||||||||||||||||||||||||
A_MPEG/L1 | MPEG Audio 1, 2 Layer I | The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0050 |
|||||||||||||||||||||||||||
A_PCM/INT/BIG | PCM Integer Big Endian | The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element Corresponding ACM wFormatTag : ??? |
|||||||||||||||||||||||||||
A_PCM/INT/LIT | PCM Integer Little Endian | The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element Corresponding ACM wFormatTag : 0x0001 |
|||||||||||||||||||||||||||
A_PCM/FLOAT/IEEE | Floating Point, IEEE compatible | The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element (32 bit in most cases). The float are stored in little endian order (most common float format). Corresponding ACM wFormatTag : 0x0003 |
|||||||||||||||||||||||||||
A_MPC | MPC (musepack) SV8 | The main developer for musepack has requested that we wait until the SV8 framing has been fully defined for musepack before defining how to store it in Matroska. | |||||||||||||||||||||||||||
A_AC3 A_AC3/BSID10 |
(Dolby™) AC3 | BSID <= 8 !! The private data is void ??? Corresponding ACM wFormatTag : 0x2000 ; channel number have to be read from the corresponding audio element AC3/BSID9 and AC3/BSID10 (DolbyNet) : |
|||||||||||||||||||||||||||
A_ALAC | ALAC (Apple Lossless Audio Codec) | The private data contains ALAC's magic cookie (both the codec specific configuration as well as the optional channel layout information). Its format is described in ALAC's official source code. | |||||||||||||||||||||||||||
A_DTS | Digital Theatre System | Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution Audio and DTS-HD Master Audio. The private data is void. Corresponding ACM wFormatTag : 0x2001 | |||||||||||||||||||||||||||
A_DTS/EXPRESS | Digital Theatre System Express | DTS Express (a.k.a. LBR) audio streams. The private data is void. Corresponding ACM wFormatTag : 0x2001 | |||||||||||||||||||||||||||
A_DTS/LOSSLESS | Digital Theatre System Lossless | DTS Lossless audio that does not have a core substream. The private data is void. Corresponding ACM wFormatTag : 0x2001 | |||||||||||||||||||||||||||
A_VORBIS | Vorbis | The private data contains the first three Vorbis packet in order. The
lengths of the packets precedes them. The actual layout is: Byte 1: number of distinct packets ' #p ' minus one inside the
CodecPrivate block. This should be '2' for current Vorbis headers.Bytes 2..n: lengths of the first ' #p ' packets, coded in
Xiph-style lacing. The length of the last
packet is the length of the CodecPrivate block minus the lengths coded in
these bytes minus one.Bytes n+1..: The Vorbis identification header, followed by the Vorbis comment header followed by the codec setup header. |
|||||||||||||||||||||||||||
A_FLAC | FLAC (Free Lossless Audio Codec) | The private data contains all the header/metadata packets before
the first data packet. These include the first header packet
containing only the word fLaC as well as all metadata
packets. |
|||||||||||||||||||||||||||
A_REAL/???? | Realmedia Audio codecs | The stream contains one of the following audio codecs. In each case the CodecPrivate element contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure (differentiated by their "version" field; Big Endian byte order) as found in librmff. | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
A_MS/ACM | Microsoft(TM) Audio Codec Manager (ACM) | The private data contains the ACM structure WAVEFORMATEX including the extra private bytes, as defined by Microsoft. The data are stored in little endian format (like on IA32 machines). | |||||||||||||||||||||||||||
A_AAC/?????/??? | AAC Profile Audio | The stream complies with, and uses the CodecID for, one of the AAC profiles listed below. AAC audio always uses wFormatTag 0xFF | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
A_QUICKTIME | Audio taken from QuickTime(TM) files | Several codecs as stored in QuickTime, e.g. QDesign Music v1 or v2. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file after the mandatory sound descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read Apple's PDF on QuickTime. | |||||||||||||||||||||||||||
A_QUICKTIME/???? | QuickTime audio codecs | This CodecID is deprecated in favor of A_QUICKTIME (without a trailing codec name). Otherwise the storage is identical; see A_QUICKTIME for details. | |||||||||||||||||||||||||||
A_QUICKTIME/QDMC | QDesign Music | ||||||||||||||||||||||||||||
A_QUICKTIME/QDM2 | QDesign Music v2 | ||||||||||||||||||||||||||||
A_TTA1 | The True Audio lossles audio compressor | TTA format description Each frame is kept intact, including the CRC32. The header and seektable are dropped. The private data is void. SamplingFrequency, Channels and BitDepth are used in the TrackEntry. wFormatTag = 0x77A1 |
|||||||||||||||||||||||||||
A_WAVPACK4 | WavPack lossles audio compressor | The Wavpack packets consist of a stripped header followed by the frame data. For multi-track (> 2 tracks) a frame consists of many packets. For hybrid files (lossy part + correction part), the correction part is stored in an additional block (level 1). For more details, check the WavPack muxing description. | |||||||||||||||||||||||||||
Subtitle | |||||||||||||||||||||||||||||
S_TEXT/UTF8 | UTF-8 Plain Text | Basic text subtitles. For more information, please look at the Subtitle specifications. | |||||||||||||||||||||||||||
S_TEXT/SSA | Subtitles Format | The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS. | |||||||||||||||||||||||||||
S_TEXT/ASS | Advanced Subtitles Format | The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS. | |||||||||||||||||||||||||||
S_TEXT/USF | Universal Subtitle Format | This is mostly defined, but not typed out yet. It will first be available on the USF specs page. | |||||||||||||||||||||||||||
S_TEXT/WEBVTT | Web Video Text Tracks Format (WebVTT) | Advanced text subtitles. For more information about the storage please look at the WebVTT in Matroska specifications. | |||||||||||||||||||||||||||
S_IMAGE/BMP | Bitmap | Basic image based subtitle format; The subtitles are stored as images, like in the DVD. The timestamp in the block header of matroska indicates the start display time, the duration is set with the Duration element. The full data for the subtitle bitmap is stored in the Block's data section. | |||||||||||||||||||||||||||
S_VOBSUB | VobSub subtitles | The same subtitle format used on DVDs. Supoprted is only format
version 7 and newer. VobSubs consist of two files, the .idx
containing information, and the .sub, containing the actual
data. The .idx file is stripped of all empty lines, of all comments
and of lines beginning with alt: or
langidx: . The line beginning with id:
should be transformed into the appropriate Matroska track language
element and is discarded. All remaining lines but the ones
containing timestamps and file positions are put into the
CodecPrivate element.For each line containing the timestamp and file position data is read from the appropriate position in the .sub file. This data consists of a MPEG program stream which in turn contains SPU packets. The MPEG program stream data is discarded, and each SPU packet is put into one Matroska frame. |
|||||||||||||||||||||||||||
S_KATE | Karaoke And Text Encapsulation | A subtitle format developped for ogg. The mapping for Matroska is described on the Xiph wiki. As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets. | |||||||||||||||||||||||||||
Buttons | |||||||||||||||||||||||||||||
B_VOBBTN | VobBtn Buttons | Based on MPEG/VOB PCI packets. The file contains a header consisting of the string "butonDVD" followed by the width and height in pixels (16 bits integer each) and 4 reserved bytes. The rest is full PCI packets. |
To be supported later :
'V_MSWMV'; Video, Microsoft Video
'V_INDEO5'; Video, Indeo 5; transmuxed from AVI or created using VfW codec
'V_MJPEG'; Video, MJpeg codec (lossy mode, general)
'V_MJPEG2000'; Video, MJpeg 2000
'V_MJPEG2000LL'; Video, MJpeg Lossless
'V_DV'; Video, DV Video, type 1 (audio and video mixed)
'V_TARKIN'; Video, Ogg Tarkin
'V_ON2VP4'; Video, ON2, VP4
'V_ON2VP5'; Video, ON2, VP5
'V_3IVX'; Video, 3ivX (is D4 decoder downwards compatible?)
'V_HUFFYUV'; Video, HuffYuv, lossless; auch als VfW möglich
'V_COREYUV'; Video, CoreYuv, lossless; auch als VfW möglich
'V_RUDUDU'; Nicola's Rududu Wavelet codec
...... to be continued