idnits 2.17.1 draft-ietf-cellar-matroska-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 665 has weird spacing: '...xx xxxx xxxx ...' == Line 666 has weird spacing: '...1x xxxx xxxx ...' == Line 667 has weird spacing: '...01 xxxx xxxx ...' == Line 669 has weird spacing: '...00 1xxx xxxx ...' == Line 670 has weird spacing: '...xx xxxx xxxx ...' == (4 more instances...) == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. -- The exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timestamps MAY NOT be consecutive. But a frame with a past timestamp MUST reference a frame already known, otherwise it's considered bad/void. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timestamps MAY NOT be consecutive. But a frame with a past timestamp MUST reference a frame already known, otherwise it's considered bad/void. -- The document date (July 26, 2018) is 2094 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '1' on line 7616 looks like a reference -- Missing reference section? '2' on line 7618 looks like a reference -- Missing reference section? '3' on line 7621 looks like a reference -- Missing reference section? '4' on line 7623 looks like a reference -- Missing reference section? '5' on line 7625 looks like a reference -- Missing reference section? '6' on line 7627 looks like a reference -- Missing reference section? '7' on line 7630 looks like a reference -- Missing reference section? '8' on line 7633 looks like a reference -- Missing reference section? '9' on line 7635 looks like a reference -- Missing reference section? '10' on line 7638 looks like a reference -- Missing reference section? '11' on line 7641 looks like a reference -- Missing reference section? '12' on line 7644 looks like a reference -- Missing reference section? '13' on line 7647 looks like a reference -- Missing reference section? '14' on line 7649 looks like a reference -- Missing reference section? '15' on line 7651 looks like a reference -- Missing reference section? '16' on line 7653 looks like a reference -- Missing reference section? '0' on line 6479 looks like a reference -- Missing reference section? '17' on line 7655 looks like a reference -- Missing reference section? '18' on line 7657 looks like a reference -- Missing reference section? '19' on line 7659 looks like a reference -- Missing reference section? '20' on line 7661 looks like a reference Summary: 1 error (**), 0 flaws (~~), 10 warnings (==), 24 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 cellar S. Lhomme 3 Internet-Draft 4 Intended status: Standards Track M. Bunkus 5 Expires: January 27, 2019 6 D. Rice 7 July 26, 2018 9 Matroska Specifications 10 draft-ietf-cellar-matroska-01 12 Abstract 14 This document defines the Matroska audiovisual container, including 15 definitions of its structural elements, as well as its terminology, 16 vocabulary, and application. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on January 27, 2019. 35 Copyright Notice 37 Copyright (c) 2018 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (https://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 9 53 2. Status of this document . . . . . . . . . . . . . . . . . . . 10 54 3. Security Considerations . . . . . . . . . . . . . . . . . . . 10 55 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 56 5. Notation and Conventions . . . . . . . . . . . . . . . . . . 10 57 6. Basis in EBML . . . . . . . . . . . . . . . . . . . . . . . . 11 58 6.1. Added Constraints on EBML . . . . . . . . . . . . . . . . 11 59 6.2. Matroska Design . . . . . . . . . . . . . . . . . . . . . 11 60 6.2.1. Language Codes . . . . . . . . . . . . . . . . . . . 11 61 6.2.2. Physical Types . . . . . . . . . . . . . . . . . . . 12 62 6.2.3. Block Structure . . . . . . . . . . . . . . . . . . . 12 63 6.2.3.1. Block Header . . . . . . . . . . . . . . . . . . 13 64 6.2.3.2. Block Header Flags . . . . . . . . . . . . . . . 13 65 6.2.4. Lacing . . . . . . . . . . . . . . . . . . . . . . . 13 66 6.2.4.1. Xiph lacing . . . . . . . . . . . . . . . . . . . 14 67 6.2.4.2. EBML lacing . . . . . . . . . . . . . . . . . . . 14 68 6.2.4.3. Fixed-size lacing . . . . . . . . . . . . . . . . 15 69 6.2.4.4. SimpleBlock Structure . . . . . . . . . . . . . . 16 70 6.2.4.4.1. SimpleBlock Header . . . . . . . . . . . . . 16 71 6.2.4.4.2. SimpleBlock Header Flags . . . . . . . . . . 16 72 6.2.4.5. Laced Data . . . . . . . . . . . . . . . . . . . 17 73 7. Matroska Structure . . . . . . . . . . . . . . . . . . . . . 17 74 8. Matroska Additions to Schema Element Attributes . . . . . . . 26 75 9. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 27 76 9.1. EBMLMaxIDLength Element . . . . . . . . . . . . . . . . . 27 77 9.2. EBMLMaxSizeLength Element . . . . . . . . . . . . . . . . 27 78 9.3. Segment Element . . . . . . . . . . . . . . . . . . . . . 28 79 9.3.1. SeekHead Element . . . . . . . . . . . . . . . . . . 28 80 9.3.1.1. Seek Element . . . . . . . . . . . . . . . . . . 28 81 9.3.1.1.1. SeekID Element . . . . . . . . . . . . . . . 29 82 9.3.1.1.2. SeekPosition Element . . . . . . . . . . . . 29 83 9.3.2. Info Element . . . . . . . . . . . . . . . . . . . . 29 84 9.3.2.1. SegmentUID Element . . . . . . . . . . . . . . . 30 85 9.3.2.2. SegmentFilename Element . . . . . . . . . . . . . 30 86 9.3.2.3. PrevUID Element . . . . . . . . . . . . . . . . . 31 87 9.3.2.4. PrevFilename Element . . . . . . . . . . . . . . 31 88 9.3.2.5. NextUID Element . . . . . . . . . . . . . . . . . 32 89 9.3.2.6. NextFilename Element . . . . . . . . . . . . . . 32 90 9.3.2.7. SegmentFamily Element . . . . . . . . . . . . . . 33 91 9.3.2.8. ChapterTranslate Element . . . . . . . . . . . . 33 92 9.3.2.8.1. ChapterTranslateEditionUID Element . . . . . 33 93 9.3.2.8.2. ChapterTranslateCodec Element . . . . . . . . 34 94 9.3.2.8.3. ChapterTranslateID Element . . . . . . . . . 34 95 9.3.2.9. TimestampScale Element . . . . . . . . . . . . . 35 96 9.3.2.10. Duration Element . . . . . . . . . . . . . . . . 35 97 9.3.2.11. DateUTC Element . . . . . . . . . . . . . . . . . 36 98 9.3.2.12. Title Element . . . . . . . . . . . . . . . . . . 36 99 9.3.2.13. MuxingApp Element . . . . . . . . . . . . . . . . 36 100 9.3.2.14. WritingApp Element . . . . . . . . . . . . . . . 37 101 9.3.3. Cluster Element . . . . . . . . . . . . . . . . . . . 37 102 9.3.3.1. Timestamp Element . . . . . . . . . . . . . . . . 38 103 9.3.3.2. SilentTracks Element . . . . . . . . . . . . . . 38 104 9.3.3.2.1. SilentTrackNumber Element . . . . . . . . . . 38 105 9.3.3.3. Position Element . . . . . . . . . . . . . . . . 39 106 9.3.3.4. PrevSize Element . . . . . . . . . . . . . . . . 39 107 9.3.3.5. SimpleBlock Element . . . . . . . . . . . . . . . 39 108 9.3.3.6. BlockGroup Element . . . . . . . . . . . . . . . 40 109 9.3.3.6.1. Block Element . . . . . . . . . . . . . . . . 40 110 9.3.3.6.2. BlockVirtual Element . . . . . . . . . . . . 40 111 9.3.3.6.3. BlockAdditions Element . . . . . . . . . . . 41 112 9.3.3.6.3.1. BlockMore Element . . . . . . . . . . . . 41 113 9.3.3.6.3.2. BlockAddID Element . . . . . . . . . . . 42 114 9.3.3.6.3.3. BlockAdditional Element . . . . . . . . . 42 115 9.3.3.6.4. BlockDuration Element . . . . . . . . . . . . 42 116 9.3.3.6.5. ReferencePriority Element . . . . . . . . . . 43 117 9.3.3.6.6. ReferenceBlock Element . . . . . . . . . . . 43 118 9.3.3.6.7. ReferenceVirtual Element . . . . . . . . . . 44 119 9.3.3.6.8. CodecState Element . . . . . . . . . . . . . 44 120 9.3.3.6.9. DiscardPadding Element . . . . . . . . . . . 45 121 9.3.3.6.10. Slices Element . . . . . . . . . . . . . . . 45 122 9.3.3.6.10.1. TimeSlice Element . . . . . . . . . . . 45 123 9.3.3.6.10.2. LaceNumber Element . . . . . . . . . . . 46 124 9.3.3.6.10.3. FrameNumber Element . . . . . . . . . . 46 125 9.3.3.6.10.4. BlockAdditionID Element . . . . . . . . 47 126 9.3.3.6.10.5. Delay Element . . . . . . . . . . . . . 47 127 9.3.3.6.10.6. SliceDuration Element . . . . . . . . . 48 128 9.3.3.6.11. ReferenceFrame Element . . . . . . . . . . . 48 129 9.3.3.6.11.1. ReferenceOffset Element . . . . . . . . 48 130 9.3.3.6.11.2. ReferenceTimestamp Element . . . . . . . 49 131 9.3.3.7. EncryptedBlock Element . . . . . . . . . . . . . 49 132 9.3.4. Tracks Element . . . . . . . . . . . . . . . . . . . 50 133 9.3.4.1. TrackEntry Element . . . . . . . . . . . . . . . 50 134 9.3.4.1.1. TrackNumber Element . . . . . . . . . . . . . 50 135 9.3.4.1.2. TrackUID Element . . . . . . . . . . . . . . 51 136 9.3.4.1.3. TrackType Element . . . . . . . . . . . . . . 51 137 9.3.4.1.4. FlagEnabled Element . . . . . . . . . . . . . 52 138 9.3.4.1.5. FlagDefault Element . . . . . . . . . . . . . 52 139 9.3.4.1.6. FlagForced Element . . . . . . . . . . . . . 53 140 9.3.4.1.7. FlagLacing Element . . . . . . . . . . . . . 53 141 9.3.4.1.8. MinCache Element . . . . . . . . . . . . . . 54 142 9.3.4.1.9. MaxCache Element . . . . . . . . . . . . . . 54 143 9.3.4.1.10. DefaultDuration Element . . . . . . . . . . . 55 144 9.3.4.1.11. DefaultDecodedFieldDuration Element . . . . . 55 145 9.3.4.1.12. TrackTimestampScale Element . . . . . . . . . 55 146 9.3.4.1.13. TrackOffset Element . . . . . . . . . . . . . 56 147 9.3.4.1.14. MaxBlockAdditionID Element . . . . . . . . . 56 148 9.3.4.1.15. Name Element . . . . . . . . . . . . . . . . 57 149 9.3.4.1.16. Language Element . . . . . . . . . . . . . . 57 150 9.3.4.1.17. LanguageIETF Element . . . . . . . . . . . . 58 151 9.3.4.1.18. CodecID Element . . . . . . . . . . . . . . . 58 152 9.3.4.1.19. CodecPrivate Element . . . . . . . . . . . . 58 153 9.3.4.1.20. CodecName Element . . . . . . . . . . . . . . 59 154 9.3.4.1.21. AttachmentLink Element . . . . . . . . . . . 59 155 9.3.4.1.22. CodecSettings Element . . . . . . . . . . . . 59 156 9.3.4.1.23. CodecInfoURL Element . . . . . . . . . . . . 60 157 9.3.4.1.24. CodecDownloadURL Element . . . . . . . . . . 60 158 9.3.4.1.25. CodecDecodeAll Element . . . . . . . . . . . 61 159 9.3.4.1.26. TrackOverlay Element . . . . . . . . . . . . 61 160 9.3.4.1.27. CodecDelay Element . . . . . . . . . . . . . 61 161 9.3.4.1.28. SeekPreRoll Element . . . . . . . . . . . . . 62 162 9.3.4.1.29. TrackTranslate Element . . . . . . . . . . . 62 163 9.3.4.1.29.1. TrackTranslateEditionUID Element . . . . 63 164 9.3.4.1.29.2. TrackTranslateCodec Element . . . . . . 63 165 9.3.4.1.29.3. TrackTranslateTrackID Element . . . . . 64 166 9.3.4.1.30. Video Element . . . . . . . . . . . . . . . . 64 167 9.3.4.1.30.1. FlagInterlaced Element . . . . . . . . . 64 168 9.3.4.1.30.2. FieldOrder Element . . . . . . . . . . . 65 169 9.3.4.1.30.3. StereoMode Element . . . . . . . . . . . 66 170 9.3.4.1.30.4. AlphaMode Element . . . . . . . . . . . 67 171 9.3.4.1.30.5. OldStereoMode Element . . . . . . . . . 67 172 9.3.4.1.30.6. PixelWidth Element . . . . . . . . . . . 68 173 9.3.4.1.30.7. PixelHeight Element . . . . . . . . . . 68 174 9.3.4.1.30.8. PixelCropBottom Element . . . . . . . . 69 175 9.3.4.1.30.9. PixelCropTop Element . . . . . . . . . . 69 176 9.3.4.1.30.10. PixelCropLeft Element . . . . . . . . . 70 177 9.3.4.1.30.11. PixelCropRight Element . . . . . . . . . 70 178 9.3.4.1.30.12. DisplayWidth Element . . . . . . . . . . 70 179 9.3.4.1.30.13. DisplayHeight Element . . . . . . . . . 71 180 9.3.4.1.30.14. DisplayUnit Element . . . . . . . . . . 71 181 9.3.4.1.30.15. AspectRatioType Element . . . . . . . . 72 182 9.3.4.1.30.16. ColourSpace Element . . . . . . . . . . 73 183 9.3.4.1.30.17. GammaValue Element . . . . . . . . . . . 73 184 9.3.4.1.30.18. FrameRate Element . . . . . . . . . . . 73 185 9.3.4.1.30.19. Colour Element . . . . . . . . . . . . . 74 186 9.3.4.1.30.20. MatrixCoefficients Element . . . . . . . 74 187 9.3.4.1.30.21. BitsPerChannel Element . . . . . . . . . 75 188 9.3.4.1.30.22. ChromaSubsamplingHorz Element . . . . . 75 189 9.3.4.1.30.23. ChromaSubsamplingVert Element . . . . . 76 190 9.3.4.1.30.24. CbSubsamplingHorz Element . . . . . . . 76 191 9.3.4.1.30.25. CbSubsamplingVert Element . . . . . . . 77 192 9.3.4.1.30.26. ChromaSitingHorz Element . . . . . . . . 77 193 9.3.4.1.30.27. ChromaSitingVert Element . . . . . . . . 78 194 9.3.4.1.30.28. Range Element . . . . . . . . . . . . . 78 195 9.3.4.1.30.29. TransferCharacteristics Element . . . . 79 196 9.3.4.1.30.30. Primaries Element . . . . . . . . . . . 80 197 9.3.4.1.30.31. MaxCLL Element . . . . . . . . . . . . . 81 198 9.3.4.1.30.32. MaxFALL Element . . . . . . . . . . . . 81 199 9.3.4.1.30.33. MasteringMetadata Element . . . . . . . 82 200 9.3.4.1.30.34. PrimaryRChromaticityX Element . . . . . 82 201 9.3.4.1.30.35. PrimaryRChromaticityY Element . . . . . 82 202 9.3.4.1.30.36. PrimaryGChromaticityX Element . . . . . 83 203 9.3.4.1.30.37. PrimaryGChromaticityY Element . . . . . 83 204 9.3.4.1.30.38. PrimaryBChromaticityX Element . . . . . 84 205 9.3.4.1.30.39. PrimaryBChromaticityY Element . . . . . 84 206 9.3.4.1.30.40. WhitePointChromaticityX Element . . . . 84 207 9.3.4.1.30.41. WhitePointChromaticityY Element . . . . 85 208 9.3.4.1.30.42. LuminanceMax Element . . . . . . . . . . 85 209 9.3.4.1.30.43. LuminanceMin Element . . . . . . . . . . 86 210 9.3.4.1.30.44. Projection Element . . . . . . . . . . . 86 211 9.3.4.1.30.45. ProjectionType Element . . . . . . . . . 86 212 9.3.4.1.30.46. ProjectionPrivate Element . . . . . . . 87 213 9.3.4.1.30.47. ProjectionPoseYaw Element . . . . . . . 88 214 9.3.4.1.30.48. ProjectionPosePitch Element . . . . . . 88 215 9.3.4.1.30.49. ProjectionPoseRoll Element . . . . . . . 89 216 9.3.4.1.31. Audio Element . . . . . . . . . . . . . . . . 89 217 9.3.4.1.31.1. SamplingFrequency Element . . . . . . . 90 218 9.3.4.1.31.2. OutputSamplingFrequency Element . . . . 90 219 9.3.4.1.31.3. Channels Element . . . . . . . . . . . . 91 220 9.3.4.1.31.4. ChannelPositions Element . . . . . . . . 91 221 9.3.4.1.31.5. BitDepth Element . . . . . . . . . . . . 91 222 9.3.4.1.32. TrackOperation Element . . . . . . . . . . . 92 223 9.3.4.1.32.1. TrackCombinePlanes Element . . . . . . . 92 224 9.3.4.1.32.2. TrackPlane Element . . . . . . . . . . . 93 225 9.3.4.1.32.3. TrackPlaneUID Element . . . . . . . . . 93 226 9.3.4.1.32.4. TrackPlaneType Element . . . . . . . . . 93 227 9.3.4.1.32.5. TrackJoinBlocks Element . . . . . . . . 94 228 9.3.4.1.32.6. TrackJoinUID Element . . . . . . . . . . 94 229 9.3.4.1.33. TrickTrackUID Element . . . . . . . . . . . . 95 230 9.3.4.1.34. TrickTrackSegmentUID Element . . . . . . . . 95 231 9.3.4.1.35. TrickTrackFlag Element . . . . . . . . . . . 96 232 9.3.4.1.36. TrickMasterTrackUID Element . . . . . . . . . 96 233 9.3.4.1.37. TrickMasterTrackSegmentUID Element . . . . . 96 234 9.3.4.1.38. ContentEncodings Element . . . . . . . . . . 97 235 9.3.4.1.38.1. ContentEncoding Element . . . . . . . . 97 236 9.3.4.1.38.2. ContentEncodingOrder Element . . . . . . 98 237 9.3.4.1.38.3. ContentEncodingScope Element . . . . . . 98 238 9.3.4.1.38.4. ContentEncodingType Element . . . . . . 99 239 9.3.4.1.38.5. ContentCompression Element . . . . . . . 99 240 9.3.4.1.38.6. ContentCompAlgo Element . . . . . . . . 100 241 9.3.4.1.38.7. ContentCompSettings Element . . . . . . 100 242 9.3.4.1.38.8. ContentEncryption Element . . . . . . . 100 243 9.3.4.1.38.9. ContentEncAlgo Element . . . . . . . . . 101 244 9.3.4.1.38.10. ContentEncKeyID Element . . . . . . . . 101 245 9.3.4.1.38.11. ContentSignature Element . . . . . . . . 102 246 9.3.4.1.38.12. ContentSigKeyID Element . . . . . . . . 102 247 9.3.4.1.38.13. ContentSigAlgo Element . . . . . . . . . 102 248 9.3.4.1.38.14. ContentSigHashAlgo Element . . . . . . . 103 249 9.3.5. Cues Element . . . . . . . . . . . . . . . . . . . . 103 250 9.3.5.1. CuePoint Element . . . . . . . . . . . . . . . . 104 251 9.3.5.1.1. CueTime Element . . . . . . . . . . . . . . . 104 252 9.3.5.1.2. CueTrackPositions Element . . . . . . . . . . 104 253 9.3.5.1.2.1. CueTrack Element . . . . . . . . . . . . 105 254 9.3.5.1.2.2. CueClusterPosition Element . . . . . . . 105 255 9.3.5.1.2.3. CueRelativePosition Element . . . . . . . 105 256 9.3.5.1.2.4. CueDuration Element . . . . . . . . . . . 106 257 9.3.5.1.2.5. CueBlockNumber Element . . . . . . . . . 106 258 9.3.5.1.2.6. CueCodecState Element . . . . . . . . . . 107 259 9.3.5.1.2.7. CueReference Element . . . . . . . . . . 107 260 9.3.5.1.2.8. CueRefTime Element . . . . . . . . . . . 107 261 9.3.5.1.2.9. CueRefCluster Element . . . . . . . . . . 108 262 9.3.5.1.2.10. CueRefNumber Element . . . . . . . . . . 108 263 9.3.5.1.2.11. CueRefCodecState Element . . . . . . . . 109 264 9.3.6. Attachments Element . . . . . . . . . . . . . . . . . 109 265 9.3.6.1. AttachedFile Element . . . . . . . . . . . . . . 110 266 9.3.6.1.1. FileDescription Element . . . . . . . . . . . 110 267 9.3.6.1.2. FileName Element . . . . . . . . . . . . . . 110 268 9.3.6.1.3. FileMimeType Element . . . . . . . . . . . . 111 269 9.3.6.1.4. FileData Element . . . . . . . . . . . . . . 111 270 9.3.6.1.5. FileUID Element . . . . . . . . . . . . . . . 111 271 9.3.6.1.6. FileReferral Element . . . . . . . . . . . . 112 272 9.3.6.1.7. FileUsedStartTime Element . . . . . . . . . . 112 273 9.3.6.1.8. FileUsedEndTime Element . . . . . . . . . . . 113 274 9.3.7. Chapters Element . . . . . . . . . . . . . . . . . . 113 275 9.3.7.1. EditionEntry Element . . . . . . . . . . . . . . 113 276 9.3.7.1.1. EditionUID Element . . . . . . . . . . . . . 114 277 9.3.7.1.2. EditionFlagHidden Element . . . . . . . . . . 114 278 9.3.7.1.3. EditionFlagDefault Element . . . . . . . . . 115 279 9.3.7.1.4. EditionFlagOrdered Element . . . . . . . . . 115 280 9.3.7.1.5. ChapterAtom Element . . . . . . . . . . . . . 116 281 9.3.7.1.5.1. ChapterUID Element . . . . . . . . . . . 116 282 9.3.7.1.5.2. ChapterStringUID Element . . . . . . . . 116 283 9.3.7.1.5.3. ChapterTimeStart Element . . . . . . . . 117 284 9.3.7.1.5.4. ChapterTimeEnd Element . . . . . . . . . 117 285 9.3.7.1.5.5. ChapterFlagHidden Element . . . . . . . . 118 286 9.3.7.1.5.6. ChapterFlagEnabled Element . . . . . . . 118 287 9.3.7.1.5.7. ChapterSegmentUID Element . . . . . . . . 119 288 9.3.7.1.5.8. ChapterSegmentEditionUID Element . . . . 119 289 9.3.7.1.5.9. ChapterPhysicalEquiv Element . . . . . . 120 290 9.3.7.1.5.10. ChapterTrack Element . . . . . . . . . . 120 291 9.3.7.1.5.11. ChapterTrackNumber Element . . . . . . . 120 292 9.3.7.1.5.12. ChapterDisplay Element . . . . . . . . . 121 293 9.3.7.1.5.13. ChapString Element . . . . . . . . . . . 121 294 9.3.7.1.5.14. ChapLanguage Element . . . . . . . . . . 122 295 9.3.7.1.5.15. ChapLanguageIETF Element . . . . . . . . 122 296 9.3.7.1.5.16. ChapCountry Element . . . . . . . . . . . 122 297 9.3.7.1.5.17. ChapProcess Element . . . . . . . . . . . 123 298 9.3.7.1.5.18. ChapProcessCodecID Element . . . . . . . 123 299 9.3.7.1.5.19. ChapProcessPrivate Element . . . . . . . 124 300 9.3.7.1.5.20. ChapProcessCommand Element . . . . . . . 124 301 9.3.7.1.5.21. ChapProcessTime Element . . . . . . . . . 124 302 9.3.7.1.5.22. ChapProcessData Element . . . . . . . . . 125 303 9.3.8. Tags Element . . . . . . . . . . . . . . . . . . . . 125 304 9.3.8.1. Tag Element . . . . . . . . . . . . . . . . . . . 126 305 9.3.8.1.1. Targets Element . . . . . . . . . . . . . . . 126 306 9.3.8.1.1.1. TargetTypeValue Element . . . . . . . . . 126 307 9.3.8.1.1.2. TargetType Element . . . . . . . . . . . 127 308 9.3.8.1.1.3. TagTrackUID Element . . . . . . . . . . . 128 309 9.3.8.1.1.4. TagEditionUID Element . . . . . . . . . . 129 310 9.3.8.1.1.5. TagChapterUID Element . . . . . . . . . . 129 311 9.3.8.1.1.6. TagAttachmentUID Element . . . . . . . . 129 312 9.3.8.1.2. SimpleTag Element . . . . . . . . . . . . . . 130 313 9.3.8.1.2.1. TagName Element . . . . . . . . . . . . . 130 314 9.3.8.1.2.2. TagLanguage Element . . . . . . . . . . . 131 315 9.3.8.1.2.3. TagLanguageIETF Element . . . . . . . . . 131 316 9.3.8.1.2.4. TagDefault Element . . . . . . . . . . . 131 317 9.3.8.1.2.5. TagString Element . . . . . . . . . . . . 132 318 9.3.8.1.2.6. TagBinary Element . . . . . . . . . . . . 132 319 10. Matroska Element Ordering . . . . . . . . . . . . . . . . . . 133 320 10.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 133 321 10.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 133 322 10.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 133 323 10.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 134 324 10.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 134 325 10.6. Chapters Element . . . . . . . . . . . . . . . . . . . . 134 326 10.7. Attachments . . . . . . . . . . . . . . . . . . . . . . 134 327 10.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 135 328 10.9. Optimum layout from a muxer . . . . . . . . . . . . . . 135 329 10.10. Optimum layout after editing tags . . . . . . . . . . . 135 330 10.11. Optimum layout with Cues at the front . . . . . . . . . 136 331 10.12. Cluster Timestamp . . . . . . . . . . . . . . . . . . . 136 332 11. Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 136 333 11.1. Edition and Chapter Flags . . . . . . . . . . . . . . . 136 334 11.1.1. Chapter Flags . . . . . . . . . . . . . . . . . . . 136 335 11.1.2. Edition Flags . . . . . . . . . . . . . . . . . . . 137 336 11.1.2.1. EditionFlagHidden . . . . . . . . . . . . . . . 137 337 11.1.2.2. EditionFlagDefault . . . . . . . . . . . . . . . 137 338 11.1.2.3. EditionFlagOrdered . . . . . . . . . . . . . . . 137 339 11.1.2.3.1. Ordered-Edition and Matroska Segment-Linking 138 340 11.2. Menu features . . . . . . . . . . . . . . . . . . . . . 139 341 11.2.1. Matroska Script (0) . . . . . . . . . . . . . . . . 139 342 11.2.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . 139 343 11.3. Example 1 : basic chaptering . . . . . . . . . . . . . . 141 344 11.4. Example 2 : nested chapters . . . . . . . . . . . . . . 143 345 11.4.1. The Micronauts "Bleep To Bleep" . . . . . . . . . . 143 346 12. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 146 347 12.1. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 146 348 13. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 349 13.1. Recommendations . . . . . . . . . . . . . . . . . . . . 147 350 14. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 148 351 14.1. File Access . . . . . . . . . . . . . . . . . . . . . . 148 352 14.2. Livestreaming . . . . . . . . . . . . . . . . . . . . . 148 353 15. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 149 354 15.1. Requirements . . . . . . . . . . . . . . . . . . . . . . 149 355 15.1.1. Highlights/Hotspots . . . . . . . . . . . . . . . . 149 356 15.1.2. Playback features . . . . . . . . . . . . . . . . . 150 357 15.1.3. Player requirements . . . . . . . . . . . . . . . . 151 358 15.2. Working Graph . . . . . . . . . . . . . . . . . . . . . 151 359 16. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 151 360 17. Default Values . . . . . . . . . . . . . . . . . . . . . . . 151 361 18. DefaultDecodedFieldDuration . . . . . . . . . . . . . . . . . 152 362 19. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 152 363 20. Image cropping . . . . . . . . . . . . . . . . . . . . . . . 153 364 21. Matroska versioning . . . . . . . . . . . . . . . . . . . . . 153 365 22. MIME Types . . . . . . . . . . . . . . . . . . . . . . . . . 154 366 23. Segment Position . . . . . . . . . . . . . . . . . . . . . . 154 367 23.1. Segment Position Exception . . . . . . . . . . . . . . . 154 368 23.2. Example of Segment Position . . . . . . . . . . . . . . 154 369 24. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 155 370 24.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 155 371 24.2. Medium Linking . . . . . . . . . . . . . . . . . . . . . 156 372 24.3. Soft Linking . . . . . . . . . . . . . . . . . . . . . . 156 373 25. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 157 374 25.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 157 375 25.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 157 376 25.3. Track Operation . . . . . . . . . . . . . . . . . . . . 157 377 25.4. Overlay Track . . . . . . . . . . . . . . . . . . . . . 158 378 25.5. Multi-planar and 3D videos . . . . . . . . . . . . . . . 158 379 26. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . 159 380 26.1. Timestamp Types . . . . . . . . . . . . . . . . . . . . 159 381 26.2. Block Timestamps . . . . . . . . . . . . . . . . . . . . 159 382 26.3. Raw Timestamp . . . . . . . . . . . . . . . . . . . . . 159 383 26.4. TimestampScale . . . . . . . . . . . . . . . . . . . . . 159 384 26.5. TimestampScale Rounding . . . . . . . . . . . . . . . . 160 385 26.6. TrackTimestampScale . . . . . . . . . . . . . . . . . . 162 386 27.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 163 387 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 164 389 1. Introduction 391 Matroska aims to become THE standard of multimedia container formats. 392 It was derived from a project called MCF [1], but differentiates from 393 it significantly because it is based on EBML [2] (Extensible Binary 394 Meta Language), a binary derivative of XML. EBML enables significant 395 advantages in terms of future format extensibility, without breaking 396 file support in old parsers. 398 First, it is essential to clarify exactly "What an Audio/Video 399 container is", to avoid any misunderstandings: 401 o It is NOT a video or audio compression format (codec) 403 o It is an envelope for which there can be many audio, video and 404 subtitles streams, allowing the user to store a complete movie or 405 CD in a single file. 407 Matroska is designed with the future in mind. It incorporates 408 features like: 410 o Fast seeking in the file 412 o Chapter entries 414 o Full metadata (tags) support 416 o Selectable subtitle/audio/video streams 418 o Modularly expandable 420 o Error resilience (can recover playback even when the stream is 421 damaged) 423 o Streamable over the internet and local networks (HTTP, CIFS, FTP, 424 etc) 426 o Menus (like DVDs have) 428 Matroska is an open standards project. This means for personal use 429 it is absolutely free to use and that the technical specifications 430 describing the bitstream are open to everybody, even to companies 431 that would like to support it in their products. 433 2. Status of this document 435 This document is a work-in-progress specification defining the 436 Matroska file format as part of the IETF Cellar working group [3]. 437 But since it's quite complete it is used as a reference for the 438 development of libmatroska. Legacy versions of the specification can 439 be found here [4] (PDF doc by Alexander Noe -- outdated). 441 For a simplified diagram of the layout of a Matroska file, see the 442 Diagram page [5]. 444 A more refined and detailed version of the EBML specifications is 445 being worked on here [6]. 447 The table found below is now generated from the "source" of the 448 Matroska specification. This XML file [7] is also used to generate 449 the semantic data used in libmatroska and libmatroska2. We encourage 450 anyone to use and monitor its changes so your code is spec-proof and 451 always up to date. 453 Note that versions 1, 2 and 3 have been finalized. Version 4 is 454 currently work in progress. There MAY be further additions to v4. 456 3. Security Considerations 458 Matroska inherits security considerations from EBML. 460 Attacks on a "Matroska Reader" could include: 462 o Storage of a arbitrary and potentially executable data within an 463 "Attachment Element". "Matroska Readers" that extract or use data 464 from Matroska Attachments SHOULD check that the data adheres to 465 expectations. 467 o A "Matroska Attachment" with an inaccurate mime-type. 469 4. IANA Considerations 471 To be determined. 473 5. Notation and Conventions 475 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 476 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 477 document are to be interpreted as described in RFC 2119 [8]. 479 This document defines specific terms in order to define the format 480 and application of "Matroska". Specific terms are defined below: 482 "Matroska": a multimedia container format based on EBML (Extensible 483 Binary Meta Language) 485 "Matroska Reader": A "Matroska Reader" is a data parser that 486 interprets the semantics of a Matroska document and creates a way for 487 programs to use "Matroska". 489 "Matroska Player": A "Matroska Player" is a "Matroska Reader" with a 490 primary purpose of playing audiovisual files, including "Matroska" 491 documents. 493 6. Basis in EBML 495 Matroska is a Document Type of EBML (Extensible Binary Meta 496 Language). This specification is dependent on the EBML Specification 497 [9]. For an understanding of Matroska's EBML Schema, see in 498 particular the sections of the EBML Specification covering EBML 499 Element Types [10], EBML Schema [11], and EBML Structure [12]. 501 6.1. Added Constraints on EBML 503 As an EBML Document Type, Matroska adds the following constraints to 504 the EBML specification. 506 o The "docType" of the "EBML Header" MUST be 'matroska'. 508 o The "EBMLMaxIDLength" of the "EBML Header" MUST be "4". 510 o The "EBMLMaxSizeLength" of the "EBML Header" MUST be between "1" 511 and "8" inclusive. 513 6.2. Matroska Design 515 All top-levels elements (Segment and direct sub-elements) are coded 516 on 4 octets, i.e. class D elements. 518 6.2.1. Language Codes 520 Matroska from version 1 through 3 uses language codes that can be 521 either the 3 letters bibliographic ISO-639-2 [13] form (like "fre" 522 for french), or such a language code followed by a dash and a country 523 code for specialities in languages (like "fre-ca" for Canadian 524 French). The "ISO 639-2 Language Elements" are "Language Element", 525 "TagLanguage Element", and "ChapLanguage Element". 527 Starting in Matroska version 4, either "ISO 639-2" or BCP 47 [14] MAY 528 be used, although "BCP 47" is RECOMMENDED. The "BCP 47 Language 529 Elements" are "LanguageIETF Element", "TagLanguageIETF Element", and 530 "ChapLanguageIETF Element". If a "BCP 47 Language Element" and an 531 "ISO 639-2 Language Element" are used within the same "Parent 532 Element", then the "ISO 639-2 Language Element" MUST be ignored and 533 precedence given to the "BCP 47 Language Element". 535 Country codes are the same as used for internet domains [15]. 537 6.2.2. Physical Types 539 Each level can have different meanings for audio and video. The 540 ORIGINAL_MEDIUM tag can be used to specify a string for 541 ChapterPhysicalEquiv = 60. Here is the list of possible levels for 542 both audio and video : 544 +----------------------+--------------+-----------+-----------------+ 545 | ChapterPhysicalEquiv | Audio | Video | Comment | 546 +----------------------+--------------+-----------+-----------------+ 547 | 70 | SET / | SET / | the collection | 548 | | PACKAGE | PACKAGE | of different | 549 | | | | media | 550 | 60 | CD / 12" / | DVD / VHS | the physical | 551 | | 10" / 7" / | / | medium like a | 552 | | TAPE / | LASERDISC | CD or a DVD | 553 | | MINIDISC / | | | 554 | | DAT | | | 555 | 50 | SIDE | SIDE | when the | 556 | | | | original medium | 557 | | | | (LP/DVD) has | 558 | | | | different sides | 559 | 40 | - | LAYER | another | 560 | | | | physical level | 561 | | | | on DVDs | 562 | 30 | SESSION | SESSION | as found on CDs | 563 | | | | and DVDs | 564 | 20 | TRACK | - | as found on | 565 | | | | audio CDs | 566 | 10 | INDEX | - | the first | 567 | | | | logical level | 568 | | | | of the | 569 | | | | side/medium | 570 +----------------------+--------------+-----------+-----------------+ 572 6.2.3. Block Structure 574 Bit 0 is the most significant bit. 576 Frames using references SHOULD be stored in "coding order". That 577 means the references first and then the frames referencing them. A 578 consequence is that timestamps MAY NOT be consecutive. But a frame 579 with a past timestamp MUST reference a frame already known, otherwise 580 it's considered bad/void. 582 There can be many Blocks in a BlockGroup provided they all have the 583 same timestamp. It is used with different parts of a frame with 584 different priorities. 586 6.2.3.1. Block Header 588 +--------+--------+-------------------------------------------------+ 589 | Offset | Player | Description | 590 +--------+--------+-------------------------------------------------+ 591 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 592 | | | like form (1 octet if the value is < 0x80, 2 if | 593 | | | < 0x4000, etc) (most significant bits set to | 594 | | | increase the range). | 595 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 596 | | | signed int16) | 597 +--------+--------+-------------------------------------------------+ 599 6.2.3.2. Block Header Flags 601 +--------+-----+--------+-------------------------------------------+ 602 | Offset | Bit | Player | Description | 603 +--------+-----+--------+-------------------------------------------+ 604 | 0x03+ | 0-3 | - | Reserved, set to 0 | 605 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 606 | | | | frame but not display it | 607 | 0x03+ | 5-6 | MUST | Lacing | 608 | | | | * 00 : no lacing | 609 | | | | * 01 : Xiph lacing | 610 | | | | * 11 : EBML lacing | 611 | | | | * 10 : fixed-size lacing | 612 | 0x03+ | 7 | - | not used | 613 +--------+-----+--------+-------------------------------------------+ 615 6.2.4. Lacing 617 Lacing is a mechanism to save space when storing data. It is 618 typically used for small blocks of data (referred to as frames in 619 Matroska). There are 3 types of lacing: 621 1. Xiph, inspired by what is found in the Ogg container 623 2. EBML, which is the same with sizes coded differently 625 3. fixed-size, where the size is not coded 626 For example, a user wants to store 3 frames of the same track. The 627 first frame is 800 octets long, the second is 500 octets long and the 628 third is 1000 octets long. As these data are small, they can be 629 stored in a lace to save space. They will then be stored in the same 630 block as follows: 632 6.2.4.1. Xiph lacing 634 o Block head (with lacing bits set to 01) 636 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 637 500 octets one) 639 o Lacing sizes: only the 2 first ones will be coded, 800 gives 640 255;255;255;35, 500 gives 255;245. The size of the last frame is 641 deduced from the total size of the Block. 643 o Data in frame 1 645 o Data in frame 2 647 o Data in frame 3 649 A frame with a size multiple of 255 is coded with a 0 at the end of 650 the size, for example 765 is coded 255;255;255;0. 652 6.2.4.2. EBML lacing 654 In this case, the size is not coded as blocks of 255 bytes, but as a 655 difference with the previous size and this size is coded as in EBML. 656 The first size in the lace is unsigned as in EBML. The others use a 657 range shifting to get a sign on each value: 659 +----------------------------------+--------------------------------+ 660 | Bit Representation | Value | 661 +----------------------------------+--------------------------------+ 662 | 1xxx xxxx | value -(2^6-1) to 2^6-1 (ie 0 | 663 | | to 2^7-2 minus 2^6-1, half of | 664 | | the range) | 665 | 01xx xxxx xxxx xxxx | value -(2^13-1) to 2^13-1 | 666 | 001x xxxx xxxx xxxx xxxx xxxx | value -(2^20-1) to 2^20-1 | 667 | 0001 xxxx xxxx xxxx xxxx xxxx | value -(2^27-1) to 2^27-1 | 668 | xxxx xxxx | | 669 | 0000 1xxx xxxx xxxx xxxx xxxx | value -(2^34-1) to 2^34-1 | 670 | xxxx xxxx xxxx xxxx | | 671 | 0000 01xx xxxx xxxx xxxx xxxx | value -(2^41-1) to 2^41-1 | 672 | xxxx xxxx xxxx xxxx xxxx xxxx | | 673 | 0000 001x xxxx xxxx xxxx xxxx | value -(2^48-1) to 2^48-1 | 674 | xxxx xxxx xxxx xxxx xxxx xxxx | | 675 | xxxx xxxx | | 676 +----------------------------------+--------------------------------+ 678 o Block head (with lacing bits set to 11) 680 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 681 500 octets one) 683 o Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320 684 0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000 685 = 0x5ED3. The size of the last frame is deduced from the total 686 size of the Block. 688 o Data in frame 1 690 o Data in frame 2 692 o Data in frame 3 694 6.2.4.3. Fixed-size lacing 696 In this case, only the number of frames in the lace is saved, the 697 size of each frame is deduced from the total size of the Block. For 698 example, for 3 frames of 800 octets each: 700 o Block head (with lacing bits set to 10) 702 o Lacing head: Number of frames in the lace -1, i.e. 2 704 o Data in frame 1 706 o Data in frame 2 707 o Data in frame 3 709 6.2.4.4. SimpleBlock Structure 711 The "SimpleBlock" is inspired by the Section 6.2.3. The main 712 differences are the added Keyframe flag and Discardable flag. 713 Otherwise everything is the same. 715 Bit 0 is the most significant bit. 717 Frames using references SHOULD be stored in "coding order". That 718 means the references first and then the frames referencing them. A 719 consequence is that timestamps MAY NOT be consecutive. But a frame 720 with a past timestamp MUST reference a frame already known, otherwise 721 it's considered bad/void. 723 There can be many "Block Elements" in a "BlockGroup" provided they 724 all have the same timestamp. It is used with different parts of a 725 frame with different priorities. 727 6.2.4.4.1. SimpleBlock Header 729 +--------+--------+-------------------------------------------------+ 730 | Offset | Player | Description | 731 +--------+--------+-------------------------------------------------+ 732 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 733 | | | like form (1 octet if the value is < 0x80, 2 if | 734 | | | < 0x4000, etc) (most significant bits set to | 735 | | | increase the range). | 736 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 737 | | | signed int16) | 738 +--------+--------+-------------------------------------------------+ 740 6.2.4.4.2. SimpleBlock Header Flags 741 +--------+-----+--------+-------------------------------------------+ 742 | Offset | Bit | Player | Description | 743 +--------+-----+--------+-------------------------------------------+ 744 | 0x03+ | 0 | - | Keyframe, set when the Block contains | 745 | | | | only keyframes | 746 | 0x03+ | 1-3 | - | Reserved, set to 0 | 747 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 748 | | | | frame but not display it | 749 | 0x03+ | 5-6 | MUST | Lacing | 750 | | | | * 00 : no lacing | 751 | | | | * 01 : Xiph lacing | 752 | | | | * 11 : EBML lacing | 753 | | | | * 10 : fixed-size lacing | 754 | 0x03+ | 7 | - | Discardable, the frames of the Block can | 755 | | | | be discarded during playing if needed | 756 +--------+-----+--------+-------------------------------------------+ 758 6.2.4.5. Laced Data 760 When lacing bit is set. 762 +--------+--------+-------------------------------------------------+ 763 | Offset | Player | Description | 764 +--------+--------+-------------------------------------------------+ 765 | 0x00 | MUST | Number of frames in the lace-1 (uint8) | 766 | 0x01 / | MUST* | Lace-coded size of each frame of the lace, | 767 | 0xXX | | except for the last one (multiple uint8). *This | 768 | | | is not used with Fixed-size lacing as it is | 769 | | | calculated automatically from (total size of | 770 | | | lace) / (number of frames in lace). | 771 +--------+--------+-------------------------------------------------+ 773 For (possibly) Laced Data 775 +--------+--------+--------------------------+ 776 | Offset | Player | Description | 777 +--------+--------+--------------------------+ 778 | 0x00 | MUST | Consecutive laced frames | 779 +--------+--------+--------------------------+ 781 7. Matroska Structure 783 A Matroska file MUST be composed of at least one "EBML Document" 784 using the "Matroska Document Type". Each "EBML Document" MUST start 785 with an "EBML Header" and MUST be followed by the "EBML Root 786 Element", defined as "Segment" in Matroska. Matroska defines several 787 "Top Level Elements" which MAY occur within the "Segment". 789 As an example, a simple Matroska file consisting of a single "EBML 790 Document" could be represented like this: 792 o "EBML Header" 794 o "Segment" 796 A more complex Matroska file consisting of an "EBML Stream" 797 (consisting of two "EBML Documents") could be represented like this: 799 o "EBML Header" 801 o "Segment" 803 o "EBML Header" 805 o "Segment" 807 The following diagram represents a simple Matroska file, comprised of 808 an "EBML Document" with an "EBML Header", a "Segment Element" (the 809 "Root Element"), and all eight Matroska "Top Level Elements". In the 810 following diagrams of this section, horizontal spacing expresses a 811 parent-child relationship between Matroska Elements (e.g. the "Info 812 Element" is contained within the "Segment Element") whereas vertical 813 alignment represents the storage order within the file. 815 +-------------+ 816 | EBML Header | 817 +---------------------------+ 818 | Segment | SeekHead | 819 | |-------------| 820 | | Info | 821 | |-------------| 822 | | Tracks | 823 | |-------------| 824 | | Chapters | 825 | |-------------| 826 | | Cluster | 827 | |-------------| 828 | | Cues | 829 | |-------------| 830 | | Attachments | 831 | |-------------| 832 | | Tags | 833 +---------------------------+ 835 The Matroska "EBML Schema" defines eight "Top Level Elements": 836 "SeekHead", "Info", "Tracks", "Chapters", "Cluster", "Cues", 837 "Attachments", and "Tags". 839 The "SeekHead Element" (also known as "MetaSeek") contains an index 840 of "Top Level Elements" locations within the "Segment". Use of the 841 "SeekHead Element" is RECOMMENDED. Without a "SeekHead Element", a 842 Matroska parser would have to search the entire file to find all of 843 the other "Top Level Elements". This is due to Matroska's flexible 844 ordering requirements; for instance, it is acceptable for the 845 "Chapters Element" to be stored after the "Cluster Elements". 847 +--------------------------------+ 848 | SeekHead | Seek | SeekID | 849 | | |--------------| 850 | | | SeekPosition | 851 +--------------------------------+ 853 Representation of a SeekHead Element. 855 The "Info Element" contains vital information for identifying the 856 whole "Segment". This includes the title for the "Segment", a 857 randomly generated unique identifier, and the unique identifier(s) of 858 any linked "Segment Elements". 860 +-------------------------+ 861 | Info | SegmentUID | 862 | |------------------| 863 | | SegmentFilename | 864 | |------------------| 865 | | PrevUID | 866 | |------------------| 867 | | PrevFilename | 868 | |------------------| 869 | | NextUID | 870 | |------------------| 871 | | NextFilename | 872 | |------------------| 873 | | SegmentFamily | 874 | |------------------| 875 | | ChapterTranslate | 876 | |------------------| 877 | | TimestampScale | 878 | |------------------| 879 | | Duration | 880 | |------------------| 881 | | DateUTC | 882 | |------------------| 883 | | Title | 884 | |------------------| 885 | | MuxingApp | 886 | |------------------| 887 | | WritingApp | 888 |-------------------------| 890 Representation of an Info Element and its Child Elements. 892 The "Tracks Element" defines the technical details for each track and 893 can store the name, number, unique identifier, language and type 894 (audio, video, subtitles, etc.) of each track. For example, the 895 "Tracks Element" MAY store information about the resolution of a 896 video track or sample rate of an audio track. 898 The "Tracks Element" MUST identify all the data needed by the codec 899 to decode the data of the specified track. However, the data 900 required is contingent on the codec used for the track. For example, 901 a "Track Element" for uncompressed audio only requires the audio bit 902 rate to be present. A codec such as AC-3 would require that the 903 "CodecID Element" be present for all tracks, as it is the primary way 904 to identify which codec to use to decode the track. 906 +------------------------------------+ 907 | Tracks | TrackEntry | TrackNumber | 908 | | |--------------| 909 | | | TrackUID | 910 | | |--------------| 911 | | | TrackType | 912 | | |--------------| 913 | | | Name | 914 | | |--------------| 915 | | | Language | 916 | | |--------------| 917 | | | CodecID | 918 | | |--------------| 919 | | | CodecPrivate | 920 | | |--------------| 921 | | | CodecName | 922 | | |----------------------------------+ 923 | | | Video | FlagInterlaced | 924 | | | |-------------------| 925 | | | | FieldOrder | 926 | | | |-------------------| 927 | | | | StereoMode | 928 | | | |-------------------| 929 | | | | AlphaMode | 930 | | | |-------------------| 931 | | | | PixelWidth | 932 | | | |-------------------| 933 | | | | PixelHeight | 934 | | | |-------------------| 935 | | | | DisplayWidth | 936 | | | |-------------------| 937 | | | | DisplayHeight | 938 | | | |-------------------| 939 | | | | AspectRatioType | 940 | | | |-------------------| 941 | | | | Color | 942 | | |----------------------------------| 943 | | | Audio | SamplingFrequency | 944 | | | |-------------------| 945 | | | | Channels | 946 | | | |-------------------| 947 | | | | BitDepth | 948 |--------------------------------------------------------| 950 Representation of the Tracks Element and a selection of its 951 Descendant Elements. 953 The "Chapters Element" lists all of the chapters. Chapters are a way 954 to set predefined points to jump to in video or audio. 956 +-----------------------------------------+ 957 | Chapters | Edition | EditionUID | 958 | | Entry |--------------------| 959 | | | EditionFlagHidden | 960 | | |--------------------| 961 | | | EditionFlagDefault | 962 | | |--------------------| 963 | | | EditionFlagOrdered | 964 | | |--------------------------------+ 965 | | | ChapterAtom | ChapterUID | 966 | | | |------------------| 967 | | | | ChapterStringUID | 968 | | | |------------------| 969 | | | | ChapterTimeStart | 970 | | | |------------------| 971 | | | | ChapterTimeEnd | 972 | | | |------------------| 973 | | | | ChapterFlagHidden | 974 | | | |---------------------------------+ 975 | | | | ChapterDisplay | ChapString | 976 | | | | |--------------| 977 | | | | | ChapLanguage | 978 +--------------------------------------------------------------------+ 980 Representation of the Chapters Element and a selection of its 981 Descendant Elements. 983 "Cluster Elements" contain the content for each track, e.g. video 984 frames. A Matroska file SHOULD contain at least one "Cluster 985 Element". The "Cluster Element" helps to break up "SimpleBlock" or 986 "BlockGroup Elements" and helps with seeking and error protection. 987 It is RECOMMENDED that the size of each individual "Cluster Element" 988 be limited to store no more than 5 seconds or 5 megabytes. Every 989 "Cluster Element" MUST contain a "Timestamp Element". This SHOULD be 990 the "Timestamp Element" used to play the first "Block" in the 991 "Cluster Element". There SHOULD be one or more "BlockGroup" or 992 "SimpleBlock Element" in each "Cluster Element". A "BlockGroup 993 Element" MAY contain a "Block" of data and any information relating 994 directly to that "Block". 996 +--------------------------+ 997 | Cluster | Timestamp | 998 | |----------------| 999 | | SilentTracks | 1000 | |----------------| 1001 | | Position | 1002 | |----------------| 1003 | | PrevSize | 1004 | |----------------| 1005 | | SimpleBlock | 1006 | |----------------| 1007 | | BlockGroup | 1008 | |----------------| 1009 | | EncryptedBlock | 1010 +--------------------------+ 1012 Representation of a Cluster Element and its immediate Child Elements. 1014 +----------------------------------+ 1015 | Block | Portion of | Data Type | 1016 | | a Block | - Bit Flag | 1017 | |--------------------------+ 1018 | | Header | TrackNumber | 1019 | | |-------------| 1020 | | | Timestamp | 1021 | | |-------------| 1022 | | | Flags | 1023 | | | - Gap | 1024 | | | - Lacing | 1025 | | | - Reserved | 1026 | |--------------------------| 1027 | | Optional | FrameSize | 1028 | |--------------------------| 1029 | | Data | Frame | 1030 +----------------------------------+ 1032 Representation of the Block Element structure. 1034 Each "Cluster" MUST contain exactly one "Timestamp Element". The 1035 "Timestamp Element" value MUST be stored once per "Cluster". The 1036 "Timestamp Element" in the "Cluster" is relative to the entire 1037 "Segment". The "Timestamp Element" SHOULD be the first "Element" in 1038 the "Cluster". 1040 Additionally, the "Block" contains an offset that, when added to the 1041 "Cluster"'s "Timestamp Element" value, yields the "Block"'s effective 1042 timestamp. Therefore, timestamp in the "Block" itself is relative to 1043 the "Timestamp Element" in the "Cluster". For example, if the 1044 "Timestamp Element" in the "Cluster" is set to 10 seconds and a 1045 "Block" in that "Cluster" is supposed to be played 12 seconds into 1046 the clip, the timestamp in the "Block" would be set to 2 seconds. 1048 The "ReferenceBlock" in the "BlockGroup" is used instead of the basic 1049 "P-frame"/"B-frame" description. Instead of simply saying that this 1050 "Block" depends on the "Block" directly before, or directly 1051 afterwards, the "Timestamp" of the necessary "Block" is used. 1052 Because there can be as many "ReferenceBlock Elements" as necessary 1053 for a "Block", it allows for some extremely complex referencing. 1055 The "Cues Element" is used to seek when playing back a file by 1056 providing a temporal index for some of the "Tracks". It is similar 1057 to the "SeekHead Element", but used for seeking to a specific time 1058 when playing back the file. It is possible to seek without this 1059 element, but it is much more difficult because a "Matroska Reader" 1060 would have to 'hunt and peck' through the file looking for the 1061 correct timestamp. 1063 The "Cues Element" SHOULD contain at least one "CuePoint Element". 1064 Each "CuePoint Element" stores the position of the "Cluster" that 1065 contains the "BlockGroup" or "SimpleBlock Element". The timestamp is 1066 stored in the "CueTime Element" and location is stored in the 1067 "CueTrackPositions Element". 1069 The "Cues Element" is flexible. For instance, "Cues Element" can be 1070 used to index every single timestamp of every "Block" or they can be 1071 indexed selectively. For video files, it is RECOMMENDED to index at 1072 least the keyframes of the video track. 1074 +-------------------------------------+ 1075 | Cues | CuePoint | CueTime | 1076 | | |-------------------| 1077 | | | CueTrackPositions | 1078 | |------------------------------| 1079 | | CuePoint | CueTime | 1080 | | |-------------------| 1081 | | | CueTrackPositions | 1082 +-------------------------------------+ 1084 Representation of a Cues Element and two levels of its Descendant 1085 Elements. 1087 The "Attachments Element" is for attaching files to a Matroska file 1088 such as pictures, webpages, programs, or even the codec needed to 1089 play back the file. 1091 +------------------------------------------------+ 1092 | Attachments | AttachedFile | FileDescription | 1093 | | |-------------------| 1094 | | | FileName | 1095 | | |-------------------| 1096 | | | FileMimeType | 1097 | | |-------------------| 1098 | | | FileData | 1099 | | |-------------------| 1100 | | | FileUID | 1101 | | |-------------------| 1102 | | | FileName | 1103 | | |-------------------| 1104 | | | FileReferral | 1105 | | |-------------------| 1106 | | | FileUsedStartTime | 1107 | | |-------------------| 1108 | | | FileUsedEndTime | 1109 +------------------------------------------------+ 1111 Representation of a Attachments Element. 1113 The "Tags Element" contains metadata that describes the "Segment" and 1114 potentially its "Tracks", "Chapters", and "Attachments". Each 1115 "Track" or "Chapter" that those tags applies to has its UID listed in 1116 the "Tags". The "Tags" contain all extra information about the file: 1117 scriptwriter, singer, actors, directors, titles, edition, price, 1118 dates, genre, comments, etc. Tags can contain their values in 1119 multiple languages. For example, a movie's "title" "Tag" might 1120 contain both the original English title as well as the title it was 1121 released as in Germany. 1123 +-------------------------------------------+ 1124 | Tags | Tag | Targets | TargetTypeValue | 1125 | | | |------------------| 1126 | | | | TargetType | 1127 | | | |------------------| 1128 | | | | TagTrackUID | 1129 | | | |------------------| 1130 | | | | TagEditionUID | 1131 | | | |------------------| 1132 | | | | TagChapterUID | 1133 | | | |------------------| 1134 | | | | TagAttachmentUID | 1135 | | |------------------------------| 1136 | | | SimpleTag | TagName | 1137 | | | |------------------| 1138 | | | | TagLanguage | 1139 | | | |------------------| 1140 | | | | TagDefault | 1141 | | | |------------------| 1142 | | | | TagString | 1143 | | | |------------------| 1144 | | | | TagBinary | 1145 | | | |------------------| 1146 | | | | SimpleTag | 1147 +-------------------------------------------+ 1149 Representation of a Tags Element and three levels of its Children 1150 Elements. 1152 8. Matroska Additions to Schema Element Attributes 1154 In addition to the EBML Schema definition provided by the EBML 1155 Specification, Matroska adds the following additional attributes: 1157 +-----------+----------+--------------------------------------------+ 1158 | attribute | required | definition | 1159 | name | | | 1160 +-----------+----------+--------------------------------------------+ 1161 | webm | No | A boolean to express if the Matroska | 1162 | | | Element is also supported within version 2 | 1163 | | | of the "webm" specification. Please | 1164 | | | consider the webm specification [16] as | 1165 | | | the authoritative on "webm". | 1166 +-----------+----------+--------------------------------------------+ 1168 9. Matroska Schema 1170 This specification includes an "EBML Schema" which defines the 1171 Elements and structure of Matroska as an EBML Document Type. The 1172 EBML Schema defines every valid Matroska element in a manner defined 1173 by the EBML specification. 1175 Here the definition of each Matroska Element is provided. 1177 9.1. EBMLMaxIDLength Element 1179 name: "EBMLMaxIDLength" 1181 path: "1*1(\EBML\EBMLMaxIDLength)" 1183 id: "0x42F2" 1185 minOccurs: "1" 1187 maxOccurs: "1" 1189 range: "4" 1191 default: "4" 1193 type: "uinteger" 1195 9.2. EBMLMaxSizeLength Element 1197 name: "EBMLMaxSizeLength" 1199 path: "1*1(\EBML\EBMLMaxSizeLength)" 1201 id: "0x42F3" 1203 minOccurs: "1" 1205 maxOccurs: "1" 1207 range: "1-8" 1209 default: "8" 1211 type: "uinteger" 1213 9.3. Segment Element 1215 name: "Segment" 1217 path: "1*1(\Segment)" 1219 id: "0x18538067" 1221 minOccurs: "1" 1223 maxOccurs: "1" 1225 type: "master" 1227 unknownsizeallowed: "1" 1229 minver: "1" 1231 documentation: The Root Element that contains all other Top-Level 1232 Elements (Elements defined only at Level 1). A Matroska file is 1233 composed of 1 Segment. 1235 9.3.1. SeekHead Element 1237 name: "SeekHead" 1239 path: "0*2(\Segment\SeekHead)" 1241 id: "0x114D9B74" 1243 maxOccurs: "2" 1245 type: "master" 1247 minver: "1" 1249 documentation: Contains the Segment Position of other Top-Level 1250 Elements. 1252 9.3.1.1. Seek Element 1254 name: "Seek" 1256 path: "1*(\Segment\SeekHead\Seek)" 1258 id: "0x4DBB" 1260 minOccurs: "1" 1261 type: "master" 1263 minver: "1" 1265 documentation: Contains a single seek entry to an EBML Element. 1267 9.3.1.1.1. SeekID Element 1269 name: "SeekID" 1271 path: "1*1(\Segment\SeekHead\Seek\SeekID)" 1273 id: "0x53AB" 1275 minOccurs: "1" 1277 maxOccurs: "1" 1279 type: "binary" 1281 minver: "1" 1283 documentation: The binary ID corresponding to the Element name. 1285 9.3.1.1.2. SeekPosition Element 1287 name: "SeekPosition" 1289 path: "1*1(\Segment\SeekHead\Seek\SeekPosition)" 1291 id: "0x53AC" 1293 minOccurs: "1" 1295 maxOccurs: "1" 1297 type: "uinteger" 1299 minver: "1" 1301 documentation: The Segment Position of the Element. 1303 9.3.2. Info Element 1305 name: "Info" 1307 path: "1*(\Segment\Info)" 1308 id: "0x1549A966" 1310 minOccurs: "1" 1312 type: "master" 1314 minver: "1" 1316 definition: Contains general information about the Segment. 1318 9.3.2.1. SegmentUID Element 1320 name: "SegmentUID" 1322 path: "0*1(\Segment\Info\SegmentUID)" 1324 id: "0x73A4" 1326 maxOccurs: "1" 1328 range: "not 0" 1330 size: "16" 1332 type: "binary" 1334 minver: "1" 1336 definition: A randomly generated unique ID to identify the Segment 1337 amongst many others (128 bits). 1339 usage notes: If the Segment is a part of a Linked Segment then this 1340 Element is REQUIRED. 1342 9.3.2.2. SegmentFilename Element 1344 name: "SegmentFilename" 1346 path: "0*1(\Segment\Info\SegmentFilename)" 1348 id: "0x7384" 1350 maxOccurs: "1" 1352 type: "utf-8" 1354 minver: "1" 1355 definition: A filename corresponding to this Segment. 1357 9.3.2.3. PrevUID Element 1359 name: "PrevUID" 1361 path: "0*1(\Segment\Info\PrevUID)" 1363 id: "0x3CB923" 1365 maxOccurs: "1" 1367 size: "16" 1369 type: "binary" 1371 minver: "1" 1373 definition: A unique ID to identify the previous Segment of a Linked 1374 Segment (128 bits). 1376 usage notes: If the Segment is a part of a Linked Segment that uses 1377 Hard Linking then either the PrevUID or the NextUID Element is 1378 REQUIRED. If a Segment contains a PrevUID but not a NextUID then it 1379 MAY be considered as the last Segment of the Linked Segment. The 1380 PrevUID MUST NOT be equal to the SegmentUID. 1382 9.3.2.4. PrevFilename Element 1384 name: "PrevFilename" 1386 path: "0*1(\Segment\Info\PrevFilename)" 1388 id: "0x3C83AB" 1390 maxOccurs: "1" 1392 type: "utf-8" 1394 minver: "1" 1396 definition: A filename corresponding to the file of the previous 1397 Linked Segment. 1399 usage notes: Provision of the previous filename is for display 1400 convenience, but PrevUID SHOULD be considered authoritative for 1401 identifying the previous Segment in a Linked Segment. 1403 9.3.2.5. NextUID Element 1405 name: "NextUID" 1407 path: "0*1(\Segment\Info\NextUID)" 1409 id: "0x3EB923" 1411 maxOccurs: "1" 1413 size: "16" 1415 type: "binary" 1417 minver: "1" 1419 definition: A unique ID to identify the next Segment of a Linked 1420 Segment (128 bits). 1422 usage notes: If the Segment is a part of a Linked Segment that uses 1423 Hard Linking then either the PrevUID or the NextUID Element is 1424 REQUIRED. If a Segment contains a NextUID but not a PrevUID then it 1425 MAY be considered as the first Segment of the Linked Segment. The 1426 NextUID MUST NOT be equal to the SegmentUID. 1428 9.3.2.6. NextFilename Element 1430 name: "NextFilename" 1432 path: "0*1(\Segment\Info\NextFilename)" 1434 id: "0x3E83BB" 1436 maxOccurs: "1" 1438 type: "utf-8" 1440 minver: "1" 1442 definition: A filename corresponding to the file of the next Linked 1443 Segment. 1445 usage notes: Provision of the next filename is for display 1446 convenience, but NextUID SHOULD be considered authoritative for 1447 identifying the Next Segment. 1449 9.3.2.7. SegmentFamily Element 1451 name: "SegmentFamily" 1453 path: "0*(\Segment\Info\SegmentFamily)" 1455 id: "0x4444" 1457 size: "16" 1459 type: "binary" 1461 minver: "1" 1463 definition: A randomly generated unique ID that all Segments of a 1464 Linked Segment MUST share (128 bits). 1466 usage notes: If the Segment is a part of a Linked Segment that uses 1467 Soft Linking then this Element is REQUIRED. 1469 9.3.2.8. ChapterTranslate Element 1471 name: "ChapterTranslate" 1473 path: "0*(\Segment\Info\ChapterTranslate)" 1475 id: "0x6924" 1477 type: "master" 1479 minver: "1" 1481 documentation: A tuple of corresponding ID used by chapter codecs to 1482 represent this Segment. 1484 9.3.2.8.1. ChapterTranslateEditionUID Element 1486 name: "ChapterTranslateEditionUID" 1488 path: "0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)" 1490 id: "0x69FC" 1492 type: "uinteger" 1494 minver: "1" 1495 documentation: Specify an edition UID on which this correspondance 1496 applies. When not specified, it means for all editions found in the 1497 Segment. 1499 9.3.2.8.2. ChapterTranslateCodec Element 1501 name: "ChapterTranslateCodec" 1503 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)" 1505 id: "0x69BF" 1507 minOccurs: "1" 1509 maxOccurs: "1" 1511 type: "uinteger" 1513 minver: "1" 1515 documentation: The chapter codec 1517 restrictions: 1519 +-------+-----------------+ 1520 | value | label | 1521 +-------+-----------------+ 1522 | "0" | Matroska Script | 1523 | "1" | DVD-menu | 1524 +-------+-----------------+ 1526 9.3.2.8.3. ChapterTranslateID Element 1528 name: "ChapterTranslateID" 1530 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)" 1532 id: "0x69A5" 1534 minOccurs: "1" 1536 maxOccurs: "1" 1538 type: "binary" 1540 minver: "1" 1541 documentation: The binary value used to represent this Segment in the 1542 chapter codec data. The format depends on the ChapProcessCodecID 1543 used. 1545 9.3.2.9. TimestampScale Element 1547 name: "TimestampScale" 1549 path: "1*1(\Segment\Info\TimestampScale)" 1551 id: "0x2AD7B1" 1553 minOccurs: "1" 1555 maxOccurs: "1" 1557 range: "not 0" 1559 default: "1000000" 1561 type: "uinteger" 1563 minver: "1" 1565 documentation: Timestamp scale in nanoseconds (1.000.000 means all 1566 timestamps in the Segment are expressed in milliseconds). 1568 9.3.2.10. Duration Element 1570 name: "Duration" 1572 path: "0*1(\Segment\Info\Duration)" 1574 id: "0x4489" 1576 maxOccurs: "1" 1578 range: "> 0x0p+0" 1580 type: "float" 1582 minver: "1" 1584 definition: Duration of the Segment in nanoseconds based on 1585 TimestampScale. 1587 9.3.2.11. DateUTC Element 1589 name: "DateUTC" 1591 path: "0*1(\Segment\Info\DateUTC)" 1593 id: "0x4461" 1595 maxOccurs: "1" 1597 type: "date" 1599 minver: "1" 1601 documentation: The date and time that the Segment was created by the 1602 muxing application or library. 1604 9.3.2.12. Title Element 1606 name: "Title" 1608 path: "0*1(\Segment\Info\Title)" 1610 id: "0x7BA9" 1612 maxOccurs: "1" 1614 type: "utf-8" 1616 minver: "1" 1618 documentation: General name of the Segment. 1620 9.3.2.13. MuxingApp Element 1622 name: "MuxingApp" 1624 path: "1*1(\Segment\Info\MuxingApp)" 1626 id: "0x4D80" 1628 minOccurs: "1" 1630 maxOccurs: "1" 1632 type: "utf-8" 1634 minver: "1" 1635 definition: Muxing application or library (example: "libmatroska- 1636 0.4.3"). 1638 usage notes: Include the full name of the application or library 1639 followed by the version number. 1641 9.3.2.14. WritingApp Element 1643 name: "WritingApp" 1645 path: "1*1(\Segment\Info\WritingApp)" 1647 id: "0x5741" 1649 minOccurs: "1" 1651 maxOccurs: "1" 1653 type: "utf-8" 1655 minver: "1" 1657 definition: Writing application (example: "mkvmerge-0.3.3"). 1659 usage notes: Include the full name of the application followed by the 1660 version number. 1662 9.3.3. Cluster Element 1664 name: "Cluster" 1666 path: "0*(\Segment\Cluster)" 1668 id: "0x1F43B675" 1670 type: "master" 1672 unknownsizeallowed: "1" 1674 minver: "1" 1676 documentation: The Top-Level Element containing the (monolithic) 1677 Block structure. 1679 9.3.3.1. Timestamp Element 1681 name: "Timestamp" 1683 path: "1*1(\Segment\Cluster\Timestamp)" 1685 id: "0xE7" 1687 minOccurs: "1" 1689 maxOccurs: "1" 1691 type: "uinteger" 1693 minver: "1" 1695 documentation: Absolute timestamp of the cluster (based on 1696 TimestampScale). 1698 9.3.3.2. SilentTracks Element 1700 name: "SilentTracks" 1702 path: "0*1(\Segment\Cluster\SilentTracks)" 1704 id: "0x5854" 1706 maxOccurs: "1" 1708 type: "master" 1710 minver: "1" 1712 documentation: The list of tracks that are not used in that part of 1713 the stream. It is useful when using overlay tracks on seeking or to 1714 decide what track to use. 1716 9.3.3.2.1. SilentTrackNumber Element 1718 name: "SilentTrackNumber" 1720 path: "0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)" 1722 id: "0x58D7" 1724 type: "uinteger" 1726 minver: "1" 1727 documentation: One of the track number that are not used from now on 1728 in the stream. It could change later if not specified as silent in a 1729 further Cluster. 1731 9.3.3.3. Position Element 1733 name: "Position" 1735 path: "0*1(\Segment\Cluster\Position)" 1737 id: "0xA7" 1739 maxOccurs: "1" 1741 type: "uinteger" 1743 minver: "1" 1745 documentation: The Segment Position of the Cluster in the Segment (0 1746 in live broadcast streams). It might help to resynchronise offset on 1747 damaged streams. 1749 9.3.3.4. PrevSize Element 1751 name: "PrevSize" 1753 path: "0*1(\Segment\Cluster\PrevSize)" 1755 id: "0xAB" 1757 maxOccurs: "1" 1759 type: "uinteger" 1761 minver: "1" 1763 documentation: Size of the previous Cluster, in octets. Can be 1764 useful for backward playing. 1766 9.3.3.5. SimpleBlock Element 1768 name: "SimpleBlock" 1770 path: "0*(\Segment\Cluster\SimpleBlock)" 1772 id: "0xA3" 1774 type: "binary" 1775 minver: "2" 1777 documentation: Similar to Block but without all the extra 1778 information, mostly used to reduced overhead when no extra feature is 1779 needed. (see SimpleBlock Structure) 1781 9.3.3.6. BlockGroup Element 1783 name: "BlockGroup" 1785 path: "0*(\Segment\Cluster\BlockGroup)" 1787 id: "0xA0" 1789 type: "master" 1791 minver: "1" 1793 documentation: Basic container of information containing a single 1794 Block and information specific to that Block. 1796 9.3.3.6.1. Block Element 1798 name: "Block" 1800 path: "1*1(\Segment\Cluster\BlockGroup\Block)" 1802 id: "0xA1" 1804 minOccurs: "1" 1806 maxOccurs: "1" 1808 type: "binary" 1810 minver: "1" 1812 documentation: Block containing the actual data to be rendered and a 1813 timestamp relative to the Cluster Timestamp. (see Block Structure) 1815 9.3.3.6.2. BlockVirtual Element 1817 name: "BlockVirtual" 1819 path: "0*1(\Segment\Cluster\BlockGroup\BlockVirtual)" 1821 id: "0xA2" 1822 maxOccurs: "1" 1824 type: "binary" 1826 minver: "0" 1828 maxver: "0" 1830 documentation: A Block with no data. It MUST be stored in the stream 1831 at the place the real Block would be in display order. (see Block 1832 Virtual) 1834 9.3.3.6.3. BlockAdditions Element 1836 name: "BlockAdditions" 1838 path: "0*1(\Segment\Cluster\BlockGroup\BlockAdditions)" 1840 id: "0x75A1" 1842 maxOccurs: "1" 1844 type: "master" 1846 minver: "1" 1848 documentation: Contain additional blocks to complete the main one. 1849 An EBML parser that has no knowledge of the Block structure could 1850 still see and use/skip these data. 1852 9.3.3.6.3.1. BlockMore Element 1854 name: "BlockMore" 1856 path: "1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)" 1858 id: "0xA6" 1860 minOccurs: "1" 1862 type: "master" 1864 minver: "1" 1866 documentation: Contain the BlockAdditional and some parameters. 1868 9.3.3.6.3.2. BlockAddID Element 1870 name: "BlockAddID" 1872 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1873 AddID)" 1875 id: "0xEE" 1877 minOccurs: "1" 1879 maxOccurs: "1" 1881 range: "not 0" 1883 default: "1" 1885 type: "uinteger" 1887 minver: "1" 1889 documentation: An ID to identify the BlockAdditional level. 1891 9.3.3.6.3.3. BlockAdditional Element 1893 name: "BlockAdditional" 1895 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1896 Additional)" 1898 id: "0xA5" 1900 minOccurs: "1" 1902 maxOccurs: "1" 1904 type: "binary" 1906 minver: "1" 1908 documentation: Interpreted by the codec as it wishes (using the 1909 BlockAddID). 1911 9.3.3.6.4. BlockDuration Element 1913 name: "BlockDuration" 1915 path: "0*1(\Segment\Cluster\BlockGroup\BlockDuration)" 1916 id: "0x9B" 1918 maxOccurs: "1" 1920 default: "DefaultDuration" 1922 type: "uinteger" 1924 minver: "1" 1926 documentation: The duration of the Block (based on TimestampScale). 1927 This Element is mandatory when DefaultDuration is set for the track 1928 (but can be omitted as other default values). When not written and 1929 with no DefaultDuration, the value is assumed to be the difference 1930 between the timestamp of this Block and the timestamp of the next 1931 Block in "display" order (not coding order). This Element can be 1932 useful at the end of a Track (as there is not other Block available), 1933 or when there is a break in a track like for subtitle tracks. 1935 9.3.3.6.5. ReferencePriority Element 1937 name: "ReferencePriority" 1939 path: "1*1(\Segment\Cluster\BlockGroup\ReferencePriority)" 1941 id: "0xFA" 1943 minOccurs: "1" 1945 maxOccurs: "1" 1947 default: "0" 1949 type: "uinteger" 1951 minver: "1" 1953 documentation: This frame is referenced and has the specified cache 1954 priority. In cache only a frame of the same or higher priority can 1955 replace this frame. A value of 0 means the frame is not referenced. 1957 9.3.3.6.6. ReferenceBlock Element 1959 name: "ReferenceBlock" 1961 path: "0*(\Segment\Cluster\BlockGroup\ReferenceBlock)" 1963 id: "0xFB" 1964 type: "integer" 1966 minver: "1" 1968 documentation: Timestamp of another frame used as a reference (ie: B 1969 or P frame). The timestamp is relative to the block it's attached 1970 to. 1972 9.3.3.6.7. ReferenceVirtual Element 1974 name: "ReferenceVirtual" 1976 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)" 1978 id: "0xFD" 1980 maxOccurs: "1" 1982 type: "integer" 1984 minver: "0" 1986 maxver: "0" 1988 documentation: The Segment Position of the data that would otherwise 1989 be in position of the virtual block. 1991 9.3.3.6.8. CodecState Element 1993 name: "CodecState" 1995 path: "0*1(\Segment\Cluster\BlockGroup\CodecState)" 1997 id: "0xA4" 1999 maxOccurs: "1" 2001 type: "binary" 2003 minver: "2" 2005 documentation: The new codec state to use. Data interpretation is 2006 private to the codec. This information SHOULD always be referenced 2007 by a seek entry. 2009 9.3.3.6.9. DiscardPadding Element 2011 name: "DiscardPadding" 2013 path: "0*1(\Segment\Cluster\BlockGroup\DiscardPadding)" 2015 id: "0x75A2" 2017 maxOccurs: "1" 2019 type: "integer" 2021 minver: "4" 2023 documentation: Duration in nanoseconds of the silent data added to 2024 the Block (padding at the end of the Block for positive value, at the 2025 beginning of the Block for negative value). The duration of 2026 DiscardPadding is not calculated in the duration of the TrackEntry 2027 and SHOULD be discarded during playback. 2029 9.3.3.6.10. Slices Element 2031 name: "Slices" 2033 path: "0*1(\Segment\Cluster\BlockGroup\Slices)" 2035 id: "0x8E" 2037 maxOccurs: "1" 2039 type: "master" 2041 minver: "1" 2043 documentation: Contains slices description. 2045 9.3.3.6.10.1. TimeSlice Element 2047 name: "TimeSlice" 2049 path: "0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)" 2051 id: "0xE8" 2053 type: "master" 2055 minver: "1" 2056 maxver: "1" 2058 documentation: Contains extra time information about the data 2059 contained in the Block. Being able to interpret this Element is not 2060 REQUIRED for playback. 2062 9.3.3.6.10.2. LaceNumber Element 2064 name: "LaceNumber" 2066 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)" 2068 id: "0xCC" 2070 maxOccurs: "1" 2072 default: "0" 2074 type: "uinteger" 2076 minver: "1" 2078 maxver: "1" 2080 documentation: The reverse number of the frame in the lace (0 is the 2081 last frame, 1 is the next to last, etc). Being able to interpret 2082 this Element is not REQUIRED for playback. 2084 9.3.3.6.10.3. FrameNumber Element 2086 name: "FrameNumber" 2088 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)" 2090 id: "0xCD" 2092 maxOccurs: "1" 2094 default: "0" 2096 type: "uinteger" 2098 minver: "0" 2100 maxver: "0" 2101 documentation: The number of the frame to generate from this lace 2102 with this delay (allow you to generate many frames from the same 2103 Block/Frame). 2105 9.3.3.6.10.4. BlockAdditionID Element 2107 name: "BlockAdditionID" 2109 path: 2110 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)" 2112 id: "0xCB" 2114 maxOccurs: "1" 2116 default: "0" 2118 type: "uinteger" 2120 minver: "0" 2122 maxver: "0" 2124 documentation: The ID of the BlockAdditional Element (0 is the main 2125 Block). 2127 9.3.3.6.10.5. Delay Element 2129 name: "Delay" 2131 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)" 2133 id: "0xCE" 2135 maxOccurs: "1" 2137 default: "0" 2139 type: "uinteger" 2141 minver: "0" 2143 maxver: "0" 2145 documentation: The (scaled) delay to apply to the Element. 2147 9.3.3.6.10.6. SliceDuration Element 2149 name: "SliceDuration" 2151 path: 2152 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)" 2154 id: "0xCF" 2156 maxOccurs: "1" 2158 default: "0" 2160 type: "uinteger" 2162 minver: "0" 2164 maxver: "0" 2166 documentation: The (scaled) duration to apply to the Element. 2168 9.3.3.6.11. ReferenceFrame Element 2170 name: "ReferenceFrame" 2172 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)" 2174 id: "0xC8" 2176 maxOccurs: "1" 2178 type: "master" 2180 minver: "0" 2182 maxver: "0" 2184 documentation: DivX trick track extensions 2186 9.3.3.6.11.1. ReferenceOffset Element 2188 name: "ReferenceOffset" 2190 path: 2191 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)" 2193 id: "0xC9" 2194 minOccurs: "1" 2196 maxOccurs: "1" 2198 type: "uinteger" 2200 minver: "0" 2202 maxver: "0" 2204 documentation: DivX trick track extensions 2206 9.3.3.6.11.2. ReferenceTimestamp Element 2208 name: "ReferenceTimestamp" 2210 path: 2211 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimestamp)" 2213 id: "0xCA" 2215 minOccurs: "1" 2217 maxOccurs: "1" 2219 type: "uinteger" 2221 minver: "0" 2223 maxver: "0" 2225 documentation: DivX trick track extensions 2227 9.3.3.7. EncryptedBlock Element 2229 name: "EncryptedBlock" 2231 path: "0*(\Segment\Cluster\EncryptedBlock)" 2233 id: "0xAF" 2235 type: "binary" 2237 minver: "0" 2239 maxver: "0" 2240 documentation: Similar to SimpleBlock but the data inside the Block 2241 are Transformed (encrypt and/or signed). (see EncryptedBlock 2242 Structure) 2244 9.3.4. Tracks Element 2246 name: "Tracks" 2248 path: "0*(\Segment\Tracks)" 2250 id: "0x1654AE6B" 2252 type: "master" 2254 minver: "1" 2256 documentation: A Top-Level Element of information with many tracks 2257 described. 2259 9.3.4.1. TrackEntry Element 2261 name: "TrackEntry" 2263 path: "1*(\Segment\Tracks\TrackEntry)" 2265 id: "0xAE" 2267 minOccurs: "1" 2269 type: "master" 2271 minver: "1" 2273 documentation: Describes a track with all Elements. 2275 9.3.4.1.1. TrackNumber Element 2277 name: "TrackNumber" 2279 path: "1*1(\Segment\Tracks\TrackEntry\TrackNumber)" 2281 id: "0xD7" 2283 minOccurs: "1" 2285 maxOccurs: "1" 2287 range: "not 0" 2288 type: "uinteger" 2290 minver: "1" 2292 documentation: The track number as used in the Block Header (using 2293 more than 127 tracks is not encouraged, though the design allows an 2294 unlimited number). 2296 9.3.4.1.2. TrackUID Element 2298 name: "TrackUID" 2300 path: "1*1(\Segment\Tracks\TrackEntry\TrackUID)" 2302 id: "0x73C5" 2304 minOccurs: "1" 2306 maxOccurs: "1" 2308 range: "not 0" 2310 type: "uinteger" 2312 minver: "1" 2314 documentation: A unique ID to identify the Track. This SHOULD be 2315 kept the same when making a direct stream copy of the Track to 2316 another file. 2318 9.3.4.1.3. TrackType Element 2320 name: "TrackType" 2322 path: "1*1(\Segment\Tracks\TrackEntry\TrackType)" 2324 id: "0x83" 2326 minOccurs: "1" 2328 maxOccurs: "1" 2330 range: "1-254" 2332 type: "uinteger" 2334 minver: "1" 2335 documentation: A set of track types coded on 8 bits. 2337 restrictions: 2339 +-------+----------+ 2340 | value | label | 2341 +-------+----------+ 2342 | "1" | video | 2343 | "2" | audio | 2344 | "3" | complex | 2345 | "16" | logo | 2346 | "17" | subtitle | 2347 | "18" | buttons | 2348 | "32" | control | 2349 +-------+----------+ 2351 9.3.4.1.4. FlagEnabled Element 2353 name: "FlagEnabled" 2355 path: "1*1(\Segment\Tracks\TrackEntry\FlagEnabled)" 2357 id: "0xB9" 2359 minOccurs: "1" 2361 maxOccurs: "1" 2363 range: "0-1" 2365 default: "1" 2367 type: "uinteger" 2369 minver: "2" 2371 documentation: Set if the track is usable. (1 bit) 2373 9.3.4.1.5. FlagDefault Element 2375 name: "FlagDefault" 2377 path: "1*1(\Segment\Tracks\TrackEntry\FlagDefault)" 2379 id: "0x88" 2381 minOccurs: "1" 2382 maxOccurs: "1" 2384 range: "0-1" 2386 default: "1" 2388 type: "uinteger" 2390 minver: "1" 2392 documentation: Set if that track (audio, video or subs) SHOULD be 2393 active if no language found matches the user preference. (1 bit) 2395 9.3.4.1.6. FlagForced Element 2397 name: "FlagForced" 2399 path: "1*1(\Segment\Tracks\TrackEntry\FlagForced)" 2401 id: "0x55AA" 2403 minOccurs: "1" 2405 maxOccurs: "1" 2407 range: "0-1" 2409 default: "0" 2411 type: "uinteger" 2413 minver: "1" 2415 documentation: Set if that track MUST be active during playback. 2416 There can be many forced track for a kind (audio, video or subs), the 2417 player SHOULD select the one which language matches the user 2418 preference or the default + forced track. Overlay MAY happen between 2419 a forced and non-forced track of the same kind. (1 bit) 2421 9.3.4.1.7. FlagLacing Element 2423 name: "FlagLacing" 2425 path: "1*1(\Segment\Tracks\TrackEntry\FlagLacing)" 2427 id: "0x9C" 2429 minOccurs: "1" 2430 maxOccurs: "1" 2432 range: "0-1" 2434 default: "1" 2436 type: "uinteger" 2438 minver: "1" 2440 documentation: Set if the track MAY contain blocks using lacing. (1 2441 bit) 2443 9.3.4.1.8. MinCache Element 2445 name: "MinCache" 2447 path: "1*1(\Segment\Tracks\TrackEntry\MinCache)" 2449 id: "0x6DE7" 2451 minOccurs: "1" 2453 maxOccurs: "1" 2455 default: "0" 2457 type: "uinteger" 2459 minver: "1" 2461 documentation: The minimum number of frames a player SHOULD be able 2462 to cache during playback. If set to 0, the reference pseudo-cache 2463 system is not used. 2465 9.3.4.1.9. MaxCache Element 2467 name: "MaxCache" 2469 path: "0*1(\Segment\Tracks\TrackEntry\MaxCache)" 2471 id: "0x6DF8" 2473 maxOccurs: "1" 2475 type: "uinteger" 2477 minver: "1" 2478 documentation: The maximum cache size necessary to store referenced 2479 frames in and the current frame. 0 means no cache is needed. 2481 9.3.4.1.10. DefaultDuration Element 2483 name: "DefaultDuration" 2485 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDuration)" 2487 id: "0x23E383" 2489 maxOccurs: "1" 2491 range: "not 0" 2493 type: "uinteger" 2495 minver: "1" 2497 documentation: Number of nanoseconds (not scaled via TimestampScale) 2498 per frame ('frame' in the Matroska sense -- one Element put into a 2499 (Simple)Block). 2501 9.3.4.1.11. DefaultDecodedFieldDuration Element 2503 name: "DefaultDecodedFieldDuration" 2505 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)" 2507 id: "0x234E7A" 2509 maxOccurs: "1" 2511 range: "not 0" 2513 type: "uinteger" 2515 minver: "4" 2517 documentation: The period in nanoseconds (not scaled by 2518 TimestampScale) between two successive fields at the output of the 2519 decoding process (see the notes) 2521 9.3.4.1.12. TrackTimestampScale Element 2523 name: "TrackTimestampScale" 2525 path: "1*1(\Segment\Tracks\TrackEntry\TrackTimestampScale)" 2526 id: "0x23314F" 2528 minOccurs: "1" 2530 maxOccurs: "1" 2532 range: "> 0x0p+0" 2534 default: "0x1p+0" 2536 type: "float" 2538 minver: "1" 2540 maxver: "3" 2542 documentation: DEPRECATED, DO NOT USE. The scale to apply on this 2543 track to work at normal speed in relation with other tracks (mostly 2544 used to adjust video speed when the audio length differs). 2546 9.3.4.1.13. TrackOffset Element 2548 name: "TrackOffset" 2550 path: "0*1(\Segment\Tracks\TrackEntry\TrackOffset)" 2552 id: "0x537F" 2554 maxOccurs: "1" 2556 default: "0" 2558 type: "integer" 2560 minver: "0" 2562 maxver: "0" 2564 documentation: A value to add to the Block's Timestamp. This can be 2565 used to adjust the playback offset of a track. 2567 9.3.4.1.14. MaxBlockAdditionID Element 2569 name: "MaxBlockAdditionID" 2571 path: "1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)" 2573 id: "0x55EE" 2574 minOccurs: "1" 2576 maxOccurs: "1" 2578 default: "0" 2580 type: "uinteger" 2582 minver: "1" 2584 documentation: The maximum value of BlockAddID. A value 0 means 2585 there is no BlockAdditions for this track. 2587 9.3.4.1.15. Name Element 2589 name: "Name" 2591 path: "0*1(\Segment\Tracks\TrackEntry\Name)" 2593 id: "0x536E" 2595 maxOccurs: "1" 2597 type: "utf-8" 2599 minver: "1" 2601 documentation: A human-readable track name. 2603 9.3.4.1.16. Language Element 2605 name: "Language" 2607 path: "0*1(\Segment\Tracks\TrackEntry\Language)" 2609 id: "0x22B59C" 2611 maxOccurs: "1" 2613 default: "eng" 2615 type: "string" 2617 minver: "1" 2619 documentation: Specifies the language of the track in the Matroska 2620 languages form. This Element MUST be ignored if the LanguageIETF 2621 Element is used in the same TrackEntry. 2623 9.3.4.1.17. LanguageIETF Element 2625 name: "LanguageIETF" 2627 path: "0*1(\Segment\Tracks\TrackEntry\LanguageIETF)" 2629 id: "0x22B59D" 2631 maxOccurs: "1" 2633 type: "string" 2635 minver: "4" 2637 documentation: Specifies the language of the track according to BCP 2638 47 and using the IANA Language Subtag Registry. If this Element is 2639 used, then any Language Elements used in the same TrackEntry MUST be 2640 ignored. 2642 9.3.4.1.18. CodecID Element 2644 name: "CodecID" 2646 path: "1*1(\Segment\Tracks\TrackEntry\CodecID)" 2648 id: "0x86" 2650 minOccurs: "1" 2652 maxOccurs: "1" 2654 type: "string" 2656 minver: "1" 2658 documentation: An ID corresponding to the codec, see the codec page 2659 for more info. 2661 9.3.4.1.19. CodecPrivate Element 2663 name: "CodecPrivate" 2665 path: "0*1(\Segment\Tracks\TrackEntry\CodecPrivate)" 2667 id: "0x63A2" 2669 maxOccurs: "1" 2670 type: "binary" 2672 minver: "1" 2674 documentation: Private data only known to the codec. 2676 9.3.4.1.20. CodecName Element 2678 name: "CodecName" 2680 path: "0*1(\Segment\Tracks\TrackEntry\CodecName)" 2682 id: "0x258688" 2684 maxOccurs: "1" 2686 type: "utf-8" 2688 minver: "1" 2690 documentation: A human-readable string specifying the codec. 2692 9.3.4.1.21. AttachmentLink Element 2694 name: "AttachmentLink" 2696 path: "0*1(\Segment\Tracks\TrackEntry\AttachmentLink)" 2698 id: "0x7446" 2700 maxOccurs: "1" 2702 range: "not 0" 2704 type: "uinteger" 2706 minver: "1" 2708 maxver: "3" 2710 documentation: The UID of an attachment that is used by this codec. 2712 9.3.4.1.22. CodecSettings Element 2714 name: "CodecSettings" 2716 path: "0*1(\Segment\Tracks\TrackEntry\CodecSettings)" 2717 id: "0x3A9697" 2719 maxOccurs: "1" 2721 type: "utf-8" 2723 minver: "0" 2725 maxver: "0" 2727 documentation: A string describing the encoding setting used. 2729 9.3.4.1.23. CodecInfoURL Element 2731 name: "CodecInfoURL" 2733 path: "0*(\Segment\Tracks\TrackEntry\CodecInfoURL)" 2735 id: "0x3B4040" 2737 type: "string" 2739 minver: "0" 2741 maxver: "0" 2743 documentation: A URL to find information about the codec used. 2745 9.3.4.1.24. CodecDownloadURL Element 2747 name: "CodecDownloadURL" 2749 path: "0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)" 2751 id: "0x26B240" 2753 type: "string" 2755 minver: "0" 2757 maxver: "0" 2759 documentation: A URL to download about the codec used. 2761 9.3.4.1.25. CodecDecodeAll Element 2763 name: "CodecDecodeAll" 2765 path: "1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)" 2767 id: "0xAA" 2769 minOccurs: "1" 2771 maxOccurs: "1" 2773 range: "0-1" 2775 default: "1" 2777 type: "uinteger" 2779 minver: "2" 2781 documentation: The codec can decode potentially damaged data (1 bit). 2783 9.3.4.1.26. TrackOverlay Element 2785 name: "TrackOverlay" 2787 path: "0*(\Segment\Tracks\TrackEntry\TrackOverlay)" 2789 id: "0x6FAB" 2791 type: "uinteger" 2793 minver: "1" 2795 documentation: Specify that this track is an overlay track for the 2796 Track specified (in the u-integer). That means when this track has a 2797 gap (see SilentTracks) the overlay track SHOULD be used instead. The 2798 order of multiple TrackOverlay matters, the first one is the one that 2799 SHOULD be used. If not found it SHOULD be the second, etc. 2801 9.3.4.1.27. CodecDelay Element 2803 name: "CodecDelay" 2805 path: "0*1(\Segment\Tracks\TrackEntry\CodecDelay)" 2807 id: "0x56AA" 2808 maxOccurs: "1" 2810 default: "0" 2812 type: "uinteger" 2814 minver: "4" 2816 documentation: CodecDelay is The codec-built-in delay in nanoseconds. 2817 This value MUST be subtracted from each block timestamp in order to 2818 get the actual timestamp. The value SHOULD be small so the muxing of 2819 tracks with the same actual timestamp are in the same Cluster. 2821 9.3.4.1.28. SeekPreRoll Element 2823 name: "SeekPreRoll" 2825 path: "1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)" 2827 id: "0x56BB" 2829 minOccurs: "1" 2831 maxOccurs: "1" 2833 default: "0" 2835 type: "uinteger" 2837 minver: "4" 2839 documentation: After a discontinuity, SeekPreRoll is the duration in 2840 nanoseconds of the data the decoder MUST decode before the decoded 2841 data is valid. 2843 9.3.4.1.29. TrackTranslate Element 2845 name: "TrackTranslate" 2847 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate)" 2849 id: "0x6624" 2851 type: "master" 2853 minver: "1" 2855 documentation: The track identification for the given Chapter Codec. 2857 9.3.4.1.29.1. TrackTranslateEditionUID Element 2859 name: "TrackTranslateEditionUID" 2861 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEdi 2862 tionUID)" 2864 id: "0x66FC" 2866 type: "uinteger" 2868 minver: "1" 2870 documentation: Specify an edition UID on which this translation 2871 applies. When not specified, it means for all editions found in the 2872 Segment. 2874 9.3.4.1.29.2. TrackTranslateCodec Element 2876 name: "TrackTranslateCodec" 2878 path: 2879 "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)" 2881 id: "0x66BF" 2883 minOccurs: "1" 2885 maxOccurs: "1" 2887 type: "uinteger" 2889 minver: "1" 2891 documentation: The chapter codec. 2893 restrictions: 2895 +-------+-----------------+ 2896 | value | label | 2897 +-------+-----------------+ 2898 | "0" | Matroska Script | 2899 | "1" | DVD-menu | 2900 +-------+-----------------+ 2902 9.3.4.1.29.3. TrackTranslateTrackID Element 2904 name: "TrackTranslateTrackID" 2906 path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTr 2907 ackID)" 2909 id: "0x66A5" 2911 minOccurs: "1" 2913 maxOccurs: "1" 2915 type: "binary" 2917 minver: "1" 2919 documentation: The binary value used to represent this track in the 2920 chapter codec data. The format depends on the ChapProcessCodecID 2921 used. 2923 9.3.4.1.30. Video Element 2925 name: "Video" 2927 path: "0*1(\Segment\Tracks\TrackEntry\Video)" 2929 id: "0xE0" 2931 maxOccurs: "1" 2933 type: "master" 2935 minver: "1" 2937 documentation: Video settings. 2939 9.3.4.1.30.1. FlagInterlaced Element 2941 name: "FlagInterlaced" 2943 path: "1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)" 2945 id: "0x9A" 2947 minOccurs: "1" 2949 maxOccurs: "1" 2950 range: "0-2" 2952 default: "0" 2954 type: "uinteger" 2956 minver: "2" 2958 documentation: A flag to declare if the video is known to be 2959 progressive or interlaced and if applicable to declare details about 2960 the interlacement. 2962 restrictions: 2964 +-------+--------------+ 2965 | value | label | 2966 +-------+--------------+ 2967 | "0" | undetermined | 2968 | "1" | interlaced | 2969 | "2" | progressive | 2970 +-------+--------------+ 2972 9.3.4.1.30.2. FieldOrder Element 2974 name: "FieldOrder" 2976 path: "1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)" 2978 id: "0x9D" 2980 minOccurs: "1" 2982 maxOccurs: "1" 2984 range: "0-14" 2986 default: "2" 2988 type: "uinteger" 2990 minver: "4" 2992 documentation: Declare the field ordering of the video. If 2993 FlagInterlaced is not set to 1, this Element MUST be ignored. 2995 restrictions: 2997 +-------+--------------+--------------------------------------------+ 2998 | value | label | documentation | 2999 +-------+--------------+--------------------------------------------+ 3000 | "0" | progressive | | 3001 | "1" | tff | Top field displayed first. Top field | 3002 | | | stored first. | 3003 | "2" | undetermined | | 3004 | "6" | bff | Bottom field displayed first. Bottom field | 3005 | | | stored first. | 3006 | "9" | bff(swapped) | Top field displayed first. Fields are | 3007 | | | interleaved in storage with the top line | 3008 | | | of the top field stored first. | 3009 | "14" | tff(swapped) | Bottom field displayed first. Fields are | 3010 | | | interleaved in storage with the top line | 3011 | | | of the top field stored first. | 3012 +-------+--------------+--------------------------------------------+ 3014 9.3.4.1.30.3. StereoMode Element 3016 name: "StereoMode" 3018 path: "0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)" 3020 id: "0x53B8" 3022 maxOccurs: "1" 3024 default: "0" 3026 type: "uinteger" 3028 minver: "3" 3030 documentation: Stereo-3D video mode. There are some more details on 3031 3D support in the Specification Notes. 3033 restrictions: 3035 +-------+---------------------------------------------------+ 3036 | value | label | 3037 +-------+---------------------------------------------------+ 3038 | "0" | mono | 3039 | "1" | side by side (left eye first) | 3040 | "2" | top - bottom (right eye is first) | 3041 | "3" | top - bottom (left eye is first) | 3042 | "4" | checkboard (right eye is first) | 3043 | "5" | checkboard (left eye is first) | 3044 | "6" | row interleaved (right eye is first) | 3045 | "7" | row interleaved (left eye is first) | 3046 | "8" | column interleaved (right eye is first) | 3047 | "9" | column interleaved (left eye is first) | 3048 | "10" | anaglyph (cyan/red) | 3049 | "11" | side by side (right eye first) | 3050 | "12" | anaglyph (green/magenta) | 3051 | "13" | both eyes laced in one Block (left eye is first) | 3052 | "14" | both eyes laced in one Block (right eye is first) | 3053 +-------+---------------------------------------------------+ 3055 9.3.4.1.30.4. AlphaMode Element 3057 name: "AlphaMode" 3059 path: "0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)" 3061 id: "0x53C0" 3063 maxOccurs: "1" 3065 default: "0" 3067 type: "uinteger" 3069 minver: "3" 3071 documentation: Alpha Video Mode. Presence of this Element indicates 3072 that the BlockAdditional Element could contain Alpha data. 3074 9.3.4.1.30.5. OldStereoMode Element 3076 name: "OldStereoMode" 3078 path: "0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)" 3080 id: "0x53B9" 3082 maxOccurs: "1" 3083 type: "uinteger" 3085 maxver: "0" 3087 documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used 3088 in old versions of libmatroska. 3090 restrictions: 3092 +-------+-----------+ 3093 | value | label | 3094 +-------+-----------+ 3095 | "0" | mono | 3096 | "1" | right eye | 3097 | "2" | left eye | 3098 | "3" | both eyes | 3099 +-------+-----------+ 3101 9.3.4.1.30.6. PixelWidth Element 3103 name: "PixelWidth" 3105 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)" 3107 id: "0xB0" 3109 minOccurs: "1" 3111 maxOccurs: "1" 3113 range: "not 0" 3115 type: "uinteger" 3117 minver: "1" 3119 documentation: Width of the encoded video frames in pixels. 3121 9.3.4.1.30.7. PixelHeight Element 3123 name: "PixelHeight" 3125 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)" 3127 id: "0xBA" 3129 minOccurs: "1" 3130 maxOccurs: "1" 3132 range: "not 0" 3134 type: "uinteger" 3136 minver: "1" 3138 documentation: Height of the encoded video frames in pixels. 3140 9.3.4.1.30.8. PixelCropBottom Element 3142 name: "PixelCropBottom" 3144 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)" 3146 id: "0x54AA" 3148 maxOccurs: "1" 3150 default: "0" 3152 type: "uinteger" 3154 minver: "1" 3156 documentation: The number of video pixels to remove at the bottom of 3157 the image. 3159 9.3.4.1.30.9. PixelCropTop Element 3161 name: "PixelCropTop" 3163 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)" 3165 id: "0x54BB" 3167 maxOccurs: "1" 3169 default: "0" 3171 type: "uinteger" 3173 minver: "1" 3175 documentation: The number of video pixels to remove at the top of the 3176 image. 3178 9.3.4.1.30.10. PixelCropLeft Element 3180 name: "PixelCropLeft" 3182 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)" 3184 id: "0x54CC" 3186 maxOccurs: "1" 3188 default: "0" 3190 type: "uinteger" 3192 minver: "1" 3194 documentation: The number of video pixels to remove on the left of 3195 the image. 3197 9.3.4.1.30.11. PixelCropRight Element 3199 name: "PixelCropRight" 3201 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)" 3203 id: "0x54DD" 3205 maxOccurs: "1" 3207 default: "0" 3209 type: "uinteger" 3211 minver: "1" 3213 documentation: The number of video pixels to remove on the right of 3214 the image. 3216 9.3.4.1.30.12. DisplayWidth Element 3218 name: "DisplayWidth" 3220 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)" 3222 id: "0x54B0" 3224 maxOccurs: "1" 3225 range: "not 0" 3227 default: "PixelWidth - PixelCropLeft - PixelCropRight" 3229 type: "uinteger" 3231 minver: "1" 3233 documentation: Width of the video frames to display. Applies to the 3234 video frame after cropping (PixelCrop* Elements). The default value 3235 is only valid when DisplayUnit is 0. 3237 9.3.4.1.30.13. DisplayHeight Element 3239 name: "DisplayHeight" 3241 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)" 3243 id: "0x54BA" 3245 maxOccurs: "1" 3247 range: "not 0" 3249 default: "PixelHeight - PixelCropTop - PixelCropBottom" 3251 type: "uinteger" 3253 minver: "1" 3255 documentation: Height of the video frames to display. Applies to the 3256 video frame after cropping (PixelCrop* Elements). The default value 3257 is only valid when DisplayUnit is 0. 3259 9.3.4.1.30.14. DisplayUnit Element 3261 name: "DisplayUnit" 3263 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)" 3265 id: "0x54B2" 3267 maxOccurs: "1" 3269 default: "0" 3271 type: "uinteger" 3272 minver: "1" 3274 documentation: How DisplayWidth & DisplayHeight are interpreted. 3276 restrictions: 3278 +-------+----------------------+ 3279 | value | label | 3280 +-------+----------------------+ 3281 | "0" | pixels | 3282 | "1" | centimeters | 3283 | "2" | inches | 3284 | "3" | display aspect ratio | 3285 | "4" | unknown | 3286 +-------+----------------------+ 3288 9.3.4.1.30.15. AspectRatioType Element 3290 name: "AspectRatioType" 3292 path: "0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)" 3294 id: "0x54B3" 3296 maxOccurs: "1" 3298 default: "0" 3300 type: "uinteger" 3302 minver: "1" 3304 documentation: Specify the possible modifications to the aspect 3305 ratio. 3307 restrictions: 3309 +-------+-------------------+ 3310 | value | label | 3311 +-------+-------------------+ 3312 | "0" | free resizing | 3313 | "1" | keep aspect ratio | 3314 | "2" | fixed | 3315 +-------+-------------------+ 3317 9.3.4.1.30.16. ColourSpace Element 3319 name: "ColourSpace" 3321 path: "0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)" 3323 id: "0x2EB524" 3325 maxOccurs: "1" 3327 size: "4" 3329 type: "binary" 3331 minver: "1" 3333 documentation: Specify the pixel format used for the Track's data as 3334 a FourCC. This value is similar in scope to the biCompression value 3335 of AVI's BITMAPINFOHEADER. This Element is MANDATORY in TrackEntry 3336 when the CodecID Element of the TrackEntry is set to 3337 "V_UNCOMPRESSED". 3339 9.3.4.1.30.17. GammaValue Element 3341 name: "GammaValue" 3343 path: "0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)" 3345 id: "0x2FB523" 3347 maxOccurs: "1" 3349 range: "> 0x0p+0" 3351 type: "float" 3353 minver: "0" 3355 maxver: "0" 3357 documentation: Gamma Value. 3359 9.3.4.1.30.18. FrameRate Element 3361 name: "FrameRate" 3363 path: "0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)" 3364 id: "0x2383E3" 3366 maxOccurs: "1" 3368 range: "> 0x0p+0" 3370 type: "float" 3372 minver: "0" 3374 maxver: "0" 3376 documentation: Number of frames per second. Informational only. 3378 9.3.4.1.30.19. Colour Element 3380 name: "Colour" 3382 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour)" 3384 id: "0x55B0" 3386 maxOccurs: "1" 3388 type: "master" 3390 minver: "4" 3392 documentation: Settings describing the colour format. 3394 9.3.4.1.30.20. MatrixCoefficients Element 3396 name: "MatrixCoefficients" 3398 path: 3399 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)" 3401 id: "0x55B1" 3403 maxOccurs: "1" 3405 default: "2" 3407 type: "uinteger" 3409 minver: "4" 3410 documentation: The Matrix Coefficients of the video used to derive 3411 luma and chroma values from red, green, and blue color primaries. 3412 For clarity, the value and meanings for MatrixCoefficients are 3413 adopted from Table 4 of ISO/IEC 23001-8:2013/DCOR1. 3415 restrictions: 3417 +-------+-------------------------------+ 3418 | value | label | 3419 +-------+-------------------------------+ 3420 | "0" | GBR | 3421 | "1" | BT709 | 3422 | "2" | unspecified | 3423 | "3" | reserved | 3424 | "4" | FCC | 3425 | "5" | BT470BG | 3426 | "6" | SMPTE 170M | 3427 | "7" | SMPTE 240M | 3428 | "8" | YCoCg | 3429 | "9" | BT2020 Non-constant Luminance | 3430 | "10" | BT2020 Constant Luminance | 3431 +-------+-------------------------------+ 3433 9.3.4.1.30.21. BitsPerChannel Element 3435 name: "BitsPerChannel" 3437 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)" 3439 id: "0x55B2" 3441 maxOccurs: "1" 3443 default: "0" 3445 type: "uinteger" 3447 minver: "4" 3449 documentation: Number of decoded bits per channel. A value of 0 3450 indicates that the BitsPerChannel is unspecified. 3452 9.3.4.1.30.22. ChromaSubsamplingHorz Element 3454 name: "ChromaSubsamplingHorz" 3456 path: 3457 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)" 3458 id: "0x55B3" 3460 maxOccurs: "1" 3462 type: "uinteger" 3464 minver: "4" 3466 documentation: The amount of pixels to remove in the Cr and Cb 3467 channels for every pixel not removed horizontally. Example: For 3468 video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD 3469 be set to 1. 3471 9.3.4.1.30.23. ChromaSubsamplingVert Element 3473 name: "ChromaSubsamplingVert" 3475 path: 3476 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)" 3478 id: "0x55B4" 3480 maxOccurs: "1" 3482 type: "uinteger" 3484 minver: "4" 3486 documentation: The amount of pixels to remove in the Cr and Cb 3487 channels for every pixel not removed vertically. Example: For video 3488 with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be 3489 set to 1. 3491 9.3.4.1.30.24. CbSubsamplingHorz Element 3493 name: "CbSubsamplingHorz" 3495 path: 3496 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)" 3498 id: "0x55B5" 3500 maxOccurs: "1" 3502 type: "uinteger" 3504 minver: "4" 3505 documentation: The amount of pixels to remove in the Cb channel for 3506 every pixel not removed horizontally. This is additive with 3507 ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma 3508 subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and 3509 CbSubsamplingHorz SHOULD be set to 1. 3511 9.3.4.1.30.25. CbSubsamplingVert Element 3513 name: "CbSubsamplingVert" 3515 path: 3516 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)" 3518 id: "0x55B6" 3520 maxOccurs: "1" 3522 type: "uinteger" 3524 minver: "4" 3526 documentation: The amount of pixels to remove in the Cb channel for 3527 every pixel not removed vertically. This is additive with 3528 ChromaSubsamplingVert. 3530 9.3.4.1.30.26. ChromaSitingHorz Element 3532 name: "ChromaSitingHorz" 3534 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)" 3536 id: "0x55B7" 3538 maxOccurs: "1" 3540 default: "0" 3542 type: "uinteger" 3544 minver: "4" 3546 documentation: How chroma is subsampled horizontally. 3548 restrictions: 3550 +-------+-----------------+ 3551 | value | label | 3552 +-------+-----------------+ 3553 | "0" | unspecified | 3554 | "1" | left collocated | 3555 | "2" | half | 3556 +-------+-----------------+ 3558 9.3.4.1.30.27. ChromaSitingVert Element 3560 name: "ChromaSitingVert" 3562 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)" 3564 id: "0x55B8" 3566 maxOccurs: "1" 3568 default: "0" 3570 type: "uinteger" 3572 minver: "4" 3574 documentation: How chroma is subsampled vertically. 3576 restrictions: 3578 +-------+----------------+ 3579 | value | label | 3580 +-------+----------------+ 3581 | "0" | unspecified | 3582 | "1" | top collocated | 3583 | "2" | half | 3584 +-------+----------------+ 3586 9.3.4.1.30.28. Range Element 3588 name: "Range" 3590 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)" 3592 id: "0x55B9" 3594 maxOccurs: "1" 3596 default: "0" 3597 type: "uinteger" 3599 minver: "4" 3601 documentation: Clipping of the color ranges. 3603 restrictions: 3605 +-------+-------------------------------------------------------+ 3606 | value | label | 3607 +-------+-------------------------------------------------------+ 3608 | "0" | unspecified | 3609 | "1" | broadcast range | 3610 | "2" | full range (no clipping) | 3611 | "3" | defined by MatrixCoefficients/TransferCharacteristics | 3612 +-------+-------------------------------------------------------+ 3614 9.3.4.1.30.29. TransferCharacteristics Element 3616 name: "TransferCharacteristics" 3618 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteri 3619 stics)" 3621 id: "0x55BA" 3623 maxOccurs: "1" 3625 default: "2" 3627 type: "uinteger" 3629 minver: "4" 3631 documentation: The transfer characteristics of the video. For 3632 clarity, the value and meanings for TransferCharacteristics are 3633 adopted from Table 3 of ISO/IEC 23091-4/ITU-T H.273. 3635 restrictions: 3637 +-------+---------------------------------------+ 3638 | value | label | 3639 +-------+---------------------------------------+ 3640 | "0" | reserved | 3641 | "1" | ITU-R BT.709 | 3642 | "2" | unspecified | 3643 | "3" | reserved | 3644 | "4" | Gamma 2.2 curve - BT.470M | 3645 | "5" | Gamma 2.8 curve - BT.470BG | 3646 | "6" | SMPTE 170M | 3647 | "7" | SMPTE 240M | 3648 | "8" | Linear | 3649 | "9" | Log | 3650 | "10" | Log Sqrt | 3651 | "11" | IEC 61966-2-4 | 3652 | "12" | ITU-R BT.1361 Extended Colour Gamut | 3653 | "13" | IEC 61966-2-1 | 3654 | "14" | ITU-R BT.2020 10 bit | 3655 | "15" | ITU-R BT.2020 12 bit | 3656 | "16" | ITU-R BT.2100 Perceptual Quantization | 3657 | "17" | SMPTE ST 428-1 | 3658 | "18" | ARIB STD-B67 (HLG) | 3659 +-------+---------------------------------------+ 3661 9.3.4.1.30.30. Primaries Element 3663 name: "Primaries" 3665 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)" 3667 id: "0x55BB" 3669 maxOccurs: "1" 3671 default: "2" 3673 type: "uinteger" 3675 minver: "4" 3677 documentation: The colour primaries of the video. For clarity, the 3678 value and meanings for Primaries are adopted from Table 2 of ISO/IEC 3679 23091-4/ITU-T H.273. 3681 restrictions: 3683 +-------+----------------------------------------+ 3684 | value | label | 3685 +-------+----------------------------------------+ 3686 | "0" | reserved | 3687 | "1" | ITU-R BT.709 | 3688 | "2" | unspecified | 3689 | "3" | reserved | 3690 | "4" | ITU-R BT.470M | 3691 | "5" | ITU-R BT.470BG - BT.601 625 | 3692 | "6" | ITU-R BT.601 525 - SMPTE 170M | 3693 | "7" | SMPTE 240M | 3694 | "8" | FILM | 3695 | "9" | ITU-R BT.2020 | 3696 | "10" | SMPTE ST 428-1 | 3697 | "11" | SMPTE RP 432-2 | 3698 | "12" | SMPTE EG 432-2 | 3699 | "22" | EBY Tech. 3213-E - JEDEC P22 phosphors | 3700 +-------+----------------------------------------+ 3702 9.3.4.1.30.31. MaxCLL Element 3704 name: "MaxCLL" 3706 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)" 3708 id: "0x55BC" 3710 maxOccurs: "1" 3712 type: "uinteger" 3714 minver: "4" 3716 documentation: Maximum brightness of a single pixel (Maximum Content 3717 Light Level) in candelas per square meter (cd/m^2). 3719 9.3.4.1.30.32. MaxFALL Element 3721 name: "MaxFALL" 3723 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)" 3725 id: "0x55BD" 3727 maxOccurs: "1" 3729 type: "uinteger" 3730 minver: "4" 3732 documentation: Maximum brightness of a single full frame (Maximum 3733 Frame-Average Light Level) in candelas per square meter (cd/m^2). 3735 9.3.4.1.30.33. MasteringMetadata Element 3737 name: "MasteringMetadata" 3739 path: 3740 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)" 3742 id: "0x55D0" 3744 maxOccurs: "1" 3746 type: "master" 3748 minver: "4" 3750 documentation: SMPTE 2086 mastering data. 3752 9.3.4.1.30.34. PrimaryRChromaticityX Element 3754 name: "PrimaryRChromaticityX" 3756 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3757 PrimaryRChromaticityX)" 3759 id: "0x55D1" 3761 maxOccurs: "1" 3763 range: "0-1" 3765 type: "float" 3767 minver: "4" 3769 documentation: Red X chromaticity coordinate as defined by CIE 1931. 3771 9.3.4.1.30.35. PrimaryRChromaticityY Element 3773 name: "PrimaryRChromaticityY" 3775 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3776 PrimaryRChromaticityY)" 3777 id: "0x55D2" 3779 maxOccurs: "1" 3781 range: "0-1" 3783 type: "float" 3785 minver: "4" 3787 documentation: Red Y chromaticity coordinate as defined by CIE 1931. 3789 9.3.4.1.30.36. PrimaryGChromaticityX Element 3791 name: "PrimaryGChromaticityX" 3793 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3794 PrimaryGChromaticityX)" 3796 id: "0x55D3" 3798 maxOccurs: "1" 3800 range: "0-1" 3802 type: "float" 3804 minver: "4" 3806 documentation: Green X chromaticity coordinate as defined by CIE 3807 1931. 3809 9.3.4.1.30.37. PrimaryGChromaticityY Element 3811 name: "PrimaryGChromaticityY" 3813 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3814 PrimaryGChromaticityY)" 3816 id: "0x55D4" 3818 maxOccurs: "1" 3820 range: "0-1" 3822 type: "float" 3824 minver: "4" 3825 documentation: Green Y chromaticity coordinate as defined by CIE 3826 1931. 3828 9.3.4.1.30.38. PrimaryBChromaticityX Element 3830 name: "PrimaryBChromaticityX" 3832 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3833 PrimaryBChromaticityX)" 3835 id: "0x55D5" 3837 maxOccurs: "1" 3839 range: "0-1" 3841 type: "float" 3843 minver: "4" 3845 documentation: Blue X chromaticity coordinate as defined by CIE 1931. 3847 9.3.4.1.30.39. PrimaryBChromaticityY Element 3849 name: "PrimaryBChromaticityY" 3851 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3852 PrimaryBChromaticityY)" 3854 id: "0x55D6" 3856 maxOccurs: "1" 3858 range: "0-1" 3860 type: "float" 3862 minver: "4" 3864 documentation: Blue Y chromaticity coordinate as defined by CIE 1931. 3866 9.3.4.1.30.40. WhitePointChromaticityX Element 3868 name: "WhitePointChromaticityX" 3870 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3871 WhitePointChromaticityX)" 3872 id: "0x55D7" 3874 maxOccurs: "1" 3876 range: "0-1" 3878 type: "float" 3880 minver: "4" 3882 documentation: White X chromaticity coordinate as defined by CIE 3883 1931. 3885 9.3.4.1.30.41. WhitePointChromaticityY Element 3887 name: "WhitePointChromaticityY" 3889 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3890 WhitePointChromaticityY)" 3892 id: "0x55D8" 3894 maxOccurs: "1" 3896 range: "0-1" 3898 type: "float" 3900 minver: "4" 3902 documentation: White Y chromaticity coordinate as defined by CIE 3903 1931. 3905 9.3.4.1.30.42. LuminanceMax Element 3907 name: "LuminanceMax" 3909 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3910 LuminanceMax)" 3912 id: "0x55D9" 3914 maxOccurs: "1" 3916 range: ">= 0x0p+0" 3918 type: "float" 3919 minver: "4" 3921 documentation: Maximum luminance. Represented in candelas per square 3922 meter (cd/m^2). 3924 9.3.4.1.30.43. LuminanceMin Element 3926 name: "LuminanceMin" 3928 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3929 LuminanceMin)" 3931 id: "0x55DA" 3933 maxOccurs: "1" 3935 range: ">= 0x0p+0" 3937 type: "float" 3939 minver: "4" 3941 documentation: Mininum luminance. Represented in candelas per square 3942 meter (cd/m^2). 3944 9.3.4.1.30.44. Projection Element 3946 name: "Projection" 3948 path: "0*1(\Segment\Tracks\TrackEntry\Video\Projection)" 3950 id: "0x7670" 3952 maxOccurs: "1" 3954 type: "master" 3956 minver: "4" 3958 documentation: Describes the video projection details. Used to 3959 render spherical and VR videos. 3961 9.3.4.1.30.45. ProjectionType Element 3963 name: "ProjectionType" 3965 path: 3966 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionType)" 3967 id: "0x7671" 3969 minOccurs: "1" 3971 maxOccurs: "1" 3973 range: "0-3" 3975 default: "0" 3977 type: "uinteger" 3979 minver: "4" 3981 documentation: Describes the projection used for this video track. 3983 restrictions: 3985 +-------+-----------------+ 3986 | value | label | 3987 +-------+-----------------+ 3988 | "0" | rectangular | 3989 | "1" | equirectangular | 3990 | "2" | cubemap | 3991 | "3" | mesh | 3992 +-------+-----------------+ 3994 9.3.4.1.30.46. ProjectionPrivate Element 3996 name: "ProjectionPrivate" 3998 path: 3999 "0*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate)" 4001 id: "0x7672" 4003 maxOccurs: "1" 4005 type: "binary" 4007 minver: "4" 4009 documentation: Private data that only applies to a specific 4010 projection.SemanticsIf ProjectionType equals 0 (Rectangular), then 4011 this element must not be present.If ProjectionType equals 1 4012 (Equirectangular), then this element must be present and contain the 4013 same binary data that would be stored inside an ISOBMFF 4014 Equirectangular Projection Box ('equi').If ProjectionType equals 2 4015 (Cubemap), then this element must be present and contain the same 4016 binary data that would be stored inside an ISOBMFF Cubemap Projection 4017 Box ('cbmp').If ProjectionType equals 3 (Mesh), then this element 4018 must be present and contain the same binary data that would be stored 4019 inside an ISOBMFF Mesh Projection Box ('mshp').Note: ISOBMFF box size 4020 and fourcc fields are not included in the binary data, but the 4021 FullBox version and flag fields are. This is to avoid redundant 4022 framing information while preserving versioning and semantics between 4023 the two container formats. 4025 9.3.4.1.30.47. ProjectionPoseYaw Element 4027 name: "ProjectionPoseYaw" 4029 path: 4030 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw)" 4032 id: "0x7673" 4034 minOccurs: "1" 4036 maxOccurs: "1" 4038 default: "0x0p+0" 4040 type: "float" 4042 minver: "4" 4044 documentation: Specifies a yaw rotation to the 4045 projection.SemanticsValue represents a clockwise rotation, in 4046 degrees, around the up vector. This rotation must be applied before 4047 any ProjectionPosePitch or ProjectionPoseRoll rotations. The value 4048 of this field should be in the -180 to 180 degree range. 4050 9.3.4.1.30.48. ProjectionPosePitch Element 4052 name: "ProjectionPosePitch" 4054 path: "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPose 4055 Pitch)" 4057 id: "0x7674" 4059 minOccurs: "1" 4061 maxOccurs: "1" 4062 default: "0x0p+0" 4064 type: "float" 4066 minver: "4" 4068 documentation: Specifies a pitch rotation to the 4069 projection.SemanticsValue represents a counter-clockwise rotation, in 4070 degrees, around the right vector. This rotation must be applied 4071 after the ProjectionPoseYaw rotation and before the 4072 ProjectionPoseRoll rotation. The value of this field should be in 4073 the -90 to 90 degree range. 4075 9.3.4.1.30.49. ProjectionPoseRoll Element 4077 name: "ProjectionPoseRoll" 4079 path: 4080 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll)" 4082 id: "0x7675" 4084 minOccurs: "1" 4086 maxOccurs: "1" 4088 default: "0x0p+0" 4090 type: "float" 4092 minver: "4" 4094 documentation: Specifies a roll rotation to the 4095 projection.SemanticsValue represents a counter-clockwise rotation, in 4096 degrees, around the forward vector. This rotation must be applied 4097 after the ProjectionPoseYaw and ProjectionPosePitch rotations. The 4098 value of this field should be in the -180 to 180 degree range. 4100 9.3.4.1.31. Audio Element 4102 name: "Audio" 4104 path: "0*1(\Segment\Tracks\TrackEntry\Audio)" 4106 id: "0xE1" 4108 maxOccurs: "1" 4109 type: "master" 4111 minver: "1" 4113 documentation: Audio settings. 4115 9.3.4.1.31.1. SamplingFrequency Element 4117 name: "SamplingFrequency" 4119 path: "1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)" 4121 id: "0xB5" 4123 minOccurs: "1" 4125 maxOccurs: "1" 4127 range: "> 0x0p+0" 4129 default: "0x1.f4p+12" 4131 type: "float" 4133 minver: "1" 4135 documentation: Sampling frequency in Hz. 4137 9.3.4.1.31.2. OutputSamplingFrequency Element 4139 name: "OutputSamplingFrequency" 4141 path: "0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)" 4143 id: "0x78B5" 4145 maxOccurs: "1" 4147 range: "> 0x0p+0" 4149 default: "SamplingFrequency" 4151 type: "float" 4153 minver: "1" 4155 documentation: Real output sampling frequency in Hz (used for SBR 4156 techniques). 4158 9.3.4.1.31.3. Channels Element 4160 name: "Channels" 4162 path: "1*1(\Segment\Tracks\TrackEntry\Audio\Channels)" 4164 id: "0x9F" 4166 minOccurs: "1" 4168 maxOccurs: "1" 4170 range: "not 0" 4172 default: "1" 4174 type: "uinteger" 4176 minver: "1" 4178 documentation: Numbers of channels in the track. 4180 9.3.4.1.31.4. ChannelPositions Element 4182 name: "ChannelPositions" 4184 path: "0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)" 4186 id: "0x7D7B" 4188 maxOccurs: "1" 4190 type: "binary" 4192 minver: "0" 4194 maxver: "0" 4196 documentation: Table of horizontal angles for each successive 4197 channel, see appendix. 4199 9.3.4.1.31.5. BitDepth Element 4201 name: "BitDepth" 4203 path: "0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)" 4205 id: "0x6264" 4206 maxOccurs: "1" 4208 range: "not 0" 4210 type: "uinteger" 4212 minver: "1" 4214 documentation: Bits per sample, mostly used for PCM. 4216 9.3.4.1.32. TrackOperation Element 4218 name: "TrackOperation" 4220 path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation)" 4222 id: "0xE2" 4224 maxOccurs: "1" 4226 type: "master" 4228 minver: "3" 4230 documentation: Operation that needs to be applied on tracks to create 4231 this virtual track. For more details look at the Specification Notes 4232 on the subject. 4234 9.3.4.1.32.1. TrackCombinePlanes Element 4236 name: "TrackCombinePlanes" 4238 path: 4239 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)" 4241 id: "0xE3" 4243 maxOccurs: "1" 4245 type: "master" 4247 minver: "3" 4249 documentation: Contains the list of all video plane tracks that need 4250 to be combined to create this 3D track 4252 9.3.4.1.32.2. TrackPlane Element 4254 name: "TrackPlane" 4256 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlane 4257 s\TrackPlane)" 4259 id: "0xE4" 4261 minOccurs: "1" 4263 type: "master" 4265 minver: "3" 4267 documentation: Contains a video plane track that need to be combined 4268 to create this 3D track 4270 9.3.4.1.32.3. TrackPlaneUID Element 4272 name: "TrackPlaneUID" 4274 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4275 es\TrackPlane\TrackPlaneUID)" 4277 id: "0xE5" 4279 minOccurs: "1" 4281 maxOccurs: "1" 4283 range: "not 0" 4285 type: "uinteger" 4287 minver: "3" 4289 documentation: The trackUID number of the track representing the 4290 plane. 4292 9.3.4.1.32.4. TrackPlaneType Element 4294 name: "TrackPlaneType" 4296 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4297 es\TrackPlane\TrackPlaneType)" 4299 id: "0xE6" 4300 minOccurs: "1" 4302 maxOccurs: "1" 4304 type: "uinteger" 4306 minver: "3" 4308 documentation: The kind of plane this track corresponds to. 4310 restrictions: 4312 +-------+------------+ 4313 | value | label | 4314 +-------+------------+ 4315 | "0" | left eye | 4316 | "1" | right eye | 4317 | "2" | background | 4318 +-------+------------+ 4320 9.3.4.1.32.5. TrackJoinBlocks Element 4322 name: "TrackJoinBlocks" 4324 path: 4325 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)" 4327 id: "0xE9" 4329 maxOccurs: "1" 4331 type: "master" 4333 minver: "3" 4335 documentation: Contains the list of all tracks whose Blocks need to 4336 be combined to create this virtual track 4338 9.3.4.1.32.6. TrackJoinUID Element 4340 name: "TrackJoinUID" 4342 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\T 4343 rackJoinUID)" 4345 id: "0xED" 4347 minOccurs: "1" 4348 range: "not 0" 4350 type: "uinteger" 4352 minver: "3" 4354 documentation: The trackUID number of a track whose blocks are used 4355 to create this virtual track. 4357 9.3.4.1.33. TrickTrackUID Element 4359 name: "TrickTrackUID" 4361 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)" 4363 id: "0xC0" 4365 maxOccurs: "1" 4367 type: "uinteger" 4369 minver: "0" 4371 maxver: "0" 4373 documentation: DivX trick track extensions 4375 9.3.4.1.34. TrickTrackSegmentUID Element 4377 name: "TrickTrackSegmentUID" 4379 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)" 4381 id: "0xC1" 4383 maxOccurs: "1" 4385 size: "16" 4387 type: "binary" 4389 minver: "0" 4391 maxver: "0" 4393 documentation: DivX trick track extensions 4395 9.3.4.1.35. TrickTrackFlag Element 4397 name: "TrickTrackFlag" 4399 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)" 4401 id: "0xC6" 4403 maxOccurs: "1" 4405 default: "0" 4407 type: "uinteger" 4409 minver: "0" 4411 maxver: "0" 4413 documentation: DivX trick track extensions 4415 9.3.4.1.36. TrickMasterTrackUID Element 4417 name: "TrickMasterTrackUID" 4419 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)" 4421 id: "0xC7" 4423 maxOccurs: "1" 4425 type: "uinteger" 4427 minver: "0" 4429 maxver: "0" 4431 documentation: DivX trick track extensions 4433 9.3.4.1.37. TrickMasterTrackSegmentUID Element 4435 name: "TrickMasterTrackSegmentUID" 4437 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)" 4439 id: "0xC4" 4441 maxOccurs: "1" 4442 size: "16" 4444 type: "binary" 4446 minver: "0" 4448 maxver: "0" 4450 documentation: DivX trick track extensions 4452 9.3.4.1.38. ContentEncodings Element 4454 name: "ContentEncodings" 4456 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings)" 4458 id: "0x6D80" 4460 maxOccurs: "1" 4462 type: "master" 4464 minver: "1" 4466 documentation: Settings for several content encoding mechanisms like 4467 compression or encryption. 4469 9.3.4.1.38.1. ContentEncoding Element 4471 name: "ContentEncoding" 4473 path: 4474 "1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)" 4476 id: "0x6240" 4478 minOccurs: "1" 4480 type: "master" 4482 minver: "1" 4484 documentation: Settings for one content encoding like compression or 4485 encryption. 4487 9.3.4.1.38.2. ContentEncodingOrder Element 4489 name: "ContentEncodingOrder" 4491 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4492 g\ContentEncodingOrder)" 4494 id: "0x5031" 4496 minOccurs: "1" 4498 maxOccurs: "1" 4500 default: "0" 4502 type: "uinteger" 4504 minver: "1" 4506 documentation: Tells when this modification was used during encoding/ 4507 muxing starting with 0 and counting upwards. The decoder/demuxer has 4508 to start with the highest order number it finds and work its way 4509 down. This value has to be unique over all ContentEncodingOrder 4510 Elements in the Segment. 4512 9.3.4.1.38.3. ContentEncodingScope Element 4514 name: "ContentEncodingScope" 4516 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4517 g\ContentEncodingScope)" 4519 id: "0x5032" 4521 minOccurs: "1" 4523 maxOccurs: "1" 4525 range: "not 0" 4527 default: "1" 4529 type: "uinteger" 4531 minver: "1" 4533 documentation: A bit field that describes which Elements have been 4534 modified in this way. Values (big endian) can be OR'ed. Possible 4535 values: 1 - all frame contents, 2 - the track's private data, 4 - the 4536 next ContentEncoding (next ContentEncodingOrder. Either the data 4537 inside ContentCompression and/or ContentEncryption) 4539 9.3.4.1.38.4. ContentEncodingType Element 4541 name: "ContentEncodingType" 4543 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4544 g\ContentEncodingType)" 4546 id: "0x5033" 4548 minOccurs: "1" 4550 maxOccurs: "1" 4552 default: "0" 4554 type: "uinteger" 4556 minver: "1" 4558 documentation: A value describing what kind of transformation has 4559 been done. Possible values: 0 - compression, 1 - encryption 4561 9.3.4.1.38.5. ContentCompression Element 4563 name: "ContentCompression" 4565 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4566 g\ContentCompression)" 4568 id: "0x5034" 4570 maxOccurs: "1" 4572 type: "master" 4574 minver: "1" 4576 documentation: Settings describing the compression used. This 4577 Element MUST be present if the value of ContentEncodingType is 0 and 4578 absent otherwise. Each block MUST be decompressable even if no 4579 previous block is available in order not to prevent seeking. 4581 9.3.4.1.38.6. ContentCompAlgo Element 4583 name: "ContentCompAlgo" 4585 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4586 g\ContentCompression\ContentCompAlgo)" 4588 id: "0x4254" 4590 minOccurs: "1" 4592 maxOccurs: "1" 4594 default: "0" 4596 type: "uinteger" 4598 minver: "1" 4600 documentation: The compression algorithm used. Algorithms that have 4601 been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header 4602 Stripping 4604 9.3.4.1.38.7. ContentCompSettings Element 4606 name: "ContentCompSettings" 4608 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4609 g\ContentCompression\ContentCompSettings)" 4611 id: "0x4255" 4613 maxOccurs: "1" 4615 type: "binary" 4617 minver: "1" 4619 documentation: Settings that might be needed by the decompressor. 4620 For Header Stripping (ContentCompAlgo=3), the bytes that were removed 4621 from the beggining of each frames of the track. 4623 9.3.4.1.38.8. ContentEncryption Element 4625 name: "ContentEncryption" 4627 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4628 g\ContentEncryption)" 4629 id: "0x5035" 4631 maxOccurs: "1" 4633 type: "master" 4635 minver: "1" 4637 documentation: Settings describing the encryption used. This Element 4638 MUST be present if the value of ContentEncodingType is 1 and absent 4639 otherwise. 4641 9.3.4.1.38.9. ContentEncAlgo Element 4643 name: "ContentEncAlgo" 4645 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4646 g\ContentEncryption\ContentEncAlgo)" 4648 id: "0x47E1" 4650 maxOccurs: "1" 4652 default: "0" 4654 type: "uinteger" 4656 minver: "1" 4658 documentation: The encryption algorithm used. The value '0' means 4659 that the contents have not been encrypted but only signed. 4660 Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - 4661 AES 4663 9.3.4.1.38.10. ContentEncKeyID Element 4665 name: "ContentEncKeyID" 4667 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4668 g\ContentEncryption\ContentEncKeyID)" 4670 id: "0x47E2" 4672 maxOccurs: "1" 4674 type: "binary" 4676 minver: "1" 4677 documentation: For public key algorithms this is the ID of the public 4678 key the the data was encrypted with. 4680 9.3.4.1.38.11. ContentSignature Element 4682 name: "ContentSignature" 4684 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4685 g\ContentEncryption\ContentSignature)" 4687 id: "0x47E3" 4689 maxOccurs: "1" 4691 type: "binary" 4693 minver: "1" 4695 documentation: A cryptographic signature of the contents. 4697 9.3.4.1.38.12. ContentSigKeyID Element 4699 name: "ContentSigKeyID" 4701 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4702 g\ContentEncryption\ContentSigKeyID)" 4704 id: "0x47E4" 4706 maxOccurs: "1" 4708 type: "binary" 4710 minver: "1" 4712 documentation: This is the ID of the private key the data was signed 4713 with. 4715 9.3.4.1.38.13. ContentSigAlgo Element 4717 name: "ContentSigAlgo" 4719 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4720 g\ContentEncryption\ContentSigAlgo)" 4722 id: "0x47E5" 4724 maxOccurs: "1" 4725 default: "0" 4727 type: "uinteger" 4729 minver: "1" 4731 documentation: The algorithm used for the signature. A value of '0' 4732 means that the contents have not been signed but only encrypted. 4733 Predefined values: 1 - RSA 4735 9.3.4.1.38.14. ContentSigHashAlgo Element 4737 name: "ContentSigHashAlgo" 4739 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4740 g\ContentEncryption\ContentSigHashAlgo)" 4742 id: "0x47E6" 4744 maxOccurs: "1" 4746 default: "0" 4748 type: "uinteger" 4750 minver: "1" 4752 documentation: The hash algorithm used for the signature. A value of 4753 '0' means that the contents have not been signed but only encrypted. 4754 Predefined values: 1 - SHA1-160 2 - MD5 4756 9.3.5. Cues Element 4758 name: "Cues" 4760 path: "0*1(\Segment\Cues)" 4762 id: "0x1C53BB6B" 4764 maxOccurs: "1" 4766 type: "master" 4768 minver: "1" 4770 documentation: A Top-Level Element to speed seeking access. All 4771 entries are local to the Segment. This Element SHOULD be mandatory 4772 for non "live" streams. 4774 9.3.5.1. CuePoint Element 4776 name: "CuePoint" 4778 path: "1*(\Segment\Cues\CuePoint)" 4780 id: "0xBB" 4782 minOccurs: "1" 4784 type: "master" 4786 minver: "1" 4788 documentation: Contains all information relative to a seek point in 4789 the Segment. 4791 9.3.5.1.1. CueTime Element 4793 name: "CueTime" 4795 path: "1*1(\Segment\Cues\CuePoint\CueTime)" 4797 id: "0xB3" 4799 minOccurs: "1" 4801 maxOccurs: "1" 4803 type: "uinteger" 4805 minver: "1" 4807 documentation: Absolute timestamp according to the Segment time base. 4809 9.3.5.1.2. CueTrackPositions Element 4811 name: "CueTrackPositions" 4813 path: "1*(\Segment\Cues\CuePoint\CueTrackPositions)" 4815 id: "0xB7" 4817 minOccurs: "1" 4819 type: "master" 4821 minver: "1" 4822 documentation: Contain positions for different tracks corresponding 4823 to the timestamp. 4825 9.3.5.1.2.1. CueTrack Element 4827 name: "CueTrack" 4829 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)" 4831 id: "0xF7" 4833 minOccurs: "1" 4835 maxOccurs: "1" 4837 range: "not 0" 4839 type: "uinteger" 4841 minver: "1" 4843 documentation: The track for which a position is given. 4845 9.3.5.1.2.2. CueClusterPosition Element 4847 name: "CueClusterPosition" 4849 path: 4850 "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)" 4852 id: "0xF1" 4854 minOccurs: "1" 4856 maxOccurs: "1" 4858 type: "uinteger" 4860 minver: "1" 4862 documentation: The Segment Position of the Cluster containing the 4863 associated Block. 4865 9.3.5.1.2.3. CueRelativePosition Element 4867 name: "CueRelativePosition" 4868 path: 4869 "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)" 4871 id: "0xF0" 4873 maxOccurs: "1" 4875 type: "uinteger" 4877 minver: "4" 4879 documentation: The relative position inside the Cluster of the 4880 referenced SimpleBlock or BlockGroup with 0 being the first possible 4881 position for an Element inside that Cluster. 4883 9.3.5.1.2.4. CueDuration Element 4885 name: "CueDuration" 4887 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)" 4889 id: "0xB2" 4891 maxOccurs: "1" 4893 type: "uinteger" 4895 minver: "4" 4897 documentation: The duration of the block according to the Segment 4898 time base. If missing the track's DefaultDuration does not apply and 4899 no duration information is available in terms of the cues. 4901 9.3.5.1.2.5. CueBlockNumber Element 4903 name: "CueBlockNumber" 4905 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)" 4907 id: "0x5378" 4909 maxOccurs: "1" 4911 range: "not 0" 4913 default: "1" 4915 type: "uinteger" 4916 minver: "1" 4918 documentation: Number of the Block in the specified Cluster. 4920 9.3.5.1.2.6. CueCodecState Element 4922 name: "CueCodecState" 4924 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)" 4926 id: "0xEA" 4928 maxOccurs: "1" 4930 default: "0" 4932 type: "uinteger" 4934 minver: "2" 4936 documentation: The Segment Position of the Codec State corresponding 4937 to this Cue Element. 0 means that the data is taken from the initial 4938 Track Entry. 4940 9.3.5.1.2.7. CueReference Element 4942 name: "CueReference" 4944 path: "0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)" 4946 id: "0xDB" 4948 type: "master" 4950 minver: "2" 4952 documentation: The Clusters containing the referenced Blocks. 4954 9.3.5.1.2.8. CueRefTime Element 4956 name: "CueRefTime" 4958 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4959 efTime)" 4961 id: "0x96" 4963 minOccurs: "1" 4964 maxOccurs: "1" 4966 type: "uinteger" 4968 minver: "2" 4970 documentation: Timestamp of the referenced Block. 4972 9.3.5.1.2.9. CueRefCluster Element 4974 name: "CueRefCluster" 4976 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4977 efCluster)" 4979 id: "0x97" 4981 minOccurs: "1" 4983 maxOccurs: "1" 4985 type: "uinteger" 4987 minver: "0" 4989 maxver: "0" 4991 documentation: The Segment Position of the Cluster containing the 4992 referenced Block. 4994 9.3.5.1.2.10. CueRefNumber Element 4996 name: "CueRefNumber" 4998 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4999 efNumber)" 5001 id: "0x535F" 5003 maxOccurs: "1" 5005 range: "not 0" 5007 default: "1" 5009 type: "uinteger" 5011 minver: "0" 5012 maxver: "0" 5014 documentation: Number of the referenced Block of Track X in the 5015 specified Cluster. 5017 9.3.5.1.2.11. CueRefCodecState Element 5019 name: "CueRefCodecState" 5021 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 5022 efCodecState)" 5024 id: "0xEB" 5026 maxOccurs: "1" 5028 default: "0" 5030 type: "uinteger" 5032 minver: "0" 5034 maxver: "0" 5036 documentation: The Segment Position of the Codec State corresponding 5037 to this referenced Element. 0 means that the data is taken from the 5038 initial Track Entry. 5040 9.3.6. Attachments Element 5042 name: "Attachments" 5044 path: "0*1(\Segment\Attachments)" 5046 id: "0x1941A469" 5048 maxOccurs: "1" 5050 type: "master" 5052 minver: "1" 5054 documentation: Contain attached files. 5056 9.3.6.1. AttachedFile Element 5058 name: "AttachedFile" 5060 path: "1*(\Segment\Attachments\AttachedFile)" 5062 id: "0x61A7" 5064 minOccurs: "1" 5066 type: "master" 5068 minver: "1" 5070 documentation: An attached file. 5072 9.3.6.1.1. FileDescription Element 5074 name: "FileDescription" 5076 path: "0*1(\Segment\Attachments\AttachedFile\FileDescription)" 5078 id: "0x467E" 5080 maxOccurs: "1" 5082 type: "utf-8" 5084 minver: "1" 5086 documentation: A human-friendly name for the attached file. 5088 9.3.6.1.2. FileName Element 5090 name: "FileName" 5092 path: "1*1(\Segment\Attachments\AttachedFile\FileName)" 5094 id: "0x466E" 5096 minOccurs: "1" 5098 maxOccurs: "1" 5100 type: "utf-8" 5102 minver: "1" 5103 documentation: Filename of the attached file. 5105 9.3.6.1.3. FileMimeType Element 5107 name: "FileMimeType" 5109 path: "1*1(\Segment\Attachments\AttachedFile\FileMimeType)" 5111 id: "0x4660" 5113 minOccurs: "1" 5115 maxOccurs: "1" 5117 type: "string" 5119 minver: "1" 5121 documentation: MIME type of the file. 5123 9.3.6.1.4. FileData Element 5125 name: "FileData" 5127 path: "1*1(\Segment\Attachments\AttachedFile\FileData)" 5129 id: "0x465C" 5131 minOccurs: "1" 5133 maxOccurs: "1" 5135 type: "binary" 5137 minver: "1" 5139 documentation: The data of the file. 5141 9.3.6.1.5. FileUID Element 5143 name: "FileUID" 5145 path: "1*1(\Segment\Attachments\AttachedFile\FileUID)" 5147 id: "0x46AE" 5149 minOccurs: "1" 5150 maxOccurs: "1" 5152 range: "not 0" 5154 type: "uinteger" 5156 minver: "1" 5158 documentation: Unique ID representing the file, as random as 5159 possible. 5161 9.3.6.1.6. FileReferral Element 5163 name: "FileReferral" 5165 path: "0*1(\Segment\Attachments\AttachedFile\FileReferral)" 5167 id: "0x4675" 5169 maxOccurs: "1" 5171 type: "binary" 5173 minver: "0" 5175 maxver: "0" 5177 documentation: A binary value that a track/codec can refer to when 5178 the attachment is needed. 5180 9.3.6.1.7. FileUsedStartTime Element 5182 name: "FileUsedStartTime" 5184 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)" 5186 id: "0x4661" 5188 maxOccurs: "1" 5190 type: "uinteger" 5192 minver: "0" 5194 maxver: "0" 5196 documentation: DivX font extension 5198 9.3.6.1.8. FileUsedEndTime Element 5200 name: "FileUsedEndTime" 5202 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)" 5204 id: "0x4662" 5206 maxOccurs: "1" 5208 type: "uinteger" 5210 minver: "0" 5212 maxver: "0" 5214 documentation: DivX font extension 5216 9.3.7. Chapters Element 5218 name: "Chapters" 5220 path: "0*1(\Segment\Chapters)" 5222 id: "0x1043A770" 5224 maxOccurs: "1" 5226 type: "master" 5228 minver: "1" 5230 documentation: A system to define basic menus and partition data. 5231 For more detailed information, look at the Chapters Explanation. 5233 9.3.7.1. EditionEntry Element 5235 name: "EditionEntry" 5237 path: "1*(\Segment\Chapters\EditionEntry)" 5239 id: "0x45B9" 5241 minOccurs: "1" 5243 type: "master" 5245 minver: "1" 5246 documentation: Contains all information about a Segment edition. 5248 9.3.7.1.1. EditionUID Element 5250 name: "EditionUID" 5252 path: "0*1(\Segment\Chapters\EditionEntry\EditionUID)" 5254 id: "0x45BC" 5256 maxOccurs: "1" 5258 range: "not 0" 5260 type: "uinteger" 5262 minver: "1" 5264 documentation: A unique ID to identify the edition. It's useful for 5265 tagging an edition. 5267 9.3.7.1.2. EditionFlagHidden Element 5269 name: "EditionFlagHidden" 5271 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)" 5273 id: "0x45BD" 5275 minOccurs: "1" 5277 maxOccurs: "1" 5279 range: "0-1" 5281 default: "0" 5283 type: "uinteger" 5285 minver: "1" 5287 documentation: If an edition is hidden (1), it SHOULD NOT be 5288 available to the user interface (but still to Control Tracks; see 5289 flag notes). (1 bit) 5291 9.3.7.1.3. EditionFlagDefault Element 5293 name: "EditionFlagDefault" 5295 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)" 5297 id: "0x45DB" 5299 minOccurs: "1" 5301 maxOccurs: "1" 5303 range: "0-1" 5305 default: "0" 5307 type: "uinteger" 5309 minver: "1" 5311 documentation: If a flag is set (1) the edition SHOULD be used as the 5312 default one. (1 bit) 5314 9.3.7.1.4. EditionFlagOrdered Element 5316 name: "EditionFlagOrdered" 5318 path: "0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)" 5320 id: "0x45DD" 5322 maxOccurs: "1" 5324 range: "0-1" 5326 default: "0" 5328 type: "uinteger" 5330 minver: "1" 5332 documentation: Specify if the chapters can be defined multiple times 5333 and the order to play them is enforced. (1 bit) 5335 9.3.7.1.5. ChapterAtom Element 5337 name: "ChapterAtom" 5339 path: "1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))" 5341 id: "0xB6" 5343 minOccurs: "1" 5345 type: "master" 5347 recursive: "1" 5349 minver: "1" 5351 documentation: Contains the atom information to use as the chapter 5352 atom (apply to all tracks). 5354 9.3.7.1.5.1. ChapterUID Element 5356 name: "ChapterUID" 5358 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)" 5360 id: "0x73C4" 5362 minOccurs: "1" 5364 maxOccurs: "1" 5366 range: "not 0" 5368 type: "uinteger" 5370 minver: "1" 5372 documentation: A unique ID to identify the Chapter. 5374 9.3.7.1.5.2. ChapterStringUID Element 5376 name: "ChapterStringUID" 5378 path: 5379 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)" 5381 id: "0x5654" 5382 maxOccurs: "1" 5384 type: "utf-8" 5386 minver: "3" 5388 documentation: A unique string ID to identify the Chapter. Use for 5389 WebVTT cue identifier storage. 5391 9.3.7.1.5.3. ChapterTimeStart Element 5393 name: "ChapterTimeStart" 5395 path: 5396 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)" 5398 id: "0x91" 5400 minOccurs: "1" 5402 maxOccurs: "1" 5404 type: "uinteger" 5406 minver: "1" 5408 documentation: Timestamp of the start of Chapter (not scaled). 5410 9.3.7.1.5.4. ChapterTimeEnd Element 5412 name: "ChapterTimeEnd" 5414 path: 5415 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)" 5417 id: "0x92" 5419 maxOccurs: "1" 5421 type: "uinteger" 5423 minver: "1" 5425 documentation: Timestamp of the end of Chapter (timestamp excluded, 5426 not scaled). 5428 9.3.7.1.5.5. ChapterFlagHidden Element 5430 name: "ChapterFlagHidden" 5432 path: 5433 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)" 5435 id: "0x98" 5437 minOccurs: "1" 5439 maxOccurs: "1" 5441 range: "0-1" 5443 default: "0" 5445 type: "uinteger" 5447 minver: "1" 5449 documentation: If a chapter is hidden (1), it SHOULD NOT be available 5450 to the user interface (but still to Control Tracks; see flag notes). 5451 (1 bit) 5453 9.3.7.1.5.6. ChapterFlagEnabled Element 5455 name: "ChapterFlagEnabled" 5457 path: 5458 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)" 5460 id: "0x4598" 5462 minOccurs: "1" 5464 maxOccurs: "1" 5466 range: "0-1" 5468 default: "1" 5470 type: "uinteger" 5472 minver: "1" 5474 documentation: Specify whether the chapter is enabled. It can be 5475 enabled/disabled by a Control Track. When disabled, the movie SHOULD 5476 skip all the content between the TimeStart and TimeEnd of this 5477 chapter (see flag notes). (1 bit) 5479 9.3.7.1.5.7. ChapterSegmentUID Element 5481 name: "ChapterSegmentUID" 5483 path: 5484 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)" 5486 id: "0x6E67" 5488 maxOccurs: "1" 5490 range: ">0" 5492 size: "16" 5494 type: "binary" 5496 minver: "1" 5498 documentation: The SegmentUID of another Segment to play during this 5499 chapter. 5501 usage notes: ChapterSegmentUID is mandatory if 5502 ChapterSegmentEditionUID is used. 5504 9.3.7.1.5.8. ChapterSegmentEditionUID Element 5506 name: "ChapterSegmentEditionUID" 5508 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentE 5509 ditionUID)" 5511 id: "0x6EBC" 5513 maxOccurs: "1" 5515 range: "not 0" 5517 type: "uinteger" 5519 minver: "1" 5521 documentation: The EditionUID to play from the Segment linked in 5522 ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no 5523 Edition of the linked Segment is used. 5525 9.3.7.1.5.9. ChapterPhysicalEquiv Element 5527 name: "ChapterPhysicalEquiv" 5529 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysical 5530 Equiv)" 5532 id: "0x63C3" 5534 maxOccurs: "1" 5536 type: "uinteger" 5538 minver: "1" 5540 documentation: Specify the physical equivalent of this ChapterAtom 5541 like "DVD" (60) or "SIDE" (50), see complete list of values. 5543 9.3.7.1.5.10. ChapterTrack Element 5545 name: "ChapterTrack" 5547 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)" 5549 id: "0x8F" 5551 maxOccurs: "1" 5553 type: "master" 5555 minver: "1" 5557 documentation: List of tracks on which the chapter applies. If this 5558 Element is not present, all tracks apply 5560 9.3.7.1.5.11. ChapterTrackNumber Element 5562 name: "ChapterTrackNumber" 5564 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\Cha 5565 pterTrackNumber)" 5567 id: "0x89" 5569 minOccurs: "1" 5571 range: "not 0" 5572 type: "uinteger" 5574 minver: "1" 5576 documentation: UID of the Track to apply this chapter too. In the 5577 absence of a control track, choosing this chapter will select the 5578 listed Tracks and deselect unlisted tracks. Absence of this Element 5579 indicates that the Chapter SHOULD be applied to any currently used 5580 Tracks. 5582 9.3.7.1.5.12. ChapterDisplay Element 5584 name: "ChapterDisplay" 5586 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)" 5588 id: "0x80" 5590 type: "master" 5592 minver: "1" 5594 documentation: Contains all possible strings to use for the chapter 5595 display. 5597 9.3.7.1.5.13. ChapString Element 5599 name: "ChapString" 5601 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ 5602 ChapString)" 5604 id: "0x85" 5606 minOccurs: "1" 5608 maxOccurs: "1" 5610 type: "utf-8" 5612 minver: "1" 5614 documentation: Contains the string to use as the chapter atom. 5616 9.3.7.1.5.14. ChapLanguage Element 5618 name: "ChapLanguage" 5620 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5621 hapLanguage)" 5623 id: "0x437C" 5625 minOccurs: "1" 5627 default: "eng" 5629 type: "string" 5631 minver: "1" 5633 documentation: The languages corresponding to the string, in the 5634 bibliographic ISO-639-2 form. This Element MUST be ignored if the 5635 ChapLanguageIETF Element is used within the same ChapterDisplay 5636 Element. 5638 9.3.7.1.5.15. ChapLanguageIETF Element 5640 name: "ChapLanguageIETF" 5642 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ 5643 ChapLanguageIETF)" 5645 id: "0x437D" 5647 maxOccurs: "1" 5649 type: "string" 5651 minver: "4" 5653 documentation: Specifies the language used in the ChapString 5654 according to BCP 47 and using the IANA Language Subtag Registry. If 5655 this Element is used, then any ChapLanguage Elements used in the same 5656 ChapterDisplay MUST be ignored. 5658 9.3.7.1.5.16. ChapCountry Element 5660 name: "ChapCountry" 5662 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5663 hapCountry)" 5664 id: "0x437E" 5666 type: "string" 5668 minver: "1" 5670 documentation: The countries corresponding to the string, same 2 5671 octets as in Internet domains. This Element MUST be ignored if the 5672 ChapLanguageIETF Element is used within the same ChapterDisplay 5673 Element. 5675 9.3.7.1.5.17. ChapProcess Element 5677 name: "ChapProcess" 5679 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)" 5681 id: "0x6944" 5683 type: "master" 5685 minver: "1" 5687 documentation: Contains all the commands associated to the Atom. 5689 9.3.7.1.5.18. ChapProcessCodecID Element 5691 name: "ChapProcessCodecID" 5693 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5694 pProcessCodecID)" 5696 id: "0x6955" 5698 minOccurs: "1" 5700 maxOccurs: "1" 5702 default: "0" 5704 type: "uinteger" 5706 minver: "1" 5708 documentation: Contains the type of the codec used for the 5709 processing. A value of 0 means native Matroska processing (to be 5710 defined), a value of 1 means the DVD command set is used. More codec 5711 IDs can be added later. 5713 9.3.7.1.5.19. ChapProcessPrivate Element 5715 name: "ChapProcessPrivate" 5717 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5718 pProcessPrivate)" 5720 id: "0x450D" 5722 maxOccurs: "1" 5724 type: "binary" 5726 minver: "1" 5728 documentation: Some optional data attached to the ChapProcessCodecID 5729 information. For ChapProcessCodecID = 1, it is the "DVD level" 5730 equivalent. 5732 9.3.7.1.5.20. ChapProcessCommand Element 5734 name: "ChapProcessCommand" 5736 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Chap 5737 ProcessCommand)" 5739 id: "0x6911" 5741 type: "master" 5743 minver: "1" 5745 documentation: Contains all the commands associated to the Atom. 5747 9.3.7.1.5.21. ChapProcessTime Element 5749 name: "ChapProcessTime" 5751 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5752 pProcessCommand\ChapProcessTime)" 5754 id: "0x6922" 5756 minOccurs: "1" 5758 maxOccurs: "1" 5760 type: "uinteger" 5761 minver: "1" 5763 documentation: Defines when the process command SHOULD be handled 5765 restrictions: 5767 +-------+-------------------------------+ 5768 | value | label | 5769 +-------+-------------------------------+ 5770 | "0" | during the whole chapter | 5771 | "1" | before starting playback | 5772 | "2" | after playback of the chapter | 5773 +-------+-------------------------------+ 5775 9.3.7.1.5.22. ChapProcessData Element 5777 name: "ChapProcessData" 5779 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5780 pProcessCommand\ChapProcessData)" 5782 id: "0x6933" 5784 minOccurs: "1" 5786 maxOccurs: "1" 5788 type: "binary" 5790 minver: "1" 5792 documentation: Contains the command information. The data SHOULD be 5793 interpreted depending on the ChapProcessCodecID value. For 5794 ChapProcessCodecID = 1, the data correspond to the binary DVD cell 5795 pre/post commands. 5797 9.3.8. Tags Element 5799 name: "Tags" 5801 path: "0*(\Segment\Tags)" 5803 id: "0x1254C367" 5805 type: "master" 5807 minver: "1" 5808 documentation: Element containing metadata describing Tracks, 5809 Editions, Chapters, Attachments, or the Segment as a whole. A list 5810 of valid tags can be found here. 5812 9.3.8.1. Tag Element 5814 name: "Tag" 5816 path: "1*(\Segment\Tags\Tag)" 5818 id: "0x7373" 5820 minOccurs: "1" 5822 type: "master" 5824 minver: "1" 5826 documentation: A single metadata descriptor. 5828 9.3.8.1.1. Targets Element 5830 name: "Targets" 5832 path: "1*1(\Segment\Tags\Tag\Targets)" 5834 id: "0x63C0" 5836 minOccurs: "1" 5838 maxOccurs: "1" 5840 type: "master" 5842 minver: "1" 5844 documentation: Specifies which other elements the metadata 5845 represented by the Tag applies to. If empty or not present, then the 5846 Tag describes everything in the Segment. 5848 9.3.8.1.1.1. TargetTypeValue Element 5850 name: "TargetTypeValue" 5852 path: "0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)" 5854 id: "0x68CA" 5855 maxOccurs: "1" 5857 default: "50" 5859 type: "uinteger" 5861 minver: "1" 5863 documentation: A number to indicate the logical level of the target. 5865 restrictions: 5867 +-------+----------------------+------------------------------------+ 5868 | value | label | documentation | 5869 +-------+----------------------+------------------------------------+ 5870 | "70" | COLLECTION | The highest hierarchical level | 5871 | | | that tags can describe. | 5872 | "60" | EDITION / ISSUE / | A list of lower levels grouped | 5873 | | VOLUME / OPUS / | together. | 5874 | | SEASON / SEQUEL | | 5875 | "50" | ALBUM / OPERA / | The most common grouping level of | 5876 | | CONCERT / MOVIE / | music and video (equals to an | 5877 | | EPISODE / CONCERT | episode for TV series). | 5878 | "40" | PART / SESSION | When an album or episode has | 5879 | | | different logical parts. | 5880 | "30" | TRACK / SONG / | The common parts of an album or | 5881 | | CHAPTER | movie. | 5882 | "20" | SUBTRACK / PART / | Corresponds to parts of a track | 5883 | | MOVEMENT / SCENE | for audio (like a movement). | 5884 | "10" | SHOT | The lowest hierarchy found in | 5885 | | | music or movies. | 5886 +-------+----------------------+------------------------------------+ 5888 9.3.8.1.1.2. TargetType Element 5890 name: "TargetType" 5892 path: "0*1(\Segment\Tags\Tag\Targets\TargetType)" 5894 id: "0x63CA" 5896 maxOccurs: "1" 5898 type: "string" 5900 minver: "1" 5901 documentation: An informational string that can be used to display 5902 the logical level of the target like "ALBUM", "TRACK", "MOVIE", 5903 "CHAPTER", etc (see TargetType). 5905 restrictions: 5907 +--------------+------------+ 5908 | value | label | 5909 +--------------+------------+ 5910 | "COLLECTION" | COLLECTION | 5911 | "EDITION" | EDITION | 5912 | "ISSUE" | ISSUE | 5913 | "VOLUME" | VOLUME | 5914 | "OPUS" | OPUS | 5915 | "SEASON" | SEASON | 5916 | "SEQUEL" | SEQUEL | 5917 | "ALBUM" | ALBUM | 5918 | "OPERA" | OPERA | 5919 | "CONCERT" | CONCERT | 5920 | "MOVIE" | MOVIE | 5921 | "EPISODE" | EPISODE | 5922 | "PART" | PART | 5923 | "SESSION" | SESSION | 5924 | "TRACK" | TRACK | 5925 | "SONG" | SONG | 5926 | "CHAPTER" | CHAPTER | 5927 | "SUBTRACK" | SUBTRACK | 5928 | "PART" | PART | 5929 | "MOVEMENT" | MOVEMENT | 5930 | "SCENE" | SCENE | 5931 | "SHOT" | SHOT | 5932 +--------------+------------+ 5934 9.3.8.1.1.3. TagTrackUID Element 5936 name: "TagTrackUID" 5938 path: "0*(\Segment\Tags\Tag\Targets\TagTrackUID)" 5940 id: "0x63C5" 5942 default: "0" 5944 type: "uinteger" 5946 minver: "1" 5947 documentation: A unique ID to identify the Track(s) the tags belong 5948 to. If the value is 0 at this level, the tags apply to all tracks in 5949 the Segment. 5951 9.3.8.1.1.4. TagEditionUID Element 5953 name: "TagEditionUID" 5955 path: "0*(\Segment\Tags\Tag\Targets\TagEditionUID)" 5957 id: "0x63C9" 5959 default: "0" 5961 type: "uinteger" 5963 minver: "1" 5965 documentation: A unique ID to identify the EditionEntry(s) the tags 5966 belong to. If the value is 0 at this level, the tags apply to all 5967 editions in the Segment. 5969 9.3.8.1.1.5. TagChapterUID Element 5971 name: "TagChapterUID" 5973 path: "0*(\Segment\Tags\Tag\Targets\TagChapterUID)" 5975 id: "0x63C4" 5977 default: "0" 5979 type: "uinteger" 5981 minver: "1" 5983 documentation: A unique ID to identify the Chapter(s) the tags belong 5984 to. If the value is 0 at this level, the tags apply to all chapters 5985 in the Segment. 5987 9.3.8.1.1.6. TagAttachmentUID Element 5989 name: "TagAttachmentUID" 5991 path: "0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)" 5993 id: "0x63C6" 5994 default: "0" 5996 type: "uinteger" 5998 minver: "1" 6000 documentation: A unique ID to identify the Attachment(s) the tags 6001 belong to. If the value is 0 at this level, the tags apply to all 6002 the attachments in the Segment. 6004 9.3.8.1.2. SimpleTag Element 6006 name: "SimpleTag" 6008 path: "1*(\Segment\Tags\Tag(1*(\SimpleTag)))" 6010 id: "0x67C8" 6012 minOccurs: "1" 6014 type: "master" 6016 recursive: "1" 6018 minver: "1" 6020 documentation: Contains general information about the target. 6022 9.3.8.1.2.1. TagName Element 6024 name: "TagName" 6026 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagName)" 6028 id: "0x45A3" 6030 minOccurs: "1" 6032 maxOccurs: "1" 6034 type: "utf-8" 6036 minver: "1" 6038 documentation: The name of the Tag that is going to be stored. 6040 9.3.8.1.2.2. TagLanguage Element 6042 name: "TagLanguage" 6044 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)" 6046 id: "0x447A" 6048 minOccurs: "1" 6050 maxOccurs: "1" 6052 default: "und" 6054 type: "string" 6056 minver: "1" 6058 documentation: Specifies the language of the tag specified, in the 6059 Matroska languages form. This Element MUST be ignored if the 6060 TagLanguageIETF Element is used within the same SimpleTag Element. 6062 9.3.8.1.2.3. TagLanguageIETF Element 6064 name: "TagLanguageIETF" 6066 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagLanguageIETF)" 6068 id: "0x447B" 6070 maxOccurs: "1" 6072 type: "string" 6074 minver: "4" 6076 documentation: Specifies the language used in the TagString according 6077 to BCP 47 and using the IANA Language Subtag Registry. If this 6078 Element is used, then any TagLanguage Elements used in the same 6079 SimpleTag MUST be ignored. 6081 9.3.8.1.2.4. TagDefault Element 6083 name: "TagDefault" 6085 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)" 6087 id: "0x4484" 6088 minOccurs: "1" 6090 maxOccurs: "1" 6092 range: "0-1" 6094 default: "1" 6096 type: "uinteger" 6098 minver: "1" 6100 documentation: A boolean value to indicate if this is the default/ 6101 original language to use for the given tag. 6103 9.3.8.1.2.5. TagString Element 6105 name: "TagString" 6107 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagString)" 6109 id: "0x4487" 6111 maxOccurs: "1" 6113 type: "utf-8" 6115 minver: "1" 6117 documentation: The value of the Tag. 6119 9.3.8.1.2.6. TagBinary Element 6121 name: "TagBinary" 6123 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)" 6125 id: "0x4485" 6127 maxOccurs: "1" 6129 type: "binary" 6131 minver: "1" 6133 documentation: The values of the Tag if it is binary. Note that this 6134 cannot be used in the same SimpleTag as TagString. 6136 10. Matroska Element Ordering 6138 Except for the "EBML Header" and the "CRC-32 Element", the EBML 6139 specification does not require any particular storage order for 6140 "Elements". The Matroska specification however defines mandates and 6141 recommendations for ordering certain "Elements" in order to 6142 facilitate better playback, seeking, and editing efficiency. This 6143 section describes and offers rationale for ordering requirements and 6144 recommendations for Matroska. 6146 10.1. Top-Level Elements 6148 The "Info Element" is the only REQUIRED "Top-Level Element" in a 6149 Matroska file. To be playable, Matroska MUST also contain at least 6150 one "Tracks Element" and "Cluster Element". The first "Info Element" 6151 and the first "Tracks Element" MUST either be stored before the first 6152 "Cluster Element" or both SHALL be referenced by a "SeekHead Element" 6153 occurring before the first "Cluster Element". 6155 It is possible to edit a Matroska file after it has been created. 6156 For example, chapters, tags or attachments can be added. When new 6157 "Top-Level Elements" are added to a Matroska file, the "SeekHead" 6158 Element(s) MUST be updated so that the "SeekHead" Element(s) itemize 6159 the identity and position of all "Top-Level Elements". Editing, 6160 removing, or adding "Elements" to a Matroska file often requires that 6161 some existing "Elements" be voided or extended; therefore, it is 6162 RECOMMENDED to use "Void Elements" as padding in between "Top-Level 6163 Elements". 6165 10.2. CRC-32 6167 As noted by the EBML specification, if a "CRC-32 Element" is used 6168 then the "CRC-32 Element" MUST be the first ordered "Element" within 6169 its "Parent Element". The Matroska specification recommends that 6170 "CRC-32 Elements" SHOULD NOT be used as an immediate "Child Element" 6171 of the "Segment Element"; however all "Top-Level Elements" of an 6172 "EBML Document" SHOULD include a "CRC-32 Element" as a "Child 6173 Element". 6175 10.3. SeekHead 6177 If used, the first "SeekHead Element" SHOULD be the first non-"CRC-32 6178 Child Element" of the "Segment Element". If a second "SeekHead 6179 Element" is used, then the first "SeekHead Element" MUST reference 6180 the identity and position of the second "SeekHead". Additionally, 6181 the second "SeekHead Element" MUST only reference "Cluster" Elements 6182 and not any other "Top-Level Element" already contained within the 6183 first "SeekHead Element". The second "SeekHead Element" MAY be 6184 stored in any order relative to the other "Top-Level Elements." 6185 Whether one or two "SeekHead Element(s)" are used, the "SeekHead 6186 Element(s)" MUST collectively reference the identity and position of 6187 all "Top-Level Elements" except for the first "SeekHead Element". 6189 It is RECOMMENDED that the first "SeekHead Element" be followed by a 6190 "Void Element" to allow for the "SeekHead Element" to be expanded to 6191 cover new "Top-Level Elements" that could be added to the Matroska 6192 file, such as "Tags", "Chapters" and "Attachments Elements". 6194 10.4. Cues (index) 6196 The "Cues Element" is RECOMMENDED to optimize seeking access in 6197 Matroska. It is programmatically simpler to add the "Cues Element" 6198 after all "Cluster Elements" have been written because this does not 6199 require a prediction of how much space to reserve before writing the 6200 "Cluster Elements". However, storing the "Cues Element" before the 6201 "Cluster Elements" can provide some seeking advantages. If the "Cues 6202 Element" is present, then it SHOULD either be stored before the first 6203 "Cluster Element" or be referenced by a "SeekHead Element". 6205 10.5. Info 6207 The first "Info Element" SHOULD occur before the first "Tracks 6208 Element" and first "Cluster Element" except when referenced by a 6209 "SeekHead Element". 6211 10.6. Chapters Element 6213 The "Chapters Element" SHOULD be placed before the "Cluster 6214 Element(s)". The "Chapters Element" can be used during playback even 6215 if the user does not need to seek. It immediately gives the user 6216 information about what section is being read and what other sections 6217 are available. In the case of Ordered Chapters it RECOMMENDED to 6218 evaluate the logical linking even before playing. The "Chapters 6219 Element" SHOULD be placed before the first "Tracks Element" and after 6220 the first "Info Element". 6222 10.7. Attachments 6224 The "Attachments Element" is not intended to be used by default when 6225 playing the file, but could contain information relevant to the 6226 content, such as cover art or fonts. Cover art is useful even before 6227 the file is played and fonts could be needed before playback starts 6228 for initialization of subtitles. The "Attachments Element" MAY be 6229 placed before the first "Cluster Element"; however if the 6230 "Attachments Element" is likely to be edited, then it SHOULD be 6231 placed after the last "Cluster Element". 6233 10.8. Tags 6235 The "Tags Element" is most subject to changes after the file was 6236 originally created. For easier editing, the "Tags Element" SHOULD be 6237 placed at the end of the "Segment Element", even after the 6238 "Attachments Element". On the other hand, it is inconvenient to have 6239 to seek in the "Segment" for tags, especially for network streams. 6240 So it's better if the "Tags Element" is found early in the stream. 6241 When editing the "Tags Element", the original "Tags Element" at the 6242 beginning can be overwritten with a "Void Element" and a new "Tags 6243 Element" written at the end of the "Segment Element". The file size 6244 will only marginally change. 6246 10.9. Optimum layout from a muxer 6248 o SeekHead 6250 o Info 6252 o Tracks 6254 o Chapters 6256 o Attachments 6258 o Tags 6260 o Clusters 6262 o Cues 6264 10.10. Optimum layout after editing tags 6266 o SeekHead 6268 o Info 6270 o Tracks 6272 o Chapters 6274 o Attachments 6276 o Void 6278 o Clusters 6280 o Cues 6281 o Tags 6283 10.11. Optimum layout with Cues at the front 6285 o SeekHead 6287 o Info 6289 o Tracks 6291 o Chapters 6293 o Attachments 6295 o Tags 6297 o Cues 6299 o Clusters 6301 10.12. Cluster Timestamp 6303 The "Timestamp Element" MUST occur as in storage order before any 6304 "SimpleBlock", "BlockGroup", or "EncryptedBlock" within the "Cluster 6305 Element". 6307 11. Chapters 6309 11.1. Edition and Chapter Flags 6311 11.1.1. Chapter Flags 6313 Two "Chapter Flags" are defined to describe the behavior of the 6314 "ChapterAtom Element": "ChapterFlagHidden" and "ChapterFlagEnabled". 6316 If a "ChapterAtom Element" is the "Child Element" of another 6317 "ChapterAtom Element" with a "Chapter Flag" set to "true", then the 6318 "Child ChapterAtom Element" MUST be interpreted as having its same 6319 "Chapter Flag" set to "true". If a "ChapterAtom Element" is the 6320 "Child Element" of another "ChapterAtom Element" with a "Chapter 6321 Flag" set to "false" or if the "ChapterAtom Element" does not have a 6322 "ChapterAtom Element" as its "Parent Element", then it MUST be 6323 interpreted according to its own "Chapter Flag". 6325 As an example, consider a "Parent ChapterAtom Element" that has its 6326 "ChapterFlagHidden" set to "true" and also contains two child 6327 "ChapterAtoms", the first with "ChapterFlagHidden" set to "true" and 6328 the second with "ChapterFlagHidden" either set to "false" or not 6329 present at all (in which case the default value of the Element 6330 applies, which is "false"). Since the parent "ChapterAtom" has its 6331 "ChapterFlagHidden" set to "true" then all of its children 6332 "ChapterAtoms" MUST also be interpreted as if their 6333 "ChapterFlagHidden" is also set to "true". However, if a "Control 6334 Track" toggles the parent's "ChapterFlagHidden" flag to "false", then 6335 only the parent "ChapterAtom" and its second child "ChapterAtom" MUST 6336 be interpreted as if "ChapterFlagHidden" is set to "false". The 6337 first child "ChapterAtom" which has the "ChapterFlagHidden" flag set 6338 to "true" retains its value until its value is toggled to "false" by 6339 a "Control Track". 6341 11.1.2. Edition Flags 6343 Three "Edition Flags" are defined to describe the behavior of the 6344 "EditionEntry Element": "EditionFlagHidden", "EditionFlagDefault" and 6345 "EditionFlagOrdered". 6347 11.1.2.1. EditionFlagHidden 6349 The "EditionFlagHidden Flag" behaves similarly to the 6350 "ChapterFlagHidden Flag": if "EditionFlagHidden" is set to "true", 6351 its "Child ChapterAtoms Elements" MUST also be interpreted as if 6352 their "ChapterFlagHidden" is also set to "true", regardless of their 6353 own "ChapterFlagHidden Flags". If "EditionFlagHidden" is toggled by 6354 a "Control Track" to "false", the "ChapterFlagHidden Flags" of the 6355 "Child ChapterAtoms Elements" SHALL determine whether the 6356 "ChapterAtom" is hidden or not. 6358 11.1.2.2. EditionFlagDefault 6360 It is RECOMMENDED that no more than one "Edition" have an 6361 "EditionFlagDefault Flag" set to "true". The first "Edition" with 6362 both the "EditionFlagDefault Flag" set to "true" and the 6363 "EditionFlagHidden Flag" set to "false" is the "Default Edition". 6364 When all "EditionFlagDefault Flags" are set to "false", then the 6365 first "Edition" is the "Default Edition". 6367 11.1.2.3. EditionFlagOrdered 6369 The "EditionFlagOrdered Flag" is a significant feature as it enables 6370 an "Edition" of "Ordered Chapters" which defines and arranges a 6371 virtual timeline rather than simply labeling points within the 6372 timeline. For example, with "Editions" of "Ordered Chapters" a 6373 single "Matroska file" can present multiple edits of a film without 6374 duplicating content. Alternatively if a videotape is digitized in 6375 full, one "Ordered Edition" could present the full content (including 6376 colorbars, countdown, slate, a feature presentation, and black 6377 frames), while another "Edition" of "Ordered Chapters" can use 6378 "Chapters" that only mark the intended presentation with the 6379 colorbars and other ancillary visual information excluded. If an 6380 "Edition" of "Ordered Chapters" is enabled then the "Matroska Player" 6381 MUST play those Chapters in their stored order from the timestamp 6382 marked in the "ChapterTimeStart Element" to the timestamp marked in 6383 to "ChapterTimeEnd Element". 6385 If the "EditionFlagOrdered Flag" is set to "false", "Simple Chapters" 6386 are used and only the "ChapterTimeStart" of a "Chapter" is used as 6387 chapter mark to jump to the predefined point in the timeline. With 6388 "Simple Chapters", a "Matroska Player" MUST ignore certain "Chapter 6389 Elements". All these elements are now informational only. 6391 The following list shows the different usage of "Chapter Elements" 6392 between an ordered and non-ordered "Edition". 6394 Chapter elements / ordered Edition | False | True ChapterUID | X | X 6395 ChapterStringUID | X | X ChapterTimeStart | X | X ChapterTimeEnd | 6396 - | X ChapterFlagHidden | X | X ChapterFlagEnabled | X | X 6397 ChapterSegmentUID | - | X ChapterSegmentEditionUID | - | X 6398 ChapterPhysicalEquiv | X | X ChapterTrack | - | X ChapterDisplay | 6399 X | X ChapProcess | - | X 6401 Furthermore there are other EBML "Elements" which could be used if 6402 the "EditionFlagOrdered Flag" is set to "true". 6404 Other elements / ordered Edition | False | True Info/SegmentFamily | 6405 - | X Info/ChapterTranslate | - | X Track/TrackTranslate | - | X 6407 These other "Elements" belong to the Matroska DVD menu system and are 6408 only used when the "ChapProcessCodecID Element" is set to 1. 6410 11.1.2.3.1. Ordered-Edition and Matroska Segment-Linking 6412 o Hard Linking: "Ordered-Chapters" supersedes the "Hard Linking". 6414 o Soft Linking: In this complex system "Ordered Chapters" are 6415 REQUIRED and a "Chapter CODEC" MUST interpret the "ChapProcess" of 6416 all chapters. 6418 o Medium Linking: "Ordered Chapters" are used in a normal way and 6419 can be combined with the "ChapterSegmentUID" element which 6420 establishes a link to another Matroska file/Segment. 6422 See Section 24) for more information about "Hard Linking", "Soft 6423 Linking" and "Medium Linking". 6425 11.2. Menu features 6427 The menu features are handled like a _chapter codec_. That means each 6428 codec has a type, some private data and some data in the chapters. 6430 The type of the menu system is defined by the "ChapProcessCodecID" 6431 parameter. For now only 2 values are supported : 0 matroska script, 6432 1 menu borrowed from the DVD. The private data depend on the type of 6433 menu system (stored in ChapProcessPrivate), idem for the data in the 6434 chapters (stored in ChapProcessData). 6436 11.2.1. Matroska Script (0) 6438 This is the case when "ChapProcessCodecID" = 0. This is a script 6439 language build for Matroska purposes. The inspiration comes from 6440 ActionScript, javascript and other similar scripting languages. The 6441 commands are stored as text commands, in UTF-8. The syntax is C 6442 like, with commands spanned on many lines, each terminating with a 6443 ";". You can also include comments at the end of lines with "//" or 6444 comment many lines using "/* */". The scripts are stored in 6445 ChapProcessData. For the moment ChapProcessPrivate is not used. 6447 The one and only command existing for the moment is "GotoAndPlay( 6448 ChapterUID );". As the same suggests, it means that when this 6449 command is encountered, the "Matroska Player" SHOULD jump to the 6450 "Chapter" specified by the UID and play it. 6452 11.2.2. DVD menu (1) 6454 This is the case when "ChapProcessCodecID" = 1. Each level of a 6455 chapter corresponds to a logical level in the DVD system that is 6456 stored in the first octet of the ChapProcessPrivate. This DVD 6457 hierarchy is as follows: 6459 ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible | 6460 Comment 0x30 | SS | DVD domain | - | First Play, Video Manager, Video 6461 Title 0x2A | LU | Language Unit | - | Contains only PGCs 0x28 | TT | 6462 Title | - | Contains only PGCs 0x20 | PGC | Program Group Chain 6463 (PGC) | * | 0x18 | PG | Program 1 / Program 2 / Program 3 | - | 6464 0x10 | PTT | Part Of Title 1 / Part Of Title 2 | - | Equivalent to 6465 the chapters on the sleeve. 0x08 | CN | Cell 1 / Cell 2 / Cell 3 / 6466 Cell 4 / Cell 5 / Cell 6 | - | 6468 You can also recover wether a Segment is a Video Manager (VMG), Video 6469 Title Set (VTS) or Video Title Set Menu (VTSM) from the 6470 ChapterTranslateID element found in the Segment Info. This field 6471 uses 2 octets as follows: 6473 1. Domain Type: 0 for VMG, the domain number for VTS and VTSM 6475 2. Domain Value: 0 for VMG and VTSM, 1 for the VTS source. 6477 For instance, the menu part from VTS_01_0.VOB would be coded [1,0] 6478 and the content part from VTS_02_3.VOB would be [2,1]. The VMG is 6479 always [0,0] 6481 The following octets of ChapProcessPrivate are as follows: 6483 Octet 1 | DVD Name | Following Octets 0x30 | SS | Domain name code 6484 (1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) 6485 number (2) 0x2A | LU | Language code (2) + Language extension (1) 6486 0x28 | TT | global Title number (2) + corresponding TTN of the VTS 6487 (1) 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User 6488 Operations (4) 0x18 | PG | Program number (2) 0x10 | PTT | PTT- 6489 chapter number (1) 0x08 | CN | Cell number [VOB ID(2)][Cell 6490 ID(1)][Angle Num(1)] 6492 If the level specified in ChapProcessPrivate is a PGC (0x20), there 6493 is an octet called the Playback Type, specifying the kind of PGC 6494 defined: 6496 o 0x00: entry only/basic PGC 6498 o 0x82: Title+Entry Menu (only found in the Video Manager domain) 6500 o 0x83: Root Menu (only found in the VTSM domain) 6502 o 0x84: Subpicture Menu (only found in the VTSM domain) 6504 o 0x85: Audio Menu (only found in the VTSM domain) 6506 o 0x86: Angle Menu (only found in the VTSM domain) 6508 o 0x87: Chapter Menu (only found in the VTSM domain) 6510 The next 4 following octets correspond to the User Operation flags 6511 [17] in the standard PGC. When a bit is set, the command SHOULD be 6512 disabled. 6514 ChapProcessData contains the pre/post/cell commands in binary format 6515 as there are stored on a DVD. There is just an octet preceding these 6516 data to specify the number of commands in the element. As follows: 6517 [# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)]. 6519 More information on the DVD commands and format on DVD-replica [18], 6520 where we got most of the info about it. You can also get information 6521 on DVD from the DVDinfo project [19]. 6523 11.3. Example 1 : basic chaptering 6525 In this example a movie is split in different chapters. It could 6526 also just be an audio file (album) on which each track corresponds to 6527 a chapter. 6529 o 00000ms - 05000ms : Intro 6531 o 05000ms - 25000ms : Before the crime 6533 o 25000ms - 27500ms : The crime 6535 o 27500ms - 38000ms : The killer arrested 6537 o 38000ms - 43000ms : Credits 6539 This would translate in the following matroska form : 6541 6542 6543 16603393396715046047 6544 6545 1193046 6546 0 6547 5000000000 6548 6549 Intro 6550 eng 6551 6552 0 6553 1 6554 6555 6556 2311527 6557 5000000000 6558 25000000000 6559 6560 Before the crime 6561 eng 6562 6563 6564 Avant le crime 6565 fra 6566 6567 0 6568 1 6569 6570 6571 3430008 6572 25000000000 6573 27500000000 6574 6575 The crime 6576 eng 6577 6578 6579 Le crime 6580 fra 6581 6582 0 6583 1 6584 6585 6586 4548489 6587 27500000000 6588 38000000000 6589 6590 After the crime 6591 eng 6592 6593 6594 Apres le crime 6595 fra 6596 6597 0 6598 1 6599 6600 6601 5666960 6602 38000000000 6603 43000000000 6604 6605 Credits 6606 eng 6607 6608 6609 Generique 6610 fra 6611 6612 0 6613 1 6614 6615 0 6616 0 6617 6618 6620 11.4. Example 2 : nested chapters 6622 In this example an (existing) album is split into different chapters, 6623 and one of them contain another splitting. 6625 11.4.1. The Micronauts "Bleep To Bleep" 6627 o 00:00 - 12:28 : Baby Wants To Bleep/Rock 6629 * 00:00 - 04:38 : Baby wants to bleep (pt.1) 6631 * 04:38 - 07:12 : Baby wants to rock 6633 * 07:12 - 10:33 : Baby wants to bleep (pt.2) 6635 * 10:33 - 12:28 : Baby wants to bleep (pt.3) 6637 o 12:30 - 19:38 : Bleeper_O+2 6639 o 19:40 - 22:20 : Baby wants to bleep (pt.4) 6641 o 22:22 - 25:18 : Bleep to bleep 6643 o 25:20 - 33:35 : Baby wants to bleep (k) 6645 o 33:37 - 44:28 : Bleeper 6647 6648 6649 1281690858003401414 6650 6651 1 6652 0 6653 748000000 6654 6655 Baby wants to Bleep/Rock 6656 eng 6657 6658 6659 2 6660 0 6661 278000000 6662 6663 Baby wants to bleep (pt.1) 6664 eng 6665 6666 0 6667 1 6668 6669 6670 3 6671 278000000 6672 432000000 6673 6674 Baby wants to rock 6675 eng 6676 6677 0 6678 1 6679 6680 6681 4 6682 432000000 6683 633000000 6684 6685 Baby wants to bleep (pt.2) 6686 eng 6687 6688 0 6689 1 6690 6691 6692 5 6693 633000000 6694 748000000 6695 6696 Baby wants to bleep (pt.3) 6697 eng 6698 6699 0 6700 1 6701 6702 0 6703 1 6704 6705 6706 6 6707 750000000 6708 1178500000 6709 6710 Bleeper_O+2 6711 eng 6712 6713 0 6714 1 6715 6716 6717 7 6718 1180500000 6719 1340000000 6720 6721 Baby wants to bleep (pt.4) 6722 eng 6723 6724 0 6725 1 6726 6727 6728 8 6729 1342000000 6730 1518000000 6731 6732 Bleep to bleep 6733 eng 6734 6735 0 6736 1 6737 6738 6739 9 6740 1520000000 6741 2015000000 6742 6743 Baby wants to bleep (k) 6744 eng 6745 6746 0 6747 1 6748 6749 6750 10 6751 2017000000 6752 2668000000 6753 6754 Bleeper 6755 eng 6756 6757 0 6758 1 6760 6761 0 6762 0 6763 6764 6766 12. Attachments 6768 Matroska supports storage of related files and data in the 6769 "Attachments Element" (a "Top-Level Element"). "Attachment Elements" 6770 can be used to store related cover art, font files, transcripts, 6771 reports, error recovery files, picture or text-based annotations, 6772 copies of specifications, or other ancillary files related to the 6773 "Segment". 6775 "Matroska Readers" MUST NOT execute files stored as "Attachment 6776 Elements". 6778 12.1. Cover Art 6780 This section defines a set of guidelines for the storage of cover art 6781 in Matroska files. A "Matroska Reader" MAY use embedded cover art to 6782 display a representational still-image depiction of the multimedia 6783 contents of the Matroska file. 6785 Only JPEG and PNG image formats SHOULD be used for cover art 6786 pictures. 6788 There can be two different covers for a movie/album: a portrait style 6789 (e.g., a DVD case) and a landscape style (e.g., a wide banner ad). 6791 There can be two versions of the same cover, the "normal cover" and 6792 the "small cover". The dimension of the "normal cover" SHOULD be 600 6793 pixels on the smallest side (for example, 960x600 for landscape, 6794 600x800 for portrait, or 600x600 for square). The dimension of the 6795 "small cover" SHOULD be 120 pixels on the smallest side (for example, 6796 192x120 or 120x160). 6798 Versions of cover art can be differentiated by the filename, which is 6799 stored in the "FileName Element". The default filename of the 6800 "normal cover" in square or portrait mode is "cover.(jpg|png)". When 6801 stored, the "normal cover" SHOULD be the first Attachment in storage 6802 order. The "small cover" SHOULD be prefixed with "small_", such as 6803 "small_cover.(jpg|png)". The landscape variant SHOULD be suffixed 6804 with "_land", such as "cover_land.(jpg|png)". The filenames are case 6805 sensitive. 6807 The following table provides examples of file names for cover art in 6808 Attachments. 6810 FileName | Image Orientation | Pixel Length of Smallest Side 6811 cover.jpg | Portrait or square | 600 small_cover.png | Portrait or 6812 square | 120 cover_land.png | Landscape | 600 small_cover_land.jpg | 6813 Landscape | 120 6815 13. Cues 6817 The "Cues Element" provides an index of certain "Cluster Elements" to 6818 allow for optimized seeking to absolute timestamps within the 6819 "Segment". The "Cues Element" contains one or many "CuePoint 6820 Elements" which each MUST reference an absolute timestamp (via the 6821 "CueTime Element"), a "Track" (via the "CueTrack Element"), and a 6822 "Segment Position" (via the "CueClusterPosition Element"). 6823 Additional non-mandated Elements are part of the "CuePoint Element" 6824 such as "CueDuration", "CueRelativePosition", "CueCodecState" and 6825 others which provide any "Matroska Reader" with additional 6826 information to use in the optimization of seeking performance. 6828 13.1. Recommendations 6830 The following recommendations are provided to optimize Matroska 6831 performance. 6833 o Unless Matroska is used as a live stream, it SHOULD contain a 6834 "Cues Element". 6836 o For each video track, each keyframe SHOULD be referenced by a 6837 "CuePoint Element". 6839 o It is RECOMMENDED to not reference non-keyframes of video tracks 6840 in "Cues" unless it references a "Cluster Element" which contains 6841 a "CodecState Element" but no keyframes. 6843 o For each subtitle track present, each subtitle frame SHOULD be 6844 referenced by a "CuePoint Element" with a "CueDuration Element". 6846 o References to audio tracks MAY be skipped in "CuePoint Elements" 6847 if a video track is present. When included the "CuePoint 6848 Elements" SHOULD reference audio keyframes at most once every 500 6849 milliseconds. 6851 o If the referenced frame is not stored within the first 6852 "SimpleBlock" or first "BlockGroup" within its "Cluster Element", 6853 then the "CueRelativePosition Element" SHOULD be written to 6854 reference where in the "Cluster" the reference frame is stored. 6856 o If a "CuePoint Element" references "Cluster Element" that includes 6857 a "CodecState Element", then that "CuePoint Element" MUST use a 6858 "CueCodecState Element". 6860 o "CuePoint Elements" SHOULD be numerically sorted in storage order 6861 by the value of the "CueTime Element". 6863 14. Matroska Streaming 6865 In Matroska, there are two kinds of streaming: file access and 6866 livestreaming. 6868 14.1. File Access 6870 File access can simply be reading a file located on your computer, 6871 but also includes accessing a file from an HTTP (web) server or CIFS 6872 (Windows share) server. These protocols are usually safe from 6873 reading errors and seeking in the stream is possible. However, when 6874 a file is stored far away or on a slow server, seeking can be an 6875 expensive operation and SHOULD be avoided. The following guidelines, 6876 when followed, help reduce the number of seeking operations for 6877 regular playback and also have the playback start quickly without a 6878 lot of data needed to read first (like a "Cues Element", "Attachment 6879 Element" or "SeekHead Element"). 6881 Matroska, having a small overhead, is well suited for storing music/ 6882 videos on file servers without a big impact on the bandwidth used. 6883 Matroska does not require the index to be loaded before playing, 6884 which allows playback to start very quickly. The index can be loaded 6885 only when seeking is requested the first time. 6887 14.2. Livestreaming 6889 Livestreaming is the equivalent of television broadcasting on the 6890 internet. There are 2 families of servers for livestreaming: RTP/ 6891 RTSP and HTTP. Matroska is not meant to be used over RTP. RTP 6892 already has timing and channel mechanisms that would be wasted if 6893 doubled in Matroska. Additionally, having the same information at 6894 the RTP and Matroska level would be a source of confusion if they do 6895 not match. Livestreaming of Matroska over HTTP (or any other plain 6896 protocol based on TCP) is possible. 6898 A live Matroska stream is different from a file because it usually 6899 has no known end (only ending when the client disconnects). For 6900 this, all bits of the "size" portion of the "Segment Element" MUST be 6901 set to 1. Another option is to concatenate "Segment Elements" with 6902 known sizes, one after the other. This solution allows a change of 6903 codec/resolution between each segment. For example, this allows for 6904 a switch between 4:3 and 16:9 in a television program. 6906 When "Segment Elements" are continuous, certain "Elements", like 6907 "MetaSeek", "Cues", "Chapters", and "Attachments", MUST NOT be used. 6909 It is possible for a "Matroska Player" to detect that a stream is not 6910 seekable. If the stream has neither a "MetaSeek" list or a "Cues" 6911 list at the beginning of the stream, it SHOULD be considered non- 6912 seekable. Even though it is possible to seek blindly forward in the 6913 stream, it is NOT RECOMMENDED. 6915 In the context of live radio or web TV, it is possible to "tag" the 6916 content while it is playing. The "Tags Element" can be placed 6917 between "Clusters" each time it is necessary. In that case, the new 6918 "Tags Element" MUST reset the previously encountered "Tags Elements" 6919 and use the new values instead. 6921 15. Menu Specifications 6923 This document is a _draft of the Menu system_ that will be the 6924 default one in "Matroska". As it will just be composed of a Control 6925 Track, it will be seen as a "codec" and could be replaced later by 6926 something else if needed. 6928 A menu is like what you see on DVDs, when you have some screens to 6929 select the audio format, subtitles or scene selection. 6931 15.1. Requirements 6933 What we'll try to have is a system that can do almost everything done 6934 on a DVD, or more, or better, or drop the unused features if 6935 necessary. 6937 As the name suggests, a Control Track is a track that can control the 6938 playback of the file and/or all the playback features. To make it as 6939 simple as possible for "Matroska Players", the Control Track will 6940 just give orders to the "Matroska Player" and get the actions 6941 associated with the highlights/hotspots. 6943 15.1.1. Highlights/Hotspots 6945 A highlight is basically a rectangle/key associated with an action 6946 UID. When that rectangle/key is activated, the "Matroska Player" 6947 send the UID of the action to the Control Track handler (codec). The 6948 fact that it can also be a key means that even for audio only files, 6949 a keyboard shortcut or button panel could be used for menus. But in 6950 that case, the hotspot will have to be associated with a name to 6951 display. 6953 This highlight is sent from the Control Track to the "Matroska 6954 Player". Then the "Matroska Player" has to handle that highlight 6955 until it's deactivated (see Section 15.1.2). 6957 The highlight contains a UID of the action, a displayable name (UTF- 6958 8), an associated key (list of keys to be defined, probably 6959 up/down/left/right/select), a screen position/range and an image to 6960 display. The image will be displayed either when the user place the 6961 mouse over the rectangle (or any other shape), or when an option of 6962 the screen is selected (not activated). There could be a second 6963 image used when the option is activated. And there could be a third 6964 image that can serve as background. This way you could have a still 6965 image (like in some DVDs) for the menu and behind that image blank 6966 video (small bitrate). 6968 When a highlight is activated by the user, the "Matroska Player" has 6969 to send the UID of the action to the Control Track. Then the Control 6970 Track codec will handle the action and possibly give new orders to 6971 the "Matroska Player". 6973 The format used for storing images SHOULD be extensible. For the 6974 moment we'll use PNG and BMP, both with alpha channel. 6976 15.1.2. Playback features 6978 All the following features will be sent from the Control Track to the 6979 "Matroska Player" : 6981 o Jump to chapter (UID, prev, next, number) 6983 o Disable all tracks of a kind (audio, video, subtitle) 6985 o Enable track UID (the kind doesn't matter) 6987 o Define/Disable a highlight 6989 o Enable/Disable jumping 6991 o Enable/Disable track selection of a kind 6993 o Select Edition ID (see chapters) 6995 o Pause playback 6997 o Stop playback 6998 o Enable/Disable a Chapter UID 7000 o Hide/Unhide a Chapter UID 7002 All the actions will be written in a normal Matroska track, with a 7003 timestamp. A "Menu Frame" SHOULD be able to contain more that one 7004 action/highlight for a given timestamp. (to be determined, EBML 7005 format structure) 7007 15.1.3. Player requirements 7009 Some "Matroska Players" might not support the control track. That 7010 mean they will play the active/looped parts as part of the data. So 7011 I suggest putting the active/looped parts of a movie at the end of a 7012 movie. When a Menu-aware "Matroska Player" encounter the default 7013 Control Track of a "Matroska" file, the first order SHOULD be to jump 7014 at the start of the active/looped part of the movie. 7016 15.2. Working Graph 7018 Matroska Source file -> Control Track <-> Player. 7019 -> other tracks -> rendered 7021 16. Unknown elements 7023 Matroska is based upon the principle that a reading application does 7024 not have to support 100% of the specifications in order to be able to 7025 play the file. A Matroska file therefore contains version indicators 7026 that tell a reading application what to expect. 7028 It is possible and valid to have the version fields indicate that the 7029 file contains Matroska "Elements" from a higher specification version 7030 number while signaling that a reading application MUST only support a 7031 lower version number properly in order to play it back (possibly with 7032 a reduced feature set). For example, a reading application 7033 supporting at least Matroska version "V" reading a file whose 7034 "DocTypeReadVersion" field is equal to or lower than "V" MUST skip 7035 Matroska/EBML "Elements" it encounters but does not know about if 7036 that unknown element fits into the size constraints set by the 7037 current "Parent Element". 7039 17. Default Values 7041 The default value of an "Element" is assumed when not present in the 7042 data stream. It is assumed only in the scope of its "Parent 7043 Element". For example, the "Language Element" is in the scope of the 7044 "Track Element". If the "Parent Element" is not present or assumed, 7045 then the "Child Element" cannot be assumed. 7047 18. DefaultDecodedFieldDuration 7049 The "DefaultDecodedFieldDuration Element" can signal to the 7050 displaying application how often fields of a video sequence will be 7051 available for displaying. It can be used for both interlaced and 7052 progressive content. If the video sequence is signaled as 7053 interlaced, then the period between two successive fields at the 7054 output of the decoding process equals "DefaultDecodedFieldDuration". 7056 For video sequences signaled as progressive, it is twice the value of 7057 "DefaultDecodedFieldDuration". 7059 These values are valid at the end of the decoding process before 7060 post-processing (such as deinterlacing or inverse telecine) is 7061 applied. 7063 Examples: 7065 o Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns 7067 o PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns 7069 o N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns 7071 o hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 7072 encoded interlaced fields per second) 7074 o soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 7075 encoded interlaced fields per second, with "repeat_first_field = 7076 1") 7078 19. Encryption 7080 Encryption in Matroska is designed in a very generic style to allow 7081 people to implement whatever form of encryption is best for them. It 7082 is possible to use the encryption framework in Matroska as a type of 7083 DRM (Digital Rights Management). 7085 Because encryption occurs within the "Block Element", it is possible 7086 to manipulate encrypted streams without decrypting them. The streams 7087 could potentially be copied, deleted, cut, appended, or any number of 7088 other possible editing techniques without decryption. The data can 7089 be used without having to expose it or go through the decrypting 7090 process. 7092 Encryption can also be layered within Matroska. This means that two 7093 completely different types of encryption can be used, requiring two 7094 separate keys to be able to decrypt a stream. 7096 Encryption information is stored in the "ContentEncodings Element" 7097 under the "ContentEncryption Element". 7099 20. Image cropping 7101 The "PixelCrop Elements" ("PixelCropTop", "PixelCropBottom", 7102 "PixelCropRight" and "PixelCropLeft") indicate when and by how much 7103 encoded videos frames SHOULD be cropped for display. These Elements 7104 allow edges of the frame that are not intended for display, such as 7105 the sprockets of a full-frame film scan or the VANC area of a 7106 digitized analog videotape, to be stored but hidden. "PixelCropTop" 7107 and "PixelCropBottom" store an integer of how many rows of pixels 7108 SHOULD be cropped from the top and bottom of the image 7109 (respectively). "PixelCropLeft" and "PixelCropRight" store an 7110 integer of how many columns of pixels SHOULD be cropped from the left 7111 and right of the image (respectively). For example, a pillar-boxed 7112 video that stores a 1440x1080 visual image within the center of a 7113 padded 1920x1080 encoded image MAY set both "PixelCropLeft" and 7114 "PixelCropRight" to "240", so that a "Matroska Player" SHOULD crop 7115 off 240 columns of pixels from the left and right of the encoded 7116 image to present the image with the pillar-boxes hidden. 7118 21. Matroska versioning 7120 The "EBML Header" of each Matroska document informs the reading 7121 application on what version of Matroska to expect. The "Elements" 7122 within "EBML Header" with jurisdiction over this information are 7123 "DocTypeVersion" and "DocTypeReadVersion". 7125 "DocTypeVersion" MUST be equal to or greater than the highest 7126 Matroska version number of any "Element" present in the Matroska 7127 file. For example, a file using the "SimpleBlock Element" MUST have 7128 a "DocTypeVersion" equal to or greater than 2. A file containing 7129 "CueRelativePosition" Elements MUST have a "DocTypeVersion" equal to 7130 or greater than 4. 7132 The "DocTypeReadVersion" MUST contain the minimum version number that 7133 a reading application can minimally support in order to play the file 7134 back -- optionally with a reduced feature set. For example, if a 7135 file contains only "Elements" of version 2 or lower except for 7136 "CueRelativePosition" (which is a version 4 Matroska "Element"), then 7137 "DocTypeReadVersion" SHOULD still be set to 2 and not 4 because 7138 evaluating "CueRelativePosition" is not necessary for standard 7139 playback -- it makes seeking more precise if used. 7141 "DocTypeVersion" MUST always be equal to or greater than 7142 "DocTypeReadVersion". 7144 A reading application supporting Matroska version "V" MUST NOT refuse 7145 to read an application with "DocReadTypeVersion" equal to or lower 7146 than "V" even if "DocTypeVersion" is greater than "V". See also the 7147 note about Section 16. 7149 22. MIME Types 7151 There is no IETF endorsed MIME type for Matroska files. These 7152 definitions can be used: 7154 o .mka : Matroska audio "audio/x-matroska" 7156 o .mkv : Matroska video "video/x-matroska" 7158 o .mk3d : Matroska 3D video "video/x-matroska-3d" 7160 23. Segment Position 7162 The "Segment Position" of an "Element" refers to the position of the 7163 first octet of the "Element ID" of that "Element", measured in 7164 octets, from the beginning of the "Element Data" section of the 7165 containing "Segment Element". In other words, the "Segment Position" 7166 of an "Element" is the distance in octets from the beginning of its 7167 containing "Segment Element" minus the size of the "Element ID" and 7168 "Element Data Size" of that "Segment Element". The "Segment 7169 Position" of the first "Child Element" of the "Segment Element" is 0. 7170 An "Element" which is not stored within a "Segment Element", such as 7171 the "Elements" of the "EBML Header", do not have a "Segment 7172 Position". 7174 23.1. Segment Position Exception 7176 "Elements" that are defined to store a "Segment Position" MAY define 7177 reserved values to indicate a special meaning. 7179 23.2. Example of Segment Position 7181 This table presents an example of "Segment Position" by showing a 7182 hexadecimal representation of a very small Matroska file with labels 7183 to show the offsets in octets. The file contains a "Segment Element" 7184 with an "Element ID" of "0x18538067" and a "MuxingApp Element" with 7185 an "Element ID" of "0x4D80". 7187 0 1 2 7188 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 7189 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 7190 0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67| 7191 20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| 7193 In the above example, the "Element ID" of the "Segment Element" is 7194 stored at offset 16, the "Element Data Size" of the "Segment Element" 7195 is stored at offset 20, and the "Element Data" of the "Segment 7196 Element" is stored at offset 21. 7198 The "MuxingApp Element" is stored at offset 26. Since the "Segment 7199 Position" of an "Element" is calculated by subtracting the position 7200 of the "Element Data" of the containing "Segment Element" from the 7201 position of that "Element", the "Segment Position" of "MuxingApp 7202 Element" in the above example is "26 - 21" or "5". 7204 24. Linked Segments 7206 Matroska provides several methods to link two or many "Segment 7207 Elements" together to create a "Linked Segment". A "Linked Segment" 7208 is a set of multiple "Segments" related together into a single 7209 presentation by using Hard Linking, Medium Linking, or Soft Linking. 7210 All "Segments" within a "Linked Segment" MUST utilize the same track 7211 numbers and timescale. All "Segments" within a "Linked Segment" MUST 7212 be stored within the same directory. All "Segments" within a "Linked 7213 Segment" MUST store a "SegmentUID". 7215 24.1. Hard Linking 7217 Hard Linking (also called splitting) is the process of creating a 7218 "Linked Segment" by relating multiple "Segment Elements" using the 7219 "PrevUID" and "NextUID Elements". Within a "Linked Segment", the 7220 timestamps of each "Segment" MUST follow consecutively in linking 7221 order. With Hard Linking, the chapters of any "Segment" within the 7222 "Linked Segment" MUST only reference the current "Segment". With 7223 Hard Linking, the "NextUID" and "PrevUID" MUST reference the 7224 respective "SegmentUID" values of the next and previous "Segments". 7225 The first "Segment" of a "Linked Segment" MUST have a "NextUID 7226 Element" and MUST NOT have a "PrevUID Element". The last "Segment" 7227 of a "Linked Segment" MUST have a "PrevUID Element" and MUST NOT have 7228 a "NextUID Element". The middle "Segments" of a "Linked Segment" 7229 MUST have both a "NextUID Element" and a "PrevUID Element". 7231 As an example, four "Segments" can be Hard Linked as a "Linked 7232 Segment" through cross-referencing each other with "SegmentUID", 7233 "PrevUID", and "NextUID", as in this table. 7235 +--------+------------------+-------------------+-------------------+ 7236 | file | SegmentUID | PrevUID | NextUID | 7237 | name | | | | 7238 +--------+------------------+-------------------+-------------------+ 7239 | "start | "71000c23cd31099 | n/a | "a77b3598941cb803 | 7240 | .mkv" | 853fbc94dd984a5d | | eac0fcdafe44fac9" | 7241 | | d" | | | 7242 | "middl | "a77b3598941cb80 | "71000c23cd310998 | "6c92285fa6d3e827 | 7243 | e.mkv" | 3eac0fcdafe44fac | 53fbc94dd984a5dd" | b198d120ea3ac674" | 7244 | | 9" | | | 7245 | "end.m | "6c92285fa6d3e82 | "a77b3598941cb803 | n/a | 7246 | kv" | 7b198d120ea3ac67 | eac0fcdafe44fac9" | | 7247 | | 4" | | | 7248 +--------+------------------+-------------------+-------------------+ 7250 24.2. Medium Linking 7252 Medium Linking creates relationships between "Segments" using Ordered 7253 Chapters and the "ChapterSegmentUID Element". A "Segment Edition" 7254 with Ordered Chapters MAY contain "Chapter Elements" that reference 7255 timestamp ranges from other "Segments". The "Segment" referenced by 7256 the Ordered Chapter via the "ChapterSegmentUID Element" SHOULD be 7257 played as part of a Linked Segment. The timestamps of Segment 7258 content referenced by Ordered Chapters MUST be adjusted according to 7259 the cumulative duration of the the previous Ordered Chapters. 7261 As an example a file named "intro.mkv" could have a "SegmentUID" of 7262 "0xb16a58609fc7e60653a60c984fc11ead". Another file called 7263 "program.mkv" could use a Chapter Edition that contains two Ordered 7264 Chapters. The first chapter references the "Segment" of "intro.mkv" 7265 with the use of a "ChapterSegmentUID", "ChapterSegmentEditionUID", 7266 "ChapterTimeStart" and optionally a "ChapterTimeEnd" element. The 7267 second chapter references content within the "Segment" of 7268 "program.mkv". A "Matroska Player" SHOULD recognize the "Linked 7269 Segment" created by the use of "ChapterSegmentUID" in an enabled 7270 "Edition" and present the reference content of the two "Segments" 7271 together. 7273 24.3. Soft Linking 7275 Soft Linking is used by codec chapters. They can reference another 7276 "Segment" and jump to that "Segment". The way the "Segments" are 7277 described are internal to the chapter codec and unknown to the 7278 Matroska level. But there are "Elements" within the "Info Element" 7279 (such as "ChapterTranslate") that can translate a value representing 7280 a "Segment" in the chapter codec and to the current "SegmentUID". 7281 All "Segments" that could be used in a "Linked Segment" in this way 7282 SHOULD be marked as members of the same family via the "SegmentFamily 7283 Element", so that the "Matroska Player" can quickly switch from one 7284 to the other. 7286 25. Track Flags 7288 25.1. Default flag 7290 The "default track" flag is a hint for a "Matroska Player" and SHOULD 7291 always be changeable by the user. If the user wants to see or hear a 7292 track of a certain kind (audio, video, subtitles) and hasn't chosen a 7293 specific track, the "Matroska Player" SHOULD use the first track of 7294 that kind whose "default track" flag is set to "1". If no such track 7295 is found then the first track of this kind SHOULD be chosen. 7297 Only one track of a kind MAY have its "default track" flag set in a 7298 segment. If a track entry does not contain the "default track" flag 7299 element then its default value "1" is to be used. 7301 25.2. Forced flag 7303 The "forced" flag tells the "Matroska Player" that it MUST display/ 7304 play this track or another track of the same kind that also has its 7305 "forced" flag set. When there are multiple "forced" tracks, the 7306 "Matroska Player" SHOULD determine the track based upon the language 7307 of the forced flag or use the default flag if no track matches the 7308 use languages. Another track of the same kind without the "forced" 7309 flag may be use simultaneously with the "forced" track (like DVD 7310 subtitles for example). 7312 25.3. Track Operation 7314 "TrackOperation" allows combining multiple tracks to make a virtual 7315 one. It uses two separate system to combine tracks. One to create a 7316 3D "composition" (left/right/background planes) and one to simplify 7317 join two tracks together to make a single track. 7319 A track created with "TrackOperation" is a proper track with a UID 7320 and all its flags. However the codec ID is meaningless because each 7321 "sub" track needs to be decoded by its own decoder before the 7322 "operation" is applied. The "Cues Elements" corresponding to such a 7323 virtual track SHOULD be the sum of the "Cues Elements" for each of 7324 the tracks it's composed of (when the "Cues" are defined per track). 7326 In the case of "TrackJoinBlocks", the "Block Elements" (from 7327 "BlockGroup" and "SimpleBlock") of all the tracks SHOULD be used as 7328 if they were defined for this new virtual "Track". When two "Block 7329 Elements" have overlapping start or end timestamps, it's up to the 7330 underlying system to either drop some of these frames or render them 7331 the way they overlap. This situation SHOULD be avoided when creating 7332 such tracks as you can never be sure of the end result on different 7333 platforms. 7335 25.4. Overlay Track 7337 Overlay tracks SHOULD be rendered in the same 'channel' as the track 7338 its linked to. When content is found in such a track, it SHOULD be 7339 played on the rendering channel instead of the original track. 7341 25.5. Multi-planar and 3D videos 7343 There are two different ways to compress 3D videos: have each 'eye' 7344 track in a separate track and have one track have both 'eyes' 7345 combined inside (which is more efficient, compression-wise). 7346 Matroska supports both ways. 7348 For the single track variant, there is the "StereoMode Element" which 7349 defines how planes are assembled in the track (mono or left-right 7350 combined). Odd values of StereoMode means the left plane comes first 7351 for more convenient reading. The pixel count of the track 7352 ("PixelWidth"/"PixelHeight") is the raw amount of pixels (for example 7353 3840x1080 for full HD side by side) and the 7354 "DisplayWidth"/"DisplayHeight" in pixels is the amount of pixels for 7355 one plane (1920x1080 for that full HD stream). Old stereo 3D were 7356 displayed using anaglyph (cyan and red colours separated). For 7357 compatibility with such movies, there is a value of the StereoMode 7358 that corresponds to AnaGlyph. 7360 There is also a "packed" mode (values 13 and 14) which consists of 7361 packing two frames together in a "Block" using lacing. The first 7362 frame is the left eye and the other frame is the right eye (or vice 7363 versa). The frames SHOULD be decoded in that order and are possibly 7364 dependent on each other (P and B frames). 7366 For separate tracks, Matroska needs to define exactly which track 7367 does what. "TrackOperation" with "TrackCombinePlanes" do that. For 7368 more details look at Section 25.3. 7370 The 3D support is still in infancy and may evolve to support more 7371 features. 7373 The StereoMode used to be part of Matroska v2 but it didn't meet the 7374 requirement for multiple tracks. There was also a bug in libmatroska 7375 prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8. 7376 "Matroska Readers" may support these legacy files by checking 7377 Matroska v2 or 0x53B9. The older values [20] were 0: mono, 1: right 7378 eye, 2: left eye, 3: both eyes. 7380 26. Timestamps 7382 Historically timestamps in Matroska were mistakenly called timecodes. 7383 The "Timestamp Element" was called Timecode, the "TimestampScale 7384 Element" was called TimecodeScale, the "TrackTimestampScale Element" 7385 was called TrackTimecodeScale and the "ReferenceTimestamp Element" 7386 was called ReferenceTimeCode. 7388 26.1. Timestamp Types 7390 o Absolute Timestamp = Block+Cluster 7392 o Relative Timestamp = Block 7394 o Scaled Timestamp = Block+Cluster 7396 o Raw Timestamp = (Block+Cluster)*TimestampScale*TrackTimestampScale 7398 26.2. Block Timestamps 7400 The "Block Element"'s timestamp MUST be a signed integer that 7401 represents the "Raw Timestamp" relative to the "Cluster"'s "Timestamp 7402 Element", multiplied by the "TimestampScale Element". See 7403 Section 26.4 for more information. 7405 The "Block Element"'s timestamp MUST be represented by a 16bit signed 7406 integer (sint16). The "Block"'s timestamp has a range of -32768 to 7407 +32767 units. When using the default value of the "TimestampScale 7408 Element", each integer represents 1ms. The maximum time span of 7409 "Block Elements" in a "Cluster" using the default "TimestampScale 7410 Element" of 1ms is 65536ms. 7412 If a "Cluster"'s "Timestamp Element" is set to zero, it is possible 7413 to have "Block Elements" with a negative "Raw Timestamp". "Block 7414 Elements" with a negative "Raw Timestamp" are not valid. 7416 26.3. Raw Timestamp 7418 The exact time of an object SHOULD be represented in nanoseconds. To 7419 find out a "Block"'s "Raw Timestamp", you need the "Block"'s 7420 "Timestamp Element", the "Cluster"'s "Timestamp Element", and the 7421 "TimestampScale Element". 7423 26.4. TimestampScale 7425 The "TimestampScale Element" is used to calculate the "Raw Timestamp" 7426 of a "Block". The timestamp is obtained by adding the "Block"'s 7427 timestamp to the "Cluster"'s "Timestamp Element", and then 7428 multiplying that result by the "TimestampScale". The result will be 7429 the "Block"'s "Raw Timestamp" in nanoseconds. The formula for this 7430 would look like: 7432 (a + b) * c 7434 a = `Block`'s Timestamp 7435 b = `Cluster`'s Timestamp 7436 c = `TimestampScale` 7438 For example, assume a "Cluster"'s "Timestamp" has a value of 564264, 7439 the "Block" has a "Timestamp" of 1233, and the "TimestampScale 7440 Element" is the default of 1000000. 7442 (1233 + 564264) * 1000000 = 565497000000 7444 So, the "Block" in this example has a specific time of 565497000000 7445 in nanoseconds. In milliseconds this would be 565497ms. 7447 26.5. TimestampScale Rounding 7449 Because the default value of "TimestampScale" is 1000000, which makes 7450 each integer in the "Cluster" and "Block" "Timestamp Elements" equal 7451 1ms, this is the most commonly used. When dealing with audio, this 7452 causes inaccuracy when seeking. When the audio is combined with 7453 video, this is not an issue. For most cases, the the synch of audio 7454 to video does not need to be more than 1ms accurate. This becomes 7455 obvious when one considers that sound will take 2-3ms to travel a 7456 single meter, so distance from your speakers will have a greater 7457 effect on audio/visual synch than this. 7459 However, when dealing with audio-only files, seeking accuracy can 7460 become critical. For instance, when storing a whole CD in a single 7461 track, a user will want to be able to seek to the exact sample that a 7462 song begins at. If seeking a few sample ahead or behind, a 'crack' 7463 or 'pop' may result as a few odd samples are rendered. Also, when 7464 performing precise editing, it may be very useful to have the audio 7465 accuracy down to a single sample. 7467 When storing timestamps for an audio stream, the "TimestampScale 7468 Element" SHOULD have an accuracy of at least that of the audio sample 7469 rate, otherwise there are rounding errors that prevent users from 7470 knowing the precise location of a sample. Here's how a program has 7471 to round each timestamp in order to be able to recreate the sample 7472 number accurately. 7474 Let's assume that the application has an audio track with a sample 7475 rate of 44100. As written above the "TimestampScale" MUST have at 7476 least the accuracy of the sample rate itself: 1000000000 / 44100 = 7477 22675.7369614512. This value MUST always be truncated. Otherwise 7478 the accuracy will not suffice. So in this example the application 7479 will use 22675 for the "TimestampScale". The application could even 7480 use some lower value like 22674 which would allow it to be a little 7481 bit imprecise about the original timestamps. But more about that in 7482 a minute. 7484 Next the application wants to write sample number 52340 and 7485 calculates the timestamp. This is easy. In order to calculate the 7486 "Raw Timestamp" in ns all it has to do is calculate "Raw Timestamp = 7487 round(1000000000 * sample_number / sample_rate)". Rounding at this 7488 stage is very important! The application might skip it if it choses 7489 a slightly smaller value for the "TimestampScale" factor instead of 7490 the truncated one like shown above. Otherwise it has to round or the 7491 results won't be reversible. For our example we get "Raw Timestamp = 7492 round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 7493 1186848073". 7495 The next step is to calculate the "Absolute Timestamp" - that is the 7496 timestamp that will be stored in the Matroska file. Here the 7497 application has to divide the "Raw Timestamp" from the previous 7498 paragraph by the "TimestampScale" factor and round the result: 7499 "Absolute Timestamp = round(Raw Timestamp / TimestampScale_factor)" 7500 which will result in the following for our example: "Absolute 7501 Timestamp = round(1186848073 / 22675) = round(52341.7011245866) = 7502 52342". This number is the one the application has to write to the 7503 file. 7505 Now our file is complete, and we want to play it back with another 7506 application. Its task is to find out which sample the first 7507 application wrote into the file. So it starts reading the Matroska 7508 file and finds the "TimestampScale" factor 22675 and the audio sample 7509 rate 44100. Later it finds a data block with the "Absolute 7510 Timestamp" of 52342. But how does it get the sample number from 7511 these numbers? 7513 First it has to calculate the "Raw Timestamp" of the block it has 7514 just read. Here's no rounding involved, just an integer 7515 multiplication: "Raw Timestamp = Absolute Timestamp * 7516 TimestampScale_factor". In our example: "Raw Timestamp = 52342 * 7517 22675 = 1186854850". 7519 The conversion from the "Raw Timestamp" to the sample number again 7520 requires rounding: "sample_number = round(Raw Timestamp * sample_rate 7521 / 1000000000)". In our example: "sample_number = round(1186854850 * 7522 44100 / 1000000000) = round(52340.298885) = 52340". This is exactly 7523 the sample number that the previous program started with. 7525 Some general notes for a program: 7527 1. Always calculate the timestamps / sample numbers with floating 7528 point numbers of at least 64bit precision (called 'double' in 7529 most modern programming languages). If you're calculating with 7530 integers then make sure they're 64bit long, too. 7532 2. Always round if you divide. Always! If you don't you'll end up 7533 with situations in which you have a timestamp in the Matroska 7534 file that does not correspond to the sample number that it 7535 started with. Using a slightly lower timestamp scale factor can 7536 help here in that it removes the need for proper rounding in the 7537 conversion from sample number to "Raw Timestamp". 7539 26.6. TrackTimestampScale 7541 The "TrackTimestampScale Element" is used align tracks that would 7542 otherwise be played at different speeds. An example of this would be 7543 if you have a film that was originally recorded at 24fps video. When 7544 playing this back through a PAL broadcasting system, it is standard 7545 to speed up the film to 25fps to match the 25fps display speed of the 7546 PAL broadcasting standard. However, when broadcasting the video 7547 through NTSC, it is typical to leave the film at its original speed. 7548 If you wanted to make a single file where there was one video stream, 7549 and an audio stream used from the PAL broadcast, as well as an audio 7550 stream used from the NTSC broadcast, you would have the problem that 7551 the PAL audio stream would be 1/24th faster than the NTSC audio 7552 stream, quickly leading to problems. It is possible to stretch out 7553 the PAL audio track and re-encode it at a slower speed, however when 7554 dealing with lossy audio codecs, this often results in a loss of 7555 audio quality and/or larger file sizes. 7557 This is the type of problem that "TrackTimestampScale" was designed 7558 to fix. Using it, the video can be played back at a speed that will 7559 synch with either the NTSC or the PAL audio stream, depending on 7560 which is being used for playback. To continue the above example: 7562 Track 1: Video 7563 Track 2: NTSC Audio 7564 Track 3: PAL Audio 7566 Because the NTSC track is at the original speed, it will used as the 7567 default value of 1.0 for its "TrackTimestampScale". The video will 7568 also be aligned to the NTSC track with the default value of 1.0. 7570 The "TrackTimestampScale" value to use for the PAL track would be 7571 calculated by determining how much faster the PAL track is than the 7572 NTSC track. In this case, because we know the video for the NTSC 7573 audio is being played back at 24fps and the video for the PAL audio 7574 is being played back at 25fps, the calculation would be: 7576 25/24 ≈ 1.04166666666666666667 7578 When writing a file that uses a non-default "TrackTimestampScale", 7579 the values of the "Block"'s timestamp are whatever they would be when 7580 normally storing the track with a default value for the 7581 "TrackTimestampScale". However, the data is interleaved a little 7582 differently. Data SHOULD be interleaved by its Section 26.3 in the 7583 order handed back from the encoder. The "Raw Timestamp" of a "Block" 7584 from a track using "TrackTimestampScale" is calculated using: 7586 "(Block's Timestamp + Cluster's Timestamp) * TimestampScale * 7587 TrackTimestampScale" 7589 So, a Block from the PAL track above that had a Section 26.1 of 100 7590 seconds would have a "Raw Timestamp" of 104.66666667 seconds, and so 7591 would be stored in that part of the file. 7593 When playing back a track using the "TrackTimestampScale", if the 7594 track is being played by itself, there is no need to scale it. From 7595 the above example, when playing the Video with the NTSC Audio, 7596 neither are scaled. However, when playing back the Video with the 7597 PAL Audio, the timestamps from the PAL Audio track are scaled using 7598 the "TrackTimestampScale", resulting in the video playing back in 7599 synch with the audio. 7601 It would be possible for a "Matroska Player" to also adjust the 7602 audio's samplerate at the same time as adjusting the timestamps if 7603 you wanted to play the two audio streams synchronously. It would 7604 also be possible to adjust the video to match the audio's speed. 7605 However, for playback, the selected track(s) timestamps SHOULD be 7606 adjusted if they need to be scaled. 7608 While the above example deals specifically with audio tracks, this 7609 element can be used to align video, audio, subtitles, or any other 7610 type of track contained in a Matroska file. 7612 27. References 7614 27.1. URIs 7616 [1] http://mukoli.free.fr/mcf/mcf.html 7618 [2] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7619 specification.markdown 7621 [3] https://datatracker.ietf.org/wg/cellar/charter/ 7623 [4] https://matroska.org/files/matroska.pdf 7625 [5] diagram.md 7627 [6] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7628 specification.markdown 7630 [7] https://github.com/Matroska-Org/foundation- 7631 source/blob/master/spectool/specdata.xml 7633 [8] https://tools.ietf.org/html/rfc2119 7635 [9] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7636 specification.markdown 7638 [10] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7639 specification.markdown#ebml-element-types 7641 [11] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7642 specification.markdown#ebml-schema 7644 [12] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7645 specification.markdown#structure 7647 [13] https://www.loc.gov/standards/iso639-2/php/English_list.php 7649 [14] https://tools.ietf.org/html/bcp47 7651 [15] https://www.iana.org/domains/root/db 7653 [16] http://www.webmproject.org/docs/container/ 7655 [17] http://dvd.sourceforge.net/dvdinfo/uops.html 7657 [18] http://www.dvd-replica.com/DVD/ 7659 [19] http://dvd.sourceforge.net/dvdinfo/ 7661 [20] http://www.matroska.org/node/1/revisions/74/view#StereoMode 7663 Authors' Addresses 7665 Steve Lhomme 7667 Email: slhomme@matroska.org 7668 Moritz Bunkus 7670 Email: moritz@bunkus.org 7672 Dave Rice 7674 Email: dave@dericed.com