Cues
The Cues element provides an index of certain Cluster
elements to allow for optimized seeking to absolute timestamps within the
Segment. The Cues element contains one or many
CuePoint elements, each of which MUST reference an
absolute timestamp (via the CueTime element), a Track (via
the CueTrack element), and a Segment Position (via the
CueClusterPosition element). Additional non-mandated elements are
part of the CuePoint element, such as CueDuration,
CueRelativePosition, CueCodecState, and others that provide
any Matroska Reader with additional information to use in the
optimization of seeking performance.
Recommendations
The following recommendations are provided to optimize Matroska performance.
-
Unless Matroska is used as a live stream, it SHOULD contain a
Cueselement. -
For each video track, each keyframe SHOULD be referenced by a
CuePointelement. -
It is RECOMMENDED to not reference non-keyframes of video tracks in
Cuesunless it references aClusterelement that contains aCodecStateelement but no keyframes. -
For each subtitle track present, each subtitle frame SHOULD be referenced by a
CuePointelement with aCueDurationelement. -
References to audio tracks MAY be skipped in
CuePointelements if a video track is present. When included, theCuePointelements SHOULD reference audio keyframes once every 500 milliseconds at most. -
If the referenced frame is not stored within the first
SimpleBlockor firstBlockGroupwithin itsClusterelement, then theCueRelativePositionelement SHOULD be written to reference where in theClusterthe reference frame is stored. -
If a
CuePointelement references aClusterelement that includes aCodecStateelement, then thatCuePointelement MUST use aCueCodecStateelement. -
CuePointelements SHOULD be numerically sorted in storage order by the value of theCueTimeelement.
Matroska Technical Specification