idnits 2.17.1 draft-ietf-cellar-matroska-02.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 667 has weird spacing: '...xx xxxx xxxx ...' == Line 668 has weird spacing: '...1x xxxx xxxx ...' == Line 669 has weird spacing: '...01 xxxx xxxx ...' == Line 671 has weird spacing: '...00 1xxx xxxx ...' == Line 672 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 (January 9, 2019) is 1906 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 7728 looks like a reference -- Missing reference section? '2' on line 7730 looks like a reference -- Missing reference section? '3' on line 7733 looks like a reference -- Missing reference section? '4' on line 7735 looks like a reference -- Missing reference section? '5' on line 7737 looks like a reference -- Missing reference section? '6' on line 7739 looks like a reference -- Missing reference section? '7' on line 7742 looks like a reference -- Missing reference section? '8' on line 7745 looks like a reference -- Missing reference section? '9' on line 7747 looks like a reference -- Missing reference section? '10' on line 7750 looks like a reference -- Missing reference section? '11' on line 7753 looks like a reference -- Missing reference section? '12' on line 7756 looks like a reference -- Missing reference section? '13' on line 7759 looks like a reference -- Missing reference section? '14' on line 7761 looks like a reference -- Missing reference section? '15' on line 7763 looks like a reference -- Missing reference section? '16' on line 7765 looks like a reference -- Missing reference section? '0' on line 6591 looks like a reference -- Missing reference section? '17' on line 7767 looks like a reference -- Missing reference section? '18' on line 7769 looks like a reference -- Missing reference section? '19' on line 7771 looks like a reference -- Missing reference section? '20' on line 7773 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: July 13, 2019 6 D. Rice 7 January 9, 2019 9 Matroska Specifications 10 draft-ietf-cellar-matroska-02 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 July 13, 2019. 35 Copyright Notice 37 Copyright (c) 2019 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 . . . . . . . . . 56 146 9.3.4.1.13. TrackOffset Element . . . . . . . . . . . . . 56 147 9.3.4.1.14. MaxBlockAdditionID Element . . . . . . . . . 57 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 . . . . . . . . . . . . 59 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 . . . . . . . . . . . . 60 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 . . . . . . . . . . . . . 62 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 . . . . . . . . . 65 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 . . . . . 76 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 . . . . . . 101 242 9.3.4.1.38.8. ContentEncryption Element . . . . . . . 101 243 9.3.4.1.38.9. ContentEncAlgo Element . . . . . . . . . 101 244 9.3.4.1.38.10. ContentEncKeyID Element . . . . . . . . 102 245 9.3.4.1.38.11. ContentEncAESSettings Element . . . . . 102 246 9.3.4.1.38.12. AESSettingsCipherMode Element . . . . . 103 247 9.3.4.1.38.13. ContentSignature Element . . . . . . . . 103 248 9.3.4.1.38.14. ContentSigKeyID Element . . . . . . . . 104 249 9.3.4.1.38.15. ContentSigAlgo Element . . . . . . . . . 104 250 9.3.4.1.38.16. ContentSigHashAlgo Element . . . . . . . 105 251 9.3.5. Cues Element . . . . . . . . . . . . . . . . . . . . 105 252 9.3.5.1. CuePoint Element . . . . . . . . . . . . . . . . 106 253 9.3.5.1.1. CueTime Element . . . . . . . . . . . . . . . 106 254 9.3.5.1.2. CueTrackPositions Element . . . . . . . . . . 106 255 9.3.5.1.2.1. CueTrack Element . . . . . . . . . . . . 107 256 9.3.5.1.2.2. CueClusterPosition Element . . . . . . . 107 257 9.3.5.1.2.3. CueRelativePosition Element . . . . . . . 108 258 9.3.5.1.2.4. CueDuration Element . . . . . . . . . . . 108 259 9.3.5.1.2.5. CueBlockNumber Element . . . . . . . . . 108 260 9.3.5.1.2.6. CueCodecState Element . . . . . . . . . . 109 261 9.3.5.1.2.7. CueReference Element . . . . . . . . . . 109 262 9.3.5.1.2.8. CueRefTime Element . . . . . . . . . . . 109 263 9.3.5.1.2.9. CueRefCluster Element . . . . . . . . . . 110 264 9.3.5.1.2.10. CueRefNumber Element . . . . . . . . . . 110 265 9.3.5.1.2.11. CueRefCodecState Element . . . . . . . . 111 266 9.3.6. Attachments Element . . . . . . . . . . . . . . . . . 111 267 9.3.6.1. AttachedFile Element . . . . . . . . . . . . . . 112 268 9.3.6.1.1. FileDescription Element . . . . . . . . . . . 112 269 9.3.6.1.2. FileName Element . . . . . . . . . . . . . . 112 270 9.3.6.1.3. FileMimeType Element . . . . . . . . . . . . 113 271 9.3.6.1.4. FileData Element . . . . . . . . . . . . . . 113 272 9.3.6.1.5. FileUID Element . . . . . . . . . . . . . . . 113 273 9.3.6.1.6. FileReferral Element . . . . . . . . . . . . 114 274 9.3.6.1.7. FileUsedStartTime Element . . . . . . . . . . 114 275 9.3.6.1.8. FileUsedEndTime Element . . . . . . . . . . . 115 276 9.3.7. Chapters Element . . . . . . . . . . . . . . . . . . 115 277 9.3.7.1. EditionEntry Element . . . . . . . . . . . . . . 115 278 9.3.7.1.1. EditionUID Element . . . . . . . . . . . . . 116 279 9.3.7.1.2. EditionFlagHidden Element . . . . . . . . . . 116 280 9.3.7.1.3. EditionFlagDefault Element . . . . . . . . . 117 281 9.3.7.1.4. EditionFlagOrdered Element . . . . . . . . . 117 282 9.3.7.1.5. ChapterAtom Element . . . . . . . . . . . . . 118 283 9.3.7.1.5.1. ChapterUID Element . . . . . . . . . . . 118 284 9.3.7.1.5.2. ChapterStringUID Element . . . . . . . . 118 285 9.3.7.1.5.3. ChapterTimeStart Element . . . . . . . . 119 286 9.3.7.1.5.4. ChapterTimeEnd Element . . . . . . . . . 119 287 9.3.7.1.5.5. ChapterFlagHidden Element . . . . . . . . 120 288 9.3.7.1.5.6. ChapterFlagEnabled Element . . . . . . . 120 289 9.3.7.1.5.7. ChapterSegmentUID Element . . . . . . . . 121 290 9.3.7.1.5.8. ChapterSegmentEditionUID Element . . . . 121 291 9.3.7.1.5.9. ChapterPhysicalEquiv Element . . . . . . 122 292 9.3.7.1.5.10. ChapterTrack Element . . . . . . . . . . 122 293 9.3.7.1.5.11. ChapterTrackNumber Element . . . . . . . 122 294 9.3.7.1.5.12. ChapterDisplay Element . . . . . . . . . 123 295 9.3.7.1.5.13. ChapString Element . . . . . . . . . . . 123 296 9.3.7.1.5.14. ChapLanguage Element . . . . . . . . . . 124 297 9.3.7.1.5.15. ChapLanguageIETF Element . . . . . . . . 124 298 9.3.7.1.5.16. ChapCountry Element . . . . . . . . . . . 124 299 9.3.7.1.5.17. ChapProcess Element . . . . . . . . . . . 125 300 9.3.7.1.5.18. ChapProcessCodecID Element . . . . . . . 125 301 9.3.7.1.5.19. ChapProcessPrivate Element . . . . . . . 126 302 9.3.7.1.5.20. ChapProcessCommand Element . . . . . . . 126 303 9.3.7.1.5.21. ChapProcessTime Element . . . . . . . . . 126 304 9.3.7.1.5.22. ChapProcessData Element . . . . . . . . . 127 305 9.3.8. Tags Element . . . . . . . . . . . . . . . . . . . . 127 306 9.3.8.1. Tag Element . . . . . . . . . . . . . . . . . . . 128 307 9.3.8.1.1. Targets Element . . . . . . . . . . . . . . . 128 308 9.3.8.1.1.1. TargetTypeValue Element . . . . . . . . . 128 309 9.3.8.1.1.2. TargetType Element . . . . . . . . . . . 129 310 9.3.8.1.1.3. TagTrackUID Element . . . . . . . . . . . 130 311 9.3.8.1.1.4. TagEditionUID Element . . . . . . . . . . 131 312 9.3.8.1.1.5. TagChapterUID Element . . . . . . . . . . 131 313 9.3.8.1.1.6. TagAttachmentUID Element . . . . . . . . 131 314 9.3.8.1.2. SimpleTag Element . . . . . . . . . . . . . . 132 315 9.3.8.1.2.1. TagName Element . . . . . . . . . . . . . 132 316 9.3.8.1.2.2. TagLanguage Element . . . . . . . . . . . 133 317 9.3.8.1.2.3. TagLanguageIETF Element . . . . . . . . . 133 318 9.3.8.1.2.4. TagDefault Element . . . . . . . . . . . 133 319 9.3.8.1.2.5. TagString Element . . . . . . . . . . . . 134 320 9.3.8.1.2.6. TagBinary Element . . . . . . . . . . . . 134 321 10. Matroska Element Ordering . . . . . . . . . . . . . . . . . . 135 322 10.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 135 323 10.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 135 324 10.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 135 325 10.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 136 326 10.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 136 327 10.6. Chapters Element . . . . . . . . . . . . . . . . . . . . 136 328 10.7. Attachments . . . . . . . . . . . . . . . . . . . . . . 136 329 10.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 137 330 10.9. Optimum layout from a muxer . . . . . . . . . . . . . . 137 331 10.10. Optimum layout after editing tags . . . . . . . . . . . 137 332 10.11. Optimum layout with Cues at the front . . . . . . . . . 138 333 10.12. Cluster Timestamp . . . . . . . . . . . . . . . . . . . 138 334 11. Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 138 335 11.1. Edition and Chapter Flags . . . . . . . . . . . . . . . 138 336 11.1.1. Chapter Flags . . . . . . . . . . . . . . . . . . . 138 337 11.1.2. Edition Flags . . . . . . . . . . . . . . . . . . . 139 338 11.1.2.1. EditionFlagHidden . . . . . . . . . . . . . . . 139 339 11.1.2.2. EditionFlagDefault . . . . . . . . . . . . . . . 139 340 11.1.2.3. EditionFlagOrdered . . . . . . . . . . . . . . . 139 341 11.1.2.3.1. Ordered-Edition and Matroska Segment-Linking 140 342 11.2. Menu features . . . . . . . . . . . . . . . . . . . . . 141 343 11.2.1. Matroska Script (0) . . . . . . . . . . . . . . . . 141 344 11.2.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . 141 345 11.3. Example 1 : basic chaptering . . . . . . . . . . . . . . 143 346 11.4. Example 2 : nested chapters . . . . . . . . . . . . . . 145 347 11.4.1. The Micronauts "Bleep To Bleep" . . . . . . . . . . 145 348 12. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 148 349 12.1. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 148 350 13. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 351 13.1. Recommendations . . . . . . . . . . . . . . . . . . . . 149 352 14. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 150 353 14.1. File Access . . . . . . . . . . . . . . . . . . . . . . 150 354 14.2. Livestreaming . . . . . . . . . . . . . . . . . . . . . 150 355 15. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 151 356 15.1. Requirements . . . . . . . . . . . . . . . . . . . . . . 151 357 15.1.1. Highlights/Hotspots . . . . . . . . . . . . . . . . 151 358 15.1.2. Playback features . . . . . . . . . . . . . . . . . 152 359 15.1.3. Player requirements . . . . . . . . . . . . . . . . 153 360 15.2. Working Graph . . . . . . . . . . . . . . . . . . . . . 153 361 16. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 153 362 17. Default Values . . . . . . . . . . . . . . . . . . . . . . . 153 363 18. DefaultDecodedFieldDuration . . . . . . . . . . . . . . . . . 154 364 19. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 154 365 20. Image cropping . . . . . . . . . . . . . . . . . . . . . . . 155 366 21. Matroska versioning . . . . . . . . . . . . . . . . . . . . . 155 367 22. MIME Types . . . . . . . . . . . . . . . . . . . . . . . . . 156 368 23. Segment Position . . . . . . . . . . . . . . . . . . . . . . 156 369 23.1. Segment Position Exception . . . . . . . . . . . . . . . 156 370 23.2. Example of Segment Position . . . . . . . . . . . . . . 156 371 24. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 157 372 24.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 157 373 24.2. Medium Linking . . . . . . . . . . . . . . . . . . . . . 158 374 24.3. Soft Linking . . . . . . . . . . . . . . . . . . . . . . 158 375 25. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 159 376 25.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 159 377 25.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 159 378 25.3. Track Operation . . . . . . . . . . . . . . . . . . . . 159 379 25.4. Overlay Track . . . . . . . . . . . . . . . . . . . . . 160 380 25.5. Multi-planar and 3D videos . . . . . . . . . . . . . . . 160 381 26. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . 161 382 26.1. Timestamp Types . . . . . . . . . . . . . . . . . . . . 161 383 26.2. Block Timestamps . . . . . . . . . . . . . . . . . . . . 161 384 26.3. Raw Timestamp . . . . . . . . . . . . . . . . . . . . . 161 385 26.4. TimestampScale . . . . . . . . . . . . . . . . . . . . . 161 386 26.5. TimestampScale Rounding . . . . . . . . . . . . . . . . 162 387 26.6. TrackTimestampScale . . . . . . . . . . . . . . . . . . 164 388 27.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 165 389 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 166 391 1. Introduction 393 Matroska aims to become THE standard of multimedia container formats. 394 It was derived from a project called MCF [1], but differentiates from 395 it significantly because it is based on EBML [2] (Extensible Binary 396 Meta Language), a binary derivative of XML. EBML enables significant 397 advantages in terms of future format extensibility, without breaking 398 file support in old parsers. 400 First, it is essential to clarify exactly "What an Audio/Video 401 container is", to avoid any misunderstandings: 403 o It is NOT a video or audio compression format (codec) 405 o It is an envelope for which there can be many audio, video and 406 subtitles streams, allowing the user to store a complete movie or 407 CD in a single file. 409 Matroska is designed with the future in mind. It incorporates 410 features like: 412 o Fast seeking in the file 414 o Chapter entries 416 o Full metadata (tags) support 418 o Selectable subtitle/audio/video streams 420 o Modularly expandable 422 o Error resilience (can recover playback even when the stream is 423 damaged) 425 o Streamable over the internet and local networks (HTTP, CIFS, FTP, 426 etc) 428 o Menus (like DVDs have) 430 Matroska is an open standards project. This means for personal use 431 it is absolutely free to use and that the technical specifications 432 describing the bitstream are open to everybody, even to companies 433 that would like to support it in their products. 435 2. Status of this document 437 This document is a work-in-progress specification defining the 438 Matroska file format as part of the IETF Cellar working group [3]. 439 But since it's quite complete it is used as a reference for the 440 development of libmatroska. Legacy versions of the specification can 441 be found here [4] (PDF doc by Alexander Noe -- outdated). 443 For a simplified diagram of the layout of a Matroska file, see the 444 Diagram page [5]. 446 A more refined and detailed version of the EBML specifications is 447 being worked on here [6]. 449 The table found below is now generated from the "source" of the 450 Matroska specification. This XML file [7] is also used to generate 451 the semantic data used in libmatroska and libmatroska2. We encourage 452 anyone to use and monitor its changes so your code is spec-proof and 453 always up to date. 455 Note that versions 1, 2 and 3 have been finalized. Version 4 is 456 currently work in progress. There MAY be further additions to v4. 458 3. Security Considerations 460 Matroska inherits security considerations from EBML. 462 Attacks on a "Matroska Reader" could include: 464 o Storage of a arbitrary and potentially executable data within an 465 "Attachment Element". "Matroska Readers" that extract or use data 466 from Matroska Attachments SHOULD check that the data adheres to 467 expectations. 469 o A "Matroska Attachment" with an inaccurate mime-type. 471 4. IANA Considerations 473 To be determined. 475 5. Notation and Conventions 477 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 478 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 479 document are to be interpreted as described in RFC 2119 [8]. 481 This document defines specific terms in order to define the format 482 and application of "Matroska". Specific terms are defined below: 484 "Matroska": a multimedia container format based on EBML (Extensible 485 Binary Meta Language) 487 "Matroska Reader": A "Matroska Reader" is a data parser that 488 interprets the semantics of a Matroska document and creates a way for 489 programs to use "Matroska". 491 "Matroska Player": A "Matroska Player" is a "Matroska Reader" with a 492 primary purpose of playing audiovisual files, including "Matroska" 493 documents. 495 6. Basis in EBML 497 Matroska is a Document Type of EBML (Extensible Binary Meta 498 Language). This specification is dependent on the EBML Specification 499 [9]. For an understanding of Matroska's EBML Schema, see in 500 particular the sections of the EBML Specification covering EBML 501 Element Types [10], EBML Schema [11], and EBML Structure [12]. 503 6.1. Added Constraints on EBML 505 As an EBML Document Type, Matroska adds the following constraints to 506 the EBML specification. 508 o The "docType" of the "EBML Header" MUST be 'matroska'. 510 o The "EBMLMaxIDLength" of the "EBML Header" MUST be "4". 512 o The "EBMLMaxSizeLength" of the "EBML Header" MUST be between "1" 513 and "8" inclusive. 515 6.2. Matroska Design 517 All top-levels elements (Segment and direct sub-elements) are coded 518 on 4 octets, i.e. class D elements. 520 6.2.1. Language Codes 522 Matroska from version 1 through 3 uses language codes that can be 523 either the 3 letters bibliographic ISO-639-2 [13] form (like "fre" 524 for french), or such a language code followed by a dash and a country 525 code for specialities in languages (like "fre-ca" for Canadian 526 French). The "ISO 639-2 Language Elements" are "Language Element", 527 "TagLanguage Element", and "ChapLanguage Element". 529 Starting in Matroska version 4, either "ISO 639-2" or BCP 47 [14] MAY 530 be used, although "BCP 47" is RECOMMENDED. The "BCP 47 Language 531 Elements" are "LanguageIETF Element", "TagLanguageIETF Element", and 532 "ChapLanguageIETF Element". If a "BCP 47 Language Element" and an 533 "ISO 639-2 Language Element" are used within the same "Parent 534 Element", then the "ISO 639-2 Language Element" MUST be ignored and 535 precedence given to the "BCP 47 Language Element". 537 Country codes are the same as used for internet domains [15]. 539 6.2.2. Physical Types 541 Each level can have different meanings for audio and video. The 542 ORIGINAL_MEDIUM tag can be used to specify a string for 543 ChapterPhysicalEquiv = 60. Here is the list of possible levels for 544 both audio and video : 546 +----------------------+--------------+-----------+-----------------+ 547 | ChapterPhysicalEquiv | Audio | Video | Comment | 548 +----------------------+--------------+-----------+-----------------+ 549 | 70 | SET / | SET / | the collection | 550 | | PACKAGE | PACKAGE | of different | 551 | | | | media | 552 | 60 | CD / 12" / | DVD / VHS | the physical | 553 | | 10" / 7" / | / | medium like a | 554 | | TAPE / | LASERDISC | CD or a DVD | 555 | | MINIDISC / | | | 556 | | DAT | | | 557 | 50 | SIDE | SIDE | when the | 558 | | | | original medium | 559 | | | | (LP/DVD) has | 560 | | | | different sides | 561 | 40 | - | LAYER | another | 562 | | | | physical level | 563 | | | | on DVDs | 564 | 30 | SESSION | SESSION | as found on CDs | 565 | | | | and DVDs | 566 | 20 | TRACK | - | as found on | 567 | | | | audio CDs | 568 | 10 | INDEX | - | the first | 569 | | | | logical level | 570 | | | | of the | 571 | | | | side/medium | 572 +----------------------+--------------+-----------+-----------------+ 574 6.2.3. Block Structure 576 Bit 0 is the most significant bit. 578 Frames using references SHOULD be stored in "coding order". That 579 means the references first and then the frames referencing them. A 580 consequence is that timestamps MAY NOT be consecutive. But a frame 581 with a past timestamp MUST reference a frame already known, otherwise 582 it's considered bad/void. 584 There can be many Blocks in a BlockGroup provided they all have the 585 same timestamp. It is used with different parts of a frame with 586 different priorities. 588 6.2.3.1. Block Header 590 +--------+--------+-------------------------------------------------+ 591 | Offset | Player | Description | 592 +--------+--------+-------------------------------------------------+ 593 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 594 | | | like form (1 octet if the value is < 0x80, 2 if | 595 | | | < 0x4000, etc) (most significant bits set to | 596 | | | increase the range). | 597 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 598 | | | signed int16) | 599 +--------+--------+-------------------------------------------------+ 601 6.2.3.2. Block Header Flags 603 +--------+-----+--------+-------------------------------------------+ 604 | Offset | Bit | Player | Description | 605 +--------+-----+--------+-------------------------------------------+ 606 | 0x03+ | 0-3 | - | Reserved, set to 0 | 607 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 608 | | | | frame but not display it | 609 | 0x03+ | 5-6 | MUST | Lacing | 610 | | | | * 00 : no lacing | 611 | | | | * 01 : Xiph lacing | 612 | | | | * 11 : EBML lacing | 613 | | | | * 10 : fixed-size lacing | 614 | 0x03+ | 7 | - | not used | 615 +--------+-----+--------+-------------------------------------------+ 617 6.2.4. Lacing 619 Lacing is a mechanism to save space when storing data. It is 620 typically used for small blocks of data (referred to as frames in 621 Matroska). There are 3 types of lacing: 623 1. Xiph, inspired by what is found in the Ogg container 625 2. EBML, which is the same with sizes coded differently 627 3. fixed-size, where the size is not coded 628 For example, a user wants to store 3 frames of the same track. The 629 first frame is 800 octets long, the second is 500 octets long and the 630 third is 1000 octets long. As these data are small, they can be 631 stored in a lace to save space. They will then be stored in the same 632 block as follows: 634 6.2.4.1. Xiph lacing 636 o Block head (with lacing bits set to 01) 638 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 639 500 octets one) 641 o Lacing sizes: only the 2 first ones will be coded, 800 gives 642 255;255;255;35, 500 gives 255;245. The size of the last frame is 643 deduced from the total size of the Block. 645 o Data in frame 1 647 o Data in frame 2 649 o Data in frame 3 651 A frame with a size multiple of 255 is coded with a 0 at the end of 652 the size, for example 765 is coded 255;255;255;0. 654 6.2.4.2. EBML lacing 656 In this case, the size is not coded as blocks of 255 bytes, but as a 657 difference with the previous size and this size is coded as in EBML. 658 The first size in the lace is unsigned as in EBML. The others use a 659 range shifting to get a sign on each value: 661 +----------------------------------+--------------------------------+ 662 | Bit Representation | Value | 663 +----------------------------------+--------------------------------+ 664 | 1xxx xxxx | value -(2^6-1) to 2^6-1 (ie 0 | 665 | | to 2^7-2 minus 2^6-1, half of | 666 | | the range) | 667 | 01xx xxxx xxxx xxxx | value -(2^13-1) to 2^13-1 | 668 | 001x xxxx xxxx xxxx xxxx xxxx | value -(2^20-1) to 2^20-1 | 669 | 0001 xxxx xxxx xxxx xxxx xxxx | value -(2^27-1) to 2^27-1 | 670 | xxxx xxxx | | 671 | 0000 1xxx xxxx xxxx xxxx xxxx | value -(2^34-1) to 2^34-1 | 672 | xxxx xxxx xxxx xxxx | | 673 | 0000 01xx xxxx xxxx xxxx xxxx | value -(2^41-1) to 2^41-1 | 674 | xxxx xxxx xxxx xxxx xxxx xxxx | | 675 | 0000 001x xxxx xxxx xxxx xxxx | value -(2^48-1) to 2^48-1 | 676 | xxxx xxxx xxxx xxxx xxxx xxxx | | 677 | xxxx xxxx | | 678 +----------------------------------+--------------------------------+ 680 o Block head (with lacing bits set to 11) 682 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 683 500 octets one) 685 o Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320 686 0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000 687 = 0x5ED3. The size of the last frame is deduced from the total 688 size of the Block. 690 o Data in frame 1 692 o Data in frame 2 694 o Data in frame 3 696 6.2.4.3. Fixed-size lacing 698 In this case, only the number of frames in the lace is saved, the 699 size of each frame is deduced from the total size of the Block. For 700 example, for 3 frames of 800 octets each: 702 o Block head (with lacing bits set to 10) 704 o Lacing head: Number of frames in the lace -1, i.e. 2 706 o Data in frame 1 708 o Data in frame 2 709 o Data in frame 3 711 6.2.4.4. SimpleBlock Structure 713 The "SimpleBlock" is inspired by the Section 6.2.3. The main 714 differences are the added Keyframe flag and Discardable flag. 715 Otherwise everything is the same. 717 Bit 0 is the most significant bit. 719 Frames using references SHOULD be stored in "coding order". That 720 means the references first and then the frames referencing them. A 721 consequence is that timestamps MAY NOT be consecutive. But a frame 722 with a past timestamp MUST reference a frame already known, otherwise 723 it's considered bad/void. 725 There can be many "Block Elements" in a "BlockGroup" provided they 726 all have the same timestamp. It is used with different parts of a 727 frame with different priorities. 729 6.2.4.4.1. SimpleBlock Header 731 +--------+--------+-------------------------------------------------+ 732 | Offset | Player | Description | 733 +--------+--------+-------------------------------------------------+ 734 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 735 | | | like form (1 octet if the value is < 0x80, 2 if | 736 | | | < 0x4000, etc) (most significant bits set to | 737 | | | increase the range). | 738 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 739 | | | signed int16) | 740 +--------+--------+-------------------------------------------------+ 742 6.2.4.4.2. SimpleBlock Header Flags 743 +--------+-----+--------+-------------------------------------------+ 744 | Offset | Bit | Player | Description | 745 +--------+-----+--------+-------------------------------------------+ 746 | 0x03+ | 0 | - | Keyframe, set when the Block contains | 747 | | | | only keyframes | 748 | 0x03+ | 1-3 | - | Reserved, set to 0 | 749 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 750 | | | | frame but not display it | 751 | 0x03+ | 5-6 | MUST | Lacing | 752 | | | | * 00 : no lacing | 753 | | | | * 01 : Xiph lacing | 754 | | | | * 11 : EBML lacing | 755 | | | | * 10 : fixed-size lacing | 756 | 0x03+ | 7 | - | Discardable, the frames of the Block can | 757 | | | | be discarded during playing if needed | 758 +--------+-----+--------+-------------------------------------------+ 760 6.2.4.5. Laced Data 762 When lacing bit is set. 764 +--------+--------+-------------------------------------------------+ 765 | Offset | Player | Description | 766 +--------+--------+-------------------------------------------------+ 767 | 0x00 | MUST | Number of frames in the lace-1 (uint8) | 768 | 0x01 / | MUST* | Lace-coded size of each frame of the lace, | 769 | 0xXX | | except for the last one (multiple uint8). *This | 770 | | | is not used with Fixed-size lacing as it is | 771 | | | calculated automatically from (total size of | 772 | | | lace) / (number of frames in lace). | 773 +--------+--------+-------------------------------------------------+ 775 For (possibly) Laced Data 777 +--------+--------+--------------------------+ 778 | Offset | Player | Description | 779 +--------+--------+--------------------------+ 780 | 0x00 | MUST | Consecutive laced frames | 781 +--------+--------+--------------------------+ 783 7. Matroska Structure 785 A Matroska file MUST be composed of at least one "EBML Document" 786 using the "Matroska Document Type". Each "EBML Document" MUST start 787 with an "EBML Header" and MUST be followed by the "EBML Root 788 Element", defined as "Segment" in Matroska. Matroska defines several 789 "Top Level Elements" which MAY occur within the "Segment". 791 As an example, a simple Matroska file consisting of a single "EBML 792 Document" could be represented like this: 794 o "EBML Header" 796 o "Segment" 798 A more complex Matroska file consisting of an "EBML Stream" 799 (consisting of two "EBML Documents") could be represented like this: 801 o "EBML Header" 803 o "Segment" 805 o "EBML Header" 807 o "Segment" 809 The following diagram represents a simple Matroska file, comprised of 810 an "EBML Document" with an "EBML Header", a "Segment Element" (the 811 "Root Element"), and all eight Matroska "Top Level Elements". In the 812 following diagrams of this section, horizontal spacing expresses a 813 parent-child relationship between Matroska Elements (e.g. the "Info 814 Element" is contained within the "Segment Element") whereas vertical 815 alignment represents the storage order within the file. 817 +-------------+ 818 | EBML Header | 819 +---------------------------+ 820 | Segment | SeekHead | 821 | |-------------| 822 | | Info | 823 | |-------------| 824 | | Tracks | 825 | |-------------| 826 | | Chapters | 827 | |-------------| 828 | | Cluster | 829 | |-------------| 830 | | Cues | 831 | |-------------| 832 | | Attachments | 833 | |-------------| 834 | | Tags | 835 +---------------------------+ 837 The Matroska "EBML Schema" defines eight "Top Level Elements": 838 "SeekHead", "Info", "Tracks", "Chapters", "Cluster", "Cues", 839 "Attachments", and "Tags". 841 The "SeekHead Element" (also known as "MetaSeek") contains an index 842 of "Top Level Elements" locations within the "Segment". Use of the 843 "SeekHead Element" is RECOMMENDED. Without a "SeekHead Element", a 844 Matroska parser would have to search the entire file to find all of 845 the other "Top Level Elements". This is due to Matroska's flexible 846 ordering requirements; for instance, it is acceptable for the 847 "Chapters Element" to be stored after the "Cluster Elements". 849 +--------------------------------+ 850 | SeekHead | Seek | SeekID | 851 | | |--------------| 852 | | | SeekPosition | 853 +--------------------------------+ 855 Representation of a SeekHead Element. 857 The "Info Element" contains vital information for identifying the 858 whole "Segment". This includes the title for the "Segment", a 859 randomly generated unique identifier, and the unique identifier(s) of 860 any linked "Segment Elements". 862 +-------------------------+ 863 | Info | SegmentUID | 864 | |------------------| 865 | | SegmentFilename | 866 | |------------------| 867 | | PrevUID | 868 | |------------------| 869 | | PrevFilename | 870 | |------------------| 871 | | NextUID | 872 | |------------------| 873 | | NextFilename | 874 | |------------------| 875 | | SegmentFamily | 876 | |------------------| 877 | | ChapterTranslate | 878 | |------------------| 879 | | TimestampScale | 880 | |------------------| 881 | | Duration | 882 | |------------------| 883 | | DateUTC | 884 | |------------------| 885 | | Title | 886 | |------------------| 887 | | MuxingApp | 888 | |------------------| 889 | | WritingApp | 890 |-------------------------| 892 Representation of an Info Element and its Child Elements. 894 The "Tracks Element" defines the technical details for each track and 895 can store the name, number, unique identifier, language and type 896 (audio, video, subtitles, etc.) of each track. For example, the 897 "Tracks Element" MAY store information about the resolution of a 898 video track or sample rate of an audio track. 900 The "Tracks Element" MUST identify all the data needed by the codec 901 to decode the data of the specified track. However, the data 902 required is contingent on the codec used for the track. For example, 903 a "Track Element" for uncompressed audio only requires the audio bit 904 rate to be present. A codec such as AC-3 would require that the 905 "CodecID Element" be present for all tracks, as it is the primary way 906 to identify which codec to use to decode the track. 908 +------------------------------------+ 909 | Tracks | TrackEntry | TrackNumber | 910 | | |--------------| 911 | | | TrackUID | 912 | | |--------------| 913 | | | TrackType | 914 | | |--------------| 915 | | | Name | 916 | | |--------------| 917 | | | Language | 918 | | |--------------| 919 | | | CodecID | 920 | | |--------------| 921 | | | CodecPrivate | 922 | | |--------------| 923 | | | CodecName | 924 | | |----------------------------------+ 925 | | | Video | FlagInterlaced | 926 | | | |-------------------| 927 | | | | FieldOrder | 928 | | | |-------------------| 929 | | | | StereoMode | 930 | | | |-------------------| 931 | | | | AlphaMode | 932 | | | |-------------------| 933 | | | | PixelWidth | 934 | | | |-------------------| 935 | | | | PixelHeight | 936 | | | |-------------------| 937 | | | | DisplayWidth | 938 | | | |-------------------| 939 | | | | DisplayHeight | 940 | | | |-------------------| 941 | | | | AspectRatioType | 942 | | | |-------------------| 943 | | | | Color | 944 | | |----------------------------------| 945 | | | Audio | SamplingFrequency | 946 | | | |-------------------| 947 | | | | Channels | 948 | | | |-------------------| 949 | | | | BitDepth | 950 |--------------------------------------------------------| 952 Representation of the Tracks Element and a selection of its 953 Descendant Elements. 955 The "Chapters Element" lists all of the chapters. Chapters are a way 956 to set predefined points to jump to in video or audio. 958 +-----------------------------------------+ 959 | Chapters | Edition | EditionUID | 960 | | Entry |--------------------| 961 | | | EditionFlagHidden | 962 | | |--------------------| 963 | | | EditionFlagDefault | 964 | | |--------------------| 965 | | | EditionFlagOrdered | 966 | | |--------------------------------+ 967 | | | ChapterAtom | ChapterUID | 968 | | | |------------------| 969 | | | | ChapterStringUID | 970 | | | |------------------| 971 | | | | ChapterTimeStart | 972 | | | |------------------| 973 | | | | ChapterTimeEnd | 974 | | | |------------------| 975 | | | | ChapterFlagHidden | 976 | | | |---------------------------------+ 977 | | | | ChapterDisplay | ChapString | 978 | | | | |--------------| 979 | | | | | ChapLanguage | 980 +--------------------------------------------------------------------+ 982 Representation of the Chapters Element and a selection of its 983 Descendant Elements. 985 "Cluster Elements" contain the content for each track, e.g. video 986 frames. A Matroska file SHOULD contain at least one "Cluster 987 Element". The "Cluster Element" helps to break up "SimpleBlock" or 988 "BlockGroup Elements" and helps with seeking and error protection. 989 It is RECOMMENDED that the size of each individual "Cluster Element" 990 be limited to store no more than 5 seconds or 5 megabytes. Every 991 "Cluster Element" MUST contain a "Timestamp Element". This SHOULD be 992 the "Timestamp Element" used to play the first "Block" in the 993 "Cluster Element". There SHOULD be one or more "BlockGroup" or 994 "SimpleBlock Element" in each "Cluster Element". A "BlockGroup 995 Element" MAY contain a "Block" of data and any information relating 996 directly to that "Block". 998 +--------------------------+ 999 | Cluster | Timestamp | 1000 | |----------------| 1001 | | SilentTracks | 1002 | |----------------| 1003 | | Position | 1004 | |----------------| 1005 | | PrevSize | 1006 | |----------------| 1007 | | SimpleBlock | 1008 | |----------------| 1009 | | BlockGroup | 1010 | |----------------| 1011 | | EncryptedBlock | 1012 +--------------------------+ 1014 Representation of a Cluster Element and its immediate Child Elements. 1016 +----------------------------------+ 1017 | Block | Portion of | Data Type | 1018 | | a Block | - Bit Flag | 1019 | |--------------------------+ 1020 | | Header | TrackNumber | 1021 | | |-------------| 1022 | | | Timestamp | 1023 | | |-------------| 1024 | | | Flags | 1025 | | | - Gap | 1026 | | | - Lacing | 1027 | | | - Reserved | 1028 | |--------------------------| 1029 | | Optional | FrameSize | 1030 | |--------------------------| 1031 | | Data | Frame | 1032 +----------------------------------+ 1034 Representation of the Block Element structure. 1036 Each "Cluster" MUST contain exactly one "Timestamp Element". The 1037 "Timestamp Element" value MUST be stored once per "Cluster". The 1038 "Timestamp Element" in the "Cluster" is relative to the entire 1039 "Segment". The "Timestamp Element" SHOULD be the first "Element" in 1040 the "Cluster". 1042 Additionally, the "Block" contains an offset that, when added to the 1043 "Cluster"'s "Timestamp Element" value, yields the "Block"'s effective 1044 timestamp. Therefore, timestamp in the "Block" itself is relative to 1045 the "Timestamp Element" in the "Cluster". For example, if the 1046 "Timestamp Element" in the "Cluster" is set to 10 seconds and a 1047 "Block" in that "Cluster" is supposed to be played 12 seconds into 1048 the clip, the timestamp in the "Block" would be set to 2 seconds. 1050 The "ReferenceBlock" in the "BlockGroup" is used instead of the basic 1051 "P-frame"/"B-frame" description. Instead of simply saying that this 1052 "Block" depends on the "Block" directly before, or directly 1053 afterwards, the "Timestamp" of the necessary "Block" is used. 1054 Because there can be as many "ReferenceBlock Elements" as necessary 1055 for a "Block", it allows for some extremely complex referencing. 1057 The "Cues Element" is used to seek when playing back a file by 1058 providing a temporal index for some of the "Tracks". It is similar 1059 to the "SeekHead Element", but used for seeking to a specific time 1060 when playing back the file. It is possible to seek without this 1061 element, but it is much more difficult because a "Matroska Reader" 1062 would have to 'hunt and peck' through the file looking for the 1063 correct timestamp. 1065 The "Cues Element" SHOULD contain at least one "CuePoint Element". 1066 Each "CuePoint Element" stores the position of the "Cluster" that 1067 contains the "BlockGroup" or "SimpleBlock Element". The timestamp is 1068 stored in the "CueTime Element" and location is stored in the 1069 "CueTrackPositions Element". 1071 The "Cues Element" is flexible. For instance, "Cues Element" can be 1072 used to index every single timestamp of every "Block" or they can be 1073 indexed selectively. For video files, it is RECOMMENDED to index at 1074 least the keyframes of the video track. 1076 +-------------------------------------+ 1077 | Cues | CuePoint | CueTime | 1078 | | |-------------------| 1079 | | | CueTrackPositions | 1080 | |------------------------------| 1081 | | CuePoint | CueTime | 1082 | | |-------------------| 1083 | | | CueTrackPositions | 1084 +-------------------------------------+ 1086 Representation of a Cues Element and two levels of its Descendant 1087 Elements. 1089 The "Attachments Element" is for attaching files to a Matroska file 1090 such as pictures, webpages, programs, or even the codec needed to 1091 play back the file. 1093 +------------------------------------------------+ 1094 | Attachments | AttachedFile | FileDescription | 1095 | | |-------------------| 1096 | | | FileName | 1097 | | |-------------------| 1098 | | | FileMimeType | 1099 | | |-------------------| 1100 | | | FileData | 1101 | | |-------------------| 1102 | | | FileUID | 1103 | | |-------------------| 1104 | | | FileName | 1105 | | |-------------------| 1106 | | | FileReferral | 1107 | | |-------------------| 1108 | | | FileUsedStartTime | 1109 | | |-------------------| 1110 | | | FileUsedEndTime | 1111 +------------------------------------------------+ 1113 Representation of a Attachments Element. 1115 The "Tags Element" contains metadata that describes the "Segment" and 1116 potentially its "Tracks", "Chapters", and "Attachments". Each 1117 "Track" or "Chapter" that those tags applies to has its UID listed in 1118 the "Tags". The "Tags" contain all extra information about the file: 1119 scriptwriter, singer, actors, directors, titles, edition, price, 1120 dates, genre, comments, etc. Tags can contain their values in 1121 multiple languages. For example, a movie's "title" "Tag" might 1122 contain both the original English title as well as the title it was 1123 released as in Germany. 1125 +-------------------------------------------+ 1126 | Tags | Tag | Targets | TargetTypeValue | 1127 | | | |------------------| 1128 | | | | TargetType | 1129 | | | |------------------| 1130 | | | | TagTrackUID | 1131 | | | |------------------| 1132 | | | | TagEditionUID | 1133 | | | |------------------| 1134 | | | | TagChapterUID | 1135 | | | |------------------| 1136 | | | | TagAttachmentUID | 1137 | | |------------------------------| 1138 | | | SimpleTag | TagName | 1139 | | | |------------------| 1140 | | | | TagLanguage | 1141 | | | |------------------| 1142 | | | | TagDefault | 1143 | | | |------------------| 1144 | | | | TagString | 1145 | | | |------------------| 1146 | | | | TagBinary | 1147 | | | |------------------| 1148 | | | | SimpleTag | 1149 +-------------------------------------------+ 1151 Representation of a Tags Element and three levels of its Children 1152 Elements. 1154 8. Matroska Additions to Schema Element Attributes 1156 In addition to the EBML Schema definition provided by the EBML 1157 Specification, Matroska adds the following additional attributes: 1159 +-----------+----------+--------------------------------------------+ 1160 | attribute | required | definition | 1161 | name | | | 1162 +-----------+----------+--------------------------------------------+ 1163 | webm | No | A boolean to express if the Matroska | 1164 | | | Element is also supported within version 2 | 1165 | | | of the "webm" specification. Please | 1166 | | | consider the webm specification [16] as | 1167 | | | the authoritative on "webm". | 1168 +-----------+----------+--------------------------------------------+ 1170 9. Matroska Schema 1172 This specification includes an "EBML Schema" which defines the 1173 Elements and structure of Matroska as an EBML Document Type. The 1174 EBML Schema defines every valid Matroska element in a manner defined 1175 by the EBML specification. 1177 Here the definition of each Matroska Element is provided. 1179 9.1. EBMLMaxIDLength Element 1181 name: "EBMLMaxIDLength" 1183 path: "1*1(\EBML\EBMLMaxIDLength)" 1185 id: "0x42F2" 1187 minOccurs: "1" 1189 maxOccurs: "1" 1191 range: "4" 1193 default: "4" 1195 type: "uinteger" 1197 9.2. EBMLMaxSizeLength Element 1199 name: "EBMLMaxSizeLength" 1201 path: "1*1(\EBML\EBMLMaxSizeLength)" 1203 id: "0x42F3" 1205 minOccurs: "1" 1207 maxOccurs: "1" 1209 range: "1-8" 1211 default: "8" 1213 type: "uinteger" 1215 9.3. Segment Element 1217 name: "Segment" 1219 path: "1*1(\Segment)" 1221 id: "0x18538067" 1223 minOccurs: "1" 1225 maxOccurs: "1" 1227 type: "master" 1229 unknownsizeallowed: "1" 1231 minver: "1" 1233 documentation: The Root Element that contains all other Top-Level 1234 Elements (Elements defined only at Level 1). A Matroska file is 1235 composed of 1 Segment. 1237 9.3.1. SeekHead Element 1239 name: "SeekHead" 1241 path: "0*2(\Segment\SeekHead)" 1243 id: "0x114D9B74" 1245 maxOccurs: "2" 1247 type: "master" 1249 minver: "1" 1251 documentation: Contains the Segment Position of other Top-Level 1252 Elements. 1254 9.3.1.1. Seek Element 1256 name: "Seek" 1258 path: "1*(\Segment\SeekHead\Seek)" 1260 id: "0x4DBB" 1262 minOccurs: "1" 1263 type: "master" 1265 minver: "1" 1267 documentation: Contains a single seek entry to an EBML Element. 1269 9.3.1.1.1. SeekID Element 1271 name: "SeekID" 1273 path: "1*1(\Segment\SeekHead\Seek\SeekID)" 1275 id: "0x53AB" 1277 minOccurs: "1" 1279 maxOccurs: "1" 1281 type: "binary" 1283 minver: "1" 1285 documentation: The binary ID corresponding to the Element name. 1287 9.3.1.1.2. SeekPosition Element 1289 name: "SeekPosition" 1291 path: "1*1(\Segment\SeekHead\Seek\SeekPosition)" 1293 id: "0x53AC" 1295 minOccurs: "1" 1297 maxOccurs: "1" 1299 type: "uinteger" 1301 minver: "1" 1303 documentation: The Segment Position of the Element. 1305 9.3.2. Info Element 1307 name: "Info" 1309 path: "1*(\Segment\Info)" 1310 id: "0x1549A966" 1312 minOccurs: "1" 1314 type: "master" 1316 recurring: "1" 1318 minver: "1" 1320 definition: Contains general information about the Segment. 1322 9.3.2.1. SegmentUID Element 1324 name: "SegmentUID" 1326 path: "0*1(\Segment\Info\SegmentUID)" 1328 id: "0x73A4" 1330 maxOccurs: "1" 1332 range: "not 0" 1334 size: "16" 1336 type: "binary" 1338 minver: "1" 1340 definition: A randomly generated unique ID to identify the Segment 1341 amongst many others (128 bits). 1343 usage notes: If the Segment is a part of a Linked Segment then this 1344 Element is REQUIRED. 1346 9.3.2.2. SegmentFilename Element 1348 name: "SegmentFilename" 1350 path: "0*1(\Segment\Info\SegmentFilename)" 1352 id: "0x7384" 1354 maxOccurs: "1" 1356 type: "utf-8" 1357 minver: "1" 1359 definition: A filename corresponding to this Segment. 1361 9.3.2.3. PrevUID Element 1363 name: "PrevUID" 1365 path: "0*1(\Segment\Info\PrevUID)" 1367 id: "0x3CB923" 1369 maxOccurs: "1" 1371 size: "16" 1373 type: "binary" 1375 minver: "1" 1377 definition: A unique ID to identify the previous Segment of a Linked 1378 Segment (128 bits). 1380 usage notes: If the Segment is a part of a Linked Segment that uses 1381 Hard Linking then either the PrevUID or the NextUID Element is 1382 REQUIRED. If a Segment contains a PrevUID but not a NextUID then it 1383 MAY be considered as the last Segment of the Linked Segment. The 1384 PrevUID MUST NOT be equal to the SegmentUID. 1386 9.3.2.4. PrevFilename Element 1388 name: "PrevFilename" 1390 path: "0*1(\Segment\Info\PrevFilename)" 1392 id: "0x3C83AB" 1394 maxOccurs: "1" 1396 type: "utf-8" 1398 minver: "1" 1400 definition: A filename corresponding to the file of the previous 1401 Linked Segment. 1403 usage notes: Provision of the previous filename is for display 1404 convenience, but PrevUID SHOULD be considered authoritative for 1405 identifying the previous Segment in a Linked Segment. 1407 9.3.2.5. NextUID Element 1409 name: "NextUID" 1411 path: "0*1(\Segment\Info\NextUID)" 1413 id: "0x3EB923" 1415 maxOccurs: "1" 1417 size: "16" 1419 type: "binary" 1421 minver: "1" 1423 definition: A unique ID to identify the next Segment of a Linked 1424 Segment (128 bits). 1426 usage notes: If the Segment is a part of a Linked Segment that uses 1427 Hard Linking then either the PrevUID or the NextUID Element is 1428 REQUIRED. If a Segment contains a NextUID but not a PrevUID then it 1429 MAY be considered as the first Segment of the Linked Segment. The 1430 NextUID MUST NOT be equal to the SegmentUID. 1432 9.3.2.6. NextFilename Element 1434 name: "NextFilename" 1436 path: "0*1(\Segment\Info\NextFilename)" 1438 id: "0x3E83BB" 1440 maxOccurs: "1" 1442 type: "utf-8" 1444 minver: "1" 1446 definition: A filename corresponding to the file of the next Linked 1447 Segment. 1449 usage notes: Provision of the next filename is for display 1450 convenience, but NextUID SHOULD be considered authoritative for 1451 identifying the Next Segment. 1453 9.3.2.7. SegmentFamily Element 1455 name: "SegmentFamily" 1457 path: "0*(\Segment\Info\SegmentFamily)" 1459 id: "0x4444" 1461 size: "16" 1463 type: "binary" 1465 minver: "1" 1467 definition: A randomly generated unique ID that all Segments of a 1468 Linked Segment MUST share (128 bits). 1470 usage notes: If the Segment is a part of a Linked Segment that uses 1471 Soft Linking then this Element is REQUIRED. 1473 9.3.2.8. ChapterTranslate Element 1475 name: "ChapterTranslate" 1477 path: "0*(\Segment\Info\ChapterTranslate)" 1479 id: "0x6924" 1481 type: "master" 1483 minver: "1" 1485 documentation: A tuple of corresponding ID used by chapter codecs to 1486 represent this Segment. 1488 9.3.2.8.1. ChapterTranslateEditionUID Element 1490 name: "ChapterTranslateEditionUID" 1492 path: "0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)" 1494 id: "0x69FC" 1496 type: "uinteger" 1497 minver: "1" 1499 documentation: Specify an edition UID on which this correspondence 1500 applies. When not specified, it means for all editions found in the 1501 Segment. 1503 9.3.2.8.2. ChapterTranslateCodec Element 1505 name: "ChapterTranslateCodec" 1507 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)" 1509 id: "0x69BF" 1511 minOccurs: "1" 1513 maxOccurs: "1" 1515 type: "uinteger" 1517 minver: "1" 1519 documentation: The chapter codec 1521 restrictions: 1523 +-------+-----------------+ 1524 | value | label | 1525 +-------+-----------------+ 1526 | "0" | Matroska Script | 1527 | "1" | DVD-menu | 1528 +-------+-----------------+ 1530 9.3.2.8.3. ChapterTranslateID Element 1532 name: "ChapterTranslateID" 1534 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)" 1536 id: "0x69A5" 1538 minOccurs: "1" 1540 maxOccurs: "1" 1542 type: "binary" 1544 minver: "1" 1545 documentation: The binary value used to represent this Segment in the 1546 chapter codec data. The format depends on the ChapProcessCodecID 1547 used. 1549 9.3.2.9. TimestampScale Element 1551 name: "TimestampScale" 1553 path: "1*1(\Segment\Info\TimestampScale)" 1555 id: "0x2AD7B1" 1557 minOccurs: "1" 1559 maxOccurs: "1" 1561 range: "not 0" 1563 default: "1000000" 1565 type: "uinteger" 1567 minver: "1" 1569 documentation: Timestamp scale in nanoseconds (1.000.000 means all 1570 timestamps in the Segment are expressed in milliseconds). 1572 9.3.2.10. Duration Element 1574 name: "Duration" 1576 path: "0*1(\Segment\Info\Duration)" 1578 id: "0x4489" 1580 maxOccurs: "1" 1582 range: "> 0x0p+0" 1584 type: "float" 1586 minver: "1" 1588 definition: Duration of the Segment in nanoseconds based on 1589 TimestampScale. 1591 9.3.2.11. DateUTC Element 1593 name: "DateUTC" 1595 path: "0*1(\Segment\Info\DateUTC)" 1597 id: "0x4461" 1599 maxOccurs: "1" 1601 type: "date" 1603 minver: "1" 1605 documentation: The date and time that the Segment was created by the 1606 muxing application or library. 1608 9.3.2.12. Title Element 1610 name: "Title" 1612 path: "0*1(\Segment\Info\Title)" 1614 id: "0x7BA9" 1616 maxOccurs: "1" 1618 type: "utf-8" 1620 minver: "1" 1622 documentation: General name of the Segment. 1624 9.3.2.13. MuxingApp Element 1626 name: "MuxingApp" 1628 path: "1*1(\Segment\Info\MuxingApp)" 1630 id: "0x4D80" 1632 minOccurs: "1" 1634 maxOccurs: "1" 1636 type: "utf-8" 1638 minver: "1" 1639 definition: Muxing application or library (example: "libmatroska- 1640 0.4.3"). 1642 usage notes: Include the full name of the application or library 1643 followed by the version number. 1645 9.3.2.14. WritingApp Element 1647 name: "WritingApp" 1649 path: "1*1(\Segment\Info\WritingApp)" 1651 id: "0x5741" 1653 minOccurs: "1" 1655 maxOccurs: "1" 1657 type: "utf-8" 1659 minver: "1" 1661 definition: Writing application (example: "mkvmerge-0.3.3"). 1663 usage notes: Include the full name of the application followed by the 1664 version number. 1666 9.3.3. Cluster Element 1668 name: "Cluster" 1670 path: "0*(\Segment\Cluster)" 1672 id: "0x1F43B675" 1674 type: "master" 1676 unknownsizeallowed: "1" 1678 minver: "1" 1680 documentation: The Top-Level Element containing the (monolithic) 1681 Block structure. 1683 9.3.3.1. Timestamp Element 1685 name: "Timestamp" 1687 path: "1*1(\Segment\Cluster\Timestamp)" 1689 id: "0xE7" 1691 minOccurs: "1" 1693 maxOccurs: "1" 1695 type: "uinteger" 1697 minver: "1" 1699 documentation: Absolute timestamp of the cluster (based on 1700 TimestampScale). 1702 9.3.3.2. SilentTracks Element 1704 name: "SilentTracks" 1706 path: "0*1(\Segment\Cluster\SilentTracks)" 1708 id: "0x5854" 1710 maxOccurs: "1" 1712 type: "master" 1714 minver: "1" 1716 documentation: The list of tracks that are not used in that part of 1717 the stream. It is useful when using overlay tracks on seeking or to 1718 decide what track to use. 1720 9.3.3.2.1. SilentTrackNumber Element 1722 name: "SilentTrackNumber" 1724 path: "0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)" 1726 id: "0x58D7" 1728 type: "uinteger" 1730 minver: "1" 1731 documentation: One of the track number that are not used from now on 1732 in the stream. It could change later if not specified as silent in a 1733 further Cluster. 1735 9.3.3.3. Position Element 1737 name: "Position" 1739 path: "0*1(\Segment\Cluster\Position)" 1741 id: "0xA7" 1743 maxOccurs: "1" 1745 type: "uinteger" 1747 minver: "1" 1749 documentation: The Segment Position of the Cluster in the Segment (0 1750 in live streams). It might help to resynchronise offset on damaged 1751 streams. 1753 9.3.3.4. PrevSize Element 1755 name: "PrevSize" 1757 path: "0*1(\Segment\Cluster\PrevSize)" 1759 id: "0xAB" 1761 maxOccurs: "1" 1763 type: "uinteger" 1765 minver: "1" 1767 documentation: Size of the previous Cluster, in octets. Can be 1768 useful for backward playing. 1770 9.3.3.5. SimpleBlock Element 1772 name: "SimpleBlock" 1774 path: "0*(\Segment\Cluster\SimpleBlock)" 1776 id: "0xA3" 1778 type: "binary" 1779 minver: "2" 1781 documentation: Similar to Block but without all the extra 1782 information, mostly used to reduced overhead when no extra feature is 1783 needed. (see SimpleBlock Structure) 1785 9.3.3.6. BlockGroup Element 1787 name: "BlockGroup" 1789 path: "0*(\Segment\Cluster\BlockGroup)" 1791 id: "0xA0" 1793 type: "master" 1795 minver: "1" 1797 documentation: Basic container of information containing a single 1798 Block and information specific to that Block. 1800 9.3.3.6.1. Block Element 1802 name: "Block" 1804 path: "1*1(\Segment\Cluster\BlockGroup\Block)" 1806 id: "0xA1" 1808 minOccurs: "1" 1810 maxOccurs: "1" 1812 type: "binary" 1814 minver: "1" 1816 documentation: Block containing the actual data to be rendered and a 1817 timestamp relative to the Cluster Timestamp. (see Block Structure) 1819 9.3.3.6.2. BlockVirtual Element 1821 name: "BlockVirtual" 1823 path: "0*1(\Segment\Cluster\BlockGroup\BlockVirtual)" 1825 id: "0xA2" 1826 maxOccurs: "1" 1828 type: "binary" 1830 minver: "0" 1832 maxver: "0" 1834 documentation: A Block with no data. It MUST be stored in the stream 1835 at the place the real Block would be in display order. (see Block 1836 Virtual) 1838 9.3.3.6.3. BlockAdditions Element 1840 name: "BlockAdditions" 1842 path: "0*1(\Segment\Cluster\BlockGroup\BlockAdditions)" 1844 id: "0x75A1" 1846 maxOccurs: "1" 1848 type: "master" 1850 minver: "1" 1852 documentation: Contain additional blocks to complete the main one. 1853 An EBML parser that has no knowledge of the Block structure could 1854 still see and use/skip these data. 1856 9.3.3.6.3.1. BlockMore Element 1858 name: "BlockMore" 1860 path: "1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)" 1862 id: "0xA6" 1864 minOccurs: "1" 1866 type: "master" 1868 minver: "1" 1870 documentation: Contain the BlockAdditional and some parameters. 1872 9.3.3.6.3.2. BlockAddID Element 1874 name: "BlockAddID" 1876 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1877 AddID)" 1879 id: "0xEE" 1881 minOccurs: "1" 1883 maxOccurs: "1" 1885 range: "not 0" 1887 default: "1" 1889 type: "uinteger" 1891 minver: "1" 1893 documentation: An ID to identify the BlockAdditional level. 1895 9.3.3.6.3.3. BlockAdditional Element 1897 name: "BlockAdditional" 1899 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1900 Additional)" 1902 id: "0xA5" 1904 minOccurs: "1" 1906 maxOccurs: "1" 1908 type: "binary" 1910 minver: "1" 1912 documentation: Interpreted by the codec as it wishes (using the 1913 BlockAddID). 1915 9.3.3.6.4. BlockDuration Element 1917 name: "BlockDuration" 1919 path: "0*1(\Segment\Cluster\BlockGroup\BlockDuration)" 1920 id: "0x9B" 1922 maxOccurs: "1" 1924 default: "DefaultDuration" 1926 type: "uinteger" 1928 minver: "1" 1930 documentation: The duration of the Block (based on TimestampScale). 1931 This Element is mandatory when DefaultDuration is set for the track 1932 (but can be omitted as other default values). When not written and 1933 with no DefaultDuration, the value is assumed to be the difference 1934 between the timestamp of this Block and the timestamp of the next 1935 Block in "display" order (not coding order). This Element can be 1936 useful at the end of a Track (as there is not other Block available), 1937 or when there is a break in a track like for subtitle tracks. 1939 9.3.3.6.5. ReferencePriority Element 1941 name: "ReferencePriority" 1943 path: "1*1(\Segment\Cluster\BlockGroup\ReferencePriority)" 1945 id: "0xFA" 1947 minOccurs: "1" 1949 maxOccurs: "1" 1951 default: "0" 1953 type: "uinteger" 1955 minver: "1" 1957 documentation: This frame is referenced and has the specified cache 1958 priority. In cache only a frame of the same or higher priority can 1959 replace this frame. A value of 0 means the frame is not referenced. 1961 9.3.3.6.6. ReferenceBlock Element 1963 name: "ReferenceBlock" 1965 path: "0*(\Segment\Cluster\BlockGroup\ReferenceBlock)" 1967 id: "0xFB" 1968 type: "integer" 1970 minver: "1" 1972 documentation: Timestamp of another frame used as a reference (ie: B 1973 or P frame). The timestamp is relative to the block it's attached 1974 to. 1976 9.3.3.6.7. ReferenceVirtual Element 1978 name: "ReferenceVirtual" 1980 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)" 1982 id: "0xFD" 1984 maxOccurs: "1" 1986 type: "integer" 1988 minver: "0" 1990 maxver: "0" 1992 documentation: The Segment Position of the data that would otherwise 1993 be in position of the virtual block. 1995 9.3.3.6.8. CodecState Element 1997 name: "CodecState" 1999 path: "0*1(\Segment\Cluster\BlockGroup\CodecState)" 2001 id: "0xA4" 2003 maxOccurs: "1" 2005 type: "binary" 2007 minver: "2" 2009 documentation: The new codec state to use. Data interpretation is 2010 private to the codec. This information SHOULD always be referenced 2011 by a seek entry. 2013 9.3.3.6.9. DiscardPadding Element 2015 name: "DiscardPadding" 2017 path: "0*1(\Segment\Cluster\BlockGroup\DiscardPadding)" 2019 id: "0x75A2" 2021 maxOccurs: "1" 2023 type: "integer" 2025 minver: "4" 2027 documentation: Duration in nanoseconds of the silent data added to 2028 the Block (padding at the end of the Block for positive value, at the 2029 beginning of the Block for negative value). The duration of 2030 DiscardPadding is not calculated in the duration of the TrackEntry 2031 and SHOULD be discarded during playback. 2033 9.3.3.6.10. Slices Element 2035 name: "Slices" 2037 path: "0*1(\Segment\Cluster\BlockGroup\Slices)" 2039 id: "0x8E" 2041 maxOccurs: "1" 2043 type: "master" 2045 minver: "1" 2047 documentation: Contains slices description. 2049 9.3.3.6.10.1. TimeSlice Element 2051 name: "TimeSlice" 2053 path: "0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)" 2055 id: "0xE8" 2057 type: "master" 2059 minver: "1" 2060 maxver: "1" 2062 documentation: Contains extra time information about the data 2063 contained in the Block. Being able to interpret this Element is not 2064 REQUIRED for playback. 2066 9.3.3.6.10.2. LaceNumber Element 2068 name: "LaceNumber" 2070 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)" 2072 id: "0xCC" 2074 maxOccurs: "1" 2076 default: "0" 2078 type: "uinteger" 2080 minver: "1" 2082 maxver: "1" 2084 documentation: The reverse number of the frame in the lace (0 is the 2085 last frame, 1 is the next to last, etc). Being able to interpret 2086 this Element is not REQUIRED for playback. 2088 9.3.3.6.10.3. FrameNumber Element 2090 name: "FrameNumber" 2092 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)" 2094 id: "0xCD" 2096 maxOccurs: "1" 2098 default: "0" 2100 type: "uinteger" 2102 minver: "0" 2104 maxver: "0" 2105 documentation: The number of the frame to generate from this lace 2106 with this delay (allow you to generate many frames from the same 2107 Block/Frame). 2109 9.3.3.6.10.4. BlockAdditionID Element 2111 name: "BlockAdditionID" 2113 path: 2114 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)" 2116 id: "0xCB" 2118 maxOccurs: "1" 2120 default: "0" 2122 type: "uinteger" 2124 minver: "0" 2126 maxver: "0" 2128 documentation: The ID of the BlockAdditional Element (0 is the main 2129 Block). 2131 9.3.3.6.10.5. Delay Element 2133 name: "Delay" 2135 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)" 2137 id: "0xCE" 2139 maxOccurs: "1" 2141 default: "0" 2143 type: "uinteger" 2145 minver: "0" 2147 maxver: "0" 2149 documentation: The (scaled) delay to apply to the Element. 2151 9.3.3.6.10.6. SliceDuration Element 2153 name: "SliceDuration" 2155 path: 2156 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)" 2158 id: "0xCF" 2160 maxOccurs: "1" 2162 default: "0" 2164 type: "uinteger" 2166 minver: "0" 2168 maxver: "0" 2170 documentation: The (scaled) duration to apply to the Element. 2172 9.3.3.6.11. ReferenceFrame Element 2174 name: "ReferenceFrame" 2176 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)" 2178 id: "0xC8" 2180 maxOccurs: "1" 2182 type: "master" 2184 minver: "0" 2186 maxver: "0" 2188 documentation: DivX trick track extensions 2190 9.3.3.6.11.1. ReferenceOffset Element 2192 name: "ReferenceOffset" 2194 path: 2195 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)" 2197 id: "0xC9" 2198 minOccurs: "1" 2200 maxOccurs: "1" 2202 type: "uinteger" 2204 minver: "0" 2206 maxver: "0" 2208 documentation: DivX trick track extensions 2210 9.3.3.6.11.2. ReferenceTimestamp Element 2212 name: "ReferenceTimestamp" 2214 path: 2215 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimestamp)" 2217 id: "0xCA" 2219 minOccurs: "1" 2221 maxOccurs: "1" 2223 type: "uinteger" 2225 minver: "0" 2227 maxver: "0" 2229 documentation: DivX trick track extensions 2231 9.3.3.7. EncryptedBlock Element 2233 name: "EncryptedBlock" 2235 path: "0*(\Segment\Cluster\EncryptedBlock)" 2237 id: "0xAF" 2239 type: "binary" 2241 minver: "0" 2243 maxver: "0" 2244 documentation: Similar to SimpleBlock but the data inside the Block 2245 are Transformed (encrypt and/or signed). (see EncryptedBlock 2246 Structure) 2248 9.3.4. Tracks Element 2250 name: "Tracks" 2252 path: "0*(\Segment\Tracks)" 2254 id: "0x1654AE6B" 2256 type: "master" 2258 recurring: "1" 2260 minver: "1" 2262 documentation: A Top-Level Element of information with many tracks 2263 described. 2265 9.3.4.1. TrackEntry Element 2267 name: "TrackEntry" 2269 path: "1*(\Segment\Tracks\TrackEntry)" 2271 id: "0xAE" 2273 minOccurs: "1" 2275 type: "master" 2277 minver: "1" 2279 documentation: Describes a track with all Elements. 2281 9.3.4.1.1. TrackNumber Element 2283 name: "TrackNumber" 2285 path: "1*1(\Segment\Tracks\TrackEntry\TrackNumber)" 2287 id: "0xD7" 2289 minOccurs: "1" 2291 maxOccurs: "1" 2292 range: "not 0" 2294 type: "uinteger" 2296 minver: "1" 2298 documentation: The track number as used in the Block Header (using 2299 more than 127 tracks is not encouraged, though the design allows an 2300 unlimited number). 2302 9.3.4.1.2. TrackUID Element 2304 name: "TrackUID" 2306 path: "1*1(\Segment\Tracks\TrackEntry\TrackUID)" 2308 id: "0x73C5" 2310 minOccurs: "1" 2312 maxOccurs: "1" 2314 range: "not 0" 2316 type: "uinteger" 2318 minver: "1" 2320 documentation: A unique ID to identify the Track. This SHOULD be 2321 kept the same when making a direct stream copy of the Track to 2322 another file. 2324 9.3.4.1.3. TrackType Element 2326 name: "TrackType" 2328 path: "1*1(\Segment\Tracks\TrackEntry\TrackType)" 2330 id: "0x83" 2332 minOccurs: "1" 2334 maxOccurs: "1" 2336 range: "1-254" 2338 type: "uinteger" 2339 minver: "1" 2341 documentation: A set of track types coded on 8 bits. 2343 restrictions: 2345 +-------+----------+ 2346 | value | label | 2347 +-------+----------+ 2348 | "1" | video | 2349 | "2" | audio | 2350 | "3" | complex | 2351 | "16" | logo | 2352 | "17" | subtitle | 2353 | "18" | buttons | 2354 | "32" | control | 2355 +-------+----------+ 2357 9.3.4.1.4. FlagEnabled Element 2359 name: "FlagEnabled" 2361 path: "1*1(\Segment\Tracks\TrackEntry\FlagEnabled)" 2363 id: "0xB9" 2365 minOccurs: "1" 2367 maxOccurs: "1" 2369 range: "0-1" 2371 default: "1" 2373 type: "uinteger" 2375 minver: "2" 2377 documentation: Set if the track is usable. (1 bit) 2379 9.3.4.1.5. FlagDefault Element 2381 name: "FlagDefault" 2383 path: "1*1(\Segment\Tracks\TrackEntry\FlagDefault)" 2385 id: "0x88" 2386 minOccurs: "1" 2388 maxOccurs: "1" 2390 range: "0-1" 2392 default: "1" 2394 type: "uinteger" 2396 minver: "1" 2398 documentation: Set if that track (audio, video or subs) SHOULD be 2399 active if no language found matches the user preference. (1 bit) 2401 9.3.4.1.6. FlagForced Element 2403 name: "FlagForced" 2405 path: "1*1(\Segment\Tracks\TrackEntry\FlagForced)" 2407 id: "0x55AA" 2409 minOccurs: "1" 2411 maxOccurs: "1" 2413 range: "0-1" 2415 default: "0" 2417 type: "uinteger" 2419 minver: "1" 2421 documentation: Set if that track MUST be active during playback. 2422 There can be many forced track for a kind (audio, video or subs), the 2423 player SHOULD select the one which language matches the user 2424 preference or the default + forced track. Overlay MAY happen between 2425 a forced and non-forced track of the same kind. (1 bit) 2427 9.3.4.1.7. FlagLacing Element 2429 name: "FlagLacing" 2431 path: "1*1(\Segment\Tracks\TrackEntry\FlagLacing)" 2433 id: "0x9C" 2434 minOccurs: "1" 2436 maxOccurs: "1" 2438 range: "0-1" 2440 default: "1" 2442 type: "uinteger" 2444 minver: "1" 2446 documentation: Set if the track MAY contain blocks using lacing. (1 2447 bit) 2449 9.3.4.1.8. MinCache Element 2451 name: "MinCache" 2453 path: "1*1(\Segment\Tracks\TrackEntry\MinCache)" 2455 id: "0x6DE7" 2457 minOccurs: "1" 2459 maxOccurs: "1" 2461 default: "0" 2463 type: "uinteger" 2465 minver: "1" 2467 documentation: The minimum number of frames a player SHOULD be able 2468 to cache during playback. If set to 0, the reference pseudo-cache 2469 system is not used. 2471 9.3.4.1.9. MaxCache Element 2473 name: "MaxCache" 2475 path: "0*1(\Segment\Tracks\TrackEntry\MaxCache)" 2477 id: "0x6DF8" 2479 maxOccurs: "1" 2481 type: "uinteger" 2482 minver: "1" 2484 documentation: The maximum cache size necessary to store referenced 2485 frames in and the current frame. 0 means no cache is needed. 2487 9.3.4.1.10. DefaultDuration Element 2489 name: "DefaultDuration" 2491 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDuration)" 2493 id: "0x23E383" 2495 maxOccurs: "1" 2497 range: "not 0" 2499 type: "uinteger" 2501 minver: "1" 2503 documentation: Number of nanoseconds (not scaled via TimestampScale) 2504 per frame ('frame' in the Matroska sense -- one Element put into a 2505 (Simple)Block). 2507 9.3.4.1.11. DefaultDecodedFieldDuration Element 2509 name: "DefaultDecodedFieldDuration" 2511 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)" 2513 id: "0x234E7A" 2515 maxOccurs: "1" 2517 range: "not 0" 2519 type: "uinteger" 2521 minver: "4" 2523 documentation: The period in nanoseconds (not scaled by 2524 TimestampScale) between two successive fields at the output of the 2525 decoding process (see the notes) 2527 9.3.4.1.12. TrackTimestampScale Element 2529 name: "TrackTimestampScale" 2531 path: "1*1(\Segment\Tracks\TrackEntry\TrackTimestampScale)" 2533 id: "0x23314F" 2535 minOccurs: "1" 2537 maxOccurs: "1" 2539 range: "> 0x0p+0" 2541 default: "0x1p+0" 2543 type: "float" 2545 minver: "1" 2547 maxver: "3" 2549 documentation: DEPRECATED, DO NOT USE. The scale to apply on this 2550 track to work at normal speed in relation with other tracks (mostly 2551 used to adjust video speed when the audio length differs). 2553 9.3.4.1.13. TrackOffset Element 2555 name: "TrackOffset" 2557 path: "0*1(\Segment\Tracks\TrackEntry\TrackOffset)" 2559 id: "0x537F" 2561 maxOccurs: "1" 2563 default: "0" 2565 type: "integer" 2567 minver: "0" 2569 maxver: "0" 2571 documentation: A value to add to the Block's Timestamp. This can be 2572 used to adjust the playback offset of a track. 2574 9.3.4.1.14. MaxBlockAdditionID Element 2576 name: "MaxBlockAdditionID" 2578 path: "1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)" 2580 id: "0x55EE" 2582 minOccurs: "1" 2584 maxOccurs: "1" 2586 default: "0" 2588 type: "uinteger" 2590 minver: "1" 2592 documentation: The maximum value of BlockAddID. A value 0 means 2593 there is no BlockAdditions for this track. 2595 9.3.4.1.15. Name Element 2597 name: "Name" 2599 path: "0*1(\Segment\Tracks\TrackEntry\Name)" 2601 id: "0x536E" 2603 maxOccurs: "1" 2605 type: "utf-8" 2607 minver: "1" 2609 documentation: A human-readable track name. 2611 9.3.4.1.16. Language Element 2613 name: "Language" 2615 path: "0*1(\Segment\Tracks\TrackEntry\Language)" 2617 id: "0x22B59C" 2619 maxOccurs: "1" 2621 default: "eng" 2622 type: "string" 2624 minver: "1" 2626 documentation: Specifies the language of the track in the Matroska 2627 languages form. This Element MUST be ignored if the LanguageIETF 2628 Element is used in the same TrackEntry. 2630 9.3.4.1.17. LanguageIETF Element 2632 name: "LanguageIETF" 2634 path: "0*1(\Segment\Tracks\TrackEntry\LanguageIETF)" 2636 id: "0x22B59D" 2638 maxOccurs: "1" 2640 type: "string" 2642 minver: "4" 2644 documentation: Specifies the language of the track according to BCP 2645 47 and using the IANA Language Subtag Registry. If this Element is 2646 used, then any Language Elements used in the same TrackEntry MUST be 2647 ignored. 2649 9.3.4.1.18. CodecID Element 2651 name: "CodecID" 2653 path: "1*1(\Segment\Tracks\TrackEntry\CodecID)" 2655 id: "0x86" 2657 minOccurs: "1" 2659 maxOccurs: "1" 2661 type: "string" 2663 minver: "1" 2665 documentation: An ID corresponding to the codec, see the codec page 2666 for more info. 2668 9.3.4.1.19. CodecPrivate Element 2670 name: "CodecPrivate" 2672 path: "0*1(\Segment\Tracks\TrackEntry\CodecPrivate)" 2674 id: "0x63A2" 2676 maxOccurs: "1" 2678 type: "binary" 2680 minver: "1" 2682 documentation: Private data only known to the codec. 2684 9.3.4.1.20. CodecName Element 2686 name: "CodecName" 2688 path: "0*1(\Segment\Tracks\TrackEntry\CodecName)" 2690 id: "0x258688" 2692 maxOccurs: "1" 2694 type: "utf-8" 2696 minver: "1" 2698 documentation: A human-readable string specifying the codec. 2700 9.3.4.1.21. AttachmentLink Element 2702 name: "AttachmentLink" 2704 path: "0*1(\Segment\Tracks\TrackEntry\AttachmentLink)" 2706 id: "0x7446" 2708 maxOccurs: "1" 2710 range: "not 0" 2712 type: "uinteger" 2714 minver: "1" 2715 maxver: "3" 2717 documentation: The UID of an attachment that is used by this codec. 2719 9.3.4.1.22. CodecSettings Element 2721 name: "CodecSettings" 2723 path: "0*1(\Segment\Tracks\TrackEntry\CodecSettings)" 2725 id: "0x3A9697" 2727 maxOccurs: "1" 2729 type: "utf-8" 2731 minver: "0" 2733 maxver: "0" 2735 documentation: A string describing the encoding setting used. 2737 9.3.4.1.23. CodecInfoURL Element 2739 name: "CodecInfoURL" 2741 path: "0*(\Segment\Tracks\TrackEntry\CodecInfoURL)" 2743 id: "0x3B4040" 2745 type: "string" 2747 minver: "0" 2749 maxver: "0" 2751 documentation: A URL to find information about the codec used. 2753 9.3.4.1.24. CodecDownloadURL Element 2755 name: "CodecDownloadURL" 2757 path: "0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)" 2759 id: "0x26B240" 2761 type: "string" 2762 minver: "0" 2764 maxver: "0" 2766 documentation: A URL to download about the codec used. 2768 9.3.4.1.25. CodecDecodeAll Element 2770 name: "CodecDecodeAll" 2772 path: "1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)" 2774 id: "0xAA" 2776 minOccurs: "1" 2778 maxOccurs: "1" 2780 range: "0-1" 2782 default: "1" 2784 type: "uinteger" 2786 minver: "2" 2788 documentation: The codec can decode potentially damaged data (1 bit). 2790 9.3.4.1.26. TrackOverlay Element 2792 name: "TrackOverlay" 2794 path: "0*(\Segment\Tracks\TrackEntry\TrackOverlay)" 2796 id: "0x6FAB" 2798 type: "uinteger" 2800 minver: "1" 2802 documentation: Specify that this track is an overlay track for the 2803 Track specified (in the u-integer). That means when this track has a 2804 gap (see SilentTracks) the overlay track SHOULD be used instead. The 2805 order of multiple TrackOverlay matters, the first one is the one that 2806 SHOULD be used. If not found it SHOULD be the second, etc. 2808 9.3.4.1.27. CodecDelay Element 2810 name: "CodecDelay" 2812 path: "0*1(\Segment\Tracks\TrackEntry\CodecDelay)" 2814 id: "0x56AA" 2816 maxOccurs: "1" 2818 default: "0" 2820 type: "uinteger" 2822 minver: "4" 2824 documentation: CodecDelay is The codec-built-in delay in nanoseconds. 2825 This value MUST be subtracted from each block timestamp in order to 2826 get the actual timestamp. The value SHOULD be small so the muxing of 2827 tracks with the same actual timestamp are in the same Cluster. 2829 9.3.4.1.28. SeekPreRoll Element 2831 name: "SeekPreRoll" 2833 path: "1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)" 2835 id: "0x56BB" 2837 minOccurs: "1" 2839 maxOccurs: "1" 2841 default: "0" 2843 type: "uinteger" 2845 minver: "4" 2847 documentation: After a discontinuity, SeekPreRoll is the duration in 2848 nanoseconds of the data the decoder MUST decode before the decoded 2849 data is valid. 2851 9.3.4.1.29. TrackTranslate Element 2853 name: "TrackTranslate" 2855 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate)" 2856 id: "0x6624" 2858 type: "master" 2860 minver: "1" 2862 documentation: The track identification for the given Chapter Codec. 2864 9.3.4.1.29.1. TrackTranslateEditionUID Element 2866 name: "TrackTranslateEditionUID" 2868 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEdi 2869 tionUID)" 2871 id: "0x66FC" 2873 type: "uinteger" 2875 minver: "1" 2877 documentation: Specify an edition UID on which this translation 2878 applies. When not specified, it means for all editions found in the 2879 Segment. 2881 9.3.4.1.29.2. TrackTranslateCodec Element 2883 name: "TrackTranslateCodec" 2885 path: 2886 "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)" 2888 id: "0x66BF" 2890 minOccurs: "1" 2892 maxOccurs: "1" 2894 type: "uinteger" 2896 minver: "1" 2898 documentation: The chapter codec. 2900 restrictions: 2902 +-------+-----------------+ 2903 | value | label | 2904 +-------+-----------------+ 2905 | "0" | Matroska Script | 2906 | "1" | DVD-menu | 2907 +-------+-----------------+ 2909 9.3.4.1.29.3. TrackTranslateTrackID Element 2911 name: "TrackTranslateTrackID" 2913 path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTr 2914 ackID)" 2916 id: "0x66A5" 2918 minOccurs: "1" 2920 maxOccurs: "1" 2922 type: "binary" 2924 minver: "1" 2926 documentation: The binary value used to represent this track in the 2927 chapter codec data. The format depends on the ChapProcessCodecID 2928 used. 2930 9.3.4.1.30. Video Element 2932 name: "Video" 2934 path: "0*1(\Segment\Tracks\TrackEntry\Video)" 2936 id: "0xE0" 2938 maxOccurs: "1" 2940 type: "master" 2942 minver: "1" 2944 documentation: Video settings. 2946 9.3.4.1.30.1. FlagInterlaced Element 2948 name: "FlagInterlaced" 2950 path: "1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)" 2952 id: "0x9A" 2954 minOccurs: "1" 2956 maxOccurs: "1" 2958 range: "0-2" 2960 default: "0" 2962 type: "uinteger" 2964 minver: "2" 2966 documentation: A flag to declare if the video is known to be 2967 progressive or interlaced and if applicable to declare details about 2968 the interlacement. 2970 restrictions: 2972 +-------+--------------+ 2973 | value | label | 2974 +-------+--------------+ 2975 | "0" | undetermined | 2976 | "1" | interlaced | 2977 | "2" | progressive | 2978 +-------+--------------+ 2980 9.3.4.1.30.2. FieldOrder Element 2982 name: "FieldOrder" 2984 path: "1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)" 2986 id: "0x9D" 2988 minOccurs: "1" 2990 maxOccurs: "1" 2992 range: "0-14" 2993 default: "2" 2995 type: "uinteger" 2997 minver: "4" 2999 documentation: Declare the field ordering of the video. If 3000 FlagInterlaced is not set to 1, this Element MUST be ignored. 3002 restrictions: 3004 +-------+--------------+--------------------------------------------+ 3005 | value | label | documentation | 3006 +-------+--------------+--------------------------------------------+ 3007 | "0" | progressive | | 3008 | "1" | tff | Top field displayed first. Top field | 3009 | | | stored first. | 3010 | "2" | undetermined | | 3011 | "6" | bff | Bottom field displayed first. Bottom field | 3012 | | | stored first. | 3013 | "9" | bff(swapped) | Top field displayed first. Fields are | 3014 | | | interleaved in storage with the top line | 3015 | | | of the top field stored first. | 3016 | "14" | tff(swapped) | Bottom field displayed first. Fields are | 3017 | | | interleaved in storage with the top line | 3018 | | | of the top field stored first. | 3019 +-------+--------------+--------------------------------------------+ 3021 9.3.4.1.30.3. StereoMode Element 3023 name: "StereoMode" 3025 path: "0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)" 3027 id: "0x53B8" 3029 maxOccurs: "1" 3031 default: "0" 3033 type: "uinteger" 3035 minver: "3" 3037 documentation: Stereo-3D video mode. There are some more details on 3038 3D support in the Specification Notes. 3040 restrictions: 3042 +-------+---------------------------------------------------+ 3043 | value | label | 3044 +-------+---------------------------------------------------+ 3045 | "0" | mono | 3046 | "1" | side by side (left eye first) | 3047 | "2" | top - bottom (right eye is first) | 3048 | "3" | top - bottom (left eye is first) | 3049 | "4" | checkboard (right eye is first) | 3050 | "5" | checkboard (left eye is first) | 3051 | "6" | row interleaved (right eye is first) | 3052 | "7" | row interleaved (left eye is first) | 3053 | "8" | column interleaved (right eye is first) | 3054 | "9" | column interleaved (left eye is first) | 3055 | "10" | anaglyph (cyan/red) | 3056 | "11" | side by side (right eye first) | 3057 | "12" | anaglyph (green/magenta) | 3058 | "13" | both eyes laced in one Block (left eye is first) | 3059 | "14" | both eyes laced in one Block (right eye is first) | 3060 +-------+---------------------------------------------------+ 3062 9.3.4.1.30.4. AlphaMode Element 3064 name: "AlphaMode" 3066 path: "0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)" 3068 id: "0x53C0" 3070 maxOccurs: "1" 3072 default: "0" 3074 type: "uinteger" 3076 minver: "3" 3078 documentation: Alpha Video Mode. Presence of this Element indicates 3079 that the BlockAdditional Element could contain Alpha data. 3081 9.3.4.1.30.5. OldStereoMode Element 3083 name: "OldStereoMode" 3085 path: "0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)" 3087 id: "0x53B9" 3089 maxOccurs: "1" 3090 type: "uinteger" 3092 maxver: "0" 3094 documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used 3095 in old versions of libmatroska. 3097 restrictions: 3099 +-------+-----------+ 3100 | value | label | 3101 +-------+-----------+ 3102 | "0" | mono | 3103 | "1" | right eye | 3104 | "2" | left eye | 3105 | "3" | both eyes | 3106 +-------+-----------+ 3108 9.3.4.1.30.6. PixelWidth Element 3110 name: "PixelWidth" 3112 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)" 3114 id: "0xB0" 3116 minOccurs: "1" 3118 maxOccurs: "1" 3120 range: "not 0" 3122 type: "uinteger" 3124 minver: "1" 3126 documentation: Width of the encoded video frames in pixels. 3128 9.3.4.1.30.7. PixelHeight Element 3130 name: "PixelHeight" 3132 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)" 3134 id: "0xBA" 3136 minOccurs: "1" 3137 maxOccurs: "1" 3139 range: "not 0" 3141 type: "uinteger" 3143 minver: "1" 3145 documentation: Height of the encoded video frames in pixels. 3147 9.3.4.1.30.8. PixelCropBottom Element 3149 name: "PixelCropBottom" 3151 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)" 3153 id: "0x54AA" 3155 maxOccurs: "1" 3157 default: "0" 3159 type: "uinteger" 3161 minver: "1" 3163 documentation: The number of video pixels to remove at the bottom of 3164 the image. 3166 9.3.4.1.30.9. PixelCropTop Element 3168 name: "PixelCropTop" 3170 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)" 3172 id: "0x54BB" 3174 maxOccurs: "1" 3176 default: "0" 3178 type: "uinteger" 3180 minver: "1" 3182 documentation: The number of video pixels to remove at the top of the 3183 image. 3185 9.3.4.1.30.10. PixelCropLeft Element 3187 name: "PixelCropLeft" 3189 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)" 3191 id: "0x54CC" 3193 maxOccurs: "1" 3195 default: "0" 3197 type: "uinteger" 3199 minver: "1" 3201 documentation: The number of video pixels to remove on the left of 3202 the image. 3204 9.3.4.1.30.11. PixelCropRight Element 3206 name: "PixelCropRight" 3208 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)" 3210 id: "0x54DD" 3212 maxOccurs: "1" 3214 default: "0" 3216 type: "uinteger" 3218 minver: "1" 3220 documentation: The number of video pixels to remove on the right of 3221 the image. 3223 9.3.4.1.30.12. DisplayWidth Element 3225 name: "DisplayWidth" 3227 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)" 3229 id: "0x54B0" 3231 maxOccurs: "1" 3232 range: "not 0" 3234 default: "PixelWidth - PixelCropLeft - PixelCropRight" 3236 type: "uinteger" 3238 minver: "1" 3240 documentation: Width of the video frames to display. Applies to the 3241 video frame after cropping (PixelCrop* Elements). The default value 3242 is only valid when DisplayUnit is 0. 3244 9.3.4.1.30.13. DisplayHeight Element 3246 name: "DisplayHeight" 3248 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)" 3250 id: "0x54BA" 3252 maxOccurs: "1" 3254 range: "not 0" 3256 default: "PixelHeight - PixelCropTop - PixelCropBottom" 3258 type: "uinteger" 3260 minver: "1" 3262 documentation: Height of the video frames to display. Applies to the 3263 video frame after cropping (PixelCrop* Elements). The default value 3264 is only valid when DisplayUnit is 0. 3266 9.3.4.1.30.14. DisplayUnit Element 3268 name: "DisplayUnit" 3270 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)" 3272 id: "0x54B2" 3274 maxOccurs: "1" 3276 default: "0" 3278 type: "uinteger" 3279 minver: "1" 3281 documentation: How DisplayWidth & DisplayHeight are interpreted. 3283 restrictions: 3285 +-------+----------------------+ 3286 | value | label | 3287 +-------+----------------------+ 3288 | "0" | pixels | 3289 | "1" | centimeters | 3290 | "2" | inches | 3291 | "3" | display aspect ratio | 3292 | "4" | unknown | 3293 +-------+----------------------+ 3295 9.3.4.1.30.15. AspectRatioType Element 3297 name: "AspectRatioType" 3299 path: "0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)" 3301 id: "0x54B3" 3303 maxOccurs: "1" 3305 default: "0" 3307 type: "uinteger" 3309 minver: "1" 3311 documentation: Specify the possible modifications to the aspect 3312 ratio. 3314 restrictions: 3316 +-------+-------------------+ 3317 | value | label | 3318 +-------+-------------------+ 3319 | "0" | free resizing | 3320 | "1" | keep aspect ratio | 3321 | "2" | fixed | 3322 +-------+-------------------+ 3324 9.3.4.1.30.16. ColourSpace Element 3326 name: "ColourSpace" 3328 path: "0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)" 3330 id: "0x2EB524" 3332 maxOccurs: "1" 3334 size: "4" 3336 type: "binary" 3338 minver: "1" 3340 documentation: Specify the pixel format used for the Track's data as 3341 a FourCC. This value is similar in scope to the biCompression value 3342 of AVI's BITMAPINFOHEADER. This Element is MANDATORY in TrackEntry 3343 when the CodecID Element of the TrackEntry is set to 3344 "V_UNCOMPRESSED". 3346 9.3.4.1.30.17. GammaValue Element 3348 name: "GammaValue" 3350 path: "0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)" 3352 id: "0x2FB523" 3354 maxOccurs: "1" 3356 range: "> 0x0p+0" 3358 type: "float" 3360 minver: "0" 3362 maxver: "0" 3364 documentation: Gamma Value. 3366 9.3.4.1.30.18. FrameRate Element 3368 name: "FrameRate" 3370 path: "0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)" 3371 id: "0x2383E3" 3373 maxOccurs: "1" 3375 range: "> 0x0p+0" 3377 type: "float" 3379 minver: "0" 3381 maxver: "0" 3383 documentation: Number of frames per second. Informational only. 3385 9.3.4.1.30.19. Colour Element 3387 name: "Colour" 3389 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour)" 3391 id: "0x55B0" 3393 maxOccurs: "1" 3395 type: "master" 3397 minver: "4" 3399 documentation: Settings describing the colour format. 3401 9.3.4.1.30.20. MatrixCoefficients Element 3403 name: "MatrixCoefficients" 3405 path: 3406 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)" 3408 id: "0x55B1" 3410 maxOccurs: "1" 3412 default: "2" 3414 type: "uinteger" 3416 minver: "4" 3417 documentation: The Matrix Coefficients of the video used to derive 3418 luma and chroma values from red, green, and blue color primaries. 3419 For clarity, the value and meanings for MatrixCoefficients are 3420 adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273. 3422 restrictions: 3424 +-------+---------------------------------------+ 3425 | value | label | 3426 +-------+---------------------------------------+ 3427 | "0" | Identity | 3428 | "1" | ITU-R BT.709 | 3429 | "2" | unspecified | 3430 | "3" | reserved | 3431 | "4" | US FCC 73.682 | 3432 | "5" | ITU-R BT.470BG | 3433 | "6" | SMPTE 170M | 3434 | "7" | SMPTE 240M | 3435 | "8" | YCoCg | 3436 | "9" | BT2020 Non-constant Luminance | 3437 | "10" | BT2020 Constant Luminance | 3438 | "11" | SMPTE ST 2085 | 3439 | "12" | Chroma-derived Non-constant Luminance | 3440 | "13" | Chroma-derived Constant Luminance | 3441 | "14" | ITU-R BT.2100-0 | 3442 +-------+---------------------------------------+ 3444 9.3.4.1.30.21. BitsPerChannel Element 3446 name: "BitsPerChannel" 3448 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)" 3450 id: "0x55B2" 3452 maxOccurs: "1" 3454 default: "0" 3456 type: "uinteger" 3458 minver: "4" 3460 documentation: Number of decoded bits per channel. A value of 0 3461 indicates that the BitsPerChannel is unspecified. 3463 9.3.4.1.30.22. ChromaSubsamplingHorz Element 3465 name: "ChromaSubsamplingHorz" 3467 path: 3468 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)" 3470 id: "0x55B3" 3472 maxOccurs: "1" 3474 type: "uinteger" 3476 minver: "4" 3478 documentation: The amount of pixels to remove in the Cr and Cb 3479 channels for every pixel not removed horizontally. Example: For 3480 video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD 3481 be set to 1. 3483 9.3.4.1.30.23. ChromaSubsamplingVert Element 3485 name: "ChromaSubsamplingVert" 3487 path: 3488 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)" 3490 id: "0x55B4" 3492 maxOccurs: "1" 3494 type: "uinteger" 3496 minver: "4" 3498 documentation: The amount of pixels to remove in the Cr and Cb 3499 channels for every pixel not removed vertically. Example: For video 3500 with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be 3501 set to 1. 3503 9.3.4.1.30.24. CbSubsamplingHorz Element 3505 name: "CbSubsamplingHorz" 3507 path: 3508 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)" 3510 id: "0x55B5" 3511 maxOccurs: "1" 3513 type: "uinteger" 3515 minver: "4" 3517 documentation: The amount of pixels to remove in the Cb channel for 3518 every pixel not removed horizontally. This is additive with 3519 ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma 3520 subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and 3521 CbSubsamplingHorz SHOULD be set to 1. 3523 9.3.4.1.30.25. CbSubsamplingVert Element 3525 name: "CbSubsamplingVert" 3527 path: 3528 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)" 3530 id: "0x55B6" 3532 maxOccurs: "1" 3534 type: "uinteger" 3536 minver: "4" 3538 documentation: The amount of pixels to remove in the Cb channel for 3539 every pixel not removed vertically. This is additive with 3540 ChromaSubsamplingVert. 3542 9.3.4.1.30.26. ChromaSitingHorz Element 3544 name: "ChromaSitingHorz" 3546 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)" 3548 id: "0x55B7" 3550 maxOccurs: "1" 3552 default: "0" 3554 type: "uinteger" 3556 minver: "4" 3558 documentation: How chroma is subsampled horizontally. 3560 restrictions: 3562 +-------+-----------------+ 3563 | value | label | 3564 +-------+-----------------+ 3565 | "0" | unspecified | 3566 | "1" | left collocated | 3567 | "2" | half | 3568 +-------+-----------------+ 3570 9.3.4.1.30.27. ChromaSitingVert Element 3572 name: "ChromaSitingVert" 3574 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)" 3576 id: "0x55B8" 3578 maxOccurs: "1" 3580 default: "0" 3582 type: "uinteger" 3584 minver: "4" 3586 documentation: How chroma is subsampled vertically. 3588 restrictions: 3590 +-------+----------------+ 3591 | value | label | 3592 +-------+----------------+ 3593 | "0" | unspecified | 3594 | "1" | top collocated | 3595 | "2" | half | 3596 +-------+----------------+ 3598 9.3.4.1.30.28. Range Element 3600 name: "Range" 3602 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)" 3604 id: "0x55B9" 3606 maxOccurs: "1" 3607 default: "0" 3609 type: "uinteger" 3611 minver: "4" 3613 documentation: Clipping of the color ranges. 3615 restrictions: 3617 +-------+-------------------------------------------------------+ 3618 | value | label | 3619 +-------+-------------------------------------------------------+ 3620 | "0" | unspecified | 3621 | "1" | broadcast range | 3622 | "2" | full range (no clipping) | 3623 | "3" | defined by MatrixCoefficients/TransferCharacteristics | 3624 +-------+-------------------------------------------------------+ 3626 9.3.4.1.30.29. TransferCharacteristics Element 3628 name: "TransferCharacteristics" 3630 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteri 3631 stics)" 3633 id: "0x55BA" 3635 maxOccurs: "1" 3637 default: "2" 3639 type: "uinteger" 3641 minver: "4" 3643 documentation: The transfer characteristics of the video. For 3644 clarity, the value and meanings for TransferCharacteristics are 3645 adopted from Table 3 of ISO/IEC 23091-4 or ITU-T H.273. 3647 restrictions: 3649 +-------+---------------------------------------+ 3650 | value | label | 3651 +-------+---------------------------------------+ 3652 | "0" | reserved | 3653 | "1" | ITU-R BT.709 | 3654 | "2" | unspecified | 3655 | "3" | reserved | 3656 | "4" | Gamma 2.2 curve - BT.470M | 3657 | "5" | Gamma 2.8 curve - BT.470BG | 3658 | "6" | SMPTE 170M | 3659 | "7" | SMPTE 240M | 3660 | "8" | Linear | 3661 | "9" | Log | 3662 | "10" | Log Sqrt | 3663 | "11" | IEC 61966-2-4 | 3664 | "12" | ITU-R BT.1361 Extended Colour Gamut | 3665 | "13" | IEC 61966-2-1 | 3666 | "14" | ITU-R BT.2020 10 bit | 3667 | "15" | ITU-R BT.2020 12 bit | 3668 | "16" | ITU-R BT.2100 Perceptual Quantization | 3669 | "17" | SMPTE ST 428-1 | 3670 | "18" | ARIB STD-B67 (HLG) | 3671 +-------+---------------------------------------+ 3673 9.3.4.1.30.30. Primaries Element 3675 name: "Primaries" 3677 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)" 3679 id: "0x55BB" 3681 maxOccurs: "1" 3683 default: "2" 3685 type: "uinteger" 3687 minver: "4" 3689 documentation: The colour primaries of the video. For clarity, the 3690 value and meanings for Primaries are adopted from Table 2 of ISO/IEC 3691 23091-4 or ITU-T H.273. 3693 restrictions: 3695 +-------+----------------------------------------+ 3696 | value | label | 3697 +-------+----------------------------------------+ 3698 | "0" | reserved | 3699 | "1" | ITU-R BT.709 | 3700 | "2" | unspecified | 3701 | "3" | reserved | 3702 | "4" | ITU-R BT.470M | 3703 | "5" | ITU-R BT.470BG - BT.601 625 | 3704 | "6" | ITU-R BT.601 525 - SMPTE 170M | 3705 | "7" | SMPTE 240M | 3706 | "8" | FILM | 3707 | "9" | ITU-R BT.2020 | 3708 | "10" | SMPTE ST 428-1 | 3709 | "11" | SMPTE RP 432-2 | 3710 | "12" | SMPTE EG 432-2 | 3711 | "22" | EBU Tech. 3213-E - JEDEC P22 phosphors | 3712 +-------+----------------------------------------+ 3714 9.3.4.1.30.31. MaxCLL Element 3716 name: "MaxCLL" 3718 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)" 3720 id: "0x55BC" 3722 maxOccurs: "1" 3724 type: "uinteger" 3726 minver: "4" 3728 documentation: Maximum brightness of a single pixel (Maximum Content 3729 Light Level) in candelas per square meter (cd/m^2). 3731 9.3.4.1.30.32. MaxFALL Element 3733 name: "MaxFALL" 3735 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)" 3737 id: "0x55BD" 3739 maxOccurs: "1" 3741 type: "uinteger" 3742 minver: "4" 3744 documentation: Maximum brightness of a single full frame (Maximum 3745 Frame-Average Light Level) in candelas per square meter (cd/m^2). 3747 9.3.4.1.30.33. MasteringMetadata Element 3749 name: "MasteringMetadata" 3751 path: 3752 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)" 3754 id: "0x55D0" 3756 maxOccurs: "1" 3758 type: "master" 3760 minver: "4" 3762 documentation: SMPTE 2086 mastering data. 3764 9.3.4.1.30.34. PrimaryRChromaticityX Element 3766 name: "PrimaryRChromaticityX" 3768 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3769 PrimaryRChromaticityX)" 3771 id: "0x55D1" 3773 maxOccurs: "1" 3775 range: "0-1" 3777 type: "float" 3779 minver: "4" 3781 documentation: Red X chromaticity coordinate as defined by CIE 1931. 3783 9.3.4.1.30.35. PrimaryRChromaticityY Element 3785 name: "PrimaryRChromaticityY" 3787 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3788 PrimaryRChromaticityY)" 3789 id: "0x55D2" 3791 maxOccurs: "1" 3793 range: "0-1" 3795 type: "float" 3797 minver: "4" 3799 documentation: Red Y chromaticity coordinate as defined by CIE 1931. 3801 9.3.4.1.30.36. PrimaryGChromaticityX Element 3803 name: "PrimaryGChromaticityX" 3805 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3806 PrimaryGChromaticityX)" 3808 id: "0x55D3" 3810 maxOccurs: "1" 3812 range: "0-1" 3814 type: "float" 3816 minver: "4" 3818 documentation: Green X chromaticity coordinate as defined by CIE 3819 1931. 3821 9.3.4.1.30.37. PrimaryGChromaticityY Element 3823 name: "PrimaryGChromaticityY" 3825 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3826 PrimaryGChromaticityY)" 3828 id: "0x55D4" 3830 maxOccurs: "1" 3832 range: "0-1" 3834 type: "float" 3836 minver: "4" 3837 documentation: Green Y chromaticity coordinate as defined by CIE 3838 1931. 3840 9.3.4.1.30.38. PrimaryBChromaticityX Element 3842 name: "PrimaryBChromaticityX" 3844 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3845 PrimaryBChromaticityX)" 3847 id: "0x55D5" 3849 maxOccurs: "1" 3851 range: "0-1" 3853 type: "float" 3855 minver: "4" 3857 documentation: Blue X chromaticity coordinate as defined by CIE 1931. 3859 9.3.4.1.30.39. PrimaryBChromaticityY Element 3861 name: "PrimaryBChromaticityY" 3863 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3864 PrimaryBChromaticityY)" 3866 id: "0x55D6" 3868 maxOccurs: "1" 3870 range: "0-1" 3872 type: "float" 3874 minver: "4" 3876 documentation: Blue Y chromaticity coordinate as defined by CIE 1931. 3878 9.3.4.1.30.40. WhitePointChromaticityX Element 3880 name: "WhitePointChromaticityX" 3882 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3883 WhitePointChromaticityX)" 3884 id: "0x55D7" 3886 maxOccurs: "1" 3888 range: "0-1" 3890 type: "float" 3892 minver: "4" 3894 documentation: White X chromaticity coordinate as defined by CIE 3895 1931. 3897 9.3.4.1.30.41. WhitePointChromaticityY Element 3899 name: "WhitePointChromaticityY" 3901 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3902 WhitePointChromaticityY)" 3904 id: "0x55D8" 3906 maxOccurs: "1" 3908 range: "0-1" 3910 type: "float" 3912 minver: "4" 3914 documentation: White Y chromaticity coordinate as defined by CIE 3915 1931. 3917 9.3.4.1.30.42. LuminanceMax Element 3919 name: "LuminanceMax" 3921 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3922 LuminanceMax)" 3924 id: "0x55D9" 3926 maxOccurs: "1" 3928 range: ">= 0x0p+0" 3930 type: "float" 3931 minver: "4" 3933 documentation: Maximum luminance. Represented in candelas per square 3934 meter (cd/m^2). 3936 9.3.4.1.30.43. LuminanceMin Element 3938 name: "LuminanceMin" 3940 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3941 LuminanceMin)" 3943 id: "0x55DA" 3945 maxOccurs: "1" 3947 range: ">= 0x0p+0" 3949 type: "float" 3951 minver: "4" 3953 documentation: Minimum luminance. Represented in candelas per square 3954 meter (cd/m^2). 3956 9.3.4.1.30.44. Projection Element 3958 name: "Projection" 3960 path: "0*1(\Segment\Tracks\TrackEntry\Video\Projection)" 3962 id: "0x7670" 3964 maxOccurs: "1" 3966 type: "master" 3968 minver: "4" 3970 documentation: Describes the video projection details. Used to 3971 render spherical and VR videos. 3973 9.3.4.1.30.45. ProjectionType Element 3975 name: "ProjectionType" 3977 path: 3978 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionType)" 3979 id: "0x7671" 3981 minOccurs: "1" 3983 maxOccurs: "1" 3985 range: "0-3" 3987 default: "0" 3989 type: "uinteger" 3991 minver: "4" 3993 documentation: Describes the projection used for this video track. 3995 restrictions: 3997 +-------+-----------------+ 3998 | value | label | 3999 +-------+-----------------+ 4000 | "0" | rectangular | 4001 | "1" | equirectangular | 4002 | "2" | cubemap | 4003 | "3" | mesh | 4004 +-------+-----------------+ 4006 9.3.4.1.30.46. ProjectionPrivate Element 4008 name: "ProjectionPrivate" 4010 path: 4011 "0*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate)" 4013 id: "0x7672" 4015 maxOccurs: "1" 4017 type: "binary" 4019 minver: "4" 4021 documentation: Private data that only applies to a specific 4022 projection.SemanticsIf ProjectionType equals 0 (Rectangular), then 4023 this element must not be present.If ProjectionType equals 1 4024 (Equirectangular), then this element must be present and contain the 4025 same binary data that would be stored inside an ISOBMFF 4026 Equirectangular Projection Box ('equi').If ProjectionType equals 2 4027 (Cubemap), then this element must be present and contain the same 4028 binary data that would be stored inside an ISOBMFF Cubemap Projection 4029 Box ('cbmp').If ProjectionType equals 3 (Mesh), then this element 4030 must be present and contain the same binary data that would be stored 4031 inside an ISOBMFF Mesh Projection Box ('mshp').Note: ISOBMFF box size 4032 and fourcc fields are not included in the binary data, but the 4033 FullBox version and flag fields are. This is to avoid redundant 4034 framing information while preserving versioning and semantics between 4035 the two container formats. 4037 9.3.4.1.30.47. ProjectionPoseYaw Element 4039 name: "ProjectionPoseYaw" 4041 path: 4042 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw)" 4044 id: "0x7673" 4046 minOccurs: "1" 4048 maxOccurs: "1" 4050 default: "0x0p+0" 4052 type: "float" 4054 minver: "4" 4056 documentation: Specifies a yaw rotation to the 4057 projection.SemanticsValue represents a clockwise rotation, in 4058 degrees, around the up vector. This rotation must be applied before 4059 any ProjectionPosePitch or ProjectionPoseRoll rotations. The value 4060 of this field should be in the -180 to 180 degree range. 4062 9.3.4.1.30.48. ProjectionPosePitch Element 4064 name: "ProjectionPosePitch" 4066 path: "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPose 4067 Pitch)" 4069 id: "0x7674" 4071 minOccurs: "1" 4073 maxOccurs: "1" 4074 default: "0x0p+0" 4076 type: "float" 4078 minver: "4" 4080 documentation: Specifies a pitch rotation to the 4081 projection.SemanticsValue represents a counter-clockwise rotation, in 4082 degrees, around the right vector. This rotation must be applied 4083 after the ProjectionPoseYaw rotation and before the 4084 ProjectionPoseRoll rotation. The value of this field should be in 4085 the -90 to 90 degree range. 4087 9.3.4.1.30.49. ProjectionPoseRoll Element 4089 name: "ProjectionPoseRoll" 4091 path: 4092 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll)" 4094 id: "0x7675" 4096 minOccurs: "1" 4098 maxOccurs: "1" 4100 default: "0x0p+0" 4102 type: "float" 4104 minver: "4" 4106 documentation: Specifies a roll rotation to the 4107 projection.SemanticsValue represents a counter-clockwise rotation, in 4108 degrees, around the forward vector. This rotation must be applied 4109 after the ProjectionPoseYaw and ProjectionPosePitch rotations. The 4110 value of this field should be in the -180 to 180 degree range. 4112 9.3.4.1.31. Audio Element 4114 name: "Audio" 4116 path: "0*1(\Segment\Tracks\TrackEntry\Audio)" 4118 id: "0xE1" 4120 maxOccurs: "1" 4121 type: "master" 4123 minver: "1" 4125 documentation: Audio settings. 4127 9.3.4.1.31.1. SamplingFrequency Element 4129 name: "SamplingFrequency" 4131 path: "1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)" 4133 id: "0xB5" 4135 minOccurs: "1" 4137 maxOccurs: "1" 4139 range: "> 0x0p+0" 4141 default: "0x1.f4p+12" 4143 type: "float" 4145 minver: "1" 4147 documentation: Sampling frequency in Hz. 4149 9.3.4.1.31.2. OutputSamplingFrequency Element 4151 name: "OutputSamplingFrequency" 4153 path: "0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)" 4155 id: "0x78B5" 4157 maxOccurs: "1" 4159 range: "> 0x0p+0" 4161 default: "SamplingFrequency" 4163 type: "float" 4165 minver: "1" 4167 documentation: Real output sampling frequency in Hz (used for SBR 4168 techniques). 4170 9.3.4.1.31.3. Channels Element 4172 name: "Channels" 4174 path: "1*1(\Segment\Tracks\TrackEntry\Audio\Channels)" 4176 id: "0x9F" 4178 minOccurs: "1" 4180 maxOccurs: "1" 4182 range: "not 0" 4184 default: "1" 4186 type: "uinteger" 4188 minver: "1" 4190 documentation: Numbers of channels in the track. 4192 9.3.4.1.31.4. ChannelPositions Element 4194 name: "ChannelPositions" 4196 path: "0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)" 4198 id: "0x7D7B" 4200 maxOccurs: "1" 4202 type: "binary" 4204 minver: "0" 4206 maxver: "0" 4208 documentation: Table of horizontal angles for each successive 4209 channel, see appendix. 4211 9.3.4.1.31.5. BitDepth Element 4213 name: "BitDepth" 4215 path: "0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)" 4217 id: "0x6264" 4218 maxOccurs: "1" 4220 range: "not 0" 4222 type: "uinteger" 4224 minver: "1" 4226 documentation: Bits per sample, mostly used for PCM. 4228 9.3.4.1.32. TrackOperation Element 4230 name: "TrackOperation" 4232 path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation)" 4234 id: "0xE2" 4236 maxOccurs: "1" 4238 type: "master" 4240 minver: "3" 4242 documentation: Operation that needs to be applied on tracks to create 4243 this virtual track. For more details look at the Specification Notes 4244 on the subject. 4246 9.3.4.1.32.1. TrackCombinePlanes Element 4248 name: "TrackCombinePlanes" 4250 path: 4251 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)" 4253 id: "0xE3" 4255 maxOccurs: "1" 4257 type: "master" 4259 minver: "3" 4261 documentation: Contains the list of all video plane tracks that need 4262 to be combined to create this 3D track 4264 9.3.4.1.32.2. TrackPlane Element 4266 name: "TrackPlane" 4268 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlane 4269 s\TrackPlane)" 4271 id: "0xE4" 4273 minOccurs: "1" 4275 type: "master" 4277 minver: "3" 4279 documentation: Contains a video plane track that need to be combined 4280 to create this 3D track 4282 9.3.4.1.32.3. TrackPlaneUID Element 4284 name: "TrackPlaneUID" 4286 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4287 es\TrackPlane\TrackPlaneUID)" 4289 id: "0xE5" 4291 minOccurs: "1" 4293 maxOccurs: "1" 4295 range: "not 0" 4297 type: "uinteger" 4299 minver: "3" 4301 documentation: The trackUID number of the track representing the 4302 plane. 4304 9.3.4.1.32.4. TrackPlaneType Element 4306 name: "TrackPlaneType" 4308 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4309 es\TrackPlane\TrackPlaneType)" 4311 id: "0xE6" 4312 minOccurs: "1" 4314 maxOccurs: "1" 4316 type: "uinteger" 4318 minver: "3" 4320 documentation: The kind of plane this track corresponds to. 4322 restrictions: 4324 +-------+------------+ 4325 | value | label | 4326 +-------+------------+ 4327 | "0" | left eye | 4328 | "1" | right eye | 4329 | "2" | background | 4330 +-------+------------+ 4332 9.3.4.1.32.5. TrackJoinBlocks Element 4334 name: "TrackJoinBlocks" 4336 path: 4337 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)" 4339 id: "0xE9" 4341 maxOccurs: "1" 4343 type: "master" 4345 minver: "3" 4347 documentation: Contains the list of all tracks whose Blocks need to 4348 be combined to create this virtual track 4350 9.3.4.1.32.6. TrackJoinUID Element 4352 name: "TrackJoinUID" 4354 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\T 4355 rackJoinUID)" 4357 id: "0xED" 4359 minOccurs: "1" 4360 range: "not 0" 4362 type: "uinteger" 4364 minver: "3" 4366 documentation: The trackUID number of a track whose blocks are used 4367 to create this virtual track. 4369 9.3.4.1.33. TrickTrackUID Element 4371 name: "TrickTrackUID" 4373 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)" 4375 id: "0xC0" 4377 maxOccurs: "1" 4379 type: "uinteger" 4381 minver: "0" 4383 maxver: "0" 4385 documentation: DivX trick track extensions 4387 9.3.4.1.34. TrickTrackSegmentUID Element 4389 name: "TrickTrackSegmentUID" 4391 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)" 4393 id: "0xC1" 4395 maxOccurs: "1" 4397 size: "16" 4399 type: "binary" 4401 minver: "0" 4403 maxver: "0" 4405 documentation: DivX trick track extensions 4407 9.3.4.1.35. TrickTrackFlag Element 4409 name: "TrickTrackFlag" 4411 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)" 4413 id: "0xC6" 4415 maxOccurs: "1" 4417 default: "0" 4419 type: "uinteger" 4421 minver: "0" 4423 maxver: "0" 4425 documentation: DivX trick track extensions 4427 9.3.4.1.36. TrickMasterTrackUID Element 4429 name: "TrickMasterTrackUID" 4431 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)" 4433 id: "0xC7" 4435 maxOccurs: "1" 4437 type: "uinteger" 4439 minver: "0" 4441 maxver: "0" 4443 documentation: DivX trick track extensions 4445 9.3.4.1.37. TrickMasterTrackSegmentUID Element 4447 name: "TrickMasterTrackSegmentUID" 4449 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)" 4451 id: "0xC4" 4453 maxOccurs: "1" 4454 size: "16" 4456 type: "binary" 4458 minver: "0" 4460 maxver: "0" 4462 documentation: DivX trick track extensions 4464 9.3.4.1.38. ContentEncodings Element 4466 name: "ContentEncodings" 4468 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings)" 4470 id: "0x6D80" 4472 maxOccurs: "1" 4474 type: "master" 4476 minver: "1" 4478 documentation: Settings for several content encoding mechanisms like 4479 compression or encryption. 4481 9.3.4.1.38.1. ContentEncoding Element 4483 name: "ContentEncoding" 4485 path: 4486 "1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)" 4488 id: "0x6240" 4490 minOccurs: "1" 4492 type: "master" 4494 minver: "1" 4496 documentation: Settings for one content encoding like compression or 4497 encryption. 4499 9.3.4.1.38.2. ContentEncodingOrder Element 4501 name: "ContentEncodingOrder" 4503 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4504 g\ContentEncodingOrder)" 4506 id: "0x5031" 4508 minOccurs: "1" 4510 maxOccurs: "1" 4512 default: "0" 4514 type: "uinteger" 4516 minver: "1" 4518 documentation: Tells when this modification was used during encoding/ 4519 muxing starting with 0 and counting upwards. The decoder/demuxer has 4520 to start with the highest order number it finds and work its way 4521 down. This value has to be unique over all ContentEncodingOrder 4522 Elements in the Segment. 4524 9.3.4.1.38.3. ContentEncodingScope Element 4526 name: "ContentEncodingScope" 4528 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4529 g\ContentEncodingScope)" 4531 id: "0x5032" 4533 minOccurs: "1" 4535 maxOccurs: "1" 4537 range: "not 0" 4539 default: "1" 4541 type: "uinteger" 4543 minver: "1" 4545 documentation: A bit field that describes which Elements have been 4546 modified in this way. Values (big endian) can be OR'ed. 4548 restrictions: 4550 +-------+-----------------------------------------------------------+ 4551 | value | label | 4552 +-------+-----------------------------------------------------------+ 4553 | "1" | All frame contents, excluding lacing data | 4554 | "2" | The track's private data | 4555 | "4" | The next ContentEncoding (next "ContentEncodingOrder". | 4556 | | Either the data inside "ContentCompression" and/or | 4557 | | "ContentEncryption") | 4558 +-------+-----------------------------------------------------------+ 4560 9.3.4.1.38.4. ContentEncodingType Element 4562 name: "ContentEncodingType" 4564 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4565 g\ContentEncodingType)" 4567 id: "0x5033" 4569 minOccurs: "1" 4571 maxOccurs: "1" 4573 default: "0" 4575 type: "uinteger" 4577 minver: "1" 4579 documentation: A value describing what kind of transformation is 4580 applied. 4582 restrictions: 4584 +-------+-------------+ 4585 | value | label | 4586 +-------+-------------+ 4587 | "0" | Compression | 4588 | "1" | Encryption | 4589 +-------+-------------+ 4591 9.3.4.1.38.5. ContentCompression Element 4593 name: "ContentCompression" 4594 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4595 g\ContentCompression)" 4597 id: "0x5034" 4599 maxOccurs: "1" 4601 type: "master" 4603 minver: "1" 4605 documentation: Settings describing the compression used. This 4606 Element MUST be present if the value of ContentEncodingType is 0 and 4607 absent otherwise. Each block MUST be decompressable even if no 4608 previous block is available in order not to prevent seeking. 4610 9.3.4.1.38.6. ContentCompAlgo Element 4612 name: "ContentCompAlgo" 4614 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4615 g\ContentCompression\ContentCompAlgo)" 4617 id: "0x4254" 4619 minOccurs: "1" 4621 maxOccurs: "1" 4623 default: "0" 4625 type: "uinteger" 4627 minver: "1" 4629 documentation: The compression algorithm used. 4631 restrictions: 4633 +-------+------------------+ 4634 | value | label | 4635 +-------+------------------+ 4636 | "0" | zlib | 4637 | "1" | bzlib | 4638 | "2" | lzo1x | 4639 | "3" | Header Stripping | 4640 +-------+------------------+ 4642 9.3.4.1.38.7. ContentCompSettings Element 4644 name: "ContentCompSettings" 4646 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4647 g\ContentCompression\ContentCompSettings)" 4649 id: "0x4255" 4651 maxOccurs: "1" 4653 type: "binary" 4655 minver: "1" 4657 documentation: Settings that might be needed by the decompressor. 4658 For Header Stripping ("ContentCompAlgo"=3), the bytes that were 4659 removed from the beggining of each frames of the track. 4661 9.3.4.1.38.8. ContentEncryption Element 4663 name: "ContentEncryption" 4665 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4666 g\ContentEncryption)" 4668 id: "0x5035" 4670 minOccurs: "1" 4672 maxOccurs: "1" 4674 type: "master" 4676 minver: "1" 4678 documentation: Settings describing the encryption used. This Element 4679 MUST be present if the value of "ContentEncodingType" is 1 4680 (encryption) and MUST be ignored otherwise. 4682 9.3.4.1.38.9. ContentEncAlgo Element 4684 name: "ContentEncAlgo" 4686 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4687 g\ContentEncryption\ContentEncAlgo)" 4689 id: "0x47E1" 4690 maxOccurs: "1" 4692 default: "0" 4694 type: "uinteger" 4696 minver: "1" 4698 documentation: The encryption algorithm used. The value '0' means 4699 that the contents have not been encrypted but only signed. 4701 restrictions: 4703 +-------+-----------------------+ 4704 | value | label | 4705 +-------+-----------------------+ 4706 | "0" | Not encrypted | 4707 | "1" | DES - FIPS 46-3 | 4708 | "2" | Triple DES - RFC 1851 | 4709 | "3" | Twofish | 4710 | "4" | Blowfish | 4711 | "5" | AES - FIPS 187 | 4712 +-------+-----------------------+ 4714 9.3.4.1.38.10. ContentEncKeyID Element 4716 name: "ContentEncKeyID" 4718 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4719 g\ContentEncryption\ContentEncKeyID)" 4721 id: "0x47E2" 4723 maxOccurs: "1" 4725 type: "binary" 4727 minver: "1" 4729 documentation: For public key algorithms this is the ID of the public 4730 key the the data was encrypted with. 4732 9.3.4.1.38.11. ContentEncAESSettings Element 4734 name: "ContentEncAESSettings" 4736 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4737 g\ContentEncryption\ContentEncAESSettings)" 4738 id: "0x47E7" 4740 maxOccurs: "1" 4742 type: "master" 4744 minver: "4" 4746 documentation: Settings describing the encryption algorithm used. If 4747 "ContentEncAlgo" != 5 this MUST be ignored. 4749 9.3.4.1.38.12. AESSettingsCipherMode Element 4751 name: "AESSettingsCipherMode" 4753 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4754 g\ContentEncryption\ContentEncAESSettings\AESSettingsCipherMode)" 4756 id: "0x47E8" 4758 minOccurs: "1" 4760 maxOccurs: "1" 4762 type: "uinteger" 4764 minver: "4" 4766 documentation: The AES cipher mode used in the encryption. 4768 restrictions: 4770 +-------+--------------------------------------------------+ 4771 | value | label | 4772 +-------+--------------------------------------------------+ 4773 | "1" | AES-CTR / Counter, NIST SP 800-38A | 4774 | "2" | AES-CBC / Cipher Block Chaining, NIST SP 800-38A | 4775 +-------+--------------------------------------------------+ 4777 9.3.4.1.38.13. ContentSignature Element 4779 name: "ContentSignature" 4781 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4782 g\ContentEncryption\ContentSignature)" 4784 id: "0x47E3" 4785 maxOccurs: "1" 4787 type: "binary" 4789 minver: "1" 4791 documentation: A cryptographic signature of the contents. 4793 9.3.4.1.38.14. ContentSigKeyID Element 4795 name: "ContentSigKeyID" 4797 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4798 g\ContentEncryption\ContentSigKeyID)" 4800 id: "0x47E4" 4802 maxOccurs: "1" 4804 type: "binary" 4806 minver: "1" 4808 documentation: This is the ID of the private key the data was signed 4809 with. 4811 9.3.4.1.38.15. ContentSigAlgo Element 4813 name: "ContentSigAlgo" 4815 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4816 g\ContentEncryption\ContentSigAlgo)" 4818 id: "0x47E5" 4820 maxOccurs: "1" 4822 default: "0" 4824 type: "uinteger" 4826 minver: "1" 4828 documentation: The algorithm used for the signature. 4830 restrictions: 4832 +-------+------------+ 4833 | value | label | 4834 +-------+------------+ 4835 | "0" | Not signed | 4836 | "1" | RSA | 4837 +-------+------------+ 4839 9.3.4.1.38.16. ContentSigHashAlgo Element 4841 name: "ContentSigHashAlgo" 4843 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4844 g\ContentEncryption\ContentSigHashAlgo)" 4846 id: "0x47E6" 4848 maxOccurs: "1" 4850 default: "0" 4852 type: "uinteger" 4854 minver: "1" 4856 documentation: The hash algorithm used for the signature. 4858 restrictions: 4860 +-------+------------+ 4861 | value | label | 4862 +-------+------------+ 4863 | "0" | Not signed | 4864 | "1" | SHA1-160 | 4865 | "1" | MD5 | 4866 +-------+------------+ 4868 9.3.5. Cues Element 4870 name: "Cues" 4872 path: "0*1(\Segment\Cues)" 4874 id: "0x1C53BB6B" 4876 maxOccurs: "1" 4878 type: "master" 4879 minver: "1" 4881 documentation: A Top-Level Element to speed seeking access. All 4882 entries are local to the Segment. This Element SHOULD be mandatory 4883 for non "live" streams. 4885 9.3.5.1. CuePoint Element 4887 name: "CuePoint" 4889 path: "1*(\Segment\Cues\CuePoint)" 4891 id: "0xBB" 4893 minOccurs: "1" 4895 type: "master" 4897 minver: "1" 4899 documentation: Contains all information relative to a seek point in 4900 the Segment. 4902 9.3.5.1.1. CueTime Element 4904 name: "CueTime" 4906 path: "1*1(\Segment\Cues\CuePoint\CueTime)" 4908 id: "0xB3" 4910 minOccurs: "1" 4912 maxOccurs: "1" 4914 type: "uinteger" 4916 minver: "1" 4918 documentation: Absolute timestamp according to the Segment time base. 4920 9.3.5.1.2. CueTrackPositions Element 4922 name: "CueTrackPositions" 4924 path: "1*(\Segment\Cues\CuePoint\CueTrackPositions)" 4926 id: "0xB7" 4927 minOccurs: "1" 4929 type: "master" 4931 minver: "1" 4933 documentation: Contain positions for different tracks corresponding 4934 to the timestamp. 4936 9.3.5.1.2.1. CueTrack Element 4938 name: "CueTrack" 4940 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)" 4942 id: "0xF7" 4944 minOccurs: "1" 4946 maxOccurs: "1" 4948 range: "not 0" 4950 type: "uinteger" 4952 minver: "1" 4954 documentation: The track for which a position is given. 4956 9.3.5.1.2.2. CueClusterPosition Element 4958 name: "CueClusterPosition" 4960 path: 4961 "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)" 4963 id: "0xF1" 4965 minOccurs: "1" 4967 maxOccurs: "1" 4969 type: "uinteger" 4971 minver: "1" 4973 documentation: The Segment Position of the Cluster containing the 4974 associated Block. 4976 9.3.5.1.2.3. CueRelativePosition Element 4978 name: "CueRelativePosition" 4980 path: 4981 "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)" 4983 id: "0xF0" 4985 maxOccurs: "1" 4987 type: "uinteger" 4989 minver: "4" 4991 documentation: The relative position inside the Cluster of the 4992 referenced SimpleBlock or BlockGroup with 0 being the first possible 4993 position for an Element inside that Cluster. 4995 9.3.5.1.2.4. CueDuration Element 4997 name: "CueDuration" 4999 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)" 5001 id: "0xB2" 5003 maxOccurs: "1" 5005 type: "uinteger" 5007 minver: "4" 5009 documentation: The duration of the block according to the Segment 5010 time base. If missing the track's DefaultDuration does not apply and 5011 no duration information is available in terms of the cues. 5013 9.3.5.1.2.5. CueBlockNumber Element 5015 name: "CueBlockNumber" 5017 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)" 5019 id: "0x5378" 5021 maxOccurs: "1" 5023 range: "not 0" 5024 default: "1" 5026 type: "uinteger" 5028 minver: "1" 5030 documentation: Number of the Block in the specified Cluster. 5032 9.3.5.1.2.6. CueCodecState Element 5034 name: "CueCodecState" 5036 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)" 5038 id: "0xEA" 5040 maxOccurs: "1" 5042 default: "0" 5044 type: "uinteger" 5046 minver: "2" 5048 documentation: The Segment Position of the Codec State corresponding 5049 to this Cue Element. 0 means that the data is taken from the initial 5050 Track Entry. 5052 9.3.5.1.2.7. CueReference Element 5054 name: "CueReference" 5056 path: "0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)" 5058 id: "0xDB" 5060 type: "master" 5062 minver: "2" 5064 documentation: The Clusters containing the referenced Blocks. 5066 9.3.5.1.2.8. CueRefTime Element 5068 name: "CueRefTime" 5070 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 5071 efTime)" 5072 id: "0x96" 5074 minOccurs: "1" 5076 maxOccurs: "1" 5078 type: "uinteger" 5080 minver: "2" 5082 documentation: Timestamp of the referenced Block. 5084 9.3.5.1.2.9. CueRefCluster Element 5086 name: "CueRefCluster" 5088 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 5089 efCluster)" 5091 id: "0x97" 5093 minOccurs: "1" 5095 maxOccurs: "1" 5097 type: "uinteger" 5099 minver: "0" 5101 maxver: "0" 5103 documentation: The Segment Position of the Cluster containing the 5104 referenced Block. 5106 9.3.5.1.2.10. CueRefNumber Element 5108 name: "CueRefNumber" 5110 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 5111 efNumber)" 5113 id: "0x535F" 5115 maxOccurs: "1" 5117 range: "not 0" 5119 default: "1" 5120 type: "uinteger" 5122 minver: "0" 5124 maxver: "0" 5126 documentation: Number of the referenced Block of Track X in the 5127 specified Cluster. 5129 9.3.5.1.2.11. CueRefCodecState Element 5131 name: "CueRefCodecState" 5133 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 5134 efCodecState)" 5136 id: "0xEB" 5138 maxOccurs: "1" 5140 default: "0" 5142 type: "uinteger" 5144 minver: "0" 5146 maxver: "0" 5148 documentation: The Segment Position of the Codec State corresponding 5149 to this referenced Element. 0 means that the data is taken from the 5150 initial Track Entry. 5152 9.3.6. Attachments Element 5154 name: "Attachments" 5156 path: "0*1(\Segment\Attachments)" 5158 id: "0x1941A469" 5160 maxOccurs: "1" 5162 type: "master" 5164 minver: "1" 5166 documentation: Contain attached files. 5168 9.3.6.1. AttachedFile Element 5170 name: "AttachedFile" 5172 path: "1*(\Segment\Attachments\AttachedFile)" 5174 id: "0x61A7" 5176 minOccurs: "1" 5178 type: "master" 5180 minver: "1" 5182 documentation: An attached file. 5184 9.3.6.1.1. FileDescription Element 5186 name: "FileDescription" 5188 path: "0*1(\Segment\Attachments\AttachedFile\FileDescription)" 5190 id: "0x467E" 5192 maxOccurs: "1" 5194 type: "utf-8" 5196 minver: "1" 5198 documentation: A human-friendly name for the attached file. 5200 9.3.6.1.2. FileName Element 5202 name: "FileName" 5204 path: "1*1(\Segment\Attachments\AttachedFile\FileName)" 5206 id: "0x466E" 5208 minOccurs: "1" 5210 maxOccurs: "1" 5212 type: "utf-8" 5214 minver: "1" 5215 documentation: Filename of the attached file. 5217 9.3.6.1.3. FileMimeType Element 5219 name: "FileMimeType" 5221 path: "1*1(\Segment\Attachments\AttachedFile\FileMimeType)" 5223 id: "0x4660" 5225 minOccurs: "1" 5227 maxOccurs: "1" 5229 type: "string" 5231 minver: "1" 5233 documentation: MIME type of the file. 5235 9.3.6.1.4. FileData Element 5237 name: "FileData" 5239 path: "1*1(\Segment\Attachments\AttachedFile\FileData)" 5241 id: "0x465C" 5243 minOccurs: "1" 5245 maxOccurs: "1" 5247 type: "binary" 5249 minver: "1" 5251 documentation: The data of the file. 5253 9.3.6.1.5. FileUID Element 5255 name: "FileUID" 5257 path: "1*1(\Segment\Attachments\AttachedFile\FileUID)" 5259 id: "0x46AE" 5261 minOccurs: "1" 5262 maxOccurs: "1" 5264 range: "not 0" 5266 type: "uinteger" 5268 minver: "1" 5270 documentation: Unique ID representing the file, as random as 5271 possible. 5273 9.3.6.1.6. FileReferral Element 5275 name: "FileReferral" 5277 path: "0*1(\Segment\Attachments\AttachedFile\FileReferral)" 5279 id: "0x4675" 5281 maxOccurs: "1" 5283 type: "binary" 5285 minver: "0" 5287 maxver: "0" 5289 documentation: A binary value that a track/codec can refer to when 5290 the attachment is needed. 5292 9.3.6.1.7. FileUsedStartTime Element 5294 name: "FileUsedStartTime" 5296 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)" 5298 id: "0x4661" 5300 maxOccurs: "1" 5302 type: "uinteger" 5304 minver: "0" 5306 maxver: "0" 5308 documentation: DivX font extension 5310 9.3.6.1.8. FileUsedEndTime Element 5312 name: "FileUsedEndTime" 5314 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)" 5316 id: "0x4662" 5318 maxOccurs: "1" 5320 type: "uinteger" 5322 minver: "0" 5324 maxver: "0" 5326 documentation: DivX font extension 5328 9.3.7. Chapters Element 5330 name: "Chapters" 5332 path: "0*1(\Segment\Chapters)" 5334 id: "0x1043A770" 5336 maxOccurs: "1" 5338 type: "master" 5340 recurring: "1" 5342 minver: "1" 5344 documentation: A system to define basic menus and partition data. 5345 For more detailed information, look at the Chapters Explanation. 5347 9.3.7.1. EditionEntry Element 5349 name: "EditionEntry" 5351 path: "1*(\Segment\Chapters\EditionEntry)" 5353 id: "0x45B9" 5355 minOccurs: "1" 5357 type: "master" 5358 minver: "1" 5360 documentation: Contains all information about a Segment edition. 5362 9.3.7.1.1. EditionUID Element 5364 name: "EditionUID" 5366 path: "0*1(\Segment\Chapters\EditionEntry\EditionUID)" 5368 id: "0x45BC" 5370 maxOccurs: "1" 5372 range: "not 0" 5374 type: "uinteger" 5376 minver: "1" 5378 documentation: A unique ID to identify the edition. It's useful for 5379 tagging an edition. 5381 9.3.7.1.2. EditionFlagHidden Element 5383 name: "EditionFlagHidden" 5385 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)" 5387 id: "0x45BD" 5389 minOccurs: "1" 5391 maxOccurs: "1" 5393 range: "0-1" 5395 default: "0" 5397 type: "uinteger" 5399 minver: "1" 5401 documentation: If an edition is hidden (1), it SHOULD NOT be 5402 available to the user interface (but still to Control Tracks; see 5403 flag notes). (1 bit) 5405 9.3.7.1.3. EditionFlagDefault Element 5407 name: "EditionFlagDefault" 5409 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)" 5411 id: "0x45DB" 5413 minOccurs: "1" 5415 maxOccurs: "1" 5417 range: "0-1" 5419 default: "0" 5421 type: "uinteger" 5423 minver: "1" 5425 documentation: If a flag is set (1) the edition SHOULD be used as the 5426 default one. (1 bit) 5428 9.3.7.1.4. EditionFlagOrdered Element 5430 name: "EditionFlagOrdered" 5432 path: "0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)" 5434 id: "0x45DD" 5436 maxOccurs: "1" 5438 range: "0-1" 5440 default: "0" 5442 type: "uinteger" 5444 minver: "1" 5446 documentation: Specify if the chapters can be defined multiple times 5447 and the order to play them is enforced. (1 bit) 5449 9.3.7.1.5. ChapterAtom Element 5451 name: "ChapterAtom" 5453 path: "1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))" 5455 id: "0xB6" 5457 minOccurs: "1" 5459 type: "master" 5461 recursive: "1" 5463 minver: "1" 5465 documentation: Contains the atom information to use as the chapter 5466 atom (apply to all tracks). 5468 9.3.7.1.5.1. ChapterUID Element 5470 name: "ChapterUID" 5472 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)" 5474 id: "0x73C4" 5476 minOccurs: "1" 5478 maxOccurs: "1" 5480 range: "not 0" 5482 type: "uinteger" 5484 minver: "1" 5486 documentation: A unique ID to identify the Chapter. 5488 9.3.7.1.5.2. ChapterStringUID Element 5490 name: "ChapterStringUID" 5492 path: 5493 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)" 5495 id: "0x5654" 5496 maxOccurs: "1" 5498 type: "utf-8" 5500 minver: "3" 5502 documentation: A unique string ID to identify the Chapter. Use for 5503 WebVTT cue identifier storage. 5505 9.3.7.1.5.3. ChapterTimeStart Element 5507 name: "ChapterTimeStart" 5509 path: 5510 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)" 5512 id: "0x91" 5514 minOccurs: "1" 5516 maxOccurs: "1" 5518 type: "uinteger" 5520 minver: "1" 5522 documentation: Timestamp of the start of Chapter (not scaled). 5524 9.3.7.1.5.4. ChapterTimeEnd Element 5526 name: "ChapterTimeEnd" 5528 path: 5529 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)" 5531 id: "0x92" 5533 maxOccurs: "1" 5535 type: "uinteger" 5537 minver: "1" 5539 documentation: Timestamp of the end of Chapter (timestamp excluded, 5540 not scaled). 5542 9.3.7.1.5.5. ChapterFlagHidden Element 5544 name: "ChapterFlagHidden" 5546 path: 5547 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)" 5549 id: "0x98" 5551 minOccurs: "1" 5553 maxOccurs: "1" 5555 range: "0-1" 5557 default: "0" 5559 type: "uinteger" 5561 minver: "1" 5563 documentation: If a chapter is hidden (1), it SHOULD NOT be available 5564 to the user interface (but still to Control Tracks; see flag notes). 5565 (1 bit) 5567 9.3.7.1.5.6. ChapterFlagEnabled Element 5569 name: "ChapterFlagEnabled" 5571 path: 5572 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)" 5574 id: "0x4598" 5576 minOccurs: "1" 5578 maxOccurs: "1" 5580 range: "0-1" 5582 default: "1" 5584 type: "uinteger" 5586 minver: "1" 5588 documentation: Specify whether the chapter is enabled. It can be 5589 enabled/disabled by a Control Track. When disabled, the movie SHOULD 5590 skip all the content between the TimeStart and TimeEnd of this 5591 chapter (see flag notes). (1 bit) 5593 9.3.7.1.5.7. ChapterSegmentUID Element 5595 name: "ChapterSegmentUID" 5597 path: 5598 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)" 5600 id: "0x6E67" 5602 maxOccurs: "1" 5604 range: ">0" 5606 size: "16" 5608 type: "binary" 5610 minver: "1" 5612 documentation: The SegmentUID of another Segment to play during this 5613 chapter. 5615 usage notes: ChapterSegmentUID is mandatory if 5616 ChapterSegmentEditionUID is used. 5618 9.3.7.1.5.8. ChapterSegmentEditionUID Element 5620 name: "ChapterSegmentEditionUID" 5622 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentE 5623 ditionUID)" 5625 id: "0x6EBC" 5627 maxOccurs: "1" 5629 range: "not 0" 5631 type: "uinteger" 5633 minver: "1" 5635 documentation: The EditionUID to play from the Segment linked in 5636 ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no 5637 Edition of the linked Segment is used. 5639 9.3.7.1.5.9. ChapterPhysicalEquiv Element 5641 name: "ChapterPhysicalEquiv" 5643 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysical 5644 Equiv)" 5646 id: "0x63C3" 5648 maxOccurs: "1" 5650 type: "uinteger" 5652 minver: "1" 5654 documentation: Specify the physical equivalent of this ChapterAtom 5655 like "DVD" (60) or "SIDE" (50), see complete list of values. 5657 9.3.7.1.5.10. ChapterTrack Element 5659 name: "ChapterTrack" 5661 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)" 5663 id: "0x8F" 5665 maxOccurs: "1" 5667 type: "master" 5669 minver: "1" 5671 documentation: List of tracks on which the chapter applies. If this 5672 Element is not present, all tracks apply 5674 9.3.7.1.5.11. ChapterTrackNumber Element 5676 name: "ChapterTrackNumber" 5678 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\Cha 5679 pterTrackNumber)" 5681 id: "0x89" 5683 minOccurs: "1" 5685 range: "not 0" 5686 type: "uinteger" 5688 minver: "1" 5690 documentation: UID of the Track to apply this chapter too. In the 5691 absence of a control track, choosing this chapter will select the 5692 listed Tracks and deselect unlisted tracks. Absence of this Element 5693 indicates that the Chapter SHOULD be applied to any currently used 5694 Tracks. 5696 9.3.7.1.5.12. ChapterDisplay Element 5698 name: "ChapterDisplay" 5700 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)" 5702 id: "0x80" 5704 type: "master" 5706 minver: "1" 5708 documentation: Contains all possible strings to use for the chapter 5709 display. 5711 9.3.7.1.5.13. ChapString Element 5713 name: "ChapString" 5715 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ 5716 ChapString)" 5718 id: "0x85" 5720 minOccurs: "1" 5722 maxOccurs: "1" 5724 type: "utf-8" 5726 minver: "1" 5728 documentation: Contains the string to use as the chapter atom. 5730 9.3.7.1.5.14. ChapLanguage Element 5732 name: "ChapLanguage" 5734 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5735 hapLanguage)" 5737 id: "0x437C" 5739 minOccurs: "1" 5741 default: "eng" 5743 type: "string" 5745 minver: "1" 5747 documentation: The languages corresponding to the string, in the 5748 bibliographic ISO-639-2 form. This Element MUST be ignored if the 5749 ChapLanguageIETF Element is used within the same ChapterDisplay 5750 Element. 5752 9.3.7.1.5.15. ChapLanguageIETF Element 5754 name: "ChapLanguageIETF" 5756 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5757 hapLanguageIETF)" 5759 id: "0x437D" 5761 type: "string" 5763 minver: "4" 5765 documentation: Specifies the language used in the ChapString 5766 according to BCP 47 and using the IANA Language Subtag Registry. If 5767 this Element is used, then any ChapLanguage Elements used in the same 5768 ChapterDisplay MUST be ignored. 5770 9.3.7.1.5.16. ChapCountry Element 5772 name: "ChapCountry" 5774 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5775 hapCountry)" 5777 id: "0x437E" 5778 type: "string" 5780 minver: "1" 5782 documentation: The countries corresponding to the string, same 2 5783 octets as in Internet domains. This Element MUST be ignored if the 5784 ChapLanguageIETF Element is used within the same ChapterDisplay 5785 Element. 5787 9.3.7.1.5.17. ChapProcess Element 5789 name: "ChapProcess" 5791 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)" 5793 id: "0x6944" 5795 type: "master" 5797 minver: "1" 5799 documentation: Contains all the commands associated to the Atom. 5801 9.3.7.1.5.18. ChapProcessCodecID Element 5803 name: "ChapProcessCodecID" 5805 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5806 pProcessCodecID)" 5808 id: "0x6955" 5810 minOccurs: "1" 5812 maxOccurs: "1" 5814 default: "0" 5816 type: "uinteger" 5818 minver: "1" 5820 documentation: Contains the type of the codec used for the 5821 processing. A value of 0 means native Matroska processing (to be 5822 defined), a value of 1 means the DVD command set is used. More codec 5823 IDs can be added later. 5825 9.3.7.1.5.19. ChapProcessPrivate Element 5827 name: "ChapProcessPrivate" 5829 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5830 pProcessPrivate)" 5832 id: "0x450D" 5834 maxOccurs: "1" 5836 type: "binary" 5838 minver: "1" 5840 documentation: Some optional data attached to the ChapProcessCodecID 5841 information. For ChapProcessCodecID = 1, it is the "DVD level" 5842 equivalent. 5844 9.3.7.1.5.20. ChapProcessCommand Element 5846 name: "ChapProcessCommand" 5848 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Chap 5849 ProcessCommand)" 5851 id: "0x6911" 5853 type: "master" 5855 minver: "1" 5857 documentation: Contains all the commands associated to the Atom. 5859 9.3.7.1.5.21. ChapProcessTime Element 5861 name: "ChapProcessTime" 5863 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5864 pProcessCommand\ChapProcessTime)" 5866 id: "0x6922" 5868 minOccurs: "1" 5870 maxOccurs: "1" 5872 type: "uinteger" 5873 minver: "1" 5875 documentation: Defines when the process command SHOULD be handled 5877 restrictions: 5879 +-------+-------------------------------+ 5880 | value | label | 5881 +-------+-------------------------------+ 5882 | "0" | during the whole chapter | 5883 | "1" | before starting playback | 5884 | "2" | after playback of the chapter | 5885 +-------+-------------------------------+ 5887 9.3.7.1.5.22. ChapProcessData Element 5889 name: "ChapProcessData" 5891 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5892 pProcessCommand\ChapProcessData)" 5894 id: "0x6933" 5896 minOccurs: "1" 5898 maxOccurs: "1" 5900 type: "binary" 5902 minver: "1" 5904 documentation: Contains the command information. The data SHOULD be 5905 interpreted depending on the ChapProcessCodecID value. For 5906 ChapProcessCodecID = 1, the data correspond to the binary DVD cell 5907 pre/post commands. 5909 9.3.8. Tags Element 5911 name: "Tags" 5913 path: "0*(\Segment\Tags)" 5915 id: "0x1254C367" 5917 type: "master" 5919 minver: "1" 5920 documentation: Element containing metadata describing Tracks, 5921 Editions, Chapters, Attachments, or the Segment as a whole. A list 5922 of valid tags can be found here. 5924 9.3.8.1. Tag Element 5926 name: "Tag" 5928 path: "1*(\Segment\Tags\Tag)" 5930 id: "0x7373" 5932 minOccurs: "1" 5934 type: "master" 5936 minver: "1" 5938 documentation: A single metadata descriptor. 5940 9.3.8.1.1. Targets Element 5942 name: "Targets" 5944 path: "1*1(\Segment\Tags\Tag\Targets)" 5946 id: "0x63C0" 5948 minOccurs: "1" 5950 maxOccurs: "1" 5952 type: "master" 5954 minver: "1" 5956 documentation: Specifies which other elements the metadata 5957 represented by the Tag applies to. If empty or not present, then the 5958 Tag describes everything in the Segment. 5960 9.3.8.1.1.1. TargetTypeValue Element 5962 name: "TargetTypeValue" 5964 path: "0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)" 5966 id: "0x68CA" 5967 maxOccurs: "1" 5969 default: "50" 5971 type: "uinteger" 5973 minver: "1" 5975 documentation: A number to indicate the logical level of the target. 5977 restrictions: 5979 +-------+----------------------+------------------------------------+ 5980 | value | label | documentation | 5981 +-------+----------------------+------------------------------------+ 5982 | "70" | COLLECTION | The highest hierarchical level | 5983 | | | that tags can describe. | 5984 | "60" | EDITION / ISSUE / | A list of lower levels grouped | 5985 | | VOLUME / OPUS / | together. | 5986 | | SEASON / SEQUEL | | 5987 | "50" | ALBUM / OPERA / | The most common grouping level of | 5988 | | CONCERT / MOVIE / | music and video (equals to an | 5989 | | EPISODE / CONCERT | episode for TV series). | 5990 | "40" | PART / SESSION | When an album or episode has | 5991 | | | different logical parts. | 5992 | "30" | TRACK / SONG / | The common parts of an album or | 5993 | | CHAPTER | movie. | 5994 | "20" | SUBTRACK / PART / | Corresponds to parts of a track | 5995 | | MOVEMENT / SCENE | for audio (like a movement). | 5996 | "10" | SHOT | The lowest hierarchy found in | 5997 | | | music or movies. | 5998 +-------+----------------------+------------------------------------+ 6000 9.3.8.1.1.2. TargetType Element 6002 name: "TargetType" 6004 path: "0*1(\Segment\Tags\Tag\Targets\TargetType)" 6006 id: "0x63CA" 6008 maxOccurs: "1" 6010 type: "string" 6012 minver: "1" 6013 documentation: An informational string that can be used to display 6014 the logical level of the target like "ALBUM", "TRACK", "MOVIE", 6015 "CHAPTER", etc (see TargetType). 6017 restrictions: 6019 +--------------+------------+ 6020 | value | label | 6021 +--------------+------------+ 6022 | "COLLECTION" | COLLECTION | 6023 | "EDITION" | EDITION | 6024 | "ISSUE" | ISSUE | 6025 | "VOLUME" | VOLUME | 6026 | "OPUS" | OPUS | 6027 | "SEASON" | SEASON | 6028 | "SEQUEL" | SEQUEL | 6029 | "ALBUM" | ALBUM | 6030 | "OPERA" | OPERA | 6031 | "CONCERT" | CONCERT | 6032 | "MOVIE" | MOVIE | 6033 | "EPISODE" | EPISODE | 6034 | "PART" | PART | 6035 | "SESSION" | SESSION | 6036 | "TRACK" | TRACK | 6037 | "SONG" | SONG | 6038 | "CHAPTER" | CHAPTER | 6039 | "SUBTRACK" | SUBTRACK | 6040 | "PART" | PART | 6041 | "MOVEMENT" | MOVEMENT | 6042 | "SCENE" | SCENE | 6043 | "SHOT" | SHOT | 6044 +--------------+------------+ 6046 9.3.8.1.1.3. TagTrackUID Element 6048 name: "TagTrackUID" 6050 path: "0*(\Segment\Tags\Tag\Targets\TagTrackUID)" 6052 id: "0x63C5" 6054 default: "0" 6056 type: "uinteger" 6058 minver: "1" 6059 documentation: A unique ID to identify the Track(s) the tags belong 6060 to. If the value is 0 at this level, the tags apply to all tracks in 6061 the Segment. 6063 9.3.8.1.1.4. TagEditionUID Element 6065 name: "TagEditionUID" 6067 path: "0*(\Segment\Tags\Tag\Targets\TagEditionUID)" 6069 id: "0x63C9" 6071 default: "0" 6073 type: "uinteger" 6075 minver: "1" 6077 documentation: A unique ID to identify the EditionEntry(s) the tags 6078 belong to. If the value is 0 at this level, the tags apply to all 6079 editions in the Segment. 6081 9.3.8.1.1.5. TagChapterUID Element 6083 name: "TagChapterUID" 6085 path: "0*(\Segment\Tags\Tag\Targets\TagChapterUID)" 6087 id: "0x63C4" 6089 default: "0" 6091 type: "uinteger" 6093 minver: "1" 6095 documentation: A unique ID to identify the Chapter(s) the tags belong 6096 to. If the value is 0 at this level, the tags apply to all chapters 6097 in the Segment. 6099 9.3.8.1.1.6. TagAttachmentUID Element 6101 name: "TagAttachmentUID" 6103 path: "0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)" 6105 id: "0x63C6" 6106 default: "0" 6108 type: "uinteger" 6110 minver: "1" 6112 documentation: A unique ID to identify the Attachment(s) the tags 6113 belong to. If the value is 0 at this level, the tags apply to all 6114 the attachments in the Segment. 6116 9.3.8.1.2. SimpleTag Element 6118 name: "SimpleTag" 6120 path: "1*(\Segment\Tags\Tag(1*(\SimpleTag)))" 6122 id: "0x67C8" 6124 minOccurs: "1" 6126 type: "master" 6128 recursive: "1" 6130 minver: "1" 6132 documentation: Contains general information about the target. 6134 9.3.8.1.2.1. TagName Element 6136 name: "TagName" 6138 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagName)" 6140 id: "0x45A3" 6142 minOccurs: "1" 6144 maxOccurs: "1" 6146 type: "utf-8" 6148 minver: "1" 6150 documentation: The name of the Tag that is going to be stored. 6152 9.3.8.1.2.2. TagLanguage Element 6154 name: "TagLanguage" 6156 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)" 6158 id: "0x447A" 6160 minOccurs: "1" 6162 maxOccurs: "1" 6164 default: "und" 6166 type: "string" 6168 minver: "1" 6170 documentation: Specifies the language of the tag specified, in the 6171 Matroska languages form. This Element MUST be ignored if the 6172 TagLanguageIETF Element is used within the same SimpleTag Element. 6174 9.3.8.1.2.3. TagLanguageIETF Element 6176 name: "TagLanguageIETF" 6178 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagLanguageIETF)" 6180 id: "0x447B" 6182 maxOccurs: "1" 6184 type: "string" 6186 minver: "4" 6188 documentation: Specifies the language used in the TagString according 6189 to BCP 47 and using the IANA Language Subtag Registry. If this 6190 Element is used, then any TagLanguage Elements used in the same 6191 SimpleTag MUST be ignored. 6193 9.3.8.1.2.4. TagDefault Element 6195 name: "TagDefault" 6197 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)" 6199 id: "0x4484" 6200 minOccurs: "1" 6202 maxOccurs: "1" 6204 range: "0-1" 6206 default: "1" 6208 type: "uinteger" 6210 minver: "1" 6212 documentation: A boolean value to indicate if this is the default/ 6213 original language to use for the given tag. 6215 9.3.8.1.2.5. TagString Element 6217 name: "TagString" 6219 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagString)" 6221 id: "0x4487" 6223 maxOccurs: "1" 6225 type: "utf-8" 6227 minver: "1" 6229 documentation: The value of the Tag. 6231 9.3.8.1.2.6. TagBinary Element 6233 name: "TagBinary" 6235 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)" 6237 id: "0x4485" 6239 maxOccurs: "1" 6241 type: "binary" 6243 minver: "1" 6245 documentation: The values of the Tag if it is binary. Note that this 6246 cannot be used in the same SimpleTag as TagString. 6248 10. Matroska Element Ordering 6250 Except for the "EBML Header" and the "CRC-32 Element", the EBML 6251 specification does not require any particular storage order for 6252 "Elements". The Matroska specification however defines mandates and 6253 recommendations for ordering certain "Elements" in order to 6254 facilitate better playback, seeking, and editing efficiency. This 6255 section describes and offers rationale for ordering requirements and 6256 recommendations for Matroska. 6258 10.1. Top-Level Elements 6260 The "Info Element" is the only REQUIRED "Top-Level Element" in a 6261 Matroska file. To be playable, Matroska MUST also contain at least 6262 one "Tracks Element" and "Cluster Element". The first "Info Element" 6263 and the first "Tracks Element" MUST either be stored before the first 6264 "Cluster Element" or both SHALL be referenced by a "SeekHead Element" 6265 occurring before the first "Cluster Element". 6267 It is possible to edit a Matroska file after it has been created. 6268 For example, chapters, tags or attachments can be added. When new 6269 "Top-Level Elements" are added to a Matroska file, the "SeekHead" 6270 Element(s) MUST be updated so that the "SeekHead" Element(s) itemize 6271 the identity and position of all "Top-Level Elements". Editing, 6272 removing, or adding "Elements" to a Matroska file often requires that 6273 some existing "Elements" be voided or extended; therefore, it is 6274 RECOMMENDED to use "Void Elements" as padding in between "Top-Level 6275 Elements". 6277 10.2. CRC-32 6279 As noted by the EBML specification, if a "CRC-32 Element" is used 6280 then the "CRC-32 Element" MUST be the first ordered "Element" within 6281 its "Parent Element". The Matroska specification recommends that 6282 "CRC-32 Elements" SHOULD NOT be used as an immediate "Child Element" 6283 of the "Segment Element"; however all "Top-Level Elements" of an 6284 "EBML Document" SHOULD include a "CRC-32 Element" as a "Child 6285 Element". 6287 10.3. SeekHead 6289 If used, the first "SeekHead Element" SHOULD be the first non-"CRC-32 6290 Child Element" of the "Segment Element". If a second "SeekHead 6291 Element" is used, then the first "SeekHead Element" MUST reference 6292 the identity and position of the second "SeekHead". Additionally, 6293 the second "SeekHead Element" MUST only reference "Cluster" Elements 6294 and not any other "Top-Level Element" already contained within the 6295 first "SeekHead Element". The second "SeekHead Element" MAY be 6296 stored in any order relative to the other "Top-Level Elements." 6297 Whether one or two "SeekHead Element(s)" are used, the "SeekHead 6298 Element(s)" MUST collectively reference the identity and position of 6299 all "Top-Level Elements" except for the first "SeekHead Element". 6301 It is RECOMMENDED that the first "SeekHead Element" be followed by a 6302 "Void Element" to allow for the "SeekHead Element" to be expanded to 6303 cover new "Top-Level Elements" that could be added to the Matroska 6304 file, such as "Tags", "Chapters" and "Attachments Elements". 6306 10.4. Cues (index) 6308 The "Cues Element" is RECOMMENDED to optimize seeking access in 6309 Matroska. It is programmatically simpler to add the "Cues Element" 6310 after all "Cluster Elements" have been written because this does not 6311 require a prediction of how much space to reserve before writing the 6312 "Cluster Elements". However, storing the "Cues Element" before the 6313 "Cluster Elements" can provide some seeking advantages. If the "Cues 6314 Element" is present, then it SHOULD either be stored before the first 6315 "Cluster Element" or be referenced by a "SeekHead Element". 6317 10.5. Info 6319 The first "Info Element" SHOULD occur before the first "Tracks 6320 Element" and first "Cluster Element" except when referenced by a 6321 "SeekHead Element". 6323 10.6. Chapters Element 6325 The "Chapters Element" SHOULD be placed before the "Cluster 6326 Element(s)". The "Chapters Element" can be used during playback even 6327 if the user does not need to seek. It immediately gives the user 6328 information about what section is being read and what other sections 6329 are available. In the case of Ordered Chapters it RECOMMENDED to 6330 evaluate the logical linking even before playing. The "Chapters 6331 Element" SHOULD be placed before the first "Tracks Element" and after 6332 the first "Info Element". 6334 10.7. Attachments 6336 The "Attachments Element" is not intended to be used by default when 6337 playing the file, but could contain information relevant to the 6338 content, such as cover art or fonts. Cover art is useful even before 6339 the file is played and fonts could be needed before playback starts 6340 for initialization of subtitles. The "Attachments Element" MAY be 6341 placed before the first "Cluster Element"; however if the 6342 "Attachments Element" is likely to be edited, then it SHOULD be 6343 placed after the last "Cluster Element". 6345 10.8. Tags 6347 The "Tags Element" is most subject to changes after the file was 6348 originally created. For easier editing, the "Tags Element" SHOULD be 6349 placed at the end of the "Segment Element", even after the 6350 "Attachments Element". On the other hand, it is inconvenient to have 6351 to seek in the "Segment" for tags, especially for network streams. 6352 So it's better if the "Tags Element" is found early in the stream. 6353 When editing the "Tags Element", the original "Tags Element" at the 6354 beginning can be overwritten with a "Void Element" and a new "Tags 6355 Element" written at the end of the "Segment Element". The file size 6356 will only marginally change. 6358 10.9. Optimum layout from a muxer 6360 o SeekHead 6362 o Info 6364 o Tracks 6366 o Chapters 6368 o Attachments 6370 o Tags 6372 o Clusters 6374 o Cues 6376 10.10. Optimum layout after editing tags 6378 o SeekHead 6380 o Info 6382 o Tracks 6384 o Chapters 6386 o Attachments 6388 o Void 6390 o Clusters 6392 o Cues 6393 o Tags 6395 10.11. Optimum layout with Cues at the front 6397 o SeekHead 6399 o Info 6401 o Tracks 6403 o Chapters 6405 o Attachments 6407 o Tags 6409 o Cues 6411 o Clusters 6413 10.12. Cluster Timestamp 6415 The "Timestamp Element" MUST occur as in storage order before any 6416 "SimpleBlock", "BlockGroup", or "EncryptedBlock" within the "Cluster 6417 Element". 6419 11. Chapters 6421 11.1. Edition and Chapter Flags 6423 11.1.1. Chapter Flags 6425 Two "Chapter Flags" are defined to describe the behavior of the 6426 "ChapterAtom Element": "ChapterFlagHidden" and "ChapterFlagEnabled". 6428 If a "ChapterAtom Element" is the "Child Element" of another 6429 "ChapterAtom Element" with a "Chapter Flag" set to "true", then the 6430 "Child ChapterAtom Element" MUST be interpreted as having its same 6431 "Chapter Flag" set to "true". If a "ChapterAtom Element" is the 6432 "Child Element" of another "ChapterAtom Element" with a "Chapter 6433 Flag" set to "false" or if the "ChapterAtom Element" does not have a 6434 "ChapterAtom Element" as its "Parent Element", then it MUST be 6435 interpreted according to its own "Chapter Flag". 6437 As an example, consider a "Parent ChapterAtom Element" that has its 6438 "ChapterFlagHidden" set to "true" and also contains two child 6439 "ChapterAtoms", the first with "ChapterFlagHidden" set to "true" and 6440 the second with "ChapterFlagHidden" either set to "false" or not 6441 present at all (in which case the default value of the Element 6442 applies, which is "false"). Since the parent "ChapterAtom" has its 6443 "ChapterFlagHidden" set to "true" then all of its children 6444 "ChapterAtoms" MUST also be interpreted as if their 6445 "ChapterFlagHidden" is also set to "true". However, if a "Control 6446 Track" toggles the parent's "ChapterFlagHidden" flag to "false", then 6447 only the parent "ChapterAtom" and its second child "ChapterAtom" MUST 6448 be interpreted as if "ChapterFlagHidden" is set to "false". The 6449 first child "ChapterAtom" which has the "ChapterFlagHidden" flag set 6450 to "true" retains its value until its value is toggled to "false" by 6451 a "Control Track". 6453 11.1.2. Edition Flags 6455 Three "Edition Flags" are defined to describe the behavior of the 6456 "EditionEntry Element": "EditionFlagHidden", "EditionFlagDefault" and 6457 "EditionFlagOrdered". 6459 11.1.2.1. EditionFlagHidden 6461 The "EditionFlagHidden Flag" behaves similarly to the 6462 "ChapterFlagHidden Flag": if "EditionFlagHidden" is set to "true", 6463 its "Child ChapterAtoms Elements" MUST also be interpreted as if 6464 their "ChapterFlagHidden" is also set to "true", regardless of their 6465 own "ChapterFlagHidden Flags". If "EditionFlagHidden" is toggled by 6466 a "Control Track" to "false", the "ChapterFlagHidden Flags" of the 6467 "Child ChapterAtoms Elements" SHALL determine whether the 6468 "ChapterAtom" is hidden or not. 6470 11.1.2.2. EditionFlagDefault 6472 It is RECOMMENDED that no more than one "Edition" have an 6473 "EditionFlagDefault Flag" set to "true". The first "Edition" with 6474 both the "EditionFlagDefault Flag" set to "true" and the 6475 "EditionFlagHidden Flag" set to "false" is the "Default Edition". 6476 When all "EditionFlagDefault Flags" are set to "false", then the 6477 first "Edition" is the "Default Edition". 6479 11.1.2.3. EditionFlagOrdered 6481 The "EditionFlagOrdered Flag" is a significant feature as it enables 6482 an "Edition" of "Ordered Chapters" which defines and arranges a 6483 virtual timeline rather than simply labeling points within the 6484 timeline. For example, with "Editions" of "Ordered Chapters" a 6485 single "Matroska file" can present multiple edits of a film without 6486 duplicating content. Alternatively if a videotape is digitized in 6487 full, one "Ordered Edition" could present the full content (including 6488 colorbars, countdown, slate, a feature presentation, and black 6489 frames), while another "Edition" of "Ordered Chapters" can use 6490 "Chapters" that only mark the intended presentation with the 6491 colorbars and other ancillary visual information excluded. If an 6492 "Edition" of "Ordered Chapters" is enabled then the "Matroska Player" 6493 MUST play those Chapters in their stored order from the timestamp 6494 marked in the "ChapterTimeStart Element" to the timestamp marked in 6495 to "ChapterTimeEnd Element". 6497 If the "EditionFlagOrdered Flag" is set to "false", "Simple Chapters" 6498 are used and only the "ChapterTimeStart" of a "Chapter" is used as 6499 chapter mark to jump to the predefined point in the timeline. With 6500 "Simple Chapters", a "Matroska Player" MUST ignore certain "Chapter 6501 Elements". All these elements are now informational only. 6503 The following list shows the different usage of "Chapter Elements" 6504 between an ordered and non-ordered "Edition". 6506 Chapter elements / ordered Edition | False | True ChapterUID | X | X 6507 ChapterStringUID | X | X ChapterTimeStart | X | X ChapterTimeEnd | 6508 - | X ChapterFlagHidden | X | X ChapterFlagEnabled | X | X 6509 ChapterSegmentUID | - | X ChapterSegmentEditionUID | - | X 6510 ChapterPhysicalEquiv | X | X ChapterTrack | - | X ChapterDisplay | 6511 X | X ChapProcess | - | X 6513 Furthermore there are other EBML "Elements" which could be used if 6514 the "EditionFlagOrdered Flag" is set to "true". 6516 Other elements / ordered Edition | False | True Info/SegmentFamily | 6517 - | X Info/ChapterTranslate | - | X Track/TrackTranslate | - | X 6519 These other "Elements" belong to the Matroska DVD menu system and are 6520 only used when the "ChapProcessCodecID Element" is set to 1. 6522 11.1.2.3.1. Ordered-Edition and Matroska Segment-Linking 6524 o Hard Linking: "Ordered-Chapters" supersedes the "Hard Linking". 6526 o Soft Linking: In this complex system "Ordered Chapters" are 6527 REQUIRED and a "Chapter CODEC" MUST interpret the "ChapProcess" of 6528 all chapters. 6530 o Medium Linking: "Ordered Chapters" are used in a normal way and 6531 can be combined with the "ChapterSegmentUID" element which 6532 establishes a link to another Matroska file/Segment. 6534 See Section 24) for more information about "Hard Linking", "Soft 6535 Linking" and "Medium Linking". 6537 11.2. Menu features 6539 The menu features are handled like a _chapter codec_. That means each 6540 codec has a type, some private data and some data in the chapters. 6542 The type of the menu system is defined by the "ChapProcessCodecID" 6543 parameter. For now only 2 values are supported : 0 matroska script, 6544 1 menu borrowed from the DVD. The private data depend on the type of 6545 menu system (stored in ChapProcessPrivate), idem for the data in the 6546 chapters (stored in ChapProcessData). 6548 11.2.1. Matroska Script (0) 6550 This is the case when "ChapProcessCodecID" = 0. This is a script 6551 language build for Matroska purposes. The inspiration comes from 6552 ActionScript, javascript and other similar scripting languages. The 6553 commands are stored as text commands, in UTF-8. The syntax is C 6554 like, with commands spanned on many lines, each terminating with a 6555 ";". You can also include comments at the end of lines with "//" or 6556 comment many lines using "/* */". The scripts are stored in 6557 ChapProcessData. For the moment ChapProcessPrivate is not used. 6559 The one and only command existing for the moment is "GotoAndPlay( 6560 ChapterUID );". As the same suggests, it means that when this 6561 command is encountered, the "Matroska Player" SHOULD jump to the 6562 "Chapter" specified by the UID and play it. 6564 11.2.2. DVD menu (1) 6566 This is the case when "ChapProcessCodecID" = 1. Each level of a 6567 chapter corresponds to a logical level in the DVD system that is 6568 stored in the first octet of the ChapProcessPrivate. This DVD 6569 hierarchy is as follows: 6571 ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible | 6572 Comment 0x30 | SS | DVD domain | - | First Play, Video Manager, Video 6573 Title 0x2A | LU | Language Unit | - | Contains only PGCs 0x28 | TT | 6574 Title | - | Contains only PGCs 0x20 | PGC | Program Group Chain 6575 (PGC) | * | 0x18 | PG | Program 1 / Program 2 / Program 3 | - | 6576 0x10 | PTT | Part Of Title 1 / Part Of Title 2 | - | Equivalent to 6577 the chapters on the sleeve. 0x08 | CN | Cell 1 / Cell 2 / Cell 3 / 6578 Cell 4 / Cell 5 / Cell 6 | - | 6580 You can also recover wether a Segment is a Video Manager (VMG), Video 6581 Title Set (VTS) or Video Title Set Menu (VTSM) from the 6582 ChapterTranslateID element found in the Segment Info. This field 6583 uses 2 octets as follows: 6585 1. Domain Type: 0 for VMG, the domain number for VTS and VTSM 6587 2. Domain Value: 0 for VMG and VTSM, 1 for the VTS source. 6589 For instance, the menu part from VTS_01_0.VOB would be coded [1,0] 6590 and the content part from VTS_02_3.VOB would be [2,1]. The VMG is 6591 always [0,0] 6593 The following octets of ChapProcessPrivate are as follows: 6595 Octet 1 | DVD Name | Following Octets 0x30 | SS | Domain name code 6596 (1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) 6597 number (2) 0x2A | LU | Language code (2) + Language extension (1) 6598 0x28 | TT | global Title number (2) + corresponding TTN of the VTS 6599 (1) 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User 6600 Operations (4) 0x18 | PG | Program number (2) 0x10 | PTT | PTT- 6601 chapter number (1) 0x08 | CN | Cell number [VOB ID(2)][Cell 6602 ID(1)][Angle Num(1)] 6604 If the level specified in ChapProcessPrivate is a PGC (0x20), there 6605 is an octet called the Playback Type, specifying the kind of PGC 6606 defined: 6608 o 0x00: entry only/basic PGC 6610 o 0x82: Title+Entry Menu (only found in the Video Manager domain) 6612 o 0x83: Root Menu (only found in the VTSM domain) 6614 o 0x84: Subpicture Menu (only found in the VTSM domain) 6616 o 0x85: Audio Menu (only found in the VTSM domain) 6618 o 0x86: Angle Menu (only found in the VTSM domain) 6620 o 0x87: Chapter Menu (only found in the VTSM domain) 6622 The next 4 following octets correspond to the User Operation flags 6623 [17] in the standard PGC. When a bit is set, the command SHOULD be 6624 disabled. 6626 ChapProcessData contains the pre/post/cell commands in binary format 6627 as there are stored on a DVD. There is just an octet preceding these 6628 data to specify the number of commands in the element. As follows: 6629 [# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)]. 6631 More information on the DVD commands and format on DVD-replica [18], 6632 where we got most of the info about it. You can also get information 6633 on DVD from the DVDinfo project [19]. 6635 11.3. Example 1 : basic chaptering 6637 In this example a movie is split in different chapters. It could 6638 also just be an audio file (album) on which each track corresponds to 6639 a chapter. 6641 o 00000ms - 05000ms : Intro 6643 o 05000ms - 25000ms : Before the crime 6645 o 25000ms - 27500ms : The crime 6647 o 27500ms - 38000ms : The killer arrested 6649 o 38000ms - 43000ms : Credits 6651 This would translate in the following matroska form : 6653 6654 6655 16603393396715046047 6656 6657 1193046 6658 0 6659 5000000000 6660 6661 Intro 6662 eng 6663 6664 0 6665 1 6666 6667 6668 2311527 6669 5000000000 6670 25000000000 6671 6672 Before the crime 6673 eng 6674 6675 6676 Avant le crime 6677 fra 6678 6679 0 6680 1 6681 6682 6683 3430008 6684 25000000000 6685 27500000000 6686 6687 The crime 6688 eng 6689 6690 6691 Le crime 6692 fra 6693 6694 0 6695 1 6696 6697 6698 4548489 6699 27500000000 6700 38000000000 6701 6702 After the crime 6703 eng 6704 6705 6706 Apres le crime 6707 fra 6708 6709 0 6710 1 6711 6712 6713 5666960 6714 38000000000 6715 43000000000 6716 6717 Credits 6718 eng 6719 6720 6721 Generique 6722 fra 6723 6724 0 6725 1 6726 6727 0 6728 0 6729 6730 6732 11.4. Example 2 : nested chapters 6734 In this example an (existing) album is split into different chapters, 6735 and one of them contain another splitting. 6737 11.4.1. The Micronauts "Bleep To Bleep" 6739 o 00:00 - 12:28 : Baby Wants To Bleep/Rock 6741 * 00:00 - 04:38 : Baby wants to bleep (pt.1) 6743 * 04:38 - 07:12 : Baby wants to rock 6745 * 07:12 - 10:33 : Baby wants to bleep (pt.2) 6747 * 10:33 - 12:28 : Baby wants to bleep (pt.3) 6749 o 12:30 - 19:38 : Bleeper_O+2 6751 o 19:40 - 22:20 : Baby wants to bleep (pt.4) 6753 o 22:22 - 25:18 : Bleep to bleep 6755 o 25:20 - 33:35 : Baby wants to bleep (k) 6757 o 33:37 - 44:28 : Bleeper 6759 6760 6761 1281690858003401414 6762 6763 1 6764 0 6765 748000000 6766 6767 Baby wants to Bleep/Rock 6768 eng 6769 6770 6771 2 6772 0 6773 278000000 6774 6775 Baby wants to bleep (pt.1) 6776 eng 6777 6778 0 6779 1 6780 6781 6782 3 6783 278000000 6784 432000000 6785 6786 Baby wants to rock 6787 eng 6788 6789 0 6790 1 6791 6792 6793 4 6794 432000000 6795 633000000 6796 6797 Baby wants to bleep (pt.2) 6798 eng 6799 6800 0 6801 1 6802 6803 6804 5 6805 633000000 6806 748000000 6807 6808 Baby wants to bleep (pt.3) 6809 eng 6810 6811 0 6812 1 6813 6814 0 6815 1 6816 6817 6818 6 6819 750000000 6820 1178500000 6821 6822 Bleeper_O+2 6823 eng 6824 6825 0 6826 1 6827 6828 6829 7 6830 1180500000 6831 1340000000 6832 6833 Baby wants to bleep (pt.4) 6834 eng 6835 6836 0 6837 1 6838 6839 6840 8 6841 1342000000 6842 1518000000 6843 6844 Bleep to bleep 6845 eng 6846 6847 0 6848 1 6849 6850 6851 9 6852 1520000000 6853 2015000000 6854 6855 Baby wants to bleep (k) 6856 eng 6857 6858 0 6859 1 6860 6861 6862 10 6863 2017000000 6864 2668000000 6865 6866 Bleeper 6867 eng 6868 6869 0 6870 1 6872 6873 0 6874 0 6875 6876 6878 12. Attachments 6880 Matroska supports storage of related files and data in the 6881 "Attachments Element" (a "Top-Level Element"). "Attachment Elements" 6882 can be used to store related cover art, font files, transcripts, 6883 reports, error recovery files, picture or text-based annotations, 6884 copies of specifications, or other ancillary files related to the 6885 "Segment". 6887 "Matroska Readers" MUST NOT execute files stored as "Attachment 6888 Elements". 6890 12.1. Cover Art 6892 This section defines a set of guidelines for the storage of cover art 6893 in Matroska files. A "Matroska Reader" MAY use embedded cover art to 6894 display a representational still-image depiction of the multimedia 6895 contents of the Matroska file. 6897 Only JPEG and PNG image formats SHOULD be used for cover art 6898 pictures. 6900 There can be two different covers for a movie/album: a portrait style 6901 (e.g., a DVD case) and a landscape style (e.g., a wide banner ad). 6903 There can be two versions of the same cover, the "normal cover" and 6904 the "small cover". The dimension of the "normal cover" SHOULD be 600 6905 pixels on the smallest side (for example, 960x600 for landscape, 6906 600x800 for portrait, or 600x600 for square). The dimension of the 6907 "small cover" SHOULD be 120 pixels on the smallest side (for example, 6908 192x120 or 120x160). 6910 Versions of cover art can be differentiated by the filename, which is 6911 stored in the "FileName Element". The default filename of the 6912 "normal cover" in square or portrait mode is "cover.(jpg|png)". When 6913 stored, the "normal cover" SHOULD be the first Attachment in storage 6914 order. The "small cover" SHOULD be prefixed with "small_", such as 6915 "small_cover.(jpg|png)". The landscape variant SHOULD be suffixed 6916 with "_land", such as "cover_land.(jpg|png)". The filenames are case 6917 sensitive. 6919 The following table provides examples of file names for cover art in 6920 Attachments. 6922 FileName | Image Orientation | Pixel Length of Smallest Side 6923 cover.jpg | Portrait or square | 600 small_cover.png | Portrait or 6924 square | 120 cover_land.png | Landscape | 600 small_cover_land.jpg | 6925 Landscape | 120 6927 13. Cues 6929 The "Cues Element" provides an index of certain "Cluster Elements" to 6930 allow for optimized seeking to absolute timestamps within the 6931 "Segment". The "Cues Element" contains one or many "CuePoint 6932 Elements" which each MUST reference an absolute timestamp (via the 6933 "CueTime Element"), a "Track" (via the "CueTrack Element"), and a 6934 "Segment Position" (via the "CueClusterPosition Element"). 6935 Additional non-mandated Elements are part of the "CuePoint Element" 6936 such as "CueDuration", "CueRelativePosition", "CueCodecState" and 6937 others which provide any "Matroska Reader" with additional 6938 information to use in the optimization of seeking performance. 6940 13.1. Recommendations 6942 The following recommendations are provided to optimize Matroska 6943 performance. 6945 o Unless Matroska is used as a live stream, it SHOULD contain a 6946 "Cues Element". 6948 o For each video track, each keyframe SHOULD be referenced by a 6949 "CuePoint Element". 6951 o It is RECOMMENDED to not reference non-keyframes of video tracks 6952 in "Cues" unless it references a "Cluster Element" which contains 6953 a "CodecState Element" but no keyframes. 6955 o For each subtitle track present, each subtitle frame SHOULD be 6956 referenced by a "CuePoint Element" with a "CueDuration Element". 6958 o References to audio tracks MAY be skipped in "CuePoint Elements" 6959 if a video track is present. When included the "CuePoint 6960 Elements" SHOULD reference audio keyframes at most once every 500 6961 milliseconds. 6963 o If the referenced frame is not stored within the first 6964 "SimpleBlock" or first "BlockGroup" within its "Cluster Element", 6965 then the "CueRelativePosition Element" SHOULD be written to 6966 reference where in the "Cluster" the reference frame is stored. 6968 o If a "CuePoint Element" references "Cluster Element" that includes 6969 a "CodecState Element", then that "CuePoint Element" MUST use a 6970 "CueCodecState Element". 6972 o "CuePoint Elements" SHOULD be numerically sorted in storage order 6973 by the value of the "CueTime Element". 6975 14. Matroska Streaming 6977 In Matroska, there are two kinds of streaming: file access and 6978 livestreaming. 6980 14.1. File Access 6982 File access can simply be reading a file located on your computer, 6983 but also includes accessing a file from an HTTP (web) server or CIFS 6984 (Windows share) server. These protocols are usually safe from 6985 reading errors and seeking in the stream is possible. However, when 6986 a file is stored far away or on a slow server, seeking can be an 6987 expensive operation and SHOULD be avoided. The following guidelines, 6988 when followed, help reduce the number of seeking operations for 6989 regular playback and also have the playback start quickly without a 6990 lot of data needed to read first (like a "Cues Element", "Attachment 6991 Element" or "SeekHead Element"). 6993 Matroska, having a small overhead, is well suited for storing music/ 6994 videos on file servers without a big impact on the bandwidth used. 6995 Matroska does not require the index to be loaded before playing, 6996 which allows playback to start very quickly. The index can be loaded 6997 only when seeking is requested the first time. 6999 14.2. Livestreaming 7001 Livestreaming is the equivalent of television broadcasting on the 7002 internet. There are 2 families of servers for livestreaming: RTP/ 7003 RTSP and HTTP. Matroska is not meant to be used over RTP. RTP 7004 already has timing and channel mechanisms that would be wasted if 7005 doubled in Matroska. Additionally, having the same information at 7006 the RTP and Matroska level would be a source of confusion if they do 7007 not match. Livestreaming of Matroska over HTTP (or any other plain 7008 protocol based on TCP) is possible. 7010 A live Matroska stream is different from a file because it usually 7011 has no known end (only ending when the client disconnects). For 7012 this, all bits of the "size" portion of the "Segment Element" MUST be 7013 set to 1. Another option is to concatenate "Segment Elements" with 7014 known sizes, one after the other. This solution allows a change of 7015 codec/resolution between each segment. For example, this allows for 7016 a switch between 4:3 and 16:9 in a television program. 7018 When "Segment Elements" are continuous, certain "Elements", like 7019 "MetaSeek", "Cues", "Chapters", and "Attachments", MUST NOT be used. 7021 It is possible for a "Matroska Player" to detect that a stream is not 7022 seekable. If the stream has neither a "MetaSeek" list or a "Cues" 7023 list at the beginning of the stream, it SHOULD be considered non- 7024 seekable. Even though it is possible to seek blindly forward in the 7025 stream, it is NOT RECOMMENDED. 7027 In the context of live radio or web TV, it is possible to "tag" the 7028 content while it is playing. The "Tags Element" can be placed 7029 between "Clusters" each time it is necessary. In that case, the new 7030 "Tags Element" MUST reset the previously encountered "Tags Elements" 7031 and use the new values instead. 7033 15. Menu Specifications 7035 This document is a _draft of the Menu system_ that will be the 7036 default one in "Matroska". As it will just be composed of a Control 7037 Track, it will be seen as a "codec" and could be replaced later by 7038 something else if needed. 7040 A menu is like what you see on DVDs, when you have some screens to 7041 select the audio format, subtitles or scene selection. 7043 15.1. Requirements 7045 What we'll try to have is a system that can do almost everything done 7046 on a DVD, or more, or better, or drop the unused features if 7047 necessary. 7049 As the name suggests, a Control Track is a track that can control the 7050 playback of the file and/or all the playback features. To make it as 7051 simple as possible for "Matroska Players", the Control Track will 7052 just give orders to the "Matroska Player" and get the actions 7053 associated with the highlights/hotspots. 7055 15.1.1. Highlights/Hotspots 7057 A highlight is basically a rectangle/key associated with an action 7058 UID. When that rectangle/key is activated, the "Matroska Player" 7059 send the UID of the action to the Control Track handler (codec). The 7060 fact that it can also be a key means that even for audio only files, 7061 a keyboard shortcut or button panel could be used for menus. But in 7062 that case, the hotspot will have to be associated with a name to 7063 display. 7065 This highlight is sent from the Control Track to the "Matroska 7066 Player". Then the "Matroska Player" has to handle that highlight 7067 until it's deactivated (see Section 15.1.2). 7069 The highlight contains a UID of the action, a displayable name (UTF- 7070 8), an associated key (list of keys to be defined, probably 7071 up/down/left/right/select), a screen position/range and an image to 7072 display. The image will be displayed either when the user place the 7073 mouse over the rectangle (or any other shape), or when an option of 7074 the screen is selected (not activated). There could be a second 7075 image used when the option is activated. And there could be a third 7076 image that can serve as background. This way you could have a still 7077 image (like in some DVDs) for the menu and behind that image blank 7078 video (small bitrate). 7080 When a highlight is activated by the user, the "Matroska Player" has 7081 to send the UID of the action to the Control Track. Then the Control 7082 Track codec will handle the action and possibly give new orders to 7083 the "Matroska Player". 7085 The format used for storing images SHOULD be extensible. For the 7086 moment we'll use PNG and BMP, both with alpha channel. 7088 15.1.2. Playback features 7090 All the following features will be sent from the Control Track to the 7091 "Matroska Player" : 7093 o Jump to chapter (UID, prev, next, number) 7095 o Disable all tracks of a kind (audio, video, subtitle) 7097 o Enable track UID (the kind doesn't matter) 7099 o Define/Disable a highlight 7101 o Enable/Disable jumping 7103 o Enable/Disable track selection of a kind 7105 o Select Edition ID (see chapters) 7107 o Pause playback 7109 o Stop playback 7110 o Enable/Disable a Chapter UID 7112 o Hide/Unhide a Chapter UID 7114 All the actions will be written in a normal Matroska track, with a 7115 timestamp. A "Menu Frame" SHOULD be able to contain more that one 7116 action/highlight for a given timestamp. (to be determined, EBML 7117 format structure) 7119 15.1.3. Player requirements 7121 Some "Matroska Players" might not support the control track. That 7122 mean they will play the active/looped parts as part of the data. So 7123 I suggest putting the active/looped parts of a movie at the end of a 7124 movie. When a Menu-aware "Matroska Player" encounter the default 7125 Control Track of a "Matroska" file, the first order SHOULD be to jump 7126 at the start of the active/looped part of the movie. 7128 15.2. Working Graph 7130 Matroska Source file -> Control Track <-> Player. 7131 -> other tracks -> rendered 7133 16. Unknown elements 7135 Matroska is based upon the principle that a reading application does 7136 not have to support 100% of the specifications in order to be able to 7137 play the file. A Matroska file therefore contains version indicators 7138 that tell a reading application what to expect. 7140 It is possible and valid to have the version fields indicate that the 7141 file contains Matroska "Elements" from a higher specification version 7142 number while signaling that a reading application MUST only support a 7143 lower version number properly in order to play it back (possibly with 7144 a reduced feature set). For example, a reading application 7145 supporting at least Matroska version "V" reading a file whose 7146 "DocTypeReadVersion" field is equal to or lower than "V" MUST skip 7147 Matroska/EBML "Elements" it encounters but does not know about if 7148 that unknown element fits into the size constraints set by the 7149 current "Parent Element". 7151 17. Default Values 7153 The default value of an "Element" is assumed when not present in the 7154 data stream. It is assumed only in the scope of its "Parent 7155 Element". For example, the "Language Element" is in the scope of the 7156 "Track Element". If the "Parent Element" is not present or assumed, 7157 then the "Child Element" cannot be assumed. 7159 18. DefaultDecodedFieldDuration 7161 The "DefaultDecodedFieldDuration Element" can signal to the 7162 displaying application how often fields of a video sequence will be 7163 available for displaying. It can be used for both interlaced and 7164 progressive content. If the video sequence is signaled as 7165 interlaced, then the period between two successive fields at the 7166 output of the decoding process equals "DefaultDecodedFieldDuration". 7168 For video sequences signaled as progressive, it is twice the value of 7169 "DefaultDecodedFieldDuration". 7171 These values are valid at the end of the decoding process before 7172 post-processing (such as deinterlacing or inverse telecine) is 7173 applied. 7175 Examples: 7177 o Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns 7179 o PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns 7181 o N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns 7183 o hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 7184 encoded interlaced fields per second) 7186 o soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 7187 encoded interlaced fields per second, with "repeat_first_field = 7188 1") 7190 19. Encryption 7192 Encryption in Matroska is designed in a very generic style to allow 7193 people to implement whatever form of encryption is best for them. It 7194 is possible to use the encryption framework in Matroska as a type of 7195 DRM (Digital Rights Management). 7197 Because encryption occurs within the "Block Element", it is possible 7198 to manipulate encrypted streams without decrypting them. The streams 7199 could potentially be copied, deleted, cut, appended, or any number of 7200 other possible editing techniques without decryption. The data can 7201 be used without having to expose it or go through the decrypting 7202 process. 7204 Encryption can also be layered within Matroska. This means that two 7205 completely different types of encryption can be used, requiring two 7206 separate keys to be able to decrypt a stream. 7208 Encryption information is stored in the "ContentEncodings Element" 7209 under the "ContentEncryption Element". 7211 20. Image cropping 7213 The "PixelCrop Elements" ("PixelCropTop", "PixelCropBottom", 7214 "PixelCropRight" and "PixelCropLeft") indicate when and by how much 7215 encoded videos frames SHOULD be cropped for display. These Elements 7216 allow edges of the frame that are not intended for display, such as 7217 the sprockets of a full-frame film scan or the VANC area of a 7218 digitized analog videotape, to be stored but hidden. "PixelCropTop" 7219 and "PixelCropBottom" store an integer of how many rows of pixels 7220 SHOULD be cropped from the top and bottom of the image 7221 (respectively). "PixelCropLeft" and "PixelCropRight" store an 7222 integer of how many columns of pixels SHOULD be cropped from the left 7223 and right of the image (respectively). For example, a pillar-boxed 7224 video that stores a 1440x1080 visual image within the center of a 7225 padded 1920x1080 encoded image MAY set both "PixelCropLeft" and 7226 "PixelCropRight" to "240", so that a "Matroska Player" SHOULD crop 7227 off 240 columns of pixels from the left and right of the encoded 7228 image to present the image with the pillar-boxes hidden. 7230 21. Matroska versioning 7232 The "EBML Header" of each Matroska document informs the reading 7233 application on what version of Matroska to expect. The "Elements" 7234 within "EBML Header" with jurisdiction over this information are 7235 "DocTypeVersion" and "DocTypeReadVersion". 7237 "DocTypeVersion" MUST be equal to or greater than the highest 7238 Matroska version number of any "Element" present in the Matroska 7239 file. For example, a file using the "SimpleBlock Element" MUST have 7240 a "DocTypeVersion" equal to or greater than 2. A file containing 7241 "CueRelativePosition" Elements MUST have a "DocTypeVersion" equal to 7242 or greater than 4. 7244 The "DocTypeReadVersion" MUST contain the minimum version number that 7245 a reading application can minimally support in order to play the file 7246 back -- optionally with a reduced feature set. For example, if a 7247 file contains only "Elements" of version 2 or lower except for 7248 "CueRelativePosition" (which is a version 4 Matroska "Element"), then 7249 "DocTypeReadVersion" SHOULD still be set to 2 and not 4 because 7250 evaluating "CueRelativePosition" is not necessary for standard 7251 playback -- it makes seeking more precise if used. 7253 "DocTypeVersion" MUST always be equal to or greater than 7254 "DocTypeReadVersion". 7256 A reading application supporting Matroska version "V" MUST NOT refuse 7257 to read an application with "DocReadTypeVersion" equal to or lower 7258 than "V" even if "DocTypeVersion" is greater than "V". See also the 7259 note about Section 16. 7261 22. MIME Types 7263 There is no IETF endorsed MIME type for Matroska files. These 7264 definitions can be used: 7266 o .mka : Matroska audio "audio/x-matroska" 7268 o .mkv : Matroska video "video/x-matroska" 7270 o .mk3d : Matroska 3D video "video/x-matroska-3d" 7272 23. Segment Position 7274 The "Segment Position" of an "Element" refers to the position of the 7275 first octet of the "Element ID" of that "Element", measured in 7276 octets, from the beginning of the "Element Data" section of the 7277 containing "Segment Element". In other words, the "Segment Position" 7278 of an "Element" is the distance in octets from the beginning of its 7279 containing "Segment Element" minus the size of the "Element ID" and 7280 "Element Data Size" of that "Segment Element". The "Segment 7281 Position" of the first "Child Element" of the "Segment Element" is 0. 7282 An "Element" which is not stored within a "Segment Element", such as 7283 the "Elements" of the "EBML Header", do not have a "Segment 7284 Position". 7286 23.1. Segment Position Exception 7288 "Elements" that are defined to store a "Segment Position" MAY define 7289 reserved values to indicate a special meaning. 7291 23.2. Example of Segment Position 7293 This table presents an example of "Segment Position" by showing a 7294 hexadecimal representation of a very small Matroska file with labels 7295 to show the offsets in octets. The file contains a "Segment Element" 7296 with an "Element ID" of "0x18538067" and a "MuxingApp Element" with 7297 an "Element ID" of "0x4D80". 7299 0 1 2 7300 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 7301 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 7302 0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67| 7303 20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| 7305 In the above example, the "Element ID" of the "Segment Element" is 7306 stored at offset 16, the "Element Data Size" of the "Segment Element" 7307 is stored at offset 20, and the "Element Data" of the "Segment 7308 Element" is stored at offset 21. 7310 The "MuxingApp Element" is stored at offset 26. Since the "Segment 7311 Position" of an "Element" is calculated by subtracting the position 7312 of the "Element Data" of the containing "Segment Element" from the 7313 position of that "Element", the "Segment Position" of "MuxingApp 7314 Element" in the above example is "26 - 21" or "5". 7316 24. Linked Segments 7318 Matroska provides several methods to link two or many "Segment 7319 Elements" together to create a "Linked Segment". A "Linked Segment" 7320 is a set of multiple "Segments" related together into a single 7321 presentation by using Hard Linking, Medium Linking, or Soft Linking. 7322 All "Segments" within a "Linked Segment" MUST utilize the same track 7323 numbers and timescale. All "Segments" within a "Linked Segment" MUST 7324 be stored within the same directory. All "Segments" within a "Linked 7325 Segment" MUST store a "SegmentUID". 7327 24.1. Hard Linking 7329 Hard Linking (also called splitting) is the process of creating a 7330 "Linked Segment" by relating multiple "Segment Elements" using the 7331 "PrevUID" and "NextUID Elements". Within a "Linked Segment", the 7332 timestamps of each "Segment" MUST follow consecutively in linking 7333 order. With Hard Linking, the chapters of any "Segment" within the 7334 "Linked Segment" MUST only reference the current "Segment". With 7335 Hard Linking, the "NextUID" and "PrevUID" MUST reference the 7336 respective "SegmentUID" values of the next and previous "Segments". 7337 The first "Segment" of a "Linked Segment" MUST have a "NextUID 7338 Element" and MUST NOT have a "PrevUID Element". The last "Segment" 7339 of a "Linked Segment" MUST have a "PrevUID Element" and MUST NOT have 7340 a "NextUID Element". The middle "Segments" of a "Linked Segment" 7341 MUST have both a "NextUID Element" and a "PrevUID Element". 7343 As an example, four "Segments" can be Hard Linked as a "Linked 7344 Segment" through cross-referencing each other with "SegmentUID", 7345 "PrevUID", and "NextUID", as in this table. 7347 +--------+------------------+-------------------+-------------------+ 7348 | file | SegmentUID | PrevUID | NextUID | 7349 | name | | | | 7350 +--------+------------------+-------------------+-------------------+ 7351 | "start | "71000c23cd31099 | n/a | "a77b3598941cb803 | 7352 | .mkv" | 853fbc94dd984a5d | | eac0fcdafe44fac9" | 7353 | | d" | | | 7354 | "middl | "a77b3598941cb80 | "71000c23cd310998 | "6c92285fa6d3e827 | 7355 | e.mkv" | 3eac0fcdafe44fac | 53fbc94dd984a5dd" | b198d120ea3ac674" | 7356 | | 9" | | | 7357 | "end.m | "6c92285fa6d3e82 | "a77b3598941cb803 | n/a | 7358 | kv" | 7b198d120ea3ac67 | eac0fcdafe44fac9" | | 7359 | | 4" | | | 7360 +--------+------------------+-------------------+-------------------+ 7362 24.2. Medium Linking 7364 Medium Linking creates relationships between "Segments" using Ordered 7365 Chapters and the "ChapterSegmentUID Element". A "Segment Edition" 7366 with Ordered Chapters MAY contain "Chapter Elements" that reference 7367 timestamp ranges from other "Segments". The "Segment" referenced by 7368 the Ordered Chapter via the "ChapterSegmentUID Element" SHOULD be 7369 played as part of a Linked Segment. The timestamps of Segment 7370 content referenced by Ordered Chapters MUST be adjusted according to 7371 the cumulative duration of the the previous Ordered Chapters. 7373 As an example a file named "intro.mkv" could have a "SegmentUID" of 7374 "0xb16a58609fc7e60653a60c984fc11ead". Another file called 7375 "program.mkv" could use a Chapter Edition that contains two Ordered 7376 Chapters. The first chapter references the "Segment" of "intro.mkv" 7377 with the use of a "ChapterSegmentUID", "ChapterSegmentEditionUID", 7378 "ChapterTimeStart" and optionally a "ChapterTimeEnd" element. The 7379 second chapter references content within the "Segment" of 7380 "program.mkv". A "Matroska Player" SHOULD recognize the "Linked 7381 Segment" created by the use of "ChapterSegmentUID" in an enabled 7382 "Edition" and present the reference content of the two "Segments" 7383 together. 7385 24.3. Soft Linking 7387 Soft Linking is used by codec chapters. They can reference another 7388 "Segment" and jump to that "Segment". The way the "Segments" are 7389 described are internal to the chapter codec and unknown to the 7390 Matroska level. But there are "Elements" within the "Info Element" 7391 (such as "ChapterTranslate") that can translate a value representing 7392 a "Segment" in the chapter codec and to the current "SegmentUID". 7393 All "Segments" that could be used in a "Linked Segment" in this way 7394 SHOULD be marked as members of the same family via the "SegmentFamily 7395 Element", so that the "Matroska Player" can quickly switch from one 7396 to the other. 7398 25. Track Flags 7400 25.1. Default flag 7402 The "default track" flag is a hint for a "Matroska Player" and SHOULD 7403 always be changeable by the user. If the user wants to see or hear a 7404 track of a certain kind (audio, video, subtitles) and hasn't chosen a 7405 specific track, the "Matroska Player" SHOULD use the first track of 7406 that kind whose "default track" flag is set to "1". If no such track 7407 is found then the first track of this kind SHOULD be chosen. 7409 Only one track of a kind MAY have its "default track" flag set in a 7410 segment. If a track entry does not contain the "default track" flag 7411 element then its default value "1" is to be used. 7413 25.2. Forced flag 7415 The "forced" flag tells the "Matroska Player" that it MUST display/ 7416 play this track or another track of the same kind that also has its 7417 "forced" flag set. When there are multiple "forced" tracks, the 7418 "Matroska Player" SHOULD determine the track based upon the language 7419 of the forced flag or use the default flag if no track matches the 7420 use languages. Another track of the same kind without the "forced" 7421 flag may be use simultaneously with the "forced" track (like DVD 7422 subtitles for example). 7424 25.3. Track Operation 7426 "TrackOperation" allows combining multiple tracks to make a virtual 7427 one. It uses two separate system to combine tracks. One to create a 7428 3D "composition" (left/right/background planes) and one to simplify 7429 join two tracks together to make a single track. 7431 A track created with "TrackOperation" is a proper track with a UID 7432 and all its flags. However the codec ID is meaningless because each 7433 "sub" track needs to be decoded by its own decoder before the 7434 "operation" is applied. The "Cues Elements" corresponding to such a 7435 virtual track SHOULD be the sum of the "Cues Elements" for each of 7436 the tracks it's composed of (when the "Cues" are defined per track). 7438 In the case of "TrackJoinBlocks", the "Block Elements" (from 7439 "BlockGroup" and "SimpleBlock") of all the tracks SHOULD be used as 7440 if they were defined for this new virtual "Track". When two "Block 7441 Elements" have overlapping start or end timestamps, it's up to the 7442 underlying system to either drop some of these frames or render them 7443 the way they overlap. This situation SHOULD be avoided when creating 7444 such tracks as you can never be sure of the end result on different 7445 platforms. 7447 25.4. Overlay Track 7449 Overlay tracks SHOULD be rendered in the same 'channel' as the track 7450 its linked to. When content is found in such a track, it SHOULD be 7451 played on the rendering channel instead of the original track. 7453 25.5. Multi-planar and 3D videos 7455 There are two different ways to compress 3D videos: have each 'eye' 7456 track in a separate track and have one track have both 'eyes' 7457 combined inside (which is more efficient, compression-wise). 7458 Matroska supports both ways. 7460 For the single track variant, there is the "StereoMode Element" which 7461 defines how planes are assembled in the track (mono or left-right 7462 combined). Odd values of StereoMode means the left plane comes first 7463 for more convenient reading. The pixel count of the track 7464 ("PixelWidth"/"PixelHeight") is the raw amount of pixels (for example 7465 3840x1080 for full HD side by side) and the 7466 "DisplayWidth"/"DisplayHeight" in pixels is the amount of pixels for 7467 one plane (1920x1080 for that full HD stream). Old stereo 3D were 7468 displayed using anaglyph (cyan and red colours separated). For 7469 compatibility with such movies, there is a value of the StereoMode 7470 that corresponds to AnaGlyph. 7472 There is also a "packed" mode (values 13 and 14) which consists of 7473 packing two frames together in a "Block" using lacing. The first 7474 frame is the left eye and the other frame is the right eye (or vice 7475 versa). The frames SHOULD be decoded in that order and are possibly 7476 dependent on each other (P and B frames). 7478 For separate tracks, Matroska needs to define exactly which track 7479 does what. "TrackOperation" with "TrackCombinePlanes" do that. For 7480 more details look at Section 25.3. 7482 The 3D support is still in infancy and may evolve to support more 7483 features. 7485 The StereoMode used to be part of Matroska v2 but it didn't meet the 7486 requirement for multiple tracks. There was also a bug in libmatroska 7487 prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8. 7488 "Matroska Readers" may support these legacy files by checking 7489 Matroska v2 or 0x53B9. The older values [20] were 0: mono, 1: right 7490 eye, 2: left eye, 3: both eyes. 7492 26. Timestamps 7494 Historically timestamps in Matroska were mistakenly called timecodes. 7495 The "Timestamp Element" was called Timecode, the "TimestampScale 7496 Element" was called TimecodeScale, the "TrackTimestampScale Element" 7497 was called TrackTimecodeScale and the "ReferenceTimestamp Element" 7498 was called ReferenceTimeCode. 7500 26.1. Timestamp Types 7502 o Absolute Timestamp = Block+Cluster 7504 o Relative Timestamp = Block 7506 o Scaled Timestamp = Block+Cluster 7508 o Raw Timestamp = (Block+Cluster)*TimestampScale*TrackTimestampScale 7510 26.2. Block Timestamps 7512 The "Block Element"'s timestamp MUST be a signed integer that 7513 represents the "Raw Timestamp" relative to the "Cluster"'s "Timestamp 7514 Element", multiplied by the "TimestampScale Element". See 7515 Section 26.4 for more information. 7517 The "Block Element"'s timestamp MUST be represented by a 16bit signed 7518 integer (sint16). The "Block"'s timestamp has a range of -32768 to 7519 +32767 units. When using the default value of the "TimestampScale 7520 Element", each integer represents 1ms. The maximum time span of 7521 "Block Elements" in a "Cluster" using the default "TimestampScale 7522 Element" of 1ms is 65536ms. 7524 If a "Cluster"'s "Timestamp Element" is set to zero, it is possible 7525 to have "Block Elements" with a negative "Raw Timestamp". "Block 7526 Elements" with a negative "Raw Timestamp" are not valid. 7528 26.3. Raw Timestamp 7530 The exact time of an object SHOULD be represented in nanoseconds. To 7531 find out a "Block"'s "Raw Timestamp", you need the "Block"'s 7532 "Timestamp Element", the "Cluster"'s "Timestamp Element", and the 7533 "TimestampScale Element". 7535 26.4. TimestampScale 7537 The "TimestampScale Element" is used to calculate the "Raw Timestamp" 7538 of a "Block". The timestamp is obtained by adding the "Block"'s 7539 timestamp to the "Cluster"'s "Timestamp Element", and then 7540 multiplying that result by the "TimestampScale". The result will be 7541 the "Block"'s "Raw Timestamp" in nanoseconds. The formula for this 7542 would look like: 7544 (a + b) * c 7546 a = `Block`'s Timestamp 7547 b = `Cluster`'s Timestamp 7548 c = `TimestampScale` 7550 For example, assume a "Cluster"'s "Timestamp" has a value of 564264, 7551 the "Block" has a "Timestamp" of 1233, and the "TimestampScale 7552 Element" is the default of 1000000. 7554 (1233 + 564264) * 1000000 = 565497000000 7556 So, the "Block" in this example has a specific time of 565497000000 7557 in nanoseconds. In milliseconds this would be 565497ms. 7559 26.5. TimestampScale Rounding 7561 Because the default value of "TimestampScale" is 1000000, which makes 7562 each integer in the "Cluster" and "Block" "Timestamp Elements" equal 7563 1ms, this is the most commonly used. When dealing with audio, this 7564 causes inaccuracy when seeking. When the audio is combined with 7565 video, this is not an issue. For most cases, the the synch of audio 7566 to video does not need to be more than 1ms accurate. This becomes 7567 obvious when one considers that sound will take 2-3ms to travel a 7568 single meter, so distance from your speakers will have a greater 7569 effect on audio/visual synch than this. 7571 However, when dealing with audio-only files, seeking accuracy can 7572 become critical. For instance, when storing a whole CD in a single 7573 track, a user will want to be able to seek to the exact sample that a 7574 song begins at. If seeking a few sample ahead or behind, a 'crack' 7575 or 'pop' may result as a few odd samples are rendered. Also, when 7576 performing precise editing, it may be very useful to have the audio 7577 accuracy down to a single sample. 7579 When storing timestamps for an audio stream, the "TimestampScale 7580 Element" SHOULD have an accuracy of at least that of the audio sample 7581 rate, otherwise there are rounding errors that prevent users from 7582 knowing the precise location of a sample. Here's how a program has 7583 to round each timestamp in order to be able to recreate the sample 7584 number accurately. 7586 Let's assume that the application has an audio track with a sample 7587 rate of 44100. As written above the "TimestampScale" MUST have at 7588 least the accuracy of the sample rate itself: 1000000000 / 44100 = 7589 22675.7369614512. This value MUST always be truncated. Otherwise 7590 the accuracy will not suffice. So in this example the application 7591 will use 22675 for the "TimestampScale". The application could even 7592 use some lower value like 22674 which would allow it to be a little 7593 bit imprecise about the original timestamps. But more about that in 7594 a minute. 7596 Next the application wants to write sample number 52340 and 7597 calculates the timestamp. This is easy. In order to calculate the 7598 "Raw Timestamp" in ns all it has to do is calculate "Raw Timestamp = 7599 round(1000000000 * sample_number / sample_rate)". Rounding at this 7600 stage is very important! The application might skip it if it choses 7601 a slightly smaller value for the "TimestampScale" factor instead of 7602 the truncated one like shown above. Otherwise it has to round or the 7603 results won't be reversible. For our example we get "Raw Timestamp = 7604 round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 7605 1186848073". 7607 The next step is to calculate the "Absolute Timestamp" - that is the 7608 timestamp that will be stored in the Matroska file. Here the 7609 application has to divide the "Raw Timestamp" from the previous 7610 paragraph by the "TimestampScale" factor and round the result: 7611 "Absolute Timestamp = round(Raw Timestamp / TimestampScale_factor)" 7612 which will result in the following for our example: "Absolute 7613 Timestamp = round(1186848073 / 22675) = round(52341.7011245866) = 7614 52342". This number is the one the application has to write to the 7615 file. 7617 Now our file is complete, and we want to play it back with another 7618 application. Its task is to find out which sample the first 7619 application wrote into the file. So it starts reading the Matroska 7620 file and finds the "TimestampScale" factor 22675 and the audio sample 7621 rate 44100. Later it finds a data block with the "Absolute 7622 Timestamp" of 52342. But how does it get the sample number from 7623 these numbers? 7625 First it has to calculate the "Raw Timestamp" of the block it has 7626 just read. Here's no rounding involved, just an integer 7627 multiplication: "Raw Timestamp = Absolute Timestamp * 7628 TimestampScale_factor". In our example: "Raw Timestamp = 52342 * 7629 22675 = 1186854850". 7631 The conversion from the "Raw Timestamp" to the sample number again 7632 requires rounding: "sample_number = round(Raw Timestamp * sample_rate 7633 / 1000000000)". In our example: "sample_number = round(1186854850 * 7634 44100 / 1000000000) = round(52340.298885) = 52340". This is exactly 7635 the sample number that the previous program started with. 7637 Some general notes for a program: 7639 1. Always calculate the timestamps / sample numbers with floating 7640 point numbers of at least 64bit precision (called 'double' in 7641 most modern programming languages). If you're calculating with 7642 integers then make sure they're 64bit long, too. 7644 2. Always round if you divide. Always! If you don't you'll end up 7645 with situations in which you have a timestamp in the Matroska 7646 file that does not correspond to the sample number that it 7647 started with. Using a slightly lower timestamp scale factor can 7648 help here in that it removes the need for proper rounding in the 7649 conversion from sample number to "Raw Timestamp". 7651 26.6. TrackTimestampScale 7653 The "TrackTimestampScale Element" is used align tracks that would 7654 otherwise be played at different speeds. An example of this would be 7655 if you have a film that was originally recorded at 24fps video. When 7656 playing this back through a PAL broadcasting system, it is standard 7657 to speed up the film to 25fps to match the 25fps display speed of the 7658 PAL broadcasting standard. However, when broadcasting the video 7659 through NTSC, it is typical to leave the film at its original speed. 7660 If you wanted to make a single file where there was one video stream, 7661 and an audio stream used from the PAL broadcast, as well as an audio 7662 stream used from the NTSC broadcast, you would have the problem that 7663 the PAL audio stream would be 1/24th faster than the NTSC audio 7664 stream, quickly leading to problems. It is possible to stretch out 7665 the PAL audio track and re-encode it at a slower speed, however when 7666 dealing with lossy audio codecs, this often results in a loss of 7667 audio quality and/or larger file sizes. 7669 This is the type of problem that "TrackTimestampScale" was designed 7670 to fix. Using it, the video can be played back at a speed that will 7671 synch with either the NTSC or the PAL audio stream, depending on 7672 which is being used for playback. To continue the above example: 7674 Track 1: Video 7675 Track 2: NTSC Audio 7676 Track 3: PAL Audio 7678 Because the NTSC track is at the original speed, it will used as the 7679 default value of 1.0 for its "TrackTimestampScale". The video will 7680 also be aligned to the NTSC track with the default value of 1.0. 7682 The "TrackTimestampScale" value to use for the PAL track would be 7683 calculated by determining how much faster the PAL track is than the 7684 NTSC track. In this case, because we know the video for the NTSC 7685 audio is being played back at 24fps and the video for the PAL audio 7686 is being played back at 25fps, the calculation would be: 7688 25/24 ≈ 1.04166666666666666667 7690 When writing a file that uses a non-default "TrackTimestampScale", 7691 the values of the "Block"'s timestamp are whatever they would be when 7692 normally storing the track with a default value for the 7693 "TrackTimestampScale". However, the data is interleaved a little 7694 differently. Data SHOULD be interleaved by its Section 26.3 in the 7695 order handed back from the encoder. The "Raw Timestamp" of a "Block" 7696 from a track using "TrackTimestampScale" is calculated using: 7698 "(Block's Timestamp + Cluster's Timestamp) * TimestampScale * 7699 TrackTimestampScale" 7701 So, a Block from the PAL track above that had a Section 26.1 of 100 7702 seconds would have a "Raw Timestamp" of 104.66666667 seconds, and so 7703 would be stored in that part of the file. 7705 When playing back a track using the "TrackTimestampScale", if the 7706 track is being played by itself, there is no need to scale it. From 7707 the above example, when playing the Video with the NTSC Audio, 7708 neither are scaled. However, when playing back the Video with the 7709 PAL Audio, the timestamps from the PAL Audio track are scaled using 7710 the "TrackTimestampScale", resulting in the video playing back in 7711 synch with the audio. 7713 It would be possible for a "Matroska Player" to also adjust the 7714 audio's samplerate at the same time as adjusting the timestamps if 7715 you wanted to play the two audio streams synchronously. It would 7716 also be possible to adjust the video to match the audio's speed. 7717 However, for playback, the selected track(s) timestamps SHOULD be 7718 adjusted if they need to be scaled. 7720 While the above example deals specifically with audio tracks, this 7721 element can be used to align video, audio, subtitles, or any other 7722 type of track contained in a Matroska file. 7724 27. References 7726 27.1. URIs 7728 [1] http://mukoli.free.fr/mcf/mcf.html 7730 [2] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7731 specification.markdown 7733 [3] https://datatracker.ietf.org/wg/cellar/charter/ 7735 [4] https://matroska.org/files/matroska.pdf 7737 [5] diagram.md 7739 [6] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7740 specification.markdown 7742 [7] https://github.com/Matroska-Org/foundation- 7743 source/blob/master/spectool/specdata.xml 7745 [8] https://tools.ietf.org/html/rfc2119 7747 [9] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7748 specification.markdown 7750 [10] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7751 specification.markdown#ebml-element-types 7753 [11] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7754 specification.markdown#ebml-schema 7756 [12] https://github.com/Matroska-Org/ebml-specification/blob/master/ 7757 specification.markdown#structure 7759 [13] https://www.loc.gov/standards/iso639-2/php/English_list.php 7761 [14] https://tools.ietf.org/html/bcp47 7763 [15] https://www.iana.org/domains/root/db 7765 [16] http://www.webmproject.org/docs/container/ 7767 [17] http://dvd.sourceforge.net/dvdinfo/uops.html 7769 [18] http://www.dvd-replica.com/DVD/ 7771 [19] http://dvd.sourceforge.net/dvdinfo/ 7773 [20] http://www.matroska.org/node/1/revisions/74/view#StereoMode 7775 Authors' Addresses 7777 Steve Lhomme 7779 Email: slhomme@matroska.org 7780 Moritz Bunkus 7782 Email: moritz@bunkus.org 7784 Dave Rice 7786 Email: dave@dericed.com