Codecs
Codecs
Video (MEDIATYPE_Video)
CodecID
V_MS/VFW/FOURCC
Avi compatibility,
any VfW codec can
be stored in
Matroska using this
mode
V_REAL/RVxy
RealVideo, xx is the
codec version (two
decimal digits)
V_MPEG1
ISO/IEC 11172-2
V_MPEG2
ISO/IEC 13818-2
V_THEORA
V_SNOW
V_MPEG4/ISO/ASP
MPEG-4 part 2,
ISO/IEC 14496-2
V_MPEG4/ISO/AVC
CodecPrivate format
BITMAPINFOHEADER structure
followed by opaque codec init data
Subtype FOURCCMap(dwCompression)
Format
VideoInfo/VideoInfo2
CodecPrivate is copied verbatim to the format block starting at the bmiHeader
member of VIDEOINFOHEADER/VIDEOINFOHEADER2
Subtype FOURCCMap(R,V,x,y)
Format
VideoInfo/VideoInfo2
CodecPrivate is appended to VIDEOINFOHEADER/VIDEOINFOHEADER2
Subtype: MPEG1Payload
Format: MPEGVideo
CodecPrivate is copied to the format block starting at bSequenceHeader member
of MPEG1VIDEOINFO
Subtype MPEG2_VIDEO
Format
MPEG2Video
CodecPrivate is copied to the format block starting at dwSequence header
member of MPEG2VIDEOINFO
Subtype FOURCCMap(THEO)
Format
MPEG2Video
Three big-endian 16-bit words with packet sizes followed by the packets
themselves are stored starting at dwSequenceHeader member of
MPEG2VIDEOINFO
Subtype FOURCCMap(SNOW)
Format
MPEG2Video
CodecPrivate is copied to the format block starting at dwSequence header
member of MPEG2VIDEOINFO
MPEG-4 headers up to the first VOP,
Subtype FOURCCMap(MP4V)
the stream itself contains only VOPs and Format
MPEG2Video
no headers
CodecPrivate is copied to the format block starting at dwSequence header
member of MPEG2VIDEOINFO
The following structure is stored in
Subtype FOURCCMap(AVC1)
CodecPrivate
Size
Contents
Format
MPEG2Video
(bits)
8
Reserved
dwProfile = CodecPrivate.Profile;
dwLevel = CodecPrivate.Level;
8
Profile
dwFlags = CodecPrivate.NALUSizeLength + 1;
8
Reserved
SPSs and PPSs are concatenated and stored at dwSequenceHeader, without SPS
8
Level
and PPS counts
6
Reserved
2
Size of NALU length minus 1
3
Reserved
5
Number of Sequence
Parameter Sets
?
Sequence Parameter Sets, each
is prefixed with a two byte bigendian size field
8
Number of Picture Parameter
Sets
?
Picture Parameter Sets, each is
prefixed with a two byte bigendian size field
Audio (MEDIATYPE_Audio)
CodecID
A_AC3
Dolby AC3
A_MPEG/L3
MPEG-1 Layer 3,
ISO/IEC 11172-3
A_MPEG/L2,
A_MPEG/L1
CodecPrivate format
None
Subtype
Format
FOURCCMap(0x2000)
WaveFormatEx
None
Subtype
Format
FOURCCMap(0x0055)
WaveFormatEx
None
Subtype
Format
FOURCCMap(0x0050)
WaveFormatEx
None
Subtype
Format
FOURCCMap(0x2001)
WaveFormatEx
None
Subtype
Format
FOURCCMap(0x0001)
WaveFormatEx
None
Subtype
Format
FOURCCMap(0x0003)
WaveFormatEx
Subtype FOURCCMap(0x77a1)
Format
WaveFormatEx
CodecPrivate is appended to WAVEFORMATEX
Subtype FOURCCMap(0x5756),
WavpackHybrid {B8CBBAD8-AA1A-4cea-B95E-730041A55EF0}
Format
WaveFormatEx
CodecPrivate is appended to WAVEFORMATEX. When both lossy and
correction data are muxed into the same track, correction data is stored in
BlockAdditional Matroska elements and is sent in DirectShow samples with
Stream ID set to 1 in sample properties.
Subtype Vorbis2 {8D2FD10B-5841-4a6b-8905-588FEC1ADED9}
Format
VorbisFormat2 {B36E107F-A938-4387-93C7-55E966757473}
struct VORBISFORMAT2 {
DWORD Channels;
DWORD SamplesPerSec;
DWORD BitsPerSample;
DWORD HeaderSize[3]; // Sizes of three init packets
};
Init packets are appended to the structure
Subtype FLAC_FRAMED {1541C5C0-CDDF-477d-BC0A-86F8AE7F8354}
Format
WaveFormatEx
wFormatTag = 0xf1ac;
CodecPrivate is appended to WAVEFORMATEX
Subtype FOURCCMap(xyzt)
Format
WaveFormatEx
wFormatTag xyzt
0x2002
14_4
0x2003
28_8
0x2004
COOK
0x0130
SIPR
0x0270
ATRC
DTS
A_PCM/INT/LIT
Uncompressed
PCM, integer, little
endian
A_PCM/FLOAT/IEEE
Uncompressed
PCM, float, little
endian
A_TTA1
Wavpack lossless
audio codec
A_VORBIS
A_FLAC
A_AAC
MPEG-4 part 3,
ISO/IEC 14496-3
A_AAC/MAIN [/SBR]
[/LC] [/SSR]
[/LTP]
MPEG-4 part 3,
ISO/IEC 14496-3
A_MS/ACM
Avi compatibility,
any ACM codec can
be stored in
Matroska using this
mode
Subtitles
(MEDIATYPE_Subtitle {E487EB08-6B26-4be9-9DD3-993434D313FD})
CodecID
S_TEXT/ASCII
S_TEXT/SSA
SubStation Alpha
subtitles in UTF-8
encoding
S_TEXT/ASS
Advanced
SubStation subtitles
in UTF-8 encoding
S_TEXT/USF
S_VOBSUB
CodecPrivate format
None
Subtype NULL
Format
None
Type is set to MEDIATYPE_Text for this codecID
None