Skip to content

Instantly share code, notes, and snippets.

@kieranjol
Created July 25, 2018 18:33
Show Gist options
  • Select an option

  • Save kieranjol/a027b009296450f4f504d7ee845b3101 to your computer and use it in GitHub Desktop.

Select an option

Save kieranjol/a027b009296450f4f504d7ee845b3101 to your computer and use it in GitHub Desktop.
cellar S. Lhomme
Internet-Draft
Intended status: Standards Track M. Bunkus
Expires: January 26, 2019
D. Rice
July 25, 2018
Matroska Specifications
draft-ietf-cellar-matroska-00
Abstract
This document defines the Matroska audiovisual container, including
definitions of its structural elements, as well as its terminology,
vocabulary, and application.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 26, 2019.
Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Lhomme, et al. Expires January 26, 2019 [Page 1]
Internet-Draft Matroska July 2018
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 8
2. Status of this document . . . . . . . . . . . . . . . . . . . 9
3. Security Considerations . . . . . . . . . . . . . . . . . . . 10
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
5. Notation and Conventions . . . . . . . . . . . . . . . . . . 10
6. Basis in EBML . . . . . . . . . . . . . . . . . . . . . . . . 11
6.1. Added Constraints on EBML . . . . . . . . . . . . . . . . 11
6.2. Matroska Design . . . . . . . . . . . . . . . . . . . . . 11
6.2.1. Language Codes . . . . . . . . . . . . . . . . . . . 11
6.2.2. Physical Types . . . . . . . . . . . . . . . . . . . 12
6.2.3. Block Structure . . . . . . . . . . . . . . . . . . . 12
6.2.4. Lacing . . . . . . . . . . . . . . . . . . . . . . . 13
7. Matroska Structure . . . . . . . . . . . . . . . . . . . . . 17
8. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 25
8.1. Matroska Additions to Schema Element Attributes . . . . . 25
8.2. Matroska Schema Element Definitions . . . . . . . . . . . 26
8.2.1. EBMLMaxIDLength Element . . . . . . . . . . . . . . . 26
8.2.2. EBMLMaxSizeLength Element . . . . . . . . . . . . . . 26
8.2.3. Segment Element . . . . . . . . . . . . . . . . . . . 27
8.2.4. SeekHead Element . . . . . . . . . . . . . . . . . . 27
8.2.5. Seek Element . . . . . . . . . . . . . . . . . . . . 27
8.2.6. SeekID Element . . . . . . . . . . . . . . . . . . . 28
8.2.7. SeekPosition Element . . . . . . . . . . . . . . . . 28
8.2.8. Info Element . . . . . . . . . . . . . . . . . . . . 29
8.2.9. SegmentUID Element . . . . . . . . . . . . . . . . . 29
8.2.10. SegmentFilename Element . . . . . . . . . . . . . . . 29
8.2.11. PrevUID Element . . . . . . . . . . . . . . . . . . . 30
8.2.12. PrevFilename Element . . . . . . . . . . . . . . . . 30
8.2.13. NextUID Element . . . . . . . . . . . . . . . . . . . 31
8.2.14. NextFilename Element . . . . . . . . . . . . . . . . 31
8.2.15. SegmentFamily Element . . . . . . . . . . . . . . . . 32
8.2.16. ChapterTranslate Element . . . . . . . . . . . . . . 32
8.2.17. ChapterTranslateEditionUID Element . . . . . . . . . 32
8.2.18. ChapterTranslateCodec Element . . . . . . . . . . . . 33
8.2.19. ChapterTranslateID Element . . . . . . . . . . . . . 33
8.2.20. TimestampScale Element . . . . . . . . . . . . . . . 34
8.2.21. Duration Element . . . . . . . . . . . . . . . . . . 34
8.2.22. DateUTC Element . . . . . . . . . . . . . . . . . . . 35
8.2.23. Title Element . . . . . . . . . . . . . . . . . . . . 35
8.2.24. MuxingApp Element . . . . . . . . . . . . . . . . . . 35
8.2.25. WritingApp Element . . . . . . . . . . . . . . . . . 36
8.2.26. Cluster Element . . . . . . . . . . . . . . . . . . . 36
8.2.27. Timestamp Element . . . . . . . . . . . . . . . . . . 37
8.2.28. SilentTracks Element . . . . . . . . . . . . . . . . 37
8.2.29. SilentTrackNumber Element . . . . . . . . . . . . . . 37
8.2.30. Position Element . . . . . . . . . . . . . . . . . . 38
Lhomme, et al. Expires January 26, 2019 [Page 2]
Internet-Draft Matroska July 2018
8.2.31. PrevSize Element . . . . . . . . . . . . . . . . . . 38
8.2.32. SimpleBlock Element . . . . . . . . . . . . . . . . . 38
8.2.33. BlockGroup Element . . . . . . . . . . . . . . . . . 39
8.2.34. Block Element . . . . . . . . . . . . . . . . . . . . 39
8.2.35. BlockVirtual Element . . . . . . . . . . . . . . . . 39
8.2.36. BlockAdditions Element . . . . . . . . . . . . . . . 40
8.2.37. BlockMore Element . . . . . . . . . . . . . . . . . . 40
8.2.38. BlockAddID Element . . . . . . . . . . . . . . . . . 41
8.2.39. BlockAdditional Element . . . . . . . . . . . . . . . 41
8.2.40. BlockDuration Element . . . . . . . . . . . . . . . . 41
8.2.41. ReferencePriority Element . . . . . . . . . . . . . . 42
8.2.42. ReferenceBlock Element . . . . . . . . . . . . . . . 42
8.2.43. ReferenceVirtual Element . . . . . . . . . . . . . . 43
8.2.44. CodecState Element . . . . . . . . . . . . . . . . . 43
8.2.45. DiscardPadding Element . . . . . . . . . . . . . . . 44
8.2.46. Slices Element . . . . . . . . . . . . . . . . . . . 44
8.2.47. TimeSlice Element . . . . . . . . . . . . . . . . . . 44
8.2.48. LaceNumber Element . . . . . . . . . . . . . . . . . 45
8.2.49. FrameNumber Element . . . . . . . . . . . . . . . . . 45
8.2.50. BlockAdditionID Element . . . . . . . . . . . . . . . 46
8.2.51. Delay Element . . . . . . . . . . . . . . . . . . . . 46
8.2.52. SliceDuration Element . . . . . . . . . . . . . . . . 47
8.2.53. ReferenceFrame Element . . . . . . . . . . . . . . . 47
8.2.54. ReferenceOffset Element . . . . . . . . . . . . . . . 47
8.2.55. ReferenceTimestamp Element . . . . . . . . . . . . . 48
8.2.56. EncryptedBlock Element . . . . . . . . . . . . . . . 48
8.2.57. Tracks Element . . . . . . . . . . . . . . . . . . . 49
8.2.58. TrackEntry Element . . . . . . . . . . . . . . . . . 49
8.2.59. TrackNumber Element . . . . . . . . . . . . . . . . . 49
8.2.60. TrackUID Element . . . . . . . . . . . . . . . . . . 50
8.2.61. TrackType Element . . . . . . . . . . . . . . . . . . 50
8.2.62. FlagEnabled Element . . . . . . . . . . . . . . . . . 51
8.2.63. FlagDefault Element . . . . . . . . . . . . . . . . . 51
8.2.64. FlagForced Element . . . . . . . . . . . . . . . . . 52
8.2.65. FlagLacing Element . . . . . . . . . . . . . . . . . 52
8.2.66. MinCache Element . . . . . . . . . . . . . . . . . . 53
8.2.67. MaxCache Element . . . . . . . . . . . . . . . . . . 53
8.2.68. DefaultDuration Element . . . . . . . . . . . . . . . 54
8.2.69. DefaultDecodedFieldDuration Element . . . . . . . . . 54
8.2.70. TrackTimestampScale Element . . . . . . . . . . . . . 54
8.2.71. TrackOffset Element . . . . . . . . . . . . . . . . . 55
8.2.72. MaxBlockAdditionID Element . . . . . . . . . . . . . 55
8.2.73. Name Element . . . . . . . . . . . . . . . . . . . . 56
8.2.74. Language Element . . . . . . . . . . . . . . . . . . 56
8.2.75. LanguageIETF Element . . . . . . . . . . . . . . . . 57
8.2.76. CodecID Element . . . . . . . . . . . . . . . . . . . 57
8.2.77. CodecPrivate Element . . . . . . . . . . . . . . . . 57
8.2.78. CodecName Element . . . . . . . . . . . . . . . . . . 58
Lhomme, et al. Expires January 26, 2019 [Page 3]
Internet-Draft Matroska July 2018
8.2.79. AttachmentLink Element . . . . . . . . . . . . . . . 58
8.2.80. CodecSettings Element . . . . . . . . . . . . . . . . 58
8.2.81. CodecInfoURL Element . . . . . . . . . . . . . . . . 59
8.2.82. CodecDownloadURL Element . . . . . . . . . . . . . . 59
8.2.83. CodecDecodeAll Element . . . . . . . . . . . . . . . 60
8.2.84. TrackOverlay Element . . . . . . . . . . . . . . . . 60
8.2.85. CodecDelay Element . . . . . . . . . . . . . . . . . 60
8.2.86. SeekPreRoll Element . . . . . . . . . . . . . . . . . 61
8.2.87. TrackTranslate Element . . . . . . . . . . . . . . . 61
8.2.88. TrackTranslateEditionUID Element . . . . . . . . . . 62
8.2.89. TrackTranslateCodec Element . . . . . . . . . . . . . 62
8.2.90. TrackTranslateTrackID Element . . . . . . . . . . . . 63
8.2.91. Video Element . . . . . . . . . . . . . . . . . . . . 63
8.2.92. FlagInterlaced Element . . . . . . . . . . . . . . . 63
8.2.93. FieldOrder Element . . . . . . . . . . . . . . . . . 64
8.2.94. StereoMode Element . . . . . . . . . . . . . . . . . 65
8.2.95. AlphaMode Element . . . . . . . . . . . . . . . . . . 66
8.2.96. OldStereoMode Element . . . . . . . . . . . . . . . . 66
8.2.97. PixelWidth Element . . . . . . . . . . . . . . . . . 67
8.2.98. PixelHeight Element . . . . . . . . . . . . . . . . . 67
8.2.99. PixelCropBottom Element . . . . . . . . . . . . . . . 68
8.2.100. PixelCropTop Element . . . . . . . . . . . . . . . . 68
8.2.101. PixelCropLeft Element . . . . . . . . . . . . . . . 69
8.2.102. PixelCropRight Element . . . . . . . . . . . . . . . 69
8.2.103. DisplayWidth Element . . . . . . . . . . . . . . . . 69
8.2.104. DisplayHeight Element . . . . . . . . . . . . . . . 70
8.2.105. DisplayUnit Element . . . . . . . . . . . . . . . . 70
8.2.106. AspectRatioType Element . . . . . . . . . . . . . . 71
8.2.107. ColourSpace Element . . . . . . . . . . . . . . . . 72
8.2.108. GammaValue Element . . . . . . . . . . . . . . . . . 72
8.2.109. FrameRate Element . . . . . . . . . . . . . . . . . 72
8.2.110. Colour Element . . . . . . . . . . . . . . . . . . . 73
8.2.111. MatrixCoefficients Element . . . . . . . . . . . . . 73
8.2.112. BitsPerChannel Element . . . . . . . . . . . . . . . 74
8.2.113. ChromaSubsamplingHorz Element . . . . . . . . . . . 74
8.2.114. ChromaSubsamplingVert Element . . . . . . . . . . . 75
8.2.115. CbSubsamplingHorz Element . . . . . . . . . . . . . 75
8.2.116. CbSubsamplingVert Element . . . . . . . . . . . . . 76
8.2.117. ChromaSitingHorz Element . . . . . . . . . . . . . . 76
8.2.118. ChromaSitingVert Element . . . . . . . . . . . . . . 77
8.2.119. Range Element . . . . . . . . . . . . . . . . . . . 77
8.2.120. TransferCharacteristics Element . . . . . . . . . . 78
8.2.121. Primaries Element . . . . . . . . . . . . . . . . . 79
8.2.122. MaxCLL Element . . . . . . . . . . . . . . . . . . . 80
8.2.123. MaxFALL Element . . . . . . . . . . . . . . . . . . 80
8.2.124. MasteringMetadata Element . . . . . . . . . . . . . 81
8.2.125. PrimaryRChromaticityX Element . . . . . . . . . . . 81
8.2.126. PrimaryRChromaticityY Element . . . . . . . . . . . 81
Lhomme, et al. Expires January 26, 2019 [Page 4]
Internet-Draft Matroska July 2018
8.2.127. PrimaryGChromaticityX Element . . . . . . . . . . . 82
8.2.128. PrimaryGChromaticityY Element . . . . . . . . . . . 82
8.2.129. PrimaryBChromaticityX Element . . . . . . . . . . . 83
8.2.130. PrimaryBChromaticityY Element . . . . . . . . . . . 83
8.2.131. WhitePointChromaticityX Element . . . . . . . . . . 83
8.2.132. WhitePointChromaticityY Element . . . . . . . . . . 84
8.2.133. LuminanceMax Element . . . . . . . . . . . . . . . . 84
8.2.134. LuminanceMin Element . . . . . . . . . . . . . . . . 85
8.2.135. Projection Element . . . . . . . . . . . . . . . . . 85
8.2.136. ProjectionType Element . . . . . . . . . . . . . . . 85
8.2.137. ProjectionPrivate Element . . . . . . . . . . . . . 86
8.2.138. ProjectionPoseYaw Element . . . . . . . . . . . . . 87
8.2.139. ProjectionPosePitch Element . . . . . . . . . . . . 87
8.2.140. ProjectionPoseRoll Element . . . . . . . . . . . . . 88
8.2.141. Audio Element . . . . . . . . . . . . . . . . . . . 88
8.2.142. SamplingFrequency Element . . . . . . . . . . . . . 89
8.2.143. OutputSamplingFrequency Element . . . . . . . . . . 89
8.2.144. Channels Element . . . . . . . . . . . . . . . . . . 90
8.2.145. ChannelPositions Element . . . . . . . . . . . . . . 90
8.2.146. BitDepth Element . . . . . . . . . . . . . . . . . . 90
8.2.147. TrackOperation Element . . . . . . . . . . . . . . . 91
8.2.148. TrackCombinePlanes Element . . . . . . . . . . . . . 91
8.2.149. TrackPlane Element . . . . . . . . . . . . . . . . . 92
8.2.150. TrackPlaneUID Element . . . . . . . . . . . . . . . 92
8.2.151. TrackPlaneType Element . . . . . . . . . . . . . . . 92
8.2.152. TrackJoinBlocks Element . . . . . . . . . . . . . . 93
8.2.153. TrackJoinUID Element . . . . . . . . . . . . . . . . 93
8.2.154. TrickTrackUID Element . . . . . . . . . . . . . . . 94
8.2.155. TrickTrackSegmentUID Element . . . . . . . . . . . . 94
8.2.156. TrickTrackFlag Element . . . . . . . . . . . . . . . 95
8.2.157. TrickMasterTrackUID Element . . . . . . . . . . . . 95
8.2.158. TrickMasterTrackSegmentUID Element . . . . . . . . . 95
8.2.159. ContentEncodings Element . . . . . . . . . . . . . . 96
8.2.160. ContentEncoding Element . . . . . . . . . . . . . . 96
8.2.161. ContentEncodingOrder Element . . . . . . . . . . . . 97
8.2.162. ContentEncodingScope Element . . . . . . . . . . . . 97
8.2.163. ContentEncodingType Element . . . . . . . . . . . . 98
8.2.164. ContentCompression Element . . . . . . . . . . . . . 98
8.2.165. ContentCompAlgo Element . . . . . . . . . . . . . . 99
8.2.166. ContentCompSettings Element . . . . . . . . . . . . 99
8.2.167. ContentEncryption Element . . . . . . . . . . . . . 99
8.2.168. ContentEncAlgo Element . . . . . . . . . . . . . . . 100
8.2.169. ContentEncKeyID Element . . . . . . . . . . . . . . 100
8.2.170. ContentSignature Element . . . . . . . . . . . . . . 101
8.2.171. ContentSigKeyID Element . . . . . . . . . . . . . . 101
8.2.172. ContentSigAlgo Element . . . . . . . . . . . . . . . 101
8.2.173. ContentSigHashAlgo Element . . . . . . . . . . . . . 102
8.2.174. Cues Element . . . . . . . . . . . . . . . . . . . . 102
Lhomme, et al. Expires January 26, 2019 [Page 5]
Internet-Draft Matroska July 2018
8.2.175. CuePoint Element . . . . . . . . . . . . . . . . . . 103
8.2.176. CueTime Element . . . . . . . . . . . . . . . . . . 103
8.2.177. CueTrackPositions Element . . . . . . . . . . . . . 103
8.2.178. CueTrack Element . . . . . . . . . . . . . . . . . . 104
8.2.179. CueClusterPosition Element . . . . . . . . . . . . . 104
8.2.180. CueRelativePosition Element . . . . . . . . . . . . 104
8.2.181. CueDuration Element . . . . . . . . . . . . . . . . 105
8.2.182. CueBlockNumber Element . . . . . . . . . . . . . . . 105
8.2.183. CueCodecState Element . . . . . . . . . . . . . . . 106
8.2.184. CueReference Element . . . . . . . . . . . . . . . . 106
8.2.185. CueRefTime Element . . . . . . . . . . . . . . . . . 106
8.2.186. CueRefCluster Element . . . . . . . . . . . . . . . 107
8.2.187. CueRefNumber Element . . . . . . . . . . . . . . . . 107
8.2.188. CueRefCodecState Element . . . . . . . . . . . . . . 108
8.2.189. Attachments Element . . . . . . . . . . . . . . . . 108
8.2.190. AttachedFile Element . . . . . . . . . . . . . . . . 109
8.2.191. FileDescription Element . . . . . . . . . . . . . . 109
8.2.192. FileName Element . . . . . . . . . . . . . . . . . . 109
8.2.193. FileMimeType Element . . . . . . . . . . . . . . . . 110
8.2.194. FileData Element . . . . . . . . . . . . . . . . . . 110
8.2.195. FileUID Element . . . . . . . . . . . . . . . . . . 110
8.2.196. FileReferral Element . . . . . . . . . . . . . . . . 111
8.2.197. FileUsedStartTime Element . . . . . . . . . . . . . 111
8.2.198. FileUsedEndTime Element . . . . . . . . . . . . . . 112
8.2.199. Chapters Element . . . . . . . . . . . . . . . . . . 112
8.2.200. EditionEntry Element . . . . . . . . . . . . . . . . 112
8.2.201. EditionUID Element . . . . . . . . . . . . . . . . . 113
8.2.202. EditionFlagHidden Element . . . . . . . . . . . . . 113
8.2.203. EditionFlagDefault Element . . . . . . . . . . . . . 114
8.2.204. EditionFlagOrdered Element . . . . . . . . . . . . . 114
8.2.205. ChapterAtom Element . . . . . . . . . . . . . . . . 115
8.2.206. ChapterUID Element . . . . . . . . . . . . . . . . . 115
8.2.207. ChapterStringUID Element . . . . . . . . . . . . . . 115
8.2.208. ChapterTimeStart Element . . . . . . . . . . . . . . 116
8.2.209. ChapterTimeEnd Element . . . . . . . . . . . . . . . 116
8.2.210. ChapterFlagHidden Element . . . . . . . . . . . . . 117
8.2.211. ChapterFlagEnabled Element . . . . . . . . . . . . . 117
8.2.212. ChapterSegmentUID Element . . . . . . . . . . . . . 118
8.2.213. ChapterSegmentEditionUID Element . . . . . . . . . . 118
8.2.214. ChapterPhysicalEquiv Element . . . . . . . . . . . . 119
8.2.215. ChapterTrack Element . . . . . . . . . . . . . . . . 119
8.2.216. ChapterTrackNumber Element . . . . . . . . . . . . . 119
8.2.217. ChapterDisplay Element . . . . . . . . . . . . . . . 120
8.2.218. ChapString Element . . . . . . . . . . . . . . . . . 120
8.2.219. ChapLanguage Element . . . . . . . . . . . . . . . . 121
8.2.220. ChapLanguageIETF Element . . . . . . . . . . . . . . 121
8.2.221. ChapCountry Element . . . . . . . . . . . . . . . . 121
8.2.222. ChapProcess Element . . . . . . . . . . . . . . . . 122
Lhomme, et al. Expires January 26, 2019 [Page 6]
Internet-Draft Matroska July 2018
8.2.223. ChapProcessCodecID Element . . . . . . . . . . . . . 122
8.2.224. ChapProcessPrivate Element . . . . . . . . . . . . . 123
8.2.225. ChapProcessCommand Element . . . . . . . . . . . . . 123
8.2.226. ChapProcessTime Element . . . . . . . . . . . . . . 123
8.2.227. ChapProcessData Element . . . . . . . . . . . . . . 124
8.2.228. Tags Element . . . . . . . . . . . . . . . . . . . . 124
8.2.229. Tag Element . . . . . . . . . . . . . . . . . . . . 125
8.2.230. Targets Element . . . . . . . . . . . . . . . . . . 125
8.2.231. TargetTypeValue Element . . . . . . . . . . . . . . 125
8.2.232. TargetType Element . . . . . . . . . . . . . . . . . 126
8.2.233. TagTrackUID Element . . . . . . . . . . . . . . . . 127
8.2.234. TagEditionUID Element . . . . . . . . . . . . . . . 128
8.2.235. TagChapterUID Element . . . . . . . . . . . . . . . 128
8.2.236. TagAttachmentUID Element . . . . . . . . . . . . . . 128
8.2.237. SimpleTag Element . . . . . . . . . . . . . . . . . 129
8.2.238. TagName Element . . . . . . . . . . . . . . . . . . 129
8.2.239. TagLanguage Element . . . . . . . . . . . . . . . . 130
8.2.240. TagLanguageIETF Element . . . . . . . . . . . . . . 130
8.2.241. TagDefault Element . . . . . . . . . . . . . . . . . 130
8.2.242. TagString Element . . . . . . . . . . . . . . . . . 131
8.2.243. TagBinary Element . . . . . . . . . . . . . . . . . 131
9. Matroska Element Ordering . . . . . . . . . . . . . . . . . . 132
9.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 132
9.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 132
9.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 132
9.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 133
9.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 133
9.6. Chapters Element . . . . . . . . . . . . . . . . . . . . 133
9.7. Attachments . . . . . . . . . . . . . . . . . . . . . . . 133
9.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 134
9.9. Optimum layout from a muxer . . . . . . . . . . . . . . . 134
9.10. Optimum layout after editing tags . . . . . . . . . . . . 134
9.11. Optimum layout with Cues at the front . . . . . . . . . . 135
9.12. Cluster Timestamp . . . . . . . . . . . . . . . . . . . . 135
10. Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 135
10.1. Edition and Chapter Flags . . . . . . . . . . . . . . . 135
10.1.1. Chapter Flags . . . . . . . . . . . . . . . . . . . 135
10.1.2. Edition Flags . . . . . . . . . . . . . . . . . . . 136
10.2. Menu features . . . . . . . . . . . . . . . . . . . . . 138
10.2.1. Matroska Script (0) . . . . . . . . . . . . . . . . 138
10.2.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . 138
10.3. Example 1 : basic chaptering . . . . . . . . . . . . . . 140
10.4. Example 2 : nested chapters . . . . . . . . . . . . . . 142
10.4.1. The Micronauts "Bleep To Bleep" . . . . . . . . . . 142
11. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 145
11.1. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 145
12. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
12.1. Recommendations . . . . . . . . . . . . . . . . . . . . 146
Lhomme, et al. Expires January 26, 2019 [Page 7]
Internet-Draft Matroska July 2018
13. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 147
13.1. File Access . . . . . . . . . . . . . . . . . . . . . . 147
13.2. Livestreaming . . . . . . . . . . . . . . . . . . . . . 147
14. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 148
14.1. Requirements . . . . . . . . . . . . . . . . . . . . . . 148
14.1.1. Highlights/Hotspots . . . . . . . . . . . . . . . . 148
14.1.2. Playback features . . . . . . . . . . . . . . . . . 149
14.1.3. Player requirements . . . . . . . . . . . . . . . . 150
14.2. Working Graph . . . . . . . . . . . . . . . . . . . . . 150
15. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 150
16. Default Values . . . . . . . . . . . . . . . . . . . . . . . 150
17. DefaultDecodedFieldDuration . . . . . . . . . . . . . . . . . 151
18. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 151
19. Image cropping . . . . . . . . . . . . . . . . . . . . . . . 152
20. Matroska versioning . . . . . . . . . . . . . . . . . . . . . 152
21. MIME Types . . . . . . . . . . . . . . . . . . . . . . . . . 153
22. Segment Position . . . . . . . . . . . . . . . . . . . . . . 153
22.1. Segment Position Exception . . . . . . . . . . . . . . . 153
22.2. Example of Segment Position . . . . . . . . . . . . . . 153
23. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 154
23.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 154
23.2. Medium Linking . . . . . . . . . . . . . . . . . . . . . 155
23.3. Soft Linking . . . . . . . . . . . . . . . . . . . . . . 155
24. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 156
24.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 156
24.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 156
24.3. Track Operation . . . . . . . . . . . . . . . . . . . . 156
24.4. Overlay Track . . . . . . . . . . . . . . . . . . . . . 157
24.5. Multi-planar and 3D videos . . . . . . . . . . . . . . . 157
25. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . 158
25.1. Timestamp Types . . . . . . . . . . . . . . . . . . . . 158
25.2. Block Timestamps . . . . . . . . . . . . . . . . . . . . 158
25.3. Raw Timestamp . . . . . . . . . . . . . . . . . . . . . 158
25.4. TimestampScale . . . . . . . . . . . . . . . . . . . . . 158
25.5. TimestampScale Rounding . . . . . . . . . . . . . . . . 159
25.6. TrackTimestampScale . . . . . . . . . . . . . . . . . . 161
26.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 163
1. Introduction
Matroska aims to become THE standard of multimedia container formats.
It was derived from a project called MCF [1], but differentiates from
it significantly because it is based on EBML [2] (Extensible Binary
Meta Language), a binary derivative of XML. EBML enables significant
advantages in terms of future format extensibility, without breaking
file support in old parsers.
Lhomme, et al. Expires January 26, 2019 [Page 8]
Internet-Draft Matroska July 2018
First, it is essential to clarify exactly "What an Audio/Video
container is", to avoid any misunderstandings:
o It is NOT a video or audio compression format (codec)
o It is an envelope for which there can be many audio, video and
subtitles streams, allowing the user to store a complete movie or
CD in a single file.
Matroska is designed with the future in mind. It incorporates
features like:
o Fast seeking in the file
o Chapter entries
o Full metadata (tags) support
o Selectable subtitle/audio/video streams
o Modularly expandable
o Error resilience (can recover playback even when the stream is
damaged)
o Streamable over the internet and local networks (HTTP, CIFS, FTP,
etc)
o Menus (like DVDs have)
Matroska is an open standards project. This means for personal use
it is absolutely free to use and that the technical specifications
describing the bitstream are open to everybody, even to companies
that would like to support it in their products.
2. Status of this document
This document is a work-in-progress specification defining the
Matroska file format as part of the IETF Cellar working group [3].
But since it's quite complete it is used as a reference for the
development of libmatroska. Legacy versions of the specification can
be found here [4] (PDF doc by Alexander Noe -- outdated).
For a simplified diagram of the layout of a Matroska file, see the
Diagram page [5].
A more refined and detailed version of the EBML specifications is
being worked on here [6].
Lhomme, et al. Expires January 26, 2019 [Page 9]
Internet-Draft Matroska July 2018
The table found below is now generated from the "source" of the
Matroska specification. This XML file [7] is also used to generate
the semantic data used in libmatroska and libmatroska2. We encourage
anyone to use and monitor its changes so your code is spec-proof and
always up to date.
Note that versions 1, 2 and 3 have been finalized. Version 4 is
currently work in progress. There MAY be further additions to v4.
3. Security Considerations
Matroska inherits security considerations from EBML.
Attacks on a "Matroska Reader" could include:
o Storage of a arbitrary and potentially executable data within an
"Attachment Element". "Matroska Readers" that extract or use data
from Matroska Attachments SHOULD check that the data adheres to
expectations.
o A "Matroska Attachment" with an inaccurate mime-type.
4. IANA Considerations
To be determined.
5. Notation and Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [8].
This document defines specific terms in order to define the format
and application of "Matroska". Specific terms are defined below:
"Matroska": a multimedia container format based on EBML (Extensible
Binary Meta Language)
"Matroska Reader": A "Matroska Reader" is a data parser that
interprets the semantics of a Matroska document and creates a way for
programs to use "Matroska".
"Matroska Player": A "Matroska Player" is a "Matroska Reader" with a
primary purpose of playing audiovisual files, including "Matroska"
documents.
Lhomme, et al. Expires January 26, 2019 [Page 10]
Internet-Draft Matroska July 2018
6. Basis in EBML
Matroska is a Document Type of EBML (Extensible Binary Meta
Language). This specification is dependent on the EBML Specification
[9]. For an understanding of Matroska's EBML Schema, see in
particular the sections of the EBML Specification covering EBML
Element Types [10], EBML Schema [11], and EBML Structure [12].
6.1. Added Constraints on EBML
As an EBML Document Type, Matroska adds the following constraints to
the EBML specification.
o The "docType" of the "EBML Header" MUST be 'matroska'.
o The "EBMLMaxIDLength" of the "EBML Header" MUST be "4".
o The "EBMLMaxSizeLength" of the "EBML Header" MUST be between "1"
and "8" inclusive.
6.2. Matroska Design
All top-levels elements (Segment and direct sub-elements) are coded
on 4 octets, i.e. class D elements.
6.2.1. Language Codes
Matroska from version 1 through 3 uses language codes that can be
either the 3 letters bibliographic ISO-639-2 [13] form (like "fre"
for french), or such a language code followed by a dash and a country
code for specialities in languages (like "fre-ca" for Canadian
French). The "ISO 639-2 Language Elements" are "Language Element",
"TagLanguage Element", and "ChapLanguage Element".
Starting in Matroska version 4, either "ISO 639-2" or BCP 47 [14] MAY
be used, although "BCP 47" is RECOMMENDED. The "BCP 47 Language
Elements" are "LanguageIETF Element", "TagLanguageIETF Element", and
"ChapLanguageIETF Element". If a "BCP 47 Language Element" and an
"ISO 639-2 Language Element" are used within the same "Parent
Element", then the "ISO 639-2 Language Element" MUST be ignored and
precedence given to the "BCP 47 Language Element".
Country codes are the same as used for internet domains [15].
Lhomme, et al. Expires January 26, 2019 [Page 11]
Internet-Draft Matroska July 2018
6.2.2. Physical Types
Each level can have different meanings for audio and video. The
ORIGINAL_MEDIUM tag can be used to specify a string for
ChapterPhysicalEquiv = 60. Here is the list of possible levels for
both audio and video :
+----------------------+--------------+-----------+-----------------+
| ChapterPhysicalEquiv | Audio | Video | Comment |
+----------------------+--------------+-----------+-----------------+
| 70 | SET / | SET / | the collection |
| | PACKAGE | PACKAGE | of different |
| | | | media |
| 60 | CD / 12" / | DVD / VHS | the physical |
| | 10" / 7" / | / | medium like a |
| | TAPE / | LASERDISC | CD or a DVD |
| | MINIDISC / | | |
| | DAT | | |
| 50 | SIDE | SIDE | when the |
| | | | original medium |
| | | | (LP/DVD) has |
| | | | different sides |
| 40 | - | LAYER | another |
| | | | physical level |
| | | | on DVDs |
| 30 | SESSION | SESSION | as found on CDs |
| | | | and DVDs |
| 20 | TRACK | - | as found on |
| | | | audio CDs |
| 10 | INDEX | - | the first |
| | | | logical level |
| | | | of the |
| | | | side/medium |
+----------------------+--------------+-----------+-----------------+
6.2.3. Block Structure
Bit 0 is the most significant bit.
Frames using references SHOULD be stored in "coding order". That
means the references first and then the frames referencing them. A
consequence is that timestamps MAY NOT be consecutive. But a frame
with a past timestamp MUST reference a frame already known, otherwise
it's considered bad/void.
There can be many Blocks in a BlockGroup provided they all have the
same timestamp. It is used with different parts of a frame with
different priorities.
Lhomme, et al. Expires January 26, 2019 [Page 12]
Internet-Draft Matroska July 2018
6.2.3.1. Block Header
+--------+--------+-------------------------------------------------+
| Offset | Player | Description |
+--------+--------+-------------------------------------------------+
| 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML |
| | | like form (1 octet if the value is < 0x80, 2 if |
| | | < 0x4000, etc) (most significant bits set to |
| | | increase the range). |
| 0x01+ | MUST | Timestamp (relative to Cluster timestamp, |
| | | signed int16) |
+--------+--------+-------------------------------------------------+
6.2.3.2. Block Header Flags
+--------+-----+--------+-------------------------------------------+
| Offset | Bit | Player | Description |
+--------+-----+--------+-------------------------------------------+
| 0x03+ | 0-3 | - | Reserved, set to 0 |
| 0x03+ | 4 | - | Invisible, the codec SHOULD decode this |
| | | | frame but not display it |
| 0x03+ | 5-6 | MUST | Lacing |
| | | | * 00 : no lacing |
| | | | * 01 : Xiph lacing |
| | | | * 11 : EBML lacing |
| | | | * 10 : fixed-size lacing |
| 0x03+ | 7 | - | not used |
+--------+-----+--------+-------------------------------------------+
6.2.4. Lacing
Lacing is a mechanism to save space when storing data. It is
typically used for small blocks of data (referred to as frames in
Matroska). There are 3 types of lacing:
1. Xiph, inspired by what is found in the Ogg container
2. EBML, which is the same with sizes coded differently
3. fixed-size, where the size is not coded
For example, a user wants to store 3 frames of the same track. The
first frame is 800 octets long, the second is 500 octets long and the
third is 1000 octets long. As these data are small, they can be
stored in a lace to save space. They will then be stored in the same
block as follows:
Lhomme, et al. Expires January 26, 2019 [Page 13]
Internet-Draft Matroska July 2018
6.2.4.1. Xiph lacing
o Block head (with lacing bits set to 01)
o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and
500 octets one)
o Lacing sizes: only the 2 first ones will be coded, 800 gives
255;255;255;35, 500 gives 255;245. The size of the last frame is
deduced from the total size of the Block.
o Data in frame 1
o Data in frame 2
o Data in frame 3
A frame with a size multiple of 255 is coded with a 0 at the end of
the size, for example 765 is coded 255;255;255;0.
6.2.4.2. EBML lacing
In this case, the size is not coded as blocks of 255 bytes, but as a
difference with the previous size and this size is coded as in EBML.
The first size in the lace is unsigned as in EBML. The others use a
range shifting to get a sign on each value:
+----------------------------------+--------------------------------+
| Bit Representation | Value |
+----------------------------------+--------------------------------+
| 1xxx xxxx | value -(2^6-1) to 2^6-1 (ie 0 |
| | to 2^7-2 minus 2^6-1, half of |
| | the range) |
| 01xx xxxx xxxx xxxx | value -(2^13-1) to 2^13-1 |
| 001x xxxx xxxx xxxx xxxx xxxx | value -(2^20-1) to 2^20-1 |
| 0001 xxxx xxxx xxxx xxxx xxxx | value -(2^27-1) to 2^27-1 |
| xxxx xxxx | |
| 0000 1xxx xxxx xxxx xxxx xxxx | value -(2^34-1) to 2^34-1 |
| xxxx xxxx xxxx xxxx | |
| 0000 01xx xxxx xxxx xxxx xxxx | value -(2^41-1) to 2^41-1 |
| xxxx xxxx xxxx xxxx xxxx xxxx | |
| 0000 001x xxxx xxxx xxxx xxxx | value -(2^48-1) to 2^48-1 |
| xxxx xxxx xxxx xxxx xxxx xxxx | |
| xxxx xxxx | |
+----------------------------------+--------------------------------+
o Block head (with lacing bits set to 11)
Lhomme, et al. Expires January 26, 2019 [Page 14]
Internet-Draft Matroska July 2018
o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and
500 octets one)
o Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320
0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000
= 0x5ED3. The size of the last frame is deduced from the total
size of the Block.
o Data in frame 1
o Data in frame 2
o Data in frame 3
6.2.4.3. Fixed-size lacing
In this case, only the number of frames in the lace is saved, the
size of each frame is deduced from the total size of the Block. For
example, for 3 frames of 800 octets each:
o Block head (with lacing bits set to 10)
o Lacing head: Number of frames in the lace -1, i.e. 2
o Data in frame 1
o Data in frame 2
o Data in frame 3
6.2.4.4. SimpleBlock Structure
The "SimpleBlock" is inspired by the Section 6.2.3. The main
differences are the added Keyframe flag and Discardable flag.
Otherwise everything is the same.
Bit 0 is the most significant bit.
Frames using references SHOULD be stored in "coding order". That
means the references first and then the frames referencing them. A
consequence is that timestamps MAY NOT be consecutive. But a frame
with a past timestamp MUST reference a frame already known, otherwise
it's considered bad/void.
There can be many "Block Elements" in a "BlockGroup" provided they
all have the same timestamp. It is used with different parts of a
frame with different priorities.
Lhomme, et al. Expires January 26, 2019 [Page 15]
Internet-Draft Matroska July 2018
6.2.4.4.1. SimpleBlock Header
+--------+--------+-------------------------------------------------+
| Offset | Player | Description |
+--------+--------+-------------------------------------------------+
| 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML |
| | | like form (1 octet if the value is < 0x80, 2 if |
| | | < 0x4000, etc) (most significant bits set to |
| | | increase the range). |
| 0x01+ | MUST | Timestamp (relative to Cluster timestamp, |
| | | signed int16) |
+--------+--------+-------------------------------------------------+
6.2.4.4.2. SimpleBlock Header Flags
+--------+-----+--------+-------------------------------------------+
| Offset | Bit | Player | Description |
+--------+-----+--------+-------------------------------------------+
| 0x03+ | 0 | - | Keyframe, set when the Block contains |
| | | | only keyframes |
| 0x03+ | 1-3 | - | Reserved, set to 0 |
| 0x03+ | 4 | - | Invisible, the codec SHOULD decode this |
| | | | frame but not display it |
| 0x03+ | 5-6 | MUST | Lacing |
| | | | * 00 : no lacing |
| | | | * 01 : Xiph lacing |
| | | | * 11 : EBML lacing |
| | | | * 10 : fixed-size lacing |
| 0x03+ | 7 | - | Discardable, the frames of the Block can |
| | | | be discarded during playing if needed |
+--------+-----+--------+-------------------------------------------+
6.2.4.5. Laced Data
When lacing bit is set.
+--------+--------+-------------------------------------------------+
| Offset | Player | Description |
+--------+--------+-------------------------------------------------+
| 0x00 | MUST | Number of frames in the lace-1 (uint8) |
| 0x01 / | MUST* | Lace-coded size of each frame of the lace, |
| 0xXX | | except for the last one (multiple uint8). *This |
| | | is not used with Fixed-size lacing as it is |
| | | calculated automatically from (total size of |
| | | lace) / (number of frames in lace). |
+--------+--------+-------------------------------------------------+
For (possibly) Laced Data
Lhomme, et al. Expires January 26, 2019 [Page 16]
Internet-Draft Matroska July 2018
+--------+--------+--------------------------+
| Offset | Player | Description |
+--------+--------+--------------------------+
| 0x00 | MUST | Consecutive laced frames |
+--------+--------+--------------------------+
7. Matroska Structure
A Matroska file MUST be composed of at least one "EBML Document"
using the "Matroska Document Type". Each "EBML Document" MUST start
with an "EBML Header" and MUST be followed by the "EBML Root
Element", defined as "Segment" in Matroska. Matroska defines several
"Top Level Elements" which MAY occur within the "Segment".
As an example, a simple Matroska file consisting of a single "EBML
Document" could be represented like this:
o "EBML Header"
o "Segment"
A more complex Matroska file consisting of an "EBML Stream"
(consisting of two "EBML Documents") could be represented like this:
o "EBML Header"
o "Segment"
o "EBML Header"
o "Segment"
The following diagram represents a simple Matroska file, comprised of
an "EBML Document" with an "EBML Header", a "Segment Element" (the
"Root Element"), and all eight Matroska "Top Level Elements". In the
following diagrams of this section, horizontal spacing expresses a
parent-child relationship between Matroska Elements (e.g. the "Info
Element" is contained within the "Segment Element") whereas vertical
alignment represents the storage order within the file.
Lhomme, et al. Expires January 26, 2019 [Page 17]
Internet-Draft Matroska July 2018
+-------------+
| EBML Header |
+---------------------------+
| Segment | SeekHead |
| |-------------|
| | Info |
| |-------------|
| | Tracks |
| |-------------|
| | Chapters |
| |-------------|
| | Cluster |
| |-------------|
| | Cues |
| |-------------|
| | Attachments |
| |-------------|
| | Tags |
+---------------------------+
The Matroska "EBML Schema" defines eight "Top Level Elements":
"SeekHead", "Info", "Tracks", "Chapters", "Cluster", "Cues",
"Attachments", and "Tags".
The "SeekHead Element" (also known as "MetaSeek") contains an index
of "Top Level Elements" locations within the "Segment". Use of the
"SeekHead Element" is RECOMMENDED. Without a "SeekHead Element", a
Matroska parser would have to search the entire file to find all of
the other "Top Level Elements". This is due to Matroska's flexible
ordering requirements; for instance, it is acceptable for the
"Chapters Element" to be stored after the "Cluster Elements".
+--------------------------------+
| SeekHead | Seek | SeekID |
| | |--------------|
| | | SeekPosition |
+--------------------------------+
Representation of a SeekHead Element.
The "Info Element" contains vital information for identifying the
whole "Segment". This includes the title for the "Segment", a
randomly generated unique identifier, and the unique identifier(s) of
any linked "Segment Elements".
Lhomme, et al. Expires January 26, 2019 [Page 18]
Internet-Draft Matroska July 2018
+-------------------------+
| Info | SegmentUID |
| |------------------|
| | SegmentFilename |
| |------------------|
| | PrevUID |
| |------------------|
| | PrevFilename |
| |------------------|
| | NextUID |
| |------------------|
| | NextFilename |
| |------------------|
| | SegmentFamily |
| |------------------|
| | ChapterTranslate |
| |------------------|
| | TimestampScale |
| |------------------|
| | Duration |
| |------------------|
| | DateUTC |
| |------------------|
| | Title |
| |------------------|
| | MuxingApp |
| |------------------|
| | WritingApp |
|-------------------------|
Representation of an Info Element and its Child Elements.
The "Tracks Element" defines the technical details for each track and
can store the name, number, unique identifier, language and type
(audio, video, subtitles, etc.) of each track. For example, the
"Tracks Element" MAY store information about the resolution of a
video track or sample rate of an audio track.
The "Tracks Element" MUST identify all the data needed by the codec
to decode the data of the specified track. However, the data
required is contingent on the codec used for the track. For example,
a "Track Element" for uncompressed audio only requires the audio bit
rate to be present. A codec such as AC-3 would require that the
"CodecID Element" be present for all tracks, as it is the primary way
to identify which codec to use to decode the track.
Lhomme, et al. Expires January 26, 2019 [Page 19]
Internet-Draft Matroska July 2018
+------------------------------------+
| Tracks | TrackEntry | TrackNumber |
| | |--------------|
| | | TrackUID |
| | |--------------|
| | | TrackType |
| | |--------------|
| | | Name |
| | |--------------|
| | | Language |
| | |--------------|
| | | CodecID |
| | |--------------|
| | | CodecPrivate |
| | |--------------|
| | | CodecName |
| | |----------------------------------+
| | | Video | FlagInterlaced |
| | | |-------------------|
| | | | FieldOrder |
| | | |-------------------|
| | | | StereoMode |
| | | |-------------------|
| | | | AlphaMode |
| | | |-------------------|
| | | | PixelWidth |
| | | |-------------------|
| | | | PixelHeight |
| | | |-------------------|
| | | | DisplayWidth |
| | | |-------------------|
| | | | DisplayHeight |
| | | |-------------------|
| | | | AspectRatioType |
| | | |-------------------|
| | | | Color |
| | |----------------------------------|
| | | Audio | SamplingFrequency |
| | | |-------------------|
| | | | Channels |
| | | |-------------------|
| | | | BitDepth |
|--------------------------------------------------------|
Representation of the Tracks Element and a selection of its
Descendant Elements.
Lhomme, et al. Expires January 26, 2019 [Page 20]
Internet-Draft Matroska July 2018
The "Chapters Element" lists all of the chapters. Chapters are a way
to set predefined points to jump to in video or audio.
+-----------------------------------------+
| Chapters | Edition | EditionUID |
| | Entry |--------------------|
| | | EditionFlagHidden |
| | |--------------------|
| | | EditionFlagDefault |
| | |--------------------|
| | | EditionFlagOrdered |
| | |--------------------------------+
| | | ChapterAtom | ChapterUID |
| | | |------------------|
| | | | ChapterStringUID |
| | | |------------------|
| | | | ChapterTimeStart |
| | | |------------------|
| | | | ChapterTimeEnd |
| | | |------------------|
| | | | ChapterFlagHidden |
| | | |---------------------------------+
| | | | ChapterDisplay | ChapString |
| | | | |--------------|
| | | | | ChapLanguage |
+--------------------------------------------------------------------+
Representation of the Chapters Element and a selection of its
Descendant Elements.
"Cluster Elements" contain the content for each track, e.g. video
frames. A Matroska file SHOULD contain at least one "Cluster
Element". The "Cluster Element" helps to break up "SimpleBlock" or
"BlockGroup Elements" and helps with seeking and error protection.
It is RECOMMENDED that the size of each individual "Cluster Element"
be limited to store no more than 5 seconds or 5 megabytes. Every
"Cluster Element" MUST contain a "Timestamp Element". This SHOULD be
the "Timestamp Element" used to play the first "Block" in the
"Cluster Element". There SHOULD be one or more "BlockGroup" or
"SimpleBlock Element" in each "Cluster Element". A "BlockGroup
Element" MAY contain a "Block" of data and any information relating
directly to that "Block".
Lhomme, et al. Expires January 26, 2019 [Page 21]
Internet-Draft Matroska July 2018
+--------------------------+
| Cluster | Timestamp |
| |----------------|
| | SilentTracks |
| |----------------|
| | Position |
| |----------------|
| | PrevSize |
| |----------------|
| | SimpleBlock |
| |----------------|
| | BlockGroup |
| |----------------|
| | EncryptedBlock |
+--------------------------+
Representation of a Cluster Element and its immediate Child Elements.
+----------------------------------+
| Block | Portion of | Data Type |
| | a Block | - Bit Flag |
| |--------------------------+
| | Header | TrackNumber |
| | |-------------|
| | | Timestamp |
| | |-------------|
| | | Flags |
| | | - Gap |
| | | - Lacing |
| | | - Reserved |
| |--------------------------|
| | Optional | FrameSize |
| |--------------------------|
| | Data | Frame |
+----------------------------------+
Representation of the Block Element structure.
Each "Cluster" MUST contain exactly one "Timestamp Element". The
"Timestamp Element" value MUST be stored once per "Cluster". The
"Timestamp Element" in the "Cluster" is relative to the entire
"Segment". The "Timestamp Element" SHOULD be the first "Element" in
the "Cluster".
Additionally, the "Block" contains an offset that, when added to the
"Cluster"'s "Timestamp Element" value, yields the "Block"'s effective
timestamp. Therefore, timestamp in the "Block" itself is relative to
the "Timestamp Element" in the "Cluster". For example, if the
Lhomme, et al. Expires January 26, 2019 [Page 22]
Internet-Draft Matroska July 2018
"Timestamp Element" in the "Cluster" is set to 10 seconds and a
"Block" in that "Cluster" is supposed to be played 12 seconds into
the clip, the timestamp in the "Block" would be set to 2 seconds.
The "ReferenceBlock" in the "BlockGroup" is used instead of the basic
"P-frame"/"B-frame" description. Instead of simply saying that this
"Block" depends on the "Block" directly before, or directly
afterwards, the "Timestamp" of the necessary "Block" is used.
Because there can be as many "ReferenceBlock Elements" as necessary
for a "Block", it allows for some extremely complex referencing.
The "Cues Element" is used to seek when playing back a file by
providing a temporal index for some of the "Tracks". It is similar
to the "SeekHead Element", but used for seeking to a specific time
when playing back the file. It is possible to seek without this
element, but it is much more difficult because a "Matroska Reader"
would have to 'hunt and peck' through the file looking for the
correct timestamp.
The "Cues Element" SHOULD contain at least one "CuePoint Element".
Each "CuePoint Element" stores the position of the "Cluster" that
contains the "BlockGroup" or "SimpleBlock Element". The timestamp is
stored in the "CueTime Element" and location is stored in the
"CueTrackPositions Element".
The "Cues Element" is flexible. For instance, "Cues Element" can be
used to index every single timestamp of every "Block" or they can be
indexed selectively. For video files, it is RECOMMENDED to index at
least the keyframes of the video track.
+-------------------------------------+
| Cues | CuePoint | CueTime |
| | |-------------------|
| | | CueTrackPositions |
| |------------------------------|
| | CuePoint | CueTime |
| | |-------------------|
| | | CueTrackPositions |
+-------------------------------------+
Representation of a Cues Element and two levels of its Descendant
Elements.
The "Attachments Element" is for attaching files to a Matroska file
such as pictures, webpages, programs, or even the codec needed to
play back the file.
Lhomme, et al. Expires January 26, 2019 [Page 23]
Internet-Draft Matroska July 2018
+------------------------------------------------+
| Attachments | AttachedFile | FileDescription |
| | |-------------------|
| | | FileName |
| | |-------------------|
| | | FileMimeType |
| | |-------------------|
| | | FileData |
| | |-------------------|
| | | FileUID |
| | |-------------------|
| | | FileName |
| | |-------------------|
| | | FileReferral |
| | |-------------------|
| | | FileUsedStartTime |
| | |-------------------|
| | | FileUsedEndTime |
+------------------------------------------------+
Representation of a Attachments Element.
The "Tags Element" contains metadata that describes the "Segment" and
potentially its "Tracks", "Chapters", and "Attachments". Each
"Track" or "Chapter" that those tags applies to has its UID listed in
the "Tags". The "Tags" contain all extra information about the file:
scriptwriter, singer, actors, directors, titles, edition, price,
dates, genre, comments, etc. Tags can contain their values in
multiple languages. For example, a movie's "title" "Tag" might
contain both the original English title as well as the title it was
released as in Germany.
Lhomme, et al. Expires January 26, 2019 [Page 24]
Internet-Draft Matroska July 2018
+-------------------------------------------+
| Tags | Tag | Targets | TargetTypeValue |
| | | |------------------|
| | | | TargetType |
| | | |------------------|
| | | | TagTrackUID |
| | | |------------------|
| | | | TagEditionUID |
| | | |------------------|
| | | | TagChapterUID |
| | | |------------------|
| | | | TagAttachmentUID |
| | |------------------------------|
| | | SimpleTag | TagName |
| | | |------------------|
| | | | TagLanguage |
| | | |------------------|
| | | | TagDefault |
| | | |------------------|
| | | | TagString |
| | | |------------------|
| | | | TagBinary |
| | | |------------------|
| | | | SimpleTag |
+-------------------------------------------+
Representation of a Tags Element and three levels of its Children
Elements.
8. Matroska Schema
This specification includes an "EBML Schema" which defines the
Elements and structure of Matroska as an EBML Document Type. The
EBML Schema defines every valid Matroska element in a manner defined
by the EBML specification.
8.1. Matroska Additions to Schema Element Attributes
In addition to the EBML Schema definition provided by the EBML
Specification, Matroska adds the following additional attributes:
Lhomme, et al. Expires January 26, 2019 [Page 25]
Internet-Draft Matroska July 2018
+-----------+----------+--------------------------------------------+
| attribute | required | definition |
| name | | |
+-----------+----------+--------------------------------------------+
| webm | No | A boolean to express if the Matroska |
| | | Element is also supported within version 2 |
| | | of the "webm" specification. Please |
| | | consider the webm specification [16] as |
| | | the authoritative on "webm". |
+-----------+----------+--------------------------------------------+
8.2. Matroska Schema Element Definitions
Here the definition of each Matroska Element is provided.
% concatenate with Matroska EBML Schema converted to markdown %
8.2.1. EBMLMaxIDLength Element
name: "EBMLMaxIDLength"
path: "1*1(\EBML\EBMLMaxIDLength)"
id: "0x42F2"
minOccurs: "1"
maxOccurs: "1"
range: "4"
default: "4"
type: "uinteger"
8.2.2. EBMLMaxSizeLength Element
name: "EBMLMaxSizeLength"
path: "1*1(\EBML\EBMLMaxSizeLength)"
id: "0x42F3"
minOccurs: "1"
maxOccurs: "1"
range: "1-8"
Lhomme, et al. Expires January 26, 2019 [Page 26]
Internet-Draft Matroska July 2018
default: "8"
type: "uinteger"
8.2.3. Segment Element
name: "Segment"
path: "1*1(\Segment)"
id: "0x18538067"
minOccurs: "1"
maxOccurs: "1"
type: "master"
unknownsizeallowed: "1"
minver: "1"
documentation: The Root Element that contains all other Top-Level
Elements (Elements defined only at Level 1). A Matroska file is
composed of 1 Segment.
8.2.4. SeekHead Element
name: "SeekHead"
path: "0*2(\Segment\SeekHead)"
id: "0x114D9B74"
maxOccurs: "2"
type: "master"
minver: "1"
documentation: Contains the Segment Position of other Top-Level
Elements.
8.2.5. Seek Element
name: "Seek"
path: "1*(\Segment\SeekHead\Seek)"
Lhomme, et al. Expires January 26, 2019 [Page 27]
Internet-Draft Matroska July 2018
id: "0x4DBB"
minOccurs: "1"
type: "master"
minver: "1"
documentation: Contains a single seek entry to an EBML Element.
8.2.6. SeekID Element
name: "SeekID"
path: "1*1(\Segment\SeekHead\Seek\SeekID)"
id: "0x53AB"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: The binary ID corresponding to the Element name.
8.2.7. SeekPosition Element
name: "SeekPosition"
path: "1*1(\Segment\SeekHead\Seek\SeekPosition)"
id: "0x53AC"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: The Segment Position of the Element.
Lhomme, et al. Expires January 26, 2019 [Page 28]
Internet-Draft Matroska July 2018
8.2.8. Info Element
name: "Info"
path: "1*(\Segment\Info)"
id: "0x1549A966"
minOccurs: "1"
type: "master"
minver: "1"
definition: Contains general information about the Segment.
8.2.9. SegmentUID Element
name: "SegmentUID"
path: "0*1(\Segment\Info\SegmentUID)"
id: "0x73A4"
maxOccurs: "1"
range: "not 0"
size: "16"
type: "binary"
minver: "1"
definition: A randomly generated unique ID to identify the Segment
amongst many others (128 bits).
usage notes: If the Segment is a part of a Linked Segment then this
Element is REQUIRED.
8.2.10. SegmentFilename Element
name: "SegmentFilename"
path: "0*1(\Segment\Info\SegmentFilename)"
id: "0x7384"
Lhomme, et al. Expires January 26, 2019 [Page 29]
Internet-Draft Matroska July 2018
maxOccurs: "1"
type: "utf-8"
minver: "1"
definition: A filename corresponding to this Segment.
8.2.11. PrevUID Element
name: "PrevUID"
path: "0*1(\Segment\Info\PrevUID)"
id: "0x3CB923"
maxOccurs: "1"
size: "16"
type: "binary"
minver: "1"
definition: A unique ID to identify the previous Segment of a Linked
Segment (128 bits).
usage notes: If the Segment is a part of a Linked Segment that uses
Hard Linking then either the PrevUID or the NextUID Element is
REQUIRED. If a Segment contains a PrevUID but not a NextUID then it
MAY be considered as the last Segment of the Linked Segment. The
PrevUID MUST NOT be equal to the SegmentUID.
8.2.12. PrevFilename Element
name: "PrevFilename"
path: "0*1(\Segment\Info\PrevFilename)"
id: "0x3C83AB"
maxOccurs: "1"
type: "utf-8"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 30]
Internet-Draft Matroska July 2018
definition: A filename corresponding to the file of the previous
Linked Segment.
usage notes: Provision of the previous filename is for display
convenience, but PrevUID SHOULD be considered authoritative for
identifying the previous Segment in a Linked Segment.
8.2.13. NextUID Element
name: "NextUID"
path: "0*1(\Segment\Info\NextUID)"
id: "0x3EB923"
maxOccurs: "1"
size: "16"
type: "binary"
minver: "1"
definition: A unique ID to identify the next Segment of a Linked
Segment (128 bits).
usage notes: If the Segment is a part of a Linked Segment that uses
Hard Linking then either the PrevUID or the NextUID Element is
REQUIRED. If a Segment contains a NextUID but not a PrevUID then it
MAY be considered as the first Segment of the Linked Segment. The
NextUID MUST NOT be equal to the SegmentUID.
8.2.14. NextFilename Element
name: "NextFilename"
path: "0*1(\Segment\Info\NextFilename)"
id: "0x3E83BB"
maxOccurs: "1"
type: "utf-8"
minver: "1"
definition: A filename corresponding to the file of the next Linked
Segment.
Lhomme, et al. Expires January 26, 2019 [Page 31]
Internet-Draft Matroska July 2018
usage notes: Provision of the next filename is for display
convenience, but NextUID SHOULD be considered authoritative for
identifying the Next Segment.
8.2.15. SegmentFamily Element
name: "SegmentFamily"
path: "0*(\Segment\Info\SegmentFamily)"
id: "0x4444"
size: "16"
type: "binary"
minver: "1"
definition: A randomly generated unique ID that all Segments of a
Linked Segment MUST share (128 bits).
usage notes: If the Segment is a part of a Linked Segment that uses
Soft Linking then this Element is REQUIRED.
8.2.16. ChapterTranslate Element
name: "ChapterTranslate"
path: "0*(\Segment\Info\ChapterTranslate)"
id: "0x6924"
type: "master"
minver: "1"
documentation: A tuple of corresponding ID used by chapter codecs to
represent this Segment.
8.2.17. ChapterTranslateEditionUID Element
name: "ChapterTranslateEditionUID"
path: "0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)"
id: "0x69FC"
type: "uinteger"
Lhomme, et al. Expires January 26, 2019 [Page 32]
Internet-Draft Matroska July 2018
minver: "1"
documentation: Specify an edition UID on which this correspondance
applies. When not specified, it means for all editions found in the
Segment.
8.2.18. ChapterTranslateCodec Element
name: "ChapterTranslateCodec"
path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)"
id: "0x69BF"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: The chapter codec
restrictions:
+-------+-----------------+
| value | label |
+-------+-----------------+
| "0" | Matroska Script |
| "1" | DVD-menu |
+-------+-----------------+
8.2.19. ChapterTranslateID Element
name: "ChapterTranslateID"
path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)"
id: "0x69A5"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 33]
Internet-Draft Matroska July 2018
documentation: The binary value used to represent this Segment in the
chapter codec data. The format depends on the ChapProcessCodecID
used.
8.2.20. TimestampScale Element
name: "TimestampScale"
path: "1*1(\Segment\Info\TimestampScale)"
id: "0x2AD7B1"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
default: "1000000"
type: "uinteger"
minver: "1"
documentation: Timestamp scale in nanoseconds (1.000.000 means all
timestamps in the Segment are expressed in milliseconds).
8.2.21. Duration Element
name: "Duration"
path: "0*1(\Segment\Info\Duration)"
id: "0x4489"
maxOccurs: "1"
range: "> 0x0p+0"
type: "float"
minver: "1"
definition: Duration of the Segment in nanoseconds based on
TimestampScale.
Lhomme, et al. Expires January 26, 2019 [Page 34]
Internet-Draft Matroska July 2018
8.2.22. DateUTC Element
name: "DateUTC"
path: "0*1(\Segment\Info\DateUTC)"
id: "0x4461"
maxOccurs: "1"
type: "date"
minver: "1"
documentation: The date and time that the Segment was created by the
muxing application or library.
8.2.23. Title Element
name: "Title"
path: "0*1(\Segment\Info\Title)"
id: "0x7BA9"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: General name of the Segment.
8.2.24. MuxingApp Element
name: "MuxingApp"
path: "1*1(\Segment\Info\MuxingApp)"
id: "0x4D80"
minOccurs: "1"
maxOccurs: "1"
type: "utf-8"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 35]
Internet-Draft Matroska July 2018
definition: Muxing application or library (example: "libmatroska-
0.4.3").
usage notes: Include the full name of the application or library
followed by the version number.
8.2.25. WritingApp Element
name: "WritingApp"
path: "1*1(\Segment\Info\WritingApp)"
id: "0x5741"
minOccurs: "1"
maxOccurs: "1"
type: "utf-8"
minver: "1"
definition: Writing application (example: "mkvmerge-0.3.3").
usage notes: Include the full name of the application followed by the
version number.
8.2.26. Cluster Element
name: "Cluster"
path: "0*(\Segment\Cluster)"
id: "0x1F43B675"
type: "master"
unknownsizeallowed: "1"
minver: "1"
documentation: The Top-Level Element containing the (monolithic)
Block structure.
Lhomme, et al. Expires January 26, 2019 [Page 36]
Internet-Draft Matroska July 2018
8.2.27. Timestamp Element
name: "Timestamp"
path: "1*1(\Segment\Cluster\Timestamp)"
id: "0xE7"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Absolute timestamp of the cluster (based on
TimestampScale).
8.2.28. SilentTracks Element
name: "SilentTracks"
path: "0*1(\Segment\Cluster\SilentTracks)"
id: "0x5854"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: The list of tracks that are not used in that part of
the stream. It is useful when using overlay tracks on seeking or to
decide what track to use.
8.2.29. SilentTrackNumber Element
name: "SilentTrackNumber"
path: "0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)"
id: "0x58D7"
type: "uinteger"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 37]
Internet-Draft Matroska July 2018
documentation: 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.
8.2.30. Position Element
name: "Position"
path: "0*1(\Segment\Cluster\Position)"
id: "0xA7"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: The Segment Position of the Cluster in the Segment (0
in live broadcast streams). It might help to resynchronise offset on
damaged streams.
8.2.31. PrevSize Element
name: "PrevSize"
path: "0*1(\Segment\Cluster\PrevSize)"
id: "0xAB"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Size of the previous Cluster, in octets. Can be
useful for backward playing.
8.2.32. SimpleBlock Element
name: "SimpleBlock"
path: "0*(\Segment\Cluster\SimpleBlock)"
id: "0xA3"
type: "binary"
Lhomme, et al. Expires January 26, 2019 [Page 38]
Internet-Draft Matroska July 2018
minver: "2"
documentation: Similar to Block but without all the extra
information, mostly used to reduced overhead when no extra feature is
needed. (see SimpleBlock Structure)
8.2.33. BlockGroup Element
name: "BlockGroup"
path: "0*(\Segment\Cluster\BlockGroup)"
id: "0xA0"
type: "master"
minver: "1"
documentation: Basic container of information containing a single
Block and information specific to that Block.
8.2.34. Block Element
name: "Block"
path: "1*1(\Segment\Cluster\BlockGroup\Block)"
id: "0xA1"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: Block containing the actual data to be rendered and a
timestamp relative to the Cluster Timestamp. (see Block Structure)
8.2.35. BlockVirtual Element
name: "BlockVirtual"
path: "0*1(\Segment\Cluster\BlockGroup\BlockVirtual)"
id: "0xA2"
Lhomme, et al. Expires January 26, 2019 [Page 39]
Internet-Draft Matroska July 2018
maxOccurs: "1"
type: "binary"
minver: "0"
maxver: "0"
documentation: A Block with no data. It MUST be stored in the stream
at the place the real Block would be in display order. (see Block
Virtual)
8.2.36. BlockAdditions Element
name: "BlockAdditions"
path: "0*1(\Segment\Cluster\BlockGroup\BlockAdditions)"
id: "0x75A1"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: 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.
8.2.37. BlockMore Element
name: "BlockMore"
path: "1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)"
id: "0xA6"
minOccurs: "1"
type: "master"
minver: "1"
documentation: Contain the BlockAdditional and some parameters.
Lhomme, et al. Expires January 26, 2019 [Page 40]
Internet-Draft Matroska July 2018
8.2.38. BlockAddID Element
name: "BlockAddID"
path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block
AddID)"
id: "0xEE"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
default: "1"
type: "uinteger"
minver: "1"
documentation: An ID to identify the BlockAdditional level.
8.2.39. BlockAdditional Element
name: "BlockAdditional"
path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block
Additional)"
id: "0xA5"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: Interpreted by the codec as it wishes (using the
BlockAddID).
8.2.40. BlockDuration Element
name: "BlockDuration"
path: "0*1(\Segment\Cluster\BlockGroup\BlockDuration)"
Lhomme, et al. Expires January 26, 2019 [Page 41]
Internet-Draft Matroska July 2018
id: "0x9B"
maxOccurs: "1"
default: "DefaultDuration"
type: "uinteger"
minver: "1"
documentation: The duration of the Block (based on TimestampScale).
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 timestamp of this Block and the timestamp 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.
8.2.41. ReferencePriority Element
name: "ReferencePriority"
path: "1*1(\Segment\Cluster\BlockGroup\ReferencePriority)"
id: "0xFA"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.42. ReferenceBlock Element
name: "ReferenceBlock"
path: "0*(\Segment\Cluster\BlockGroup\ReferenceBlock)"
id: "0xFB"
Lhomme, et al. Expires January 26, 2019 [Page 42]
Internet-Draft Matroska July 2018
type: "integer"
minver: "1"
documentation: Timestamp of another frame used as a reference (ie: B
or P frame). The timestamp is relative to the block it's attached
to.
8.2.43. ReferenceVirtual Element
name: "ReferenceVirtual"
path: "0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)"
id: "0xFD"
maxOccurs: "1"
type: "integer"
minver: "0"
maxver: "0"
documentation: The Segment Position of the data that would otherwise
be in position of the virtual block.
8.2.44. CodecState Element
name: "CodecState"
path: "0*1(\Segment\Cluster\BlockGroup\CodecState)"
id: "0xA4"
maxOccurs: "1"
type: "binary"
minver: "2"
documentation: The new codec state to use. Data interpretation is
private to the codec. This information SHOULD always be referenced
by a seek entry.
Lhomme, et al. Expires January 26, 2019 [Page 43]
Internet-Draft Matroska July 2018
8.2.45. DiscardPadding Element
name: "DiscardPadding"
path: "0*1(\Segment\Cluster\BlockGroup\DiscardPadding)"
id: "0x75A2"
maxOccurs: "1"
type: "integer"
minver: "4"
documentation: Duration in nanoseconds of the silent data added to
the Block (padding at the end of the Block for positive value, at the
beginning of the Block for negative value). The duration of
DiscardPadding is not calculated in the duration of the TrackEntry
and SHOULD be discarded during playback.
8.2.46. Slices Element
name: "Slices"
path: "0*1(\Segment\Cluster\BlockGroup\Slices)"
id: "0x8E"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Contains slices description.
8.2.47. TimeSlice Element
name: "TimeSlice"
path: "0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)"
id: "0xE8"
type: "master"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 44]
Internet-Draft Matroska July 2018
maxver: "1"
documentation: Contains extra time information about the data
contained in the Block. Being able to interpret this Element is not
REQUIRED for playback.
8.2.48. LaceNumber Element
name: "LaceNumber"
path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)"
id: "0xCC"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
maxver: "1"
documentation: The reverse number of the frame in the lace (0 is the
last frame, 1 is the next to last, etc). Being able to interpret
this Element is not REQUIRED for playback.
8.2.49. FrameNumber Element
name: "FrameNumber"
path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)"
id: "0xCD"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
Lhomme, et al. Expires January 26, 2019 [Page 45]
Internet-Draft Matroska July 2018
documentation: The number of the frame to generate from this lace
with this delay (allow you to generate many frames from the same
Block/Frame).
8.2.50. BlockAdditionID Element
name: "BlockAdditionID"
path:
"0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)"
id: "0xCB"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: The ID of the BlockAdditional Element (0 is the main
Block).
8.2.51. Delay Element
name: "Delay"
path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)"
id: "0xCE"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: The (scaled) delay to apply to the Element.
Lhomme, et al. Expires January 26, 2019 [Page 46]
Internet-Draft Matroska July 2018
8.2.52. SliceDuration Element
name: "SliceDuration"
path:
"0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)"
id: "0xCF"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: The (scaled) duration to apply to the Element.
8.2.53. ReferenceFrame Element
name: "ReferenceFrame"
path: "0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)"
id: "0xC8"
maxOccurs: "1"
type: "master"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.54. ReferenceOffset Element
name: "ReferenceOffset"
path:
"1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)"
id: "0xC9"
Lhomme, et al. Expires January 26, 2019 [Page 47]
Internet-Draft Matroska July 2018
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.55. ReferenceTimestamp Element
name: "ReferenceTimestamp"
path:
"1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimestamp)"
id: "0xCA"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.56. EncryptedBlock Element
name: "EncryptedBlock"
path: "0*(\Segment\Cluster\EncryptedBlock)"
id: "0xAF"
type: "binary"
minver: "0"
maxver: "0"
Lhomme, et al. Expires January 26, 2019 [Page 48]
Internet-Draft Matroska July 2018
documentation: Similar to SimpleBlock but the data inside the Block
are Transformed (encrypt and/or signed). (see EncryptedBlock
Structure)
8.2.57. Tracks Element
name: "Tracks"
path: "0*(\Segment\Tracks)"
id: "0x1654AE6B"
type: "master"
minver: "1"
documentation: A Top-Level Element of information with many tracks
described.
8.2.58. TrackEntry Element
name: "TrackEntry"
path: "1*(\Segment\Tracks\TrackEntry)"
id: "0xAE"
minOccurs: "1"
type: "master"
minver: "1"
documentation: Describes a track with all Elements.
8.2.59. TrackNumber Element
name: "TrackNumber"
path: "1*1(\Segment\Tracks\TrackEntry\TrackNumber)"
id: "0xD7"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
Lhomme, et al. Expires January 26, 2019 [Page 49]
Internet-Draft Matroska July 2018
type: "uinteger"
minver: "1"
documentation: The track number as used in the Block Header (using
more than 127 tracks is not encouraged, though the design allows an
unlimited number).
8.2.60. TrackUID Element
name: "TrackUID"
path: "1*1(\Segment\Tracks\TrackEntry\TrackUID)"
id: "0x73C5"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.61. TrackType Element
name: "TrackType"
path: "1*1(\Segment\Tracks\TrackEntry\TrackType)"
id: "0x83"
minOccurs: "1"
maxOccurs: "1"
range: "1-254"
type: "uinteger"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 50]
Internet-Draft Matroska July 2018
documentation: A set of track types coded on 8 bits.
restrictions:
+-------+----------+
| value | label |
+-------+----------+
| "1" | video |
| "2" | audio |
| "3" | complex |
| "16" | logo |
| "17" | subtitle |
| "18" | buttons |
| "32" | control |
+-------+----------+
8.2.62. FlagEnabled Element
name: "FlagEnabled"
path: "1*1(\Segment\Tracks\TrackEntry\FlagEnabled)"
id: "0xB9"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "2"
documentation: Set if the track is usable. (1 bit)
8.2.63. FlagDefault Element
name: "FlagDefault"
path: "1*1(\Segment\Tracks\TrackEntry\FlagDefault)"
id: "0x88"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 51]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "1"
documentation: Set if that track (audio, video or subs) SHOULD be
active if no language found matches the user preference. (1 bit)
8.2.64. FlagForced Element
name: "FlagForced"
path: "1*1(\Segment\Tracks\TrackEntry\FlagForced)"
id: "0x55AA"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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)
8.2.65. FlagLacing Element
name: "FlagLacing"
path: "1*1(\Segment\Tracks\TrackEntry\FlagLacing)"
id: "0x9C"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 52]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "1"
documentation: Set if the track MAY contain blocks using lacing. (1
bit)
8.2.66. MinCache Element
name: "MinCache"
path: "1*1(\Segment\Tracks\TrackEntry\MinCache)"
id: "0x6DE7"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.67. MaxCache Element
name: "MaxCache"
path: "0*1(\Segment\Tracks\TrackEntry\MaxCache)"
id: "0x6DF8"
maxOccurs: "1"
type: "uinteger"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 53]
Internet-Draft Matroska July 2018
documentation: The maximum cache size necessary to store referenced
frames in and the current frame. 0 means no cache is needed.
8.2.68. DefaultDuration Element
name: "DefaultDuration"
path: "0*1(\Segment\Tracks\TrackEntry\DefaultDuration)"
id: "0x23E383"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: Number of nanoseconds (not scaled via TimestampScale)
per frame ('frame' in the Matroska sense -- one Element put into a
(Simple)Block).
8.2.69. DefaultDecodedFieldDuration Element
name: "DefaultDecodedFieldDuration"
path: "0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)"
id: "0x234E7A"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "4"
documentation: The period in nanoseconds (not scaled by
TimestampScale) between two successive fields at the output of the
decoding process (see the notes)
8.2.70. TrackTimestampScale Element
name: "TrackTimestampScale"
path: "1*1(\Segment\Tracks\TrackEntry\TrackTimestampScale)"
Lhomme, et al. Expires January 26, 2019 [Page 54]
Internet-Draft Matroska July 2018
id: "0x23314F"
minOccurs: "1"
maxOccurs: "1"
range: "> 0x0p+0"
default: "0x1p+0"
type: "float"
minver: "1"
maxver: "3"
documentation: 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).
8.2.71. TrackOffset Element
name: "TrackOffset"
path: "0*1(\Segment\Tracks\TrackEntry\TrackOffset)"
id: "0x537F"
maxOccurs: "1"
default: "0"
type: "integer"
minver: "0"
maxver: "0"
documentation: A value to add to the Block's Timestamp. This can be
used to adjust the playback offset of a track.
8.2.72. MaxBlockAdditionID Element
name: "MaxBlockAdditionID"
path: "1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)"
id: "0x55EE"
Lhomme, et al. Expires January 26, 2019 [Page 55]
Internet-Draft Matroska July 2018
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The maximum value of BlockAddID. A value 0 means
there is no BlockAdditions for this track.
8.2.73. Name Element
name: "Name"
path: "0*1(\Segment\Tracks\TrackEntry\Name)"
id: "0x536E"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: A human-readable track name.
8.2.74. Language Element
name: "Language"
path: "0*1(\Segment\Tracks\TrackEntry\Language)"
id: "0x22B59C"
maxOccurs: "1"
default: "eng"
type: "string"
minver: "1"
documentation: Specifies the language of the track in the Matroska
languages form. This Element MUST be ignored if the LanguageIETF
Element is used in the same TrackEntry.
Lhomme, et al. Expires January 26, 2019 [Page 56]
Internet-Draft Matroska July 2018
8.2.75. LanguageIETF Element
name: "LanguageIETF"
path: "0*1(\Segment\Tracks\TrackEntry\LanguageIETF)"
id: "0x22B59D"
maxOccurs: "1"
type: "string"
minver: "4"
documentation: Specifies the language of the track according to BCP
47 and using the IANA Language Subtag Registry. If this Element is
used, then any Language Elements used in the same TrackEntry MUST be
ignored.
8.2.76. CodecID Element
name: "CodecID"
path: "1*1(\Segment\Tracks\TrackEntry\CodecID)"
id: "0x86"
minOccurs: "1"
maxOccurs: "1"
type: "string"
minver: "1"
documentation: An ID corresponding to the codec, see the codec page
for more info.
8.2.77. CodecPrivate Element
name: "CodecPrivate"
path: "0*1(\Segment\Tracks\TrackEntry\CodecPrivate)"
id: "0x63A2"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 57]
Internet-Draft Matroska July 2018
type: "binary"
minver: "1"
documentation: Private data only known to the codec.
8.2.78. CodecName Element
name: "CodecName"
path: "0*1(\Segment\Tracks\TrackEntry\CodecName)"
id: "0x258688"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: A human-readable string specifying the codec.
8.2.79. AttachmentLink Element
name: "AttachmentLink"
path: "0*1(\Segment\Tracks\TrackEntry\AttachmentLink)"
id: "0x7446"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
maxver: "3"
documentation: The UID of an attachment that is used by this codec.
8.2.80. CodecSettings Element
name: "CodecSettings"
path: "0*1(\Segment\Tracks\TrackEntry\CodecSettings)"
Lhomme, et al. Expires January 26, 2019 [Page 58]
Internet-Draft Matroska July 2018
id: "0x3A9697"
maxOccurs: "1"
type: "utf-8"
minver: "0"
maxver: "0"
documentation: A string describing the encoding setting used.
8.2.81. CodecInfoURL Element
name: "CodecInfoURL"
path: "0*(\Segment\Tracks\TrackEntry\CodecInfoURL)"
id: "0x3B4040"
type: "string"
minver: "0"
maxver: "0"
documentation: A URL to find information about the codec used.
8.2.82. CodecDownloadURL Element
name: "CodecDownloadURL"
path: "0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)"
id: "0x26B240"
type: "string"
minver: "0"
maxver: "0"
documentation: A URL to download about the codec used.
Lhomme, et al. Expires January 26, 2019 [Page 59]
Internet-Draft Matroska July 2018
8.2.83. CodecDecodeAll Element
name: "CodecDecodeAll"
path: "1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)"
id: "0xAA"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "2"
documentation: The codec can decode potentially damaged data (1 bit).
8.2.84. TrackOverlay Element
name: "TrackOverlay"
path: "0*(\Segment\Tracks\TrackEntry\TrackOverlay)"
id: "0x6FAB"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.85. CodecDelay Element
name: "CodecDelay"
path: "0*1(\Segment\Tracks\TrackEntry\CodecDelay)"
id: "0x56AA"
Lhomme, et al. Expires January 26, 2019 [Page 60]
Internet-Draft Matroska July 2018
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "4"
documentation: CodecDelay is The codec-built-in delay in nanoseconds.
This value MUST be subtracted from each block timestamp in order to
get the actual timestamp. The value SHOULD be small so the muxing of
tracks with the same actual timestamp are in the same Cluster.
8.2.86. SeekPreRoll Element
name: "SeekPreRoll"
path: "1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)"
id: "0x56BB"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "4"
documentation: After a discontinuity, SeekPreRoll is the duration in
nanoseconds of the data the decoder MUST decode before the decoded
data is valid.
8.2.87. TrackTranslate Element
name: "TrackTranslate"
path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate)"
id: "0x6624"
type: "master"
minver: "1"
documentation: The track identification for the given Chapter Codec.
Lhomme, et al. Expires January 26, 2019 [Page 61]
Internet-Draft Matroska July 2018
8.2.88. TrackTranslateEditionUID Element
name: "TrackTranslateEditionUID"
path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEdi
tionUID)"
id: "0x66FC"
type: "uinteger"
minver: "1"
documentation: Specify an edition UID on which this translation
applies. When not specified, it means for all editions found in the
Segment.
8.2.89. TrackTranslateCodec Element
name: "TrackTranslateCodec"
path:
"1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)"
id: "0x66BF"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: The chapter codec.
restrictions:
+-------+-----------------+
| value | label |
+-------+-----------------+
| "0" | Matroska Script |
| "1" | DVD-menu |
+-------+-----------------+
Lhomme, et al. Expires January 26, 2019 [Page 62]
Internet-Draft Matroska July 2018
8.2.90. TrackTranslateTrackID Element
name: "TrackTranslateTrackID"
path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTr
ackID)"
id: "0x66A5"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: The binary value used to represent this track in the
chapter codec data. The format depends on the ChapProcessCodecID
used.
8.2.91. Video Element
name: "Video"
path: "0*1(\Segment\Tracks\TrackEntry\Video)"
id: "0xE0"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Video settings.
8.2.92. FlagInterlaced Element
name: "FlagInterlaced"
path: "1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)"
id: "0x9A"
minOccurs: "1"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 63]
Internet-Draft Matroska July 2018
range: "0-2"
default: "0"
type: "uinteger"
minver: "2"
documentation: A flag to declare if the video is known to be
progressive or interlaced and if applicable to declare details about
the interlacement.
restrictions:
+-------+--------------+
| value | label |
+-------+--------------+
| "0" | undetermined |
| "1" | interlaced |
| "2" | progressive |
+-------+--------------+
8.2.93. FieldOrder Element
name: "FieldOrder"
path: "1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)"
id: "0x9D"
minOccurs: "1"
maxOccurs: "1"
range: "0-14"
default: "2"
type: "uinteger"
minver: "4"
documentation: Declare the field ordering of the video. If
FlagInterlaced is not set to 1, this Element MUST be ignored.
restrictions:
Lhomme, et al. Expires January 26, 2019 [Page 64]
Internet-Draft Matroska July 2018
+---------------------------------+-----------------+---------------+
| value | label | documentation |
+---------------------------------+-----------------+---------------+
| "0" | progressive | "1" |
| tff | Top field | "2" |
| | displayed | |
| | first. Top | |
| | field stored | |
| | first. | |
| undetermined | "6" | bff |
| Bottom field displayed first. | "9" | bff(swapped) |
| Bottom field stored first. | | |
| Top field displayed first. | "14" | tff(swapped) |
| Fields are interleaved in | | |
| storage with the top line of | | |
| the top field stored first. | | |
| Bottom field displayed first. |
| Fields are interleaved in |
| storage with the top line of |
| the top field stored first. |
+---------------------------------+-----------------+---------------+
8.2.94. StereoMode Element
name: "StereoMode"
path: "0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)"
id: "0x53B8"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "3"
documentation: Stereo-3D video mode. There are some more details on
3D support in the Specification Notes.
restrictions:
Lhomme, et al. Expires January 26, 2019 [Page 65]
Internet-Draft Matroska July 2018
+-------+---------------------------------------------------+
| value | label |
+-------+---------------------------------------------------+
| "0" | mono |
| "1" | side by side (left eye first) |
| "2" | top - bottom (right eye is first) |
| "3" | top - bottom (left eye is first) |
| "4" | checkboard (right eye is first) |
| "5" | checkboard (left eye is first) |
| "6" | row interleaved (right eye is first) |
| "7" | row interleaved (left eye is first) |
| "8" | column interleaved (right eye is first) |
| "9" | column interleaved (left eye is first) |
| "10" | anaglyph (cyan/red) |
| "11" | side by side (right eye 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) |
+-------+---------------------------------------------------+
8.2.95. AlphaMode Element
name: "AlphaMode"
path: "0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)"
id: "0x53C0"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "3"
documentation: Alpha Video Mode. Presence of this Element indicates
that the BlockAdditional Element could contain Alpha data.
8.2.96. OldStereoMode Element
name: "OldStereoMode"
path: "0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)"
id: "0x53B9"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 66]
Internet-Draft Matroska July 2018
type: "uinteger"
maxver: "0"
documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used
in old versions of libmatroska.
restrictions:
+-------+-----------+
| value | label |
+-------+-----------+
| "0" | mono |
| "1" | right eye |
| "2" | left eye |
| "3" | both eyes |
+-------+-----------+
8.2.97. PixelWidth Element
name: "PixelWidth"
path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)"
id: "0xB0"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: Width of the encoded video frames in pixels.
8.2.98. PixelHeight Element
name: "PixelHeight"
path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)"
id: "0xBA"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 67]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: Height of the encoded video frames in pixels.
8.2.99. PixelCropBottom Element
name: "PixelCropBottom"
path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)"
id: "0x54AA"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The number of video pixels to remove at the bottom of
the image.
8.2.100. PixelCropTop Element
name: "PixelCropTop"
path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)"
id: "0x54BB"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The number of video pixels to remove at the top of the
image.
Lhomme, et al. Expires January 26, 2019 [Page 68]
Internet-Draft Matroska July 2018
8.2.101. PixelCropLeft Element
name: "PixelCropLeft"
path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)"
id: "0x54CC"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The number of video pixels to remove on the left of
the image.
8.2.102. PixelCropRight Element
name: "PixelCropRight"
path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)"
id: "0x54DD"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The number of video pixels to remove on the right of
the image.
8.2.103. DisplayWidth Element
name: "DisplayWidth"
path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)"
id: "0x54B0"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 69]
Internet-Draft Matroska July 2018
range: "not 0"
default: "PixelWidth - PixelCropLeft - PixelCropRight"
type: "uinteger"
minver: "1"
documentation: Width of the video frames to display. Applies to the
video frame after cropping (PixelCrop* Elements). The default value
is only valid when DisplayUnit is 0.
8.2.104. DisplayHeight Element
name: "DisplayHeight"
path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)"
id: "0x54BA"
maxOccurs: "1"
range: "not 0"
default: "PixelHeight - PixelCropTop - PixelCropBottom"
type: "uinteger"
minver: "1"
documentation: Height of the video frames to display. Applies to the
video frame after cropping (PixelCrop* Elements). The default value
is only valid when DisplayUnit is 0.
8.2.105. DisplayUnit Element
name: "DisplayUnit"
path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)"
id: "0x54B2"
maxOccurs: "1"
default: "0"
type: "uinteger"
Lhomme, et al. Expires January 26, 2019 [Page 70]
Internet-Draft Matroska July 2018
minver: "1"
documentation: How DisplayWidth & DisplayHeight are interpreted.
restrictions:
+-------+----------------------+
| value | label |
+-------+----------------------+
| "0" | pixels |
| "1" | centimeters |
| "2" | inches |
| "3" | display aspect ratio |
| "4" | unknown |
+-------+----------------------+
8.2.106. AspectRatioType Element
name: "AspectRatioType"
path: "0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)"
id: "0x54B3"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: Specify the possible modifications to the aspect
ratio.
restrictions:
+-------+-------------------+
| value | label |
+-------+-------------------+
| "0" | free resizing |
| "1" | keep aspect ratio |
| "2" | fixed |
+-------+-------------------+
Lhomme, et al. Expires January 26, 2019 [Page 71]
Internet-Draft Matroska July 2018
8.2.107. ColourSpace Element
name: "ColourSpace"
path: "0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)"
id: "0x2EB524"
maxOccurs: "1"
size: "4"
type: "binary"
minver: "1"
documentation: Specify the pixel format used for the Track's data as
a FourCC. This value is similar in scope to the biCompression value
of AVI's BITMAPINFOHEADER. This Element is MANDATORY in TrackEntry
when the CodecID Element of the TrackEntry is set to
"V_UNCOMPRESSED".
8.2.108. GammaValue Element
name: "GammaValue"
path: "0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)"
id: "0x2FB523"
maxOccurs: "1"
range: "> 0x0p+0"
type: "float"
minver: "0"
maxver: "0"
documentation: Gamma Value.
8.2.109. FrameRate Element
name: "FrameRate"
path: "0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)"
Lhomme, et al. Expires January 26, 2019 [Page 72]
Internet-Draft Matroska July 2018
id: "0x2383E3"
maxOccurs: "1"
range: "> 0x0p+0"
type: "float"
minver: "0"
maxver: "0"
documentation: Number of frames per second. Informational only.
8.2.110. Colour Element
name: "Colour"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour)"
id: "0x55B0"
maxOccurs: "1"
type: "master"
minver: "4"
documentation: Settings describing the colour format.
8.2.111. MatrixCoefficients Element
name: "MatrixCoefficients"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)"
id: "0x55B1"
maxOccurs: "1"
default: "2"
type: "uinteger"
minver: "4"
Lhomme, et al. Expires January 26, 2019 [Page 73]
Internet-Draft Matroska July 2018
documentation: The Matrix Coefficients of the video used to derive
luma and chroma values from red, green, and blue color primaries.
For clarity, the value and meanings for MatrixCoefficients are
adopted from Table 4 of ISO/IEC 23001-8:2013/DCOR1.
restrictions:
+-------+-------------------------------+
| value | label |
+-------+-------------------------------+
| "0" | GBR |
| "1" | BT709 |
| "2" | unspecified |
| "3" | reserved |
| "4" | FCC |
| "5" | BT470BG |
| "6" | SMPTE 170M |
| "7" | SMPTE 240M |
| "8" | YCoCg |
| "9" | BT2020 Non-constant Luminance |
| "10" | BT2020 Constant Luminance |
+-------+-------------------------------+
8.2.112. BitsPerChannel Element
name: "BitsPerChannel"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)"
id: "0x55B2"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "4"
documentation: Number of decoded bits per channel. A value of 0
indicates that the BitsPerChannel is unspecified.
8.2.113. ChromaSubsamplingHorz Element
name: "ChromaSubsamplingHorz"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)"
Lhomme, et al. Expires January 26, 2019 [Page 74]
Internet-Draft Matroska July 2018
id: "0x55B3"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: The amount of pixels to remove in the Cr and Cb
channels for every pixel not removed horizontally. Example: For
video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD
be set to 1.
8.2.114. ChromaSubsamplingVert Element
name: "ChromaSubsamplingVert"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)"
id: "0x55B4"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: The amount of pixels to remove in the Cr and Cb
channels for every pixel not removed vertically. Example: For video
with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be
set to 1.
8.2.115. CbSubsamplingHorz Element
name: "CbSubsamplingHorz"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)"
id: "0x55B5"
maxOccurs: "1"
type: "uinteger"
minver: "4"
Lhomme, et al. Expires January 26, 2019 [Page 75]
Internet-Draft Matroska July 2018
documentation: The amount of pixels to remove in the Cb channel for
every pixel not removed horizontally. This is additive with
ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma
subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and
CbSubsamplingHorz SHOULD be set to 1.
8.2.116. CbSubsamplingVert Element
name: "CbSubsamplingVert"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)"
id: "0x55B6"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: The amount of pixels to remove in the Cb channel for
every pixel not removed vertically. This is additive with
ChromaSubsamplingVert.
8.2.117. ChromaSitingHorz Element
name: "ChromaSitingHorz"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)"
id: "0x55B7"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "4"
documentation: How chroma is subsampled horizontally.
restrictions:
Lhomme, et al. Expires January 26, 2019 [Page 76]
Internet-Draft Matroska July 2018
+-------+-----------------+
| value | label |
+-------+-----------------+
| "0" | unspecified |
| "1" | left collocated |
| "2" | half |
+-------+-----------------+
8.2.118. ChromaSitingVert Element
name: "ChromaSitingVert"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)"
id: "0x55B8"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "4"
documentation: How chroma is subsampled vertically.
restrictions:
+-------+----------------+
| value | label |
+-------+----------------+
| "0" | unspecified |
| "1" | top collocated |
| "2" | half |
+-------+----------------+
8.2.119. Range Element
name: "Range"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)"
id: "0x55B9"
maxOccurs: "1"
default: "0"
Lhomme, et al. Expires January 26, 2019 [Page 77]
Internet-Draft Matroska July 2018
type: "uinteger"
minver: "4"
documentation: Clipping of the color ranges.
restrictions:
+-------+-------------------------------------------------------+
| value | label |
+-------+-------------------------------------------------------+
| "0" | unspecified |
| "1" | broadcast range |
| "2" | full range (no clipping) |
| "3" | defined by MatrixCoefficients/TransferCharacteristics |
+-------+-------------------------------------------------------+
8.2.120. TransferCharacteristics Element
name: "TransferCharacteristics"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteri
stics)"
id: "0x55BA"
maxOccurs: "1"
default: "2"
type: "uinteger"
minver: "4"
documentation: The transfer characteristics of the video. For
clarity, the value and meanings for TransferCharacteristics 1-15 are
adopted from Table 3 of ISO/IEC 23001-8:2013/DCOR1.
TransferCharacteristics 16-18 are proposed values.
restrictions:
Lhomme, et al. Expires January 26, 2019 [Page 78]
Internet-Draft Matroska July 2018
+-------+-------------------------------------+
| value | label |
+-------+-------------------------------------+
| "0" | reserved |
| "1" | ITU-R BT.709 |
| "2" | unspecified |
| "3" | reserved |
| "4" | Gamma 2.2 curve |
| "5" | Gamma 2.8 curve |
| "6" | SMPTE 170M |
| "7" | SMPTE 240M |
| "8" | Linear |
| "9" | Log |
| "10" | Log Sqrt |
| "11" | IEC 61966-2-4 |
| "12" | ITU-R BT.1361 Extended Colour Gamut |
| "13" | IEC 61966-2-1 |
| "14" | ITU-R BT.2020 10 bit |
| "15" | ITU-R BT.2020 12 bit |
| "16" | SMPTE ST 2084 |
| "17" | SMPTE ST 428-1 |
| "18" | ARIB STD-B67 (HLG) |
+-------+-------------------------------------+
8.2.121. Primaries Element
name: "Primaries"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)"
id: "0x55BB"
maxOccurs: "1"
default: "2"
type: "uinteger"
minver: "4"
documentation: The colour primaries of the video. For clarity, the
value and meanings for Primaries are adopted from Table 2 of ISO/IEC
23001-8:2013/DCOR1.
restrictions:
Lhomme, et al. Expires January 26, 2019 [Page 79]
Internet-Draft Matroska July 2018
+-------+---------------------+
| value | label |
+-------+---------------------+
| "0" | reserved |
| "1" | ITU-R BT.709 |
| "2" | unspecified |
| "3" | reserved |
| "4" | ITU-R BT.470M |
| "5" | ITU-R BT.470BG |
| "6" | SMPTE 170M |
| "7" | SMPTE 240M |
| "8" | FILM |
| "9" | ITU-R BT.2020 |
| "10" | SMPTE ST 428-1 |
| "22" | JEDEC P22 phosphors |
+-------+---------------------+
8.2.122. MaxCLL Element
name: "MaxCLL"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)"
id: "0x55BC"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: Maximum brightness of a single pixel (Maximum Content
Light Level) in candelas per square meter (cd/m^2).
8.2.123. MaxFALL Element
name: "MaxFALL"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)"
id: "0x55BD"
maxOccurs: "1"
type: "uinteger"
minver: "4"
Lhomme, et al. Expires January 26, 2019 [Page 80]
Internet-Draft Matroska July 2018
documentation: Maximum brightness of a single full frame (Maximum
Frame-Average Light Level) in candelas per square meter (cd/m^2).
8.2.124. MasteringMetadata Element
name: "MasteringMetadata"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)"
id: "0x55D0"
maxOccurs: "1"
type: "master"
minver: "4"
documentation: SMPTE 2086 mastering data.
8.2.125. PrimaryRChromaticityX Element
name: "PrimaryRChromaticityX"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryRChromaticityX)"
id: "0x55D1"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: Red X chromaticity coordinate as defined by CIE 1931.
8.2.126. PrimaryRChromaticityY Element
name: "PrimaryRChromaticityY"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryRChromaticityY)"
id: "0x55D2"
Lhomme, et al. Expires January 26, 2019 [Page 81]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: Red Y chromaticity coordinate as defined by CIE 1931.
8.2.127. PrimaryGChromaticityX Element
name: "PrimaryGChromaticityX"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryGChromaticityX)"
id: "0x55D3"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: Green X chromaticity coordinate as defined by CIE
1931.
8.2.128. PrimaryGChromaticityY Element
name: "PrimaryGChromaticityY"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryGChromaticityY)"
id: "0x55D4"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
Lhomme, et al. Expires January 26, 2019 [Page 82]
Internet-Draft Matroska July 2018
documentation: Green Y chromaticity coordinate as defined by CIE
1931.
8.2.129. PrimaryBChromaticityX Element
name: "PrimaryBChromaticityX"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryBChromaticityX)"
id: "0x55D5"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: Blue X chromaticity coordinate as defined by CIE 1931.
8.2.130. PrimaryBChromaticityY Element
name: "PrimaryBChromaticityY"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
PrimaryBChromaticityY)"
id: "0x55D6"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: Blue Y chromaticity coordinate as defined by CIE 1931.
8.2.131. WhitePointChromaticityX Element
name: "WhitePointChromaticityX"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
WhitePointChromaticityX)"
Lhomme, et al. Expires January 26, 2019 [Page 83]
Internet-Draft Matroska July 2018
id: "0x55D7"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: White X chromaticity coordinate as defined by CIE
1931.
8.2.132. WhitePointChromaticityY Element
name: "WhitePointChromaticityY"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
WhitePointChromaticityY)"
id: "0x55D8"
maxOccurs: "1"
range: "0-1"
type: "float"
minver: "4"
documentation: White Y chromaticity coordinate as defined by CIE
1931.
8.2.133. LuminanceMax Element
name: "LuminanceMax"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
LuminanceMax)"
id: "0x55D9"
maxOccurs: "1"
range: ">= 0x0p+0"
type: "float"
Lhomme, et al. Expires January 26, 2019 [Page 84]
Internet-Draft Matroska July 2018
minver: "4"
documentation: Maximum luminance. Represented in candelas per square
meter (cd/m^2).
8.2.134. LuminanceMin Element
name: "LuminanceMin"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\
LuminanceMin)"
id: "0x55DA"
maxOccurs: "1"
range: ">= 0x0p+0"
type: "float"
minver: "4"
documentation: Mininum luminance. Represented in candelas per square
meter (cd/m^2).
8.2.135. Projection Element
name: "Projection"
path: "0*1(\Segment\Tracks\TrackEntry\Video\Projection)"
id: "0x7670"
maxOccurs: "1"
type: "master"
minver: "4"
documentation: Describes the video projection details. Used to
render spherical and VR videos.
8.2.136. ProjectionType Element
name: "ProjectionType"
path:
"1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionType)"
Lhomme, et al. Expires January 26, 2019 [Page 85]
Internet-Draft Matroska July 2018
id: "0x7671"
minOccurs: "1"
maxOccurs: "1"
range: "0-3"
default: "0"
type: "uinteger"
minver: "4"
documentation: Describes the projection used for this video track.
restrictions:
+-------+-----------------+
| value | label |
+-------+-----------------+
| "0" | rectangular |
| "1" | equirectangular |
| "2" | cubemap |
| "3" | mesh |
+-------+-----------------+
8.2.137. ProjectionPrivate Element
name: "ProjectionPrivate"
path:
"0*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate)"
id: "0x7672"
maxOccurs: "1"
type: "binary"
minver: "4"
documentation: Private data that only applies to a specific
projection.SemanticsIf ProjectionType equals 0 (Rectangular), then
this element must not be present.If ProjectionType equals 1
(Equirectangular), then this element must be present and contain the
same binary data that would be stored inside an ISOBMFF
Equirectangular Projection Box ('equi').If ProjectionType equals 2
Lhomme, et al. Expires January 26, 2019 [Page 86]
Internet-Draft Matroska July 2018
(Cubemap), then this element must be present and contain the same
binary data that would be stored inside an ISOBMFF Cubemap Projection
Box ('cbmp').If ProjectionType equals 3 (Mesh), then this element
must be present and contain the same binary data that would be stored
inside an ISOBMFF Mesh Projection Box ('mshp').Note: ISOBMFF box size
and fourcc fields are not included in the binary data, but the
FullBox version and flag fields are. This is to avoid redundant
framing information while preserving versioning and semantics between
the two container formats.
8.2.138. ProjectionPoseYaw Element
name: "ProjectionPoseYaw"
path:
"1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw)"
id: "0x7673"
minOccurs: "1"
maxOccurs: "1"
default: "0x0p+0"
type: "float"
minver: "4"
documentation: Specifies a yaw rotation to the
projection.SemanticsValue represents a clockwise rotation, in
degrees, around the up vector. This rotation must be applied before
any ProjectionPosePitch or ProjectionPoseRoll rotations. The value
of this field should be in the -180 to 180 degree range.
8.2.139. ProjectionPosePitch Element
name: "ProjectionPosePitch"
path: "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPose
Pitch)"
id: "0x7674"
minOccurs: "1"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 87]
Internet-Draft Matroska July 2018
default: "0x0p+0"
type: "float"
minver: "4"
documentation: Specifies a pitch rotation to the
projection.SemanticsValue represents a counter-clockwise rotation, in
degrees, around the right vector. This rotation must be applied
after the ProjectionPoseYaw rotation and before the
ProjectionPoseRoll rotation. The value of this field should be in
the -90 to 90 degree range.
8.2.140. ProjectionPoseRoll Element
name: "ProjectionPoseRoll"
path:
"1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll)"
id: "0x7675"
minOccurs: "1"
maxOccurs: "1"
default: "0x0p+0"
type: "float"
minver: "4"
documentation: Specifies a roll rotation to the
projection.SemanticsValue represents a counter-clockwise rotation, in
degrees, around the forward vector. This rotation must be applied
after the ProjectionPoseYaw and ProjectionPosePitch rotations. The
value of this field should be in the -180 to 180 degree range.
8.2.141. Audio Element
name: "Audio"
path: "0*1(\Segment\Tracks\TrackEntry\Audio)"
id: "0xE1"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 88]
Internet-Draft Matroska July 2018
type: "master"
minver: "1"
documentation: Audio settings.
8.2.142. SamplingFrequency Element
name: "SamplingFrequency"
path: "1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)"
id: "0xB5"
minOccurs: "1"
maxOccurs: "1"
range: "> 0x0p+0"
default: "0x1.f4p+12"
type: "float"
minver: "1"
documentation: Sampling frequency in Hz.
8.2.143. OutputSamplingFrequency Element
name: "OutputSamplingFrequency"
path: "0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)"
id: "0x78B5"
maxOccurs: "1"
range: "> 0x0p+0"
default: "SamplingFrequency"
type: "float"
minver: "1"
documentation: Real output sampling frequency in Hz (used for SBR
techniques).
Lhomme, et al. Expires January 26, 2019 [Page 89]
Internet-Draft Matroska July 2018
8.2.144. Channels Element
name: "Channels"
path: "1*1(\Segment\Tracks\TrackEntry\Audio\Channels)"
id: "0x9F"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
default: "1"
type: "uinteger"
minver: "1"
documentation: Numbers of channels in the track.
8.2.145. ChannelPositions Element
name: "ChannelPositions"
path: "0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)"
id: "0x7D7B"
maxOccurs: "1"
type: "binary"
minver: "0"
maxver: "0"
documentation: Table of horizontal angles for each successive
channel, see appendix.
8.2.146. BitDepth Element
name: "BitDepth"
path: "0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)"
id: "0x6264"
Lhomme, et al. Expires January 26, 2019 [Page 90]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: Bits per sample, mostly used for PCM.
8.2.147. TrackOperation Element
name: "TrackOperation"
path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation)"
id: "0xE2"
maxOccurs: "1"
type: "master"
minver: "3"
documentation: Operation that needs to be applied on tracks to create
this virtual track. For more details look at the Specification Notes
on the subject.
8.2.148. TrackCombinePlanes Element
name: "TrackCombinePlanes"
path:
"0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)"
id: "0xE3"
maxOccurs: "1"
type: "master"
minver: "3"
documentation: Contains the list of all video plane tracks that need
to be combined to create this 3D track
Lhomme, et al. Expires January 26, 2019 [Page 91]
Internet-Draft Matroska July 2018
8.2.149. TrackPlane Element
name: "TrackPlane"
path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlane
s\TrackPlane)"
id: "0xE4"
minOccurs: "1"
type: "master"
minver: "3"
documentation: Contains a video plane track that need to be combined
to create this 3D track
8.2.150. TrackPlaneUID Element
name: "TrackPlaneUID"
path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan
es\TrackPlane\TrackPlaneUID)"
id: "0xE5"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "3"
documentation: The trackUID number of the track representing the
plane.
8.2.151. TrackPlaneType Element
name: "TrackPlaneType"
path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan
es\TrackPlane\TrackPlaneType)"
id: "0xE6"
Lhomme, et al. Expires January 26, 2019 [Page 92]
Internet-Draft Matroska July 2018
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "3"
documentation: The kind of plane this track corresponds to.
restrictions:
+-------+------------+
| value | label |
+-------+------------+
| "0" | left eye |
| "1" | right eye |
| "2" | background |
+-------+------------+
8.2.152. TrackJoinBlocks Element
name: "TrackJoinBlocks"
path:
"0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)"
id: "0xE9"
maxOccurs: "1"
type: "master"
minver: "3"
documentation: Contains the list of all tracks whose Blocks need to
be combined to create this virtual track
8.2.153. TrackJoinUID Element
name: "TrackJoinUID"
path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\T
rackJoinUID)"
id: "0xED"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 93]
Internet-Draft Matroska July 2018
range: "not 0"
type: "uinteger"
minver: "3"
documentation: The trackUID number of a track whose blocks are used
to create this virtual track.
8.2.154. TrickTrackUID Element
name: "TrickTrackUID"
path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)"
id: "0xC0"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.155. TrickTrackSegmentUID Element
name: "TrickTrackSegmentUID"
path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)"
id: "0xC1"
maxOccurs: "1"
size: "16"
type: "binary"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
Lhomme, et al. Expires January 26, 2019 [Page 94]
Internet-Draft Matroska July 2018
8.2.156. TrickTrackFlag Element
name: "TrickTrackFlag"
path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)"
id: "0xC6"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.157. TrickMasterTrackUID Element
name: "TrickMasterTrackUID"
path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)"
id: "0xC7"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.158. TrickMasterTrackSegmentUID Element
name: "TrickMasterTrackSegmentUID"
path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)"
id: "0xC4"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 95]
Internet-Draft Matroska July 2018
size: "16"
type: "binary"
minver: "0"
maxver: "0"
documentation: DivX trick track extensions
8.2.159. ContentEncodings Element
name: "ContentEncodings"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings)"
id: "0x6D80"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Settings for several content encoding mechanisms like
compression or encryption.
8.2.160. ContentEncoding Element
name: "ContentEncoding"
path:
"1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)"
id: "0x6240"
minOccurs: "1"
type: "master"
minver: "1"
documentation: Settings for one content encoding like compression or
encryption.
Lhomme, et al. Expires January 26, 2019 [Page 96]
Internet-Draft Matroska July 2018
8.2.161. ContentEncodingOrder Element
name: "ContentEncodingOrder"
path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncodingOrder)"
id: "0x5031"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.162. ContentEncodingScope Element
name: "ContentEncodingScope"
path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncodingScope)"
id: "0x5032"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
default: "1"
type: "uinteger"
minver: "1"
documentation: A bit field that describes which Elements have been
modified in this way. Values (big endian) can be OR'ed. Possible
Lhomme, et al. Expires January 26, 2019 [Page 97]
Internet-Draft Matroska July 2018
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)
8.2.163. ContentEncodingType Element
name: "ContentEncodingType"
path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncodingType)"
id: "0x5033"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: A value describing what kind of transformation has
been done. Possible values: 0 - compression, 1 - encryption
8.2.164. ContentCompression Element
name: "ContentCompression"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentCompression)"
id: "0x5034"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Settings describing the compression used. This
Element 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.
Lhomme, et al. Expires January 26, 2019 [Page 98]
Internet-Draft Matroska July 2018
8.2.165. ContentCompAlgo Element
name: "ContentCompAlgo"
path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentCompression\ContentCompAlgo)"
id: "0x4254"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: The compression algorithm used. Algorithms that have
been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header
Stripping
8.2.166. ContentCompSettings Element
name: "ContentCompSettings"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentCompression\ContentCompSettings)"
id: "0x4255"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: 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.
8.2.167. ContentEncryption Element
name: "ContentEncryption"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption)"
Lhomme, et al. Expires January 26, 2019 [Page 99]
Internet-Draft Matroska July 2018
id: "0x5035"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Settings describing the encryption used. This Element
MUST be present if the value of ContentEncodingType is 1 and absent
otherwise.
8.2.168. ContentEncAlgo Element
name: "ContentEncAlgo"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentEncAlgo)"
id: "0x47E1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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
8.2.169. ContentEncKeyID Element
name: "ContentEncKeyID"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentEncKeyID)"
id: "0x47E2"
maxOccurs: "1"
type: "binary"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 100]
Internet-Draft Matroska July 2018
documentation: For public key algorithms this is the ID of the public
key the the data was encrypted with.
8.2.170. ContentSignature Element
name: "ContentSignature"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentSignature)"
id: "0x47E3"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: A cryptographic signature of the contents.
8.2.171. ContentSigKeyID Element
name: "ContentSigKeyID"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentSigKeyID)"
id: "0x47E4"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: This is the ID of the private key the data was signed
with.
8.2.172. ContentSigAlgo Element
name: "ContentSigAlgo"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentSigAlgo)"
id: "0x47E5"
maxOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 101]
Internet-Draft Matroska July 2018
default: "0"
type: "uinteger"
minver: "1"
documentation: 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
8.2.173. ContentSigHashAlgo Element
name: "ContentSigHashAlgo"
path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin
g\ContentEncryption\ContentSigHashAlgo)"
id: "0x47E6"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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
8.2.174. Cues Element
name: "Cues"
path: "0*1(\Segment\Cues)"
id: "0x1C53BB6B"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: A Top-Level Element to speed seeking access. All
entries are local to the Segment. This Element SHOULD be mandatory
for non "live" streams.
Lhomme, et al. Expires January 26, 2019 [Page 102]
Internet-Draft Matroska July 2018
8.2.175. CuePoint Element
name: "CuePoint"
path: "1*(\Segment\Cues\CuePoint)"
id: "0xBB"
minOccurs: "1"
type: "master"
minver: "1"
documentation: Contains all information relative to a seek point in
the Segment.
8.2.176. CueTime Element
name: "CueTime"
path: "1*1(\Segment\Cues\CuePoint\CueTime)"
id: "0xB3"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Absolute timestamp according to the Segment time base.
8.2.177. CueTrackPositions Element
name: "CueTrackPositions"
path: "1*(\Segment\Cues\CuePoint\CueTrackPositions)"
id: "0xB7"
minOccurs: "1"
type: "master"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 103]
Internet-Draft Matroska July 2018
documentation: Contain positions for different tracks corresponding
to the timestamp.
8.2.178. CueTrack Element
name: "CueTrack"
path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)"
id: "0xF7"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: The track for which a position is given.
8.2.179. CueClusterPosition Element
name: "CueClusterPosition"
path:
"1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)"
id: "0xF1"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: The Segment Position of the Cluster containing the
associated Block.
8.2.180. CueRelativePosition Element
name: "CueRelativePosition"
Lhomme, et al. Expires January 26, 2019 [Page 104]
Internet-Draft Matroska July 2018
path:
"0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)"
id: "0xF0"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: The relative position inside the Cluster of the
referenced SimpleBlock or BlockGroup with 0 being the first possible
position for an Element inside that Cluster.
8.2.181. CueDuration Element
name: "CueDuration"
path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)"
id: "0xB2"
maxOccurs: "1"
type: "uinteger"
minver: "4"
documentation: 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.
8.2.182. CueBlockNumber Element
name: "CueBlockNumber"
path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)"
id: "0x5378"
maxOccurs: "1"
range: "not 0"
default: "1"
type: "uinteger"
Lhomme, et al. Expires January 26, 2019 [Page 105]
Internet-Draft Matroska July 2018
minver: "1"
documentation: Number of the Block in the specified Cluster.
8.2.183. CueCodecState Element
name: "CueCodecState"
path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)"
id: "0xEA"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "2"
documentation: The Segment Position of the Codec State corresponding
to this Cue Element. 0 means that the data is taken from the initial
Track Entry.
8.2.184. CueReference Element
name: "CueReference"
path: "0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)"
id: "0xDB"
type: "master"
minver: "2"
documentation: The Clusters containing the referenced Blocks.
8.2.185. CueRefTime Element
name: "CueRefTime"
path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR
efTime)"
id: "0x96"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 106]
Internet-Draft Matroska July 2018
maxOccurs: "1"
type: "uinteger"
minver: "2"
documentation: Timestamp of the referenced Block.
8.2.186. CueRefCluster Element
name: "CueRefCluster"
path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR
efCluster)"
id: "0x97"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: The Segment Position of the Cluster containing the
referenced Block.
8.2.187. CueRefNumber Element
name: "CueRefNumber"
path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR
efNumber)"
id: "0x535F"
maxOccurs: "1"
range: "not 0"
default: "1"
type: "uinteger"
minver: "0"
Lhomme, et al. Expires January 26, 2019 [Page 107]
Internet-Draft Matroska July 2018
maxver: "0"
documentation: Number of the referenced Block of Track X in the
specified Cluster.
8.2.188. CueRefCodecState Element
name: "CueRefCodecState"
path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR
efCodecState)"
id: "0xEB"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: The Segment Position of the Codec State corresponding
to this referenced Element. 0 means that the data is taken from the
initial Track Entry.
8.2.189. Attachments Element
name: "Attachments"
path: "0*1(\Segment\Attachments)"
id: "0x1941A469"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Contain attached files.
Lhomme, et al. Expires January 26, 2019 [Page 108]
Internet-Draft Matroska July 2018
8.2.190. AttachedFile Element
name: "AttachedFile"
path: "1*(\Segment\Attachments\AttachedFile)"
id: "0x61A7"
minOccurs: "1"
type: "master"
minver: "1"
documentation: An attached file.
8.2.191. FileDescription Element
name: "FileDescription"
path: "0*1(\Segment\Attachments\AttachedFile\FileDescription)"
id: "0x467E"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: A human-friendly name for the attached file.
8.2.192. FileName Element
name: "FileName"
path: "1*1(\Segment\Attachments\AttachedFile\FileName)"
id: "0x466E"
minOccurs: "1"
maxOccurs: "1"
type: "utf-8"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 109]
Internet-Draft Matroska July 2018
documentation: Filename of the attached file.
8.2.193. FileMimeType Element
name: "FileMimeType"
path: "1*1(\Segment\Attachments\AttachedFile\FileMimeType)"
id: "0x4660"
minOccurs: "1"
maxOccurs: "1"
type: "string"
minver: "1"
documentation: MIME type of the file.
8.2.194. FileData Element
name: "FileData"
path: "1*1(\Segment\Attachments\AttachedFile\FileData)"
id: "0x465C"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: The data of the file.
8.2.195. FileUID Element
name: "FileUID"
path: "1*1(\Segment\Attachments\AttachedFile\FileUID)"
id: "0x46AE"
minOccurs: "1"
Lhomme, et al. Expires January 26, 2019 [Page 110]
Internet-Draft Matroska July 2018
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: Unique ID representing the file, as random as
possible.
8.2.196. FileReferral Element
name: "FileReferral"
path: "0*1(\Segment\Attachments\AttachedFile\FileReferral)"
id: "0x4675"
maxOccurs: "1"
type: "binary"
minver: "0"
maxver: "0"
documentation: A binary value that a track/codec can refer to when
the attachment is needed.
8.2.197. FileUsedStartTime Element
name: "FileUsedStartTime"
path: "0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)"
id: "0x4661"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX font extension
Lhomme, et al. Expires January 26, 2019 [Page 111]
Internet-Draft Matroska July 2018
8.2.198. FileUsedEndTime Element
name: "FileUsedEndTime"
path: "0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)"
id: "0x4662"
maxOccurs: "1"
type: "uinteger"
minver: "0"
maxver: "0"
documentation: DivX font extension
8.2.199. Chapters Element
name: "Chapters"
path: "0*1(\Segment\Chapters)"
id: "0x1043A770"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: A system to define basic menus and partition data.
For more detailed information, look at the Chapters Explanation.
8.2.200. EditionEntry Element
name: "EditionEntry"
path: "1*(\Segment\Chapters\EditionEntry)"
id: "0x45B9"
minOccurs: "1"
type: "master"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 112]
Internet-Draft Matroska July 2018
documentation: Contains all information about a Segment edition.
8.2.201. EditionUID Element
name: "EditionUID"
path: "0*1(\Segment\Chapters\EditionEntry\EditionUID)"
id: "0x45BC"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: A unique ID to identify the edition. It's useful for
tagging an edition.
8.2.202. EditionFlagHidden Element
name: "EditionFlagHidden"
path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)"
id: "0x45BD"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "0"
type: "uinteger"
minver: "1"
documentation: If an edition is hidden (1), it SHOULD NOT be
available to the user interface (but still to Control Tracks; see
flag notes). (1 bit)
Lhomme, et al. Expires January 26, 2019 [Page 113]
Internet-Draft Matroska July 2018
8.2.203. EditionFlagDefault Element
name: "EditionFlagDefault"
path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)"
id: "0x45DB"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "0"
type: "uinteger"
minver: "1"
documentation: If a flag is set (1) the edition SHOULD be used as the
default one. (1 bit)
8.2.204. EditionFlagOrdered Element
name: "EditionFlagOrdered"
path: "0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)"
id: "0x45DD"
maxOccurs: "1"
range: "0-1"
default: "0"
type: "uinteger"
minver: "1"
documentation: Specify if the chapters can be defined multiple times
and the order to play them is enforced. (1 bit)
Lhomme, et al. Expires January 26, 2019 [Page 114]
Internet-Draft Matroska July 2018
8.2.205. ChapterAtom Element
name: "ChapterAtom"
path: "1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))"
id: "0xB6"
minOccurs: "1"
type: "master"
recursive: "1"
minver: "1"
documentation: Contains the atom information to use as the chapter
atom (apply to all tracks).
8.2.206. ChapterUID Element
name: "ChapterUID"
path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)"
id: "0x73C4"
minOccurs: "1"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: A unique ID to identify the Chapter.
8.2.207. ChapterStringUID Element
name: "ChapterStringUID"
path:
"0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)"
id: "0x5654"
Lhomme, et al. Expires January 26, 2019 [Page 115]
Internet-Draft Matroska July 2018
maxOccurs: "1"
type: "utf-8"
minver: "3"
documentation: A unique string ID to identify the Chapter. Use for
WebVTT cue identifier storage.
8.2.208. ChapterTimeStart Element
name: "ChapterTimeStart"
path:
"1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)"
id: "0x91"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Timestamp of the start of Chapter (not scaled).
8.2.209. ChapterTimeEnd Element
name: "ChapterTimeEnd"
path:
"0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)"
id: "0x92"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Timestamp of the end of Chapter (timestamp excluded,
not scaled).
Lhomme, et al. Expires January 26, 2019 [Page 116]
Internet-Draft Matroska July 2018
8.2.210. ChapterFlagHidden Element
name: "ChapterFlagHidden"
path:
"1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)"
id: "0x98"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "0"
type: "uinteger"
minver: "1"
documentation: If a chapter is hidden (1), it SHOULD NOT be available
to the user interface (but still to Control Tracks; see flag notes).
(1 bit)
8.2.211. ChapterFlagEnabled Element
name: "ChapterFlagEnabled"
path:
"1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)"
id: "0x4598"
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "1"
documentation: Specify whether the chapter is enabled. It can be
enabled/disabled by a Control Track. When disabled, the movie SHOULD
Lhomme, et al. Expires January 26, 2019 [Page 117]
Internet-Draft Matroska July 2018
skip all the content between the TimeStart and TimeEnd of this
chapter (see flag notes). (1 bit)
8.2.212. ChapterSegmentUID Element
name: "ChapterSegmentUID"
path:
"0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)"
id: "0x6E67"
maxOccurs: "1"
range: ">0"
size: "16"
type: "binary"
minver: "1"
documentation: The SegmentUID of another Segment to play during this
chapter.
usage notes: ChapterSegmentUID is mandatory if
ChapterSegmentEditionUID is used.
8.2.213. ChapterSegmentEditionUID Element
name: "ChapterSegmentEditionUID"
path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentE
ditionUID)"
id: "0x6EBC"
maxOccurs: "1"
range: "not 0"
type: "uinteger"
minver: "1"
documentation: The EditionUID to play from the Segment linked in
ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no
Edition of the linked Segment is used.
Lhomme, et al. Expires January 26, 2019 [Page 118]
Internet-Draft Matroska July 2018
8.2.214. ChapterPhysicalEquiv Element
name: "ChapterPhysicalEquiv"
path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysical
Equiv)"
id: "0x63C3"
maxOccurs: "1"
type: "uinteger"
minver: "1"
documentation: Specify the physical equivalent of this ChapterAtom
like "DVD" (60) or "SIDE" (50), see complete list of values.
8.2.215. ChapterTrack Element
name: "ChapterTrack"
path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)"
id: "0x8F"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: List of tracks on which the chapter applies. If this
Element is not present, all tracks apply
8.2.216. ChapterTrackNumber Element
name: "ChapterTrackNumber"
path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\Cha
pterTrackNumber)"
id: "0x89"
minOccurs: "1"
range: "not 0"
Lhomme, et al. Expires January 26, 2019 [Page 119]
Internet-Draft Matroska July 2018
type: "uinteger"
minver: "1"
documentation: UID of the Track to apply this chapter too. In the
absence of a control track, choosing this chapter will select the
listed Tracks and deselect unlisted tracks. Absence of this Element
indicates that the Chapter SHOULD be applied to any currently used
Tracks.
8.2.217. ChapterDisplay Element
name: "ChapterDisplay"
path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)"
id: "0x80"
type: "master"
minver: "1"
documentation: Contains all possible strings to use for the chapter
display.
8.2.218. ChapString Element
name: "ChapString"
path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\
ChapString)"
id: "0x85"
minOccurs: "1"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: Contains the string to use as the chapter atom.
Lhomme, et al. Expires January 26, 2019 [Page 120]
Internet-Draft Matroska July 2018
8.2.219. ChapLanguage Element
name: "ChapLanguage"
path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C
hapLanguage)"
id: "0x437C"
minOccurs: "1"
default: "eng"
type: "string"
minver: "1"
documentation: The languages corresponding to the string, in the
bibliographic ISO-639-2 form. This Element MUST be ignored if the
ChapLanguageIETF Element is used within the same ChapterDisplay
Element.
8.2.220. ChapLanguageIETF Element
name: "ChapLanguageIETF"
path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\
ChapLanguageIETF)"
id: "0x437D"
maxOccurs: "1"
type: "string"
minver: "4"
documentation: Specifies the language used in the ChapString
according to BCP 47 and using the IANA Language Subtag Registry. If
this Element is used, then any ChapLanguage Elements used in the same
ChapterDisplay MUST be ignored.
8.2.221. ChapCountry Element
name: "ChapCountry"
path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C
hapCountry)"
Lhomme, et al. Expires January 26, 2019 [Page 121]
Internet-Draft Matroska July 2018
id: "0x437E"
type: "string"
minver: "1"
documentation: The countries corresponding to the string, same 2
octets as in Internet domains. This Element MUST be ignored if the
ChapLanguageIETF Element is used within the same ChapterDisplay
Element.
8.2.222. ChapProcess Element
name: "ChapProcess"
path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)"
id: "0x6944"
type: "master"
minver: "1"
documentation: Contains all the commands associated to the Atom.
8.2.223. ChapProcessCodecID Element
name: "ChapProcessCodecID"
path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha
pProcessCodecID)"
id: "0x6955"
minOccurs: "1"
maxOccurs: "1"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
Lhomme, et al. Expires January 26, 2019 [Page 122]
Internet-Draft Matroska July 2018
8.2.224. ChapProcessPrivate Element
name: "ChapProcessPrivate"
path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha
pProcessPrivate)"
id: "0x450D"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: Some optional data attached to the ChapProcessCodecID
information. For ChapProcessCodecID = 1, it is the "DVD level"
equivalent.
8.2.225. ChapProcessCommand Element
name: "ChapProcessCommand"
path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Chap
ProcessCommand)"
id: "0x6911"
type: "master"
minver: "1"
documentation: Contains all the commands associated to the Atom.
8.2.226. ChapProcessTime Element
name: "ChapProcessTime"
path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha
pProcessCommand\ChapProcessTime)"
id: "0x6922"
minOccurs: "1"
maxOccurs: "1"
type: "uinteger"
Lhomme, et al. Expires January 26, 2019 [Page 123]
Internet-Draft Matroska July 2018
minver: "1"
documentation: Defines when the process command SHOULD be handled
restrictions:
+-------+-------------------------------+
| value | label |
+-------+-------------------------------+
| "0" | during the whole chapter |
| "1" | before starting playback |
| "2" | after playback of the chapter |
+-------+-------------------------------+
8.2.227. ChapProcessData Element
name: "ChapProcessData"
path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha
pProcessCommand\ChapProcessData)"
id: "0x6933"
minOccurs: "1"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: 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.
8.2.228. Tags Element
name: "Tags"
path: "0*(\Segment\Tags)"
id: "0x1254C367"
type: "master"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 124]
Internet-Draft Matroska July 2018
documentation: Element containing metadata describing Tracks,
Editions, Chapters, Attachments, or the Segment as a whole. A list
of valid tags can be found here.
8.2.229. Tag Element
name: "Tag"
path: "1*(\Segment\Tags\Tag)"
id: "0x7373"
minOccurs: "1"
type: "master"
minver: "1"
documentation: A single metadata descriptor.
8.2.230. Targets Element
name: "Targets"
path: "1*1(\Segment\Tags\Tag\Targets)"
id: "0x63C0"
minOccurs: "1"
maxOccurs: "1"
type: "master"
minver: "1"
documentation: Specifies which other elements the metadata
represented by the Tag applies to. If empty or not present, then the
Tag describes everything in the Segment.
8.2.231. TargetTypeValue Element
name: "TargetTypeValue"
path: "0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)"
id: "0x68CA"
Lhomme, et al. Expires January 26, 2019 [Page 125]
Internet-Draft Matroska July 2018
maxOccurs: "1"
default: "50"
type: "uinteger"
minver: "1"
documentation: A number to indicate the logical level of the target.
restrictions:
+-------+----------------------+------------------------------------+
| value | label | documentation |
+-------+----------------------+------------------------------------+
| "70" | COLLECTION | The highest hierarchical level |
| | | that tags can describe. |
| "60" | EDITION / ISSUE / | A list of lower levels grouped |
| | VOLUME / OPUS / | together. |
| | SEASON / SEQUEL | |
| "50" | ALBUM / OPERA / | The most common grouping level of |
| | CONCERT / MOVIE / | music and video (equals to an |
| | EPISODE / CONCERT | episode for TV series). |
| "40" | PART / SESSION | When an album or episode has |
| | | different logical parts. |
| "30" | TRACK / SONG / | The common parts of an album or |
| | CHAPTER | movie. |
| "20" | SUBTRACK / PART / | Corresponds to parts of a track |
| | MOVEMENT / SCENE | for audio (like a movement). |
| "10" | SHOT | The lowest hierarchy found in |
| | | music or movies. |
+-------+----------------------+------------------------------------+
8.2.232. TargetType Element
name: "TargetType"
path: "0*1(\Segment\Tags\Tag\Targets\TargetType)"
id: "0x63CA"
maxOccurs: "1"
type: "string"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 126]
Internet-Draft Matroska July 2018
documentation: An informational string that can be used to display
the logical level of the target like "ALBUM", "TRACK", "MOVIE",
"CHAPTER", etc (see TargetType).
restrictions:
+--------------+------------+
| value | label |
+--------------+------------+
| "COLLECTION" | COLLECTION |
| "EDITION" | EDITION |
| "ISSUE" | ISSUE |
| "VOLUME" | VOLUME |
| "OPUS" | OPUS |
| "SEASON" | SEASON |
| "SEQUEL" | SEQUEL |
| "ALBUM" | ALBUM |
| "OPERA" | OPERA |
| "CONCERT" | CONCERT |
| "MOVIE" | MOVIE |
| "EPISODE" | EPISODE |
| "PART" | PART |
| "SESSION" | SESSION |
| "TRACK" | TRACK |
| "SONG" | SONG |
| "CHAPTER" | CHAPTER |
| "SUBTRACK" | SUBTRACK |
| "PART" | PART |
| "MOVEMENT" | MOVEMENT |
| "SCENE" | SCENE |
| "SHOT" | SHOT |
+--------------+------------+
8.2.233. TagTrackUID Element
name: "TagTrackUID"
path: "0*(\Segment\Tags\Tag\Targets\TagTrackUID)"
id: "0x63C5"
default: "0"
type: "uinteger"
minver: "1"
Lhomme, et al. Expires January 26, 2019 [Page 127]
Internet-Draft Matroska July 2018
documentation: 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.
8.2.234. TagEditionUID Element
name: "TagEditionUID"
path: "0*(\Segment\Tags\Tag\Targets\TagEditionUID)"
id: "0x63C9"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.235. TagChapterUID Element
name: "TagChapterUID"
path: "0*(\Segment\Tags\Tag\Targets\TagChapterUID)"
id: "0x63C4"
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.236. TagAttachmentUID Element
name: "TagAttachmentUID"
path: "0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)"
id: "0x63C6"
Lhomme, et al. Expires January 26, 2019 [Page 128]
Internet-Draft Matroska July 2018
default: "0"
type: "uinteger"
minver: "1"
documentation: 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.
8.2.237. SimpleTag Element
name: "SimpleTag"
path: "1*(\Segment\Tags\Tag(1*(\SimpleTag)))"
id: "0x67C8"
minOccurs: "1"
type: "master"
recursive: "1"
minver: "1"
documentation: Contains general information about the target.
8.2.238. TagName Element
name: "TagName"
path: "1*1(\Segment\Tags\Tag\SimpleTag\TagName)"
id: "0x45A3"
minOccurs: "1"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: The name of the Tag that is going to be stored.
Lhomme, et al. Expires January 26, 2019 [Page 129]
Internet-Draft Matroska July 2018
8.2.239. TagLanguage Element
name: "TagLanguage"
path: "1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)"
id: "0x447A"
minOccurs: "1"
maxOccurs: "1"
default: "und"
type: "string"
minver: "1"
documentation: Specifies the language of the tag specified, in the
Matroska languages form. This Element MUST be ignored if the
TagLanguageIETF Element is used within the same SimpleTag Element.
8.2.240. TagLanguageIETF Element
name: "TagLanguageIETF"
path: "0*1(\Segment\Tags\Tag\SimpleTag\TagLanguageIETF)"
id: "0x447B"
maxOccurs: "1"
type: "string"
minver: "4"
documentation: Specifies the language used in the TagString according
to BCP 47 and using the IANA Language Subtag Registry. If this
Element is used, then any TagLanguage Elements used in the same
SimpleTag MUST be ignored.
8.2.241. TagDefault Element
name: "TagDefault"
path: "1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)"
id: "0x4484"
Lhomme, et al. Expires January 26, 2019 [Page 130]
Internet-Draft Matroska July 2018
minOccurs: "1"
maxOccurs: "1"
range: "0-1"
default: "1"
type: "uinteger"
minver: "1"
documentation: A boolean value to indicate if this is the default/
original language to use for the given tag.
8.2.242. TagString Element
name: "TagString"
path: "0*1(\Segment\Tags\Tag\SimpleTag\TagString)"
id: "0x4487"
maxOccurs: "1"
type: "utf-8"
minver: "1"
documentation: The value of the Tag.
8.2.243. TagBinary Element
name: "TagBinary"
path: "0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)"
id: "0x4485"
maxOccurs: "1"
type: "binary"
minver: "1"
documentation: The values of the Tag if it is binary. Note that this
cannot be used in the same SimpleTag as TagString.
Lhomme, et al. Expires January 26, 2019 [Page 131]
Internet-Draft Matroska July 2018
9. Matroska Element Ordering
Except for the "EBML Header" and the "CRC-32 Element", the EBML
specification does not require any particular storage order for
"Elements". The Matroska specification however defines mandates and
recommendations for ordering certain "Elements" in order to
facilitate better playback, seeking, and editing efficiency. This
section describes and offers rationale for ordering requirements and
recommendations for Matroska.
9.1. Top-Level Elements
The "Info Element" is the only REQUIRED "Top-Level Element" in a
Matroska file. To be playable, Matroska MUST also contain at least
one "Tracks Element" and "Cluster Element". The first "Info Element"
and the first "Tracks Element" MUST either be stored before the first
"Cluster Element" or both SHALL be referenced by a "SeekHead Element"
occurring before the first "Cluster Element".
It is possible to edit a Matroska file after it has been created.
For example, chapters, tags or attachments can be added. When new
"Top-Level Elements" are added to a Matroska file, the "SeekHead"
Element(s) MUST be updated so that the "SeekHead" Element(s) itemize
the identity and position of all "Top-Level Elements". Editing,
removing, or adding "Elements" to a Matroska file often requires that
some existing "Elements" be voided or extended; therefore, it is
RECOMMENDED to use "Void Elements" as padding in between "Top-Level
Elements".
9.2. CRC-32
As noted by the EBML specification, if a "CRC-32 Element" is used
then the "CRC-32 Element" MUST be the first ordered "Element" within
its "Parent Element". The Matroska specification recommends that
"CRC-32 Elements" SHOULD NOT be used as an immediate "Child Element"
of the "Segment Element"; however all "Top-Level Elements" of an
"EBML Document" SHOULD include a "CRC-32 Element" as a "Child
Element".
9.3. SeekHead
If used, the first "SeekHead Element" SHOULD be the first non-"CRC-32
Child Element" of the "Segment Element". If a second "SeekHead
Element" is used, then the first "SeekHead Element" MUST reference
the identity and position of the second "SeekHead". Additionally,
the second "SeekHead Element" MUST only reference "Cluster" Elements
and not any other "Top-Level Element" already contained within the
first "SeekHead Element". The second "SeekHead Element" MAY be
Lhomme, et al. Expires January 26, 2019 [Page 132]
Internet-Draft Matroska July 2018
stored in any order relative to the other "Top-Level Elements."
Whether one or two "SeekHead Element(s)" are used, the "SeekHead
Element(s)" MUST collectively reference the identity and position of
all "Top-Level Elements" except for the first "SeekHead Element".
It is RECOMMENDED that the first "SeekHead Element" be followed by a
"Void Element" to allow for the "SeekHead Element" to be expanded to
cover new "Top-Level Elements" that could be added to the Matroska
file, such as "Tags", "Chapters" and "Attachments Elements".
9.4. Cues (index)
The "Cues Element" is RECOMMENDED to optimize seeking access in
Matroska. It is programmatically simpler to add the "Cues Element"
after all "Cluster Elements" have been written because this does not
require a prediction of how much space to reserve before writing the
"Cluster Elements". However, storing the "Cues Element" before the
"Cluster Elements" can provide some seeking advantages. If the "Cues
Element" is present, then it SHOULD either be stored before the first
"Cluster Element" or be referenced by a "SeekHead Element".
9.5. Info
The first "Info Element" SHOULD occur before the first "Tracks
Element" and first "Cluster Element" except when referenced by a
"SeekHead Element".
9.6. Chapters Element
The "Chapters Element" SHOULD be placed before the "Cluster
Element(s)". The "Chapters Element" can be used during playback even
if the user does not need to seek. It immediately gives the user
information about what section is being read and what other sections
are available. In the case of Ordered Chapters it RECOMMENDED to
evaluate the logical linking even before playing. The "Chapters
Element" SHOULD be placed before the first "Tracks Element" and after
the first "Info Element".
9.7. Attachments
The "Attachments Element" is not intended to be used by default when
playing the file, but could contain information relevant to the
content, such as cover art or fonts. Cover art is useful even before
the file is played and fonts could be needed before playback starts
for initialization of subtitles. The "Attachments Element" MAY be
placed before the first "Cluster Element"; however if the
"Attachments Element" is likely to be edited, then it SHOULD be
placed after the last "Cluster Element".
Lhomme, et al. Expires January 26, 2019 [Page 133]
Internet-Draft Matroska July 2018
9.8. Tags
The "Tags Element" is most subject to changes after the file was
originally created. For easier editing, the "Tags Element" SHOULD be
placed at the end of the "Segment Element", even after the
"Attachments Element". On the other hand, it is inconvenient to have
to seek in the "Segment" for tags, especially for network streams.
So it's better if the "Tags Element" is found early in the stream.
When editing the "Tags Element", the original "Tags Element" at the
beginning can be overwritten with a "Void Element" and a new "Tags
Element" written at the end of the "Segment Element". The file size
will only marginally change.
9.9. Optimum layout from a muxer
o SeekHead
o Info
o Tracks
o Chapters
o Attachments
o Tags
o Clusters
o Cues
9.10. Optimum layout after editing tags
o SeekHead
o Info
o Tracks
o Chapters
o Attachments
o Void
o Clusters
o Cues
Lhomme, et al. Expires January 26, 2019 [Page 134]
Internet-Draft Matroska July 2018
o Tags
9.11. Optimum layout with Cues at the front
o SeekHead
o Info
o Tracks
o Chapters
o Attachments
o Tags
o Cues
o Clusters
9.12. Cluster Timestamp
The "Timestamp Element" MUST occur as in storage order before any
"SimpleBlock", "BlockGroup", or "EncryptedBlock" within the "Cluster
Element".
10. Chapters
10.1. Edition and Chapter Flags
10.1.1. Chapter Flags
Two "Chapter Flags" are defined to describe the behavior of the
"ChapterAtom Element": "ChapterFlagHidden" and "ChapterFlagEnabled".
If a "ChapterAtom Element" is the "Child Element" of another
"ChapterAtom Element" with a "Chapter Flag" set to "true", then the
"Child ChapterAtom Element" MUST be interpreted as having its same
"Chapter Flag" set to "true". If a "ChapterAtom Element" is the
"Child Element" of another "ChapterAtom Element" with a "Chapter
Flag" set to "false" or if the "ChapterAtom Element" does not have a
"ChapterAtom Element" as its "Parent Element", then it MUST be
interpreted according to its own "Chapter Flag".
As an example, consider a "Parent ChapterAtom Element" that has its
"ChapterFlagHidden" set to "true" and also contains two child
"ChapterAtoms", the first with "ChapterFlagHidden" set to "true" and
the second with "ChapterFlagHidden" either set to "false" or not
Lhomme, et al. Expires January 26, 2019 [Page 135]
Internet-Draft Matroska July 2018
present at all (in which case the default value of the Element
applies, which is "false"). Since the parent "ChapterAtom" has its
"ChapterFlagHidden" set to "true" then all of its children
"ChapterAtoms" MUST also be interpreted as if their
"ChapterFlagHidden" is also set to "true". However, if a "Control
Track" toggles the parent's "ChapterFlagHidden" flag to "false", then
only the parent "ChapterAtom" and its second child "ChapterAtom" MUST
be interpreted as if "ChapterFlagHidden" is set to "false". The
first child "ChapterAtom" which has the "ChapterFlagHidden" flag set
to "true" retains its value until its value is toggled to "false" by
a "Control Track".
10.1.2. Edition Flags
Three "Edition Flags" are defined to describe the behavior of the
"EditionEntry Element": "EditionFlagHidden", "EditionFlagDefault" and
"EditionFlagOrdered".
10.1.2.1. EditionFlagHidden
The "EditionFlagHidden Flag" behaves similarly to the
"ChapterFlagHidden Flag": if "EditionFlagHidden" is set to "true",
its "Child ChapterAtoms Elements" MUST also be interpreted as if
their "ChapterFlagHidden" is also set to "true", regardless of their
own "ChapterFlagHidden Flags". If "EditionFlagHidden" is toggled by
a "Control Track" to "false", the "ChapterFlagHidden Flags" of the
"Child ChapterAtoms Elements" SHALL determine whether the
"ChapterAtom" is hidden or not.
10.1.2.2. EditionFlagDefault
It is RECOMMENDED that no more than one "Edition" have an
"EditionFlagDefault Flag" set to "true". The first "Edition" with
both the "EditionFlagDefault Flag" set to "true" and the
"EditionFlagHidden Flag" set to "false" is the "Default Edition".
When all "EditionFlagDefault Flags" are set to "false", then the
first "Edition" is the "Default Edition".
10.1.2.3. EditionFlagOrdered
The "EditionFlagOrdered Flag" is a significant feature as it enables
an "Edition" of "Ordered Chapters" which defines and arranges a
virtual timeline rather than simply labeling points within the
timeline. For example, with "Editions" of "Ordered Chapters" a
single "Matroska file" can present multiple edits of a film without
duplicating content. Alternatively if a videotape is digitized in
full, one "Ordered Edition" could present the full content (including
colorbars, countdown, slate, a feature presentation, and black
Lhomme, et al. Expires January 26, 2019 [Page 136]
Internet-Draft Matroska July 2018
frames), while another "Edition" of "Ordered Chapters" can use
"Chapters" that only mark the intended presentation with the
colorbars and other ancillary visual information excluded. If an
"Edition" of "Ordered Chapters" is enabled then the "Matroska Player"
MUST play those Chapters in their stored order from the timestamp
marked in the "ChapterTimeStart Element" to the timestamp marked in
to "ChapterTimeEnd Element".
If the "EditionFlagOrdered Flag" is set to "false", "Simple Chapters"
are used and only the "ChapterTimeStart" of a "Chapter" is used as
chapter mark to jump to the predefined point in the timeline. With
"Simple Chapters", a "Matroska Player" MUST ignore certain "Chapter
Elements". All these elements are now informational only.
The following list shows the different usage of "Chapter Elements"
between an ordered and non-ordered "Edition".
Chapter elements / ordered Edition | False | True ChapterUID | X | X
ChapterStringUID | X | X ChapterTimeStart | X | X ChapterTimeEnd |
- | X ChapterFlagHidden | X | X ChapterFlagEnabled | X | X
ChapterSegmentUID | - | X ChapterSegmentEditionUID | - | X
ChapterPhysicalEquiv | X | X ChapterTrack | - | X ChapterDisplay |
X | X ChapProcess | - | X
Furthermore there are other EBML "Elements" which could be used if
the "EditionFlagOrdered Flag" is set to "true".
Other elements / ordered Edition | False | True Info/SegmentFamily |
- | X Info/ChapterTranslate | - | X Track/TrackTranslate | - | X
These other "Elements" belong to the Matroska DVD menu system and are
only used when the "ChapProcessCodecID Element" is set to 1.
10.1.2.3.1. Ordered-Edition and Matroska Segment-Linking
o Hard Linking: "Ordered-Chapters" supersedes the "Hard Linking".
o Soft Linking: In this complex system "Ordered Chapters" are
REQUIRED and a "Chapter CODEC" MUST interpret the "ChapProcess" of
all chapters.
o Medium Linking: "Ordered Chapters" are used in a normal way and
can be combined with the "ChapterSegmentUID" element which
establishes a link to another Matroska file/Segment.
See Section 23) for more information about "Hard Linking", "Soft
Linking" and "Medium Linking".
Lhomme, et al. Expires January 26, 2019 [Page 137]
Internet-Draft Matroska July 2018
10.2. Menu features
The menu features are handled like a _chapter codec_. That means each
codec has a type, some private data and some data in the chapters.
The type of the menu system is defined by the "ChapProcessCodecID"
parameter. For now only 2 values are supported : 0 matroska script,
1 menu borrowed from the DVD. The private data depend on the type of
menu system (stored in ChapProcessPrivate), idem for the data in the
chapters (stored in ChapProcessData).
10.2.1. Matroska Script (0)
This is the case when "ChapProcessCodecID" = 0. This is a script
language build for Matroska purposes. The inspiration comes from
ActionScript, javascript and other similar scripting languages. The
commands are stored as text commands, in UTF-8. The syntax is C
like, with commands spanned on many lines, each terminating with a
";". You can also include comments at the end of lines with "//" or
comment many lines using "/* */". The scripts are stored in
ChapProcessData. For the moment ChapProcessPrivate is not used.
The one and only command existing for the moment is "GotoAndPlay(
ChapterUID );". As the same suggests, it means that when this
command is encountered, the "Matroska Player" SHOULD jump to the
"Chapter" specified by the UID and play it.
10.2.2. DVD menu (1)
This is the case when "ChapProcessCodecID" = 1. Each level of a
chapter corresponds to a logical level in the DVD system that is
stored in the first octet of the ChapProcessPrivate. This DVD
hierarchy is as follows:
ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible |
Comment 0x30 | SS | DVD domain | - | First Play, Video Manager, Video
Title 0x2A | LU | Language Unit | - | Contains only PGCs 0x28 | TT |
Title | - | Contains only PGCs 0x20 | PGC | Program Group Chain
(PGC) | * | 0x18 | PG | Program 1 / Program 2 / Program 3 | - |
0x10 | PTT | Part Of Title 1 / Part Of Title 2 | - | Equivalent to
the chapters on the sleeve. 0x08 | CN | Cell 1 / Cell 2 / Cell 3 /
Cell 4 / Cell 5 / Cell 6 | - |
You can also recover wether a Segment is a Video Manager (VMG), Video
Title Set (VTS) or Video Title Set Menu (VTSM) from the
ChapterTranslateID element found in the Segment Info. This field
uses 2 octets as follows:
Lhomme, et al. Expires January 26, 2019 [Page 138]
Internet-Draft Matroska July 2018
1. Domain Type: 0 for VMG, the domain number for VTS and VTSM
2. Domain Value: 0 for VMG and VTSM, 1 for the VTS source.
For instance, the menu part from VTS_01_0.VOB would be coded [1,0]
and the content part from VTS_02_3.VOB would be [2,1]. The VMG is
always [0,0]
The following octets of ChapProcessPrivate are as follows:
Octet 1 | DVD Name | Following Octets 0x30 | SS | Domain name code
(1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M)
number (2) 0x2A | LU | Language code (2) + Language extension (1)
0x28 | TT | global Title number (2) + corresponding TTN of the VTS
(1) 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User
Operations (4) 0x18 | PG | Program number (2) 0x10 | PTT | PTT-
chapter number (1) 0x08 | CN | Cell number [VOB ID(2)][Cell
ID(1)][Angle Num(1)]
If the level specified in ChapProcessPrivate is a PGC (0x20), there
is an octet called the Playback Type, specifying the kind of PGC
defined:
o 0x00: entry only/basic PGC
o 0x82: Title+Entry Menu (only found in the Video Manager domain)
o 0x83: Root Menu (only found in the VTSM domain)
o 0x84: Subpicture Menu (only found in the VTSM domain)
o 0x85: Audio Menu (only found in the VTSM domain)
o 0x86: Angle Menu (only found in the VTSM domain)
o 0x87: Chapter Menu (only found in the VTSM domain)
The next 4 following octets correspond to the User Operation flags
[17] in the standard PGC. When a bit is set, the command SHOULD be
disabled.
ChapProcessData contains the pre/post/cell commands in binary format
as there are stored on a DVD. There is just an octet preceding these
data to specify the number of commands in the element. As follows:
[# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)].
Lhomme, et al. Expires January 26, 2019 [Page 139]
Internet-Draft Matroska July 2018
More information on the DVD commands and format on DVD-replica [18],
where we got most of the info about it. You can also get information
on DVD from the DVDinfo project [19].
10.3. Example 1 : basic chaptering
In this example a movie is split in different chapters. It could
also just be an audio file (album) on which each track corresponds to
a chapter.
o 00000ms - 05000ms : Intro
o 05000ms - 25000ms : Before the crime
o 25000ms - 27500ms : The crime
o 27500ms - 38000ms : The killer arrested
o 38000ms - 43000ms : Credits
This would translate in the following matroska form :
<Chapters>
<EditionEntry>
<EditionUID>16603393396715046047</EditionUID>
<ChapterAtom>
<ChapterUID>1193046</ChapterUID>
<ChapterTimeStart>0</ChapterTimeStart>
<ChapterTimeEnd>5000000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Intro</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>2311527</ChapterUID>
<ChapterTimeStart>5000000000</ChapterTimeStart>
<ChapterTimeEnd>25000000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Before the crime</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterDisplay>
<ChapString>Avant le crime</ChapString>
<ChapLanguage>fra</ChapLanguage>
</ChapterDisplay>
Lhomme, et al. Expires January 26, 2019 [Page 140]
Internet-Draft Matroska July 2018
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>3430008</ChapterUID>
<ChapterTimeStart>25000000000</ChapterTimeStart>
<ChapterTimeEnd>27500000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>The crime</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterDisplay>
<ChapString>Le crime</ChapString>
<ChapLanguage>fra</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>4548489</ChapterUID>
<ChapterTimeStart>27500000000</ChapterTimeStart>
<ChapterTimeEnd>38000000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>After the crime</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterDisplay>
<ChapString>Apres le crime</ChapString>
<ChapLanguage>fra</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>5666960</ChapterUID>
<ChapterTimeStart>38000000000</ChapterTimeStart>
<ChapterTimeEnd>43000000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Credits</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterDisplay>
<ChapString>Generique</ChapString>
<ChapLanguage>fra</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
Lhomme, et al. Expires January 26, 2019 [Page 141]
Internet-Draft Matroska July 2018
<EditionFlagDefault>0</EditionFlagDefault>
<EditionFlagHidden>0</EditionFlagHidden>
</EditionEntry>
</Chapters>
10.4. Example 2 : nested chapters
In this example an (existing) album is split into different chapters,
and one of them contain another splitting.
10.4.1. The Micronauts "Bleep To Bleep"
o 00:00 - 12:28 : Baby Wants To Bleep/Rock
* 00:00 - 04:38 : Baby wants to bleep (pt.1)
* 04:38 - 07:12 : Baby wants to rock
* 07:12 - 10:33 : Baby wants to bleep (pt.2)
* 10:33 - 12:28 : Baby wants to bleep (pt.3)
o 12:30 - 19:38 : Bleeper_O+2
o 19:40 - 22:20 : Baby wants to bleep (pt.4)
o 22:22 - 25:18 : Bleep to bleep
o 25:20 - 33:35 : Baby wants to bleep (k)
o 33:37 - 44:28 : Bleeper
<Chapters>
<EditionEntry>
<EditionUID>1281690858003401414</EditionUID>
<ChapterAtom>
<ChapterUID>1</ChapterUID>
<ChapterTimeStart>0</ChapterTimeStart>
<ChapterTimeEnd>748000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to Bleep/Rock</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterAtom>
<ChapterUID>2</ChapterUID>
<ChapterTimeStart>0</ChapterTimeStart>
<ChapterTimeEnd>278000000</ChapterTimeEnd>
<ChapterDisplay>
Lhomme, et al. Expires January 26, 2019 [Page 142]
Internet-Draft Matroska July 2018
<ChapString>Baby wants to bleep (pt.1)</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>3</ChapterUID>
<ChapterTimeStart>278000000</ChapterTimeStart>
<ChapterTimeEnd>432000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to rock</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>4</ChapterUID>
<ChapterTimeStart>432000000</ChapterTimeStart>
<ChapterTimeEnd>633000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to bleep (pt.2)</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>5</ChapterUID>
<ChapterTimeStart>633000000</ChapterTimeStart>
<ChapterTimeEnd>748000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to bleep (pt.3)</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>6</ChapterUID>
<ChapterTimeStart>750000000</ChapterTimeStart>
<ChapterTimeEnd>1178500000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Bleeper_O+2</ChapString>
Lhomme, et al. Expires January 26, 2019 [Page 143]
Internet-Draft Matroska July 2018
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>7</ChapterUID>
<ChapterTimeStart>1180500000</ChapterTimeStart>
<ChapterTimeEnd>1340000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to bleep (pt.4)</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>8</ChapterUID>
<ChapterTimeStart>1342000000</ChapterTimeStart>
<ChapterTimeEnd>1518000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Bleep to bleep</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>9</ChapterUID>
<ChapterTimeStart>1520000000</ChapterTimeStart>
<ChapterTimeEnd>2015000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Baby wants to bleep (k)</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>10</ChapterUID>
<ChapterTimeStart>2017000000</ChapterTimeStart>
<ChapterTimeEnd>2668000000</ChapterTimeEnd>
<ChapterDisplay>
<ChapString>Bleeper</ChapString>
<ChapLanguage>eng</ChapLanguage>
</ChapterDisplay>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
Lhomme, et al. Expires January 26, 2019 [Page 144]
Internet-Draft Matroska July 2018
</ChapterAtom>
<EditionFlagDefault>0</EditionFlagDefault>
<EditionFlagHidden>0</EditionFlagHidden>
</EditionEntry>
</Chapters>
11. Attachments
Matroska supports storage of related files and data in the
"Attachments Element" (a "Top-Level Element"). "Attachment Elements"
can be used to store related cover art, font files, transcripts,
reports, error recovery files, picture or text-based annotations,
copies of specifications, or other ancillary files related to the
"Segment".
"Matroska Readers" MUST NOT execute files stored as "Attachment
Elements".
11.1. Cover Art
This section defines a set of guidelines for the storage of cover art
in Matroska files. A "Matroska Reader" MAY use embedded cover art to
display a representational still-image depiction of the multimedia
contents of the Matroska file.
Only JPEG and PNG image formats SHOULD be used for cover art
pictures.
There can be two different covers for a movie/album: a portrait style
(e.g., a DVD case) and a landscape style (e.g., a wide banner ad).
There can be two versions of the same cover, the "normal cover" and
the "small cover". The dimension of the "normal cover" SHOULD be 600
pixels on the smallest side (for example, 960x600 for landscape,
600x800 for portrait, or 600x600 for square). The dimension of the
"small cover" SHOULD be 120 pixels on the smallest side (for example,
192x120 or 120x160).
Versions of cover art can be differentiated by the filename, which is
stored in the "FileName Element". The default filename of the
"normal cover" in square or portrait mode is "cover.(jpg|png)". When
stored, the "normal cover" SHOULD be the first Attachment in storage
order. The "small cover" SHOULD be prefixed with "small_", such as
"small_cover.(jpg|png)". The landscape variant SHOULD be suffixed
with "_land", such as "cover_land.(jpg|png)". The filenames are case
sensitive.
Lhomme, et al. Expires January 26, 2019 [Page 145]
Internet-Draft Matroska July 2018
The following table provides examples of file names for cover art in
Attachments.
FileName | Image Orientation | Pixel Length of Smallest Side
cover.jpg | Portrait or square | 600 small_cover.png | Portrait or
square | 120 cover_land.png | Landscape | 600 small_cover_land.jpg |
Landscape | 120
12. 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" which each 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 which provide any "Matroska Reader" with additional
information to use in the optimization of seeking performance.
12.1. Recommendations
The following recommendations are provided to optimize Matroska
performance.
o Unless Matroska is used as a live stream, it SHOULD contain a
"Cues Element".
o For each video track, each keyframe SHOULD be referenced by a
"CuePoint Element".
o It is RECOMMENDED to not reference non-keyframes of video tracks
in "Cues" unless it references a "Cluster Element" which contains
a "CodecState Element" but no keyframes.
o For each subtitle track present, each subtitle frame SHOULD be
referenced by a "CuePoint Element" with a "CueDuration Element".
o References to audio tracks MAY be skipped in "CuePoint Elements"
if a video track is present. When included the "CuePoint
Elements" SHOULD reference audio keyframes at most once every 500
milliseconds.
o If the referenced frame is not stored within the first
"SimpleBlock" or first "BlockGroup" within its "Cluster Element",
then the "CueRelativePosition Element" SHOULD be written to
reference where in the "Cluster" the reference frame is stored.
Lhomme, et al. Expires January 26, 2019 [Page 146]
Internet-Draft Matroska July 2018
o If a "CuePoint Element" references "Cluster Element" that includes
a "CodecState Element", then that "CuePoint Element" MUST use a
"CueCodecState Element".
o "CuePoint Elements" SHOULD be numerically sorted in storage order
by the value of the "CueTime Element".
13. Matroska Streaming
In Matroska, there are two kinds of streaming: file access and
livestreaming.
13.1. File Access
File access can simply be reading a file located on your computer,
but also includes accessing a file from an HTTP (web) server or CIFS
(Windows share) server. These protocols are usually safe from
reading errors and seeking in the stream is possible. However, when
a file is stored far away or on a slow server, seeking can be an
expensive operation and SHOULD be avoided. The following guidelines,
when followed, help reduce the number of seeking operations for
regular playback and also have the playback start quickly without a
lot of data needed to read first (like a "Cues Element", "Attachment
Element" or "SeekHead Element").
Matroska, having a small overhead, is well suited for storing music/
videos on file servers without a big impact on the bandwidth used.
Matroska does not require the index to be loaded before playing,
which allows playback to start very quickly. The index can be loaded
only when seeking is requested the first time.
13.2. Livestreaming
Livestreaming is the equivalent of television broadcasting on the
internet. There are 2 families of servers for livestreaming: RTP/
RTSP and HTTP. Matroska is not meant to be used over RTP. RTP
already has timing and channel mechanisms that would be wasted if
doubled in Matroska. Additionally, having the same information at
the RTP and Matroska level would be a source of confusion if they do
not match. Livestreaming of Matroska over HTTP (or any other plain
protocol based on TCP) is possible.
A live Matroska stream is different from a file because it usually
has no known end (only ending when the client disconnects). For
this, all bits of the "size" portion of the "Segment Element" MUST be
set to 1. Another option is to concatenate "Segment Elements" with
known sizes, one after the other. This solution allows a change of
Lhomme, et al. Expires January 26, 2019 [Page 147]
Internet-Draft Matroska July 2018
codec/resolution between each segment. For example, this allows for
a switch between 4:3 and 16:9 in a television program.
When "Segment Elements" are continuous, certain "Elements", like
"MetaSeek", "Cues", "Chapters", and "Attachments", MUST NOT be used.
It is possible for a "Matroska Player" to detect that a stream is not
seekable. If the stream has neither a "MetaSeek" list or a "Cues"
list at the beginning of the stream, it SHOULD be considered non-
seekable. Even though it is possible to seek blindly forward in the
stream, it is NOT RECOMMENDED.
In the context of live radio or web TV, it is possible to "tag" the
content while it is playing. The "Tags Element" can be placed
between "Clusters" each time it is necessary. In that case, the new
"Tags Element" MUST reset the previously encountered "Tags Elements"
and use the new values instead.
14. Menu Specifications
This document is a _draft of the Menu system_ that will be the
default one in "Matroska". As it will just be composed of a Control
Track, it will be seen as a "codec" and could be replaced later by
something else if needed.
A menu is like what you see on DVDs, when you have some screens to
select the audio format, subtitles or scene selection.
14.1. Requirements
What we'll try to have is a system that can do almost everything done
on a DVD, or more, or better, or drop the unused features if
necessary.
As the name suggests, a Control Track is a track that can control the
playback of the file and/or all the playback features. To make it as
simple as possible for "Matroska Players", the Control Track will
just give orders to the "Matroska Player" and get the actions
associated with the highlights/hotspots.
14.1.1. Highlights/Hotspots
A highlight is basically a rectangle/key associated with an action
UID. When that rectangle/key is activated, the "Matroska Player"
send the UID of the action to the Control Track handler (codec). The
fact that it can also be a key means that even for audio only files,
a keyboard shortcut or button panel could be used for menus. But in
Lhomme, et al. Expires January 26, 2019 [Page 148]
Internet-Draft Matroska July 2018
that case, the hotspot will have to be associated with a name to
display.
This highlight is sent from the Control Track to the "Matroska
Player". Then the "Matroska Player" has to handle that highlight
until it's deactivated (see Section 14.1.2).
The highlight contains a UID of the action, a displayable name (UTF-
8), an associated key (list of keys to be defined, probably
up/down/left/right/select), a screen position/range and an image to
display. The image will be displayed either when the user place the
mouse over the rectangle (or any other shape), or when an option of
the screen is selected (not activated). There could be a second
image used when the option is activated. And there could be a third
image that can serve as background. This way you could have a still
image (like in some DVDs) for the menu and behind that image blank
video (small bitrate).
When a highlight is activated by the user, the "Matroska Player" has
to send the UID of the action to the Control Track. Then the Control
Track codec will handle the action and possibly give new orders to
the "Matroska Player".
The format used for storing images SHOULD be extensible. For the
moment we'll use PNG and BMP, both with alpha channel.
14.1.2. Playback features
All the following features will be sent from the Control Track to the
"Matroska Player" :
o Jump to chapter (UID, prev, next, number)
o Disable all tracks of a kind (audio, video, subtitle)
o Enable track UID (the kind doesn't matter)
o Define/Disable a highlight
o Enable/Disable jumping
o Enable/Disable track selection of a kind
o Select Edition ID (see chapters)
o Pause playback
o Stop playback
Lhomme, et al. Expires January 26, 2019 [Page 149]
Internet-Draft Matroska July 2018
o Enable/Disable a Chapter UID
o Hide/Unhide a Chapter UID
All the actions will be written in a normal Matroska track, with a
timestamp. A "Menu Frame" SHOULD be able to contain more that one
action/highlight for a given timestamp. (to be determined, EBML
format structure)
14.1.3. Player requirements
Some "Matroska Players" might not support the control track. That
mean they will play the active/looped parts as part of the data. So
I suggest putting the active/looped parts of a movie at the end of a
movie. When a Menu-aware "Matroska Player" encounter the default
Control Track of a "Matroska" file, the first order SHOULD be to jump
at the start of the active/looped part of the movie.
14.2. Working Graph
Matroska Source file -> Control Track <-> Player.
-> other tracks -> rendered
15. Unknown elements
Matroska is based upon the principle that a reading application does
not have to support 100% of the specifications in order to be able to
play the file. A Matroska file therefore contains version indicators
that tell a reading application what to expect.
It is possible and valid to have the version fields indicate that the
file contains Matroska "Elements" from a higher specification version
number while signaling that a reading application MUST only support a
lower version number properly in order to play it back (possibly with
a reduced feature set). For example, a reading application
supporting at least Matroska version "V" reading a file whose
"DocTypeReadVersion" field is equal to or lower than "V" MUST skip
Matroska/EBML "Elements" it encounters but does not know about if
that unknown element fits into the size constraints set by the
current "Parent Element".
16. Default Values
The default value of an "Element" is assumed when not present in the
data stream. It is assumed only in the scope of its "Parent
Element". For example, the "Language Element" is in the scope of the
"Track Element". If the "Parent Element" is not present or assumed,
then the "Child Element" cannot be assumed.
Lhomme, et al. Expires January 26, 2019 [Page 150]
Internet-Draft Matroska July 2018
17. DefaultDecodedFieldDuration
The "DefaultDecodedFieldDuration Element" can signal to the
displaying application how often fields of a video sequence will be
available for displaying. It can be used for both interlaced and
progressive content. If the video sequence is signaled as
interlaced, then the period between two successive fields at the
output of the decoding process equals "DefaultDecodedFieldDuration".
For video sequences signaled as progressive, it is twice the value of
"DefaultDecodedFieldDuration".
These values are valid at the end of the decoding process before
post-processing (such as deinterlacing or inverse telecine) is
applied.
Examples:
o Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns
o PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns
o N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns
o hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60
encoded interlaced fields per second)
o soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48
encoded interlaced fields per second, with "repeat_first_field =
1")
18. Encryption
Encryption in Matroska is designed in a very generic style to allow
people to implement whatever form of encryption is best for them. It
is possible to use the encryption framework in Matroska as a type of
DRM (Digital Rights Management).
Because encryption occurs within the "Block Element", it is possible
to manipulate encrypted streams without decrypting them. The streams
could potentially be copied, deleted, cut, appended, or any number of
other possible editing techniques without decryption. The data can
be used without having to expose it or go through the decrypting
process.
Encryption can also be layered within Matroska. This means that two
completely different types of encryption can be used, requiring two
separate keys to be able to decrypt a stream.
Lhomme, et al. Expires January 26, 2019 [Page 151]
Internet-Draft Matroska July 2018
Encryption information is stored in the "ContentEncodings Element"
under the "ContentEncryption Element".
19. Image cropping
The "PixelCrop Elements" ("PixelCropTop", "PixelCropBottom",
"PixelCropRight" and "PixelCropLeft") indicate when and by how much
encoded videos frames SHOULD be cropped for display. These Elements
allow edges of the frame that are not intended for display, such as
the sprockets of a full-frame film scan or the VANC area of a
digitized analog videotape, to be stored but hidden. "PixelCropTop"
and "PixelCropBottom" store an integer of how many rows of pixels
SHOULD be cropped from the top and bottom of the image
(respectively). "PixelCropLeft" and "PixelCropRight" store an
integer of how many columns of pixels SHOULD be cropped from the left
and right of the image (respectively). For example, a pillar-boxed
video that stores a 1440x1080 visual image within the center of a
padded 1920x1080 encoded image MAY set both "PixelCropLeft" and
"PixelCropRight" to "240", so that a "Matroska Player" SHOULD crop
off 240 columns of pixels from the left and right of the encoded
image to present the image with the pillar-boxes hidden.
20. Matroska versioning
The "EBML Header" of each Matroska document informs the reading
application on what version of Matroska to expect. The "Elements"
within "EBML Header" with jurisdiction over this information are
"DocTypeVersion" and "DocTypeReadVersion".
"DocTypeVersion" MUST be equal to or greater than the highest
Matroska version number of any "Element" present in the Matroska
file. For example, a file using the "SimpleBlock Element" MUST have
a "DocTypeVersion" equal to or greater than 2. A file containing
"CueRelativePosition" Elements MUST have a "DocTypeVersion" equal to
or greater than 4.
The "DocTypeReadVersion" MUST contain the minimum version number that
a reading application can minimally support in order to play the file
back -- optionally with a reduced feature set. For example, if a
file contains only "Elements" of version 2 or lower except for
"CueRelativePosition" (which is a version 4 Matroska "Element"), then
"DocTypeReadVersion" SHOULD still be set to 2 and not 4 because
evaluating "CueRelativePosition" is not necessary for standard
playback -- it makes seeking more precise if used.
"DocTypeVersion" MUST always be equal to or greater than
"DocTypeReadVersion".
Lhomme, et al. Expires January 26, 2019 [Page 152]
Internet-Draft Matroska July 2018
A reading application supporting Matroska version "V" MUST NOT refuse
to read an application with "DocReadTypeVersion" equal to or lower
than "V" even if "DocTypeVersion" is greater than "V". See also the
note about Section 15.
21. MIME Types
There is no IETF endorsed MIME type for Matroska files. These
definitions can be used:
o .mka : Matroska audio "audio/x-matroska"
o .mkv : Matroska video "video/x-matroska"
o .mk3d : Matroska 3D video "video/x-matroska-3d"
22. Segment Position
The "Segment Position" of an "Element" refers to the position of the
first octet of the "Element ID" of that "Element", measured in
octets, from the beginning of the "Element Data" section of the
containing "Segment Element". In other words, the "Segment Position"
of an "Element" is the distance in octets from the beginning of its
containing "Segment Element" minus the size of the "Element ID" and
"Element Data Size" of that "Segment Element". The "Segment
Position" of the first "Child Element" of the "Segment Element" is 0.
An "Element" which is not stored within a "Segment Element", such as
the "Elements" of the "EBML Header", do not have a "Segment
Position".
22.1. Segment Position Exception
"Elements" that are defined to store a "Segment Position" MAY define
reserved values to indicate a special meaning.
22.2. Example of Segment Position
This table presents an example of "Segment Position" by showing a
hexadecimal representation of a very small Matroska file with labels
to show the offsets in octets. The file contains a "Segment Element"
with an "Element ID" of "0x18538067" and a "MuxingApp Element" with
an "Element ID" of "0x4D80".
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67|
20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66|
Lhomme, et al. Expires January 26, 2019 [Page 153]
Internet-Draft Matroska July 2018
In the above example, the "Element ID" of the "Segment Element" is
stored at offset 16, the "Element Data Size" of the "Segment Element"
is stored at offset 20, and the "Element Data" of the "Segment
Element" is stored at offset 21.
The "MuxingApp Element" is stored at offset 26. Since the "Segment
Position" of an "Element" is calculated by subtracting the position
of the "Element Data" of the containing "Segment Element" from the
position of that "Element", the "Segment Position" of "MuxingApp
Element" in the above example is "26 - 21" or "5".
23. Linked Segments
Matroska provides several methods to link two or many "Segment
Elements" together to create a "Linked Segment". A "Linked Segment"
is a set of multiple "Segments" related together into a single
presentation by using Hard Linking, Medium Linking, or Soft Linking.
All "Segments" within a "Linked Segment" MUST utilize the same track
numbers and timescale. All "Segments" within a "Linked Segment" MUST
be stored within the same directory. All "Segments" within a "Linked
Segment" MUST store a "SegmentUID".
23.1. Hard Linking
Hard Linking (also called splitting) is the process of creating a
"Linked Segment" by relating multiple "Segment Elements" using the
"PrevUID" and "NextUID Elements". Within a "Linked Segment", the
timestamps of each "Segment" MUST follow consecutively in linking
order. With Hard Linking, the chapters of any "Segment" within the
"Linked Segment" MUST only reference the current "Segment". With
Hard Linking, the "NextUID" and "PrevUID" MUST reference the
respective "SegmentUID" values of the next and previous "Segments".
The first "Segment" of a "Linked Segment" MUST have a "NextUID
Element" and MUST NOT have a "PrevUID Element". The last "Segment"
of a "Linked Segment" MUST have a "PrevUID Element" and MUST NOT have
a "NextUID Element". The middle "Segments" of a "Linked Segment"
MUST have both a "NextUID Element" and a "PrevUID Element".
As an example, four "Segments" can be Hard Linked as a "Linked
Segment" through cross-referencing each other with "SegmentUID",
"PrevUID", and "NextUID", as in this table.
Lhomme, et al. Expires January 26, 2019 [Page 154]
Internet-Draft Matroska July 2018
+--------+------------------+-------------------+-------------------+
| file | SegmentUID | PrevUID | NextUID |
| name | | | |
+--------+------------------+-------------------+-------------------+
| "start | "71000c23cd31099 | n/a | "a77b3598941cb803 |
| .mkv" | 853fbc94dd984a5d | | eac0fcdafe44fac9" |
| | d" | | |
| "middl | "a77b3598941cb80 | "71000c23cd310998 | "6c92285fa6d3e827 |
| e.mkv" | 3eac0fcdafe44fac | 53fbc94dd984a5dd" | b198d120ea3ac674" |
| | 9" | | |
| "end.m | "6c92285fa6d3e82 | "a77b3598941cb803 | n/a |
| kv" | 7b198d120ea3ac67 | eac0fcdafe44fac9" | |
| | 4" | | |
+--------+------------------+-------------------+-------------------+
23.2. Medium Linking
Medium Linking creates relationships between "Segments" using Ordered
Chapters and the "ChapterSegmentUID Element". A "Segment Edition"
with Ordered Chapters MAY contain "Chapter Elements" that reference
timestamp ranges from other "Segments". The "Segment" referenced by
the Ordered Chapter via the "ChapterSegmentUID Element" SHOULD be
played as part of a Linked Segment. The timestamps of Segment
content referenced by Ordered Chapters MUST be adjusted according to
the cumulative duration of the the previous Ordered Chapters.
As an example a file named "intro.mkv" could have a "SegmentUID" of
"0xb16a58609fc7e60653a60c984fc11ead". Another file called
"program.mkv" could use a Chapter Edition that contains two Ordered
Chapters. The first chapter references the "Segment" of "intro.mkv"
with the use of a "ChapterSegmentUID", "ChapterSegmentEditionUID",
"ChapterTimeStart" and optionally a "ChapterTimeEnd" element. The
second chapter references content within the "Segment" of
"program.mkv". A "Matroska Player" SHOULD recognize the "Linked
Segment" created by the use of "ChapterSegmentUID" in an enabled
"Edition" and present the reference content of the two "Segments"
together.
23.3. Soft Linking
Soft Linking is used by codec chapters. They can reference another
"Segment" and jump to that "Segment". The way the "Segments" are
described are internal to the chapter codec and unknown to the
Matroska level. But there are "Elements" within the "Info Element"
(such as "ChapterTranslate") that can translate a value representing
a "Segment" in the chapter codec and to the current "SegmentUID".
All "Segments" that could be used in a "Linked Segment" in this way
SHOULD be marked as members of the same family via the "SegmentFamily
Lhomme, et al. Expires January 26, 2019 [Page 155]
Internet-Draft Matroska July 2018
Element", so that the "Matroska Player" can quickly switch from one
to the other.
24. Track Flags
24.1. Default flag
The "default track" flag is a hint for a "Matroska Player" and SHOULD
always be changeable by the user. If the user wants to see or hear a
track of a certain kind (audio, video, subtitles) and hasn't chosen a
specific track, the "Matroska Player" SHOULD use the first track of
that kind whose "default track" flag is set to "1". If no such track
is found then the first track of this kind SHOULD be chosen.
Only one track of a kind MAY have its "default track" flag set in a
segment. If a track entry does not contain the "default track" flag
element then its default value "1" is to be used.
24.2. Forced flag
The "forced" flag tells the "Matroska Player" that it MUST display/
play this track or another track of the same kind that also has its
"forced" flag set. When there are multiple "forced" tracks, the
"Matroska Player" SHOULD determine the track based upon the language
of the forced flag or use the default flag if no track matches the
use languages. Another track of the same kind without the "forced"
flag may be use simultaneously with the "forced" track (like DVD
subtitles for example).
24.3. Track Operation
"TrackOperation" allows combining multiple tracks to make a virtual
one. It uses two separate system to combine tracks. One to create a
3D "composition" (left/right/background planes) and one to simplify
join two tracks together to make a single track.
A track created with "TrackOperation" is a proper track with a UID
and all its flags. However the codec ID is meaningless because each
"sub" track needs to be decoded by its own decoder before the
"operation" is applied. The "Cues Elements" corresponding to such a
virtual track SHOULD be the sum of the "Cues Elements" for each of
the tracks it's composed of (when the "Cues" are defined per track).
In the case of "TrackJoinBlocks", the "Block Elements" (from
"BlockGroup" and "SimpleBlock") of all the tracks SHOULD be used as
if they were defined for this new virtual "Track". When two "Block
Elements" have overlapping start or end timestamps, it's up to the
underlying system to either drop some of these frames or render them
Lhomme, et al. Expires January 26, 2019 [Page 156]
Internet-Draft Matroska July 2018
the way they overlap. This situation SHOULD be avoided when creating
such tracks as you can never be sure of the end result on different
platforms.
24.4. Overlay Track
Overlay tracks SHOULD be rendered in the same 'channel' as the track
its linked to. When content is found in such a track, it SHOULD be
played on the rendering channel instead of the original track.
24.5. Multi-planar and 3D videos
There are two different ways to compress 3D videos: have each 'eye'
track in a separate track and have one track have both 'eyes'
combined inside (which is more efficient, compression-wise).
Matroska supports both ways.
For the single track variant, there is the "StereoMode Element" which
defines how planes are assembled in the track (mono or left-right
combined). Odd values of StereoMode means the left plane comes first
for more convenient reading. The pixel count of the track
("PixelWidth"/"PixelHeight") is the raw amount of pixels (for example
3840x1080 for full HD side by side) and the
"DisplayWidth"/"DisplayHeight" in pixels is the amount of pixels for
one plane (1920x1080 for that full HD stream). Old stereo 3D were
displayed using anaglyph (cyan and red colours separated). For
compatibility with such movies, there is a value of the StereoMode
that corresponds to AnaGlyph.
There is also a "packed" mode (values 13 and 14) which consists of
packing two frames together in a "Block" using lacing. The first
frame is the left eye and the other frame is the right eye (or vice
versa). The frames SHOULD be decoded in that order and are possibly
dependent on each other (P and B frames).
For separate tracks, Matroska needs to define exactly which track
does what. "TrackOperation" with "TrackCombinePlanes" do that. For
more details look at Section 24.3.
The 3D support is still in infancy and may evolve to support more
features.
The StereoMode used to be part of Matroska v2 but it didn't meet the
requirement for multiple tracks. There was also a bug in libmatroska
prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8.
"Matroska Readers" may support these legacy files by checking
Matroska v2 or 0x53B9. The older values [20] were 0: mono, 1: right
eye, 2: left eye, 3: both eyes.
Lhomme, et al. Expires January 26, 2019 [Page 157]
Internet-Draft Matroska July 2018
25. Timestamps
Historically timestamps in Matroska were mistakenly called timecodes.
The "Timestamp Element" was called Timecode, the "TimestampScale
Element" was called TimecodeScale, the "TrackTimestampScale Element"
was called TrackTimecodeScale and the "ReferenceTimestamp Element"
was called ReferenceTimeCode.
25.1. Timestamp Types
o Absolute Timestamp = Block+Cluster
o Relative Timestamp = Block
o Scaled Timestamp = Block+Cluster
o Raw Timestamp = (Block+Cluster)*TimestampScale*TrackTimestampScale
25.2. Block Timestamps
The "Block Element"'s timestamp MUST be a signed integer that
represents the "Raw Timestamp" relative to the "Cluster"'s "Timestamp
Element", multiplied by the "TimestampScale Element". See
Section 25.4 for more information.
The "Block Element"'s timestamp MUST be represented by a 16bit signed
integer (sint16). The "Block"'s timestamp has a range of -32768 to
+32767 units. When using the default value of the "TimestampScale
Element", each integer represents 1ms. The maximum time span of
"Block Elements" in a "Cluster" using the default "TimestampScale
Element" of 1ms is 65536ms.
If a "Cluster"'s "Timestamp Element" is set to zero, it is possible
to have "Block Elements" with a negative "Raw Timestamp". "Block
Elements" with a negative "Raw Timestamp" are not valid.
25.3. Raw Timestamp
The exact time of an object SHOULD be represented in nanoseconds. To
find out a "Block"'s "Raw Timestamp", you need the "Block"'s
"Timestamp Element", the "Cluster"'s "Timestamp Element", and the
"TimestampScale Element".
25.4. TimestampScale
The "TimestampScale Element" is used to calculate the "Raw Timestamp"
of a "Block". The timestamp is obtained by adding the "Block"'s
timestamp to the "Cluster"'s "Timestamp Element", and then
Lhomme, et al. Expires January 26, 2019 [Page 158]
Internet-Draft Matroska July 2018
multiplying that result by the "TimestampScale". The result will be
the "Block"'s "Raw Timestamp" in nanoseconds. The formula for this
would look like:
(a + b) * c
a = `Block`'s Timestamp
b = `Cluster`'s Timestamp
c = `TimestampScale`
For example, assume a "Cluster"'s "Timestamp" has a value of 564264,
the "Block" has a "Timestamp" of 1233, and the "TimestampScale
Element" is the default of 1000000.
(1233 + 564264) * 1000000 = 565497000000
So, the "Block" in this example has a specific time of 565497000000
in nanoseconds. In milliseconds this would be 565497ms.
25.5. TimestampScale Rounding
Because the default value of "TimestampScale" is 1000000, which makes
each integer in the "Cluster" and "Block" "Timestamp Elements" equal
1ms, this is the most commonly used. When dealing with audio, this
causes inaccuracy when seeking. When the audio is combined with
video, this is not an issue. For most cases, the the synch of audio
to video does not need to be more than 1ms accurate. This becomes
obvious when one considers that sound will take 2-3ms to travel a
single meter, so distance from your speakers will have a greater
effect on audio/visual synch than this.
However, when dealing with audio-only files, seeking accuracy can
become critical. For instance, when storing a whole CD in a single
track, a user will want to be able to seek to the exact sample that a
song begins at. If seeking a few sample ahead or behind, a 'crack'
or 'pop' may result as a few odd samples are rendered. Also, when
performing precise editing, it may be very useful to have the audio
accuracy down to a single sample.
When storing timestamps for an audio stream, the "TimestampScale
Element" SHOULD have an accuracy of at least that of the audio sample
rate, otherwise there are rounding errors that prevent users from
knowing the precise location of a sample. Here's how a program has
to round each timestamp in order to be able to recreate the sample
number accurately.
Let's assume that the application has an audio track with a sample
rate of 44100. As written above the "TimestampScale" MUST have at
Lhomme, et al. Expires January 26, 2019 [Page 159]
Internet-Draft Matroska July 2018
least the accuracy of the sample rate itself: 1000000000 / 44100 =
22675.7369614512. This value MUST always be truncated. Otherwise
the accuracy will not suffice. So in this example the application
will use 22675 for the "TimestampScale". The application could even
use some lower value like 22674 which would allow it to be a little
bit imprecise about the original timestamps. But more about that in
a minute.
Next the application wants to write sample number 52340 and
calculates the timestamp. This is easy. In order to calculate the
"Raw Timestamp" in ns all it has to do is calculate "Raw Timestamp =
round(1000000000 * sample_number / sample_rate)". Rounding at this
stage is very important! The application might skip it if it choses
a slightly smaller value for the "TimestampScale" factor instead of
the truncated one like shown above. Otherwise it has to round or the
results won't be reversible. For our example we get "Raw Timestamp =
round(1000000000 * 52340 / 44100) = round(1186848072.56236) =
1186848073".
The next step is to calculate the "Absolute Timestamp" - that is the
timestamp that will be stored in the Matroska file. Here the
application has to divide the "Raw Timestamp" from the previous
paragraph by the "TimestampScale" factor and round the result:
"Absolute Timestamp = round(Raw Timestamp / TimestampScale_factor)"
which will result in the following for our example: "Absolute
Timestamp = round(1186848073 / 22675) = round(52341.7011245866) =
52342". This number is the one the application has to write to the
file.
Now our file is complete, and we want to play it back with another
application. Its task is to find out which sample the first
application wrote into the file. So it starts reading the Matroska
file and finds the "TimestampScale" factor 22675 and the audio sample
rate 44100. Later it finds a data block with the "Absolute
Timestamp" of 52342. But how does it get the sample number from
these numbers?
First it has to calculate the "Raw Timestamp" of the block it has
just read. Here's no rounding involved, just an integer
multiplication: "Raw Timestamp = Absolute Timestamp *
TimestampScale_factor". In our example: "Raw Timestamp = 52342 *
22675 = 1186854850".
The conversion from the "Raw Timestamp" to the sample number again
requires rounding: "sample_number = round(Raw Timestamp * sample_rate
/ 1000000000)". In our example: "sample_number = round(1186854850 *
44100 / 1000000000) = round(52340.298885) = 52340". This is exactly
the sample number that the previous program started with.
Lhomme, et al. Expires January 26, 2019 [Page 160]
Internet-Draft Matroska July 2018
Some general notes for a program:
1. Always calculate the timestamps / sample numbers with floating
point numbers of at least 64bit precision (called 'double' in
most modern programming languages). If you're calculating with
integers then make sure they're 64bit long, too.
2. Always round if you divide. Always! If you don't you'll end up
with situations in which you have a timestamp in the Matroska
file that does not correspond to the sample number that it
started with. Using a slightly lower timestamp scale factor can
help here in that it removes the need for proper rounding in the
conversion from sample number to "Raw Timestamp".
25.6. TrackTimestampScale
The "TrackTimestampScale Element" is used align tracks that would
otherwise be played at different speeds. An example of this would be
if you have a film that was originally recorded at 24fps video. When
playing this back through a PAL broadcasting system, it is standard
to speed up the film to 25fps to match the 25fps display speed of the
PAL broadcasting standard. However, when broadcasting the video
through NTSC, it is typical to leave the film at its original speed.
If you wanted to make a single file where there was one video stream,
and an audio stream used from the PAL broadcast, as well as an audio
stream used from the NTSC broadcast, you would have the problem that
the PAL audio stream would be 1/24th faster than the NTSC audio
stream, quickly leading to problems. It is possible to stretch out
the PAL audio track and re-encode it at a slower speed, however when
dealing with lossy audio codecs, this often results in a loss of
audio quality and/or larger file sizes.
This is the type of problem that "TrackTimestampScale" was designed
to fix. Using it, the video can be played back at a speed that will
synch with either the NTSC or the PAL audio stream, depending on
which is being used for playback. To continue the above example:
Track 1: Video
Track 2: NTSC Audio
Track 3: PAL Audio
Because the NTSC track is at the original speed, it will used as the
default value of 1.0 for its "TrackTimestampScale". The video will
also be aligned to the NTSC track with the default value of 1.0.
The "TrackTimestampScale" value to use for the PAL track would be
calculated by determining how much faster the PAL track is than the
NTSC track. In this case, because we know the video for the NTSC
Lhomme, et al. Expires January 26, 2019 [Page 161]
Internet-Draft Matroska July 2018
audio is being played back at 24fps and the video for the PAL audio
is being played back at 25fps, the calculation would be:
25/24 &#8776; 1.04166666666666666667
When writing a file that uses a non-default "TrackTimestampScale",
the values of the "Block"'s timestamp are whatever they would be when
normally storing the track with a default value for the
"TrackTimestampScale". However, the data is interleaved a little
differently. Data SHOULD be interleaved by its Section 25.3 in the
order handed back from the encoder. The "Raw Timestamp" of a "Block"
from a track using "TrackTimestampScale" is calculated using:
"(Block's Timestamp + Cluster's Timestamp) * TimestampScale *
TrackTimestampScale"
So, a Block from the PAL track above that had a Section 25.1 of 100
seconds would have a "Raw Timestamp" of 104.66666667 seconds, and so
would be stored in that part of the file.
When playing back a track using the "TrackTimestampScale", if the
track is being played by itself, there is no need to scale it. From
the above example, when playing the Video with the NTSC Audio,
neither are scaled. However, when playing back the Video with the
PAL Audio, the timestamps from the PAL Audio track are scaled using
the "TrackTimestampScale", resulting in the video playing back in
synch with the audio.
It would be possible for a "Matroska Player" to also adjust the
audio's samplerate at the same time as adjusting the timestamps if
you wanted to play the two audio streams synchronously. It would
also be possible to adjust the video to match the audio's speed.
However, for playback, the selected track(s) timestamps SHOULD be
adjusted if they need to be scaled.
While the above example deals specifically with audio tracks, this
element can be used to align video, audio, subtitles, or any other
type of track contained in a Matroska file.
26. References
26.1. URIs
[1] http://mukoli.free.fr/mcf/mcf.html
[2] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown
Lhomme, et al. Expires January 26, 2019 [Page 162]
Internet-Draft Matroska July 2018
[3] https://datatracker.ietf.org/wg/cellar/charter/
[4] https://matroska.org/files/matroska.pdf
[5] diagram.md
[6] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown
[7] https://github.com/Matroska-Org/foundation-
source/blob/master/spectool/specdata.xml
[8] https://tools.ietf.org/html/rfc2119
[9] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown
[10] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown#ebml-element-types
[11] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown#ebml-schema
[12] https://github.com/Matroska-Org/ebml-specification/blob/master/
specification.markdown#structure
[13] https://www.loc.gov/standards/iso639-2/php/English_list.php
[14] https://tools.ietf.org/html/bcp47
[15] https://www.iana.org/domains/root/db
[16] http://www.webmproject.org/docs/container/
[17] http://dvd.sourceforge.net/dvdinfo/uops.html
[18] http://www.dvd-replica.com/DVD/
[19] http://dvd.sourceforge.net/dvdinfo/
[20] http://www.matroska.org/node/1/revisions/74/view#StereoMode
Authors' Addresses
Steve Lhomme
Email: slhomme@matroska.org
Lhomme, et al. Expires January 26, 2019 [Page 163]
Internet-Draft Matroska July 2018
Moritz Bunkus
Email: moritz@bunkus.org
Dave Rice
Email: dave@dericed.com
Lhomme, et al. Expires January 26, 2019 [Page 164]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' []>
<rfc ipr="trust200902" category="std" docName="draft-ietf-cellar-matroska-00">
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc private=""?>
<?rfc topblock="yes"?>
<?rfc comments="no"?>
<front>
<title abbrev="Matroska">Matroska Specifications</title>
<author initials="S." surname="Lhomme" fullname="Steve Lhomme">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email>slhomme@matroska.org</email>
<uri></uri>
</address>
</author>
<author initials="M." surname="Bunkus" fullname="Moritz Bunkus">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email>moritz@bunkus.org</email>
<uri></uri>
</address>
</author>
<author initials="D." surname="Rice" fullname="Dave Rice">
<organization></organization>
<address>
<postal>
<street></street>
<city></city>
<code></code>
<country></country>
<region></region>
</postal>
<phone></phone>
<email>dave@dericed.com</email>
<uri></uri>
</address>
</author>
<date year="2018" month="July" day="25"/>
<area>art</area>
<workgroup>cellar</workgroup>
<keyword></keyword>
<abstract>
<t>This document defines the Matroska audiovisual container, including definitions of its structural elements, as well as its terminology, vocabulary, and application.
</t>
</abstract>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<t>Matroska aims to become THE standard of multimedia container formats. It was derived from a project called <eref target="http://mukoli.free.fr/mcf/mcf.html">MCF</eref>, but differentiates from it significantly because it is based on <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">EBML</eref> (Extensible Binary Meta Language), a binary derivative of XML. EBML enables significant advantages in terms of future format extensibility, without breaking file support in old parsers.
</t>
<t>First, it is essential to clarify exactly &quot;What an Audio/Video container is&quot;, to avoid any misunderstandings:
</t>
<t>
<list style="symbols">
<t>It is NOT a video or audio compression format (codec)</t>
<t>It is an envelope for which there can be many audio, video and subtitles streams, allowing the user to store a complete movie or CD in a single file.</t>
</list>
</t>
<t>Matroska is designed with the future in mind. It incorporates features like:
</t>
<t>
<list style="symbols">
<t>Fast seeking in the file</t>
<t>Chapter entries</t>
<t>Full metadata (tags) support</t>
<t>Selectable subtitle/audio/video streams</t>
<t>Modularly expandable</t>
<t>Error resilience (can recover playback even when the stream is damaged)</t>
<t>Streamable over the internet and local networks (HTTP, CIFS, FTP, etc)</t>
<t>Menus (like DVDs have)</t>
</list>
</t>
<t>Matroska is an open standards project. This means for personal use it is absolutely free to use and that the technical specifications describing the bitstream are open to everybody, even to companies that would like to support it in their products.
</t>
</section>
<section anchor="status-of-this-document" title="Status of this document">
<t>This document is a work-in-progress specification defining the Matroska file format as part of the <eref target="https://datatracker.ietf.org/wg/cellar/charter/">IETF Cellar working group</eref>. But since it's quite complete it is used as a reference for the development of libmatroska. Legacy versions of the specification can be found <eref target="https://matroska.org/files/matroska.pdf">here</eref> (PDF doc by Alexander Noé -- outdated).
</t>
<t>For a simplified diagram of the layout of a Matroska file, see the <eref target="diagram.md">Diagram page</eref>.
</t>
<t>A more refined and detailed version of the EBML specifications is being <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">worked on here</eref>.
</t>
<t>The table found below is now generated from the &quot;source&quot; of the Matroska specification. This <eref target="https://github.com/Matroska-Org/foundation-source/blob/master/spectool/specdata.xml">XML file</eref> is also used to generate the semantic data used in libmatroska and libmatroska2. We encourage anyone to use and monitor its changes so your code is spec-proof and always up to date.
</t>
<t>Note that versions 1, 2 and 3 have been finalized. Version 4 is currently work in progress. There MAY be further additions to v4.
</t>
</section>
<section anchor="security-considerations" title="Security Considerations">
<t>Matroska inherits security considerations from EBML.
</t>
<t>Attacks on a <spanx style="verb">Matroska Reader</spanx> could include:
</t>
<t>
<list style="symbols">
<t>Storage of a arbitrary and potentially executable data within an <spanx style="verb">Attachment Element</spanx>. <spanx style="verb">Matroska Readers</spanx> that extract or use data from Matroska Attachments SHOULD check that the data adheres to expectations.</t>
<t>A <spanx style="verb">Matroska Attachment</spanx> with an inaccurate mime-type.</t>
</list>
</t>
</section>
<section anchor="iana-considerations" title="IANA Considerations">
<t>To be determined.
</t>
</section>
<section anchor="notation-and-conventions" title="Notation and Conventions">
<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in <eref target="https://tools.ietf.org/html/rfc2119">RFC 2119</eref>.
</t>
<t>This document defines specific terms in order to define the format and application of <spanx style="verb">Matroska</spanx>. Specific terms are defined below:
</t>
<t><spanx style="verb">Matroska</spanx>: a multimedia container format based on EBML (Extensible Binary Meta Language)
</t>
<t><spanx style="verb">Matroska Reader</spanx>: A <spanx style="verb">Matroska Reader</spanx> is a data parser that interprets the semantics of a Matroska document and creates a way for programs to use <spanx style="verb">Matroska</spanx>.
</t>
<t><spanx style="verb">Matroska Player</spanx>: A <spanx style="verb">Matroska Player</spanx> is a <spanx style="verb">Matroska Reader</spanx> with a primary purpose of playing audiovisual files, including <spanx style="verb">Matroska</spanx> documents.
</t>
</section>
<section anchor="basis-in-ebml" title="Basis in EBML">
<t>Matroska is a Document Type of EBML (Extensible Binary Meta Language). This specification is dependent on the <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown">EBML Specification</eref>. For an understanding of Matroska's EBML Schema, see in particular the sections of the EBML Specification covering <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#ebml-element-types">EBML Element Types</eref>, <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#ebml-schema">EBML Schema</eref>, and <eref target="https://github.com/Matroska-Org/ebml-specification/blob/master/specification.markdown#structure">EBML Structure</eref>.
</t>
<section anchor="added-constraints-on-ebml" title="Added Constraints on EBML">
<t>As an EBML Document Type, Matroska adds the following constraints to the EBML specification.
</t>
<t>
<list style="symbols">
<t>The <spanx style="verb">docType</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be 'matroska'.</t>
<t>The <spanx style="verb">EBMLMaxIDLength</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be <spanx style="verb">4</spanx>.</t>
<t>The <spanx style="verb">EBMLMaxSizeLength</spanx> of the <spanx style="verb">EBML Header</spanx> MUST be between <spanx style="verb">1</spanx> and <spanx style="verb">8</spanx> inclusive.</t>
</list>
</t>
</section>
<section anchor="matroska-design" title="Matroska Design">
<t>All top-levels elements (Segment and direct sub-elements) are coded on 4 octets, i.e. class D elements.
</t>
<section anchor="language-codes" title="Language Codes">
<t>Matroska from version 1 through 3 uses language codes that can be either the 3 letters <eref target="https://www.loc.gov/standards/iso639-2/php/English_list.php">bibliographic ISO-639-2</eref> form (like &quot;fre&quot; for french), or such a language code followed by a dash and a country code for specialities in languages (like &quot;fre-ca&quot; for Canadian French). The <spanx style="verb">ISO 639-2 Language Elements</spanx> are &quot;Language Element&quot;, &quot;TagLanguage Element&quot;, and &quot;ChapLanguage Element&quot;.
</t>
<t>Starting in Matroska version 4, either <spanx style="verb">ISO 639-2</spanx> or <eref target="https://tools.ietf.org/html/bcp47">BCP 47</eref> MAY be used, although <spanx style="verb">BCP 47</spanx> is RECOMMENDED. The <spanx style="verb">BCP 47 Language Elements</spanx> are &quot;LanguageIETF Element&quot;, &quot;TagLanguageIETF Element&quot;, and &quot;ChapLanguageIETF Element&quot;. If a <spanx style="verb">BCP 47 Language Element</spanx> and an <spanx style="verb">ISO 639-2 Language Element</spanx> are used within the same <spanx style="verb">Parent Element</spanx>, then the <spanx style="verb">ISO 639-2 Language Element</spanx> MUST be ignored and precedence given to the <spanx style="verb">BCP 47 Language Element</spanx>.
</t>
<t>Country codes are the same as used for <eref target="https://www.iana.org/domains/root/db">internet domains</eref>.
</t>
</section>
<section anchor="physical-types" title="Physical Types">
<t>Each level can have different meanings for audio and video. The ORIGINAL_MEDIUM tag can be used to specify a string for ChapterPhysicalEquiv = 60. Here is the list of possible levels for both audio and video :
</t>
<texttable>
<ttcol align="left">ChapterPhysicalEquiv</ttcol>
<ttcol align="left">Audio</ttcol>
<ttcol align="left">Video</ttcol>
<ttcol align="left">Comment</ttcol>
<c>70</c><c>SET / PACKAGE</c><c>SET / PACKAGE</c><c>the collection of different media</c>
<c>60</c><c>CD / 12&quot; / 10&quot; / 7&quot; / TAPE / MINIDISC / DAT</c><c>DVD / VHS / LASERDISC</c><c>the physical medium like a CD or a DVD</c>
<c>50</c><c>SIDE</c><c>SIDE</c><c>when the original medium (LP/DVD) has different sides</c>
<c>40</c><c>-</c><c>LAYER</c><c>another physical level on DVDs</c>
<c>30</c><c>SESSION</c><c>SESSION</c><c>as found on CDs and DVDs</c>
<c>20</c><c>TRACK</c><c>-</c><c>as found on audio CDs</c>
<c>10</c><c>INDEX</c><c>-</c><c>the first logical level of the side/medium</c>
</texttable>
</section>
<section anchor="block-structure" title="Block Structure">
<t>Bit 0 is the most significant bit.
</t>
<t>Frames using references SHOULD be stored in &quot;coding order&quot;. That means the references first and then the frames referencing them. A consequence is that timestamps MAY NOT be consecutive. But a frame with a past timestamp MUST reference a frame already known, otherwise it's considered bad/void.
</t>
<t>There can be many Blocks in a BlockGroup provided they all have the same timestamp. It is used with different parts of a frame with different priorities.
</t>
<section anchor="block-header" title="Block Header">
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x00+</c><c>MUST</c><c>Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range).</c>
<c>0x01+</c><c>MUST</c><c>Timestamp (relative to Cluster timestamp, signed int16)</c>
</texttable>
</section>
<section anchor="block-header-flags" title="Block Header Flags">
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Bit</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x03+</c><c>0-3</c><c>-</c><c>Reserved, set to 0</c>
<c>0x03+</c><c>4</c><c>-</c><c>Invisible, the codec SHOULD decode this frame but not display it</c>
<c>0x03+</c><c>5-6</c><c>MUST</c><c>Lacing</c>
<c></c><c></c><c></c><c>* 00 : no lacing</c>
<c></c><c></c><c></c><c>* 01 : Xiph lacing</c>
<c></c><c></c><c></c><c>* 11 : EBML lacing</c>
<c></c><c></c><c></c><c>* 10 : fixed-size lacing</c>
<c>0x03+</c><c>7</c><c>-</c><c>not used</c>
</texttable>
</section>
</section>
<section anchor="lacing" title="Lacing">
<t>Lacing is a mechanism to save space when storing data. It is typically used for small blocks of data (referred to as frames in Matroska). There are 3 types of lacing:
</t>
<t>
<list style="numbers">
<t>Xiph, inspired by what is found in the Ogg container</t>
<t>EBML, which is the same with sizes coded differently</t>
<t>fixed-size, where the size is not coded</t>
</list>
</t>
<t>For example, a user wants to store 3 frames of the same track. The first frame is 800 octets long, the second is 500 octets long and the third is 1000 octets long. As these data are small, they can be stored in a lace to save space. They will then be stored in the same block as follows:
</t>
<section anchor="xiph-lacing" title="Xiph lacing">
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 01)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 500 octets one)</t>
<t>Lacing sizes: only the 2 first ones will be coded, 800 gives 255;255;255;35, 500 gives 255;245. The size of the last frame is deduced from the total size of the Block.</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
<t>A frame with a size multiple of 255 is coded with a 0 at the end of the size, for example 765 is coded 255;255;255;0.
</t>
</section>
<section anchor="ebml-lacing" title="EBML lacing">
<t>In this case, the size is not coded as blocks of 255 bytes, but as a difference with the previous size and this size is coded as in EBML. The first size in the lace is unsigned as in EBML. The others use a range shifting to get a sign on each value:
</t>
<texttable>
<ttcol align="left">Bit Representation</ttcol>
<ttcol align="left">Value</ttcol>
<c>1xxx xxxx</c><c>value -(2^6-1) to 2^6-1 (ie 0 to 2^7-2 minus 2^6-1, half of the range)</c>
<c>01xx xxxx xxxx xxxx</c><c>value -(2^13-1) to 2^13-1</c>
<c>001x xxxx xxxx xxxx xxxx xxxx</c><c>value -(2^20-1) to 2^20-1</c>
<c>0001 xxxx xxxx xxxx xxxx xxxx xxxx xxxx</c><c>value -(2^27-1) to 2^27-1</c>
<c>0000 1xxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx</c><c>value -(2^34-1) to 2^34-1</c>
<c>0000 01xx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx</c><c>value -(2^41-1) to 2^41-1</c>
<c>0000 001x xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx</c><c>value -(2^48-1) to 2^48-1</c>
</texttable>
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 11)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 500 octets one)</t>
<t>Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320 0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000 = 0x5ED3. The size of the last frame is deduced from the total size of the Block.</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
</section>
<section anchor="fixedsize-lacing" title="Fixed-size lacing">
<t>In this case, only the number of frames in the lace is saved, the size of each frame is deduced from the total size of the Block. For example, for 3 frames of 800 octets each:
</t>
<t>
<list style="symbols">
<t>Block head (with lacing bits set to 10)</t>
<t>Lacing head: Number of frames in the lace -1, i.e. 2</t>
<t>Data in frame 1</t>
<t>Data in frame 2</t>
<t>Data in frame 3</t>
</list>
</t>
</section>
<section anchor="simpleblock-structure" title="SimpleBlock Structure">
<t>The <spanx style="verb">SimpleBlock</spanx> is inspired by the <xref target="block-structure"/>. The main differences are the added Keyframe flag and Discardable flag. Otherwise everything is the same.
</t>
<t>Bit 0 is the most significant bit.
</t>
<t>Frames using references SHOULD be stored in &quot;coding order&quot;. That means the references first and then the frames referencing them. A consequence is that timestamps MAY NOT be consecutive. But a frame with a past timestamp MUST reference a frame already known, otherwise it's considered bad/void.
</t>
<t>There can be many <spanx style="verb">Block Elements</spanx> in a <spanx style="verb">BlockGroup</spanx> provided they all have the same timestamp. It is used with different parts of a frame with different priorities.
</t>
<section anchor="simpleblock-header" title="SimpleBlock Header">
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x00+</c><c>MUST</c><c>Track Number (Track Entry). It is coded in EBML like form (1 octet if the value is &lt; 0x80, 2 if &lt; 0x4000, etc) (most significant bits set to increase the range).</c>
<c>0x01+</c><c>MUST</c><c>Timestamp (relative to Cluster timestamp, signed int16)</c>
</texttable>
</section>
<section anchor="simpleblock-header-flags" title="SimpleBlock Header Flags">
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Bit</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x03+</c><c>0</c><c>-</c><c>Keyframe, set when the Block contains only keyframes</c>
<c>0x03+</c><c>1-3</c><c>-</c><c>Reserved, set to 0</c>
<c>0x03+</c><c>4</c><c>-</c><c>Invisible, the codec SHOULD decode this frame but not display it</c>
<c>0x03+</c><c>5-6</c><c>MUST</c><c>Lacing</c>
<c></c><c></c><c></c><c>* 00 : no lacing</c>
<c></c><c></c><c></c><c>* 01 : Xiph lacing</c>
<c></c><c></c><c></c><c>* 11 : EBML lacing</c>
<c></c><c></c><c></c><c>* 10 : fixed-size lacing</c>
<c>0x03+</c><c>7</c><c>-</c><c>Discardable, the frames of the Block can be discarded during playing if needed</c>
</texttable>
</section>
</section>
<section anchor="laced-data" title="Laced Data">
<t>When lacing bit is set.
</t>
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x00</c><c>MUST</c><c>Number of frames in the lace-1 (uint8)</c>
<c>0x01 / 0xXX</c><c>MUST*</c><c>Lace-coded size of each frame of the lace, except for the last one (multiple uint8). *This is not used with Fixed-size lacing as it is calculated automatically from (total size of lace) / (number of frames in lace).</c>
</texttable>
<t>For (possibly) Laced Data
</t>
<texttable>
<ttcol align="left">Offset</ttcol>
<ttcol align="left">Player</ttcol>
<ttcol align="left">Description</ttcol>
<c>0x00</c><c>MUST</c><c>Consecutive laced frames</c>
</texttable>
</section>
</section>
</section>
</section>
<section anchor="matroska-structure" title="Matroska Structure">
<t>A Matroska file MUST be composed of at least one <spanx style="verb">EBML Document</spanx> using the <spanx style="verb">Matroska Document Type</spanx>. Each <spanx style="verb">EBML Document</spanx> MUST start with an <spanx style="verb">EBML Header</spanx> and MUST be followed by the <spanx style="verb">EBML Root Element</spanx>, defined as <spanx style="verb">Segment</spanx> in Matroska. Matroska defines several <spanx style="verb">Top Level Elements</spanx> which MAY occur within the <spanx style="verb">Segment</spanx>.
</t>
<t>As an example, a simple Matroska file consisting of a single <spanx style="verb">EBML Document</spanx> could be represented like this:
</t>
<t>
<list style="symbols">
<t><spanx style="verb">EBML Header</spanx></t>
<t><spanx style="verb">Segment</spanx></t>
</list>
</t>
<t>A more complex Matroska file consisting of an <spanx style="verb">EBML Stream</spanx> (consisting of two <spanx style="verb">EBML Documents</spanx>) could be represented like this:
</t>
<t>
<list style="symbols">
<t><spanx style="verb">EBML Header</spanx></t>
<t><spanx style="verb">Segment</spanx></t>
<t><spanx style="verb">EBML Header</spanx></t>
<t><spanx style="verb">Segment</spanx></t>
</list>
</t>
<t>The following diagram represents a simple Matroska file, comprised of an <spanx style="verb">EBML Document</spanx> with an <spanx style="verb">EBML Header</spanx>, a <spanx style="verb">Segment Element</spanx> (the <spanx style="verb">Root Element</spanx>), and all eight Matroska <spanx style="verb">Top Level Elements</spanx>. In the following diagrams of this section, horizontal spacing expresses a parent-child relationship between Matroska Elements (e.g. the <spanx style="verb">Info Element</spanx> is contained within the <spanx style="verb">Segment Element</spanx>) whereas vertical alignment represents the storage order within the file.
</t>
<figure align="center"><artwork align="center">
+-------------+
| EBML Header |
+---------------------------+
| Segment | SeekHead |
| |-------------|
| | Info |
| |-------------|
| | Tracks |
| |-------------|
| | Chapters |
| |-------------|
| | Cluster |
| |-------------|
| | Cues |
| |-------------|
| | Attachments |
| |-------------|
| | Tags |
+---------------------------+
</artwork></figure>
<t>The Matroska <spanx style="verb">EBML Schema</spanx> defines eight <spanx style="verb">Top Level Elements</spanx>: <spanx style="verb">SeekHead</spanx>, <spanx style="verb">Info</spanx>, <spanx style="verb">Tracks</spanx>, <spanx style="verb">Chapters</spanx>, <spanx style="verb">Cluster</spanx>, <spanx style="verb">Cues</spanx>, <spanx style="verb">Attachments</spanx>, and <spanx style="verb">Tags</spanx>.
</t>
<t>The <spanx style="verb">SeekHead Element</spanx> (also known as <spanx style="verb">MetaSeek</spanx>) contains an index of <spanx style="verb">Top Level Elements</spanx> locations within the <spanx style="verb">Segment</spanx>. Use of the <spanx style="verb">SeekHead Element</spanx> is RECOMMENDED. Without a <spanx style="verb">SeekHead Element</spanx>, a Matroska parser would have to search the entire file to find all of the other <spanx style="verb">Top Level Elements</spanx>. This is due to Matroska's flexible ordering requirements; for instance, it is acceptable for the <spanx style="verb">Chapters Element</spanx> to be stored after the <spanx style="verb">Cluster Elements</spanx>.
</t>
<figure align="center" title="Representation of a SeekHead Element.
"><artwork align="center">
+--------------------------------+
| SeekHead | Seek | SeekID |
| | |--------------|
| | | SeekPosition |
+--------------------------------+
</artwork></figure>
<t>The <spanx style="verb">Info Element</spanx> contains vital information for identifying the whole <spanx style="verb">Segment</spanx>. This includes the title for the <spanx style="verb">Segment</spanx>, a randomly generated unique identifier, and the unique identifier(s) of any linked <spanx style="verb">Segment Elements</spanx>.
</t>
<figure align="center" title="Representation of an Info Element and its Child Elements.
"><artwork align="center">
+-------------------------+
| Info | SegmentUID |
| |------------------|
| | SegmentFilename |
| |------------------|
| | PrevUID |
| |------------------|
| | PrevFilename |
| |------------------|
| | NextUID |
| |------------------|
| | NextFilename |
| |------------------|
| | SegmentFamily |
| |------------------|
| | ChapterTranslate |
| |------------------|
| | TimestampScale |
| |------------------|
| | Duration |
| |------------------|
| | DateUTC |
| |------------------|
| | Title |
| |------------------|
| | MuxingApp |
| |------------------|
| | WritingApp |
|-------------------------|
</artwork></figure>
<t>The <spanx style="verb">Tracks Element</spanx> defines the technical details for each track and can store the name, number, unique identifier, language and type (audio, video, subtitles, etc.) of each track. For example, the <spanx style="verb">Tracks Element</spanx> MAY store information about the resolution of a video track or sample rate of an audio track.
</t>
<t>The <spanx style="verb">Tracks Element</spanx> MUST identify all the data needed by the codec to decode the data of the specified track. However, the data required is contingent on the codec used for the track. For example, a <spanx style="verb">Track Element</spanx> for uncompressed audio only requires the audio bit rate to be present. A codec such as AC-3 would require that the <spanx style="verb">CodecID Element</spanx> be present for all tracks, as it is the primary way to identify which codec to use to decode the track.
</t>
<figure align="center" title="Representation of the Tracks Element and a selection of its Descendant Elements.
"><artwork align="center">
+------------------------------------+
| Tracks | TrackEntry | TrackNumber |
| | |--------------|
| | | TrackUID |
| | |--------------|
| | | TrackType |
| | |--------------|
| | | Name |
| | |--------------|
| | | Language |
| | |--------------|
| | | CodecID |
| | |--------------|
| | | CodecPrivate |
| | |--------------|
| | | CodecName |
| | |----------------------------------+
| | | Video | FlagInterlaced |
| | | |-------------------|
| | | | FieldOrder |
| | | |-------------------|
| | | | StereoMode |
| | | |-------------------|
| | | | AlphaMode |
| | | |-------------------|
| | | | PixelWidth |
| | | |-------------------|
| | | | PixelHeight |
| | | |-------------------|
| | | | DisplayWidth |
| | | |-------------------|
| | | | DisplayHeight |
| | | |-------------------|
| | | | AspectRatioType |
| | | |-------------------|
| | | | Color |
| | |----------------------------------|
| | | Audio | SamplingFrequency |
| | | |-------------------|
| | | | Channels |
| | | |-------------------|
| | | | BitDepth |
|--------------------------------------------------------|
</artwork></figure>
<t>The <spanx style="verb">Chapters Element</spanx> lists all of the chapters. Chapters are a way to set predefined points to jump to in video or audio.
</t>
<figure align="center" title="Representation of the Chapters Element and a selection of its Descendant Elements.
"><artwork align="center">
+-----------------------------------------+
| Chapters | Edition | EditionUID |
| | Entry |--------------------|
| | | EditionFlagHidden |
| | |--------------------|
| | | EditionFlagDefault |
| | |--------------------|
| | | EditionFlagOrdered |
| | |--------------------------------+
| | | ChapterAtom | ChapterUID |
| | | |------------------|
| | | | ChapterStringUID |
| | | |------------------|
| | | | ChapterTimeStart |
| | | |------------------|
| | | | ChapterTimeEnd |
| | | |------------------|
| | | | ChapterFlagHidden |
| | | |---------------------------------+
| | | | ChapterDisplay | ChapString |
| | | | |--------------|
| | | | | ChapLanguage |
+--------------------------------------------------------------------+
</artwork></figure>
<t><spanx style="verb">Cluster Elements</spanx> contain the content for each track, e.g. video frames. A Matroska file SHOULD contain at least one <spanx style="verb">Cluster Element</spanx>. The <spanx style="verb">Cluster Element</spanx> helps to break up <spanx style="verb">SimpleBlock</spanx> or <spanx style="verb">BlockGroup Elements</spanx> and helps with seeking and error protection. It is RECOMMENDED that the size of each individual <spanx style="verb">Cluster Element</spanx> be limited to store no more than 5 seconds or 5 megabytes. Every <spanx style="verb">Cluster Element</spanx> MUST contain a <spanx style="verb">Timestamp Element</spanx>. This SHOULD be the <spanx style="verb">Timestamp Element</spanx> used to play the first <spanx style="verb">Block</spanx> in the <spanx style="verb">Cluster Element</spanx>. There SHOULD be one or more <spanx style="verb">BlockGroup</spanx> or <spanx style="verb">SimpleBlock Element</spanx> in each <spanx style="verb">Cluster Element</spanx>. A <spanx style="verb">BlockGroup Element</spanx> MAY contain a <spanx style="verb">Block</spanx> of data and any information relating directly to that <spanx style="verb">Block</spanx>.
</t>
<figure align="center" title="Representation of a Cluster Element and its immediate Child Elements.
"><artwork align="center">
+--------------------------+
| Cluster | Timestamp |
| |----------------|
| | SilentTracks |
| |----------------|
| | Position |
| |----------------|
| | PrevSize |
| |----------------|
| | SimpleBlock |
| |----------------|
| | BlockGroup |
| |----------------|
| | EncryptedBlock |
+--------------------------+
</artwork></figure>
<figure align="center" title="Representation of the Block Element structure.
"><artwork align="center">
+----------------------------------+
| Block | Portion of | Data Type |
| | a Block | - Bit Flag |
| |--------------------------+
| | Header | TrackNumber |
| | |-------------|
| | | Timestamp |
| | |-------------|
| | | Flags |
| | | - Gap |
| | | - Lacing |
| | | - Reserved |
| |--------------------------|
| | Optional | FrameSize |
| |--------------------------|
| | Data | Frame |
+----------------------------------+
</artwork></figure>
<t>Each <spanx style="verb">Cluster</spanx> MUST contain exactly one <spanx style="verb">Timestamp Element</spanx>. The <spanx style="verb">Timestamp Element</spanx> value MUST be stored once per <spanx style="verb">Cluster</spanx>. The <spanx style="verb">Timestamp Element</spanx> in the <spanx style="verb">Cluster</spanx> is relative to the entire <spanx style="verb">Segment</spanx>. The <spanx style="verb">Timestamp Element</spanx> SHOULD be the first <spanx style="verb">Element</spanx> in the <spanx style="verb">Cluster</spanx>.
</t>
<t>Additionally, the <spanx style="verb">Block</spanx> contains an offset that, when added to the <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp Element</spanx> value, yields the <spanx style="verb">Block</spanx>'s effective timestamp. Therefore, timestamp in the <spanx style="verb">Block</spanx> itself is relative to the <spanx style="verb">Timestamp Element</spanx> in the <spanx style="verb">Cluster</spanx>. For example, if the <spanx style="verb">Timestamp Element</spanx> in the <spanx style="verb">Cluster</spanx> is set to 10 seconds and a <spanx style="verb">Block</spanx> in that <spanx style="verb">Cluster</spanx> is supposed to be played 12 seconds into the clip, the timestamp in the <spanx style="verb">Block</spanx> would be set to 2 seconds.
</t>
<t>The <spanx style="verb">ReferenceBlock</spanx> in the <spanx style="verb">BlockGroup</spanx> is used instead of the basic &quot;P-frame&quot;/&quot;B-frame&quot; description. Instead of simply saying that this <spanx style="verb">Block</spanx> depends on the <spanx style="verb">Block</spanx> directly before, or directly afterwards, the <spanx style="verb">Timestamp</spanx> of the necessary <spanx style="verb">Block</spanx> is used. Because there can be as many <spanx style="verb">ReferenceBlock Elements</spanx> as necessary for a <spanx style="verb">Block</spanx>, it allows for some extremely complex referencing.
</t>
<t>The <spanx style="verb">Cues Element</spanx> is used to seek when playing back a file by providing a temporal index for some of the <spanx style="verb">Tracks</spanx>. It is similar to the <spanx style="verb">SeekHead Element</spanx>, but used for seeking to a specific time when playing back the file. It is possible to seek without this element, but it is much more difficult because a <spanx style="verb">Matroska Reader</spanx> would have to 'hunt and peck' through the file looking for the correct timestamp.
</t>
<t>The <spanx style="verb">Cues Element</spanx> SHOULD contain at least one <spanx style="verb">CuePoint Element</spanx>. Each <spanx style="verb">CuePoint Element</spanx> stores the position of the <spanx style="verb">Cluster</spanx> that contains the <spanx style="verb">BlockGroup</spanx> or <spanx style="verb">SimpleBlock Element</spanx>. The timestamp is stored in the <spanx style="verb">CueTime Element</spanx> and location is stored in the <spanx style="verb">CueTrackPositions Element</spanx>.
</t>
<t>The <spanx style="verb">Cues Element</spanx> is flexible. For instance, <spanx style="verb">Cues Element</spanx> can be used to index every single timestamp of every <spanx style="verb">Block</spanx> or they can be indexed selectively. For video files, it is RECOMMENDED to index at least the keyframes of the video track.
</t>
<figure align="center" title="Representation of a Cues Element and two levels of its Descendant Elements.
"><artwork align="center">
+-------------------------------------+
| Cues | CuePoint | CueTime |
| | |-------------------|
| | | CueTrackPositions |
| |------------------------------|
| | CuePoint | CueTime |
| | |-------------------|
| | | CueTrackPositions |
+-------------------------------------+
</artwork></figure>
<t>The <spanx style="verb">Attachments Element</spanx> is for attaching files to a Matroska file such as pictures, webpages, programs, or even the codec needed to play back the file.
</t>
<figure align="center" title="Representation of a Attachments Element.
"><artwork align="center">
+------------------------------------------------+
| Attachments | AttachedFile | FileDescription |
| | |-------------------|
| | | FileName |
| | |-------------------|
| | | FileMimeType |
| | |-------------------|
| | | FileData |
| | |-------------------|
| | | FileUID |
| | |-------------------|
| | | FileName |
| | |-------------------|
| | | FileReferral |
| | |-------------------|
| | | FileUsedStartTime |
| | |-------------------|
| | | FileUsedEndTime |
+------------------------------------------------+
</artwork></figure>
<t>The <spanx style="verb">Tags Element</spanx> contains metadata that describes the <spanx style="verb">Segment</spanx> and potentially its <spanx style="verb">Tracks</spanx>, <spanx style="verb">Chapters</spanx>, and <spanx style="verb">Attachments</spanx>. Each <spanx style="verb">Track</spanx> or <spanx style="verb">Chapter</spanx> that those tags applies to has its UID listed in the <spanx style="verb">Tags</spanx>. The <spanx style="verb">Tags</spanx> contain all extra information about the file: scriptwriter, singer, actors, directors, titles, edition, price, dates, genre, comments, etc. Tags can contain their values in multiple languages. For example, a movie's &quot;title&quot; <spanx style="verb">Tag</spanx> might contain both the original English title as well as the title it was released as in Germany.
</t>
<figure align="center" title="Representation of a Tags Element and three levels of its Children Elements.
"><artwork align="center">
+-------------------------------------------+
| Tags | Tag | Targets | TargetTypeValue |
| | | |------------------|
| | | | TargetType |
| | | |------------------|
| | | | TagTrackUID |
| | | |------------------|
| | | | TagEditionUID |
| | | |------------------|
| | | | TagChapterUID |
| | | |------------------|
| | | | TagAttachmentUID |
| | |------------------------------|
| | | SimpleTag | TagName |
| | | |------------------|
| | | | TagLanguage |
| | | |------------------|
| | | | TagDefault |
| | | |------------------|
| | | | TagString |
| | | |------------------|
| | | | TagBinary |
| | | |------------------|
| | | | SimpleTag |
+-------------------------------------------+
</artwork></figure>
</section>
<section anchor="matroska-schema" title="Matroska Schema">
<t>This specification includes an <spanx style="verb">EBML Schema</spanx> which defines the Elements and structure of Matroska as an EBML Document Type. The EBML Schema defines every valid Matroska element in a manner defined by the EBML specification.
</t>
<section anchor="matroska-additions-to-schema-element-attributes" title="Matroska Additions to Schema Element Attributes">
<t>In addition to the EBML Schema definition provided by the EBML Specification, Matroska adds the following additional attributes:
</t>
<texttable>
<ttcol align="left">attribute name</ttcol>
<ttcol align="left">required</ttcol>
<ttcol align="left">definition</ttcol>
<c>webm</c><c>No</c><c>A boolean to express if the Matroska Element is also supported within version 2 of the <spanx style="verb">webm</spanx> specification. Please consider the <eref target="http://www.webmproject.org/docs/container/">webm specification</eref> as the authoritative on <spanx style="verb">webm</spanx>.</c>
</texttable>
</section>
<section anchor="matroska-schema-element-definitions" title="Matroska Schema Element Definitions">
<t>Here the definition of each Matroska Element is provided.
</t>
<t>% concatenate with Matroska EBML Schema converted to markdown %
</t>
<section anchor="ebmlmaxidlength-element" title="EBMLMaxIDLength Element">
<t>name: <spanx style="verb">EBMLMaxIDLength</spanx>
</t>
<t>path: <spanx style="verb">1*1(\EBML\EBMLMaxIDLength)</spanx>
</t>
<t>id: <spanx style="verb">0x42F2</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">4</spanx>
</t>
<t>default: <spanx style="verb">4</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
</section>
<section anchor="ebmlmaxsizelength-element" title="EBMLMaxSizeLength Element">
<t>name: <spanx style="verb">EBMLMaxSizeLength</spanx>
</t>
<t>path: <spanx style="verb">1*1(\EBML\EBMLMaxSizeLength)</spanx>
</t>
<t>id: <spanx style="verb">0x42F3</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">1-8</spanx>
</t>
<t>default: <spanx style="verb">8</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
</section>
<section anchor="segment-element" title="Segment Element">
<t>name: <spanx style="verb">Segment</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment)</spanx>
</t>
<t>id: <spanx style="verb">0x18538067</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>unknownsizeallowed: <spanx style="verb">1</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The Root Element that contains all other Top-Level Elements (Elements defined only at Level 1). A Matroska file is composed of 1 Segment.
</t>
</section>
<section anchor="seekhead-element" title="SeekHead Element">
<t>name: <spanx style="verb">SeekHead</spanx>
</t>
<t>path: <spanx style="verb">0*2(\Segment\SeekHead)</spanx>
</t>
<t>id: <spanx style="verb">0x114D9B74</spanx>
</t>
<t>maxOccurs: <spanx style="verb">2</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains the Segment Position of other Top-Level Elements.
</t>
</section>
<section anchor="seek-element" title="Seek Element">
<t>name: <spanx style="verb">Seek</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\SeekHead\Seek)</spanx>
</t>
<t>id: <spanx style="verb">0x4DBB</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains a single seek entry to an EBML Element.
</t>
</section>
<section anchor="seekid-element" title="SeekID Element">
<t>name: <spanx style="verb">SeekID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\SeekHead\Seek\SeekID)</spanx>
</t>
<t>id: <spanx style="verb">0x53AB</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The binary ID corresponding to the Element name.
</t>
</section>
<section anchor="seekposition-element" title="SeekPosition Element">
<t>name: <spanx style="verb">SeekPosition</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\SeekHead\Seek\SeekPosition)</spanx>
</t>
<t>id: <spanx style="verb">0x53AC</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The Segment Position of the Element.
</t>
</section>
<section anchor="info-element" title="Info Element">
<t>name: <spanx style="verb">Info</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Info)</spanx>
</t>
<t>id: <spanx style="verb">0x1549A966</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: Contains general information about the Segment.
</t>
</section>
<section anchor="segmentuid-element" title="SegmentUID Element">
<t>name: <spanx style="verb">SegmentUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\SegmentUID)</spanx>
</t>
<t>id: <spanx style="verb">0x73A4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A randomly generated unique ID to identify the Segment amongst many others (128 bits).
</t>
<t>usage notes: If the Segment is a part of a Linked Segment then this Element is REQUIRED.
</t>
</section>
<section anchor="segmentfilename-element" title="SegmentFilename Element">
<t>name: <spanx style="verb">SegmentFilename</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\SegmentFilename)</spanx>
</t>
<t>id: <spanx style="verb">0x7384</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A filename corresponding to this Segment.
</t>
</section>
<section anchor="prevuid-element" title="PrevUID Element">
<t>name: <spanx style="verb">PrevUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\PrevUID)</spanx>
</t>
<t>id: <spanx style="verb">0x3CB923</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A unique ID to identify the previous Segment of a Linked Segment (128 bits).
</t>
<t>usage notes: If the Segment is a part of a Linked Segment that uses Hard Linking then either the PrevUID or the NextUID Element is REQUIRED. If a Segment contains a PrevUID but not a NextUID then it MAY be considered as the last Segment of the Linked Segment. The PrevUID MUST NOT be equal to the SegmentUID.
</t>
</section>
<section anchor="prevfilename-element" title="PrevFilename Element">
<t>name: <spanx style="verb">PrevFilename</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\PrevFilename)</spanx>
</t>
<t>id: <spanx style="verb">0x3C83AB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A filename corresponding to the file of the previous Linked Segment.
</t>
<t>usage notes: Provision of the previous filename is for display convenience, but PrevUID SHOULD be considered authoritative for identifying the previous Segment in a Linked Segment.
</t>
</section>
<section anchor="nextuid-element" title="NextUID Element">
<t>name: <spanx style="verb">NextUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\NextUID)</spanx>
</t>
<t>id: <spanx style="verb">0x3EB923</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A unique ID to identify the next Segment of a Linked Segment (128 bits).
</t>
<t>usage notes: If the Segment is a part of a Linked Segment that uses Hard Linking then either the PrevUID or the NextUID Element is REQUIRED. If a Segment contains a NextUID but not a PrevUID then it MAY be considered as the first Segment of the Linked Segment. The NextUID MUST NOT be equal to the SegmentUID.
</t>
</section>
<section anchor="nextfilename-element" title="NextFilename Element">
<t>name: <spanx style="verb">NextFilename</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\NextFilename)</spanx>
</t>
<t>id: <spanx style="verb">0x3E83BB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A filename corresponding to the file of the next Linked Segment.
</t>
<t>usage notes: Provision of the next filename is for display convenience, but NextUID SHOULD be considered authoritative for identifying the Next Segment.
</t>
</section>
<section anchor="segmentfamily-element" title="SegmentFamily Element">
<t>name: <spanx style="verb">SegmentFamily</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Info\SegmentFamily)</spanx>
</t>
<t>id: <spanx style="verb">0x4444</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: A randomly generated unique ID that all Segments of a Linked Segment MUST share (128 bits).
</t>
<t>usage notes: If the Segment is a part of a Linked Segment that uses Soft Linking then this Element is REQUIRED.
</t>
</section>
<section anchor="chaptertranslate-element" title="ChapterTranslate Element">
<t>name: <spanx style="verb">ChapterTranslate</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Info\ChapterTranslate)</spanx>
</t>
<t>id: <spanx style="verb">0x6924</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A tuple of corresponding ID used by chapter codecs to represent this Segment.
</t>
</section>
<section anchor="chaptertranslateeditionuid-element" title="ChapterTranslateEditionUID Element">
<t>name: <spanx style="verb">ChapterTranslateEditionUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)</spanx>
</t>
<t>id: <spanx style="verb">0x69FC</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the Segment.
</t>
</section>
<section anchor="chaptertranslatecodec-element" title="ChapterTranslateCodec Element">
<t>name: <spanx style="verb">ChapterTranslateCodec</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)</spanx>
</t>
<t>id: <spanx style="verb">0x69BF</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The chapter codec
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>Matroska Script</c>
<c><spanx style="verb">1</spanx></c><c>DVD-menu</c>
</texttable>
</section>
<section anchor="chaptertranslateid-element" title="ChapterTranslateID Element">
<t>name: <spanx style="verb">ChapterTranslateID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)</spanx>
</t>
<t>id: <spanx style="verb">0x69A5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The binary value used to represent this Segment in the chapter codec data. The format depends on the ChapProcessCodecID used.
</t>
</section>
<section anchor="timestampscale-element" title="TimestampScale Element">
<t>name: <spanx style="verb">TimestampScale</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Info\TimestampScale)</spanx>
</t>
<t>id: <spanx style="verb">0x2AD7B1</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1000000</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Timestamp scale in nanoseconds (1.000.000 means all timestamps in the Segment are expressed in milliseconds).
</t>
</section>
<section anchor="duration-element" title="Duration Element">
<t>name: <spanx style="verb">Duration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\Duration)</spanx>
</t>
<t>id: <spanx style="verb">0x4489</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: Duration of the Segment in nanoseconds based on TimestampScale.
</t>
</section>
<section anchor="dateutc-element" title="DateUTC Element">
<t>name: <spanx style="verb">DateUTC</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\DateUTC)</spanx>
</t>
<t>id: <spanx style="verb">0x4461</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">date</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The date and time that the Segment was created by the muxing application or library.
</t>
</section>
<section anchor="title-element" title="Title Element">
<t>name: <spanx style="verb">Title</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Info\Title)</spanx>
</t>
<t>id: <spanx style="verb">0x7BA9</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: General name of the Segment.
</t>
</section>
<section anchor="muxingapp-element" title="MuxingApp Element">
<t>name: <spanx style="verb">MuxingApp</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Info\MuxingApp)</spanx>
</t>
<t>id: <spanx style="verb">0x4D80</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: Muxing application or library (example: &quot;libmatroska-0.4.3&quot;).
</t>
<t>usage notes: Include the full name of the application or library followed by the version number.
</t>
</section>
<section anchor="writingapp-element" title="WritingApp Element">
<t>name: <spanx style="verb">WritingApp</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Info\WritingApp)</spanx>
</t>
<t>id: <spanx style="verb">0x5741</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>definition: Writing application (example: &quot;mkvmerge-0.3.3&quot;).
</t>
<t>usage notes: Include the full name of the application followed by the version number.
</t>
</section>
<section anchor="cluster-element" title="Cluster Element">
<t>name: <spanx style="verb">Cluster</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster)</spanx>
</t>
<t>id: <spanx style="verb">0x1F43B675</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>unknownsizeallowed: <spanx style="verb">1</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The Top-Level Element containing the (monolithic) Block structure.
</t>
</section>
<section anchor="timestamp-element" title="Timestamp Element">
<t>name: <spanx style="verb">Timestamp</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\Timestamp)</spanx>
</t>
<t>id: <spanx style="verb">0xE7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Absolute timestamp of the cluster (based on TimestampScale).
</t>
</section>
<section anchor="silenttracks-element" title="SilentTracks Element">
<t>name: <spanx style="verb">SilentTracks</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\SilentTracks)</spanx>
</t>
<t>id: <spanx style="verb">0x5854</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking or to decide what track to use.
</t>
</section>
<section anchor="silenttracknumber-element" title="SilentTrackNumber Element">
<t>name: <spanx style="verb">SilentTrackNumber</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)</spanx>
</t>
<t>id: <spanx style="verb">0x58D7</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="position-element" title="Position Element">
<t>name: <spanx style="verb">Position</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\Position)</spanx>
</t>
<t>id: <spanx style="verb">0xA7</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The Segment Position of the Cluster in the Segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.
</t>
</section>
<section anchor="prevsize-element" title="PrevSize Element">
<t>name: <spanx style="verb">PrevSize</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\PrevSize)</spanx>
</t>
<t>id: <spanx style="verb">0xAB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Size of the previous Cluster, in octets. Can be useful for backward playing.
</t>
</section>
<section anchor="simpleblock-element" title="SimpleBlock Element">
<t>name: <spanx style="verb">SimpleBlock</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\SimpleBlock)</spanx>
</t>
<t>id: <spanx style="verb">0xA3</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed. (see SimpleBlock Structure)
</t>
</section>
<section anchor="blockgroup-element" title="BlockGroup Element">
<t>name: <spanx style="verb">BlockGroup</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\BlockGroup)</spanx>
</t>
<t>id: <spanx style="verb">0xA0</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Basic container of information containing a single Block and information specific to that Block.
</t>
</section>
<section anchor="block-element" title="Block Element">
<t>name: <spanx style="verb">Block</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\Block)</spanx>
</t>
<t>id: <spanx style="verb">0xA1</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Block containing the actual data to be rendered and a timestamp relative to the Cluster Timestamp. (see Block Structure)
</t>
</section>
<section anchor="blockvirtual-element" title="BlockVirtual Element">
<t>name: <spanx style="verb">BlockVirtual</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\BlockVirtual)</spanx>
</t>
<t>id: <spanx style="verb">0xA2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A Block with no data. It MUST be stored in the stream at the place the real Block would be in display order. (see Block Virtual)
</t>
</section>
<section anchor="blockadditions-element" title="BlockAdditions Element">
<t>name: <spanx style="verb">BlockAdditions</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\BlockAdditions)</spanx>
</t>
<t>id: <spanx style="verb">0x75A1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="blockmore-element" title="BlockMore Element">
<t>name: <spanx style="verb">BlockMore</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)</spanx>
</t>
<t>id: <spanx style="verb">0xA6</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contain the BlockAdditional and some parameters.
</t>
</section>
<section anchor="blockaddid-element" title="BlockAddID Element">
<t>name: <spanx style="verb">BlockAddID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddID)</spanx>
</t>
<t>id: <spanx style="verb">0xEE</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: An ID to identify the BlockAdditional level.
</t>
</section>
<section anchor="blockadditional-element" title="BlockAdditional Element">
<t>name: <spanx style="verb">BlockAdditional</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAdditional)</spanx>
</t>
<t>id: <spanx style="verb">0xA5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Interpreted by the codec as it wishes (using the BlockAddID).
</t>
</section>
<section anchor="blockduration-element" title="BlockDuration Element">
<t>name: <spanx style="verb">BlockDuration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\BlockDuration)</spanx>
</t>
<t>id: <spanx style="verb">0x9B</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">DefaultDuration</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The duration of the Block (based on TimestampScale). 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 timestamp of this Block and the timestamp of the next Block in &quot;display&quot; 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.
</t>
</section>
<section anchor="referencepriority-element" title="ReferencePriority Element">
<t>name: <spanx style="verb">ReferencePriority</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\ReferencePriority)</spanx>
</t>
<t>id: <spanx style="verb">0xFA</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="referenceblock-element" title="ReferenceBlock Element">
<t>name: <spanx style="verb">ReferenceBlock</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\BlockGroup\ReferenceBlock)</spanx>
</t>
<t>id: <spanx style="verb">0xFB</spanx>
</t>
<t>type: <spanx style="verb">integer</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to.
</t>
</section>
<section anchor="referencevirtual-element" title="ReferenceVirtual Element">
<t>name: <spanx style="verb">ReferenceVirtual</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)</spanx>
</t>
<t>id: <spanx style="verb">0xFD</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">integer</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The Segment Position of the data that would otherwise be in position of the virtual block.
</t>
</section>
<section anchor="codecstate-element" title="CodecState Element">
<t>name: <spanx style="verb">CodecState</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\CodecState)</spanx>
</t>
<t>id: <spanx style="verb">0xA4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: The new codec state to use. Data interpretation is private to the codec. This information SHOULD always be referenced by a seek entry.
</t>
</section>
<section anchor="discardpadding-element" title="DiscardPadding Element">
<t>name: <spanx style="verb">DiscardPadding</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\DiscardPadding)</spanx>
</t>
<t>id: <spanx style="verb">0x75A2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">integer</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and SHOULD be discarded during playback.
</t>
</section>
<section anchor="slices-element" title="Slices Element">
<t>name: <spanx style="verb">Slices</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices)</spanx>
</t>
<t>id: <spanx style="verb">0x8E</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains slices description.
</t>
</section>
<section anchor="timeslice-element" title="TimeSlice Element">
<t>name: <spanx style="verb">TimeSlice</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)</spanx>
</t>
<t>id: <spanx style="verb">0xE8</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>maxver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains extra time information about the data contained in the Block. Being able to interpret this Element is not REQUIRED for playback.
</t>
</section>
<section anchor="lacenumber-element" title="LaceNumber Element">
<t>name: <spanx style="verb">LaceNumber</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)</spanx>
</t>
<t>id: <spanx style="verb">0xCC</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>maxver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). Being able to interpret this Element is not REQUIRED for playback.
</t>
</section>
<section anchor="framenumber-element" title="FrameNumber Element">
<t>name: <spanx style="verb">FrameNumber</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)</spanx>
</t>
<t>id: <spanx style="verb">0xCD</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame).
</t>
</section>
<section anchor="blockadditionid-element" title="BlockAdditionID Element">
<t>name: <spanx style="verb">BlockAdditionID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)</spanx>
</t>
<t>id: <spanx style="verb">0xCB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The ID of the BlockAdditional Element (0 is the main Block).
</t>
</section>
<section anchor="delay-element" title="Delay Element">
<t>name: <spanx style="verb">Delay</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)</spanx>
</t>
<t>id: <spanx style="verb">0xCE</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The (scaled) delay to apply to the Element.
</t>
</section>
<section anchor="sliceduration-element" title="SliceDuration Element">
<t>name: <spanx style="verb">SliceDuration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)</spanx>
</t>
<t>id: <spanx style="verb">0xCF</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The (scaled) duration to apply to the Element.
</t>
</section>
<section anchor="referenceframe-element" title="ReferenceFrame Element">
<t>name: <spanx style="verb">ReferenceFrame</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)</spanx>
</t>
<t>id: <spanx style="verb">0xC8</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="referenceoffset-element" title="ReferenceOffset Element">
<t>name: <spanx style="verb">ReferenceOffset</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)</spanx>
</t>
<t>id: <spanx style="verb">0xC9</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="referencetimestamp-element" title="ReferenceTimestamp Element">
<t>name: <spanx style="verb">ReferenceTimestamp</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimestamp)</spanx>
</t>
<t>id: <spanx style="verb">0xCA</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="encryptedblock-element" title="EncryptedBlock Element">
<t>name: <spanx style="verb">EncryptedBlock</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cluster\EncryptedBlock)</spanx>
</t>
<t>id: <spanx style="verb">0xAF</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed). (see EncryptedBlock Structure)
</t>
</section>
<section anchor="tracks-element" title="Tracks Element">
<t>name: <spanx style="verb">Tracks</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks)</spanx>
</t>
<t>id: <spanx style="verb">0x1654AE6B</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A Top-Level Element of information with many tracks described.
</t>
</section>
<section anchor="trackentry-element" title="TrackEntry Element">
<t>name: <spanx style="verb">TrackEntry</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tracks\TrackEntry)</spanx>
</t>
<t>id: <spanx style="verb">0xAE</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Describes a track with all Elements.
</t>
</section>
<section anchor="tracknumber-element" title="TrackNumber Element">
<t>name: <spanx style="verb">TrackNumber</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackNumber)</spanx>
</t>
<t>id: <spanx style="verb">0xD7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number).
</t>
</section>
<section anchor="trackuid-element" title="TrackUID Element">
<t>name: <spanx style="verb">TrackUID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackUID)</spanx>
</t>
<t>id: <spanx style="verb">0x73C5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="tracktype-element" title="TrackType Element">
<t>name: <spanx style="verb">TrackType</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackType)</spanx>
</t>
<t>id: <spanx style="verb">0x83</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">1-254</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A set of track types coded on 8 bits.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">1</spanx></c><c>video</c>
<c><spanx style="verb">2</spanx></c><c>audio</c>
<c><spanx style="verb">3</spanx></c><c>complex</c>
<c><spanx style="verb">16</spanx></c><c>logo</c>
<c><spanx style="verb">17</spanx></c><c>subtitle</c>
<c><spanx style="verb">18</spanx></c><c>buttons</c>
<c><spanx style="verb">32</spanx></c><c>control</c>
</texttable>
</section>
<section anchor="flagenabled-element" title="FlagEnabled Element">
<t>name: <spanx style="verb">FlagEnabled</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\FlagEnabled)</spanx>
</t>
<t>id: <spanx style="verb">0xB9</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: Set if the track is usable. (1 bit)
</t>
</section>
<section anchor="flagdefault-element" title="FlagDefault Element">
<t>name: <spanx style="verb">FlagDefault</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\FlagDefault)</spanx>
</t>
<t>id: <spanx style="verb">0x88</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)
</t>
</section>
<section anchor="flagforced-element" title="FlagForced Element">
<t>name: <spanx style="verb">FlagForced</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\FlagForced)</spanx>
</t>
<t>id: <spanx style="verb">0x55AA</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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)
</t>
</section>
<section anchor="flaglacing-element" title="FlagLacing Element">
<t>name: <spanx style="verb">FlagLacing</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\FlagLacing)</spanx>
</t>
<t>id: <spanx style="verb">0x9C</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Set if the track MAY contain blocks using lacing. (1 bit)
</t>
</section>
<section anchor="mincache-element" title="MinCache Element">
<t>name: <spanx style="verb">MinCache</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\MinCache)</spanx>
</t>
<t>id: <spanx style="verb">0x6DE7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="maxcache-element" title="MaxCache Element">
<t>name: <spanx style="verb">MaxCache</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\MaxCache)</spanx>
</t>
<t>id: <spanx style="verb">0x6DF8</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The maximum cache size necessary to store referenced frames in and the current frame. 0 means no cache is needed.
</t>
</section>
<section anchor="defaultduration-element" title="DefaultDuration Element">
<t>name: <spanx style="verb">DefaultDuration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\DefaultDuration)</spanx>
</t>
<t>id: <spanx style="verb">0x23E383</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Number of nanoseconds (not scaled via TimestampScale) per frame ('frame' in the Matroska sense -- one Element put into a (Simple)Block).
</t>
</section>
<section anchor="defaultdecodedfieldduration-element" title="DefaultDecodedFieldDuration Element">
<t>name: <spanx style="verb">DefaultDecodedFieldDuration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)</spanx>
</t>
<t>id: <spanx style="verb">0x234E7A</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The period in nanoseconds (not scaled by TimestampScale) between two successive fields at the output of the decoding process (see the notes)
</t>
</section>
<section anchor="tracktimestampscale-element" title="TrackTimestampScale Element">
<t>name: <spanx style="verb">TrackTimestampScale</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackTimestampScale)</spanx>
</t>
<t>id: <spanx style="verb">0x23314F</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>default: <spanx style="verb">0x1p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>maxver: <spanx style="verb">3</spanx>
</t>
<t>documentation: 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).
</t>
</section>
<section anchor="trackoffset-element" title="TrackOffset Element">
<t>name: <spanx style="verb">TrackOffset</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrackOffset)</spanx>
</t>
<t>id: <spanx style="verb">0x537F</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">integer</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track.
</t>
</section>
<section anchor="maxblockadditionid-element" title="MaxBlockAdditionID Element">
<t>name: <spanx style="verb">MaxBlockAdditionID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)</spanx>
</t>
<t>id: <spanx style="verb">0x55EE</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.
</t>
</section>
<section anchor="name-element" title="Name Element">
<t>name: <spanx style="verb">Name</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Name)</spanx>
</t>
<t>id: <spanx style="verb">0x536E</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A human-readable track name.
</t>
</section>
<section anchor="language-element" title="Language Element">
<t>name: <spanx style="verb">Language</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Language)</spanx>
</t>
<t>id: <spanx style="verb">0x22B59C</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">eng</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specifies the language of the track in the Matroska languages form. This Element MUST be ignored if the LanguageIETF Element is used in the same TrackEntry.
</t>
</section>
<section anchor="languageietf-element" title="LanguageIETF Element">
<t>name: <spanx style="verb">LanguageIETF</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\LanguageIETF)</spanx>
</t>
<t>id: <spanx style="verb">0x22B59D</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies the language of the track according to BCP 47 and using the IANA Language Subtag Registry. If this Element is used, then any Language Elements used in the same TrackEntry MUST be ignored.
</t>
</section>
<section anchor="codecid-element" title="CodecID Element">
<t>name: <spanx style="verb">CodecID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\CodecID)</spanx>
</t>
<t>id: <spanx style="verb">0x86</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: An ID corresponding to the codec, see the codec page for more info.
</t>
</section>
<section anchor="codecprivate-element" title="CodecPrivate Element">
<t>name: <spanx style="verb">CodecPrivate</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\CodecPrivate)</spanx>
</t>
<t>id: <spanx style="verb">0x63A2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Private data only known to the codec.
</t>
</section>
<section anchor="codecname-element" title="CodecName Element">
<t>name: <spanx style="verb">CodecName</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\CodecName)</spanx>
</t>
<t>id: <spanx style="verb">0x258688</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A human-readable string specifying the codec.
</t>
</section>
<section anchor="attachmentlink-element" title="AttachmentLink Element">
<t>name: <spanx style="verb">AttachmentLink</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\AttachmentLink)</spanx>
</t>
<t>id: <spanx style="verb">0x7446</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>maxver: <spanx style="verb">3</spanx>
</t>
<t>documentation: The UID of an attachment that is used by this codec.
</t>
</section>
<section anchor="codecsettings-element" title="CodecSettings Element">
<t>name: <spanx style="verb">CodecSettings</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\CodecSettings)</spanx>
</t>
<t>id: <spanx style="verb">0x3A9697</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A string describing the encoding setting used.
</t>
</section>
<section anchor="codecinfourl-element" title="CodecInfoURL Element">
<t>name: <spanx style="verb">CodecInfoURL</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks\TrackEntry\CodecInfoURL)</spanx>
</t>
<t>id: <spanx style="verb">0x3B4040</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A URL to find information about the codec used.
</t>
</section>
<section anchor="codecdownloadurl-element" title="CodecDownloadURL Element">
<t>name: <spanx style="verb">CodecDownloadURL</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)</spanx>
</t>
<t>id: <spanx style="verb">0x26B240</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A URL to download about the codec used.
</t>
</section>
<section anchor="codecdecodeall-element" title="CodecDecodeAll Element">
<t>name: <spanx style="verb">CodecDecodeAll</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)</spanx>
</t>
<t>id: <spanx style="verb">0xAA</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: The codec can decode potentially damaged data (1 bit).
</t>
</section>
<section anchor="trackoverlay-element" title="TrackOverlay Element">
<t>name: <spanx style="verb">TrackOverlay</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks\TrackEntry\TrackOverlay)</spanx>
</t>
<t>id: <spanx style="verb">0x6FAB</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="codecdelay-element" title="CodecDelay Element">
<t>name: <spanx style="verb">CodecDelay</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\CodecDelay)</spanx>
</t>
<t>id: <spanx style="verb">0x56AA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: CodecDelay is The codec-built-in delay in nanoseconds. This value MUST be subtracted from each block timestamp in order to get the actual timestamp. The value SHOULD be small so the muxing of tracks with the same actual timestamp are in the same Cluster.
</t>
</section>
<section anchor="seekpreroll-element" title="SeekPreRoll Element">
<t>name: <spanx style="verb">SeekPreRoll</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)</spanx>
</t>
<t>id: <spanx style="verb">0x56BB</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder MUST decode before the decoded data is valid.
</t>
</section>
<section anchor="tracktranslate-element" title="TrackTranslate Element">
<t>name: <spanx style="verb">TrackTranslate</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks\TrackEntry\TrackTranslate)</spanx>
</t>
<t>id: <spanx style="verb">0x6624</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The track identification for the given Chapter Codec.
</t>
</section>
<section anchor="tracktranslateeditionuid-element" title="TrackTranslateEditionUID Element">
<t>name: <spanx style="verb">TrackTranslateEditionUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEditionUID)</spanx>
</t>
<t>id: <spanx style="verb">0x66FC</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the Segment.
</t>
</section>
<section anchor="tracktranslatecodec-element" title="TrackTranslateCodec Element">
<t>name: <spanx style="verb">TrackTranslateCodec</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)</spanx>
</t>
<t>id: <spanx style="verb">0x66BF</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The chapter codec.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>Matroska Script</c>
<c><spanx style="verb">1</spanx></c><c>DVD-menu</c>
</texttable>
</section>
<section anchor="tracktranslatetrackid-element" title="TrackTranslateTrackID Element">
<t>name: <spanx style="verb">TrackTranslateTrackID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackID)</spanx>
</t>
<t>id: <spanx style="verb">0x66A5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.
</t>
</section>
<section anchor="video-element" title="Video Element">
<t>name: <spanx style="verb">Video</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video)</spanx>
</t>
<t>id: <spanx style="verb">0xE0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Video settings.
</t>
</section>
<section anchor="flaginterlaced-element" title="FlagInterlaced Element">
<t>name: <spanx style="verb">FlagInterlaced</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)</spanx>
</t>
<t>id: <spanx style="verb">0x9A</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-2</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: A flag to declare if the video is known to be progressive or interlaced and if applicable to declare details about the interlacement.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>undetermined</c>
<c><spanx style="verb">1</spanx></c><c>interlaced</c>
<c><spanx style="verb">2</spanx></c><c>progressive</c>
</texttable>
</section>
<section anchor="fieldorder-element" title="FieldOrder Element">
<t>name: <spanx style="verb">FieldOrder</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)</spanx>
</t>
<t>id: <spanx style="verb">0x9D</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-14</spanx>
</t>
<t>default: <spanx style="verb">2</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Declare the field ordering of the video. If FlagInterlaced is not set to 1, this Element MUST be ignored.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<ttcol align="left">documentation</ttcol>
<c><spanx style="verb">0</spanx></c><c>progressive</c>
<c><spanx style="verb">1</spanx></c><c>tff</c><c>Top field displayed first. Top field stored first.</c>
<c><spanx style="verb">2</spanx></c><c>undetermined</c>
<c><spanx style="verb">6</spanx></c><c>bff</c><c>Bottom field displayed first. Bottom field stored first.</c>
<c><spanx style="verb">9</spanx></c><c>bff(swapped)</c><c>Top field displayed first. Fields are interleaved in storage with the top line of the top field stored first.</c>
<c><spanx style="verb">14</spanx></c><c>tff(swapped)</c><c>Bottom field displayed first. Fields are interleaved in storage with the top line of the top field stored first.</c>
</texttable>
</section>
<section anchor="stereomode-element" title="StereoMode Element">
<t>name: <spanx style="verb">StereoMode</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)</spanx>
</t>
<t>id: <spanx style="verb">0x53B8</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Stereo-3D video mode. There are some more details on 3D support in the Specification Notes.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>mono</c>
<c><spanx style="verb">1</spanx></c><c>side by side (left eye first)</c>
<c><spanx style="verb">2</spanx></c><c>top - bottom (right eye is first)</c>
<c><spanx style="verb">3</spanx></c><c>top - bottom (left eye is first)</c>
<c><spanx style="verb">4</spanx></c><c>checkboard (right eye is first)</c>
<c><spanx style="verb">5</spanx></c><c>checkboard (left eye is first)</c>
<c><spanx style="verb">6</spanx></c><c>row interleaved (right eye is first)</c>
<c><spanx style="verb">7</spanx></c><c>row interleaved (left eye is first)</c>
<c><spanx style="verb">8</spanx></c><c>column interleaved (right eye is first)</c>
<c><spanx style="verb">9</spanx></c><c>column interleaved (left eye is first)</c>
<c><spanx style="verb">10</spanx></c><c>anaglyph (cyan/red)</c>
<c><spanx style="verb">11</spanx></c><c>side by side (right eye first)</c>
<c><spanx style="verb">12</spanx></c><c>anaglyph (green/magenta)</c>
<c><spanx style="verb">13</spanx></c><c>both eyes laced in one Block (left eye is first)</c>
<c><spanx style="verb">14</spanx></c><c>both eyes laced in one Block (right eye is first)</c>
</texttable>
</section>
<section anchor="alphamode-element" title="AlphaMode Element">
<t>name: <spanx style="verb">AlphaMode</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)</spanx>
</t>
<t>id: <spanx style="verb">0x53C0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain Alpha data.
</t>
</section>
<section anchor="oldstereomode-element" title="OldStereoMode Element">
<t>name: <spanx style="verb">OldStereoMode</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)</spanx>
</t>
<t>id: <spanx style="verb">0x53B9</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>mono</c>
<c><spanx style="verb">1</spanx></c><c>right eye</c>
<c><spanx style="verb">2</spanx></c><c>left eye</c>
<c><spanx style="verb">3</spanx></c><c>both eyes</c>
</texttable>
</section>
<section anchor="pixelwidth-element" title="PixelWidth Element">
<t>name: <spanx style="verb">PixelWidth</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)</spanx>
</t>
<t>id: <spanx style="verb">0xB0</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Width of the encoded video frames in pixels.
</t>
</section>
<section anchor="pixelheight-element" title="PixelHeight Element">
<t>name: <spanx style="verb">PixelHeight</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)</spanx>
</t>
<t>id: <spanx style="verb">0xBA</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Height of the encoded video frames in pixels.
</t>
</section>
<section anchor="pixelcropbottom-element" title="PixelCropBottom Element">
<t>name: <spanx style="verb">PixelCropBottom</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)</spanx>
</t>
<t>id: <spanx style="verb">0x54AA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The number of video pixels to remove at the bottom of the image.
</t>
</section>
<section anchor="pixelcroptop-element" title="PixelCropTop Element">
<t>name: <spanx style="verb">PixelCropTop</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)</spanx>
</t>
<t>id: <spanx style="verb">0x54BB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The number of video pixels to remove at the top of the image.
</t>
</section>
<section anchor="pixelcropleft-element" title="PixelCropLeft Element">
<t>name: <spanx style="verb">PixelCropLeft</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)</spanx>
</t>
<t>id: <spanx style="verb">0x54CC</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The number of video pixels to remove on the left of the image.
</t>
</section>
<section anchor="pixelcropright-element" title="PixelCropRight Element">
<t>name: <spanx style="verb">PixelCropRight</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)</spanx>
</t>
<t>id: <spanx style="verb">0x54DD</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The number of video pixels to remove on the right of the image.
</t>
</section>
<section anchor="displaywidth-element" title="DisplayWidth Element">
<t>name: <spanx style="verb">DisplayWidth</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)</spanx>
</t>
<t>id: <spanx style="verb">0x54B0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">PixelWidth - PixelCropLeft - PixelCropRight</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Width of the video frames to display. Applies to the video frame after cropping (PixelCrop* Elements). The default value is only valid when DisplayUnit is 0.
</t>
</section>
<section anchor="displayheight-element" title="DisplayHeight Element">
<t>name: <spanx style="verb">DisplayHeight</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)</spanx>
</t>
<t>id: <spanx style="verb">0x54BA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">PixelHeight - PixelCropTop - PixelCropBottom</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Height of the video frames to display. Applies to the video frame after cropping (PixelCrop* Elements). The default value is only valid when DisplayUnit is 0.
</t>
</section>
<section anchor="displayunit-element" title="DisplayUnit Element">
<t>name: <spanx style="verb">DisplayUnit</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)</spanx>
</t>
<t>id: <spanx style="verb">0x54B2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: How DisplayWidth &amp; DisplayHeight are interpreted.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>pixels</c>
<c><spanx style="verb">1</spanx></c><c>centimeters</c>
<c><spanx style="verb">2</spanx></c><c>inches</c>
<c><spanx style="verb">3</spanx></c><c>display aspect ratio</c>
<c><spanx style="verb">4</spanx></c><c>unknown</c>
</texttable>
</section>
<section anchor="aspectratiotype-element" title="AspectRatioType Element">
<t>name: <spanx style="verb">AspectRatioType</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)</spanx>
</t>
<t>id: <spanx style="verb">0x54B3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify the possible modifications to the aspect ratio.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>free resizing</c>
<c><spanx style="verb">1</spanx></c><c>keep aspect ratio</c>
<c><spanx style="verb">2</spanx></c><c>fixed</c>
</texttable>
</section>
<section anchor="colourspace-element" title="ColourSpace Element">
<t>name: <spanx style="verb">ColourSpace</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)</spanx>
</t>
<t>id: <spanx style="verb">0x2EB524</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>size: <spanx style="verb">4</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify the pixel format used for the Track's data as a FourCC. This value is similar in scope to the biCompression value of AVI's BITMAPINFOHEADER. This Element is MANDATORY in TrackEntry when the CodecID Element of the TrackEntry is set to &quot;V_UNCOMPRESSED&quot;.
</t>
</section>
<section anchor="gammavalue-element" title="GammaValue Element">
<t>name: <spanx style="verb">GammaValue</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)</spanx>
</t>
<t>id: <spanx style="verb">0x2FB523</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: Gamma Value.
</t>
</section>
<section anchor="framerate-element" title="FrameRate Element">
<t>name: <spanx style="verb">FrameRate</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)</spanx>
</t>
<t>id: <spanx style="verb">0x2383E3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: Number of frames per second. Informational only.
</t>
</section>
<section anchor="colour-element" title="Colour Element">
<t>name: <spanx style="verb">Colour</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour)</spanx>
</t>
<t>id: <spanx style="verb">0x55B0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Settings describing the colour format.
</t>
</section>
<section anchor="matrixcoefficients-element" title="MatrixCoefficients Element">
<t>name: <spanx style="verb">MatrixCoefficients</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)</spanx>
</t>
<t>id: <spanx style="verb">0x55B1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">2</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2013/DCOR1.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>GBR</c>
<c><spanx style="verb">1</spanx></c><c>BT709</c>
<c><spanx style="verb">2</spanx></c><c>unspecified</c>
<c><spanx style="verb">3</spanx></c><c>reserved</c>
<c><spanx style="verb">4</spanx></c><c>FCC</c>
<c><spanx style="verb">5</spanx></c><c>BT470BG</c>
<c><spanx style="verb">6</spanx></c><c>SMPTE 170M</c>
<c><spanx style="verb">7</spanx></c><c>SMPTE 240M</c>
<c><spanx style="verb">8</spanx></c><c>YCoCg</c>
<c><spanx style="verb">9</spanx></c><c>BT2020 Non-constant Luminance</c>
<c><spanx style="verb">10</spanx></c><c>BT2020 Constant Luminance</c>
</texttable>
</section>
<section anchor="bitsperchannel-element" title="BitsPerChannel Element">
<t>name: <spanx style="verb">BitsPerChannel</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)</spanx>
</t>
<t>id: <spanx style="verb">0x55B2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified.
</t>
</section>
<section anchor="chromasubsamplinghorz-element" title="ChromaSubsamplingHorz Element">
<t>name: <spanx style="verb">ChromaSubsamplingHorz</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)</spanx>
</t>
<t>id: <spanx style="verb">0x55B3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The amount of pixels to remove in the Cr and Cb channels for every pixel not removed horizontally. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set to 1.
</t>
</section>
<section anchor="chromasubsamplingvert-element" title="ChromaSubsamplingVert Element">
<t>name: <spanx style="verb">ChromaSubsamplingVert</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)</spanx>
</t>
<t>id: <spanx style="verb">0x55B4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The amount of pixels to remove in the Cr and Cb channels for every pixel not removed vertically. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be set to 1.
</t>
</section>
<section anchor="cbsubsamplinghorz-element" title="CbSubsamplingHorz Element">
<t>name: <spanx style="verb">CbSubsamplingHorz</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)</spanx>
</t>
<t>id: <spanx style="verb">0x55B5</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The amount of pixels to remove in the Cb channel for every pixel not removed horizontally. This is additive with ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and CbSubsamplingHorz SHOULD be set to 1.
</t>
</section>
<section anchor="cbsubsamplingvert-element" title="CbSubsamplingVert Element">
<t>name: <spanx style="verb">CbSubsamplingVert</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)</spanx>
</t>
<t>id: <spanx style="verb">0x55B6</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The amount of pixels to remove in the Cb channel for every pixel not removed vertically. This is additive with ChromaSubsamplingVert.
</t>
</section>
<section anchor="chromasitinghorz-element" title="ChromaSitingHorz Element">
<t>name: <spanx style="verb">ChromaSitingHorz</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)</spanx>
</t>
<t>id: <spanx style="verb">0x55B7</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: How chroma is subsampled horizontally.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>unspecified</c>
<c><spanx style="verb">1</spanx></c><c>left collocated</c>
<c><spanx style="verb">2</spanx></c><c>half</c>
</texttable>
</section>
<section anchor="chromasitingvert-element" title="ChromaSitingVert Element">
<t>name: <spanx style="verb">ChromaSitingVert</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)</spanx>
</t>
<t>id: <spanx style="verb">0x55B8</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: How chroma is subsampled vertically.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>unspecified</c>
<c><spanx style="verb">1</spanx></c><c>top collocated</c>
<c><spanx style="verb">2</spanx></c><c>half</c>
</texttable>
</section>
<section anchor="range-element" title="Range Element">
<t>name: <spanx style="verb">Range</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)</spanx>
</t>
<t>id: <spanx style="verb">0x55B9</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Clipping of the color ranges.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>unspecified</c>
<c><spanx style="verb">1</spanx></c><c>broadcast range</c>
<c><spanx style="verb">2</spanx></c><c>full range (no clipping)</c>
<c><spanx style="verb">3</spanx></c><c>defined by MatrixCoefficients/TransferCharacteristics</c>
</texttable>
</section>
<section anchor="transfercharacteristics-element" title="TransferCharacteristics Element">
<t>name: <spanx style="verb">TransferCharacteristics</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteristics)</spanx>
</t>
<t>id: <spanx style="verb">0x55BA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">2</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The transfer characteristics of the video. For clarity, the value and meanings for TransferCharacteristics 1-15 are adopted from Table 3 of ISO/IEC 23001-8:2013/DCOR1. TransferCharacteristics 16-18 are proposed values.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>reserved</c>
<c><spanx style="verb">1</spanx></c><c>ITU-R BT.709</c>
<c><spanx style="verb">2</spanx></c><c>unspecified</c>
<c><spanx style="verb">3</spanx></c><c>reserved</c>
<c><spanx style="verb">4</spanx></c><c>Gamma 2.2 curve</c>
<c><spanx style="verb">5</spanx></c><c>Gamma 2.8 curve</c>
<c><spanx style="verb">6</spanx></c><c>SMPTE 170M</c>
<c><spanx style="verb">7</spanx></c><c>SMPTE 240M</c>
<c><spanx style="verb">8</spanx></c><c>Linear</c>
<c><spanx style="verb">9</spanx></c><c>Log</c>
<c><spanx style="verb">10</spanx></c><c>Log Sqrt</c>
<c><spanx style="verb">11</spanx></c><c>IEC 61966-2-4</c>
<c><spanx style="verb">12</spanx></c><c>ITU-R BT.1361 Extended Colour Gamut</c>
<c><spanx style="verb">13</spanx></c><c>IEC 61966-2-1</c>
<c><spanx style="verb">14</spanx></c><c>ITU-R BT.2020 10 bit</c>
<c><spanx style="verb">15</spanx></c><c>ITU-R BT.2020 12 bit</c>
<c><spanx style="verb">16</spanx></c><c>SMPTE ST 2084</c>
<c><spanx style="verb">17</spanx></c><c>SMPTE ST 428-1</c>
<c><spanx style="verb">18</spanx></c><c>ARIB STD-B67 (HLG)</c>
</texttable>
</section>
<section anchor="primaries-element" title="Primaries Element">
<t>name: <spanx style="verb">Primaries</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)</spanx>
</t>
<t>id: <spanx style="verb">0x55BB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">2</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23001-8:2013/DCOR1.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>reserved</c>
<c><spanx style="verb">1</spanx></c><c>ITU-R BT.709</c>
<c><spanx style="verb">2</spanx></c><c>unspecified</c>
<c><spanx style="verb">3</spanx></c><c>reserved</c>
<c><spanx style="verb">4</spanx></c><c>ITU-R BT.470M</c>
<c><spanx style="verb">5</spanx></c><c>ITU-R BT.470BG</c>
<c><spanx style="verb">6</spanx></c><c>SMPTE 170M</c>
<c><spanx style="verb">7</spanx></c><c>SMPTE 240M</c>
<c><spanx style="verb">8</spanx></c><c>FILM</c>
<c><spanx style="verb">9</spanx></c><c>ITU-R BT.2020</c>
<c><spanx style="verb">10</spanx></c><c>SMPTE ST 428-1</c>
<c><spanx style="verb">22</spanx></c><c>JEDEC P22 phosphors</c>
</texttable>
</section>
<section anchor="maxcll-element" title="MaxCLL Element">
<t>name: <spanx style="verb">MaxCLL</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)</spanx>
</t>
<t>id: <spanx style="verb">0x55BC</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Maximum brightness of a single pixel (Maximum Content Light Level) in candelas per square meter (cd/m²).
</t>
</section>
<section anchor="maxfall-element" title="MaxFALL Element">
<t>name: <spanx style="verb">MaxFALL</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)</spanx>
</t>
<t>id: <spanx style="verb">0x55BD</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Maximum brightness of a single full frame (Maximum Frame-Average Light Level) in candelas per square meter (cd/m²).
</t>
</section>
<section anchor="masteringmetadata-element" title="MasteringMetadata Element">
<t>name: <spanx style="verb">MasteringMetadata</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)</spanx>
</t>
<t>id: <spanx style="verb">0x55D0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: SMPTE 2086 mastering data.
</t>
</section>
<section anchor="primaryrchromaticityx-element" title="PrimaryRChromaticityX Element">
<t>name: <spanx style="verb">PrimaryRChromaticityX</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryRChromaticityX)</spanx>
</t>
<t>id: <spanx style="verb">0x55D1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Red X chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="primaryrchromaticityy-element" title="PrimaryRChromaticityY Element">
<t>name: <spanx style="verb">PrimaryRChromaticityY</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryRChromaticityY)</spanx>
</t>
<t>id: <spanx style="verb">0x55D2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Red Y chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="primarygchromaticityx-element" title="PrimaryGChromaticityX Element">
<t>name: <spanx style="verb">PrimaryGChromaticityX</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryGChromaticityX)</spanx>
</t>
<t>id: <spanx style="verb">0x55D3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Green X chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="primarygchromaticityy-element" title="PrimaryGChromaticityY Element">
<t>name: <spanx style="verb">PrimaryGChromaticityY</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryGChromaticityY)</spanx>
</t>
<t>id: <spanx style="verb">0x55D4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Green Y chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="primarybchromaticityx-element" title="PrimaryBChromaticityX Element">
<t>name: <spanx style="verb">PrimaryBChromaticityX</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryBChromaticityX)</spanx>
</t>
<t>id: <spanx style="verb">0x55D5</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Blue X chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="primarybchromaticityy-element" title="PrimaryBChromaticityY Element">
<t>name: <spanx style="verb">PrimaryBChromaticityY</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\PrimaryBChromaticityY)</spanx>
</t>
<t>id: <spanx style="verb">0x55D6</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Blue Y chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="whitepointchromaticityx-element" title="WhitePointChromaticityX Element">
<t>name: <spanx style="verb">WhitePointChromaticityX</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\WhitePointChromaticityX)</spanx>
</t>
<t>id: <spanx style="verb">0x55D7</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: White X chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="whitepointchromaticityy-element" title="WhitePointChromaticityY Element">
<t>name: <spanx style="verb">WhitePointChromaticityY</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\WhitePointChromaticityY)</spanx>
</t>
<t>id: <spanx style="verb">0x55D8</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: White Y chromaticity coordinate as defined by CIE 1931.
</t>
</section>
<section anchor="luminancemax-element" title="LuminanceMax Element">
<t>name: <spanx style="verb">LuminanceMax</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\LuminanceMax)</spanx>
</t>
<t>id: <spanx style="verb">0x55D9</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt;= 0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Maximum luminance. Represented in candelas per square meter (cd/m²).
</t>
</section>
<section anchor="luminancemin-element" title="LuminanceMin Element">
<t>name: <spanx style="verb">LuminanceMin</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\LuminanceMin)</spanx>
</t>
<t>id: <spanx style="verb">0x55DA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt;= 0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Mininum luminance. Represented in candelas per square meter (cd/m²).
</t>
</section>
<section anchor="projection-element" title="Projection Element">
<t>name: <spanx style="verb">Projection</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Projection)</spanx>
</t>
<t>id: <spanx style="verb">0x7670</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Describes the video projection details. Used to render spherical and VR videos.
</t>
</section>
<section anchor="projectiontype-element" title="ProjectionType Element">
<t>name: <spanx style="verb">ProjectionType</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionType)</spanx>
</t>
<t>id: <spanx style="verb">0x7671</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-3</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Describes the projection used for this video track.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>rectangular</c>
<c><spanx style="verb">1</spanx></c><c>equirectangular</c>
<c><spanx style="verb">2</spanx></c><c>cubemap</c>
<c><spanx style="verb">3</spanx></c><c>mesh</c>
</texttable>
</section>
<section anchor="projectionprivate-element" title="ProjectionPrivate Element">
<t>name: <spanx style="verb">ProjectionPrivate</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate)</spanx>
</t>
<t>id: <spanx style="verb">0x7672</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Private data that only applies to a specific projection.SemanticsIf ProjectionType equals 0 (Rectangular), then this element must not be present.If ProjectionType equals 1 (Equirectangular), then this element must be present and contain the same binary data that would be stored inside an ISOBMFF Equirectangular Projection Box ('equi').If ProjectionType equals 2 (Cubemap), then this element must be present and contain the same binary data that would be stored inside an ISOBMFF Cubemap Projection Box ('cbmp').If ProjectionType equals 3 (Mesh), then this element must be present and contain the same binary data that would be stored inside an ISOBMFF Mesh Projection Box ('mshp').Note: ISOBMFF box size and fourcc fields are not included in the binary data, but the FullBox version and flag fields are. This is to avoid redundant framing information while preserving versioning and semantics between the two container formats.
</t>
</section>
<section anchor="projectionposeyaw-element" title="ProjectionPoseYaw Element">
<t>name: <spanx style="verb">ProjectionPoseYaw</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw)</spanx>
</t>
<t>id: <spanx style="verb">0x7673</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies a yaw rotation to the projection.SemanticsValue represents a clockwise rotation, in degrees, around the up vector. This rotation must be applied before any ProjectionPosePitch or ProjectionPoseRoll rotations. The value of this field should be in the -180 to 180 degree range.
</t>
</section>
<section anchor="projectionposepitch-element" title="ProjectionPosePitch Element">
<t>name: <spanx style="verb">ProjectionPosePitch</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitch)</spanx>
</t>
<t>id: <spanx style="verb">0x7674</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies a pitch rotation to the projection.SemanticsValue represents a counter-clockwise rotation, in degrees, around the right vector. This rotation must be applied after the ProjectionPoseYaw rotation and before the ProjectionPoseRoll rotation. The value of this field should be in the -90 to 90 degree range.
</t>
</section>
<section anchor="projectionposeroll-element" title="ProjectionPoseRoll Element">
<t>name: <spanx style="verb">ProjectionPoseRoll</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll)</spanx>
</t>
<t>id: <spanx style="verb">0x7675</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0x0p+0</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies a roll rotation to the projection.SemanticsValue represents a counter-clockwise rotation, in degrees, around the forward vector. This rotation must be applied after the ProjectionPoseYaw and ProjectionPosePitch rotations. The value of this field should be in the -180 to 180 degree range.
</t>
</section>
<section anchor="audio-element" title="Audio Element">
<t>name: <spanx style="verb">Audio</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Audio)</spanx>
</t>
<t>id: <spanx style="verb">0xE1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Audio settings.
</t>
</section>
<section anchor="samplingfrequency-element" title="SamplingFrequency Element">
<t>name: <spanx style="verb">SamplingFrequency</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)</spanx>
</t>
<t>id: <spanx style="verb">0xB5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>default: <spanx style="verb">0x1.f4p+12</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Sampling frequency in Hz.
</t>
</section>
<section anchor="outputsamplingfrequency-element" title="OutputSamplingFrequency Element">
<t>name: <spanx style="verb">OutputSamplingFrequency</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)</spanx>
</t>
<t>id: <spanx style="verb">0x78B5</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt; 0x0p+0</spanx>
</t>
<t>default: <spanx style="verb">SamplingFrequency</spanx>
</t>
<t>type: <spanx style="verb">float</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Real output sampling frequency in Hz (used for SBR techniques).
</t>
</section>
<section anchor="channels-element" title="Channels Element">
<t>name: <spanx style="verb">Channels</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\Audio\Channels)</spanx>
</t>
<t>id: <spanx style="verb">0x9F</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Numbers of channels in the track.
</t>
</section>
<section anchor="channelpositions-element" title="ChannelPositions Element">
<t>name: <spanx style="verb">ChannelPositions</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)</spanx>
</t>
<t>id: <spanx style="verb">0x7D7B</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: Table of horizontal angles for each successive channel, see appendix.
</t>
</section>
<section anchor="bitdepth-element" title="BitDepth Element">
<t>name: <spanx style="verb">BitDepth</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)</spanx>
</t>
<t>id: <spanx style="verb">0x6264</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Bits per sample, mostly used for PCM.
</t>
</section>
<section anchor="trackoperation-element" title="TrackOperation Element">
<t>name: <spanx style="verb">TrackOperation</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrackOperation)</spanx>
</t>
<t>id: <spanx style="verb">0xE2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject.
</t>
</section>
<section anchor="trackcombineplanes-element" title="TrackCombinePlanes Element">
<t>name: <spanx style="verb">TrackCombinePlanes</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)</spanx>
</t>
<t>id: <spanx style="verb">0xE3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Contains the list of all video plane tracks that need to be combined to create this 3D track
</t>
</section>
<section anchor="trackplane-element" title="TrackPlane Element">
<t>name: <spanx style="verb">TrackPlane</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\TrackPlane)</spanx>
</t>
<t>id: <spanx style="verb">0xE4</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Contains a video plane track that need to be combined to create this 3D track
</t>
</section>
<section anchor="trackplaneuid-element" title="TrackPlaneUID Element">
<t>name: <spanx style="verb">TrackPlaneUID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\TrackPlane\TrackPlaneUID)</spanx>
</t>
<t>id: <spanx style="verb">0xE5</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: The trackUID number of the track representing the plane.
</t>
</section>
<section anchor="trackplanetype-element" title="TrackPlaneType Element">
<t>name: <spanx style="verb">TrackPlaneType</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\TrackPlane\TrackPlaneType)</spanx>
</t>
<t>id: <spanx style="verb">0xE6</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: The kind of plane this track corresponds to.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>left eye</c>
<c><spanx style="verb">1</spanx></c><c>right eye</c>
<c><spanx style="verb">2</spanx></c><c>background</c>
</texttable>
</section>
<section anchor="trackjoinblocks-element" title="TrackJoinBlocks Element">
<t>name: <spanx style="verb">TrackJoinBlocks</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)</spanx>
</t>
<t>id: <spanx style="verb">0xE9</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: Contains the list of all tracks whose Blocks need to be combined to create this virtual track
</t>
</section>
<section anchor="trackjoinuid-element" title="TrackJoinUID Element">
<t>name: <spanx style="verb">TrackJoinUID</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\TrackJoinUID)</spanx>
</t>
<t>id: <spanx style="verb">0xED</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: The trackUID number of a track whose blocks are used to create this virtual track.
</t>
</section>
<section anchor="tricktrackuid-element" title="TrickTrackUID Element">
<t>name: <spanx style="verb">TrickTrackUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)</spanx>
</t>
<t>id: <spanx style="verb">0xC0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="tricktracksegmentuid-element" title="TrickTrackSegmentUID Element">
<t>name: <spanx style="verb">TrickTrackSegmentUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)</spanx>
</t>
<t>id: <spanx style="verb">0xC1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="tricktrackflag-element" title="TrickTrackFlag Element">
<t>name: <spanx style="verb">TrickTrackFlag</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)</spanx>
</t>
<t>id: <spanx style="verb">0xC6</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="trickmastertrackuid-element" title="TrickMasterTrackUID Element">
<t>name: <spanx style="verb">TrickMasterTrackUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)</spanx>
</t>
<t>id: <spanx style="verb">0xC7</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="trickmastertracksegmentuid-element" title="TrickMasterTrackSegmentUID Element">
<t>name: <spanx style="verb">TrickMasterTrackSegmentUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)</spanx>
</t>
<t>id: <spanx style="verb">0xC4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX trick track extensions
</t>
</section>
<section anchor="contentencodings-element" title="ContentEncodings Element">
<t>name: <spanx style="verb">ContentEncodings</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings)</spanx>
</t>
<t>id: <spanx style="verb">0x6D80</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Settings for several content encoding mechanisms like compression or encryption.
</t>
</section>
<section anchor="contentencoding-element" title="ContentEncoding Element">
<t>name: <spanx style="verb">ContentEncoding</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)</spanx>
</t>
<t>id: <spanx style="verb">0x6240</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Settings for one content encoding like compression or encryption.
</t>
</section>
<section anchor="contentencodingorder-element" title="ContentEncodingOrder Element">
<t>name: <spanx style="verb">ContentEncodingOrder</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncodingOrder)</spanx>
</t>
<t>id: <spanx style="verb">0x5031</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="contentencodingscope-element" title="ContentEncodingScope Element">
<t>name: <spanx style="verb">ContentEncodingScope</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncodingScope)</spanx>
</t>
<t>id: <spanx style="verb">0x5032</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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)
</t>
</section>
<section anchor="contentencodingtype-element" title="ContentEncodingType Element">
<t>name: <spanx style="verb">ContentEncodingType</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncodingType)</spanx>
</t>
<t>id: <spanx style="verb">0x5033</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption
</t>
</section>
<section anchor="contentcompression-element" title="ContentCompression Element">
<t>name: <spanx style="verb">ContentCompression</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentCompression)</spanx>
</t>
<t>id: <spanx style="verb">0x5034</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Settings describing the compression used. This Element 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.
</t>
</section>
<section anchor="contentcompalgo-element" title="ContentCompAlgo Element">
<t>name: <spanx style="verb">ContentCompAlgo</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentCompression\ContentCompAlgo)</spanx>
</t>
<t>id: <spanx style="verb">0x4254</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header Stripping
</t>
</section>
<section anchor="contentcompsettings-element" title="ContentCompSettings Element">
<t>name: <spanx style="verb">ContentCompSettings</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentCompression\ContentCompSettings)</spanx>
</t>
<t>id: <spanx style="verb">0x4255</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="contentencryption-element" title="ContentEncryption Element">
<t>name: <spanx style="verb">ContentEncryption</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption)</spanx>
</t>
<t>id: <spanx style="verb">0x5035</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Settings describing the encryption used. This Element MUST be present if the value of ContentEncodingType is 1 and absent otherwise.
</t>
</section>
<section anchor="contentencalgo-element" title="ContentEncAlgo Element">
<t>name: <spanx style="verb">ContentEncAlgo</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentEncAlgo)</spanx>
</t>
<t>id: <spanx style="verb">0x47E1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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
</t>
</section>
<section anchor="contentenckeyid-element" title="ContentEncKeyID Element">
<t>name: <spanx style="verb">ContentEncKeyID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentEncKeyID)</spanx>
</t>
<t>id: <spanx style="verb">0x47E2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: For public key algorithms this is the ID of the public key the the data was encrypted with.
</t>
</section>
<section anchor="contentsignature-element" title="ContentSignature Element">
<t>name: <spanx style="verb">ContentSignature</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentSignature)</spanx>
</t>
<t>id: <spanx style="verb">0x47E3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A cryptographic signature of the contents.
</t>
</section>
<section anchor="contentsigkeyid-element" title="ContentSigKeyID Element">
<t>name: <spanx style="verb">ContentSigKeyID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentSigKeyID)</spanx>
</t>
<t>id: <spanx style="verb">0x47E4</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: This is the ID of the private key the data was signed with.
</t>
</section>
<section anchor="contentsigalgo-element" title="ContentSigAlgo Element">
<t>name: <spanx style="verb">ContentSigAlgo</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentSigAlgo)</spanx>
</t>
<t>id: <spanx style="verb">0x47E5</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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
</t>
</section>
<section anchor="contentsighashalgo-element" title="ContentSigHashAlgo Element">
<t>name: <spanx style="verb">ContentSigHashAlgo</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\ContentEncryption\ContentSigHashAlgo)</spanx>
</t>
<t>id: <spanx style="verb">0x47E6</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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
</t>
</section>
<section anchor="cues-element" title="Cues Element">
<t>name: <spanx style="verb">Cues</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues)</spanx>
</t>
<t>id: <spanx style="verb">0x1C53BB6B</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A Top-Level Element to speed seeking access. All entries are local to the Segment. This Element SHOULD be mandatory for non &quot;live&quot; streams.
</t>
</section>
<section anchor="cuepoint-element" title="CuePoint Element">
<t>name: <spanx style="verb">CuePoint</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Cues\CuePoint)</spanx>
</t>
<t>id: <spanx style="verb">0xBB</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains all information relative to a seek point in the Segment.
</t>
</section>
<section anchor="cuetime-element" title="CueTime Element">
<t>name: <spanx style="verb">CueTime</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cues\CuePoint\CueTime)</spanx>
</t>
<t>id: <spanx style="verb">0xB3</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Absolute timestamp according to the Segment time base.
</t>
</section>
<section anchor="cuetrackpositions-element" title="CueTrackPositions Element">
<t>name: <spanx style="verb">CueTrackPositions</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Cues\CuePoint\CueTrackPositions)</spanx>
</t>
<t>id: <spanx style="verb">0xB7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contain positions for different tracks corresponding to the timestamp.
</t>
</section>
<section anchor="cuetrack-element" title="CueTrack Element">
<t>name: <spanx style="verb">CueTrack</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)</spanx>
</t>
<t>id: <spanx style="verb">0xF7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The track for which a position is given.
</t>
</section>
<section anchor="cueclusterposition-element" title="CueClusterPosition Element">
<t>name: <spanx style="verb">CueClusterPosition</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)</spanx>
</t>
<t>id: <spanx style="verb">0xF1</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The Segment Position of the Cluster containing the associated Block.
</t>
</section>
<section anchor="cuerelativeposition-element" title="CueRelativePosition Element">
<t>name: <spanx style="verb">CueRelativePosition</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)</spanx>
</t>
<t>id: <spanx style="verb">0xF0</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: The relative position inside the Cluster of the referenced SimpleBlock or BlockGroup with 0 being the first possible position for an Element inside that Cluster.
</t>
</section>
<section anchor="cueduration-element" title="CueDuration Element">
<t>name: <spanx style="verb">CueDuration</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)</spanx>
</t>
<t>id: <spanx style="verb">0xB2</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="cueblocknumber-element" title="CueBlockNumber Element">
<t>name: <spanx style="verb">CueBlockNumber</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)</spanx>
</t>
<t>id: <spanx style="verb">0x5378</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Number of the Block in the specified Cluster.
</t>
</section>
<section anchor="cuecodecstate-element" title="CueCodecState Element">
<t>name: <spanx style="verb">CueCodecState</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)</spanx>
</t>
<t>id: <spanx style="verb">0xEA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: The Segment Position of the Codec State corresponding to this Cue Element. 0 means that the data is taken from the initial Track Entry.
</t>
</section>
<section anchor="cuereference-element" title="CueReference Element">
<t>name: <spanx style="verb">CueReference</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)</spanx>
</t>
<t>id: <spanx style="verb">0xDB</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: The Clusters containing the referenced Blocks.
</t>
</section>
<section anchor="cuereftime-element" title="CueRefTime Element">
<t>name: <spanx style="verb">CueRefTime</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefTime)</spanx>
</t>
<t>id: <spanx style="verb">0x96</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">2</spanx>
</t>
<t>documentation: Timestamp of the referenced Block.
</t>
</section>
<section anchor="cuerefcluster-element" title="CueRefCluster Element">
<t>name: <spanx style="verb">CueRefCluster</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCluster)</spanx>
</t>
<t>id: <spanx style="verb">0x97</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The Segment Position of the Cluster containing the referenced Block.
</t>
</section>
<section anchor="cuerefnumber-element" title="CueRefNumber Element">
<t>name: <spanx style="verb">CueRefNumber</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefNumber)</spanx>
</t>
<t>id: <spanx style="verb">0x535F</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: Number of the referenced Block of Track X in the specified Cluster.
</t>
</section>
<section anchor="cuerefcodecstate-element" title="CueRefCodecState Element">
<t>name: <spanx style="verb">CueRefCodecState</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCodecState)</spanx>
</t>
<t>id: <spanx style="verb">0xEB</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: The Segment Position of the Codec State corresponding to this referenced Element. 0 means that the data is taken from the initial Track Entry.
</t>
</section>
<section anchor="attachments-element" title="Attachments Element">
<t>name: <spanx style="verb">Attachments</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Attachments)</spanx>
</t>
<t>id: <spanx style="verb">0x1941A469</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contain attached files.
</t>
</section>
<section anchor="attachedfile-element" title="AttachedFile Element">
<t>name: <spanx style="verb">AttachedFile</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Attachments\AttachedFile)</spanx>
</t>
<t>id: <spanx style="verb">0x61A7</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: An attached file.
</t>
</section>
<section anchor="filedescription-element" title="FileDescription Element">
<t>name: <spanx style="verb">FileDescription</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Attachments\AttachedFile\FileDescription)</spanx>
</t>
<t>id: <spanx style="verb">0x467E</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A human-friendly name for the attached file.
</t>
</section>
<section anchor="filename-element" title="FileName Element">
<t>name: <spanx style="verb">FileName</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Attachments\AttachedFile\FileName)</spanx>
</t>
<t>id: <spanx style="verb">0x466E</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Filename of the attached file.
</t>
</section>
<section anchor="filemimetype-element" title="FileMimeType Element">
<t>name: <spanx style="verb">FileMimeType</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Attachments\AttachedFile\FileMimeType)</spanx>
</t>
<t>id: <spanx style="verb">0x4660</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: MIME type of the file.
</t>
</section>
<section anchor="filedata-element" title="FileData Element">
<t>name: <spanx style="verb">FileData</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Attachments\AttachedFile\FileData)</spanx>
</t>
<t>id: <spanx style="verb">0x465C</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The data of the file.
</t>
</section>
<section anchor="fileuid-element" title="FileUID Element">
<t>name: <spanx style="verb">FileUID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Attachments\AttachedFile\FileUID)</spanx>
</t>
<t>id: <spanx style="verb">0x46AE</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Unique ID representing the file, as random as possible.
</t>
</section>
<section anchor="filereferral-element" title="FileReferral Element">
<t>name: <spanx style="verb">FileReferral</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Attachments\AttachedFile\FileReferral)</spanx>
</t>
<t>id: <spanx style="verb">0x4675</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation: A binary value that a track/codec can refer to when the attachment is needed.
</t>
</section>
<section anchor="fileusedstarttime-element" title="FileUsedStartTime Element">
<t>name: <spanx style="verb">FileUsedStartTime</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)</spanx>
</t>
<t>id: <spanx style="verb">0x4661</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX font extension
</t>
</section>
<section anchor="fileusedendtime-element" title="FileUsedEndTime Element">
<t>name: <spanx style="verb">FileUsedEndTime</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)</spanx>
</t>
<t>id: <spanx style="verb">0x4662</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">0</spanx>
</t>
<t>maxver: <spanx style="verb">0</spanx>
</t>
<t>documentation:
DivX font extension
</t>
</section>
<section anchor="chapters-element" title="Chapters Element">
<t>name: <spanx style="verb">Chapters</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters)</spanx>
</t>
<t>id: <spanx style="verb">0x1043A770</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.
</t>
</section>
<section anchor="editionentry-element" title="EditionEntry Element">
<t>name: <spanx style="verb">EditionEntry</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Chapters\EditionEntry)</spanx>
</t>
<t>id: <spanx style="verb">0x45B9</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains all information about a Segment edition.
</t>
</section>
<section anchor="editionuid-element" title="EditionUID Element">
<t>name: <spanx style="verb">EditionUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\EditionUID)</spanx>
</t>
<t>id: <spanx style="verb">0x45BC</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A unique ID to identify the edition. It's useful for tagging an edition.
</t>
</section>
<section anchor="editionflaghidden-element" title="EditionFlagHidden Element">
<t>name: <spanx style="verb">EditionFlagHidden</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)</spanx>
</t>
<t>id: <spanx style="verb">0x45BD</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: If an edition is hidden (1), it SHOULD NOT be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)
</t>
</section>
<section anchor="editionflagdefault-element" title="EditionFlagDefault Element">
<t>name: <spanx style="verb">EditionFlagDefault</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)</spanx>
</t>
<t>id: <spanx style="verb">0x45DB</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: If a flag is set (1) the edition SHOULD be used as the default one. (1 bit)
</t>
</section>
<section anchor="editionflagordered-element" title="EditionFlagOrdered Element">
<t>name: <spanx style="verb">EditionFlagOrdered</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)</spanx>
</t>
<t>id: <spanx style="verb">0x45DD</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)
</t>
</section>
<section anchor="chapteratom-element" title="ChapterAtom Element">
<t>name: <spanx style="verb">ChapterAtom</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))</spanx>
</t>
<t>id: <spanx style="verb">0xB6</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>recursive: <spanx style="verb">1</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains the atom information to use as the chapter atom (apply to all tracks).
</t>
</section>
<section anchor="chapteruid-element" title="ChapterUID Element">
<t>name: <spanx style="verb">ChapterUID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)</spanx>
</t>
<t>id: <spanx style="verb">0x73C4</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A unique ID to identify the Chapter.
</t>
</section>
<section anchor="chapterstringuid-element" title="ChapterStringUID Element">
<t>name: <spanx style="verb">ChapterStringUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)</spanx>
</t>
<t>id: <spanx style="verb">0x5654</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">3</spanx>
</t>
<t>documentation: A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage.
</t>
</section>
<section anchor="chaptertimestart-element" title="ChapterTimeStart Element">
<t>name: <spanx style="verb">ChapterTimeStart</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)</spanx>
</t>
<t>id: <spanx style="verb">0x91</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Timestamp of the start of Chapter (not scaled).
</t>
</section>
<section anchor="chaptertimeend-element" title="ChapterTimeEnd Element">
<t>name: <spanx style="verb">ChapterTimeEnd</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)</spanx>
</t>
<t>id: <spanx style="verb">0x92</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Timestamp of the end of Chapter (timestamp excluded, not scaled).
</t>
</section>
<section anchor="chapterflaghidden-element" title="ChapterFlagHidden Element">
<t>name: <spanx style="verb">ChapterFlagHidden</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)</spanx>
</t>
<t>id: <spanx style="verb">0x98</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: If a chapter is hidden (1), it SHOULD NOT be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)
</t>
</section>
<section anchor="chapterflagenabled-element" title="ChapterFlagEnabled Element">
<t>name: <spanx style="verb">ChapterFlagEnabled</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)</spanx>
</t>
<t>id: <spanx style="verb">0x4598</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify whether 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 (see flag notes). (1 bit)
</t>
</section>
<section anchor="chaptersegmentuid-element" title="ChapterSegmentUID Element">
<t>name: <spanx style="verb">ChapterSegmentUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)</spanx>
</t>
<t>id: <spanx style="verb">0x6E67</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">&gt;0</spanx>
</t>
<t>size: <spanx style="verb">16</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The SegmentUID of another Segment to play during this chapter.
</t>
<t>usage notes: ChapterSegmentUID is mandatory if ChapterSegmentEditionUID is used.
</t>
</section>
<section anchor="chaptersegmenteditionuid-element" title="ChapterSegmentEditionUID Element">
<t>name: <spanx style="verb">ChapterSegmentEditionUID</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentEditionUID)</spanx>
</t>
<t>id: <spanx style="verb">0x6EBC</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The EditionUID to play from the Segment linked in ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no Edition of the linked Segment is used.
</t>
</section>
<section anchor="chapterphysicalequiv-element" title="ChapterPhysicalEquiv Element">
<t>name: <spanx style="verb">ChapterPhysicalEquiv</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysicalEquiv)</spanx>
</t>
<t>id: <spanx style="verb">0x63C3</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specify the physical equivalent of this ChapterAtom like &quot;DVD&quot; (60) or &quot;SIDE&quot; (50), see complete list of values.
</t>
</section>
<section anchor="chaptertrack-element" title="ChapterTrack Element">
<t>name: <spanx style="verb">ChapterTrack</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)</spanx>
</t>
<t>id: <spanx style="verb">0x8F</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: List of tracks on which the chapter applies. If this Element is not present, all tracks apply
</t>
</section>
<section anchor="chaptertracknumber-element" title="ChapterTrackNumber Element">
<t>name: <spanx style="verb">ChapterTrackNumber</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\ChapterTrackNumber)</spanx>
</t>
<t>id: <spanx style="verb">0x89</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">not 0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: UID of the Track to apply this chapter too. In the absence of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absence of this Element indicates that the Chapter SHOULD be applied to any currently used Tracks.
</t>
</section>
<section anchor="chapterdisplay-element" title="ChapterDisplay Element">
<t>name: <spanx style="verb">ChapterDisplay</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)</spanx>
</t>
<t>id: <spanx style="verb">0x80</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains all possible strings to use for the chapter display.
</t>
</section>
<section anchor="chapstring-element" title="ChapString Element">
<t>name: <spanx style="verb">ChapString</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ChapString)</spanx>
</t>
<t>id: <spanx style="verb">0x85</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains the string to use as the chapter atom.
</t>
</section>
<section anchor="chaplanguage-element" title="ChapLanguage Element">
<t>name: <spanx style="verb">ChapLanguage</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ChapLanguage)</spanx>
</t>
<t>id: <spanx style="verb">0x437C</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">eng</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The languages corresponding to the string, in the bibliographic ISO-639-2 form. This Element MUST be ignored if the ChapLanguageIETF Element is used within the same ChapterDisplay Element.
</t>
</section>
<section anchor="chaplanguageietf-element" title="ChapLanguageIETF Element">
<t>name: <spanx style="verb">ChapLanguageIETF</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ChapLanguageIETF)</spanx>
</t>
<t>id: <spanx style="verb">0x437D</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies the language used in the ChapString according to BCP 47 and using the IANA Language Subtag Registry. If this Element is used, then any ChapLanguage Elements used in the same ChapterDisplay MUST be ignored.
</t>
</section>
<section anchor="chapcountry-element" title="ChapCountry Element">
<t>name: <spanx style="verb">ChapCountry</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ChapCountry)</spanx>
</t>
<t>id: <spanx style="verb">0x437E</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The countries corresponding to the string, same 2 octets as in Internet domains. This Element MUST be ignored if the ChapLanguageIETF Element is used within the same ChapterDisplay Element.
</t>
</section>
<section anchor="chapprocess-element" title="ChapProcess Element">
<t>name: <spanx style="verb">ChapProcess</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)</spanx>
</t>
<t>id: <spanx style="verb">0x6944</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains all the commands associated to the Atom.
</t>
</section>
<section anchor="chapprocesscodecid-element" title="ChapProcessCodecID Element">
<t>name: <spanx style="verb">ChapProcessCodecID</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\ChapProcessCodecID)</spanx>
</t>
<t>id: <spanx style="verb">0x6955</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="chapprocessprivate-element" title="ChapProcessPrivate Element">
<t>name: <spanx style="verb">ChapProcessPrivate</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\ChapProcessPrivate)</spanx>
</t>
<t>id: <spanx style="verb">0x450D</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the &quot;DVD level&quot; equivalent.
</t>
</section>
<section anchor="chapprocesscommand-element" title="ChapProcessCommand Element">
<t>name: <spanx style="verb">ChapProcessCommand</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\ChapProcessCommand)</spanx>
</t>
<t>id: <spanx style="verb">0x6911</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains all the commands associated to the Atom.
</t>
</section>
<section anchor="chapprocesstime-element" title="ChapProcessTime Element">
<t>name: <spanx style="verb">ChapProcessTime</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\ChapProcessCommand\ChapProcessTime)</spanx>
</t>
<t>id: <spanx style="verb">0x6922</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Defines when the process command SHOULD be handled
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">0</spanx></c><c>during the whole chapter</c>
<c><spanx style="verb">1</spanx></c><c>before starting playback</c>
<c><spanx style="verb">2</spanx></c><c>after playback of the chapter</c>
</texttable>
</section>
<section anchor="chapprocessdata-element" title="ChapProcessData Element">
<t>name: <spanx style="verb">ChapProcessData</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\ChapProcessCommand\ChapProcessData)</spanx>
</t>
<t>id: <spanx style="verb">0x6933</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="tags-element" title="Tags Element">
<t>name: <spanx style="verb">Tags</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tags)</spanx>
</t>
<t>id: <spanx style="verb">0x1254C367</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Element containing metadata describing Tracks, Editions, Chapters, Attachments, or the Segment as a whole. A list of valid tags can be found here.
</t>
</section>
<section anchor="tag-element" title="Tag Element">
<t>name: <spanx style="verb">Tag</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tags\Tag)</spanx>
</t>
<t>id: <spanx style="verb">0x7373</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A single metadata descriptor.
</t>
</section>
<section anchor="targets-element" title="Targets Element">
<t>name: <spanx style="verb">Targets</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tags\Tag\Targets)</spanx>
</t>
<t>id: <spanx style="verb">0x63C0</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specifies which other elements the metadata represented by the Tag applies to. If empty or not present, then the Tag describes everything in the Segment.
</t>
</section>
<section anchor="targettypevalue-element" title="TargetTypeValue Element">
<t>name: <spanx style="verb">TargetTypeValue</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)</spanx>
</t>
<t>id: <spanx style="verb">0x68CA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">50</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A number to indicate the logical level of the target.
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<ttcol align="left">documentation</ttcol>
<c><spanx style="verb">70</spanx></c><c>COLLECTION</c><c>The highest hierarchical level that tags can describe.</c>
<c><spanx style="verb">60</spanx></c><c>EDITION / ISSUE / VOLUME / OPUS / SEASON / SEQUEL</c><c>A list of lower levels grouped together.</c>
<c><spanx style="verb">50</spanx></c><c>ALBUM / OPERA / CONCERT / MOVIE / EPISODE / CONCERT</c><c>The most common grouping level of music and video (equals to an episode for TV series).</c>
<c><spanx style="verb">40</spanx></c><c>PART / SESSION</c><c>When an album or episode has different logical parts.</c>
<c><spanx style="verb">30</spanx></c><c>TRACK / SONG / CHAPTER</c><c>The common parts of an album or movie.</c>
<c><spanx style="verb">20</spanx></c><c>SUBTRACK / PART / MOVEMENT / SCENE</c><c>Corresponds to parts of a track for audio (like a movement).</c>
<c><spanx style="verb">10</spanx></c><c>SHOT</c><c>The lowest hierarchy found in music or movies.</c>
</texttable>
</section>
<section anchor="targettype-element" title="TargetType Element">
<t>name: <spanx style="verb">TargetType</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tags\Tag\Targets\TargetType)</spanx>
</t>
<t>id: <spanx style="verb">0x63CA</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: An informational string that can be used to display the logical level of the target like &quot;ALBUM&quot;, &quot;TRACK&quot;, &quot;MOVIE&quot;, &quot;CHAPTER&quot;, etc (see TargetType).
</t>
<t>restrictions:
</t>
<texttable>
<ttcol align="left">value</ttcol>
<ttcol align="left">label</ttcol>
<c><spanx style="verb">COLLECTION</spanx></c><c>COLLECTION</c>
<c><spanx style="verb">EDITION</spanx></c><c>EDITION</c>
<c><spanx style="verb">ISSUE</spanx></c><c>ISSUE</c>
<c><spanx style="verb">VOLUME</spanx></c><c>VOLUME</c>
<c><spanx style="verb">OPUS</spanx></c><c>OPUS</c>
<c><spanx style="verb">SEASON</spanx></c><c>SEASON</c>
<c><spanx style="verb">SEQUEL</spanx></c><c>SEQUEL</c>
<c><spanx style="verb">ALBUM</spanx></c><c>ALBUM</c>
<c><spanx style="verb">OPERA</spanx></c><c>OPERA</c>
<c><spanx style="verb">CONCERT</spanx></c><c>CONCERT</c>
<c><spanx style="verb">MOVIE</spanx></c><c>MOVIE</c>
<c><spanx style="verb">EPISODE</spanx></c><c>EPISODE</c>
<c><spanx style="verb">PART</spanx></c><c>PART</c>
<c><spanx style="verb">SESSION</spanx></c><c>SESSION</c>
<c><spanx style="verb">TRACK</spanx></c><c>TRACK</c>
<c><spanx style="verb">SONG</spanx></c><c>SONG</c>
<c><spanx style="verb">CHAPTER</spanx></c><c>CHAPTER</c>
<c><spanx style="verb">SUBTRACK</spanx></c><c>SUBTRACK</c>
<c><spanx style="verb">PART</spanx></c><c>PART</c>
<c><spanx style="verb">MOVEMENT</spanx></c><c>MOVEMENT</c>
<c><spanx style="verb">SCENE</spanx></c><c>SCENE</c>
<c><spanx style="verb">SHOT</spanx></c><c>SHOT</c>
</texttable>
</section>
<section anchor="tagtrackuid-element" title="TagTrackUID Element">
<t>name: <spanx style="verb">TagTrackUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tags\Tag\Targets\TagTrackUID)</spanx>
</t>
<t>id: <spanx style="verb">0x63C5</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="tageditionuid-element" title="TagEditionUID Element">
<t>name: <spanx style="verb">TagEditionUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tags\Tag\Targets\TagEditionUID)</spanx>
</t>
<t>id: <spanx style="verb">0x63C9</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="tagchapteruid-element" title="TagChapterUID Element">
<t>name: <spanx style="verb">TagChapterUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tags\Tag\Targets\TagChapterUID)</spanx>
</t>
<t>id: <spanx style="verb">0x63C4</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="tagattachmentuid-element" title="TagAttachmentUID Element">
<t>name: <spanx style="verb">TagAttachmentUID</spanx>
</t>
<t>path: <spanx style="verb">0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)</spanx>
</t>
<t>id: <spanx style="verb">0x63C6</spanx>
</t>
<t>default: <spanx style="verb">0</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: 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.
</t>
</section>
<section anchor="simpletag-element" title="SimpleTag Element">
<t>name: <spanx style="verb">SimpleTag</spanx>
</t>
<t>path: <spanx style="verb">1*(\Segment\Tags\Tag(1*(\SimpleTag)))</spanx>
</t>
<t>id: <spanx style="verb">0x67C8</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">master</spanx>
</t>
<t>recursive: <spanx style="verb">1</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Contains general information about the target.
</t>
</section>
<section anchor="tagname-element" title="TagName Element">
<t>name: <spanx style="verb">TagName</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tags\Tag\SimpleTag\TagName)</spanx>
</t>
<t>id: <spanx style="verb">0x45A3</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The name of the Tag that is going to be stored.
</t>
</section>
<section anchor="taglanguage-element" title="TagLanguage Element">
<t>name: <spanx style="verb">TagLanguage</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)</spanx>
</t>
<t>id: <spanx style="verb">0x447A</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>default: <spanx style="verb">und</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: Specifies the language of the tag specified, in the Matroska languages form. This Element MUST be ignored if the TagLanguageIETF Element is used within the same SimpleTag Element.
</t>
</section>
<section anchor="taglanguageietf-element" title="TagLanguageIETF Element">
<t>name: <spanx style="verb">TagLanguageIETF</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tags\Tag\SimpleTag\TagLanguageIETF)</spanx>
</t>
<t>id: <spanx style="verb">0x447B</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">string</spanx>
</t>
<t>minver: <spanx style="verb">4</spanx>
</t>
<t>documentation: Specifies the language used in the TagString according to BCP 47 and using the IANA Language Subtag Registry. If this Element is used, then any TagLanguage Elements used in the same SimpleTag MUST be ignored.
</t>
</section>
<section anchor="tagdefault-element" title="TagDefault Element">
<t>name: <spanx style="verb">TagDefault</spanx>
</t>
<t>path: <spanx style="verb">1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)</spanx>
</t>
<t>id: <spanx style="verb">0x4484</spanx>
</t>
<t>minOccurs: <spanx style="verb">1</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>range: <spanx style="verb">0-1</spanx>
</t>
<t>default: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">uinteger</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: A boolean value to indicate if this is the default/original language to use for the given tag.
</t>
</section>
<section anchor="tagstring-element" title="TagString Element">
<t>name: <spanx style="verb">TagString</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tags\Tag\SimpleTag\TagString)</spanx>
</t>
<t>id: <spanx style="verb">0x4487</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">utf-8</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The value of the Tag.
</t>
</section>
<section anchor="tagbinary-element" title="TagBinary Element">
<t>name: <spanx style="verb">TagBinary</spanx>
</t>
<t>path: <spanx style="verb">0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)</spanx>
</t>
<t>id: <spanx style="verb">0x4485</spanx>
</t>
<t>maxOccurs: <spanx style="verb">1</spanx>
</t>
<t>type: <spanx style="verb">binary</spanx>
</t>
<t>minver: <spanx style="verb">1</spanx>
</t>
<t>documentation: The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.
</t>
</section>
</section>
</section>
<section anchor="matroska-element-ordering" title="Matroska Element Ordering">
<t>Except for the <spanx style="verb">EBML Header</spanx> and the <spanx style="verb">CRC-32 Element</spanx>, the EBML specification does not require any particular storage order for <spanx style="verb">Elements</spanx>. The Matroska specification however defines mandates and recommendations for ordering certain <spanx style="verb">Elements</spanx> in order to facilitate better playback, seeking, and editing efficiency. This section describes and offers rationale for ordering requirements and recommendations for Matroska.
</t>
<section anchor="toplevel-elements" title="Top-Level Elements">
<t>The <spanx style="verb">Info Element</spanx> is the only REQUIRED <spanx style="verb">Top-Level Element</spanx> in a Matroska file. To be playable, Matroska MUST also contain at least one <spanx style="verb">Tracks Element</spanx> and <spanx style="verb">Cluster Element</spanx>. The first <spanx style="verb">Info Element</spanx> and the first <spanx style="verb">Tracks Element</spanx> MUST either be stored before the first <spanx style="verb">Cluster Element</spanx> or both SHALL be referenced by a <spanx style="verb">SeekHead Element</spanx> occurring before the first <spanx style="verb">Cluster Element</spanx>.
</t>
<t>It is possible to edit a Matroska file after it has been created. For example, chapters, tags or attachments can be added. When new <spanx style="verb">Top-Level Elements</spanx> are added to a Matroska file, the <spanx style="verb">SeekHead</spanx> Element(s) MUST be updated so that the <spanx style="verb">SeekHead</spanx> Element(s) itemize the identity and position of all <spanx style="verb">Top-Level Elements</spanx>. Editing, removing, or adding <spanx style="verb">Elements</spanx> to a Matroska file often requires that some existing <spanx style="verb">Elements</spanx> be voided or extended; therefore, it is RECOMMENDED to use <spanx style="verb">Void Elements</spanx> as padding in between <spanx style="verb">Top-Level Elements</spanx>.
</t>
</section>
<section anchor="crc32" title="CRC-32">
<t>As noted by the EBML specification, if a <spanx style="verb">CRC-32 Element</spanx> is used then the <spanx style="verb">CRC-32 Element</spanx> MUST be the first ordered <spanx style="verb">Element</spanx> within its <spanx style="verb">Parent Element</spanx>. The Matroska specification recommends that <spanx style="verb">CRC-32 Elements</spanx> SHOULD NOT be used as an immediate <spanx style="verb">Child Element</spanx> of the <spanx style="verb">Segment Element</spanx>; however all <spanx style="verb">Top-Level Elements</spanx> of an <spanx style="verb">EBML Document</spanx> SHOULD include a <spanx style="verb">CRC-32 Element</spanx> as a <spanx style="verb">Child Element</spanx>.
</t>
</section>
<section anchor="seekhead" title="SeekHead">
<t>If used, the first <spanx style="verb">SeekHead Element</spanx> SHOULD be the first non-<spanx style="verb">CRC-32 Child Element</spanx> of the <spanx style="verb">Segment Element</spanx>. If a second <spanx style="verb">SeekHead Element</spanx> is used, then the first <spanx style="verb">SeekHead Element</spanx> MUST reference the identity and position of the second <spanx style="verb">SeekHead</spanx>. Additionally, the second <spanx style="verb">SeekHead Element</spanx> MUST only reference <spanx style="verb">Cluster</spanx> Elements and not any other <spanx style="verb">Top-Level Element</spanx> already contained within the first <spanx style="verb">SeekHead Element</spanx>. The second <spanx style="verb">SeekHead Element</spanx> MAY be stored in any order relative to the other <spanx style="verb">Top-Level Elements.</spanx> Whether one or two <spanx style="verb">SeekHead Element(s)</spanx> are used, the <spanx style="verb">SeekHead Element(s)</spanx> MUST collectively reference the identity and position of all <spanx style="verb">Top-Level Elements</spanx> except for the first <spanx style="verb">SeekHead Element</spanx>.
</t>
<t>It is RECOMMENDED that the first <spanx style="verb">SeekHead Element</spanx> be followed by a <spanx style="verb">Void Element</spanx> to allow for the <spanx style="verb">SeekHead Element</spanx> to be expanded to cover new <spanx style="verb">Top-Level Elements</spanx> that could be added to the Matroska file, such as <spanx style="verb">Tags</spanx>, <spanx style="verb">Chapters</spanx> and <spanx style="verb">Attachments Elements</spanx>.
</t>
</section>
<section anchor="cues-index" title="Cues (index)">
<t>The <spanx style="verb">Cues Element</spanx> is RECOMMENDED to optimize seeking access in Matroska. It is programmatically simpler to add the <spanx style="verb">Cues Element</spanx> after all <spanx style="verb">Cluster Elements</spanx> have been written because this does not require a prediction of how much space to reserve before writing the <spanx style="verb">Cluster Elements</spanx>. However, storing the <spanx style="verb">Cues Element</spanx> before the <spanx style="verb">Cluster Elements</spanx> can provide some seeking advantages. If the <spanx style="verb">Cues Element</spanx> is present, then it SHOULD either be stored before the first <spanx style="verb">Cluster Element</spanx> or be referenced by a <spanx style="verb">SeekHead Element</spanx>.
</t>
</section>
<section anchor="info" title="Info">
<t>The first <spanx style="verb">Info Element</spanx> SHOULD occur before the first <spanx style="verb">Tracks Element</spanx> and first <spanx style="verb">Cluster Element</spanx> except when referenced by a <spanx style="verb">SeekHead Element</spanx>.
</t>
</section>
<section anchor="chapters-element-1" title="Chapters Element">
<t>The <spanx style="verb">Chapters Element</spanx> SHOULD be placed before the <spanx style="verb">Cluster Element(s)</spanx>. The <spanx style="verb">Chapters Element</spanx> can be used during playback even if the user does not need to seek. It immediately gives the user information about what section is being read and what other sections are available. In the case of Ordered Chapters it RECOMMENDED to evaluate the logical linking even before playing. The <spanx style="verb">Chapters Element</spanx> SHOULD be placed before the first <spanx style="verb">Tracks Element</spanx> and after the first <spanx style="verb">Info Element</spanx>.
</t>
</section>
<section anchor="attachments" title="Attachments">
<t>The <spanx style="verb">Attachments Element</spanx> is not intended to be used by default when playing the file, but could contain information relevant to the content, such as cover art or fonts. Cover art is useful even before the file is played and fonts could be needed before playback starts for initialization of subtitles. The <spanx style="verb">Attachments Element</spanx> MAY be placed before the first <spanx style="verb">Cluster Element</spanx>; however if the <spanx style="verb">Attachments Element</spanx> is likely to be edited, then it SHOULD be placed after the last <spanx style="verb">Cluster Element</spanx>.
</t>
</section>
<section anchor="tags" title="Tags">
<t>The <spanx style="verb">Tags Element</spanx> is most subject to changes after the file was originally created. For easier editing, the <spanx style="verb">Tags Element</spanx> SHOULD be placed at the end of the <spanx style="verb">Segment Element</spanx>, even after the <spanx style="verb">Attachments Element</spanx>. On the other hand, it is inconvenient to have to seek in the <spanx style="verb">Segment</spanx> for tags, especially for network streams. So it's better if the <spanx style="verb">Tags Element</spanx> is found early in the stream. When editing the <spanx style="verb">Tags Element</spanx>, the original <spanx style="verb">Tags Element</spanx> at the beginning can be overwritten with a <spanx style="verb">Void Element</spanx> and a new <spanx style="verb">Tags Element</spanx> written at the end of the <spanx style="verb">Segment Element</spanx>. The file size will only marginally change.
</t>
</section>
<section anchor="optimum-layout-from-a-muxer" title="Optimum layout from a muxer">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Tags</t>
<t>Clusters</t>
<t>Cues</t>
</list>
</t>
</section>
<section anchor="optimum-layout-after-editing-tags" title="Optimum layout after editing tags">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Void</t>
<t>Clusters</t>
<t>Cues</t>
<t>Tags</t>
</list>
</t>
</section>
<section anchor="optimum-layout-with-cues-at-the-front" title="Optimum layout with Cues at the front">
<t>
<list style="symbols">
<t>SeekHead</t>
<t>Info</t>
<t>Tracks</t>
<t>Chapters</t>
<t>Attachments</t>
<t>Tags</t>
<t>Cues</t>
<t>Clusters</t>
</list>
</t>
</section>
<section anchor="cluster-timestamp" title="Cluster Timestamp">
<t>The <spanx style="verb">Timestamp Element</spanx> MUST occur as in storage order before any <spanx style="verb">SimpleBlock</spanx>, <spanx style="verb">BlockGroup</spanx>, or <spanx style="verb">EncryptedBlock</spanx> within the <spanx style="verb">Cluster Element</spanx>.
</t>
</section>
</section>
<section anchor="chapters" title="Chapters">
<section anchor="edition-and-chapter-flags" title="Edition and Chapter Flags">
<section anchor="chapter-flags" title="Chapter Flags">
<t>Two <spanx style="verb">Chapter Flags</spanx> are defined to describe the behavior of the <spanx style="verb">ChapterAtom Element</spanx>: <spanx style="verb">ChapterFlagHidden</spanx> and <spanx style="verb">ChapterFlagEnabled</spanx>.
</t>
<t>If a <spanx style="verb">ChapterAtom Element</spanx> is the <spanx style="verb">Child Element</spanx> of another <spanx style="verb">ChapterAtom Element</spanx> with a <spanx style="verb">Chapter Flag</spanx> set to <spanx style="verb">true</spanx>, then the <spanx style="verb">Child ChapterAtom Element</spanx> MUST be interpreted as having its same <spanx style="verb">Chapter Flag</spanx> set to <spanx style="verb">true</spanx>. If a <spanx style="verb">ChapterAtom Element</spanx> is the <spanx style="verb">Child Element</spanx> of another <spanx style="verb">ChapterAtom Element</spanx> with a <spanx style="verb">Chapter Flag</spanx> set to <spanx style="verb">false</spanx> or if the <spanx style="verb">ChapterAtom Element</spanx> does not have a <spanx style="verb">ChapterAtom Element</spanx> as its <spanx style="verb">Parent Element</spanx>, then it MUST be interpreted according to its own <spanx style="verb">Chapter Flag</spanx>.
</t>
<t>As an example, consider a <spanx style="verb">Parent ChapterAtom Element</spanx> that has its <spanx style="verb">ChapterFlagHidden</spanx> set to <spanx style="verb">true</spanx> and also contains two child <spanx style="verb">ChapterAtoms</spanx>, the first with <spanx style="verb">ChapterFlagHidden</spanx> set to <spanx style="verb">true</spanx> and the second with <spanx style="verb">ChapterFlagHidden</spanx> either set to <spanx style="verb">false</spanx> or not present at all (in which case the default value of the Element applies, which is <spanx style="verb">false</spanx>). Since the parent <spanx style="verb">ChapterAtom</spanx> has its <spanx style="verb">ChapterFlagHidden</spanx> set to <spanx style="verb">true</spanx> then all of its children <spanx style="verb">ChapterAtoms</spanx> MUST also be interpreted as if their <spanx style="verb">ChapterFlagHidden</spanx> is also set to <spanx style="verb">true</spanx>. However, if a <spanx style="verb">Control Track</spanx> toggles the parent's <spanx style="verb">ChapterFlagHidden</spanx> flag to <spanx style="verb">false</spanx>, then only the parent <spanx style="verb">ChapterAtom</spanx> and its second child <spanx style="verb">ChapterAtom</spanx> MUST be interpreted as if <spanx style="verb">ChapterFlagHidden</spanx> is set to <spanx style="verb">false</spanx>. The first child <spanx style="verb">ChapterAtom</spanx> which has the <spanx style="verb">ChapterFlagHidden</spanx> flag set to <spanx style="verb">true</spanx> retains its value until its value is toggled to <spanx style="verb">false</spanx> by a <spanx style="verb">Control Track</spanx>.
</t>
</section>
<section anchor="edition-flags" title="Edition Flags">
<t>Three <spanx style="verb">Edition Flags</spanx> are defined to describe the behavior of the <spanx style="verb">EditionEntry Element</spanx>: <spanx style="verb">EditionFlagHidden</spanx>, <spanx style="verb">EditionFlagDefault</spanx> and <spanx style="verb">EditionFlagOrdered</spanx>.
</t>
<section anchor="editionflaghidden" title="EditionFlagHidden">
<t>The <spanx style="verb">EditionFlagHidden Flag</spanx> behaves similarly to the <spanx style="verb">ChapterFlagHidden Flag</spanx>: if <spanx style="verb">EditionFlagHidden</spanx> is set to <spanx style="verb">true</spanx>, its <spanx style="verb">Child ChapterAtoms Elements</spanx> MUST also be interpreted as if their <spanx style="verb">ChapterFlagHidden</spanx> is also set to <spanx style="verb">true</spanx>, regardless of their own <spanx style="verb">ChapterFlagHidden Flags</spanx>. If <spanx style="verb">EditionFlagHidden</spanx> is toggled by a <spanx style="verb">Control Track</spanx> to <spanx style="verb">false</spanx>, the <spanx style="verb">ChapterFlagHidden Flags</spanx> of the <spanx style="verb">Child ChapterAtoms Elements</spanx> SHALL determine whether the <spanx style="verb">ChapterAtom</spanx> is hidden or not.
</t>
</section>
<section anchor="editionflagdefault" title="EditionFlagDefault">
<t>It is RECOMMENDED that no more than one <spanx style="verb">Edition</spanx> have an <spanx style="verb">EditionFlagDefault Flag</spanx> set to <spanx style="verb">true</spanx>. The first <spanx style="verb">Edition</spanx> with both the <spanx style="verb">EditionFlagDefault Flag</spanx> set to <spanx style="verb">true</spanx> and the <spanx style="verb">EditionFlagHidden Flag</spanx> set to <spanx style="verb">false</spanx> is the <spanx style="verb">Default Edition</spanx>. When all <spanx style="verb">EditionFlagDefault Flags</spanx> are set to <spanx style="verb">false</spanx>, then the first <spanx style="verb">Edition</spanx> is the <spanx style="verb">Default Edition</spanx>.
</t>
</section>
<section anchor="editionflagordered" title="EditionFlagOrdered">
<t>The <spanx style="verb">EditionFlagOrdered Flag</spanx> is a significant feature as it enables an <spanx style="verb">Edition</spanx> of <spanx style="verb">Ordered Chapters</spanx> which defines and arranges a virtual timeline rather than simply labeling points within the timeline. For example, with <spanx style="verb">Editions</spanx> of <spanx style="verb">Ordered Chapters</spanx> a single <spanx style="verb">Matroska file</spanx> can present multiple edits of a film without duplicating content. Alternatively if a videotape is digitized in full, one <spanx style="verb">Ordered Edition</spanx> could present the full content (including colorbars, countdown, slate, a feature presentation, and black frames), while another <spanx style="verb">Edition</spanx> of <spanx style="verb">Ordered Chapters</spanx> can use <spanx style="verb">Chapters</spanx> that only mark the intended presentation with the colorbars and other ancillary visual information excluded. If an <spanx style="verb">Edition</spanx> of <spanx style="verb">Ordered Chapters</spanx> is enabled then the <spanx style="verb">Matroska Player</spanx> MUST play those Chapters in their stored order from the timestamp marked in the <spanx style="verb">ChapterTimeStart Element</spanx> to the timestamp marked in to <spanx style="verb">ChapterTimeEnd Element</spanx>.
</t>
<t>If the <spanx style="verb">EditionFlagOrdered Flag</spanx> is set to <spanx style="verb">false</spanx>, <spanx style="verb">Simple Chapters</spanx> are used and only the <spanx style="verb">ChapterTimeStart</spanx> of a <spanx style="verb">Chapter</spanx> is used as chapter mark to jump to the predefined point in the timeline. With <spanx style="verb">Simple Chapters</spanx>, a <spanx style="verb">Matroska Player</spanx> MUST ignore certain <spanx style="verb">Chapter Elements</spanx>. All these elements are now informational only.
</t>
<t>The following list shows the different usage of <spanx style="verb">Chapter Elements</spanx> between an ordered and non-ordered <spanx style="verb">Edition</spanx>.
</t>
<t>Chapter elements / ordered Edition | False | True
ChapterUID | X | X
ChapterStringUID | X | X
ChapterTimeStart | X | X
ChapterTimeEnd | - | X
ChapterFlagHidden | X | X
ChapterFlagEnabled | X | X
ChapterSegmentUID | - | X
ChapterSegmentEditionUID | - | X
ChapterPhysicalEquiv | X | X
ChapterTrack | - | X
ChapterDisplay | X | X
ChapProcess | - | X
</t>
<t>Furthermore there are other EBML <spanx style="verb">Elements</spanx> which could be used if the <spanx style="verb">EditionFlagOrdered Flag</spanx> is set to <spanx style="verb">true</spanx>.
</t>
<t>Other elements / ordered Edition | False | True
Info/SegmentFamily | - | X
Info/ChapterTranslate | - | X
Track/TrackTranslate | - | X
</t>
<t>These other <spanx style="verb">Elements</spanx> belong to the Matroska DVD menu system and are only used when the <spanx style="verb">ChapProcessCodecID Element</spanx> is set to 1.
</t>
<section anchor="orderededition-and-matroska-segmentlinking" title="Ordered-Edition and Matroska Segment-Linking">
<t>
<list style="symbols">
<t>Hard Linking: <spanx style="verb">Ordered-Chapters</spanx> supersedes the <spanx style="verb">Hard Linking</spanx>.</t>
<t>Soft Linking: In this complex system <spanx style="verb">Ordered Chapters</spanx> are REQUIRED and a <spanx style="verb">Chapter CODEC</spanx> MUST interpret the <spanx style="verb">ChapProcess</spanx> of all chapters.</t>
<t>Medium Linking: <spanx style="verb">Ordered Chapters</spanx> are used in a normal way and can be combined with the <spanx style="verb">ChapterSegmentUID</spanx> element which establishes a link to another Matroska file/Segment.</t>
</list>
</t>
<t>See <xref target="linked-segments"/>) for more information about <spanx style="verb">Hard Linking</spanx>, <spanx style="verb">Soft Linking</spanx> and <spanx style="verb">Medium Linking</spanx>.
</t>
</section>
</section>
</section>
</section>
<section anchor="menu-features" title="Menu features">
<t>The menu features are handled like a <spanx style="emph">chapter codec</spanx>. That means each codec has a type, some private data and some data in the chapters.
</t>
<t>The type of the menu system is defined by the <spanx style="verb">ChapProcessCodecID</spanx> parameter. For now only 2 values are supported : 0 matroska script, 1 menu borrowed from the DVD. The private data depend on the type of menu system (stored in ChapProcessPrivate), idem for the data in the chapters (stored in ChapProcessData).
</t>
<section anchor="matroska-script-0" title="Matroska Script (0)">
<t>This is the case when <spanx style="verb">ChapProcessCodecID</spanx> = 0. This is a script language build for Matroska purposes. The inspiration comes from ActionScript, javascript and other similar scripting languages. The commands are stored as text commands, in UTF-8. The syntax is C like, with commands spanned on many lines, each terminating with a &quot;;&quot;. You can also include comments at the end of lines with &quot;//&quot; or comment many lines using &quot;/* */&quot;. The scripts are stored in ChapProcessData. For the moment ChapProcessPrivate is not used.
</t>
<t>The one and only command existing for the moment is <spanx style="verb">GotoAndPlay( ChapterUID );</spanx>. As the same suggests, it means that when this command is encountered, the <spanx style="verb">Matroska Player</spanx> SHOULD jump to the <spanx style="verb">Chapter</spanx> specified by the UID and play it.
</t>
</section>
<section anchor="dvd-menu-1" title="DVD menu (1)">
<t>This is the case when <spanx style="verb">ChapProcessCodecID</spanx> = 1. Each level of a chapter corresponds to a logical level in the DVD system that is stored in the first octet of the ChapProcessPrivate. This DVD hierarchy is as follows:
</t>
<t>ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible | Comment
0x30 | SS | DVD domain | - | First Play, Video Manager, Video Title
0x2A | LU | Language Unit | - | Contains only PGCs
0x28 | TT | Title | - | Contains only PGCs
0x20 | PGC | Program Group Chain (PGC) | * |
0x18 | PG | Program 1 / Program 2 / Program 3 | - |
0x10 | PTT | Part Of Title 1 / Part Of Title 2 | - | Equivalent to the chapters on the sleeve.
0x08 | CN | Cell 1 / Cell 2 / Cell 3 / Cell 4 / Cell 5 / Cell 6 | - |
</t>
<t>You can also recover wether a Segment is a Video Manager (VMG), Video Title Set (VTS) or Video Title Set Menu (VTSM) from the ChapterTranslateID element found in the Segment Info. This field uses 2 octets as follows:
</t>
<t>
<list style="numbers">
<t>Domain Type: 0 for VMG, the domain number for VTS and VTSM</t>
<t>Domain Value: 0 for VMG and VTSM, 1 for the VTS source.</t>
</list>
</t>
<t>For instance, the menu part from VTS_01_0.VOB would be coded [1,0] and the content part from VTS_02_3.VOB would be [2,1]. The VMG is always [0,0]
</t>
<t>The following octets of ChapProcessPrivate are as follows:
</t>
<t>Octet 1 | DVD Name | Following Octets
0x30 | SS | Domain name code (1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) number (2)
0x2A | LU | Language code (2) + Language extension (1)
0x28 | TT | global Title number (2) + corresponding TTN of the VTS (1)
0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User Operations (4)
0x18 | PG | Program number (2)
0x10 | PTT | PTT-chapter number (1)
0x08 | CN | Cell number [VOB ID(2)][Cell ID(1)][Angle Num(1)]
</t>
<t>If the level specified in ChapProcessPrivate is a PGC (0x20), there is an octet called the Playback Type, specifying the kind of PGC defined:
</t>
<t>
<list style="symbols">
<t>0x00: entry only/basic PGC</t>
<t>0x82: Title+Entry Menu (only found in the Video Manager domain)</t>
<t>0x83: Root Menu (only found in the VTSM domain)</t>
<t>0x84: Subpicture Menu (only found in the VTSM domain)</t>
<t>0x85: Audio Menu (only found in the VTSM domain)</t>
<t>0x86: Angle Menu (only found in the VTSM domain)</t>
<t>0x87: Chapter Menu (only found in the VTSM domain)</t>
</list>
</t>
<t>The next 4 following octets correspond to the <eref target="http://dvd.sourceforge.net/dvdinfo/uops.html">User Operation flags</eref> in the standard PGC. When a bit is set, the command SHOULD be disabled.
</t>
<t>ChapProcessData contains the pre/post/cell commands in binary format as there are stored on a DVD. There is just an octet preceding these data to specify the number of commands in the element. As follows: [# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)].
</t>
<t>More information on the DVD commands and format on <eref target="http://www.dvd-replica.com/DVD/">DVD-replica</eref>, where we got most of the info about it. You can also get information on DVD from <eref target="http://dvd.sourceforge.net/dvdinfo/">the DVDinfo project</eref>.
</t>
</section>
</section>
<section anchor="example-1--basic-chaptering" title="Example 1 : basic chaptering">
<t>In this example a movie is split in different chapters. It could also just be an audio file (album) on which each track corresponds to a chapter.
</t>
<t>
<list style="symbols">
<t>00000ms - 05000ms : Intro</t>
<t>05000ms - 25000ms : Before the crime</t>
<t>25000ms - 27500ms : The crime</t>
<t>27500ms - 38000ms : The killer arrested</t>
<t>38000ms - 43000ms : Credits</t>
</list>
</t>
<t>This would translate in the following matroska form :
</t>
<figure align="center"><artwork align="center" type="xml">
&lt;Chapters&gt;
&lt;EditionEntry&gt;
&lt;EditionUID&gt;16603393396715046047&lt;/EditionUID&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;1193046&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;0&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;5000000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Intro&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;2311527&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;5000000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;25000000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Before the crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Avant le crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;fra&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;3430008&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;25000000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;27500000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;The crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Le crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;fra&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;4548489&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;27500000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;38000000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;After the crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Après le crime&lt;/ChapString&gt;
&lt;ChapLanguage&gt;fra&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;5666960&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;38000000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;43000000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Credits&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Générique&lt;/ChapString&gt;
&lt;ChapLanguage&gt;fra&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;EditionFlagDefault&gt;0&lt;/EditionFlagDefault&gt;
&lt;EditionFlagHidden&gt;0&lt;/EditionFlagHidden&gt;
&lt;/EditionEntry&gt;
&lt;/Chapters&gt;
</artwork></figure>
</section>
<section anchor="example-2--nested-chapters" title="Example 2 : nested chapters">
<t>In this example an (existing) album is split into different chapters, and one of them contain another splitting.
</t>
<section anchor="the-micronauts-bleep-to-bleep" title="The Micronauts &quot;Bleep To Bleep&quot;">
<t>
<list style="symbols">
<t>00:00 - 12:28 : Baby Wants To Bleep/Rock
<list style="symbols">
<t>00:00 - 04:38 : Baby wants to bleep (pt.1)</t>
<t>04:38 - 07:12 : Baby wants to rock</t>
<t>07:12 - 10:33 : Baby wants to bleep (pt.2)</t>
<t>10:33 - 12:28 : Baby wants to bleep (pt.3)</t>
</list></t>
<t>12:30 - 19:38 : Bleeper_O+2</t>
<t>19:40 - 22:20 : Baby wants to bleep (pt.4)</t>
<t>22:22 - 25:18 : Bleep to bleep</t>
<t>25:20 - 33:35 : Baby wants to bleep (k)</t>
<t>33:37 - 44:28 : Bleeper</t>
</list>
</t>
<figure align="center"><artwork align="center" type="xml">
&lt;Chapters&gt;
&lt;EditionEntry&gt;
&lt;EditionUID&gt;1281690858003401414&lt;/EditionUID&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;1&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;0&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;748000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to Bleep/Rock&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;2&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;0&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;278000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to bleep (pt.1)&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;3&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;278000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;432000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to rock&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;4&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;432000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;633000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to bleep (pt.2)&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;5&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;633000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;748000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to bleep (pt.3)&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;6&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;750000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;1178500000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Bleeper_O+2&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;7&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;1180500000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;1340000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to bleep (pt.4)&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;8&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;1342000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;1518000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Bleep to bleep&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;9&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;1520000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;2015000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Baby wants to bleep (k)&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;ChapterAtom&gt;
&lt;ChapterUID&gt;10&lt;/ChapterUID&gt;
&lt;ChapterTimeStart&gt;2017000000&lt;/ChapterTimeStart&gt;
&lt;ChapterTimeEnd&gt;2668000000&lt;/ChapterTimeEnd&gt;
&lt;ChapterDisplay&gt;
&lt;ChapString&gt;Bleeper&lt;/ChapString&gt;
&lt;ChapLanguage&gt;eng&lt;/ChapLanguage&gt;
&lt;/ChapterDisplay&gt;
&lt;ChapterFlagHidden&gt;0&lt;/ChapterFlagHidden&gt;
&lt;ChapterFlagEnabled&gt;1&lt;/ChapterFlagEnabled&gt;
&lt;/ChapterAtom&gt;
&lt;EditionFlagDefault&gt;0&lt;/EditionFlagDefault&gt;
&lt;EditionFlagHidden&gt;0&lt;/EditionFlagHidden&gt;
&lt;/EditionEntry&gt;
&lt;/Chapters&gt;
</artwork></figure>
</section>
</section>
</section>
<section anchor="attachments-1" title="Attachments">
<t>Matroska supports storage of related files and data in the <spanx style="verb">Attachments Element</spanx> (a <spanx style="verb">Top-Level Element</spanx>). <spanx style="verb">Attachment Elements</spanx> can be used to store related cover art, font files, transcripts, reports, error recovery files, picture or text-based annotations, copies of specifications, or other ancillary files related to the <spanx style="verb">Segment</spanx>.
</t>
<t><spanx style="verb">Matroska Readers</spanx> MUST NOT execute files stored as <spanx style="verb">Attachment Elements</spanx>.
</t>
<section anchor="cover-art" title="Cover Art">
<t>This section defines a set of guidelines for the storage of cover art in Matroska files. A <spanx style="verb">Matroska Reader</spanx> MAY use embedded cover art to display a representational still-image depiction of the multimedia contents of the Matroska file.
</t>
<t>Only JPEG and PNG image formats SHOULD be used for cover art pictures.
</t>
<t>There can be two different covers for a movie/album: a portrait style (e.g., a DVD case) and a landscape style (e.g., a wide banner ad).
</t>
<t>There can be two versions of the same cover, the <spanx style="verb">normal cover</spanx> and the <spanx style="verb">small cover</spanx>. The dimension of the <spanx style="verb">normal cover</spanx> SHOULD be 600 pixels on the smallest side (for example, 960x600 for landscape, 600x800 for portrait, or 600x600 for square). The dimension of the <spanx style="verb">small cover</spanx> SHOULD be 120 pixels on the smallest side (for example, 192x120 or 120x160).
</t>
<t>Versions of cover art can be differentiated by the filename, which is stored in the <spanx style="verb">FileName Element</spanx>. The default filename of the <spanx style="verb">normal cover</spanx> in square or portrait mode is <spanx style="verb">cover.(jpg|png)</spanx>. When stored, the <spanx style="verb">normal cover</spanx> SHOULD be the first Attachment in storage order. The <spanx style="verb">small cover</spanx> SHOULD be prefixed with &quot;small_&quot;, such as <spanx style="verb">small_cover.(jpg|png)</spanx>. The landscape variant SHOULD be suffixed with &quot;_land&quot;, such as <spanx style="verb">cover_land.(jpg|png)</spanx>. The filenames are case sensitive.
</t>
<t>The following table provides examples of file names for cover art in Attachments.
</t>
<t>FileName | Image Orientation | Pixel Length of Smallest Side
cover.jpg | Portrait or square | 600
small_cover.png | Portrait or square | 120
cover_land.png | Landscape | 600
small_cover_land.jpg | Landscape | 120
</t>
</section>
</section>
<section anchor="cues" title="Cues">
<t>The <spanx style="verb">Cues Element</spanx> provides an index of certain <spanx style="verb">Cluster Elements</spanx> to allow for optimized seeking to absolute timestamps within the <spanx style="verb">Segment</spanx>. The <spanx style="verb">Cues Element</spanx> contains one or many <spanx style="verb">CuePoint Elements</spanx> which each MUST reference an absolute timestamp (via the <spanx style="verb">CueTime Element</spanx>), a <spanx style="verb">Track</spanx> (via the <spanx style="verb">CueTrack Element</spanx>), and a <spanx style="verb">Segment Position</spanx> (via the <spanx style="verb">CueClusterPosition Element</spanx>). Additional non-mandated Elements are part of the <spanx style="verb">CuePoint Element</spanx> such as <spanx style="verb">CueDuration</spanx>, <spanx style="verb">CueRelativePosition</spanx>, <spanx style="verb">CueCodecState</spanx> and others which provide any <spanx style="verb">Matroska Reader</spanx> with additional information to use in the optimization of seeking performance.
</t>
<section anchor="recommendations" title="Recommendations">
<t>The following recommendations are provided to optimize Matroska performance.
</t>
<t>
<list style="symbols">
<t>Unless Matroska is used as a live stream, it SHOULD contain a <spanx style="verb">Cues Element</spanx>.</t>
<t>For each video track, each keyframe SHOULD be referenced by a <spanx style="verb">CuePoint Element</spanx>.</t>
<t>It is RECOMMENDED to not reference non-keyframes of video tracks in <spanx style="verb">Cues</spanx> unless it references a <spanx style="verb">Cluster Element</spanx> which contains a <spanx style="verb">CodecState Element</spanx> but no keyframes.</t>
<t>For each subtitle track present, each subtitle frame SHOULD be referenced by a <spanx style="verb">CuePoint Element</spanx> with a <spanx style="verb">CueDuration Element</spanx>.</t>
<t>References to audio tracks MAY be skipped in <spanx style="verb">CuePoint Elements</spanx> if a video track is present. When included the <spanx style="verb">CuePoint Elements</spanx> SHOULD reference audio keyframes at most once every 500 milliseconds.</t>
<t>If the referenced frame is not stored within the first <spanx style="verb">SimpleBlock</spanx> or first <spanx style="verb">BlockGroup</spanx> within its <spanx style="verb">Cluster Element</spanx>, then the <spanx style="verb">CueRelativePosition Element</spanx> SHOULD be written to reference where in the <spanx style="verb">Cluster</spanx> the reference frame is stored.</t>
<t>If a <spanx style="verb">CuePoint Element</spanx> references <spanx style="verb">Cluster Element</spanx> that includes a <spanx style="verb">CodecState Element</spanx>, then that <spanx style="verb">CuePoint Element</spanx> MUST use a <spanx style="verb">CueCodecState Element</spanx>.</t>
<t><spanx style="verb">CuePoint Elements</spanx> SHOULD be numerically sorted in storage order by the value of the <spanx style="verb">CueTime Element</spanx>.</t>
</list>
</t>
</section>
</section>
<section anchor="matroska-streaming" title="Matroska Streaming">
<t>In Matroska, there are two kinds of streaming: file access and livestreaming.
</t>
<section anchor="file-access" title="File Access">
<t>File access can simply be reading a file located on your computer, but also includes accessing a file from an HTTP (web) server or CIFS (Windows share) server. These protocols are usually safe from reading errors and seeking in the stream is possible. However, when a file is stored far away or on a slow server, seeking can be an expensive operation and SHOULD be avoided. The following guidelines, when followed, help reduce the number of seeking operations for regular playback and also have the playback start quickly without a lot of data needed to read first (like a <spanx style="verb">Cues Element</spanx>, <spanx style="verb">Attachment Element</spanx> or <spanx style="verb">SeekHead Element</spanx>).
</t>
<t>Matroska, having a small overhead, is well suited for storing music/videos on file servers without a big impact on the bandwidth used. Matroska does not require the index to be loaded before playing, which allows playback to start very quickly. The index can be loaded only when seeking is requested the first time.
</t>
</section>
<section anchor="livestreaming" title="Livestreaming">
<t>Livestreaming is the equivalent of television broadcasting on the internet. There are 2 families of servers for livestreaming: RTP/RTSP and HTTP. Matroska is not meant to be used over RTP. RTP already has timing and channel mechanisms that would be wasted if doubled in Matroska. Additionally, having the same information at the RTP and Matroska level would be a source of confusion if they do not match. Livestreaming of Matroska over HTTP (or any other plain protocol based on TCP) is possible.
</t>
<t>A live Matroska stream is different from a file because it usually has no known end (only ending when the client disconnects). For this, all bits of the &quot;size&quot; portion of the <spanx style="verb">Segment Element</spanx> MUST be set to 1. Another option is to concatenate <spanx style="verb">Segment Elements</spanx> with known sizes, one after the other. This solution allows a change of codec/resolution between each segment. For example, this allows for a switch between 4:3 and 16:9 in a television program.
</t>
<t>When <spanx style="verb">Segment Elements</spanx> are continuous, certain <spanx style="verb">Elements</spanx>, like <spanx style="verb">MetaSeek</spanx>, <spanx style="verb">Cues</spanx>, <spanx style="verb">Chapters</spanx>, and <spanx style="verb">Attachments</spanx>, MUST NOT be used.
</t>
<t>It is possible for a <spanx style="verb">Matroska Player</spanx> to detect that a stream is not seekable. If the stream has neither a <spanx style="verb">MetaSeek</spanx> list or a <spanx style="verb">Cues</spanx> list at the beginning of the stream, it SHOULD be considered non-seekable. Even though it is possible to seek blindly forward in the stream, it is NOT RECOMMENDED.
</t>
<t>In the context of live radio or web TV, it is possible to &quot;tag&quot; the content while it is playing. The <spanx style="verb">Tags Element</spanx> can be placed between <spanx style="verb">Clusters</spanx> each time it is necessary. In that case, the new <spanx style="verb">Tags Element</spanx> MUST reset the previously encountered <spanx style="verb">Tags Elements</spanx> and use the new values instead.
</t>
</section>
</section>
<section anchor="menu-specifications" title="Menu Specifications">
<t>This document is a <spanx style="emph">draft of the Menu system</spanx> that will be the default one in <spanx style="verb">Matroska</spanx>. As it will just be composed of a Control Track, it will be seen as a &quot;codec&quot; and could be replaced later by something else if needed.
</t>
<t>A menu is like what you see on DVDs, when you have some screens to select the audio format, subtitles or scene selection.
</t>
<section anchor="requirements" title="Requirements">
<t>What we'll try to have is a system that can do almost everything done on a DVD, or more, or better, or drop the unused features if necessary.
</t>
<t>As the name suggests, a Control Track is a track that can control the playback of the file and/or all the playback features. To make it as simple as possible for <spanx style="verb">Matroska Players</spanx>, the Control Track will just give orders to the <spanx style="verb">Matroska Player</spanx> and get the actions associated with the highlights/hotspots.
</t>
<section anchor="highlightshotspots" title="Highlights/Hotspots">
<t>A highlight is basically a rectangle/key associated with an action UID. When that rectangle/key is activated, the <spanx style="verb">Matroska Player</spanx> send the UID of the action to the Control Track handler (codec). The fact that it can also be a key means that even for audio only files, a keyboard shortcut or button panel could be used for menus. But in that case, the hotspot will have to be associated with a name to display.
</t>
<t>This highlight is sent from the Control Track to the <spanx style="verb">Matroska Player</spanx>. Then the <spanx style="verb">Matroska Player</spanx> has to handle that highlight until it's deactivated (see <xref target="playback-features"/>).
</t>
<t>The highlight contains a UID of the action, a displayable name (UTF-8), an associated key (list of keys to be defined, probably up/down/left/right/select), a screen position/range and an image to display. The image will be displayed either when the user place the mouse over the rectangle (or any other shape), or when an option of the screen is selected (not activated). There could be a second image used when the option is activated. And there could be a third image that can serve as background. This way you could have a still image (like in some DVDs) for the menu and behind that image blank video (small bitrate).
</t>
<t>When a highlight is activated by the user, the <spanx style="verb">Matroska Player</spanx> has to send the UID of the action to the Control Track. Then the Control Track codec will handle the action and possibly give new orders to the <spanx style="verb">Matroska Player</spanx>.
</t>
<t>The format used for storing images SHOULD be extensible. For the moment we'll use PNG and BMP, both with alpha channel.
</t>
</section>
<section anchor="playback-features" title="Playback features">
<t>All the following features will be sent from the Control Track to the <spanx style="verb">Matroska Player</spanx> :
</t>
<t>
<list style="symbols">
<t>Jump to chapter (UID, prev, next, number)</t>
<t>Disable all tracks of a kind (audio, video, subtitle)</t>
<t>Enable track UID (the kind doesn't matter)</t>
<t>Define/Disable a highlight</t>
<t>Enable/Disable jumping</t>
<t>Enable/Disable track selection of a kind</t>
<t>Select Edition ID (see chapters)</t>
<t>Pause playback</t>
<t>Stop playback</t>
<t>Enable/Disable a Chapter UID</t>
<t>Hide/Unhide a Chapter UID</t>
</list>
</t>
<t>All the actions will be written in a normal Matroska track, with a timestamp. A &quot;Menu Frame&quot; SHOULD be able to contain more that one action/highlight for a given timestamp. (to be determined, EBML format structure)
</t>
</section>
<section anchor="player-requirements" title="Player requirements">
<t>Some <spanx style="verb">Matroska Players</spanx> might not support the control track. That mean they will play the active/looped parts as part of the data. So I suggest putting the active/looped parts of a movie at the end of a movie. When a Menu-aware <spanx style="verb">Matroska Player</spanx> encounter the default Control Track of a <spanx style="verb">Matroska</spanx> file, the first order SHOULD be to jump at the start of the active/looped part of the movie.
</t>
</section>
</section>
<section anchor="working-graph" title="Working Graph">
<figure align="center"><artwork align="center">
Matroska Source file -&gt; Control Track &lt;-&gt; Player.
-&gt; other tracks -&gt; rendered
</artwork></figure>
</section>
</section>
<section anchor="unknown-elements" title="Unknown elements">
<t>Matroska is based upon the principle that a reading application does not have to support 100% of the specifications in order to be able to play the file. A Matroska file therefore contains version indicators that tell a reading application what to expect.
</t>
<t>It is possible and valid to have the version fields indicate that the file contains Matroska <spanx style="verb">Elements</spanx> from a higher specification version number while signaling that a reading application MUST only support a lower version number properly in order to play it back (possibly with a reduced feature set). For example, a reading application supporting at least Matroska version <spanx style="verb">V</spanx> reading a file whose <spanx style="verb">DocTypeReadVersion</spanx> field is equal to or lower than <spanx style="verb">V</spanx> MUST skip Matroska/EBML <spanx style="verb">Elements</spanx> it encounters but does not know about if that unknown element fits into the size constraints set by the current <spanx style="verb">Parent Element</spanx>.
</t>
</section>
<section anchor="default-values" title="Default Values">
<t>The default value of an <spanx style="verb">Element</spanx> is assumed when not present in the data stream. It is assumed only in the scope of its <spanx style="verb">Parent Element</spanx>. For example, the <spanx style="verb">Language Element</spanx> is in the scope of the <spanx style="verb">Track Element</spanx>. If the <spanx style="verb">Parent Element</spanx> is not present or assumed, then the <spanx style="verb">Child Element</spanx> cannot be assumed.
</t>
</section>
<section anchor="defaultdecodedfieldduration" title="DefaultDecodedFieldDuration">
<t>The <spanx style="verb">DefaultDecodedFieldDuration Element</spanx> can signal to the displaying application how often fields of a video sequence will be available for displaying. It can be used for both interlaced and progressive content. If the video sequence is signaled as interlaced, then the period between two successive fields at the output of the decoding process equals <spanx style="verb">DefaultDecodedFieldDuration</spanx>.
</t>
<t>For video sequences signaled as progressive, it is twice the value of <spanx style="verb">DefaultDecodedFieldDuration</spanx>.
</t>
<t>These values are valid at the end of the decoding process before post-processing (such as deinterlacing or inverse telecine) is applied.
</t>
<t>Examples:
</t>
<t>
<list style="symbols">
<t>Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns</t>
<t>PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns</t>
<t>N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns</t>
<t>hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 encoded interlaced fields per second)</t>
<t>soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 encoded interlaced fields per second, with &quot;repeat_first_field = 1&quot;)</t>
</list>
</t>
</section>
<section anchor="encryption" title="Encryption">
<t>Encryption in Matroska is designed in a very generic style to allow people to implement whatever form of encryption is best for them. It is possible to use the encryption framework in Matroska as a type of DRM (Digital Rights Management).
</t>
<t>Because encryption occurs within the <spanx style="verb">Block Element</spanx>, it is possible to manipulate encrypted streams without decrypting them. The streams could potentially be copied, deleted, cut, appended, or any number of other possible editing techniques without decryption. The data can be used without having to expose it or go through the decrypting process.
</t>
<t>Encryption can also be layered within Matroska. This means that two completely different types of encryption can be used, requiring two separate keys to be able to decrypt a stream.
</t>
<t>Encryption information is stored in the <spanx style="verb">ContentEncodings Element</spanx> under the <spanx style="verb">ContentEncryption Element</spanx>.
</t>
</section>
<section anchor="image-cropping" title="Image cropping">
<t>The <spanx style="verb">PixelCrop Elements</spanx> (<spanx style="verb">PixelCropTop</spanx>, <spanx style="verb">PixelCropBottom</spanx>, <spanx style="verb">PixelCropRight</spanx> and <spanx style="verb">PixelCropLeft</spanx>) indicate when and by how much encoded videos frames SHOULD be cropped for display. These Elements allow edges of the frame that are not intended for display, such as the sprockets of a full-frame film scan or the VANC area of a digitized analog videotape, to be stored but hidden. <spanx style="verb">PixelCropTop</spanx> and <spanx style="verb">PixelCropBottom</spanx> store an integer of how many rows of pixels SHOULD be cropped from the top and bottom of the image (respectively). <spanx style="verb">PixelCropLeft</spanx> and <spanx style="verb">PixelCropRight</spanx> store an integer of how many columns of pixels SHOULD be cropped from the left and right of the image (respectively). For example, a pillar-boxed video that stores a 1440x1080 visual image within the center of a padded 1920x1080 encoded image MAY set both <spanx style="verb">PixelCropLeft</spanx> and <spanx style="verb">PixelCropRight</spanx> to <spanx style="verb">240</spanx>, so that a <spanx style="verb">Matroska Player</spanx> SHOULD crop off 240 columns of pixels from the left and right of the encoded image to present the image with the pillar-boxes hidden.
</t>
</section>
<section anchor="matroska-versioning" title="Matroska versioning">
<t>The <spanx style="verb">EBML Header</spanx> of each Matroska document informs the reading application on what version of Matroska to expect. The <spanx style="verb">Elements</spanx> within <spanx style="verb">EBML Header</spanx> with jurisdiction over this information are <spanx style="verb">DocTypeVersion</spanx> and <spanx style="verb">DocTypeReadVersion</spanx>.
</t>
<t><spanx style="verb">DocTypeVersion</spanx> MUST be equal to or greater than the highest Matroska version number of any <spanx style="verb">Element</spanx> present in the Matroska file. For example, a file using the <spanx style="verb">SimpleBlock Element</spanx> MUST have a <spanx style="verb">DocTypeVersion</spanx> equal to or greater than 2. A file containing <spanx style="verb">CueRelativePosition</spanx> Elements MUST have a <spanx style="verb">DocTypeVersion</spanx> equal to or greater than 4.
</t>
<t>The <spanx style="verb">DocTypeReadVersion</spanx> MUST contain the minimum version number that a reading application can minimally support in order to play the file back -- optionally with a reduced feature set. For example, if a file contains only <spanx style="verb">Elements</spanx> of version 2 or lower except for <spanx style="verb">CueRelativePosition</spanx> (which is a version 4 Matroska <spanx style="verb">Element</spanx>), then <spanx style="verb">DocTypeReadVersion</spanx> SHOULD still be set to 2 and not 4 because evaluating <spanx style="verb">CueRelativePosition</spanx> is not necessary for standard playback -- it makes seeking more precise if used.
</t>
<t><spanx style="verb">DocTypeVersion</spanx> MUST always be equal to or greater than <spanx style="verb">DocTypeReadVersion</spanx>.
</t>
<t>A reading application supporting Matroska version <spanx style="verb">V</spanx> MUST NOT refuse to read an application with <spanx style="verb">DocReadTypeVersion</spanx> equal to or lower than <spanx style="verb">V</spanx> even if <spanx style="verb">DocTypeVersion</spanx> is greater than <spanx style="verb">V</spanx>. See also the note about <xref target="unknown-elements"/>.
</t>
</section>
<section anchor="mime-types" title="MIME Types">
<t>There is no IETF endorsed MIME type for Matroska files. These definitions can be used:
</t>
<t>
<list style="symbols">
<t>.mka : Matroska audio <spanx style="verb">audio/x-matroska</spanx></t>
<t>.mkv : Matroska video <spanx style="verb">video/x-matroska</spanx></t>
<t>.mk3d : Matroska 3D video <spanx style="verb">video/x-matroska-3d</spanx></t>
</list>
</t>
</section>
<section anchor="segment-position" title="Segment Position">
<t>The <spanx style="verb">Segment Position</spanx> of an <spanx style="verb">Element</spanx> refers to the position of the first octet of the <spanx style="verb">Element ID</spanx> of that <spanx style="verb">Element</spanx>, measured in octets, from the beginning of the <spanx style="verb">Element Data</spanx> section of the containing <spanx style="verb">Segment Element</spanx>. In other words, the <spanx style="verb">Segment Position</spanx> of an <spanx style="verb">Element</spanx> is the distance in octets from the beginning of its containing <spanx style="verb">Segment Element</spanx> minus the size of the <spanx style="verb">Element ID</spanx> and <spanx style="verb">Element Data Size</spanx> of that <spanx style="verb">Segment Element</spanx>. The <spanx style="verb">Segment Position</spanx> of the first <spanx style="verb">Child Element</spanx> of the <spanx style="verb">Segment Element</spanx> is 0. An <spanx style="verb">Element</spanx> which is not stored within a <spanx style="verb">Segment Element</spanx>, such as the <spanx style="verb">Elements</spanx> of the <spanx style="verb">EBML Header</spanx>, do not have a <spanx style="verb">Segment Position</spanx>.
</t>
<section anchor="segment-position-exception" title="Segment Position Exception">
<t><spanx style="verb">Elements</spanx> that are defined to store a <spanx style="verb">Segment Position</spanx> MAY define reserved values to indicate a special meaning.
</t>
</section>
<section anchor="example-of-segment-position" title="Example of Segment Position">
<t>This table presents an example of <spanx style="verb">Segment Position</spanx> by showing a hexadecimal representation of a very small Matroska file with labels to show the offsets in octets. The file contains a <spanx style="verb">Segment Element</spanx> with an <spanx style="verb">Element ID</spanx> of <spanx style="verb">0x18538067</spanx> and a <spanx style="verb">MuxingApp Element</spanx> with an <spanx style="verb">Element ID</spanx> of <spanx style="verb">0x4D80</spanx>.
</t>
<figure align="center"><artwork align="center">
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67|
20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66|
</artwork></figure>
<t>In the above example, the <spanx style="verb">Element ID</spanx> of the <spanx style="verb">Segment Element</spanx> is stored at offset 16, the <spanx style="verb">Element Data Size</spanx> of the <spanx style="verb">Segment Element</spanx> is stored at offset 20, and the <spanx style="verb">Element Data</spanx> of the <spanx style="verb">Segment Element</spanx> is stored at offset 21.
</t>
<t>The <spanx style="verb">MuxingApp Element</spanx> is stored at offset 26. Since the <spanx style="verb">Segment Position</spanx> of an <spanx style="verb">Element</spanx> is calculated by subtracting the position of the <spanx style="verb">Element Data</spanx> of the containing <spanx style="verb">Segment Element</spanx> from the position of that <spanx style="verb">Element</spanx>, the <spanx style="verb">Segment Position</spanx> of <spanx style="verb">MuxingApp Element</spanx> in the above example is <spanx style="verb">26 - 21</spanx> or <spanx style="verb">5</spanx>.
</t>
</section>
</section>
<section anchor="linked-segments" title="Linked Segments">
<t>Matroska provides several methods to link two or many <spanx style="verb">Segment Elements</spanx> together to create a <spanx style="verb">Linked Segment</spanx>. A <spanx style="verb">Linked Segment</spanx> is a set of multiple <spanx style="verb">Segments</spanx> related together into a single presentation by using Hard Linking, Medium Linking, or Soft Linking. All <spanx style="verb">Segments</spanx> within a <spanx style="verb">Linked Segment</spanx> MUST utilize the same track numbers and timescale. All <spanx style="verb">Segments</spanx> within a <spanx style="verb">Linked Segment</spanx> MUST be stored within the same directory. All <spanx style="verb">Segments</spanx> within a <spanx style="verb">Linked Segment</spanx> MUST store a <spanx style="verb">SegmentUID</spanx>.
</t>
<section anchor="hard-linking" title="Hard Linking">
<t>Hard Linking (also called splitting) is the process of creating a <spanx style="verb">Linked Segment</spanx> by relating multiple <spanx style="verb">Segment Elements</spanx> using the <spanx style="verb">PrevUID</spanx> and <spanx style="verb">NextUID Elements</spanx>. Within a <spanx style="verb">Linked Segment</spanx>, the timestamps of each <spanx style="verb">Segment</spanx> MUST follow consecutively in linking order. With Hard Linking, the chapters of any <spanx style="verb">Segment</spanx> within the <spanx style="verb">Linked Segment</spanx> MUST only reference the current <spanx style="verb">Segment</spanx>. With Hard Linking, the <spanx style="verb">NextUID</spanx> and <spanx style="verb">PrevUID</spanx> MUST reference the respective <spanx style="verb">SegmentUID</spanx> values of the next and previous <spanx style="verb">Segments</spanx>. The first <spanx style="verb">Segment</spanx> of a <spanx style="verb">Linked Segment</spanx> MUST have a <spanx style="verb">NextUID Element</spanx> and MUST NOT have a <spanx style="verb">PrevUID Element</spanx>. The last <spanx style="verb">Segment</spanx> of a <spanx style="verb">Linked Segment</spanx> MUST have a <spanx style="verb">PrevUID Element</spanx> and MUST NOT have a <spanx style="verb">NextUID Element</spanx>. The middle <spanx style="verb">Segments</spanx> of a <spanx style="verb">Linked Segment</spanx> MUST have both a <spanx style="verb">NextUID Element</spanx> and a <spanx style="verb">PrevUID Element</spanx>.
</t>
<t>As an example, four <spanx style="verb">Segments</spanx> can be Hard Linked as a <spanx style="verb">Linked Segment</spanx> through cross-referencing each other with <spanx style="verb">SegmentUID</spanx>, <spanx style="verb">PrevUID</spanx>, and <spanx style="verb">NextUID</spanx>, as in this table.
</t>
<texttable>
<ttcol align="left">file name</ttcol>
<ttcol align="left">SegmentUID</ttcol>
<ttcol align="left">PrevUID</ttcol>
<ttcol align="left">NextUID</ttcol>
<c><spanx style="verb">start.mkv</spanx></c><c><spanx style="verb">71000c23cd31099853fbc94dd984a5dd</spanx></c><c>n/a</c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c>
<c><spanx style="verb">middle.mkv</spanx></c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c><c><spanx style="verb">71000c23cd31099853fbc94dd984a5dd</spanx></c><c><spanx style="verb">6c92285fa6d3e827b198d120ea3ac674</spanx></c>
<c><spanx style="verb">end.mkv</spanx></c><c><spanx style="verb">6c92285fa6d3e827b198d120ea3ac674</spanx></c><c><spanx style="verb">a77b3598941cb803eac0fcdafe44fac9</spanx></c><c>n/a</c>
</texttable>
</section>
<section anchor="medium-linking" title="Medium Linking">
<t>Medium Linking creates relationships between <spanx style="verb">Segments</spanx> using Ordered Chapters and the <spanx style="verb">ChapterSegmentUID Element</spanx>. A <spanx style="verb">Segment Edition</spanx> with Ordered Chapters MAY contain <spanx style="verb">Chapter Elements</spanx> that reference timestamp ranges from other <spanx style="verb">Segments</spanx>. The <spanx style="verb">Segment</spanx> referenced by the Ordered Chapter via the <spanx style="verb">ChapterSegmentUID Element</spanx> SHOULD be played as part of a Linked Segment. The timestamps of Segment content referenced by Ordered Chapters MUST be adjusted according to the cumulative duration of the the previous Ordered Chapters.
</t>
<t>As an example a file named <spanx style="verb">intro.mkv</spanx> could have a <spanx style="verb">SegmentUID</spanx> of <spanx style="verb">0xb16a58609fc7e60653a60c984fc11ead</spanx>. Another file called <spanx style="verb">program.mkv</spanx> could use a Chapter Edition that contains two Ordered Chapters. The first chapter references the <spanx style="verb">Segment</spanx> of <spanx style="verb">intro.mkv</spanx> with the use of a <spanx style="verb">ChapterSegmentUID</spanx>, <spanx style="verb">ChapterSegmentEditionUID</spanx>, <spanx style="verb">ChapterTimeStart</spanx> and optionally a <spanx style="verb">ChapterTimeEnd</spanx> element. The second chapter references content within the <spanx style="verb">Segment</spanx> of <spanx style="verb">program.mkv</spanx>. A <spanx style="verb">Matroska Player</spanx> SHOULD recognize the <spanx style="verb">Linked Segment</spanx> created by the use of <spanx style="verb">ChapterSegmentUID</spanx> in an enabled <spanx style="verb">Edition</spanx> and present the reference content of the two <spanx style="verb">Segments</spanx> together.
</t>
</section>
<section anchor="soft-linking" title="Soft Linking">
<t>Soft Linking is used by codec chapters. They can reference another <spanx style="verb">Segment</spanx> and jump to that <spanx style="verb">Segment</spanx>. The way the <spanx style="verb">Segments</spanx> are described are internal to the chapter codec and unknown to the Matroska level. But there are <spanx style="verb">Elements</spanx> within the <spanx style="verb">Info Element</spanx> (such as <spanx style="verb">ChapterTranslate</spanx>) that can translate a value representing a <spanx style="verb">Segment</spanx> in the chapter codec and to the current <spanx style="verb">SegmentUID</spanx>. All <spanx style="verb">Segments</spanx> that could be used in a <spanx style="verb">Linked Segment</spanx> in this way SHOULD be marked as members of the same family via the <spanx style="verb">SegmentFamily Element</spanx>, so that the <spanx style="verb">Matroska Player</spanx> can quickly switch from one to the other.
</t>
</section>
</section>
<section anchor="track-flags" title="Track Flags">
<section anchor="default-flag" title="Default flag">
<t>The &quot;default track&quot; flag is a hint for a <spanx style="verb">Matroska Player</spanx> and SHOULD always be changeable by the user. If the user wants to see or hear a track of a certain kind (audio, video, subtitles) and hasn't chosen a specific track, the <spanx style="verb">Matroska Player</spanx> SHOULD use the first track of that kind whose &quot;default track&quot; flag is set to &quot;1&quot;. If no such track is found then the first track of this kind SHOULD be chosen.
</t>
<t>Only one track of a kind MAY have its &quot;default track&quot; flag set in a segment. If a track entry does not contain the &quot;default track&quot; flag element then its default value &quot;1&quot; is to be used.
</t>
</section>
<section anchor="forced-flag" title="Forced flag">
<t>The &quot;forced&quot; flag tells the <spanx style="verb">Matroska Player</spanx> that it MUST display/play this track or another track of the same kind that also has its &quot;forced&quot; flag set. When there are multiple &quot;forced&quot; tracks, the <spanx style="verb">Matroska Player</spanx> SHOULD determine the track based upon the language of the forced flag or use the default flag if no track matches the use languages. Another track of the same kind without the &quot;forced&quot; flag may be use simultaneously with the &quot;forced&quot; track (like DVD subtitles for example).
</t>
</section>
<section anchor="track-operation" title="Track Operation">
<t><spanx style="verb">TrackOperation</spanx> allows combining multiple tracks to make a virtual one. It uses two separate system to combine tracks. One to create a 3D &quot;composition&quot; (left/right/background planes) and one to simplify join two tracks together to make a single track.
</t>
<t>A track created with <spanx style="verb">TrackOperation</spanx> is a proper track with a UID and all its flags. However the codec ID is meaningless because each &quot;sub&quot; track needs to be decoded by its own decoder before the &quot;operation&quot; is applied. The <spanx style="verb">Cues Elements</spanx> corresponding to such a virtual track SHOULD be the sum of the <spanx style="verb">Cues Elements</spanx> for each of the tracks it's composed of (when the <spanx style="verb">Cues</spanx> are defined per track).
</t>
<t>In the case of <spanx style="verb">TrackJoinBlocks</spanx>, the <spanx style="verb">Block Elements</spanx> (from <spanx style="verb">BlockGroup</spanx> and <spanx style="verb">SimpleBlock</spanx>) of all the tracks SHOULD be used as if they were defined for this new virtual <spanx style="verb">Track</spanx>. When two <spanx style="verb">Block Elements</spanx> have overlapping start or end timestamps, it's up to the underlying system to either drop some of these frames or render them the way they overlap. This situation SHOULD be avoided when creating such tracks as you can never be sure of the end result on different platforms.
</t>
</section>
<section anchor="overlay-track" title="Overlay Track">
<t>Overlay tracks SHOULD be rendered in the same 'channel' as the track its linked to. When content is found in such a track, it SHOULD be played on the rendering channel instead of the original track.
</t>
</section>
<section anchor="multiplanar-and-3d-videos" title="Multi-planar and 3D videos">
<t>There are two different ways to compress 3D videos: have each 'eye' track in a separate track and have one track have both 'eyes' combined inside (which is more efficient, compression-wise). Matroska supports both ways.
</t>
<t>For the single track variant, there is the <spanx style="verb">StereoMode Element</spanx> which defines how planes are assembled in the track (mono or left-right combined). Odd values of StereoMode means the left plane comes first for more convenient reading. The pixel count of the track (<spanx style="verb">PixelWidth</spanx>/<spanx style="verb">PixelHeight</spanx>) is the raw amount of pixels (for example 3840x1080 for full HD side by side) and the <spanx style="verb">DisplayWidth</spanx>/<spanx style="verb">DisplayHeight</spanx> in pixels is the amount of pixels for one plane (1920x1080 for that full HD stream). Old stereo 3D were displayed using anaglyph (cyan and red colours separated). For compatibility with such movies, there is a value of the StereoMode that corresponds to AnaGlyph.
</t>
<t>There is also a &quot;packed&quot; mode (values 13 and 14) which consists of packing two frames together in a <spanx style="verb">Block</spanx> using lacing. The first frame is the left eye and the other frame is the right eye (or vice versa). The frames SHOULD be decoded in that order and are possibly dependent on each other (P and B frames).
</t>
<t>For separate tracks, Matroska needs to define exactly which track does what. <spanx style="verb">TrackOperation</spanx> with <spanx style="verb">TrackCombinePlanes</spanx> do that. For more details look at <xref target="track-operation"/>.
</t>
<t>The 3D support is still in infancy and may evolve to support more features.
</t>
<t>The StereoMode used to be part of Matroska v2 but it didn't meet the requirement for multiple tracks. There was also a bug in libmatroska prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8. <spanx style="verb">Matroska Readers</spanx> may support these legacy files by checking Matroska v2 or 0x53B9. The <eref target="http://www.matroska.org/node/1/revisions/74/view#StereoMode">older values</eref> were 0: mono, 1: right eye, 2: left eye, 3: both eyes.
</t>
</section>
</section>
<section anchor="timestamps" title="Timestamps">
<t>Historically timestamps in Matroska were mistakenly called timecodes. The <spanx style="verb">Timestamp Element</spanx> was called Timecode, the <spanx style="verb">TimestampScale Element</spanx> was called TimecodeScale, the <spanx style="verb">TrackTimestampScale Element</spanx> was called TrackTimecodeScale and the <spanx style="verb">ReferenceTimestamp Element</spanx> was called ReferenceTimeCode.
</t>
<section anchor="timestamp-types" title="Timestamp Types">
<t>
<list style="symbols">
<t>Absolute Timestamp = Block+Cluster</t>
<t>Relative Timestamp = Block</t>
<t>Scaled Timestamp = Block+Cluster</t>
<t>Raw Timestamp = (Block+Cluster)*TimestampScale*TrackTimestampScale</t>
</list>
</t>
</section>
<section anchor="block-timestamps" title="Block Timestamps">
<t>The <spanx style="verb">Block Element</spanx>'s timestamp MUST be a signed integer that represents the <spanx style="verb">Raw Timestamp</spanx> relative to the <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp Element</spanx>, multiplied by the <spanx style="verb">TimestampScale Element</spanx>. See <xref target="timestampscale"/> for more information.
</t>
<t>The <spanx style="verb">Block Element</spanx>'s timestamp MUST be represented by a 16bit signed integer (sint16). The <spanx style="verb">Block</spanx>'s timestamp has a range of -32768 to +32767 units. When using the default value of the <spanx style="verb">TimestampScale Element</spanx>, each integer represents 1ms. The maximum time span of <spanx style="verb">Block Elements</spanx> in a <spanx style="verb">Cluster</spanx> using the default <spanx style="verb">TimestampScale Element</spanx> of 1ms is 65536ms.
</t>
<t>If a <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp Element</spanx> is set to zero, it is possible to have <spanx style="verb">Block Elements</spanx> with a negative <spanx style="verb">Raw Timestamp</spanx>. <spanx style="verb">Block Elements</spanx> with a negative <spanx style="verb">Raw Timestamp</spanx> are not valid.
</t>
</section>
<section anchor="raw-timestamp" title="Raw Timestamp">
<t>The exact time of an object SHOULD be represented in nanoseconds. To find out a <spanx style="verb">Block</spanx>'s <spanx style="verb">Raw Timestamp</spanx>, you need the <spanx style="verb">Block</spanx>'s <spanx style="verb">Timestamp Element</spanx>, the <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp Element</spanx>, and the <spanx style="verb">TimestampScale Element</spanx>.
</t>
</section>
<section anchor="timestampscale" title="TimestampScale">
<t>The <spanx style="verb">TimestampScale Element</spanx> is used to calculate the <spanx style="verb">Raw Timestamp</spanx> of a <spanx style="verb">Block</spanx>. The timestamp is obtained by adding the <spanx style="verb">Block</spanx>'s timestamp to the <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp Element</spanx>, and then multiplying that result by the <spanx style="verb">TimestampScale</spanx>. The result will be the <spanx style="verb">Block</spanx>'s <spanx style="verb">Raw Timestamp</spanx> in nanoseconds. The formula for this would look like:
</t>
<figure align="center"><artwork align="center">
(a + b) * c
a = `Block`'s Timestamp
b = `Cluster`'s Timestamp
c = `TimestampScale`
</artwork></figure>
<t>For example, assume a <spanx style="verb">Cluster</spanx>'s <spanx style="verb">Timestamp</spanx> has a value of 564264, the <spanx style="verb">Block</spanx> has a <spanx style="verb">Timestamp</spanx> of 1233, and the <spanx style="verb">TimestampScale Element</spanx> is the default of 1000000.
</t>
<figure align="center"><artwork align="center">
(1233 + 564264) * 1000000 = 565497000000
</artwork></figure>
<t>So, the <spanx style="verb">Block</spanx> in this example has a specific time of 565497000000 in nanoseconds. In milliseconds this would be 565497ms.
</t>
</section>
<section anchor="timestampscale-rounding" title="TimestampScale Rounding">
<t>Because the default value of <spanx style="verb">TimestampScale</spanx> is 1000000, which makes each integer in the <spanx style="verb">Cluster</spanx> and <spanx style="verb">Block</spanx> <spanx style="verb">Timestamp Elements</spanx> equal 1ms, this is the most commonly used. When dealing with audio, this causes inaccuracy when seeking. When the audio is combined with video, this is not an issue. For most cases, the the synch of audio to video does not need to be more than 1ms accurate. This becomes obvious when one considers that sound will take 2-3ms to travel a single meter, so distance from your speakers will have a greater effect on audio/visual synch than this.
</t>
<t>However, when dealing with audio-only files, seeking accuracy can become critical. For instance, when storing a whole CD in a single track, a user will want to be able to seek to the exact sample that a song begins at. If seeking a few sample ahead or behind, a 'crack' or 'pop' may result as a few odd samples are rendered. Also, when performing precise editing, it may be very useful to have the audio accuracy down to a single sample.
</t>
<t>When storing timestamps for an audio stream, the <spanx style="verb">TimestampScale Element</spanx> SHOULD have an accuracy of at least that of the audio sample rate, otherwise there are rounding errors that prevent users from knowing the precise location of a sample. Here's how a program has to round each timestamp in order to be able to recreate the sample number accurately.
</t>
<t>Let's assume that the application has an audio track with a sample rate of 44100. As written above the <spanx style="verb">TimestampScale</spanx> MUST have at least the accuracy of the sample rate itself: 1000000000 / 44100 = 22675.7369614512. This value MUST always be truncated. Otherwise the accuracy will not suffice. So in this example the application will use 22675 for the <spanx style="verb">TimestampScale</spanx>. The application could even use some lower value like 22674 which would allow it to be a little bit imprecise about the original timestamps. But more about that in a minute.
</t>
<t>Next the application wants to write sample number 52340 and calculates the timestamp. This is easy. In order to calculate the <spanx style="verb">Raw Timestamp</spanx> in ns all it has to do is calculate <spanx style="verb">Raw Timestamp = round(1000000000 * sample_number / sample_rate)</spanx>. Rounding at this stage is very important! The application might skip it if it choses a slightly smaller value for the <spanx style="verb">TimestampScale</spanx> factor instead of the truncated one like shown above. Otherwise it has to round or the results won't be reversible. For our example we get <spanx style="verb">Raw Timestamp = round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 1186848073</spanx>.
</t>
<t>The next step is to calculate the <spanx style="verb">Absolute Timestamp</spanx> - that is the timestamp that will be stored in the Matroska file. Here the application has to divide the <spanx style="verb">Raw Timestamp</spanx> from the previous paragraph by the <spanx style="verb">TimestampScale</spanx> factor and round the result: <spanx style="verb">Absolute Timestamp = round(Raw Timestamp / TimestampScale_factor)</spanx> which will result in the following for our example: <spanx style="verb">Absolute Timestamp = round(1186848073 / 22675) = round(52341.7011245866) = 52342</spanx>. This number is the one the application has to write to the file.
</t>
<t>Now our file is complete, and we want to play it back with another application. Its task is to find out which sample the first application wrote into the file. So it starts reading the Matroska file and finds the <spanx style="verb">TimestampScale</spanx> factor 22675 and the audio sample rate 44100. Later it finds a data block with the <spanx style="verb">Absolute Timestamp</spanx> of 52342. But how does it get the sample number from these numbers?
</t>
<t>First it has to calculate the <spanx style="verb">Raw Timestamp</spanx> of the block it has just read. Here's no rounding involved, just an integer multiplication: <spanx style="verb">Raw Timestamp = Absolute Timestamp * TimestampScale_factor</spanx>. In our example: <spanx style="verb">Raw Timestamp = 52342 * 22675 = 1186854850</spanx>.
</t>
<t>The conversion from the <spanx style="verb">Raw Timestamp</spanx> to the sample number again requires rounding: <spanx style="verb">sample_number = round(Raw Timestamp * sample_rate / 1000000000)</spanx>. In our example: <spanx style="verb">sample_number = round(1186854850 * 44100 / 1000000000) = round(52340.298885) = 52340</spanx>. This is exactly the sample number that the previous program started with.
</t>
<t>Some general notes for a program:
</t>
<t>
<list style="numbers">
<t>Always calculate the timestamps / sample numbers with floating point numbers of at least 64bit precision (called 'double' in most modern programming languages). If you're calculating with integers then make sure they're 64bit long, too.</t>
<t>Always round if you divide. Always! If you don't you'll end up with situations in which you have a timestamp in the Matroska file that does not correspond to the sample number that it started with. Using a slightly lower timestamp scale factor can help here in that it removes the need for proper rounding in the conversion from sample number to <spanx style="verb">Raw Timestamp</spanx>.</t>
</list>
</t>
</section>
<section anchor="tracktimestampscale" title="TrackTimestampScale">
<t>The <spanx style="verb">TrackTimestampScale Element</spanx> is used align tracks that would otherwise be played at different speeds. An example of this would be if you have a film that was originally recorded at 24fps video. When playing this back through a PAL broadcasting system, it is standard to speed up the film to 25fps to match the 25fps display speed of the PAL broadcasting standard. However, when broadcasting the video through NTSC, it is typical to leave the film at its original speed. If you wanted to make a single file where there was one video stream, and an audio stream used from the PAL broadcast, as well as an audio stream used from the NTSC broadcast, you would have the problem that the PAL audio stream would be 1/24th faster than the NTSC audio stream, quickly leading to problems. It is possible to stretch out the PAL audio track and re-encode it at a slower speed, however when dealing with lossy audio codecs, this often results in a loss of audio quality and/or larger file sizes.
</t>
<t>This is the type of problem that <spanx style="verb">TrackTimestampScale</spanx> was designed to fix. Using it, the video can be played back at a speed that will synch with either the NTSC or the PAL audio stream, depending on which is being used for playback.
To continue the above example:
</t>
<figure align="center"><artwork align="center">
Track 1: Video
Track 2: NTSC Audio
Track 3: PAL Audio
</artwork></figure>
<t>Because the NTSC track is at the original speed, it will used as the default value of 1.0 for its <spanx style="verb">TrackTimestampScale</spanx>. The video will also be aligned to the NTSC track with the default value of 1.0.
</t>
<t>The <spanx style="verb">TrackTimestampScale</spanx> value to use for the PAL track would be calculated by determining how much faster the PAL track is than the NTSC track. In this case, because we know the video for the NTSC audio is being played back at 24fps and the video for the PAL audio is being played back at 25fps, the calculation would be:
</t>
<t>25/24 ≈ 1.04166666666666666667
</t>
<t>When writing a file that uses a non-default <spanx style="verb">TrackTimestampScale</spanx>, the values of the <spanx style="verb">Block</spanx>'s timestamp are whatever they would be when normally storing the track with a default value for the <spanx style="verb">TrackTimestampScale</spanx>. However, the data is interleaved a little differently. Data SHOULD be interleaved by its <xref target="raw-timestamp"/> in the order handed back from the encoder. The <spanx style="verb">Raw Timestamp</spanx> of a <spanx style="verb">Block</spanx> from a track using <spanx style="verb">TrackTimestampScale</spanx> is calculated using:
</t>
<t><spanx style="verb">(Block's Timestamp + Cluster's Timestamp) * TimestampScale * TrackTimestampScale</spanx>
</t>
<t>So, a Block from the PAL track above that had a <xref target="timestamp-types"/> of 100 seconds would have a <spanx style="verb">Raw Timestamp</spanx> of 104.66666667 seconds, and so would be stored in that part of the file.
</t>
<t>When playing back a track using the <spanx style="verb">TrackTimestampScale</spanx>, if the track is being played by itself, there is no need to scale it. From the above example, when playing the Video with the NTSC Audio, neither are scaled. However, when playing back the Video with the PAL Audio, the timestamps from the PAL Audio track are scaled using the <spanx style="verb">TrackTimestampScale</spanx>, resulting in the video playing back in synch with the audio.
</t>
<t>It would be possible for a <spanx style="verb">Matroska Player</spanx> to also adjust the audio's samplerate at the same time as adjusting the timestamps if you wanted to play the two audio streams synchronously. It would also be possible to adjust the video to match the audio's speed. However, for playback, the selected track(s) timestamps SHOULD be adjusted if they need to be scaled.
</t>
<t>While the above example deals specifically with audio tracks, this element can be used to align video, audio, subtitles, or any other type of track contained in a Matroska file.
</t>
</section>
</section>
</middle>
</rfc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment