Set the EBML characteristics of the data to follow. Each EBML document has to
start with this.
The version of EBML parser used to create the file.
The minimum EBML version a parser has to support to read this file.
The maximum length of the IDs you'll find in this file (4 or less in Matroska).
The maximum length of the sizes you'll find in this file (8 or less
in Matroska). This does not override the element size indicated at the beginning of an
element. Elements that have an indicated size which is larger than what is allowed by
EBMLMaxSizeLength shall be considered invalid.
A string that describes the type of document that follows this EBML header.
'matroska' in our case or 'webm' for webm files.
The version of DocType interpreter used to create the file.
The minimum DocType version an interpreter has to support to read
this file.
Used to void damaged data, to
avoid unexpected behaviors when using damaged data. The content is discarded. Also used to
reserve space in a sub-element for later use.
The CRC is
computed on all the data of the Master element it's in. The CRC element should be the first
in it's parent master for easier reading. All level 1 elements should include a CRC-32. The
CRC in use is the IEEE CRC32 Little Endian
Contain
signature of some (coming) elements in the stream.
Signature algorithm
used (1=RSA, 2=elliptic).
Hash algorithm used
(1=SHA1-160, 2=MD5).
The public key
to use with the algorithm (in the case of a PKI-based signature).
The signature of the data
(until a new.
Contains elements
that will be used to compute the signature.
A
list consists of a number of consecutive elements that represent one case where data is used
in signature. Ex: Cluster|Block|BlockAdditional means that the BlockAdditional of all
Blocks in all Clusters is used for encryption.
An
element ID whose data will be used to compute the signature.
This element contains all other top-level (level 1) elements. Typically a
Matroska file is composed of 1 segment.
Contains the position
of other level 1 elements.
Contains a single seek entry to an EBML element.
The binary
ID corresponding to the element name.
The position
of the element in the segment in octets (0 = first level 1 element).
Contains miscellaneous general information and statistics on the file.
A randomly generated unique ID to identify the current segment between many
others (128 bits).
A
filename corresponding to this segment.
A
unique ID to identify the previous chained segment (128 bits).
An escaped
filename corresponding to the previous segment.
A
unique ID to identify the next chained segment (128 bits).
An escaped
filename corresponding to the next segment.
A randomly generated unique ID that all segments related to each
other must use (128 bits).
A tuple of corresponding ID used by chapter codecs to represent this segment.
Specify an edition UID on which this correspondance applies. When not
specified, it means for all editions found in the segment.
The chapter
codec using this ID (0: Matroska Script, 1: DVD-menu).
The binary value used to represent this segment in the chapter codec data. The
format depends on the
ChapProcessCodecID used.
Timecode scale in nanoseconds (1.000.000 means all timecodes in the
segment are expressed in milliseconds).
Duration
of the segment (based on TimecodeScale).
Date of the origin of
timecode (value 0), i.e. production date.
General name of the
segment.
Muxing
application or library ("libmatroska-0.4.3").
Writing
application ("mkvmerge-0.3.3").
The
lower level element containing the (monolithic) Block structure.
Absolute timecode of the cluster (based on TimecodeScale).
The list of tracks that are not used in that part of the stream. It is
useful when using overlay tracks on seeking. Then you should decide what track to use.
One of the track number that are not used
from now on in the stream. It could change later if not specified as silent in a further
Cluster.
The Position
of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise
offset on damaged streams.
Size of the previous Cluster, in octets. Can be useful for backward playing.
Similar to Block
but without all the extra information, mostly used to reduced overhead when no extra feature
is needed. (see SimpleBlock
Structure)
Basic
container of information containing a single Block or BlockVirtual, and information specific
to that Block/VirtualBlock.
Block
containing the actual data to be rendered and a timecode relative to the Cluster Timecode.
(see Block
Structure)
A Block with no data. It
must be stored in the stream at the place the real Block should be in display order. (see Block Virtual
)
Contain
additional blocks to complete the main one. An EBML parser that has no knowledge of the
Block structure could still see and use/skip these data.
Contain the BlockAdditional and some parameters.
An ID to identify the BlockAdditional level.
Interpreted by the codec as it wishes (using the BlockAddID).
The duration of the Block (based on TimecodeScale). This element is
mandatory when DefaultDuration is set for the track (but can be omitted as other default
values). When not written and with no DefaultDuration, the value is assumed to be the
difference between the timecode of this Block and the timecode of the next Block in
"display" order (not coding order). This element can be useful at the end of a Track (as
there is not other Block available), or when there is a break in a track like for subtitle
tracks. When set to 0 that means the frame is not a keyframe.
This frame is referenced and has the specified
cache priority. In cache only a frame of the same or higher priority can replace this frame.
A value of 0 means the frame is not referenced.
Timecode
of another frame used as a reference (ie: B or P frame). The timecode is relative to the
block it's attached to.
Relative position
of the data that should be in position of the virtual block.
The new codec
state to use. Data interpretation is private to the codec. This information should always be
referenced by a seek entry.
Contains slices
description.
Contains
extra time information about the data contained in the Block. While there are a few files in
the wild with this element, it is no longer in use and has been deprecated. Being able to
interpret this element is not required for playback.
The reverse number of the frame in the lace (0 is the last
frame, 1 is the next to last, etc). While there are a few files in the wild with this
element, it is no longer in use and has been deprecated. Being able to interpret this
element is not required for playback.
The number of the frame to generate from this lace with this delay (allow you to
generate many frames from the same Block/Frame).
The ID of the BlockAdditional element (0 is the main Block).
The
(scaled) delay to apply to the element.
The (scaled)
duration to apply to the element.
DivX
trick track extenstions
DivX
trick track extenstions
DivX
trick track extenstions
Similar
to SimpleBlock
but the data inside the Block are Transformed (encrypt and/or signed). (see EncryptedBlock
Structure)
A
top-level block of information with many tracks described.
Describes a track with all elements.
The track number as used in the Block Header (using more than 127 tracks is
not encouraged, though the design allows an unlimited number).
A unique ID to identify the Track. This should be kept the same when making a
direct stream copy of the Track to another file.
A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10:
logo, 0x11: subtitle, 0x12: buttons, 0x20: control).
Set if the track is usable. (1
bit)
Set if that track (audio, video or subs)
SHOULD be active if no language found matches the user preference. (1 bit)
Set if that track MUST be active during
playback. There can be many forced track for a kind (audio, video or subs), the player
should select the one which language matches the user preference or the default + forced
track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)
Set if the track may contain blocks using
lacing. (1 bit)
The minimum number of frames a player should
be able to cache during playback. If set to 0, the reference pseudo-cache system is not
used.
The maximum cache size required to store referenced frames in and the
current frame. 0 means no cache is needed.
Number of nanoseconds (not scaled via
TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a
(Simple)Block).
DEPRECATED, DO NOT USE. The scale to apply
on this track to work at normal speed in relation with other tracks (mostly used to adjust
video speed when the audio length differs).
A value to
add to the Block's Timecode. This can be used to adjust the playback offset of a track.
The maximum value of BlockAddID. A
value 0 means there is no BlockAdditions
for this track.
A
human-readable track name.
Specifies the language of the track in the Matroska languages
form.
An ID
corresponding to the codec, see the codec page for
more info.
Private data only
known to the codec.
A human-readable
string specifying the codec.
The UID of an attachment that is used by
this codec.
A string describing
the encoding setting used.
A URL
to find information about the codec used.
A
URL to download about the codec used.
The codec can decode potentially damaged data (1 bit).
Specify that this track is an overlay track for the Track specified (in the
u-integer). That means when this track has a gap (see SilentTracks)
the overlay track should be used instead. The order of multiple TrackOverlay matters, the
first one is the one that should be used. If not found it should be the second, etc.
The track identification for the given Chapter Codec.
Specify an edition UID on which this translation applies. When not
specified, it means for all editions found in the segment.
The chapter
codec using this ID (0: Matroska Script, 1: DVD-menu).
The binary value used to represent this track in the chapter codec data.
The format depends on the
ChapProcessCodecID used.
Video
settings.
Set if the video is interlaced. (1
bit)
Stereo-3D video mode (0: mono, 1: side by side (left eye is
first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard
(right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row
interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved
(left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12:
anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes
laced in one Block (right eye is first)) . There are some more details on 3D support in the
Specification Notes.
DEPRECATED,
DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right
eye, 2: left eye, 3: both eyes).
Width of the encoded video frames in pixels.
Height of the encoded video frames in pixels.
The number of video pixels to remove at the bottom of
the image (for HDTV content).
The number of video pixels to remove at the top of the image.
The number of video pixels to remove on the left of the image.
The number of video pixels to remove on the right of
the image.
Width of the video frames to display. The
default value is only valid when DisplayUnit is
0.
Height of the video frames to display. The
default value is only valid when DisplayUnit is
0.
How DisplayWidth & DisplayHeight should be interpreted (0:
pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio).
Specify the possible modifications to the aspect ratio (0: free
resizing, 1: keep aspect ratio, 2: fixed).
Same value as in AVI (32 bits).
Gamma Value.
Number of frames per second. Informational only.
Audio
settings.
Sampling frequency in Hz.
Real output sampling
frequency in Hz (used for SBR techniques).
Numbers of channels in the track.
Table of horizontal angles for each successive channel, see appendix.
Bits per sample, mostly used for PCM.
Operation
that needs to be applied on tracks to create this virtual track. For more details look at the
Specification Notes on the subject.
Contains
the list of all video plane tracks that need to be combined to create this 3D track
Contains a video plane track that need to be combined to create this 3D
track
The trackUID number of the track representing the plane.
The kind of plane this track corresponds to (0: left eye, 1: right eye, 2:
background).
Contains
the list of all tracks whose Blocks need to be combined to create this virtual track
The trackUID number of a track whose blocks are used to
create this virtual track.
DivX
trick track extenstions
DivX
trick track extenstions
DivX
trick track extenstions
DivX
trick track extenstions
DivX
trick track extenstions
Settings
for several content encoding mechanisms like compression or encryption.
Settings for one content encoding like compression or encryption.
Tells when this modification was used during encoding/muxing
starting with 0 and counting upwards. The decoder/demuxer has to start with the highest
order number it finds and work its way down. This value has to be unique over all
ContentEncodingOrder elements in the segment.
A bit field that describes which elements have
been modified in this way. Values (big endian) can be OR'ed. Possible values:
1 - all
frame contents,
2 - the track's private data,
4 - the next ContentEncoding (next
ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)
A value describing what kind of transformation has been
done. Possible values:
0 - compression,
1 - encryption
Settings
describing the compression used. Must be present if the value of ContentEncodingType is 0
and absent otherwise. Each block must be decompressable even if no previous block is
available in order not to prevent seeking.
The compression algorithm used. Algorithms that have been specified so
far are:
0 - zlib,
1 - bzlib,
2 - lzo1x
3 -
Header Stripping
Settings
that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the
bytes that were removed from the beggining of each frames of the track.
Settings
describing the encryption used. Must be present if the value of ContentEncodingType is 1 and
absent otherwise.
The encryption algorithm used. The value '0' means that the contents have not
been encrypted but only signed. Predefined values:
1 - DES, 2 - 3DES, 3 - Twofish, 4 -
Blowfish, 5 - AES
For
public key algorithms this is the ID of the public key the the data was encrypted with.
A
cryptographic signature of the contents.
This is
the ID of the private key the data was signed with.
The algorithm used for the signature. A value of '0' means that the contents
have not been signed but only encrypted. Predefined values:
1 - RSA
The hash algorithm used for the signature. A value of '0' means that the
contents have not been signed but only encrypted. Predefined values:
1 - SHA1-160
2 - MD5
A top-level element to
speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.
Contains
all information relative to a seek point in the segment.
Absolute
timecode according to the segment time base.
Contain positions for different tracks corresponding to the timecode.
The track for which a position is given.
The
position of the Cluster containing the required Block.
The relative position of the referenced block inside the cluster with 0 being the
first possible position for an element inside that cluster.
The duration of the block according to the segment time base. If missing the
track's DefaultDuration does not apply and no duration information is available in terms of
the cues.
Number of the Block in the specified Cluster.
The position
of the Codec State corresponding to this Cue element. 0 means that the data is taken from
the initial Track Entry.
The
Clusters containing the required referenced Blocks.
Timecode
of the referenced Block.
The Position
of the Cluster containing the referenced Block.
Number of the referenced Block of Track X in the specified Cluster.
The position
of the Codec State corresponding to this referenced element. 0 means that the data is taken
from the initial Track Entry.
Contain
attached files.
An attached file.
A
human-friendly name for the attached file.
Filename
of the attached file.
MIME type of the file.
The
data of the file.
Unique ID representing the file, as random as possible.
A binary value that a
track/codec can refer to when the attachment is needed.
DivX font
extension
DivX font
extension
A system to
define basic menus and partition data. For more detailed information, look at the Chapters Explanation
.
Contains all information about a segment edition.
A unique ID to identify the edition. It's useful for tagging an edition.
If an edition is hidden (1), it should not be available to
the user interface (but still to Control Tracks). (1 bit)
If a flag is set (1) the edition should be used
as the default one. (1 bit)
Specify if the chapters can be defined multiple times and the order
to play them is enforced. (1 bit)
Contains the atom information to use as the chapter atom
(apply to all tracks).
A unique ID to identify the Chapter.
A unique string ID to identify the Chapter. Use for WebVTT cue identifier
storage.
Timecode of the start of Chapter (not scaled).
Timecode
of the end of Chapter (timecode excluded, not scaled).
If a chapter is hidden (1), it should not be available to
the user interface (but still to Control Tracks). (1 bit)
Specify wether the chapter is enabled. It can be
enabled/disabled by a Control Track. When disabled, the movie should skip all the content
between the TimeStart and TimeEnd of this chapter. (1 bit)
A segment to play in place of this chapter. Edition
ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used.
The EditionUID to play from the segment linked in ChapterSegmentUID.
Specify
the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of
values.
List of
tracks on which the chapter applies. If this element is not present, all tracks apply
UID of the Track to apply this chapter too.
In the absense of a control track, choosing this chapter will select the listed Tracks and
deselect unlisted tracks. Absense of this element indicates that the Chapter should be
applied to any currently used Tracks.
Contains all possible strings to use for the chapter display.
Contains the string to use as the chapter atom.
The languages corresponding to
the string, in the bibliographic
ISO-639-2 form.
The countries corresponding to the string, same 2 octets as
in Internet domains.
Contains all the commands associated to the Atom.
Contains the type of the codec
used for the processing. A value of 0 means native Matroska processing (to be defined), a
value of 1 means the DVD command
set is used. More codec IDs can be added later.
Some optional data attached to the ChapProcessCodecID
information. For
ChapProcessCodecID = 1, it is the "DVD level" equivalent.
Contains all the commands associated to the
Atom.
Defines when the process command should be
handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the
chapter).
Contains the command information. The data should be
interpreted depending on the ChapProcessCodecID value. For
ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands.
Element
containing elements specific to Tracks/Chapters. A list of valid tags can be found here.
Element containing elements specific to Tracks/Chapters.
Contain all UIDs where the specified meta data apply. It is empty to
describe everything in the segment.
A number to indicate the logical level of
the target (see TargetType
).
An informational string that can be used to display the
logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType
).
A unique ID to identify the Track(s) the tags belong to. If the value
is 0 at this level, the tags apply to all tracks in the Segment.
A unique ID to identify the EditionEntry(s) the tags belong to. If the
value is 0 at this level, the tags apply to all editions in the Segment.
A unique ID to identify the Chapter(s) the tags belong to. If the value
is 0 at this level, the tags apply to all chapters in the Segment.
A unique ID to identify the Attachment(s) the tags belong to. If the
value is 0 at this level, the tags apply to all the attachments in the Segment.
Contains general information about the
target.
The
name of the Tag that is going to be stored.
Specifies the language of the tag specified, in the Matroska languages
form.
Indication to know if this is the default/original language
to use for the given tag. (1 bit)
The value of
the Tag.
The values of
the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.