cellar S. Lhomme Internet-Draft Intended status: Standards Track M. Bunkus Expires: May 27, 2017 D. Rice November 23, 2016 Matroska draft-lhomme-cellar-matroska-01 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 May 27, 2017. Copyright Notice Copyright (c) 2016 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 May 27, 2017 [Page 1] Internet-Draft Matroska November 2016 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Status of this document . . . . . . . . . . . . . . . . . . . 10 3. Security Considerations . . . . . . . . . . . . . . . . . . . 10 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5. Notations and Conventions . . . . . . . . . . . . . . . . . . 10 6. Basis in EBML . . . . . . . . . . . . . . . . . . . . . . . . 11 6.1. Added Constaints on EBML . . . . . . . . . . . . . . . . 11 6.2. Matroska Design . . . . . . . . . . . . . . . . . . . . . 11 6.2.1. Language Codes . . . . . . . . . . . . . . . . . . . 11 6.2.2. Physical Types . . . . . . . . . . . . . . . . . . . 11 6.2.3. Block Structure . . . . . . . . . . . . . . . . . . . 12 6.2.4. Lacing . . . . . . . . . . . . . . . . . . . . . . . 14 7. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 19 7.1. Matroska Additions to Schema Element Attributes . . . . . 19 7.2. Matroska Schema . . . . . . . . . . . . . . . . . . . . . 20 7.2.1. Segment Element . . . . . . . . . . . . . . . . . . . 20 7.2.2. SeekHead Element . . . . . . . . . . . . . . . . . . 20 7.2.3. Seek Element . . . . . . . . . . . . . . . . . . . . 21 7.2.4. SeekID Element . . . . . . . . . . . . . . . . . . . 21 7.2.5. SeekPosition Element . . . . . . . . . . . . . . . . 21 7.2.6. Info Element . . . . . . . . . . . . . . . . . . . . 22 7.2.7. SegmentUID Element . . . . . . . . . . . . . . . . . 22 7.2.8. SegmentFilename Element . . . . . . . . . . . . . . . 23 7.2.9. PrevUID Element . . . . . . . . . . . . . . . . . . . 23 7.2.10. PrevFilename Element . . . . . . . . . . . . . . . . 23 7.2.11. NextUID Element . . . . . . . . . . . . . . . . . . . 24 7.2.12. NextFilename Element . . . . . . . . . . . . . . . . 24 7.2.13. SegmentFamily Element . . . . . . . . . . . . . . . . 25 7.2.14. ChapterTranslate Element . . . . . . . . . . . . . . 25 7.2.15. ChapterTranslateEditionUID Element . . . . . . . . . 25 7.2.16. ChapterTranslateCodec Element . . . . . . . . . . . . 26 7.2.17. ChapterTranslateID Element . . . . . . . . . . . . . 26 7.2.18. TimecodeScale Element . . . . . . . . . . . . . . . . 26 7.2.19. Duration Element . . . . . . . . . . . . . . . . . . 27 7.2.20. DateUTC Element . . . . . . . . . . . . . . . . . . . 27 7.2.21. Title Element . . . . . . . . . . . . . . . . . . . . 28 7.2.22. MuxingApp Element . . . . . . . . . . . . . . . . . . 28 7.2.23. WritingApp Element . . . . . . . . . . . . . . . . . 28 7.2.24. Cluster Element . . . . . . . . . . . . . . . . . . . 29 7.2.25. Timecode Element . . . . . . . . . . . . . . . . . . 29 7.2.26. SilentTracks Element . . . . . . . . . . . . . . . . 29 7.2.27. SilentTrackNumber Element . . . . . . . . . . . . . . 30 7.2.28. Position Element . . . . . . . . . . . . . . . . . . 30 7.2.29. PrevSize Element . . . . . . . . . . . . . . . . . . 30 7.2.30. SimpleBlock Element . . . . . . . . . . . . . . . . . 31 7.2.31. BlockGroup Element . . . . . . . . . . . . . . . . . 31 Lhomme, et al. Expires May 27, 2017 [Page 2] Internet-Draft Matroska November 2016 7.2.32. Block Element . . . . . . . . . . . . . . . . . . . . 31 7.2.33. BlockVirtual Element . . . . . . . . . . . . . . . . 32 7.2.34. BlockAdditions Element . . . . . . . . . . . . . . . 32 7.2.35. BlockMore Element . . . . . . . . . . . . . . . . . . 33 7.2.36. BlockAddID Element . . . . . . . . . . . . . . . . . 33 7.2.37. BlockAdditional Element . . . . . . . . . . . . . . . 33 7.2.38. BlockDuration Element . . . . . . . . . . . . . . . . 34 7.2.39. ReferencePriority Element . . . . . . . . . . . . . . 34 7.2.40. ReferenceBlock Element . . . . . . . . . . . . . . . 35 7.2.41. ReferenceVirtual Element . . . . . . . . . . . . . . 35 7.2.42. CodecState Element . . . . . . . . . . . . . . . . . 35 7.2.43. DiscardPadding Element . . . . . . . . . . . . . . . 36 7.2.44. Slices Element . . . . . . . . . . . . . . . . . . . 36 7.2.45. TimeSlice Element . . . . . . . . . . . . . . . . . . 36 7.2.46. LaceNumber Element . . . . . . . . . . . . . . . . . 37 7.2.47. FrameNumber Element . . . . . . . . . . . . . . . . . 37 7.2.48. BlockAdditionID Element . . . . . . . . . . . . . . . 38 7.2.49. Delay Element . . . . . . . . . . . . . . . . . . . . 38 7.2.50. SliceDuration Element . . . . . . . . . . . . . . . . 38 7.2.51. ReferenceFrame Element . . . . . . . . . . . . . . . 39 7.2.52. ReferenceOffset Element . . . . . . . . . . . . . . . 39 7.2.53. ReferenceTimeCode Element . . . . . . . . . . . . . . 39 7.2.54. EncryptedBlock Element . . . . . . . . . . . . . . . 40 7.2.55. Tracks Element . . . . . . . . . . . . . . . . . . . 40 7.2.56. TrackEntry Element . . . . . . . . . . . . . . . . . 41 7.2.57. TrackNumber Element . . . . . . . . . . . . . . . . . 41 7.2.58. TrackUID Element . . . . . . . . . . . . . . . . . . 41 7.2.59. TrackType Element . . . . . . . . . . . . . . . . . . 42 7.2.60. FlagEnabled Element . . . . . . . . . . . . . . . . . 42 7.2.61. FlagDefault Element . . . . . . . . . . . . . . . . . 43 7.2.62. FlagForced Element . . . . . . . . . . . . . . . . . 43 7.2.63. FlagLacing Element . . . . . . . . . . . . . . . . . 44 7.2.64. MinCache Element . . . . . . . . . . . . . . . . . . 44 7.2.65. MaxCache Element . . . . . . . . . . . . . . . . . . 44 7.2.66. DefaultDuration Element . . . . . . . . . . . . . . . 45 7.2.67. DefaultDecodedFieldDuration Element . . . . . . . . . 45 7.2.68. TrackTimecodeScale Element . . . . . . . . . . . . . 45 7.2.69. TrackOffset Element . . . . . . . . . . . . . . . . . 46 7.2.70. MaxBlockAdditionID Element . . . . . . . . . . . . . 46 7.2.71. Name Element . . . . . . . . . . . . . . . . . . . . 47 7.2.72. Language Element . . . . . . . . . . . . . . . . . . 47 7.2.73. CodecID Element . . . . . . . . . . . . . . . . . . . 47 7.2.74. CodecPrivate Element . . . . . . . . . . . . . . . . 48 7.2.75. CodecName Element . . . . . . . . . . . . . . . . . . 48 7.2.76. AttachmentLink Element . . . . . . . . . . . . . . . 48 7.2.77. CodecSettings Element . . . . . . . . . . . . . . . . 49 7.2.78. CodecInfoURL Element . . . . . . . . . . . . . . . . 49 7.2.79. CodecDownloadURL Element . . . . . . . . . . . . . . 49 Lhomme, et al. Expires May 27, 2017 [Page 3] Internet-Draft Matroska November 2016 7.2.80. CodecDecodeAll Element . . . . . . . . . . . . . . . 50 7.2.81. TrackOverlay Element . . . . . . . . . . . . . . . . 50 7.2.82. CodecDelay Element . . . . . . . . . . . . . . . . . 51 7.2.83. SeekPreRoll Element . . . . . . . . . . . . . . . . . 51 7.2.84. TrackTranslate Element . . . . . . . . . . . . . . . 51 7.2.85. TrackTranslateEditionUID Element . . . . . . . . . . 52 7.2.86. TrackTranslateCodec Element . . . . . . . . . . . . . 52 7.2.87. TrackTranslateTrackID Element . . . . . . . . . . . . 52 7.2.88. Video Element . . . . . . . . . . . . . . . . . . . . 53 7.2.89. FlagInterlaced Element . . . . . . . . . . . . . . . 53 7.2.90. FieldOrder Element . . . . . . . . . . . . . . . . . 54 7.2.91. StereoMode Element . . . . . . . . . . . . . . . . . 54 7.2.92. AlphaMode Element . . . . . . . . . . . . . . . . . . 55 7.2.93. OldStereoMode Element . . . . . . . . . . . . . . . . 55 7.2.94. PixelWidth Element . . . . . . . . . . . . . . . . . 55 7.2.95. PixelHeight Element . . . . . . . . . . . . . . . . . 56 7.2.96. PixelCropBottom Element . . . . . . . . . . . . . . . 56 7.2.97. PixelCropTop Element . . . . . . . . . . . . . . . . 57 7.2.98. PixelCropLeft Element . . . . . . . . . . . . . . . . 57 7.2.99. PixelCropRight Element . . . . . . . . . . . . . . . 57 7.2.100. DisplayWidth Element . . . . . . . . . . . . . . . . 58 7.2.101. DisplayHeight Element . . . . . . . . . . . . . . . 58 7.2.102. DisplayUnit Element . . . . . . . . . . . . . . . . 58 7.2.103. AspectRatioType Element . . . . . . . . . . . . . . 59 7.2.104. ColourSpace Element . . . . . . . . . . . . . . . . 59 7.2.105. GammaValue Element . . . . . . . . . . . . . . . . . 60 7.2.106. FrameRate Element . . . . . . . . . . . . . . . . . 60 7.2.107. Colour Element . . . . . . . . . . . . . . . . . . . 60 7.2.108. MatrixCoefficients Element . . . . . . . . . . . . . 61 7.2.109. BitsPerChannel Element . . . . . . . . . . . . . . . 61 7.2.110. ChromaSubsamplingHorz Element . . . . . . . . . . . 61 7.2.111. ChromaSubsamplingVert Element . . . . . . . . . . . 62 7.2.112. CbSubsamplingHorz Element . . . . . . . . . . . . . 62 7.2.113. CbSubsamplingVert Element . . . . . . . . . . . . . 63 7.2.114. ChromaSitingHorz Element . . . . . . . . . . . . . . 63 7.2.115. ChromaSitingVert Element . . . . . . . . . . . . . . 63 7.2.116. Range Element . . . . . . . . . . . . . . . . . . . 64 7.2.117. TransferCharacteristics Element . . . . . . . . . . 64 7.2.118. Primaries Element . . . . . . . . . . . . . . . . . 65 7.2.119. MaxCLL Element . . . . . . . . . . . . . . . . . . . 65 7.2.120. MaxFALL Element . . . . . . . . . . . . . . . . . . 65 7.2.121. MasteringMetadata Element . . . . . . . . . . . . . 66 7.2.122. PrimaryRChromaticityX Element . . . . . . . . . . . 66 7.2.123. PrimaryRChromaticityY Element . . . . . . . . . . . 66 7.2.124. PrimaryGChromaticityX Element . . . . . . . . . . . 67 7.2.125. PrimaryGChromaticityY Element . . . . . . . . . . . 67 7.2.126. PrimaryBChromaticityX Element . . . . . . . . . . . 67 7.2.127. PrimaryBChromaticityY Element . . . . . . . . . . . 68 Lhomme, et al. Expires May 27, 2017 [Page 4] Internet-Draft Matroska November 2016 7.2.128. WhitePointChromaticityX Element . . . . . . . . . . 68 7.2.129. WhitePointChromaticityY Element . . . . . . . . . . 68 7.2.130. LuminanceMax Element . . . . . . . . . . . . . . . . 69 7.2.131. LuminanceMin Element . . . . . . . . . . . . . . . . 69 7.2.132. Audio Element . . . . . . . . . . . . . . . . . . . 70 7.2.133. SamplingFrequency Element . . . . . . . . . . . . . 70 7.2.134. OutputSamplingFrequency Element . . . . . . . . . . 70 7.2.135. Channels Element . . . . . . . . . . . . . . . . . . 71 7.2.136. ChannelPositions Element . . . . . . . . . . . . . . 71 7.2.137. BitDepth Element . . . . . . . . . . . . . . . . . . 72 7.2.138. TrackOperation Element . . . . . . . . . . . . . . . 72 7.2.139. TrackCombinePlanes Element . . . . . . . . . . . . . 72 7.2.140. TrackPlane Element . . . . . . . . . . . . . . . . . 73 7.2.141. TrackPlaneUID Element . . . . . . . . . . . . . . . 73 7.2.142. TrackPlaneType Element . . . . . . . . . . . . . . . 73 7.2.143. TrackJoinBlocks Element . . . . . . . . . . . . . . 74 7.2.144. TrackJoinUID Element . . . . . . . . . . . . . . . . 74 7.2.145. TrickTrackUID Element . . . . . . . . . . . . . . . 75 7.2.146. TrickTrackSegmentUID Element . . . . . . . . . . . . 75 7.2.147. TrickTrackFlag Element . . . . . . . . . . . . . . . 75 7.2.148. TrickMasterTrackUID Element . . . . . . . . . . . . 76 7.2.149. TrickMasterTrackSegmentUID Element . . . . . . . . . 76 7.2.150. ContentEncodings Element . . . . . . . . . . . . . . 76 7.2.151. ContentEncoding Element . . . . . . . . . . . . . . 77 7.2.152. ContentEncodingOrder Element . . . . . . . . . . . . 77 7.2.153. ContentEncodingScope Element . . . . . . . . . . . . 78 7.2.154. ContentEncodingType Element . . . . . . . . . . . . 78 7.2.155. ContentCompression Element . . . . . . . . . . . . . 79 7.2.156. ContentCompAlgo Element . . . . . . . . . . . . . . 79 7.2.157. ContentCompSettings Element . . . . . . . . . . . . 79 7.2.158. ContentEncryption Element . . . . . . . . . . . . . 80 7.2.159. ContentEncAlgo Element . . . . . . . . . . . . . . . 80 7.2.160. ContentEncKeyID Element . . . . . . . . . . . . . . 81 7.2.161. ContentSignature Element . . . . . . . . . . . . . . 81 7.2.162. ContentSigKeyID Element . . . . . . . . . . . . . . 81 7.2.163. ContentSigAlgo Element . . . . . . . . . . . . . . . 82 7.2.164. ContentSigHashAlgo Element . . . . . . . . . . . . . 82 7.2.165. Cues Element . . . . . . . . . . . . . . . . . . . . 82 7.2.166. CuePoint Element . . . . . . . . . . . . . . . . . . 83 7.2.167. CueTime Element . . . . . . . . . . . . . . . . . . 83 7.2.168. CueTrackPositions Element . . . . . . . . . . . . . 83 7.2.169. CueTrack Element . . . . . . . . . . . . . . . . . . 84 7.2.170. CueClusterPosition Element . . . . . . . . . . . . . 84 7.2.171. CueRelativePosition Element . . . . . . . . . . . . 85 7.2.172. CueDuration Element . . . . . . . . . . . . . . . . 85 7.2.173. CueBlockNumber Element . . . . . . . . . . . . . . . 85 7.2.174. CueCodecState Element . . . . . . . . . . . . . . . 86 7.2.175. CueReference Element . . . . . . . . . . . . . . . . 86 Lhomme, et al. Expires May 27, 2017 [Page 5] Internet-Draft Matroska November 2016 7.2.176. CueRefTime Element . . . . . . . . . . . . . . . . . 86 7.2.177. CueRefCluster Element . . . . . . . . . . . . . . . 87 7.2.178. CueRefNumber Element . . . . . . . . . . . . . . . . 87 7.2.179. CueRefCodecState Element . . . . . . . . . . . . . . 88 7.2.180. Attachments Element . . . . . . . . . . . . . . . . 88 7.2.181. AttachedFile Element . . . . . . . . . . . . . . . . 88 7.2.182. FileDescription Element . . . . . . . . . . . . . . 89 7.2.183. FileName Element . . . . . . . . . . . . . . . . . . 89 7.2.184. FileMimeType Element . . . . . . . . . . . . . . . . 89 7.2.185. FileData Element . . . . . . . . . . . . . . . . . . 90 7.2.186. FileUID Element . . . . . . . . . . . . . . . . . . 90 7.2.187. FileReferral Element . . . . . . . . . . . . . . . . 90 7.2.188. FileUsedStartTime Element . . . . . . . . . . . . . 91 7.2.189. FileUsedEndTime Element . . . . . . . . . . . . . . 91 7.2.190. Chapters Element . . . . . . . . . . . . . . . . . . 91 7.2.191. EditionEntry Element . . . . . . . . . . . . . . . . 92 7.2.192. EditionUID Element . . . . . . . . . . . . . . . . . 92 7.2.193. EditionFlagHidden Element . . . . . . . . . . . . . 92 7.2.194. EditionFlagDefault Element . . . . . . . . . . . . . 93 7.2.195. EditionFlagOrdered Element . . . . . . . . . . . . . 93 7.2.196. ChapterAtom Element . . . . . . . . . . . . . . . . 94 7.2.197. ChapterUID Element . . . . . . . . . . . . . . . . . 94 7.2.198. ChapterStringUID Element . . . . . . . . . . . . . . 94 7.2.199. ChapterTimeStart Element . . . . . . . . . . . . . . 95 7.2.200. ChapterTimeEnd Element . . . . . . . . . . . . . . . 95 7.2.201. ChapterFlagHidden Element . . . . . . . . . . . . . 95 7.2.202. ChapterFlagEnabled Element . . . . . . . . . . . . . 96 7.2.203. ChapterSegmentUID Element . . . . . . . . . . . . . 96 7.2.204. ChapterSegmentEditionUID Element . . . . . . . . . . 97 7.2.205. ChapterPhysicalEquiv Element . . . . . . . . . . . . 97 7.2.206. ChapterTrack Element . . . . . . . . . . . . . . . . 98 7.2.207. ChapterTrackNumber Element . . . . . . . . . . . . . 98 7.2.208. ChapterDisplay Element . . . . . . . . . . . . . . . 98 7.2.209. ChapString Element . . . . . . . . . . . . . . . . . 99 7.2.210. ChapLanguage Element . . . . . . . . . . . . . . . . 99 7.2.211. ChapCountry Element . . . . . . . . . . . . . . . . 100 7.2.212. ChapProcess Element . . . . . . . . . . . . . . . . 100 7.2.213. ChapProcessCodecID Element . . . . . . . . . . . . . 100 7.2.214. ChapProcessPrivate Element . . . . . . . . . . . . . 101 7.2.215. ChapProcessCommand Element . . . . . . . . . . . . . 101 7.2.216. ChapProcessTime Element . . . . . . . . . . . . . . 101 7.2.217. ChapProcessData Element . . . . . . . . . . . . . . 102 7.2.218. Tags Element . . . . . . . . . . . . . . . . . . . . 102 7.2.219. Tag Element . . . . . . . . . . . . . . . . . . . . 103 7.2.220. Targets Element . . . . . . . . . . . . . . . . . . 103 7.2.221. TargetTypeValue Element . . . . . . . . . . . . . . 103 7.2.222. TargetType Element . . . . . . . . . . . . . . . . . 104 7.2.223. TagTrackUID Element . . . . . . . . . . . . . . . . 104 Lhomme, et al. Expires May 27, 2017 [Page 6] Internet-Draft Matroska November 2016 7.2.224. TagEditionUID Element . . . . . . . . . . . . . . . 104 7.2.225. TagChapterUID Element . . . . . . . . . . . . . . . 105 7.2.226. TagAttachmentUID Element . . . . . . . . . . . . . . 105 7.2.227. SimpleTag Element . . . . . . . . . . . . . . . . . 106 7.2.228. TagName Element . . . . . . . . . . . . . . . . . . 106 7.2.229. TagLanguage Element . . . . . . . . . . . . . . . . 106 7.2.230. TagDefault Element . . . . . . . . . . . . . . . . . 107 7.2.231. TagString Element . . . . . . . . . . . . . . . . . 107 7.2.232. TagBinary Element . . . . . . . . . . . . . . . . . 108 8. Beginning of File . . . . . . . . . . . . . . . . . . . . . . 108 9. Block Timecodes . . . . . . . . . . . . . . . . . . . . . . . 108 10. Default decoded field duration . . . . . . . . . . . . . . . 109 11. Default Values . . . . . . . . . . . . . . . . . . . . . . . 109 12. DRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 13. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 110 14. Image cropping . . . . . . . . . . . . . . . . . . . . . . . 110 15. Matroska version indicators . . . . . . . . . . . . . . . . . 110 16. Mime Types . . . . . . . . . . . . . . . . . . . . . . . . . 111 17. Octet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 18. Overlay Track . . . . . . . . . . . . . . . . . . . . . . . . 111 19. Position References . . . . . . . . . . . . . . . . . . . . . 111 20. Raw Timecode . . . . . . . . . . . . . . . . . . . . . . . . 112 21. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 112 21.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 112 21.2. Soft Linking . . . . . . . . . . . . . . . . . . . . . . 113 21.3. Medium Linking . . . . . . . . . . . . . . . . . . . . . 113 22. Timecode Types . . . . . . . . . . . . . . . . . . . . . . . 114 23. TimecodeScale . . . . . . . . . . . . . . . . . . . . . . . . 114 24. TimecodeScale Rounding . . . . . . . . . . . . . . . . . . . 114 25. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 116 25.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 116 25.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 116 26. TrackTimecodeScale . . . . . . . . . . . . . . . . . . . . . 117 27. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 118 28. Multi-planar and 3D videos . . . . . . . . . . . . . . . . . 119 29. Track Operation . . . . . . . . . . . . . . . . . . . . . . . 119 30. Matroska Element Ordering Guidelines . . . . . . . . . . . . 120 30.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 120 30.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 120 30.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 121 30.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 121 30.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 121 30.6. Chapters . . . . . . . . . . . . . . . . . . . . . . . . 121 30.7. Attachments . . . . . . . . . . . . . . . . . . . . . . 122 30.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 122 30.9. Optimum layout from a muxer . . . . . . . . . . . . . . 122 30.10. Optimum layout after editing tags . . . . . . . . . . . 122 30.11. Optimum layout with Cues at the front . . . . . . . . . 123 Lhomme, et al. Expires May 27, 2017 [Page 7] Internet-Draft Matroska November 2016 30.12. Cluster Timecode . . . . . . . . . . . . . . . . . . . . 123 31. CodecID . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 31.1. Video Codecs . . . . . . . . . . . . . . . . . . . . . . 124 31.2. Audio . . . . . . . . . . . . . . . . . . . . . . . . . 127 31.3. Subtitle . . . . . . . . . . . . . . . . . . . . . . . . 132 31.4. Buttons . . . . . . . . . . . . . . . . . . . . . . . . 133 31.5. Example 1 : basic chaptering . . . . . . . . . . . . . . 133 31.6. Example 2 : nested chapters . . . . . . . . . . . . . . 134 31.6.1. The Micronauts "Bleep To Bleep" . . . . . . . . . . 134 31.7. Edition and chapter flags . . . . . . . . . . . . . . . 135 31.7.1. Chapter flags . . . . . . . . . . . . . . . . . . . 135 31.7.2. Edition flags . . . . . . . . . . . . . . . . . . . 136 31.8. Menu features . . . . . . . . . . . . . . . . . . . . . 136 31.8.1. Matroska Script (0) . . . . . . . . . . . . . . . . 136 31.8.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . 136 32. Subtitles . . . . . . . . . . . . . . . . . . . . . . . . . . 138 33. Images Subtitles . . . . . . . . . . . . . . . . . . . . . . 139 34. SRT Subtitles . . . . . . . . . . . . . . . . . . . . . . . . 142 35. SSA/ASS Subtitles . . . . . . . . . . . . . . . . . . . . . . 142 36. USF Subtitles . . . . . . . . . . . . . . . . . . . . . . . . 145 37. WebVTT . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 37.1. Storage of WebVTT in Matroska . . . . . . . . . . . . . 146 37.1.1. CodecID: codec identification . . . . . . . . . . . 146 37.1.2. CodecPrivate: storage of gloal WebVTT blocks . . . . 146 37.1.3. Storage of non-global WebVTT blocks . . . . . . . . 146 37.1.4. Storage of Cues in Matroska blocks . . . . . . . . . 146 37.1.5. BlockAdditions: storing non-global WebVTT blocks, Cue Settings Lists and Cue identifiers . . . . . . . 146 37.2. Examples of transformation . . . . . . . . . . . . . . . 147 37.2.1. Example WebVTT file . . . . . . . . . . . . . . . . 147 37.2.2. CodecPrivate . . . . . . . . . . . . . . . . . . . . 147 37.2.3. Storage of Cue 1 . . . . . . . . . . . . . . . . . . 147 37.2.4. Storage of Cue 2 . . . . . . . . . . . . . . . . . . 147 37.2.5. Storage of Cue 3 . . . . . . . . . . . . . . . . . . 147 37.2.6. Storage of Cue 4 . . . . . . . . . . . . . . . . . . 148 37.3. Storage of WebVTT in Matroska vs. WebM . . . . . . . . . 148 38. Tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 38.1. Why official tags matter . . . . . . . . . . . . . . . . 148 38.2. Tag translations . . . . . . . . . . . . . . . . . . . . 149 38.3. Tag Formatting . . . . . . . . . . . . . . . . . . . . . 149 38.4. Target types . . . . . . . . . . . . . . . . . . . . . . 150 38.5. Official tags . . . . . . . . . . . . . . . . . . . . . 150 38.6. Notes . . . . . . . . . . . . . . . . . . . . . . . . . 150 39. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 151 39.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 151 39.2. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 151 39.3. Font files . . . . . . . . . . . . . . . . . . . . . . . 152 40. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 152 Lhomme, et al. Expires May 27, 2017 [Page 8] Internet-Draft Matroska November 2016 41. File Access . . . . . . . . . . . . . . . . . . . . . . . . . 152 42. Live Streaming . . . . . . . . . . . . . . . . . . . . . . . 152 43. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 153 44. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 153 45. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 153 45.1. Highlights/Hotspots . . . . . . . . . . . . . . . . . . 153 45.2. Playback features . . . . . . . . . . . . . . . . . . . 154 45.3. Player requirements . . . . . . . . . . . . . . . . . . 155 46. Working Graph . . . . . . . . . . . . . . . . . . . . . . . . 155 47. Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 48. Data Structure . . . . . . . . . . . . . . . . . . . . . . . 155 49.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 159 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. 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) Lhomme, et al. Expires May 27, 2017 [Page 9] Internet-Draft Matroska November 2016 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]. 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. Other security considerations are to be determined. 4. IANA Considerations To be determined. 5. Notations 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]. Lhomme, et al. Expires May 27, 2017 [Page 10] Internet-Draft Matroska November 2016 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 Constaints 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 "8" or less. 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 Language codes 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). Country codes are the same as used for internet domains [14]. 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 : Lhomme, et al. Expires May 27, 2017 [Page 11] Internet-Draft Matroska November 2016 +----------------------+--------------+-----------+-----------------+ | 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 Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets. 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 timecodes MAY NOT be consecutive. But a frame with a past timecode 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 timecode. It is used with different parts of a frame with different priorities. Lhomme, et al. Expires May 27, 2017 [Page 12] Internet-Draft Matroska November 2016 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 | Timecode (relative to Cluster timecode, 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.3.3. 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 May 27, 2017 [Page 13] Internet-Draft Matroska November 2016 +--------+--------+--------------------------+ | Offset | Player | Description | +--------+--------+--------------------------+ | 0x00 | MUST | Consecutive laced frames | +--------+--------+--------------------------+ 6.2.4. Lacing Lacing is a mechanism to save space when storing data. It is typically used for small blocks of data (refered to as frames in matroska). There are 3 types of lacing : the Xiph one inspired by what is found in the Ogg container, the EBML one which is the same with sizes coded differently and the fixed-size one where the size is not coded. As an example is better than words... Let's say you want 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, you can store them in a lace to save space. They will then be solved in the same block as follows: 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 : Lhomme, et al. Expires May 27, 2017 [Page 14] Internet-Draft Matroska November 2016 +----------------------------------+--------------------------------+ | 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) o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 400 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 Lhomme, et al. Expires May 27, 2017 [Page 15] Internet-Draft Matroska November 2016 o Data in frame 3 6.2.4.4. SimpleBlock Structure The SimpleBlock is very inspired by the [Block structure](({{site.baseurl}}/index.html#block-structure). The main differences are the added Keyframe flag and Discardable flag. Otherwise everything is the same. Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets. 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 timecodes MAY NOT be consecutive. But a frame with a past timecode 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 timecode. It is used with different parts of a frame with different priorities. 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 | Timecode (relative to Cluster timecode, signed | | | | int16) | +--------+--------+-------------------------------------------------+ 6.2.4.4.2. SimpleBlock Header Flags Lhomme, et al. Expires May 27, 2017 [Page 16] Internet-Draft Matroska November 2016 +--------+-----+--------+-------------------------------------------+ | 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 +--------+--------+--------------------------+ | Offset | Player | Description | +--------+--------+--------------------------+ | 0x00 | MUST | Consecutive laced frames | +--------+--------+--------------------------+ 6.2.4.6. EncryptedBlock Structure The EncryptedBlock is very inspired by the [SimpleBlock structure](({{site.baseurl}}/index.html#simpleblock_structure). The main differences is that the raw data are Transformed. That means the data after the lacing definition (if present) have been processed before put into the Block. The laced sizes apply on the decoded Lhomme, et al. Expires May 27, 2017 [Page 17] Internet-Draft Matroska November 2016 (Inverse Transform) data. This size of the Transformed data MAY NOT match the size of the initial chunk of data. The other difference is that the number of frames in the lace are not saved if "no lacing" is specified (bits 5 and 6 set to 0). The Transformation is specified by a TransformID in the Block (MUST be the same for all frames within the EncryptedBlock). Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets. 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 timecodes MAY NOT be consecutive. But a frame with a past timecode 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 timecode. It is used with different parts of a frame with different priorities. | EncryptedBlock 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 | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - | | Flags | | Bit | Player | Description | | 0 | - | Keyframe, set when the Block contains only keyframes | | 1-3 | - | Reserved, set to 0 | | 4 | - | Invisible, the codec SHOULD decode this frame but not display it | | 5-6 | MUST | Lacing o 00 : no lacing o 01 : Xiph lacing o 11 : EBML lacing o 10 : fixed-size lacing | | 7 | - | Discardable, the frames of the Block can be discarded during playing if needed | | | Lace (when lacing bit is set) | | 0x00 | MUST* | Number of frames in the lace-1 (uint8) _Only available if bit 5 or bit 6 of the EncryptedBlock flag is set to one. | | 0x01 / 0xXX | MUST_ | Lace- Lhomme, et al. Expires May 27, 2017 [Page 18] Internet-Draft Matroska November 2016 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). | | (possibly) Laced Data | | 0x00 | MUST | TransformID (EBML coded integer value). Value 0 = Null Transform | | 0x01+ | MUST | Consecutive laced frames | 6.2.4.7. Virtual Block The data in matroska is stored in coding order. But that means if you seek to a particular point and a frame has been referenced far away, you won't know while playing and you might miss this frame (true for independent frames and overlapping of dependent frames). So the idea is to have a placeholder for the original frame in the timecode (display) order. The structure is a scaled down version of the normal Block [15]. | Virtual 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 | Timecode (relative to Cluster timecode, signed int16) | | 0x03+ | - | | Flags | | Bit | Player | Description | | 7-0 | - | Reserved, set to 0 | | 7. 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. 7.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 May 27, 2017 [Page 19] Internet-Draft Matroska November 2016 +-----------+----------+--------------------------------------------+ | 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". | +-----------+----------+--------------------------------------------+ 7.2. Matroska Schema Here the definition of each Matroska Element is provided. % concatenate with Matroska EBML Schema converted to markdown % 7.2.1. Segment Element name: "Segment" path: "1*1(\Segment)" id: "0x18538067" minOccurs: "1" type: "master" 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. 7.2.2. SeekHead Element name: "SeekHead" path: "0*2(\Segment\SeekHead)" id: "0x114D9B74" maxOccurs: "2" type: "master" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 20] Internet-Draft Matroska November 2016 documentation: Contains the position of other Top-Level Elements. 7.2.3. Seek Element name: "Seek" path: "1*(\Segment\SeekHead\Seek)" id: "0x4DBB" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains a single seek entry to an EBML Element. 7.2.4. SeekID Element name: "SeekID" path: "1*1(\Segment\SeekHead\Seek\SeekID)" id: "0x53AB" minOccurs: "1" type: "binary" minver: "1" documentation: The binary ID corresponding to the Element name. 7.2.5. SeekPosition Element name: "SeekPosition" path: "1*1(\Segment\SeekHead\Seek\SeekPosition)" id: "0x53AC" minOccurs: "1" type: "uinteger" Lhomme, et al. Expires May 27, 2017 [Page 21] Internet-Draft Matroska November 2016 minver: "1" documentation: The position of the Element in the Segment in octets (0 = first level 1 Element). 7.2.6. Info Element name: "Info" path: "1*(\Segment\Info)" id: "0x1549A966" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" definition: Contains general information about the Segment. 7.2.7. SegmentUID Element name: "SegmentUID" path: "0*1(\Segment\Info\SegmentUID)" id: "0x73A4" 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. Lhomme, et al. Expires May 27, 2017 [Page 22] Internet-Draft Matroska November 2016 7.2.8. SegmentFilename Element name: "SegmentFilename" path: "0*1(\Segment\Info\SegmentFilename)" id: "0x7384" type: "utf-8" minver: "1" definition: A filename corresponding to this Segment. 7.2.9. PrevUID Element name: "PrevUID" path: "0*1(\Segment\Info\PrevUID)" id: "0x3CB923" 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. 7.2.10. PrevFilename Element name: "PrevFilename" path: "0*1(\Segment\Info\PrevFilename)" id: "0x3C83AB" type: "utf-8" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 23] Internet-Draft Matroska November 2016 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. 7.2.11. NextUID Element name: "NextUID" path: "0*1(\Segment\Info\NextUID)" id: "0x3EB923" 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. 7.2.12. NextFilename Element name: "NextFilename" path: "0*1(\Segment\Info\NextFilename)" id: "0x3E83BB" type: "utf-8" minver: "1" definition: A filename corresponding to the file of the next Linked Segment. usage notes: Provision of the next filename is for display convenience, but NextUID SHOULD be considered authoritative for identifying the Next Segment. Lhomme, et al. Expires May 27, 2017 [Page 24] Internet-Draft Matroska November 2016 7.2.13. SegmentFamily Element name: "SegmentFamily" path: "0*(\Segment\Info\SegmentFamily)" id: "0x4444" maxOccurs: "unbounded" 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. 7.2.14. ChapterTranslate Element name: "ChapterTranslate" path: "0*(\Segment\Info\ChapterTranslate)" id: "0x6924" maxOccurs: "unbounded" type: "master" minver: "1" documentation: A tuple of corresponding ID used by chapter codecs to represent this Segment. 7.2.15. ChapterTranslateEditionUID Element name: "ChapterTranslateEditionUID" path: "0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)" id: "0x69FC" maxOccurs: "unbounded" Lhomme, et al. Expires May 27, 2017 [Page 25] Internet-Draft Matroska November 2016 type: "uinteger" minver: "1" documentation: Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the Segment. 7.2.16. ChapterTranslateCodec Element name: "ChapterTranslateCodec" path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)" id: "0x69BF" minOccurs: "1" type: "uinteger" minver: "1" documentation: The chapter codec using this ID (0: Matroska Script, 1: DVD-menu). 7.2.17. ChapterTranslateID Element name: "ChapterTranslateID" path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)" id: "0x69A5" minOccurs: "1" type: "binary" minver: "1" documentation: The binary value used to represent this Segment in the chapter codec data. The format depends on the ChapProcessCodecID used. 7.2.18. TimecodeScale Element name: "TimecodeScale" path: "1*1(\Segment\Info\TimecodeScale)" Lhomme, et al. Expires May 27, 2017 [Page 26] Internet-Draft Matroska November 2016 id: "0x2AD7B1" minOccurs: "1" default: "1000000" type: "uinteger" minver: "1" documentation: Timestamp scale in nanoseconds (1.000.000 means all timestamps in the Segment are expressed in milliseconds). 7.2.19. Duration Element name: "Duration" path: "0*1(\Segment\Info\Duration)" id: "0x4489" range: "> 0x0p+0" type: "float" minver: "1" definition: Duration of the Segment in nanoseconds based on TimecodeScale. 7.2.20. DateUTC Element name: "DateUTC" path: "0*1(\Segment\Info\DateUTC)" id: "0x4461" type: "date" minver: "1" documentation: The date and time that the Segment was created by the muxing application or library. Lhomme, et al. Expires May 27, 2017 [Page 27] Internet-Draft Matroska November 2016 7.2.21. Title Element name: "Title" path: "0*1(\Segment\Info\Title)" id: "0x7BA9" type: "utf-8" minver: "1" documentation: General name of the Segment. 7.2.22. MuxingApp Element name: "MuxingApp" path: "1*1(\Segment\Info\MuxingApp)" id: "0x4D80" minOccurs: "1" type: "utf-8" minver: "1" 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. 7.2.23. WritingApp Element name: "WritingApp" path: "1*1(\Segment\Info\WritingApp)" id: "0x5741" minOccurs: "1" type: "utf-8" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 28] Internet-Draft Matroska November 2016 definition: Writing application (example: "mkvmerge-0.3.3"). usage notes: Include the full name of the application followed by the version number. 7.2.24. Cluster Element name: "Cluster" path: "0*(\Segment\Cluster)" id: "0x1F43B675" maxOccurs: "unbounded" type: "master" minver: "1" documentation: The Top-Level Element containing the (monolithic) Block structure. 7.2.25. Timecode Element name: "Timecode" path: "1*1(\Segment\Cluster\Timecode)" id: "0xE7" minOccurs: "1" type: "uinteger" minver: "1" documentation: Absolute timestamp of the cluster (based on TimecodeScale). 7.2.26. SilentTracks Element name: "SilentTracks" path: "0*1(\Segment\Cluster\SilentTracks)" id: "0x5854" type: "master" Lhomme, et al. Expires May 27, 2017 [Page 29] Internet-Draft Matroska November 2016 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. 7.2.27. SilentTrackNumber Element name: "SilentTrackNumber" path: "0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)" id: "0x58D7" maxOccurs: "unbounded" type: "uinteger" minver: "1" 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. 7.2.28. Position Element name: "Position" path: "0*1(\Segment\Cluster\Position)" id: "0xA7" type: "uinteger" minver: "1" documentation: The Position of the Cluster in the Segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams. 7.2.29. PrevSize Element name: "PrevSize" path: "0*1(\Segment\Cluster\PrevSize)" id: "0xAB" Lhomme, et al. Expires May 27, 2017 [Page 30] Internet-Draft Matroska November 2016 type: "uinteger" minver: "1" documentation: Size of the previous Cluster, in octets. Can be useful for backward playing. 7.2.30. SimpleBlock Element name: "SimpleBlock" path: "0*(\Segment\Cluster\SimpleBlock)" id: "0xA3" maxOccurs: "unbounded" type: "binary" 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) 7.2.31. BlockGroup Element name: "BlockGroup" path: "0*(\Segment\Cluster\BlockGroup)" id: "0xA0" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/ VirtualBlock. 7.2.32. Block Element name: "Block" path: "1*1(\Segment\Cluster\BlockGroup\Block)" Lhomme, et al. Expires May 27, 2017 [Page 31] Internet-Draft Matroska November 2016 id: "0xA1" minOccurs: "1" type: "binary" minver: "1" documentation: Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure) 7.2.33. BlockVirtual Element name: "BlockVirtual" path: "0*1(\Segment\Cluster\BlockGroup\BlockVirtual)" id: "0xA2" 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) 7.2.34. BlockAdditions Element name: "BlockAdditions" path: "0*1(\Segment\Cluster\BlockGroup\BlockAdditions)" id: "0x75A1" 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. Lhomme, et al. Expires May 27, 2017 [Page 32] Internet-Draft Matroska November 2016 7.2.35. BlockMore Element name: "BlockMore" path: "1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)" id: "0xA6" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contain the BlockAdditional and some parameters. 7.2.36. BlockAddID Element name: "BlockAddID" path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block AddID)" id: "0xEE" minOccurs: "1" range: "not 0" default: "1" type: "uinteger" minver: "1" documentation: An ID to identify the BlockAdditional level. 7.2.37. BlockAdditional Element name: "BlockAdditional" path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block Additional)" id: "0xA5" Lhomme, et al. Expires May 27, 2017 [Page 33] Internet-Draft Matroska November 2016 minOccurs: "1" type: "binary" minver: "1" documentation: Interpreted by the codec as it wishes (using the BlockAddID). 7.2.38. BlockDuration Element name: "BlockDuration" path: "0*1(\Segment\Cluster\BlockGroup\BlockDuration)" id: "0x9B" default: "DefaultDuration" type: "uinteger" minver: "1" documentation: The duration of the Block (based on TimecodeScale). This Element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the 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. When set to 0 that means the frame is not a keyframe. 7.2.39. ReferencePriority Element name: "ReferencePriority" path: "1*1(\Segment\Cluster\BlockGroup\ReferencePriority)" id: "0xFA" minOccurs: "1" default: "0" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 34] Internet-Draft Matroska November 2016 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. 7.2.40. ReferenceBlock Element name: "ReferenceBlock" path: "0*(\Segment\Cluster\BlockGroup\ReferenceBlock)" id: "0xFB" maxOccurs: "unbounded" 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. 7.2.41. ReferenceVirtual Element name: "ReferenceVirtual" path: "0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)" id: "0xFD" type: "integer" minver: "0" maxver: "0" documentation: Relative position of the data that would otherwise be in position of the virtual block. 7.2.42. CodecState Element name: "CodecState" path: "0*1(\Segment\Cluster\BlockGroup\CodecState)" id: "0xA4" type: "binary" Lhomme, et al. Expires May 27, 2017 [Page 35] Internet-Draft Matroska November 2016 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. 7.2.43. DiscardPadding Element name: "DiscardPadding" path: "0*1(\Segment\Cluster\BlockGroup\DiscardPadding)" id: "0x75A2" 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. 7.2.44. Slices Element name: "Slices" path: "0*1(\Segment\Cluster\BlockGroup\Slices)" id: "0x8E" type: "master" minver: "1" documentation: Contains slices description. 7.2.45. TimeSlice Element name: "TimeSlice" path: "0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)" id: "0xE8" maxOccurs: "unbounded" Lhomme, et al. Expires May 27, 2017 [Page 36] Internet-Draft Matroska November 2016 type: "master" minver: "1" documentation: Contains extra time information about the data contained in the Block. While there are a few files in the wild with this Element, it is no longer in use and has been deprecated. Being able to interpret this Element is not REQUIRED for playback. 7.2.46. LaceNumber Element name: "LaceNumber" path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)" id: "0xCC" default: "0" type: "uinteger" minver: "1" documentation: The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this Element, it is no longer in use and has been deprecated. Being able to interpret this Element is not REQUIRED for playback. 7.2.47. FrameNumber Element name: "FrameNumber" path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)" id: "0xCD" default: "0" type: "uinteger" minver: "0" maxver: "0" 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). Lhomme, et al. Expires May 27, 2017 [Page 37] Internet-Draft Matroska November 2016 7.2.48. BlockAdditionID Element name: "BlockAdditionID" path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)" id: "0xCB" default: "0" type: "uinteger" minver: "0" maxver: "0" documentation: The ID of the BlockAdditional Element (0 is the main Block). 7.2.49. Delay Element name: "Delay" path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)" id: "0xCE" default: "0" type: "uinteger" minver: "0" maxver: "0" documentation: The (scaled) delay to apply to the Element. 7.2.50. SliceDuration Element name: "SliceDuration" path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)" id: "0xCF" default: "0" Lhomme, et al. Expires May 27, 2017 [Page 38] Internet-Draft Matroska November 2016 type: "uinteger" minver: "0" maxver: "0" documentation: The (scaled) duration to apply to the Element. 7.2.51. ReferenceFrame Element name: "ReferenceFrame" path: "0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)" id: "0xC8" type: "master" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.52. ReferenceOffset Element name: "ReferenceOffset" path: "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)" id: "0xC9" minOccurs: "1" type: "uinteger" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.53. ReferenceTimeCode Element name: "ReferenceTimeCode" Lhomme, et al. Expires May 27, 2017 [Page 39] Internet-Draft Matroska November 2016 path: "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimeCode)" id: "0xCA" minOccurs: "1" type: "uinteger" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.54. EncryptedBlock Element name: "EncryptedBlock" path: "0*(\Segment\Cluster\EncryptedBlock)" id: "0xAF" maxOccurs: "unbounded" type: "binary" minver: "0" maxver: "0" documentation: Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed). (see EncryptedBlock Structure) 7.2.55. Tracks Element name: "Tracks" path: "0*(\Segment\Tracks)" id: "0x1654AE6B" maxOccurs: "unbounded" type: "master" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 40] Internet-Draft Matroska November 2016 documentation: A Top-Level Element of information with many tracks described. 7.2.56. TrackEntry Element name: "TrackEntry" path: "1*(\Segment\Tracks\TrackEntry)" id: "0xAE" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Describes a track with all Elements. 7.2.57. TrackNumber Element name: "TrackNumber" path: "1*1(\Segment\Tracks\TrackEntry\TrackNumber)" id: "0xD7" minOccurs: "1" range: "not 0" 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). 7.2.58. TrackUID Element name: "TrackUID" path: "1*1(\Segment\Tracks\TrackEntry\TrackUID)" id: "0x73C5" Lhomme, et al. Expires May 27, 2017 [Page 41] Internet-Draft Matroska November 2016 minOccurs: "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. 7.2.59. TrackType Element name: "TrackType" path: "1*1(\Segment\Tracks\TrackEntry\TrackType)" id: "0x83" minOccurs: "1" range: "1-254" type: "uinteger" minver: "1" documentation: A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control). 7.2.60. FlagEnabled Element name: "FlagEnabled" path: "1*1(\Segment\Tracks\TrackEntry\FlagEnabled)" id: "0xB9" minOccurs: "1" range: "0-1" default: "1" type: "uinteger" Lhomme, et al. Expires May 27, 2017 [Page 42] Internet-Draft Matroska November 2016 minver: "2" documentation: Set if the track is usable. (1 bit) 7.2.61. FlagDefault Element name: "FlagDefault" path: "1*1(\Segment\Tracks\TrackEntry\FlagDefault)" id: "0x88" minOccurs: "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) 7.2.62. FlagForced Element name: "FlagForced" path: "1*1(\Segment\Tracks\TrackEntry\FlagForced)" id: "0x55AA" minOccurs: "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) Lhomme, et al. Expires May 27, 2017 [Page 43] Internet-Draft Matroska November 2016 7.2.63. FlagLacing Element name: "FlagLacing" path: "1*1(\Segment\Tracks\TrackEntry\FlagLacing)" id: "0x9C" minOccurs: "1" range: "0-1" default: "1" type: "uinteger" minver: "1" documentation: Set if the track MAY contain blocks using lacing. (1 bit) 7.2.64. MinCache Element name: "MinCache" path: "1*1(\Segment\Tracks\TrackEntry\MinCache)" id: "0x6DE7" minOccurs: "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. 7.2.65. MaxCache Element name: "MaxCache" path: "0*1(\Segment\Tracks\TrackEntry\MaxCache)" id: "0x6DF8" Lhomme, et al. Expires May 27, 2017 [Page 44] Internet-Draft Matroska November 2016 type: "uinteger" minver: "1" documentation: The maximum cache size necessary to store referenced frames in and the current frame. 0 means no cache is needed. 7.2.66. DefaultDuration Element name: "DefaultDuration" path: "0*1(\Segment\Tracks\TrackEntry\DefaultDuration)" id: "0x23E383" range: "not 0" type: "uinteger" minver: "1" documentation: Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one Element put into a (Simple)Block). 7.2.67. DefaultDecodedFieldDuration Element name: "DefaultDecodedFieldDuration" path: "0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)" id: "0x234E7A" range: "not 0" type: "uinteger" minver: "4" documentation: The period in nanoseconds (not scaled by TimcodeScale) between two successive fields at the output of the decoding process (see the notes) 7.2.68. TrackTimecodeScale Element name: "TrackTimecodeScale" path: "1*1(\Segment\Tracks\TrackEntry\TrackTimecodeScale)" Lhomme, et al. Expires May 27, 2017 [Page 45] Internet-Draft Matroska November 2016 id: "0x23314F" minOccurs: "1" range: "> 0x0p+0" default: "0x1p+0" type: "float" minver: "0" maxver: "0" 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). 7.2.69. TrackOffset Element name: "TrackOffset" path: "0*1(\Segment\Tracks\TrackEntry\TrackOffset)" id: "0x537F" 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. 7.2.70. MaxBlockAdditionID Element name: "MaxBlockAdditionID" path: "1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)" id: "0x55EE" minOccurs: "1" default: "0" Lhomme, et al. Expires May 27, 2017 [Page 46] Internet-Draft Matroska November 2016 type: "uinteger" minver: "1" documentation: The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track. 7.2.71. Name Element name: "Name" path: "0*1(\Segment\Tracks\TrackEntry\Name)" id: "0x536E" type: "utf-8" minver: "1" documentation: A human-readable track name. 7.2.72. Language Element name: "Language" path: "0*1(\Segment\Tracks\TrackEntry\Language)" id: "0x22B59C" default: "eng" type: "string" minver: "1" documentation: Specifies the language of the track in the Matroska languages form. 7.2.73. CodecID Element name: "CodecID" path: "1*1(\Segment\Tracks\TrackEntry\CodecID)" id: "0x86" minOccurs: "1" Lhomme, et al. Expires May 27, 2017 [Page 47] Internet-Draft Matroska November 2016 type: "string" minver: "1" documentation: An ID corresponding to the codec, see the codec page for more info. 7.2.74. CodecPrivate Element name: "CodecPrivate" path: "0*1(\Segment\Tracks\TrackEntry\CodecPrivate)" id: "0x63A2" type: "binary" minver: "1" documentation: Private data only known to the codec. 7.2.75. CodecName Element name: "CodecName" path: "0*1(\Segment\Tracks\TrackEntry\CodecName)" id: "0x258688" type: "utf-8" minver: "1" documentation: A human-readable string specifying the codec. 7.2.76. AttachmentLink Element name: "AttachmentLink" path: "0*1(\Segment\Tracks\TrackEntry\AttachmentLink)" id: "0x7446" range: "not 0" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 48] Internet-Draft Matroska November 2016 documentation: The UID of an attachment that is used by this codec. 7.2.77. CodecSettings Element name: "CodecSettings" path: "0*1(\Segment\Tracks\TrackEntry\CodecSettings)" id: "0x3A9697" type: "utf-8" minver: "0" maxver: "0" documentation: A string describing the encoding setting used. 7.2.78. CodecInfoURL Element name: "CodecInfoURL" path: "0*(\Segment\Tracks\TrackEntry\CodecInfoURL)" id: "0x3B4040" maxOccurs: "unbounded" type: "string" minver: "0" maxver: "0" documentation: A URL to find information about the codec used. 7.2.79. CodecDownloadURL Element name: "CodecDownloadURL" path: "0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)" id: "0x26B240" maxOccurs: "unbounded" type: "string" Lhomme, et al. Expires May 27, 2017 [Page 49] Internet-Draft Matroska November 2016 minver: "0" maxver: "0" documentation: A URL to download about the codec used. 7.2.80. CodecDecodeAll Element name: "CodecDecodeAll" path: "1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)" id: "0xAA" minOccurs: "1" range: "0-1" default: "1" type: "uinteger" minver: "2" documentation: The codec can decode potentially damaged data (1 bit). 7.2.81. TrackOverlay Element name: "TrackOverlay" path: "0*(\Segment\Tracks\TrackEntry\TrackOverlay)" id: "0x6FAB" maxOccurs: "unbounded" 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. Lhomme, et al. Expires May 27, 2017 [Page 50] Internet-Draft Matroska November 2016 7.2.82. CodecDelay Element name: "CodecDelay" path: "0*1(\Segment\Tracks\TrackEntry\CodecDelay)" id: "0x56AA" 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. 7.2.83. SeekPreRoll Element name: "SeekPreRoll" path: "1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)" id: "0x56BB" minOccurs: "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. 7.2.84. TrackTranslate Element name: "TrackTranslate" path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate)" id: "0x6624" maxOccurs: "unbounded" Lhomme, et al. Expires May 27, 2017 [Page 51] Internet-Draft Matroska November 2016 type: "master" minver: "1" documentation: The track identification for the given Chapter Codec. 7.2.85. TrackTranslateEditionUID Element name: "TrackTranslateEditionUID" path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEdi tionUID)" id: "0x66FC" maxOccurs: "unbounded" 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. 7.2.86. TrackTranslateCodec Element name: "TrackTranslateCodec" path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)" id: "0x66BF" minOccurs: "1" type: "uinteger" minver: "1" documentation: The chapter codec using this ID (0: Matroska Script, 1: DVD-menu). 7.2.87. TrackTranslateTrackID Element name: "TrackTranslateTrackID" Lhomme, et al. Expires May 27, 2017 [Page 52] Internet-Draft Matroska November 2016 path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTr ackID)" id: "0x66A5" minOccurs: "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. 7.2.88. Video Element name: "Video" path: "0*1(\Segment\Tracks\TrackEntry\Video)" id: "0xE0" type: "master" minver: "1" documentation: Video settings. 7.2.89. FlagInterlaced Element name: "FlagInterlaced" path: "1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)" id: "0x9A" minOccurs: "1" range: "0-2" default: "0" type: "uinteger" minver: "2" Lhomme, et al. Expires May 27, 2017 [Page 53] Internet-Draft Matroska November 2016 documentation: A flag to declare is the video is known to be progressive or interlaced and if applicable to declare details about the interlacement. (0: undetermined, 1: interlaced, 2: progressive) 7.2.90. FieldOrder Element name: "FieldOrder" path: "1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)" id: "0x9D" minOccurs: "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. (0: Progressive, 1: Interlaced with top field display first and top field stored first, 2: Undetermined field order, 6: Interlaced with bottom field displayed first and bottom field stored first, 9: Interlaced with bottom field displayed first and top field stored first, 14: Interlaced with top field displayed first and bottom field stored first) 7.2.91. StereoMode Element name: "StereoMode" path: "0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)" id: "0x53B8" default: "0" type: "uinteger" minver: "3" documentation: Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard Lhomme, et al. Expires May 27, 2017 [Page 54] Internet-Draft Matroska November 2016 (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes. 7.2.92. AlphaMode Element name: "AlphaMode" path: "0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)" id: "0x53C0" default: "0" type: "uinteger" minver: "3" documentation: Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain Alpha data. 7.2.93. OldStereoMode Element name: "OldStereoMode" path: "0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)" id: "0x53B9" type: "uinteger" maxver: "0" documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes). 7.2.94. PixelWidth Element name: "PixelWidth" path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)" id: "0xB0" Lhomme, et al. Expires May 27, 2017 [Page 55] Internet-Draft Matroska November 2016 minOccurs: "1" range: "not 0" type: "uinteger" minver: "1" documentation: Width of the encoded video frames in pixels. 7.2.95. PixelHeight Element name: "PixelHeight" path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)" id: "0xBA" minOccurs: "1" range: "not 0" type: "uinteger" minver: "1" documentation: Height of the encoded video frames in pixels. 7.2.96. PixelCropBottom Element name: "PixelCropBottom" path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)" id: "0x54AA" default: "0" type: "uinteger" minver: "1" documentation: The number of video pixels to remove at the bottom of the image (for HDTV content). Lhomme, et al. Expires May 27, 2017 [Page 56] Internet-Draft Matroska November 2016 7.2.97. PixelCropTop Element name: "PixelCropTop" path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)" id: "0x54BB" default: "0" type: "uinteger" minver: "1" documentation: The number of video pixels to remove at the top of the image. 7.2.98. PixelCropLeft Element name: "PixelCropLeft" path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)" id: "0x54CC" default: "0" type: "uinteger" minver: "1" documentation: The number of video pixels to remove on the left of the image. 7.2.99. PixelCropRight Element name: "PixelCropRight" path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)" id: "0x54DD" default: "0" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 57] Internet-Draft Matroska November 2016 documentation: The number of video pixels to remove on the right of the image. 7.2.100. DisplayWidth Element name: "DisplayWidth" path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)" id: "0x54B0" 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. 7.2.101. DisplayHeight Element name: "DisplayHeight" path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)" id: "0x54BA" 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. 7.2.102. DisplayUnit Element name: "DisplayUnit" path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)" Lhomme, et al. Expires May 27, 2017 [Page 58] Internet-Draft Matroska November 2016 id: "0x54B2" default: "0" type: "uinteger" minver: "1" documentation: How DisplayWidth & DisplayHeight are interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio, 4: Unknown). 7.2.103. AspectRatioType Element name: "AspectRatioType" path: "0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)" id: "0x54B3" default: "0" type: "uinteger" minver: "1" documentation: Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed). 7.2.104. ColourSpace Element name: "ColourSpace" path: "0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)" id: "0x2EB524" size: "4" type: "binary" minver: "1" documentation: Same value as in AVI (32 bits). Lhomme, et al. Expires May 27, 2017 [Page 59] Internet-Draft Matroska November 2016 7.2.105. GammaValue Element name: "GammaValue" path: "0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)" id: "0x2FB523" range: "> 0x0p+0" type: "float" minver: "0" maxver: "0" documentation: Gamma Value. 7.2.106. FrameRate Element name: "FrameRate" path: "0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)" id: "0x2383E3" range: "> 0x0p+0" type: "float" minver: "0" maxver: "0" documentation: Number of frames per second. Informational only. 7.2.107. Colour Element name: "Colour" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour)" id: "0x55B0" type: "master" minver: "4" Lhomme, et al. Expires May 27, 2017 [Page 60] Internet-Draft Matroska November 2016 documentation: Settings describing the colour format. 7.2.108. MatrixCoefficients Element name: "MatrixCoefficients" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)" id: "0x55B1" default: "2" type: "uinteger" minver: "4" documentation: The Matrix Coefficients of the video used to derive luma and chroma values from reg, 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. (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) 7.2.109. BitsPerChannel Element name: "BitsPerChannel" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)" id: "0x55B2" default: "0" type: "uinteger" minver: "4" documentation: Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified. 7.2.110. ChromaSubsamplingHorz Element name: "ChromaSubsamplingHorz" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)" Lhomme, et al. Expires May 27, 2017 [Page 61] Internet-Draft Matroska November 2016 id: "0x55B3" 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. 7.2.111. ChromaSubsamplingVert Element name: "ChromaSubsamplingVert" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)" id: "0x55B4" 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. 7.2.112. CbSubsamplingHorz Element name: "CbSubsamplingHorz" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)" id: "0x55B5" type: "uinteger" minver: "4" 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. Lhomme, et al. Expires May 27, 2017 [Page 62] Internet-Draft Matroska November 2016 7.2.113. CbSubsamplingVert Element name: "CbSubsamplingVert" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)" id: "0x55B6" 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. 7.2.114. ChromaSitingHorz Element name: "ChromaSitingHorz" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)" id: "0x55B7" default: "0" type: "uinteger" minver: "4" documentation: How chroma is subsampled horizontally. (0: Unspecified, 1: Left Collocated, 2: Half) 7.2.115. ChromaSitingVert Element name: "ChromaSitingVert" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)" id: "0x55B8" default: "0" type: "uinteger" minver: "4" Lhomme, et al. Expires May 27, 2017 [Page 63] Internet-Draft Matroska November 2016 documentation: How chroma is subsampled vertically. (0: Unspecified, 1: Top Collocated, 2: Half) 7.2.116. Range Element name: "Range" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)" id: "0x55B9" default: "0" type: "uinteger" minver: "4" documentation: Clipping of the color ranges. (0: Unspecified, 1: Broadcast Range, 2: Full range (no clipping), 3: Defined by MatrixCoefficients/TransferCharacteristics) 7.2.117. TransferCharacteristics Element name: "TransferCharacteristics" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteri stics)" id: "0x55BA" 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. (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)) Lhomme, et al. Expires May 27, 2017 [Page 64] Internet-Draft Matroska November 2016 7.2.118. Primaries Element name: "Primaries" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)" id: "0x55BB" 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. (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) 7.2.119. MaxCLL Element name: "MaxCLL" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)" id: "0x55BC" type: "uinteger" minver: "4" documentation: Maximum brightness of a single pixel (Maximum Content Light Level) in candelas per square meter (cd/m^2). 7.2.120. MaxFALL Element name: "MaxFALL" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)" id: "0x55BD" type: "uinteger" minver: "4" Lhomme, et al. Expires May 27, 2017 [Page 65] Internet-Draft Matroska November 2016 documentation: Maximum brightness of a single full frame (Maximum Frame-Average Light Level) in candelas per square meter (cd/m^2). 7.2.121. MasteringMetadata Element name: "MasteringMetadata" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)" id: "0x55D0" type: "master" minver: "4" documentation: SMPTE 2086 mastering data. 7.2.122. PrimaryRChromaticityX Element name: "PrimaryRChromaticityX" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryRChromaticityX)" id: "0x55D1" range: "0-1" type: "float" minver: "4" documentation: Red X chromaticity coordinate as defined by CIE 1931. 7.2.123. PrimaryRChromaticityY Element name: "PrimaryRChromaticityY" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryRChromaticityY)" id: "0x55D2" range: "0-1" type: "float" Lhomme, et al. Expires May 27, 2017 [Page 66] Internet-Draft Matroska November 2016 minver: "4" documentation: Red Y chromaticity coordinate as defined by CIE 1931. 7.2.124. PrimaryGChromaticityX Element name: "PrimaryGChromaticityX" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryGChromaticityX)" id: "0x55D3" range: "0-1" type: "float" minver: "4" documentation: Green X chromaticity coordinate as defined by CIE 1931. 7.2.125. PrimaryGChromaticityY Element name: "PrimaryGChromaticityY" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryGChromaticityY)" id: "0x55D4" range: "0-1" type: "float" minver: "4" documentation: Green Y chromaticity coordinate as defined by CIE 1931. 7.2.126. PrimaryBChromaticityX Element name: "PrimaryBChromaticityX" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryBChromaticityX)" id: "0x55D5" Lhomme, et al. Expires May 27, 2017 [Page 67] Internet-Draft Matroska November 2016 range: "0-1" type: "float" minver: "4" documentation: Blue X chromaticity coordinate as defined by CIE 1931. 7.2.127. PrimaryBChromaticityY Element name: "PrimaryBChromaticityY" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\PrimaryBChromaticityY)" id: "0x55D6" range: "0-1" type: "float" minver: "4" documentation: Blue Y chromaticity coordinate as defined by CIE 1931. 7.2.128. WhitePointChromaticityX Element name: "WhitePointChromaticityX" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\WhitePointChromaticityX)" id: "0x55D7" range: "0-1" type: "float" minver: "4" documentation: White X chromaticity coordinate as defined by CIE 1931. 7.2.129. WhitePointChromaticityY Element name: "WhitePointChromaticityY" Lhomme, et al. Expires May 27, 2017 [Page 68] Internet-Draft Matroska November 2016 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\WhitePointChromaticityY)" id: "0x55D8" range: "0-1" type: "float" minver: "4" documentation: White Y chromaticity coordinate as defined by CIE 1931. 7.2.130. LuminanceMax Element name: "LuminanceMax" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\LuminanceMax)" id: "0x55D9" range: "0-9999.99" type: "float" minver: "4" documentation: Maximum luminance. Represented in candelas per square meter (cd/m^2). 7.2.131. LuminanceMin Element name: "LuminanceMin" path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\PrimaryRChromatici tyX\LuminanceMin)" id: "0x55DA" range: "0-999.9999" type: "float" minver: "4" Lhomme, et al. Expires May 27, 2017 [Page 69] Internet-Draft Matroska November 2016 documentation: Mininum luminance. Represented in candelas per square meter (cd/m^2). 7.2.132. Audio Element name: "Audio" path: "0*1(\Segment\Tracks\TrackEntry\Audio)" id: "0xE1" type: "master" minver: "1" documentation: Audio settings. 7.2.133. SamplingFrequency Element name: "SamplingFrequency" path: "1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)" id: "0xB5" minOccurs: "1" range: "> 0x0p+0" default: "0x1.f4p+12" type: "float" minver: "1" documentation: Sampling frequency in Hz. 7.2.134. OutputSamplingFrequency Element name: "OutputSamplingFrequency" path: "0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)" id: "0x78B5" range: "> 0x0p+0" default: "SamplingFrequency" Lhomme, et al. Expires May 27, 2017 [Page 70] Internet-Draft Matroska November 2016 type: "float" minver: "1" documentation: Real output sampling frequency in Hz (used for SBR techniques). 7.2.135. Channels Element name: "Channels" path: "1*1(\Segment\Tracks\TrackEntry\Audio\Channels)" id: "0x9F" minOccurs: "1" range: "not 0" default: "1" type: "uinteger" minver: "1" documentation: Numbers of channels in the track. 7.2.136. ChannelPositions Element name: "ChannelPositions" path: "0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)" id: "0x7D7B" type: "binary" minver: "0" maxver: "0" documentation: Table of horizontal angles for each successive channel, see appendix. Lhomme, et al. Expires May 27, 2017 [Page 71] Internet-Draft Matroska November 2016 7.2.137. BitDepth Element name: "BitDepth" path: "0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)" id: "0x6264" range: "not 0" type: "uinteger" minver: "1" documentation: Bits per sample, mostly used for PCM. 7.2.138. TrackOperation Element name: "TrackOperation" path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation)" id: "0xE2" 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. 7.2.139. TrackCombinePlanes Element name: "TrackCombinePlanes" path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)" id: "0xE3" 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 May 27, 2017 [Page 72] Internet-Draft Matroska November 2016 7.2.140. TrackPlane Element name: "TrackPlane" path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlane s\TrackPlane)" id: "0xE4" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "3" documentation: Contains a video plane track that need to be combined to create this 3D track 7.2.141. TrackPlaneUID Element name: "TrackPlaneUID" path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan es\TrackPlane\TrackPlaneUID)" id: "0xE5" minOccurs: "1" range: "not 0" type: "uinteger" minver: "3" documentation: The trackUID number of the track representing the plane. 7.2.142. TrackPlaneType Element name: "TrackPlaneType" path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan es\TrackPlane\TrackPlaneType)" id: "0xE6" Lhomme, et al. Expires May 27, 2017 [Page 73] Internet-Draft Matroska November 2016 minOccurs: "1" type: "uinteger" minver: "3" documentation: The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background). 7.2.143. TrackJoinBlocks Element name: "TrackJoinBlocks" path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)" id: "0xE9" type: "master" minver: "3" documentation: Contains the list of all tracks whose Blocks need to be combined to create this virtual track 7.2.144. TrackJoinUID Element name: "TrackJoinUID" path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\T rackJoinUID)" id: "0xED" minOccurs: "1" maxOccurs: "unbounded" range: "not 0" type: "uinteger" minver: "3" documentation: The trackUID number of a track whose blocks are used to create this virtual track. Lhomme, et al. Expires May 27, 2017 [Page 74] Internet-Draft Matroska November 2016 7.2.145. TrickTrackUID Element name: "TrickTrackUID" path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)" id: "0xC0" type: "uinteger" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.146. TrickTrackSegmentUID Element name: "TrickTrackSegmentUID" path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)" id: "0xC1" size: "16" type: "binary" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.147. TrickTrackFlag Element name: "TrickTrackFlag" path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)" id: "0xC6" default: "0" type: "uinteger" minver: "0" Lhomme, et al. Expires May 27, 2017 [Page 75] Internet-Draft Matroska November 2016 maxver: "0" documentation: DivX trick track extenstions 7.2.148. TrickMasterTrackUID Element name: "TrickMasterTrackUID" path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)" id: "0xC7" type: "uinteger" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.149. TrickMasterTrackSegmentUID Element name: "TrickMasterTrackSegmentUID" path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)" id: "0xC4" size: "16" type: "binary" minver: "0" maxver: "0" documentation: DivX trick track extenstions 7.2.150. ContentEncodings Element name: "ContentEncodings" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings)" id: "0x6D80" type: "master" Lhomme, et al. Expires May 27, 2017 [Page 76] Internet-Draft Matroska November 2016 minver: "1" documentation: Settings for several content encoding mechanisms like compression or encryption. 7.2.151. ContentEncoding Element name: "ContentEncoding" path: "1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)" id: "0x6240" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Settings for one content encoding like compression or encryption. 7.2.152. ContentEncodingOrder Element name: "ContentEncodingOrder" path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncodingOrder)" id: "0x5031" minOccurs: "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. Lhomme, et al. Expires May 27, 2017 [Page 77] Internet-Draft Matroska November 2016 7.2.153. ContentEncodingScope Element name: "ContentEncodingScope" path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncodingScope)" id: "0x5032" minOccurs: "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 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) 7.2.154. ContentEncodingType Element name: "ContentEncodingType" path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncodingType)" id: "0x5033" minOccurs: "1" default: "0" type: "uinteger" minver: "1" documentation: A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption Lhomme, et al. Expires May 27, 2017 [Page 78] Internet-Draft Matroska November 2016 7.2.155. ContentCompression Element name: "ContentCompression" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentCompression)" id: "0x5034" 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. 7.2.156. ContentCompAlgo Element name: "ContentCompAlgo" path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentCompression\ContentCompAlgo)" id: "0x4254" minOccurs: "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 7.2.157. ContentCompSettings Element name: "ContentCompSettings" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentCompression\ContentCompSettings)" id: "0x4255" Lhomme, et al. Expires May 27, 2017 [Page 79] Internet-Draft Matroska November 2016 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. 7.2.158. ContentEncryption Element name: "ContentEncryption" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption)" id: "0x5035" 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. 7.2.159. ContentEncAlgo Element name: "ContentEncAlgo" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentEncAlgo)" id: "0x47E1" 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 Lhomme, et al. Expires May 27, 2017 [Page 80] Internet-Draft Matroska November 2016 7.2.160. ContentEncKeyID Element name: "ContentEncKeyID" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentEncKeyID)" id: "0x47E2" type: "binary" minver: "1" documentation: For public key algorithms this is the ID of the public key the the data was encrypted with. 7.2.161. ContentSignature Element name: "ContentSignature" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentSignature)" id: "0x47E3" type: "binary" minver: "1" documentation: A cryptographic signature of the contents. 7.2.162. ContentSigKeyID Element name: "ContentSigKeyID" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentSigKeyID)" id: "0x47E4" type: "binary" minver: "1" documentation: This is the ID of the private key the data was signed with. Lhomme, et al. Expires May 27, 2017 [Page 81] Internet-Draft Matroska November 2016 7.2.163. ContentSigAlgo Element name: "ContentSigAlgo" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentSigAlgo)" id: "0x47E5" 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 7.2.164. ContentSigHashAlgo Element name: "ContentSigHashAlgo" path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin g\ContentEncryption\ContentSigHashAlgo)" id: "0x47E6" 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 7.2.165. Cues Element name: "Cues" path: "0*1(\Segment\Cues)" id: "0x1C53BB6B" type: "master" Lhomme, et al. Expires May 27, 2017 [Page 82] Internet-Draft Matroska November 2016 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. 7.2.166. CuePoint Element name: "CuePoint" path: "1*(\Segment\Cues\CuePoint)" id: "0xBB" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains all information relative to a seek point in the Segment. 7.2.167. CueTime Element name: "CueTime" path: "1*1(\Segment\Cues\CuePoint\CueTime)" id: "0xB3" minOccurs: "1" type: "uinteger" minver: "1" documentation: Absolute timestamp according to the Segment time base. 7.2.168. CueTrackPositions Element name: "CueTrackPositions" path: "1*(\Segment\Cues\CuePoint\CueTrackPositions)" id: "0xB7" Lhomme, et al. Expires May 27, 2017 [Page 83] Internet-Draft Matroska November 2016 minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contain positions for different tracks corresponding to the timestamp. 7.2.169. CueTrack Element name: "CueTrack" path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)" id: "0xF7" minOccurs: "1" range: "not 0" type: "uinteger" minver: "1" documentation: The track for which a position is given. 7.2.170. CueClusterPosition Element name: "CueClusterPosition" path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)" id: "0xF1" minOccurs: "1" type: "uinteger" minver: "1" documentation: The position of the Cluster containing the associated Block. Lhomme, et al. Expires May 27, 2017 [Page 84] Internet-Draft Matroska November 2016 7.2.171. CueRelativePosition Element name: "CueRelativePosition" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)" id: "0xF0" type: "uinteger" minver: "4" documentation: The relative position of the referenced block inside the cluster with 0 being the first possible position for an Element inside that cluster. 7.2.172. CueDuration Element name: "CueDuration" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)" id: "0xB2" 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. 7.2.173. CueBlockNumber Element name: "CueBlockNumber" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)" id: "0x5378" range: "not 0" default: "1" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 85] Internet-Draft Matroska November 2016 documentation: Number of the Block in the specified Cluster. 7.2.174. CueCodecState Element name: "CueCodecState" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)" id: "0xEA" default: "0" type: "uinteger" minver: "2" documentation: The position of the Codec State corresponding to this Cue Element. 0 means that the data is taken from the initial Track Entry. 7.2.175. CueReference Element name: "CueReference" path: "0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)" id: "0xDB" maxOccurs: "unbounded" type: "master" minver: "2" documentation: The Clusters containing the referenced Blocks. 7.2.176. CueRefTime Element name: "CueRefTime" path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR efTime)" id: "0x96" minOccurs: "1" type: "uinteger" Lhomme, et al. Expires May 27, 2017 [Page 86] Internet-Draft Matroska November 2016 minver: "2" documentation: Timestamp of the referenced Block. 7.2.177. CueRefCluster Element name: "CueRefCluster" path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR efCluster)" id: "0x97" minOccurs: "1" type: "uinteger" minver: "0" maxver: "0" documentation: The Position of the Cluster containing the referenced Block. 7.2.178. CueRefNumber Element name: "CueRefNumber" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR efNumber)" id: "0x535F" range: "not 0" default: "1" type: "uinteger" minver: "0" maxver: "0" documentation: Number of the referenced Block of Track X in the specified Cluster. Lhomme, et al. Expires May 27, 2017 [Page 87] Internet-Draft Matroska November 2016 7.2.179. CueRefCodecState Element name: "CueRefCodecState" path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR efCodecState)" id: "0xEB" default: "0" type: "uinteger" minver: "0" maxver: "0" documentation: The position of the Codec State corresponding to this referenced Element. 0 means that the data is taken from the initial Track Entry. 7.2.180. Attachments Element name: "Attachments" path: "0*1(\Segment\Attachments)" id: "0x1941A469" type: "master" minver: "1" documentation: Contain attached files. 7.2.181. AttachedFile Element name: "AttachedFile" path: "1*(\Segment\Attachments\AttachedFile)" id: "0x61A7" minOccurs: "1" maxOccurs: "unbounded" type: "master" Lhomme, et al. Expires May 27, 2017 [Page 88] Internet-Draft Matroska November 2016 minver: "1" documentation: An attached file. 7.2.182. FileDescription Element name: "FileDescription" path: "0*1(\Segment\Attachments\AttachedFile\FileDescription)" id: "0x467E" type: "utf-8" minver: "1" documentation: A human-friendly name for the attached file. 7.2.183. FileName Element name: "FileName" path: "1*1(\Segment\Attachments\AttachedFile\FileName)" id: "0x466E" minOccurs: "1" type: "utf-8" minver: "1" documentation: Filename of the attached file. 7.2.184. FileMimeType Element name: "FileMimeType" path: "1*1(\Segment\Attachments\AttachedFile\FileMimeType)" id: "0x4660" minOccurs: "1" type: "string" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 89] Internet-Draft Matroska November 2016 documentation: MIME type of the file. 7.2.185. FileData Element name: "FileData" path: "1*1(\Segment\Attachments\AttachedFile\FileData)" id: "0x465C" minOccurs: "1" type: "binary" minver: "1" documentation: The data of the file. 7.2.186. FileUID Element name: "FileUID" path: "1*1(\Segment\Attachments\AttachedFile\FileUID)" id: "0x46AE" minOccurs: "1" range: "not 0" type: "uinteger" minver: "1" documentation: Unique ID representing the file, as random as possible. 7.2.187. FileReferral Element name: "FileReferral" path: "0*1(\Segment\Attachments\AttachedFile\FileReferral)" id: "0x4675" type: "binary" minver: "0" Lhomme, et al. Expires May 27, 2017 [Page 90] Internet-Draft Matroska November 2016 maxver: "0" documentation: A binary value that a track/codec can refer to when the attachment is needed. 7.2.188. FileUsedStartTime Element name: "FileUsedStartTime" path: "0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)" id: "0x4661" type: "uinteger" minver: "0" maxver: "0" documentation: DivX font extension 7.2.189. FileUsedEndTime Element name: "FileUsedEndTime" path: "0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)" id: "0x4662" type: "uinteger" minver: "0" maxver: "0" documentation: DivX font extension 7.2.190. Chapters Element name: "Chapters" path: "0*1(\Segment\Chapters)" id: "0x1043A770" type: "master" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 91] Internet-Draft Matroska November 2016 documentation: A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation. 7.2.191. EditionEntry Element name: "EditionEntry" path: "1*(\Segment\Chapters\EditionEntry)" id: "0x45B9" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains all information about a Segment edition. 7.2.192. EditionUID Element name: "EditionUID" path: "0*1(\Segment\Chapters\EditionEntry\EditionUID)" id: "0x45BC" range: "not 0" type: "uinteger" minver: "1" documentation: A unique ID to identify the edition. It's useful for tagging an edition. 7.2.193. EditionFlagHidden Element name: "EditionFlagHidden" path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)" id: "0x45BD" minOccurs: "1" Lhomme, et al. Expires May 27, 2017 [Page 92] Internet-Draft Matroska November 2016 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) 7.2.194. EditionFlagDefault Element name: "EditionFlagDefault" path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)" id: "0x45DB" minOccurs: "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) 7.2.195. EditionFlagOrdered Element name: "EditionFlagOrdered" path: "0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)" id: "0x45DD" range: "0-1" default: "0" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 93] Internet-Draft Matroska November 2016 documentation: Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit) 7.2.196. ChapterAtom Element name: "ChapterAtom" path: "1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))" id: "0xB6" minOccurs: "1" maxOccurs: "unbounded" type: "master" recursive: "1" minver: "1" documentation: Contains the atom information to use as the chapter atom (apply to all tracks). 7.2.197. ChapterUID Element name: "ChapterUID" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)" id: "0x73C4" minOccurs: "1" range: "not 0" type: "uinteger" minver: "1" documentation: A unique ID to identify the Chapter. 7.2.198. ChapterStringUID Element name: "ChapterStringUID" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)" Lhomme, et al. Expires May 27, 2017 [Page 94] Internet-Draft Matroska November 2016 id: "0x5654" type: "utf-8" minver: "3" documentation: A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage. 7.2.199. ChapterTimeStart Element name: "ChapterTimeStart" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)" id: "0x91" minOccurs: "1" type: "uinteger" minver: "1" documentation: Timestamp of the start of Chapter (not scaled). 7.2.200. ChapterTimeEnd Element name: "ChapterTimeEnd" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)" id: "0x92" type: "uinteger" minver: "1" documentation: Timestamp of the end of Chapter (timestamp excluded, not scaled). 7.2.201. ChapterFlagHidden Element name: "ChapterFlagHidden" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)" Lhomme, et al. Expires May 27, 2017 [Page 95] Internet-Draft Matroska November 2016 id: "0x98" minOccurs: "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) 7.2.202. ChapterFlagEnabled Element name: "ChapterFlagEnabled" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)" id: "0x4598" minOccurs: "1" range: "0-1" default: "1" type: "uinteger" minver: "1" documentation: Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie SHOULD skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit) 7.2.203. ChapterSegmentUID Element name: "ChapterSegmentUID" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)" id: "0x6E67" Lhomme, et al. Expires May 27, 2017 [Page 96] Internet-Draft Matroska November 2016 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. 7.2.204. ChapterSegmentEditionUID Element name: "ChapterSegmentEditionUID" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentE ditionUID)" id: "0x6EBC" 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. 7.2.205. ChapterPhysicalEquiv Element name: "ChapterPhysicalEquiv" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysical Equiv)" id: "0x63C3" type: "uinteger" minver: "1" documentation: Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values. Lhomme, et al. Expires May 27, 2017 [Page 97] Internet-Draft Matroska November 2016 7.2.206. ChapterTrack Element name: "ChapterTrack" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)" id: "0x8F" type: "master" minver: "1" documentation: List of tracks on which the chapter applies. If this Element is not present, all tracks apply 7.2.207. ChapterTrackNumber Element name: "ChapterTrackNumber" path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\Cha pterTrackNumber)" id: "0x89" minOccurs: "1" maxOccurs: "unbounded" range: "not 0" 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. 7.2.208. ChapterDisplay Element name: "ChapterDisplay" path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)" id: "0x80" Lhomme, et al. Expires May 27, 2017 [Page 98] Internet-Draft Matroska November 2016 maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains all possible strings to use for the chapter display. 7.2.209. ChapString Element name: "ChapString" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ ChapString)" id: "0x85" minOccurs: "1" type: "utf-8" minver: "1" documentation: Contains the string to use as the chapter atom. 7.2.210. ChapLanguage Element name: "ChapLanguage" path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C hapLanguage)" id: "0x437C" minOccurs: "1" maxOccurs: "unbounded" default: "eng" type: "string" minver: "1" documentation: The languages corresponding to the string, in the bibliographic ISO-639-2 form. Lhomme, et al. Expires May 27, 2017 [Page 99] Internet-Draft Matroska November 2016 7.2.211. ChapCountry Element name: "ChapCountry" path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C hapCountry)" id: "0x437E" maxOccurs: "unbounded" type: "string" minver: "1" documentation: The countries corresponding to the string, same 2 octets as in Internet domains. 7.2.212. ChapProcess Element name: "ChapProcess" path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)" id: "0x6944" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains all the commands associated to the Atom. 7.2.213. ChapProcessCodecID Element name: "ChapProcessCodecID" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha pProcessCodecID)" id: "0x6955" minOccurs: "1" default: "0" type: "uinteger" Lhomme, et al. Expires May 27, 2017 [Page 100] Internet-Draft Matroska November 2016 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. 7.2.214. ChapProcessPrivate Element name: "ChapProcessPrivate" path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha pProcessPrivate)" id: "0x450D" type: "binary" minver: "1" documentation: Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent. 7.2.215. ChapProcessCommand Element name: "ChapProcessCommand" path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Chap ProcessCommand)" id: "0x6911" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Contains all the commands associated to the Atom. 7.2.216. ChapProcessTime Element name: "ChapProcessTime" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha pProcessCommand\ChapProcessTime)" Lhomme, et al. Expires May 27, 2017 [Page 101] Internet-Draft Matroska November 2016 id: "0x6922" minOccurs: "1" type: "uinteger" minver: "1" documentation: Defines when the process command SHOULD be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter). 7.2.217. ChapProcessData Element name: "ChapProcessData" path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha pProcessCommand\ChapProcessData)" id: "0x6933" minOccurs: "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. 7.2.218. Tags Element name: "Tags" path: "0*(\Segment\Tags)" id: "0x1254C367" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Element containing Elements specific to Tracks/ Chapters. A list of valid tags can be found here. Lhomme, et al. Expires May 27, 2017 [Page 102] Internet-Draft Matroska November 2016 7.2.219. Tag Element name: "Tag" path: "1*(\Segment\Tags\Tag)" id: "0x7373" minOccurs: "1" maxOccurs: "unbounded" type: "master" minver: "1" documentation: Element containing Elements specific to Tracks/ Chapters. 7.2.220. Targets Element name: "Targets" path: "1*1(\Segment\Tags\Tag\Targets)" id: "0x63C0" minOccurs: "1" type: "master" minver: "1" documentation: Contain all UIDs where the specified meta data apply. It is empty to describe everything in the Segment. 7.2.221. TargetTypeValue Element name: "TargetTypeValue" path: "0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)" id: "0x68CA" default: "50" type: "uinteger" Lhomme, et al. Expires May 27, 2017 [Page 103] Internet-Draft Matroska November 2016 minver: "1" documentation: A number to indicate the logical level of the target (see TargetType). 7.2.222. TargetType Element name: "TargetType" path: "0*1(\Segment\Tags\Tag\Targets\TargetType)" id: "0x63CA" type: "string" minver: "1" documentation: An informational string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType). 7.2.223. TagTrackUID Element name: "TagTrackUID" path: "0*(\Segment\Tags\Tag\Targets\TagTrackUID)" id: "0x63C5" maxOccurs: "unbounded" default: "0" type: "uinteger" minver: "1" 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. 7.2.224. TagEditionUID Element name: "TagEditionUID" path: "0*(\Segment\Tags\Tag\Targets\TagEditionUID)" id: "0x63C9" Lhomme, et al. Expires May 27, 2017 [Page 104] Internet-Draft Matroska November 2016 maxOccurs: "unbounded" 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. 7.2.225. TagChapterUID Element name: "TagChapterUID" path: "0*(\Segment\Tags\Tag\Targets\TagChapterUID)" id: "0x63C4" maxOccurs: "unbounded" 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. 7.2.226. TagAttachmentUID Element name: "TagAttachmentUID" path: "0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)" id: "0x63C6" maxOccurs: "unbounded" default: "0" type: "uinteger" minver: "1" Lhomme, et al. Expires May 27, 2017 [Page 105] Internet-Draft Matroska November 2016 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. 7.2.227. SimpleTag Element name: "SimpleTag" path: "1*(\Segment\Tags\Tag(1*(\SimpleTag)))" id: "0x67C8" minOccurs: "1" maxOccurs: "unbounded" type: "master" recursive: "1" minver: "1" documentation: Contains general information about the target. 7.2.228. TagName Element name: "TagName" path: "1*1(\Segment\Tags\Tag\SimpleTag\TagName)" id: "0x45A3" minOccurs: "1" type: "utf-8" minver: "1" documentation: The name of the Tag that is going to be stored. 7.2.229. TagLanguage Element name: "TagLanguage" path: "1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)" id: "0x447A" Lhomme, et al. Expires May 27, 2017 [Page 106] Internet-Draft Matroska November 2016 minOccurs: "1" default: "und" type: "string" minver: "1" documentation: Specifies the language of the tag specified, in the Matroska languages form. 7.2.230. TagDefault Element name: "TagDefault" path: "1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)" id: "0x4484" minOccurs: "1" range: "0-1" default: "1" type: "uinteger" minver: "1" documentation: Indication to know if this is the default/original language to use for the given tag. (1 bit) 7.2.231. TagString Element name: "TagString" path: "0*1(\Segment\Tags\Tag\SimpleTag\TagString)" id: "0x4487" type: "utf-8" minver: "1" documentation: The value of the Tag. Lhomme, et al. Expires May 27, 2017 [Page 107] Internet-Draft Matroska November 2016 7.2.232. TagBinary Element name: "TagBinary" path: "0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)" id: "0x4485" 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. If you intend to implement a Matroska player, make sure you can handle all the files in our test suite [17], or at least the features presented there, not necessarily the same codecs. 8. Beginning of File An EBML file always starts with 0x1A. The 0x1A makes the DOS command "type" ends display. That way you can include ASCII text before the EBML data and it can be displayed. The EBML parser is safe from false-alarm with these ASCII only codes. Next the EBML header is stored. This allows the the parser to know what type of EBML file it is parsing. 9. Block Timecodes The Block's timecode is signed integer that represents the Raw Timecode relative to the Cluster's [18] Timecode [19], multiplied by the TimecodeScale (see the TimecodeScale notes [20]). The Block's timecode is represented by a 16bit signed integer (sint16). This means that the Block's timecode has a range of -32768 to +32767 units. When using the default value of TimecodeScale, each integer represents 1ms. So, the maximum time span of Blocks in a Cluster using the default TimecodeScale of 1ms is 65536ms. If a Cluster's [21] Timecode [22] is set to zero, it is possible to have Blocks with a negative Raw Timecode. Blocks with a negative Raw Timecode are not valid. Lhomme, et al. Expires May 27, 2017 [Page 108] Internet-Draft Matroska November 2016 10. Default decoded field duration 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 like 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") 11. 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 "Language" in the scope of the "Track" element). If the "Parent Element" is not present or assumed, then the Element cannot be assumed. 12. DRM Digital Rights Management. See Encryption [23]. Lhomme, et al. Expires May 27, 2017 [Page 109] Internet-Draft Matroska November 2016 13. Encryption Encryption in Matroska is designed in a very generic style that allows people to implement whatever form of encryption is best for them. It is easily possible to use the encryption framework in Matroska as a type of DRM. Because the encryption occurs within the Block, 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 ever decrypting them. This means that the data is more useful, without having to expose it, or go through the intensive process of decrypting. Encryption can also be layered within Matroska. This means that two completely different types of encryption can be used, requiring two seperate keys to be able to decrypt a stream. Encryption information is stored in the "ContentEncodings" Master- element under the "ContentEncryption" Element. 14. Image cropping Thanks to the PixelCropXXX elements, it's possible to crop the image before being resized. That means the image size follows this path: PixelXXX (size of the coded image) -> PixelCropXXX (size of the image to keep) -> DisplayXXX (resized cropped image) 15. Matroska version indicators The EBML Header each Matroska file starts with contains two version number fields that inform a reading application about what to expect. These are "DocTypeVersion" and "DocTypeReadVersion". "DocTypeVersion" MUST contain 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" of at least 2 while a file containing "CueRelativePosition" Elements MUST have a "DocTypeVersion" of at least 4. The "DocTypeReadVersion" MUST contain the minimum version number a reading application MUST at least suppost properly 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 Lhomme, et al. Expires May 27, 2017 [Page 110] Internet-Draft Matroska November 2016 evaluating "CueRelativePosition" is not REQUIRED for standard playback -- it only makes seeking more precise if used. "DocTypeVersion" MUST always be equal to or greater than "DocTypeReadVersion". 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 Unknown Elements [24]. 16. Mime Types There is no IETF endorsed MIME type for Matroska files. But you can use the ones we have defined on our web server: o .mka : Matroska audio "audio/x-matroska" o .mkv : Matroska video "video/x-matroska" o .mk3d : Matroska 3D video "video/x-matroska-3d" 17. Octet An Octet refers to a byte made of 8 bits. 18. Overlay Track Overlay tracks SHOULD be rendered in the same 'channel' as the track it's linked to. When content is found in such a track it is played on the rendering channel instead of the original track. 19. Position References The position in some Elements refers to the position, in octets, from the beginning of an Element. The reference is the beginning of the first Segment (= its position + the size of its ID and size fields). 0 = first possible position of a level 1 Element in the Segment. When data is spanned over mutiple Segments within a Section 21 (in the same file or in different files), the position represents the accumulated offset of each Segment. For example to reference a position in the third Segment, the position will be: the first segment total size + second segment total size + offset of the Element in the third segment. Lhomme, et al. Expires May 27, 2017 [Page 111] Internet-Draft Matroska November 2016 20. Raw Timecode The exact time of an object represented in nanoseconds. To find out a Block's Raw Timecode, you need the Block's timecode, the Cluster's [25] Timecode [26], and the TimecodeScale. For calculation, please see the see the TimecodeScale notes. 21. Linked Segments Matroska provides several methods to link two or many Segments 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, Soft Linking, or Medium 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". 21.1. Hard Linking Hard Linking (also called splitting) is the process of creating a Linked Segment by relating multiple Segments 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 MAY 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 May 27, 2017 [Page 112] Internet-Draft Matroska November 2016 +--------+------------------+-------------------+-------------------+ | 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" | | | +--------+------------------+-------------------+-------------------+ 21.2. 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 Element, so that the player can quickly switch from one to the other. 21.3. Medium Linking Medium Linking creates relationships between Segments using Ordered Chapters and the "ChapterSegmentUID" Element. A Segment Edition with Ordered Chapters MAY contain Chapters 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 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. Lhomme, et al. Expires May 27, 2017 [Page 113] Internet-Draft Matroska November 2016 22. Timecode Types o Absolute Timecode = Block+Cluster o Relative Timecode = Block o Scaled Timecode = Block+Cluster o Raw Timecode = (Block+Cluster)_TimecodeScale_TrackTimecodeScale 23. TimecodeScale The TimecodeScale [27] is used to calculate the Raw Timecode of a Block. The timecode is obtained by adding the Block's timecode to the Cluster's [28] Timecode [29], and then multiplying that result by the TimecodeScale. The result will be the Block's Raw Timecode in nanoseconds. The formula for this would look like: (a + b) * c a = [Block's Timecode]({{site.baseurl}}/index.html#block-header) b = [Cluster's](#cluster) [Timecode](#timecode) c = [TimeCodeScale]({{site.baseurl}}/index.html#TimeCodeScale) An example of this is, assume a Cluster's [30] Timecode [31] has a value of 564264, the Block has a Timecode of 1233, and the timecodescale 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. 24. TimecodeScale Rounding Because the default value of TimecodeScale is 1000000, which makes each integer in the Cluster and Block timecodes equal 1ms, this is the most commonly used. When dealing with audio, this causes innaccuracy with where you are seeking to. 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, you want to be able to seek to the exact sample that a song Lhomme, et al. Expires May 27, 2017 [Page 114] Internet-Draft Matroska November 2016 begins at. If you seek a few sample ahead or behind then 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. It is usually true that when storing timecodes for an audio stream, the TimecodeScale MUST have an accuracy of at least that of the audio samplerate, otherwise there are rounding errors that prevent you from knowing the precise location of a sample. Here's how a program has to round each timecode 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 TimecodeScale 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 wil use 22675 for the TimecodeScale. The application could even use some lower value like 22674 which would allow it to be a little bit imprecise about the original timecodes. But more about that in a minute. Next the application wants to write sample number 52340 and calculates the timecode. This is easy. In order to calculate the Raw Timecode in ns all it has to do is calculate "RawTimecode = 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 TimecodeScale 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 "RawTimecode = round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 1186848073". The next step is to calculate the Absolute Timecode - that is the timecode that will be stored in the Matroska file. Here the application has to divide the Raw Timecode from the previous paragraph by the TimecodeScale factor and round the result: "AbsoluteTimecode = round(RawTimecode / TimecodeScale_facotr)" which will result in the following for our example: "AbsoluteTimecode = 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 TimecodeScale factor 22675 and the audio sample rate 44100. Later it finds a data block with the Absolute Timecode of 52342. But how does it get the sample number from these numbers? Lhomme, et al. Expires May 27, 2017 [Page 115] Internet-Draft Matroska November 2016 First it has to calculate the Raw Timecode of the block it has just read. Here's no rounding involved, just an integer multiplication: "RawTimecode = AbsoluteTimecode * TimecodeScale_factor". In our example: "RawTimecode = 52342 * 22675 = 1186854850". The conversion from the RawTimecode to the sample number again requires rounding: "sample_number = round(RawTimecode * 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. 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 timecode in the Matroska file that does not correspond to the sample number that it started with. Using a slightly lower timecode scale factor can help here in that it removes the need for proper rounding in the conversion from sample number to Raw Timecode. 25. Track Flags 25.1. Default flag The "default track" flag is a hint for the playback application 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 she hasn't chosen a specific track then the 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. 25.2. Forced flag The "forced" flag tells the playback application 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 player SHOULD determined based upon the language of the forced flag or use the default flag if no track matches the use languages. Lhomme, et al. Expires May 27, 2017 [Page 116] Internet-Draft Matroska November 2016 Another track of the same kind without the "forced" flag may be use simultaneously with the "forced" track (like DVD subtitles for example). 26. TrackTimecodeScale The TrackTimecodeScale [32] 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 reencode 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 TrackTimecodeScale 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 TrackTimecodeScale. The video will also be aligned to the NTSC track with the default value of 1.0. The TrackTimecodeScale 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: (25 / 24) = ~ 1.04166666666666666667 When writing a file that uses a non-default TrackTimecodeScale, the values of the Block's timecode are whatever they would be when normally storing the track with a default value for the TrackTimecodeScale. However, the data is interleaved a little differently. Data SHOULD be interleaved by its Raw Timecode [33] in Lhomme, et al. Expires May 27, 2017 [Page 117] Internet-Draft Matroska November 2016 the order handed back from the encoder. The Raw Timecode of a Block from a track using TrackTimecodeScale is calculated using: "(Block's Timecode + Cluster's Timecode) * TimecodeScale * TrackTimecodeScale" So, a Block from the PAL track above that had a Scaled Timecode [34] of 100 seconds would have a Raw Timecode of 104.66666667 seconds, and so would be stored in that part of the file. When playing back a track using the TrackTimecodeScale, 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 timecodes from the PAL Audio track are scaled using the TrackTimecodeScale, resulting in the video playing back in synch with the audio. It would be possible for a player to also adjust the audio's samplerate at the same time as adjusting the timecodes 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) timecodes 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. 27. Unknown elements Matroska is based upon the principal 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 [35] 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 signalling that a reading application MUST only support a lower version number properly in order to play it back (possibly with a reduced feature set). This implies that 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 which it does not know about if that unknown element fits into the size constraints set by the current parent element. Lhomme, et al. Expires May 27, 2017 [Page 118] Internet-Draft Matroska November 2016 28. Multi-planar and 3D videos There are 2 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 [36] 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/Height 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 2 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 [37] with TrackCombinePlanes [38] do that. For more details look at how TrackOperation works [39]. The 3D support is still in infancy and may evolve to support more features. /index.html#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. Readers may support these legacy files by checking Matroska v2 or 0x53B9. The olders values were 0: mono, 1: right eye, 2: left eye, 3: both eyes 29. Track Operation TrackOperation [40] allows combining multiple tracks to make a virtual one. It uses 2 separate system to combine tracks. One to create a 3D "composition" (left/right/background planes) and one to simplify join 2 tracks together to make a single track. Lhomme, et al. Expires May 27, 2017 [Page 119] Internet-Draft Matroska November 2016 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 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 Blocks (from BlockGroup and SimpleBlock) of all the tracks SHOULD be used as if they were defined for this new virtual Track. When 2 Blocks have overlapping start or end timecodes, it's up to the underlying system to either drop some of these frames or render them the way they overlap. In the end this situation SHOULD be avoided when creating such tracks as you can never be sure of the end result on different platforms. 30. Matroska Element Ordering Guidelines 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. 30.1. Top-Level Elements A valid Matroska file requires only one Top-Level Element, the "Info" Element; however, to be playable Matroska MUST also contain at least one "Tracks" and "Cluster" Element. The first "Info" Element and the first "Tracks" Element MUST either be stored before the first "Cluster" Element or both be referenced by a "SeekHead" Element which occurs before the first "Cluster" Element. After a Matroska file has been created it could still be edited. 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. 30.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- Lhomme, et al. Expires May 27, 2017 [Page 120] Internet-Draft Matroska November 2016 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. 30.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" MUST reference the identity and position of the second "SeekHead", the second "SeekHead" MUST only reference "Cluster" Elements and not any other Top-Level Element already contained within the first "SeekHead", and the second "SeekHead" MAY be 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" itself. It is RECOMMENDED that the first "SeekHead" Element be followed by some padding (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. 30.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 of the "Cluster" Elements are written because this does not require a prediction of how much space to reserve before writing the "Cluster" Elements. On the other hand, storing the "Cues" Element before the "Clusters" can provide some seeking advantages. 30.5. Info The first "Info" Element SHOULD occur before the first "Tracks" and first "Cluster" Element. 30.6. Chapters The "Chapters" Element SHOULD be placed before the "Cluster" Element(s). The "Chapters" Element can be used during playback even if the user doesn't need to seek. It immediately gives the user information of 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 starting playing anything. The "Chapters" Element SHOULD be placed before the first "Tracks" Element and after the first "Info" Element. Lhomme, et al. Expires May 27, 2017 [Page 121] Internet-Draft Matroska November 2016 30.7. Attachments The "Attachments" Element is not meant to use by default when playing the file, but could contain the cover art and/or fonts. Cover art is useful even before the file is played and fonts could be needed before playback starts for initialization of subtitles that could use them. 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. 30.8. Tags The "Tags" Element is the one that is most subject to changes after the file was originally created. So 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(s) are found early in the stream. When editing the "Tags" Element(s), the original "Tags" Element at the beginning can be voided [41] and a new one written right at the end [42] of the "Segment" Element. The file size will only marginally change. 30.9. Optimum layout from a muxer o SeekHead o Info o Tracks o Chapters o Attachments o Tags o Clusters o Cues 30.10. Optimum layout after editing tags o SeekHead o Info o Tracks Lhomme, et al. Expires May 27, 2017 [Page 122] Internet-Draft Matroska November 2016 o Chapters o Attachments o Void o Clusters o Cues o Tags 30.11. Optimum layout with Cues at the front o SeekHead o Info o Tracks o Chapters o Attachments o Tags o Cues o Clusters 30.12. Cluster Timecode As each "BlockGroup" and "SimpleBlock" of a "Cluster" Element needs the Cluster "Timecode", the "Timecode" Element MUST occur as the first Child Element within the "Cluster" Element. 31. CodecID As an additional resource to this page Haali has created a list of codec IDs in a PDF [43]. For each TrackEntry inside matroska [44], there has to be a CodecID [45] defined. This ID is represent the codec used to encode data in the Track. The codec works with the coded data in the stream, but also with some codec initialisation. There are 2 different kind of codec "initialisation": o CodecPrivate in the TrackEntry Lhomme, et al. Expires May 27, 2017 [Page 123] Internet-Draft Matroska November 2016 o CodecState in the BlockGroup Each of these elements contain the same kind of data. And these data depend on the codec used. Important Note: The intention behind this list is "NOT" to list all existing audio and video codecs, but rather to list those codecs that are "currently supported" in Matroska and therefore need a well defined codec ID so that all developers supporting Matroska will use the same ID. If you feel we missed support for a very important codec, please tell us on our development mailing list (matroska-devel at lists.matroska.org). 31.1. Video Codecs *Codec ID:* "V_MS/VFW/FOURCC" *Codec Name:* Microsoft (TM) Video Codec Manager (VCM) *Description:* The private data contains the VCM structure BITMAPINFOHEADER including the extra private bytes, as defined by Microsoft [46]. The data are stored in little endian format (like on IA32 machines). Where is the Huffman table stored in HuffYUV, not AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ??? *Codec ID:* V_UNCOMPRESSED *Codec Name:* Video, raw uncompressed video frames *Description:* The private data is void, all details about the used colour specs and bit depth are to be put/read from the KaxCodecColourSpace elements. *Codec ID:* V_MPEG4/ISO/??? *Codec Name:* MPEG4 ISO Profile Video *Description:* The stream complies with, and uses the CodecID for, one of the MPEG-4 profiles listed below. *Codec ID:* V_MPEG4/ISO/SP *Codec Name:* MPEG4 ISO simple profile (DivX4) *Description:* Stream was created via improved codec API (UCI) or even transmuxed from AVI (no b-frames in Simple Profile), frame order is coding order *Codec ID:* V_MPEG4/ISO/ASP *Codec Name:* MPEG4 ISO advanced simple profile (DivX5, XviD, FFMPEG) *Description:* Stream was created via improved codec API (UCI) or transmuxed from MP4, not simply transmuxed from AVI! Note there are differences how b-frames are handled in these native streams, when being compared to a VfW created stream, as here there are "no" dummy Lhomme, et al. Expires May 27, 2017 [Page 124] Internet-Draft Matroska November 2016 frames inserted, the frame order is exactly the same as the coding order, same as in MP4 streams! *Codec ID:* V_MPEG4/ISO/AP *Codec Name:* MPEG4 ISO advanced profile *Description:* (Same as above) *Codec ID:* V_MPEG4/MS/V3 *Codec Name:* Microsoft (TM) MPEG4 V3 *Description:* and derivates, means DivX3, Angelpotion, SMR, etc.; stream was created using VfW codec or transmuxed from AVI; note that V1/V2 are covered in VfW compatibility mode *Codec ID:* V_MPEG1 *Codec Name:* MPEG 1 *Description:* The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations *Codec ID:* V_MPEG2 *Codec Name:* MPEG 2 *Description:* The matroska video stream will contain a demuxed Elementary Stream (ES ), where block boundaries are still to be defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those files, and to compare the results with selfmade implementations *Codec ID:* V_REAL/???? *Codec Name:* Real Video(TM) *Description:* The stream is one of the Real Video(TM) video streams listed below. Source for the codec names are from Karl Lillevold on Doom9 [47]. The CodecPrivate element contains a "real_video_props_t" structure in Big Endian byte order as found in librmff [48]. *Codec ID:* V_REAL/RV10 *Codec Name:* RealVideo 1.0 aka RealVideo 5 *Description:* Individual slices from the Real container are combined into a single frame. *Codec ID:* V_REAL/RV20 *Codec Name:* RealVideo G2 and RealVideo G2+SVT *Description:* Individual slices from the Real container are combined into a single frame. *Codec ID:* V_REAL/RV30 *Codec Name:* RealVideo 8 *Description:* Individual slices from the Real container are combined into a single frame. Lhomme, et al. Expires May 27, 2017 [Page 125] Internet-Draft Matroska November 2016 *Codec ID:* V_REAL/RV40 *Codec Name:* rv40 : RealVideo 9 *Description:* Individual slices from the Real container are combined into a single frame. *Codec ID:* V_QUICKTIME *Codec Name:* Video taken from QuickTime(TM) files *Description:* Several codecs as stored in QuickTime, e.g. Sorenson or Cinepak. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file *after* the mandatory video descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read QuickTime File Format Specification [49]. *Codec ID:* V_THEORA *Codec Name:* Theora *Description:* The private data contains the first three Theora packets in order. The lengths of the packets precedes them. The actual layout is: o Byte 1: number of distinct packets '"#p"' minus one inside the CodecPrivate block. This MUST be '2' for current (as of 2016-07-08) Theora headers. o Bytes 2..n: lengths of the first '"#p"' packets, coded in Xiph- style lacing [50]. The length of the last packet is the length of the CodecPrivate block minus the lengths coded in these bytes minus one. o Bytes n+1..: The Theora identification header, followed by the commend header followed by the codec setup header. Those are described in the Theora specs [51]. *Codec ID:* V_PRORES *Codec Name:* Apple ProRes *Description:* The private data contains the fourcc as found in MP4 movies: o apch: ProRes 422 High Quality o apcn: ProRes 422 Standard Definition o apcs: ProRes 422 LT o apco: ProRes 422 Proxy o ap4h: ProRes 4444 Lhomme, et al. Expires May 27, 2017 [Page 126] Internet-Draft Matroska November 2016 this page for more technical details on ProRes [52] 31.2. Audio *Codec ID:* A_MPEG/L3 *Codec Name:* MPEG Audio 1, 2, 2.5 Layer III *Description:* The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0055 *Codec ID:* A_MPEG/L2 *Codec Name:* MPEG Audio 1, 2 Layer II *Description:* The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0050 *Codec ID:* A_MPEG/L1 *Codec Name:* MPEG Audio 1, 2 Layer I *Description:* The private data is void. The data contain everything needed for playback in the MPEG Audio header of each frame. Corresponding ACM wFormatTag : 0x0050 *Codec ID:* A_PCM/INT/BIG *Codec Name:* PCM Integer Big Endian *Description:* The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element. Corresponding ACM wFormatTag : ??? *Codec ID:* A_PCM/INT/LIT *Codec Name:* PCM Integer Little Endian *Description:* The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element. Corresponding ACM wFormatTag : 0x0001 *Codec ID:* A_PCM/FLOAT/IEEE *Codec Name:* Floating Point, IEEE compatible *Description:* The private data is void. The bitdepth has to be read and set from KaxAudioBitDepth element (32 bit in most cases). The float are stored in little endian order (most common float format). Corresponding ACM wFormatTag : 0x0003 *Codec ID:* A_MPC *Codec Name:* MPC (musepack) SV8 *Description:* The main developer for musepack has requested that we wait until the SV8 framing has been fully defined for musepack before defining how to store it in Matroska. *Codec ID:* A_AC3 Lhomme, et al. Expires May 27, 2017 [Page 127] Internet-Draft Matroska November 2016 *Codec Name:* (Dolby[TM]) AC3 *Description:* BSID <= 8 !! The private data is void ??? Corresponding ACM wFormatTag : 0x2000 ; channel number have to be read from the corresponding audio element *Codec ID:* A_AC3/BSID9 *Codec Name:* (Dolby[TM]) AC3 *Description:* The ac3 frame header has, similar to the mpeg-audio header a version field. Normal ac3 is defiened as bitstream id 8 (5 Bits, numbers are 0-15). Everything below 8 is still compatible with all decoders that handle 8 correctly. Everything higher are additions that break decoder compatibility. For the samplerates 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10 *Codec ID:* A_AC3/BSID10 *Codec Name:* (Dolby[TM]) AC3 *Description:* (Same as above) *Codec ID:* A_ALAC *Codec Name:* ALAC (Apple Lossless Audio Codec) *Description:* The private data contains ALAC's magic cookie (both the codec specific configuration as well as the optional channel layout information). Its format is described in ALAC's official source code [53]. *Codec ID:* A_DTS *Codec Name:* Digital Theatre System *Description:* Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution Audio and DTS-HD Master Audio. The private data is void. Corresponding ACM wFormatTag : 0x2001 *Codec ID:* A_DTS/EXPRESS *Codec Name:* Digital Theatre System Express *Description:* DTS Express (a.k.a. LBR) audio streams. The private data is void. Corresponding ACM wFormatTag : 0x2001 *Codec ID:* A_DTS/LOSSLESS *Codec Name:* Digital Theatre System Lossless *Description:* DTS Lossless audio that does not have a core substream. The private data is void. Corresponding ACM wFormatTag : 0x2001 *Codec ID:* A_VORBIS *Codec Name:* Vorbis *Description:* The private data contains the first three Vorbis packet in order. The lengths of the packets precedes them. The actual layout is: Byte 1: number of distinct packets '"#p"' minus one Lhomme, et al. Expires May 27, 2017 [Page 128] Internet-Draft Matroska November 2016 inside the CodecPrivate block. This MUST be '2' for current (as of 2016-07-08) Vorbis headers. Bytes 2..n: lengths of the first '"#p"' packets, coded in Xiph-style lacing [54]. The length of the last packet is the length of the CodecPrivate block minus the lengths coded in these bytes minus one. Bytes n+1..: The Vorbis identification header [55], followed by the Vorbis comment header [56] followed by the codec setup header [57]. *Codec ID:* A_FLAC *Codec Name:* FLAC (Free Lossless Audio Codec) [58] *Description:* The private data contains all the header/metadata packets before the first data packet. These include the first header packet containing only the word "fLaC" as well as all metadata packets. *Codec ID:* A_REAL/???? *Codec Name:* Realmedia Audio codecs *Description:* The stream contains one of the following audio codecs. In each case the CodecPrivate element contains either the "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure (differentiated by their "version" field; Big Endian byte order) as found in librmff [59]. *Codec ID:* A_REAL/14_4 *Codec Name:* Real Audio 1 *Description:* *Codec ID:* A_REAL/28_8 *Codec Name:* Real Audio 2 *Description:* *Codec ID:* A_REAL/COOK *Codec Name:* Real Audio Cook Codec (codename: Gecko) *Description:* *Codec ID:* A_REAL/SIPR *Codec Name:* Sipro Voice Codec *Description:* *Codec ID:* A_REAL/RALF *Codec Name:* Real Audio Lossless Format *Description:* *Codec ID:* A_REAL/ATRC *Codec Name:* Sony Atrac3 Codec *Description:* *Codec ID:* A_MS/ACM Lhomme, et al. Expires May 27, 2017 [Page 129] Internet-Draft Matroska November 2016 *Codec Name:* Microsoft(TM) Audio Codec Manager (ACM) *Description:* The private data contains the ACM structure WAVEFORMATEX including the extra private bytes, as defined by Microsoft [60]. The data are stored in little endian format (like on IA32 machines). *Codec ID:* A_AAC/?????/??? *Codec Name:* AAC Profile Audio *Description:* The stream complies with, and uses the CodecID for, one of the AAC profiles listed below. AAC audio always uses wFormatTag 0xFF *Codec ID:* A_AAC/MPEG2/MAIN *Codec Name:* MPEG2 Main Profile *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG2/LC *Codec Name:* Low Complexity *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG2/LC/SBR *Codec Name:* Low Complexity with Spectral Band Replication *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG2/SSR *Codec Name:* Scalable Sampling Rate *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG4/MAIN *Codec Name:* MPEG4 Main Profile *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG4/LC Lhomme, et al. Expires May 27, 2017 [Page 130] Internet-Draft Matroska November 2016 *Codec Name:* Low Complexity *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG4/LC/SBR *Codec Name:* Low Complexity with Spectral Band Replication *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG4/SSR *Codec Name:* Scalable Sampling Rate *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_AAC/MPEG4/LTP *Codec Name:* Long Term Prediction *Description:* The private data is void. Channel number and sample rate have to be read from the corresponding audio element. Audio stream is stripped from ADTS headers and normal matroska frame based muxing scheme is applied. *Codec ID:* A_QUICKTIME *Codec Name:* Audio taken from QuickTime(TM) files *Description:* Several codecs as stored in QuickTime, e.g. QDesign Music v1 or v2. The CodecPrivate contains all additional data that is stored in the 'stsd' (sample description) atom in the QuickTime file *after* the mandatory sound descriptor structure (starting with the size and FourCC fields). For an explanation of the QuickTime file format read QuickTime File Format Specification [61]. *Codec ID:* A_QUICKTIME/???? *Codec Name:* QuickTime audio codecs *Description:* This CodecID is deprecated in favor of A_QUICKTIME (without a trailing codec name). Otherwise the storage is identical; see A_QUICKTIME for details. *Codec ID:* A_QUICKTIME/QDMC *Codec Name:* QDesign Music *Description:* *Codec ID:* A_QUICKTIME/QDM2 *Codec Name:* QDesign Music v2 Lhomme, et al. Expires May 27, 2017 [Page 131] Internet-Draft Matroska November 2016 *Description:* *Codec ID:* A_TTA1 *Codec Name:* The True Audio [62] lossles audio compressor *Description:* TTA format description [63] Each frame is kept intact, including the CRC32. The header and seektable are dropped. The private data is void. SamplingFrequency, Channels and BitDepth are used in the TrackEntry. wFormatTag = 0x77A1 *Codec ID:* A_WAVPACK4 *Codec Name:* WavPack [64] lossles audio compressor *Description:* The Wavpack packets consist of a stripped header followed by the frame data. For multi-track (> 2 tracks) a frame consists of many packets. For hybrid files (lossy part + correction part), the correction part is stored in an additional block (level 1). For more details, check the WavPack muxing description [65]. 31.3. Subtitle *Codec ID:* S_TEXT/UTF8 *Codec Name:* UTF-8 Plain Text *Description:* Basic text subtitles. For more information, please look at the Subtitle specifications [66]. *Codec ID:* S_TEXT/SSA *Codec Name:* Subtitles Format *Description:* The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS [67]. *Codec ID:* S_TEXT/ASS *Codec Name:* Advanced Subtitles Format *Description:* The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block. For more information, please read the specs for SSA/ASS [68]. *Codec ID:* S_TEXT/USF *Codec Name:* Universal Subtitle Format *Description:* This is mostly defined, but not typed out yet. It will first be available on the USF specs page [69]. *Codec ID:* S_TEXT/WEBVTT *Codec Name:* Web Video Text Tracks Format (WebVTT) *Description:* Advanced text subtitles. For more information about the storage please look at the WebVTT in Matroska specifications [70]. *Codec ID:* S_IMAGE/BMP Lhomme, et al. Expires May 27, 2017 [Page 132] Internet-Draft Matroska November 2016 *Codec Name:* Bitmap *Description:* Basic image based subtitle format; The subtitles are stored as images, like in the DVD. The timestamp in the block header of matroska indicates the start display time, the duration is set with the Duration element. The full data for the subtitle bitmap is stored in the Block's data section. *Codec ID:* S_VOBSUB *Codec Name:* VobSub subtitles *Description:* The same subtitle format used on DVDs. Supoprted is only format version 7 and newer. VobSubs consist of two files, the .idx containing information, and the .sub, containing the actual data. The .idx file is stripped of all empty lines, of all comments and of lines beginning with "alt:" or "langidx:". The line beginning with "id:" SHOULD be transformed into the appropriate Matroska track language element and is discarded. All remaining lines but the ones containing timestamps and file positions are put into the "CodecPrivate" element. For each line containing the timestamp and file position data is read from the appropriate position in the .sub file. This data consists of a MPEG program stream which in turn contains SPU packets. The MPEG program stream data is discarded, and each SPU packet is put into one Matroska frame. *Codec ID:* S_KATE *Codec Name:* Karaoke And Text Encapsulation *Description:* A subtitle format developped for ogg. The mapping for Matroska is described on the Xiph wiki [71]. As for Theora and Vorbis, Kate headers are stored in the private data as xiph-laced packets. 31.4. Buttons *Codec ID:* B_VOBBTN *Codec Name:* VobBtn Buttons *Description:* Based on MPEG/VOB PCI packets [72]. The file contains a header consisting of the string "butonDVD" followed by the width and height in pixels (16 bits integer each) and 4 reserved bytes. The rest is full PCI packets [73]. #Chapters 31.5. 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 Lhomme, et al. Expires May 27, 2017 [Page 133] Internet-Draft Matroska November 2016 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 | ChapterAtom | ChapterUID | 0x123456 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 5,000,000 ns | ChapterDisplay | ChapterString | Intro | ChapterLanguage | eng | ChapterAtom | ChapterUID | 0x234567 | ChapterTimeStart | 5,000,000 ns | ChapterTimeEnd | 25,000,000 ns | ChapterDisplay | ChapterString | Before the crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Avant le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x345678 | ChapterTimeStart | 25,000,000 ns | ChapterTimeEnd | 27,500,000 ns | ChapterDisplay | ChapterString | The crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 27,500,000 ns | ChapterTimeEnd | 38,000,000 ns | ChapterDisplay | ChapterString | After the crime | ChapterLanguage | eng | ChapterDisplay | ChapterString | Apres le crime | ChapterLanguage | fra | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 38,000,000 ns | ChapterTimeEnd | 43,000,000 ns | ChapterDisplay | ChapterString | Credits | ChapterLanguage | eng | ChapterDisplay | ChapterString | Generique | ChapterLanguage | fra | 31.6. Example 2 : nested chapters In this example an (existing) album is split into different chapters, and one of them contain another splitting. 31.6.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) Lhomme, et al. Expires May 27, 2017 [Page 134] Internet-Draft Matroska November 2016 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 | ChapterAtom | ChapterUID | 0x654321 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 748,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep/rock | ChapterAtom | ChapterUID | 0x123456 | ChapterTimeStart | 0 ns | ChapterTimeEnd | 278,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.1) | ChapterAtom | ChapterUID | 0x234567 | ChapterTimeStart | 278,000,000 ns | ChapterTimeEnd | 432,000,000 ns | ChapterDisplay | ChapterString | Baby wants to rock | ChapterAtom | ChapterUID | 0x345678 | ChapterTimeStart | 432,000,000 ns | ChapterTimeEnd | 633,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.2) | ChapterAtom | ChapterUID | 0x456789 | ChapterTimeStart | 633,000,000 ns | ChapterTimeEnd | 748,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.3) | ChapterAtom | ChapterUID | 0x567890 | ChapterTimeStart | 750,000,000 ns | ChapterTimeEnd | 1,178,500,000 ns | ChapterDisplay | ChapterString | Bleeper_O+2 | ChapterAtom | ChapterUID | 0x678901 | ChapterTimeStart | 1,180,500,000 ns | ChapterTimeEnd | 1,340,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (pt.4) | ChapterAtom | ChapterUID | 0x789012 | ChapterTimeStart | 1,342,000,000 ns | ChapterTimeEnd | 1,518,000,000 ns | ChapterDisplay | ChapterString | Bleep to bleep | ChapterAtom | ChapterUID | 0x890123 | ChapterTimeStart | 1,520,000,000 ns | ChapterTimeEnd | 2,015,000,000 ns | ChapterDisplay | ChapterString | Baby wants to bleep (k) | ChapterAtom | ChapterUID | 0x901234 | ChapterTimeStart | 2,017,000,000 ns | ChapterTimeEnd | 2,668,000,000 ns | ChapterDisplay | ChapterString | Bleeper | 31.7. Edition and chapter flags 31.7.1. Chapter flags There are two important flags that apply to chapter atoms: _enabled_ and _hidden_. The effect of those flags always applies to child atoms of an atom affected by that flag. For example: Let's assume a parent atom with flag _hidden_ set to _true_; that parent contains two child atom, the first with _hidden_ set to _true_ as well and the second child with the flag either set to _false_ or not present at all (in which case the default value applies, and that again is _false_). Lhomme, et al. Expires May 27, 2017 [Page 135] Internet-Draft Matroska November 2016 As the parent is hidden all of its children are initially hidden as well. However, when a control track toggles the parent's _hidden_ flag to _false_ then only the the parent and its second child will be visible. The first child's explicitely set flag retains its value until its value is toggled to _false_ by a control track. Corresponding behavior applies to the _enabled_ flag. 31.7.2. Edition flags The edition's _hidden_ flag behaves much the same as the chapter's _hidden_ flag: if an edition is hidden then none of its children SHALL be visible, no matter their own _hidden_ flags. If the edition is toggled to being visible then the chapter atom's _hidden_ flags decide whether or not the chapter is visible. 31.8. 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). 31.8.1. Matroska Script (0) This is the case when ChapProcessCodecID [74] = 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 playback SHOULD jump to the Chapter specified by the UID and play it. 31.8.2. DVD menu (1) This is the case when ChapProcessCodecID [75] = 1. Each level of a chapter corresponds to a logical level in the DVD system that is Lhomme, et al. Expires May 27, 2017 [Page 136] Internet-Draft Matroska November 2016 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 [76] element found in the Segment Info. This field uses 2 octets as follows: 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) Lhomme, et al. Expires May 27, 2017 [Page 137] Internet-Draft Matroska November 2016 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 [77] 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 preceeding 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)]. More information on the DVD commands and format on DVD-replica [78], where we got most of the info about it. You can also get information on DVD from the DVDinfo project [79].--- 32. Subtitles Because Matroska is a general container format, we try to avoid specifying the formats to store in it. This type of work is really outside of the scope of a container-only format. However, because the use of subtitles in A/V containers has been so limited (with the exception of DVD) we are taking the time to specify how to store some of the more common subtitle formats in Matroska. This is being done to help facilitate their growth. Otherwise, incompatabilities could prevent the standardization and use of subtitle storage. This page is not meant to be a complete listing of all subtitle formats that will be used in Matroska, it is only meant to be a guide for the more common, current formats. It is possible that we will add future formats to this page as they are created, but it is not likely as any other new subtitle format designer would likely have their own specifications. Any specification listed here SHOULD be strictly adhered to or it SHOULD NOT use the corresponding Codec ID. Here is a list of pointers for storing subtitles in Matroska: o Any Matroska file containing only subtitles SHOULD use the extension ".mks". o As a general rule of thumb for all codecs, information that is global to an entire stream SHOULD be stored in the CodecPrivate element. Lhomme, et al. Expires May 27, 2017 [Page 138] Internet-Draft Matroska November 2016 o Start and stop timecodes that are used in a timecodes native storage format SHOULD be removed when being placed in Matroska as they could interfere if the file is edited afterwards. Instead, the Blocks timecode and Duration SHOULD be used to say when the timecode is displayed. o Because a "subtitle" stream is actually just an overlay stream, anything with a transparency layer could be use, including video. 33. Images Subtitles The first image format that is a goal to import into Matroska is the VobSub subtitle format. This subtitle type is generated by exporting the subtitles from a DVD. The requirement for muxing VobSub into Matroska is v7 subtitles (see first line of the .IDX file). If the version is smaller, you must remux them using the SubResync utility from VobSub 2.23 (or MPC) into v7 format. Generally any newly created subs will be in v7 format. The .IFO file will not be used at all. If there is more than one subtitle stream in the VobSub set, each stream will need to be seperated into seperate tracks for storage in Matroska. E.g. the VobSub file contains streams for both English and German subtitles. Then the resulting Matroska file SHOULD contain two tracks. That way the language information can be 'dropped' and mapped to Matroska's language tags. The .IDX file is reformatted (see below) and placed in the CodecPrivate. Each .BMP will be stored in its own Block. The Timestamp with be stored in the Blocks Timecode and the duration will be stored in the Default Duration. Here is an example .IDX file: # VobSub index file, v7 (do not modify this line!) # # To repair desyncronization, you can insert gaps this way: # (it usually happens after vob id changes) # # delay: [sign]hh:mm:ss:ms # # Where: # [sign]: +, - (optional) # hh: hours (0 <= hh) Lhomme, et al. Expires May 27, 2017 [Page 139] Internet-Draft Matroska November 2016 # mm/ss: minutes/seconds (0 <= mm/ss <= 59) # ms: milliseconds (0 <= ms <= 999) # # Note: You can't position a sub before the previous with a negative # value. # # You can also modify timestamps or delete a few subs you don't like. # Just make sure they stay in increasing order. # Settings # Original frame size size: 720x480 # Origin, relative to the upper-left corner, can be overloaded by # aligment org: 0, 0 # Image scaling (hor,ver), origin is at the upper-left corner or at # the alignment coord (x, y) scale: 100%, 100% # Alpha blending alpha: 100% # Smoothing for very blocky images (use OLD for no filtering) smooth: OFF # In millisecs fadein/out: 50, 50 # Force subtitle placement relative to (org.x, org.y) align: OFF at LEFT TOP # For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms) # Note: Not effective in DirectVobSub, use "delay: ... " instead. time offset: 0 # ON: displays only forced subtitles, OFF: shows everything forced subs: OFF # The original palette of the DVD palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd # Custom colors (transp idxs and the four colors) custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 000000 Lhomme, et al. Expires May 27, 2017 [Page 140] Internet-Draft Matroska November 2016 # Language index in use langidx: 0 # English id: en, index: 0 # Decomment next line to activate alternative name in DirectVobSub / # Windows Media Player 6.x # alt: English # Vob/Cell ID: 1, 1 (PTS: 0) timestamp: 00:00:01:101, filepos: 000000000 timestamp: 00:00:08:708, filepos: 000001000 First, lines beginning with "#" are removed. These are comments to make text file editing easier, and as this is not a text file, they aren't needed. Next remove the "langidx" and "id" lines. These are used to differenciate the subtitle streams and define the language. As the streams will be stored seperately anyway, there is no need to differenciate them here. Also, the language setting will be stored in the Matroska tags, so there is no need to store it here. Finally, the "timestamp" will be used to set the Block's timecode. Once it is set there, there is no need for it to be stored here. Also, as it may interfere if the file is edited, it SHOULD NOT be stored here. Once all of these items are removed, the data to store in the CodecPrivate SHOULD look like this: size: 720x480 org: 0, 0 scale: 100%, 100% alpha: 100% smooth: OFF fadein/out: 50, 50 align: OFF at LEFT TOP time offset: 0 forced subs: OFF palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 000000 There SHOULD also be two Blocks containing one image each with the timecodes "00:00:01:101" and "00:00:08:708". Lhomme, et al. Expires May 27, 2017 [Page 141] Internet-Draft Matroska November 2016 34. SRT Subtitles SRT is perhaps the most basic of all subtitle formats. It consists of four parts, all in text.. 1. A number indicating which subtitle it is in the sequence. 2. The time that the subtitle appears on the screen, and then disappears. 3. The subtitle itself. 4. A blank line indicating the start of a new subtitle. When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/ UTF8) and placed in the data portion of the Block. Part 2 is used to set the timecode of the Block, and BlockDuration element. Nothing else is used. Here is an example SRT file: | 1 00:02:17,440 --> 00:02:20,375 Senator, we're making our final approach into Coruscant. 2 00:02:20,476 --> 00:02:22,501 Very good, Lieutenant. | In this example, the text "Senator, we're making our final approach into Coruscant." would be converted into UTF-8 and placed in the Block. The timecode of the block would be set to "00:02:17,440". And the BlockDuration element would be set to "00:00:02,935". The same is repeated for the next subtitle. Because there are no general settings for SRT, the CodecPrivate is left blank. 35. SSA/ASS Subtitles SSA stands for Sub Station Alpha. It's the file format used by the popular subtitle editor, SubStation Alpha [80]. This format is widely used by fansubbers. It allows you to do some advanced display features, like positioning, karaoke, style managements... For detailed information on SSA/ASS, see the SSA specs [81]. It includes an SSA specs description and the avanced features added by Lhomme, et al. Expires May 27, 2017 [Page 142] Internet-Draft Matroska November 2016 ASS format (standing for Advanced SSA). Because SSA and ASS are so similar, they are treated the same here. Like SRT, this format is text based with a particular syntax. A file consists of 4 or 5 parts, declared ala INI file (but it's not an INI !) The first, "[Script Info]" contains some information about the subtitle file, such as it's title, who created it, type of script and a very important one : "PlayResY". Be carefull of this value, everything in your script (font size, positioning) is scaled by it. Sub Station Alpha uses your desktops Y resolution to write this value, so if a friend with a large monitor and a high screen resolution gives you an edited script, you can mess everything up by saving the script in SSA with your low-cost monitor. The second, "[V4 Styles]", is a list of style definitions. A style describe how will look a text on the screen. It defines font, font size, primary/.../outile colour, position, aligment etc ... For example this : | Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0, 1,1,2,2,5,5,30,0,0 | The third, "[Events]", is the list of text you want to display at the right timing. You can specify some attribute here. Like the style to use for this event (MUST be defined in the list), the position of the text (Left, Right, Vertical Margin), an effect. Name is mostly used by translator to know who said this sentence. Timing is in h:mm:ss.cc (centisec). | Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien. Lhomme, et al. Expires May 27, 2017 [Page 143] Internet-Draft Matroska November 2016 | "[Pictures]" or "[Fonts]" part can be found in some SSA file, they contains UUE-encoded pictures/font but those features are only used by Sub Station Alpha, i.e. no filter (Vobsub/Avery Lee Subtiler filter) use them. Now, how are they stored in Matroska ? o All text is converted to UTF-8* All the headers are stored in CodecPrivate ( Script Info and the Styles list)* Start & End field are used to set TimeStamp and the BlockDuration element. the data stored is :* Events are stored in the Block in this order: ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text (Layer comes from ASS specs ... it's empty for SSA.) "ReadOrder field is needed for the decoder to be able to reorder the streamed samples as they were placed originally in the file." Here is an example of an SSA file. | [Script Info] ; This is a Sub Station Alpha v4 script. ; For Sub Station Alpha info and downloads, ; go to http://www.eswat.demon.co.uk/ ; or email kotus@eswat.demon.co.uk [83] Title: Wolf's rain 2 Original Script: Anime-spirit Ishin-francais Original Translation: Coolman Original Editing: Spikewolfwood Original Timing: Lord_alucard Original Script Checking: Spikewolfwood ScriptType: v4.00 Collisions: Normal PlayResY: 1024 PlayDepth: 0 Wav: 0, 128697,D:\Alex\Anime- Fansub -- TAFF -\Wolf's Rain\WR_-_02_Wav.wav Wav: 0, 120692,H:\team truc\WR_-_02.wav Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav LastWav: 3 Timer: 100,0000 [V4 Styles] Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Default,Arial,20,65535,65535,65535,- 2147483640,-1,0,1,3,0,2,30,30,30,0,0 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,- 1,0,1,1,0,3,30,30,30,0,0 Style: Wolf main,Wolf_Rain,56,15724527,15724 527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 [Events] Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien. | Here is what would be placed into the CodecPrivate element. Lhomme, et al. Expires May 27, 2017 [Page 144] Internet-Draft Matroska November 2016 | [Script Info] ; This is a Sub Station Alpha v4 script. ; For Sub Station Alpha info and downloads, ; go to http://www.eswat.demon.co.uk/ ; or email kotus@eswat.demon.co.uk [85] Title: Wolf's rain 2 Original Script: Anime-spirit Ishin-francais Original Translation: Coolman Original Editing: Spikewolfwood Original Timing: Lord_alucard Original Script Checking: Spikewolfwood ScriptType: v4.00 Collisions: Normal PlayResY: 1024 PlayDepth: 0 Wav: 0, 128697,D:\Alex\Anime- Fansub -- TAFF -\Wolf's Rain\WR_-_02_Wav.wav Wav: 0, 120692,H:\team truc\WR_-_02.wav Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav LastWav: 3 Timer: 100,0000 [V4 Styles] Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Default,Arial,20,65535,65535,65535,- 2147483640,-1,0,1,3,0,2,30,30,30,0,0 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,- 1,0,1,1,0,3,30,30,30,0,0 Style: Wolf main,Wolf_Rain,56,15724527,15724 527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 | And here are the two blocks that would be generated. Block's timecode: 00:02:40.650 BlockDuration: 00:00:01.140 | 1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? | Block's timecode: 00:02:42.420 BlockDuration: 00:00:01.730 | 2,,Wolf main,autre,0000,0000,0000,,Toujours rien. | 36. USF Subtitles Under construction 37. WebVTT The "Web Video Text Tracks Format" (short: WebVTT) is developed by the World Wide Web Consortium (W3C) [86]. Its specifications are freely available [87]. The guiding principles for the storage of WebVTT in Matroska are: o Consistency: store data in a similar way to other subtitle codecs o Simplicity: making decoding and remuxing as easy as possible for existing infrastructures Lhomme, et al. Expires May 27, 2017 [Page 145] Internet-Draft Matroska November 2016 o Completeness: keeping as much data as possible from the original WebVTT file 37.1. Storage of WebVTT in Matroska 37.1.1. CodecID: codec identification The CodecID to use is S_TEXT/WEBVTT. 37.1.2. CodecPrivate: storage of gloal WebVTT blocks This element contains all global blocks before the first subtitle entry. This starts at the "WEBVTT" file identification marker but excludes the optional byte order mark. 37.1.3. Storage of non-global WebVTT blocks Non-global WebVTT blocks (e.g. "NOTE") before a WebVTT Cue Text are stored in Matroska's BlockAddition element together with the Matroska Block containing the WebVTT Cue Text these blocks precede (see below for the actual format). 37.1.4. Storage of Cues in Matroska blocks Each WebVTT Cue Text is stored directly in the Matroska Block. A muxer MUST change all WebVTT Cue Timestamps present within the Cue Text to be relative to the Matroska Block's timestamp. The Cue's start timestamp is used as the Matroska Block's timestamp. The difference between the Cue's end timestamp and its start timestamp is used as the Matroska Block's duration. 37.1.5. BlockAdditions: storing non-global WebVTT blocks, Cue Settings Lists and Cue identifiers Each Matroska Block may be accompanied by one BlockAdditions element. Its format is as follows: 1. The first line contains the WebVTT Cue Text's optional Cue Settings List followed by one line feed character (U+0x000a). The Cue Settings List may be empty in which case the line consists of the line feed character only. 2. The second line contains the WebVTT Cue Text's optional Cue Identifier followed by one line feed character (U+0x000a). The line may be empty indicating that there was no Cue Identifier in Lhomme, et al. Expires May 27, 2017 [Page 146] Internet-Draft Matroska November 2016 the source file in which case the line consists of the line feed character only. 3. The third and all following lines contain all WebVTT Comment Blocks that precede the current WebVTT Cue Block. These may be absent. If there is no Matroska BlockAddition element stored together with the Matroska Block then all three components (Cue Settings List, Cue Identifier, Cue Comments) MUST be assumed to be absent. 37.2. Examples of transformation Here's an example how a WebVTT is transformed. 37.2.1. Example WebVTT file Let's take the following example file: 37.2.2. CodecPrivate The resulting CodecPrivate element will look like this: 37.2.3. Storage of Cue 1 Example Cue 1: timestamp 00:00:00.000, duration 00:00:10.000, Block's content: BlockAddition's content starts with one empty line as there's no Cue Settings List: 37.2.4. Storage of Cue 2 Example Cue 2: timestamp 00:00:25.000, duration 00:00:10.000, Block's content: BlockAddition's content starts with two empty lines as there's neither a Cue Settings List nor a Cue Identifier: 37.2.5. Storage of Cue 3 Example Cue 3: timestamp 00:01:03.000, duration 00:00:03.500, Block's content: BlockAddition's content ends with an empty line as there's no Cue Identifier and there were no WebVTT Comment blocks: Lhomme, et al. Expires May 27, 2017 [Page 147] Internet-Draft Matroska November 2016 37.2.6. Storage of Cue 4 Example Cue 4: timestamp 00:03:10.000, duration 00:00:10.000, Block's content: Example entry 4: Entries can even include timestamps. For example:<00:00:05.000>This becomes visible five seconds after the first part. This Block does not need a BlockAddition as the Cue did not contain an Identifier, nor a Settings List, and it wasn't preceded by Comment blocks. 37.3. Storage of WebVTT in Matroska vs. WebM Note: the storage of WebVTT in Matroska is not the same as the design document for storage of WebVTT in WebM. There are several reasons for this including but not limited to: the WebM document is old (from February 2012) and was based on an earlier draft of WebVTT and ignores several parts that were added to WebVTT later; WebM does still not support subtitles at all [88]; the proposal suggests splitting the information across multiple tracks making demuxer's and remuxer's life very difficult.--- 38. Tagging When a Tag is nested within another Tag, the nested Tag becomes an attribute of the base tag. For instance, if you wanted to store the dates that a singer used certain addresses for, that singer being the lead singer for a track that included multiple bands simultaneously, then your tag tree would look something like this: Targets - TrackUID BAND - LEADPERFORMER -- ADDRESS --- DATE --- DATEEND -- ADDRESS --- DATE In this way, it becomes possible to store any Tag as attributes of another tag. Multiple items SHOULD never be stored as a list in a single TagString. If there is more than one tag of a certain type to be stored, then more than one SimpleTag SHOULD be used. For authoring Tags outside of EBML, the following XML syntax is proposed [89] used in mkvmerge [90]. Binary data SHOULD be stored using BASE64 encoding if it is being stored at authoring time. 38.1. Why official tags matter There is a debate between people who think all tags SHOULD be free and those who think all tags SHOULD be strict. If you look at this page you will realise we are in between. Advanced-users application might let you put any tag in your file. But for the rest of the applications, they usually give you a basic Lhomme, et al. Expires May 27, 2017 [Page 148] Internet-Draft Matroska November 2016 list of tags you can use. Both have their needs. But it's usually a bad idea to use custom/exotic tags because you will probably be the only person to use this information even though everyone else could benefit from it. So hopefully when someone wants to put information in one's file, they will find an official one that fit them and hopefully use it ! If it's not in the list, this person can contact us any time for addition of such a missing tag. But it doesn't mean it will be accepted... Matroska files are not meant the become a whole database of people who made costumes for a film. A website would be better for that... It's hard to define what SHOULD be in and what doesn't make sense in a file. So we'll treat each request carefully. We also need an official list simply for developpers to be able to display relevant information in their own design (if they choose to support a list of meta-information they SHOULD know which tag has the wanted meaning so that other apps could understand the same meaning). 38.2. Tag translations To be able to save tags from other systems to Matroska we need to translate them to our system. There is a translation table on our site [91]. 38.3. Tag Formatting o The TagName SHOULD always be written in all capital letters and contain no space. o The fields with dates SHOULD have the following format: YYYY-MM-DD HH:MM:SS.MSS YYYY = Year, -MM = Month, -DD = Days, HH = Hours, :MM = Minutes, :SS = Seconds, :MSS = Milliseconds. To store less accuracy, you remove items starting from the right. To store only the year, you would use, "2004". To store a specific day such as May 1st, 2003, you would use "2003-05-01". o Fields that require a Float SHOULD use the "." mark instead of the "," mark. To display it differently for another local, applications SHOULD support auto replacement on display. Also, a thousandths separator SHOULD NOT be used. o For currency amounts, there SHOULD only be a numeric value in the Tag. Only numbers, no letters or symbols other than ".". For instance, you would store "15.59" instead of "$15.59USD". Lhomme, et al. Expires May 27, 2017 [Page 149] Internet-Draft Matroska November 2016 38.4. Target types The TargetType element allows tagging of different parts that are inside or outside a given file. For example in an audio file with one song you could have information about the album it comes from and even the CD set even if it's not found in the file. For application to know what kind of information (like TITLE) relates to a certain level (CD title or track title), we also need a set of official TargetType names. For now audio and video will have different values & names. That also means the same tag name can have different meanings depending on where it is (otherwise we would end up with 15 TITLE_ tags). An upper level value tag applies to the lower level. That means if a CD has the same artist for all tracks, you just need to set the ARTIST tag at level 50 (ALBUM) and not to each TRACK (but you can). That also means that if some parts of the CD have no known ARTIST the value MUST be set to nothing (a void string ""). When a level doesn't exist it MUST NOT be specified in the files, so that the TOTAL_PARTS and PART_NUMBER elements match the same levels. Here is an example of how these "organizational" tags work: If you set 10 TOTAL_PARTS to the ALBUM level (40) it means the album contains 10 lower parts. The lower part in question is the first lower level that is specified in the file. So if it's TRACK (30) then that means it contains 10 tracks. If it's MOVEMENT (20) that means it's 10 movements, etc. 38.5. Official tags The following is a complete list of the supported Matroska Tags. While it is possible to use Tag names that are not listed below, this is not reccommended as compatability will be compromised. If you find that there is a Tag missing that you would like to use, then please contact the Matroska team for its inclusion in the specifications before the format reaches 1.0. 38.6. Notes o In the Target list, a logicial OR is applied on all tracks, a logicial OR is applied on all chapters. Then a logical AND is applied between the Tracks list and the Chapters list to know if an element belongs to this Target. Lhomme, et al. Expires May 27, 2017 [Page 150] Internet-Draft Matroska November 2016 39. Attachments 39.1. Introduction Matroska supports storage of related files and data in the Attachments Top-Level Element. Attachments can be used to store related cover art, font files, transcripts, reports, or other ancilliary files related to the Segment. 39.2. Cover Art Matroska supports attachments and they can be used for cover arts. This document defines a set of guidelines to add cover arts correctly in Matroska files. The pictures SHOULD only use the JPEG and PNG picture formats. There can be 2 different cover for a movie/album. A portrait one (like a DVD case) and a landscape one (like a banner ad for example, looking better on a wide screen). There can be 2 versions of the same cover, the normal one and the small one. The dimension of the normal one SHOULD be 600 on the smallest side (eg 960x600 for landscape and 600x800 for portrait, 600x600 for square). The dimension of the small one SHOULD be 120 (192x120 or 120x160). The way to differentiate between all these versions is by the filename. The default filename is cover.(png/jpg) for backward compatibility reasons. That is the "big" version of the file (600) in square or portrait mode. It SHOULD also be the first file in the attachments. The smaller resolution SHOULD be prefixed with "small_", ie small_cover.(jpg/png). The landscape variant SHOULD be suffixed with "_land", ie cover_land.jpg. The filenames are case sensitive and SHOULD all be lower case. o cover.jpg (portrait/square 600) o small_cover.png (portrait/square 120) o cover_land.png (landscape 600) o small_cover_land.jpg (landscape 120) There is a sample file [92] available to test player compatibility or to demonstrate the use of cover art in Matroska files. Lhomme, et al. Expires May 27, 2017 [Page 151] Internet-Draft Matroska November 2016 39.3. Font files 40. Matroska Streaming There exist multiple ways to stream content. The term streaming itself is very vague. It means reading a file stored on a server. But the server could be very distant or very close. The transport system and the protocol used for streaming makes the whole difference. In the case of Matroska, there are mostly 2 different kinds of stream: file access and live streaming. 41. File Access File access can simply be reading a file located on your computer, but also accessing it from an HTTP (web) server or CIFS (windows share) server. All these protocols are usually safe from reading errors and seeking in the stream is possible. On other hand when the file is stored far away or on a slow server, seeking can be an expensive operation and SHOULD be avoided. That's why we set a few guidelines [93] that, when followed, help reduce the number of seeking for regular playback and also have the playback start quickly without a lot of data needed to read first (like the Cues (index), Attachments or Meta Seek of all the Clusters). Matroska having a small overhead, it is well suited for storing music/videos on file servers without having a big impact on the bandwidth used. It doesn't require to load the index before playing (the index can be loaded only when seeking is requested the first time), so playback can start very quickly too. 42. Live Streaming Live streaming is the equivalent of TV broadcasting on the internet. There are 2 families of servers for that. The RTP/RTSP ones and the HTTP servers. Matroska is not meant to be used over RTP. RTP already has timing and channel mechanisms that would wasted if doubled in Matroska. On the other hand live streaming of Matroska over HTTP (or any other plain protocol based on TCP) is very possible. A live Matroska stream is different than a file, because it may have no known end (only when the client disconnects). For that the Segment MUST use the "unknown" size (all 1s in the size). The other option would be to concatenate Segments with known sizes one after the other. This solution allows a change of codec/resolution between Lhomme, et al. Expires May 27, 2017 [Page 152] Internet-Draft Matroska November 2016 each segment which can be useful in some cases (switch between 4:3 and 16:9 in some TV programs for example). The Segment(s) being continuous, certain elements like Meta Seek, Cues, Chapters, Attachments MUST NOT be used in this context. On the player side, it is possible to detect that a stream is not seekable. If the stream does not have a Meta Seek list or a Cues list at the beginning of the stream, it SHOULD be considered as non seekable. Even though it's still theoretically possible to seek blindly forward in the stream, if the server supports it. In the context of a live radio or even web TV it is possible to "Tag" the content that is currently playing. The Tags level 1 element can be placed between Clusters each time necessary. In that case, the new Tags found MUST reset the previously encountered tags and use the new values instead (be they empty). 43. Menu Specifications 44. Introduction 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. 45. 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 players, the Control Track will just give orders to the player and get the actions associated with the highlights/hotspots. 45.1. Highlights/Hotspots A hightlight is basically a rectangle/key associated with an action UID. When that rectangle/key is activated, the 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 Lhomme, et al. Expires May 27, 2017 [Page 153] Internet-Draft Matroska November 2016 shortcut or button panel could be used for menues. But in that case, the hotspot will have to be associated with a name to display. So this hightlight is sent from the Control Track to the Player. Then the player has to handle that highlight until it's disactivated (see Playback features [94]) The hightlight 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 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 player. The format used for storing images SHOULD be extensible. For the moment we'll use PNG and BMP, both with alpha channel. 45.2. Playback features All the following features will be sent from the Control Track to the 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 May 27, 2017 [Page 154] Internet-Draft Matroska November 2016 o Enable/Disable a Chapter UID o Hide/Unhide a Chapter UID All the actions will be writen in a normal Matroska track, with a timecode. A "Menu Frame" SHOULD be able to contain more that one action/highlight for a given timecode. (to be determined, EBML format structure) 45.3. Player requirements Some 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 player encouter 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. 46. Working Graph 47. Ideas 48. Data Structure As a Matroska side project, the obvious choice for storing binary data is EBML. 49. References 49.1. URIs [1] http://mukoli.free.fr/mcf/mcf.html [2] https://github.com/Matroska-Org/ebml-specification/blob/master/ specification.markdown [3] https://datatracker.ietf.org/wg/cellar/charter/ [4] https://matroska.org/files/matroska.pdf [5] {{site.baseurl}}/diagram.html [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 Lhomme, et al. Expires May 27, 2017 [Page 155] Internet-Draft Matroska November 2016 [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] http://www.loc.gov/standards/iso639-2/php/English_list.php [14] http://www.iana.org/cctld/cctld-whois.htm [15] {{site.baseurl}}/index.html#block [16] http://www.webmproject.org/docs/container/ [17] http://www.matroska.org/downloads/test_w1.html [18] {{site.baseurl}}/index.html#Cluster [19] {{site.baseurl}}/index.html#Timecode [20] {{site.baseurl}}/notes.html#TimecodeScale [21] {{site.baseurl}}/index.html#Cluster [22] {{site.baseurl}}/index.html#Timecode [23] {{site.baseurl}}/notes.html#Encryption [24] {{site.baseurl}}/notes.html#unknown-elements [25] {{site.baseurl}}/index.html#Cluster [26] {{site.baseurl}}/index.html#Timecode [27] {{site.baseurl}}/index.html#TimecodeScale [28] {{site.baseurl}}/index.html#Cluster [29] {{site.baseurl}}/index.html#Timecode Lhomme, et al. Expires May 27, 2017 [Page 156] Internet-Draft Matroska November 2016 [30] {{site.baseurl}}/index.html#Cluster [31] {{site.baseurl}}/index.html#Timecode [32] {{site.baseurl}}/index.html#TrackTimeCodeScale [33] {{site.baseurl}}/notes.html#raw-timecode [34] {{site.baseurl}}/notes.html#timecode-types [35] {{site.baseurl}}/notes.html#matroska-version-indicators- doctypeversion-and-doctypereadversion [36] {{site.baseurl}}/index.html#StereoMode [37] {{site.baseurl}}/index.html#TrackOperation [38] {{site.baseurl}}/index.html#TrackCombinePlanes [39] {{site.baseurl}}/notes.html#track-operation [40] {{site.baseurl}}/index.html#TrackOperation [41] {{site.baseurl}}/index.html#Void [42] {{site.baseurl}}/order_guidelines.html#tags-end [43] http://haali.su/mkv/codecs.pdf [44] {{site.baseurl}}/index.html [45] {{site.baseurl}}/index.html#CodecID [46] http://msdn.microsoft.com/library/default.asp?url=/library/en- us/gdi/bitmaps_1rw2.asp [47] http://forum.doom9.org/showthread.php?s=&threadid=55773&perpage= 20&pagenumber=2#post331855 [48] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ librmff.h [49] https://developer.apple.com/library/mac/documentation/QuickTime/ QTFF/QTFFPreface/qtffPreface.html [50] {{site.baseurl}}/index.html#lacing [51] http://www.theora.org/doc/Theora_I_spec.pdf Lhomme, et al. Expires May 27, 2017 [Page 157] Internet-Draft Matroska November 2016 [52] http://wiki.multimedia.cx/ index.php?title=Apple_ProRes#Frame_layout [53] http://alac.macosforge.org/trac/browser/trunk/ ALACMagicCookieDescription.txt [54] {{site.baseurl}}/index.html#lacing [55] http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html [56] http://www.xiph.org/ogg/vorbis/doc/v-comment.html [57] http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-ref.html [58] http://flac.sourceforge.net/ [59] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ librmff.h [60] http://msdn.microsoft.com/library/default.asp?url=/library/en- us/multimed/mmstr_625u.asp [61] https://developer.apple.com/library/mac/documentation/QuickTime/ QTFF/QTFFPreface/qtffPreface.html [62] http://tausoft.org/ [63] http://tausoft.org/wiki/True_Audio_Codec_Format [64] http://www.wavpack.com/ [65] wavpack.html [66] {{site.baseurl}}/subtitles.html [67] {{site.baseurl}}/subtitles.html [68] {{site.baseurl}}/subtitles.html [69] {{site.baseurl}}/subtitles.html [70] {{site.baseurl}}/subtitles.html [71] http://wiki.xiph.org/index.php/OggKate#Matroska_mapping [72] http://dvd.sourceforge.net/dvdinfo/pci_pkt.html [73] http://dvd.sourceforge.net/dvdinfo/pci_pkt.html Lhomme, et al. Expires May 27, 2017 [Page 158] Internet-Draft Matroska November 2016 [74] {{site.baseurl}}/index.html#ChapProcessCodecID [75] {{site.baseurl}}/index.html#ChapProcessCodecID [76] {{site.baseurl}}/index.html#ChapterTranslateID [77] http://dvd.sourceforge.net/dvdinfo/uops.html [78] http://www.dvd-replica.com/DVD/ [79] http://dvd.sourceforge.net/dvdinfo/ [80] http://wiki.multimedia.cx/index.php?title=SubStation_Alpha [81] http://moodub.free.fr/video/ass-specs.doc [83] mailto:kotus@eswat.demon.co.uk [85] mailto:kotus@eswat.demon.co.uk [86] https://www.w3.org/ [87] https://w3c.github.io/webvtt/ [88] http://www.webmproject.org/docs/container/ [89] http://www.matroska.org/files/tags/matroskatags.dtd [90] http://www.bunkus.org/videotools/mkvtoolnix/doc/ mkvmerge.html#mkvmerge.tags [91] othertagsystems/comparetable.html [92] https://sourceforge.net/projects/matroska/files/test_files/ cover_art.mkv/download [93] {{site.baseurl}}/index.html [94] {{site.baseurl}}/chapters/menu.html#playback-features Authors' Addresses Steve Lhomme Moritz Bunkus Lhomme, et al. Expires May 27, 2017 [Page 159] Internet-Draft Matroska November 2016 Dave Rice Lhomme, et al. Expires May 27, 2017 [Page 160]