idnits 2.17.1 draft-ietf-cellar-matroska-10.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: ---------------------------------------------------------------------------- == There are 4 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (1 May 2022) is 718 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'Blowfish' -- Possible downref: Non-RFC (?) normative reference: ref. 'BZIP2' -- Possible downref: Non-RFC (?) normative reference: ref. 'IANADomains' -- Possible downref: Non-RFC (?) normative reference: ref. 'IANALangRegistry' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO3166-1' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO639-2' -- Possible downref: Non-RFC (?) normative reference: ref. 'LZO' == Outdated reference: A later version (-12) exists of draft-ietf-cellar-codec-06 == Outdated reference: A later version (-12) exists of draft-ietf-cellar-tags-06 ** Downref: Normative reference to an Experimental RFC: RFC 1851 ** Downref: Normative reference to an Informational RFC: RFC 1950 -- Possible downref: Non-RFC (?) normative reference: ref. 'Twofish' -- Possible downref: Non-RFC (?) normative reference: ref. 'WebVTT' Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 10 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: 2 November 2022 6 D. Rice 7 1 May 2022 9 Matroska Media Container Format Specifications 10 draft-ietf-cellar-matroska-10 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 2 November 2022. 35 Copyright Notice 37 Copyright (c) 2022 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 (https://trustee.ietf.org/ 42 license-info) in effect on the date of publication of this document. 43 Please review these documents carefully, as they describe your rights 44 and restrictions with respect to this document. Code Components 45 extracted from this document must include Revised BSD License text as 46 described in Section 4.e of the Trust Legal Provisions and are 47 provided without warranty as described in the Revised BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 52 2. Status of this document . . . . . . . . . . . . . . . . . . . 7 53 3. Notation and Conventions . . . . . . . . . . . . . . . . . . 7 54 4. Matroska Overview . . . . . . . . . . . . . . . . . . . . . . 7 55 4.1. Principles . . . . . . . . . . . . . . . . . . . . . . . 7 56 4.2. Added EBML Constraints . . . . . . . . . . . . . . . . . 7 57 4.3. Design Rules . . . . . . . . . . . . . . . . . . . . . . 8 58 4.4. Data Layout . . . . . . . . . . . . . . . . . . . . . . . 8 59 5. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 17 60 5.1. Segment Element . . . . . . . . . . . . . . . . . . . . . 17 61 5.1.1. SeekHead Element . . . . . . . . . . . . . . . . . . 18 62 5.1.1.1. Seek Element . . . . . . . . . . . . . . . . . . 18 63 5.1.2. Info Element . . . . . . . . . . . . . . . . . . . . 19 64 5.1.2.1. SegmentUID Element . . . . . . . . . . . . . . . 19 65 5.1.2.2. SegmentFilename Element . . . . . . . . . . . . . 20 66 5.1.2.3. PrevUID Element . . . . . . . . . . . . . . . . . 20 67 5.1.2.4. PrevFilename Element . . . . . . . . . . . . . . 21 68 5.1.2.5. NextUID Element . . . . . . . . . . . . . . . . . 21 69 5.1.2.6. NextFilename Element . . . . . . . . . . . . . . 21 70 5.1.2.7. SegmentFamily Element . . . . . . . . . . . . . . 22 71 5.1.2.8. ChapterTranslate Element . . . . . . . . . . . . 22 72 5.1.2.9. TimestampScale Element . . . . . . . . . . . . . 24 73 5.1.2.10. Duration Element . . . . . . . . . . . . . . . . 24 74 5.1.2.11. DateUTC Element . . . . . . . . . . . . . . . . . 25 75 5.1.2.12. Title Element . . . . . . . . . . . . . . . . . . 25 76 5.1.2.13. MuxingApp Element . . . . . . . . . . . . . . . . 25 77 5.1.2.14. WritingApp Element . . . . . . . . . . . . . . . 26 78 5.1.3. Cluster Element . . . . . . . . . . . . . . . . . . . 26 79 5.1.3.1. Timestamp Element . . . . . . . . . . . . . . . . 26 80 5.1.3.2. Position Element . . . . . . . . . . . . . . . . 27 81 5.1.3.3. PrevSize Element . . . . . . . . . . . . . . . . 27 82 5.1.3.4. SimpleBlock Element . . . . . . . . . . . . . . . 28 83 5.1.3.5. BlockGroup Element . . . . . . . . . . . . . . . 28 84 5.1.4. Tracks Element . . . . . . . . . . . . . . . . . . . 33 85 5.1.4.1. TrackEntry Element . . . . . . . . . . . . . . . 33 86 5.1.5. Cues Element . . . . . . . . . . . . . . . . . . . . 95 87 5.1.5.1. CuePoint Element . . . . . . . . . . . . . . . . 95 88 5.1.6. Attachments Element . . . . . . . . . . . . . . . . . 99 89 5.1.6.1. AttachedFile Element . . . . . . . . . . . . . . 100 90 5.1.7. Chapters Element . . . . . . . . . . . . . . . . . . 102 91 5.1.7.1. EditionEntry Element . . . . . . . . . . . . . . 102 92 5.1.8. Tags Element . . . . . . . . . . . . . . . . . . . . 112 93 5.1.8.1. Tag Element . . . . . . . . . . . . . . . . . . . 113 94 6. Matroska Element Ordering . . . . . . . . . . . . . . . . . . 120 95 6.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 120 96 6.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 120 97 6.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 121 98 6.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 121 99 6.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 121 100 6.6. Chapters Element . . . . . . . . . . . . . . . . . . . . 121 101 6.7. Attachments . . . . . . . . . . . . . . . . . . . . . . . 122 102 6.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 122 103 6.9. Optimum layout from a muxer . . . . . . . . . . . . . . . 122 104 6.10. Optimum layout after editing tags . . . . . . . . . . . . 122 105 6.11. Optimum layout with Cues at the front . . . . . . . . . . 123 106 7. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 123 107 8. DefaultDecodedFieldDuration . . . . . . . . . . . . . . . . . 124 108 9. Block Structure . . . . . . . . . . . . . . . . . . . . . . . 124 109 9.1. Block Header . . . . . . . . . . . . . . . . . . . . . . 125 110 9.2. Block Header Flags . . . . . . . . . . . . . . . . . . . 125 111 9.3. SimpleBlock Structure . . . . . . . . . . . . . . . . . . 126 112 9.3.1. SimpleBlock Header . . . . . . . . . . . . . . . . . 126 113 9.3.2. SimpleBlock Header Flags . . . . . . . . . . . . . . 126 114 9.4. Block Lacing . . . . . . . . . . . . . . . . . . . . . . 127 115 9.4.1. No lacing . . . . . . . . . . . . . . . . . . . . . . 127 116 9.4.2. Xiph lacing . . . . . . . . . . . . . . . . . . . . . 128 117 9.4.3. EBML lacing . . . . . . . . . . . . . . . . . . . . . 129 118 9.4.4. Fixed-size lacing . . . . . . . . . . . . . . . . . . 131 119 9.4.5. Laced Frames Timestamp . . . . . . . . . . . . . . . 132 120 9.5. Random Access Points . . . . . . . . . . . . . . . . . . 132 121 10. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . 134 122 10.1. Timestamp Ticks . . . . . . . . . . . . . . . . . . . . 134 123 10.1.1. Matroska Ticks . . . . . . . . . . . . . . . . . . . 134 124 10.1.2. Segment Ticks . . . . . . . . . . . . . . . . . . . 134 125 10.1.3. Track Ticks . . . . . . . . . . . . . . . . . . . . 135 126 10.2. Block Timestamps . . . . . . . . . . . . . . . . . . . . 136 127 10.3. TimestampScale Rounding . . . . . . . . . . . . . . . . 136 128 11. Language Codes . . . . . . . . . . . . . . . . . . . . . . . 137 129 12. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 137 130 13. Image Presentation . . . . . . . . . . . . . . . . . . . . . 138 131 13.1. Cropping . . . . . . . . . . . . . . . . . . . . . . . . 138 132 13.2. Rotation . . . . . . . . . . . . . . . . . . . . . . . . 138 133 14. Matroska versioning . . . . . . . . . . . . . . . . . . . . . 138 134 15. File Extensions . . . . . . . . . . . . . . . . . . . . . . . 139 135 16. Segment Position . . . . . . . . . . . . . . . . . . . . . . 139 136 16.1. Segment Position Exception . . . . . . . . . . . . . . . 140 137 16.2. Example of Segment Position . . . . . . . . . . . . . . 140 138 17. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 140 139 17.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 141 140 17.2. Medium Linking . . . . . . . . . . . . . . . . . . . . . 143 141 17.2.1. Linked-Duration . . . . . . . . . . . . . . . . . . 144 142 17.2.2. Linked-Edition . . . . . . . . . . . . . . . . . . . 144 143 18. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 144 144 18.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 144 145 18.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 145 146 18.3. Hearing-impaired flag . . . . . . . . . . . . . . . . . 145 147 18.4. Visual-impaired flag . . . . . . . . . . . . . . . . . . 145 148 18.5. Descriptions flag . . . . . . . . . . . . . . . . . . . 145 149 18.6. Original flag . . . . . . . . . . . . . . . . . . . . . 145 150 18.7. Commentary flag . . . . . . . . . . . . . . . . . . . . 145 151 18.8. Track Operation . . . . . . . . . . . . . . . . . . . . 145 152 18.9. Overlay Track . . . . . . . . . . . . . . . . . . . . . 146 153 18.10. Multi-planar and 3D videos . . . . . . . . . . . . . . . 146 154 19. Default track selection . . . . . . . . . . . . . . . . . . . 147 155 19.1. Audio Selection . . . . . . . . . . . . . . . . . . . . 147 156 19.2. Subtitle selection . . . . . . . . . . . . . . . . . . . 149 157 20. Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 151 158 20.1. EditionEntry . . . . . . . . . . . . . . . . . . . . . . 151 159 20.1.1. EditionFlagDefault . . . . . . . . . . . . . . . . . 151 160 20.1.2. Default Edition . . . . . . . . . . . . . . . . . . 151 161 20.1.3. EditionFlagOrdered . . . . . . . . . . . . . . . . . 152 162 20.1.3.1. Ordered-Edition and Matroska Segment-Linking . . 153 163 20.2. ChapterAtom . . . . . . . . . . . . . . . . . . . . . . 154 164 20.2.1. ChapterTimeStart . . . . . . . . . . . . . . . . . . 154 165 20.2.2. ChapterTimeEnd . . . . . . . . . . . . . . . . . . . 154 166 20.2.3. Nested Chapters . . . . . . . . . . . . . . . . . . 154 167 20.2.4. Nested Chapters in Ordered Chapters . . . . . . . . 155 168 20.2.5. ChapterFlagHidden . . . . . . . . . . . . . . . . . 155 169 20.3. Menu features . . . . . . . . . . . . . . . . . . . . . 156 170 20.4. Physical Types . . . . . . . . . . . . . . . . . . . . . 156 171 20.5. Chapter Examples . . . . . . . . . . . . . . . . . . . . 157 172 20.5.1. Example 1 : basic chaptering . . . . . . . . . . . . 157 173 20.5.2. Example 2 : nested chapters . . . . . . . . . . . . 159 174 20.5.2.1. The Micronauts "Bleep To Bleep" . . . . . . . . 159 175 21. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 161 176 21.1. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 162 177 21.2. Font files . . . . . . . . . . . . . . . . . . . . . . . 163 178 22. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 179 22.1. Recommendations . . . . . . . . . . . . . . . . . . . . 165 180 23. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 165 181 23.1. File Access . . . . . . . . . . . . . . . . . . . . . . 166 182 23.2. Livestreaming . . . . . . . . . . . . . . . . . . . . . 166 183 24. Security Considerations . . . . . . . . . . . . . . . . . . . 167 184 25. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 167 185 25.1. Matroska Element IDs Registry . . . . . . . . . . . . . 167 186 25.2. Chapter Codec IDs Registry . . . . . . . . . . . . . . . 184 187 25.3. MIME Types . . . . . . . . . . . . . . . . . . . . . . . 185 188 26. Annex A: Historic Deprecated Elements . . . . . . . . . . . . 185 189 26.1. SilentTracks Element . . . . . . . . . . . . . . . . . . 185 190 26.2. SilentTrackNumber Element . . . . . . . . . . . . . . . 186 191 26.3. BlockVirtual Element . . . . . . . . . . . . . . . . . . 186 192 26.4. ReferenceVirtual Element . . . . . . . . . . . . . . . . 186 193 26.5. Slices Element . . . . . . . . . . . . . . . . . . . . . 186 194 26.6. TimeSlice Element . . . . . . . . . . . . . . . . . . . 187 195 26.7. LaceNumber Element . . . . . . . . . . . . . . . . . . . 187 196 26.8. FrameNumber Element . . . . . . . . . . . . . . . . . . 187 197 26.9. BlockAdditionID Element . . . . . . . . . . . . . . . . 187 198 26.10. Delay Element . . . . . . . . . . . . . . . . . . . . . 188 199 26.11. SliceDuration Element . . . . . . . . . . . . . . . . . 188 200 26.12. ReferenceFrame Element . . . . . . . . . . . . . . . . . 188 201 26.13. ReferenceOffset Element . . . . . . . . . . . . . . . . 188 202 26.14. ReferenceTimestamp Element . . . . . . . . . . . . . . . 189 203 26.15. EncryptedBlock Element . . . . . . . . . . . . . . . . . 189 204 26.16. TrackOffset Element . . . . . . . . . . . . . . . . . . 189 205 26.17. CodecSettings Element . . . . . . . . . . . . . . . . . 189 206 26.18. CodecInfoURL Element . . . . . . . . . . . . . . . . . . 190 207 26.19. CodecDownloadURL Element . . . . . . . . . . . . . . . . 190 208 26.20. CodecDecodeAll Element . . . . . . . . . . . . . . . . . 190 209 26.21. OldStereoMode Element . . . . . . . . . . . . . . . . . 190 210 26.22. AspectRatioType Element . . . . . . . . . . . . . . . . 190 211 26.23. GammaValue Element . . . . . . . . . . . . . . . . . . . 191 212 26.24. FrameRate Element . . . . . . . . . . . . . . . . . . . 191 213 26.25. ChannelPositions Element . . . . . . . . . . . . . . . . 191 214 26.26. TrickTrackUID Element . . . . . . . . . . . . . . . . . 191 215 26.27. TrickTrackSegmentUID Element . . . . . . . . . . . . . . 192 216 26.28. TrickTrackFlag Element . . . . . . . . . . . . . . . . . 192 217 26.29. TrickMasterTrackUID Element . . . . . . . . . . . . . . 192 218 26.30. TrickMasterTrackSegmentUID Element . . . . . . . . . . . 192 219 26.31. ContentSignature Element . . . . . . . . . . . . . . . . 193 220 26.32. ContentSigKeyID Element . . . . . . . . . . . . . . . . 193 221 26.33. ContentSigAlgo Element . . . . . . . . . . . . . . . . . 193 222 26.34. ContentSigHashAlgo Element . . . . . . . . . . . . . . . 193 223 26.35. CueRefCluster Element . . . . . . . . . . . . . . . . . 194 224 26.36. CueRefNumber Element . . . . . . . . . . . . . . . . . . 194 225 26.37. CueRefCodecState Element . . . . . . . . . . . . . . . . 194 226 26.38. FileReferral Element . . . . . . . . . . . . . . . . . . 194 227 26.39. FileUsedStartTime Element . . . . . . . . . . . . . . . 195 228 26.40. FileUsedEndTime Element . . . . . . . . . . . . . . . . 195 229 26.41. TagDefaultBogus Element . . . . . . . . . . . . . . . . 195 230 27. Normative References . . . . . . . . . . . . . . . . . . . . 195 231 28. Informative References . . . . . . . . . . . . . . . . . . . 198 232 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 199 234 1. Introduction 236 Matroska aims to become THE standard of multimedia container formats. 237 It was derived from a project called [MCF], but differentiates from 238 it significantly because it is based on EBML (Extensible Binary Meta 239 Language) [RFC8794], a binary derivative of XML. EBML enables 240 significant advantages in terms of future format extensibility, 241 without breaking file support in old parsers. 243 First, it is essential to clarify exactly "What an Audio/Video 244 container is", to avoid any misunderstandings: 246 * It is NOT a video or audio compression format (codec) 248 * It is an envelope for which there can be many audio, video, and 249 subtitles streams, allowing the user to store a complete movie or 250 CD in a single file. 252 Matroska is designed with the future in mind. It incorporates 253 features like: 255 * Fast seeking in the file 257 * Chapter entries 259 * Full metadata (tags) support 261 * Selectable subtitle/audio/video streams 263 * Modularly expandable 265 * Error resilience (can recover playback even when the stream is 266 damaged) 268 * Streamable over the internet and local networks (HTTP, CIFS, FTP, 269 etc) 271 * Menus (like DVDs have) 273 Matroska is an open standards project. This means for personal use 274 it is absolutely free to use and that the technical specifications 275 describing the bitstream are open to everybody, even to companies 276 that would like to support it in their products. 278 2. Status of this document 280 This document is a work-in-progress specification defining the 281 Matroska file format as part of the IETF Cellar working group 282 (https://datatracker.ietf.org/wg/cellar/charter/). But since it's 283 quite complete it is used as a reference for the development of 284 libmatroska. 286 This document covers Matroska versions 1, 2, 3 and 4. Matroska v4 is 287 the current version. Matroska 1 to 3 are no longer maintained. No 288 new elements are expected in files with theses version numbers. 289 There MAY be further additions to Matroska v4. 291 3. Notation and Conventions 293 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 294 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 295 "OPTIONAL" in this document are to be interpreted as described in BCP 296 14 [RFC2119] [RFC8174] when, and only when, they appear in all 297 capitals, as shown here. 299 This document defines specific terms in order to define the format 300 and application of Matroska. Specific terms are defined below: 302 Matroska: A multimedia container format based on EBML (Extensible 303 Binary Meta Language). 305 Matroska Reader: A data parser that interprets the semantics of a 306 Matroska document and creates a way for programs to use Matroska. 308 Matroska Player: A Matroska Reader with a primary purpose of playing 309 audiovisual files, including Matroska documents. 311 4. Matroska Overview 313 4.1. Principles 315 Matroska is a Document Type of EBML (Extensible Binary Meta 316 Language). This specification is dependent on the EBML Specification 317 [RFC8794]. For an understanding of Matroska's EBML Schema, see in 318 particular the sections of the EBML Specification covering EBML 319 Element Types (Section 7), EBML Schema (Section 11.1), and EBML 320 Structure (Section 3). 322 4.2. Added EBML Constraints 324 As an EBML Document Type, Matroska adds the following constraints to 325 the EBML specification. 327 * The docType of the EBML Header MUST be "matroska". 329 * The EBMLMaxIDLength of the EBML Header MUST be "4". 331 * The EBMLMaxSizeLength of the EBML Header MUST be between "1" and 332 "8" inclusive. 334 4.3. Design Rules 336 The Root Element and all Top-Levels Elements use 4 octets for their 337 EBML Element ID -- i.e. Segment and direct children of Segment. 339 Legacy EBML/Matroska parsers did not handle Empty Elements properly, 340 elements present in the file but with a length of zero. They always 341 assumed the value was 0 for integers/dates and 0x0p+0 for floats, no 342 matter the default value of the element which should have been used 343 instead. Therefore Matroska writers MUST NOT use EBML Empty 344 Elements, if the element has a default value that is not 0 for 345 integers/dates and 0x0p+0 for floats. 347 When adding new elements to Matroska, these rules MUST be followed: 349 * A non-mandatory integer/date Element MUST NOT have a default value 350 other than 0. 352 * A non-mandatory float Element MUST NOT have a default value other 353 than 0x0p+0. 355 * A non-mandatory string Element MUST NOT have a default value, as 356 empty string cannot be defined in the XML Schema. 358 4.4. Data Layout 360 A Matroska file MUST be composed of at least one EBML Document using 361 the Matroska Document Type. Each EBML Document MUST start with an 362 EBML Header and MUST be followed by the EBML Root Element, defined as 363 Segment in Matroska. Matroska defines several Top Level Elements 364 which MAY occur within the Segment. 366 As an example, a simple Matroska file consisting of a single EBML 367 Document could be represented like this: 369 * EBML Header 371 * Segment 373 A more complex Matroska file consisting of an EBML Stream (consisting 374 of two EBML Documents) could be represented like this: 376 * EBML Header 378 * Segment 380 * EBML Header 382 * Segment 384 The following diagram represents a simple Matroska file, comprised of 385 an EBML Document with an EBML Header, a Segment Element (the Root 386 Element), and all eight Matroska Top Level Elements. In the 387 following diagrams of this section, horizontal spacing expresses a 388 parent-child relationship between Matroska Elements (e.g., the Info 389 Element is contained within the Segment Element) whereas vertical 390 alignment represents the storage order within the file. 392 +-------------+ 393 | EBML Header | 394 +---------------------------+ 395 | Segment | SeekHead | 396 | |-------------| 397 | | Info | 398 | |-------------| 399 | | Tracks | 400 | |-------------| 401 | | Chapters | 402 | |-------------| 403 | | Cluster | 404 | |-------------| 405 | | Cues | 406 | |-------------| 407 | | Attachments | 408 | |-------------| 409 | | Tags | 410 +---------------------------+ 412 Figure 1: Basic layout of a Matroska file. 414 The Matroska EBML Schema defines eight Top Level Elements: SeekHead, 415 Info, Tracks, Chapters, Cluster, Cues, Attachments, and Tags. 417 The SeekHead Element (also known as MetaSeek) contains an index of 418 Top Level Elements locations within the Segment. Use of the SeekHead 419 Element is RECOMMENDED. Without a SeekHead Element, a Matroska 420 parser would have to search the entire file to find all of the other 421 Top Level Elements. This is due to Matroska's flexible ordering 422 requirements; for instance, it is acceptable for the Chapters Element 423 to be stored after the Cluster Elements. 425 +--------------------------------+ 426 | SeekHead | Seek | SeekID | 427 | | |--------------| 428 | | | SeekPosition | 429 +--------------------------------+ 431 Figure 2: Representation of a SeekHead Element. 433 The Info Element contains vital information for identifying the whole 434 Segment. This includes the title for the Segment, a randomly 435 generated unique identifier, and the unique identifier(s) of any 436 linked Segment Elements. 438 +-------------------------+ 439 | Info | SegmentUID | 440 | |------------------| 441 | | SegmentFilename | 442 | |------------------| 443 | | PrevUID | 444 | |------------------| 445 | | PrevFilename | 446 | |------------------| 447 | | NextUID | 448 | |------------------| 449 | | NextFilename | 450 | |------------------| 451 | | SegmentFamily | 452 | |------------------| 453 | | ChapterTranslate | 454 | |------------------| 455 | | TimestampScale | 456 | |------------------| 457 | | Duration | 458 | |------------------| 459 | | DateUTC | 460 | |------------------| 461 | | Title | 462 | |------------------| 463 | | MuxingApp | 464 | |------------------| 465 | | WritingApp | 466 |-------------------------| 468 Figure 3: Representation of an Info Element and its Child Elements. 470 The Tracks Element defines the technical details for each track and 471 can store the name, number, unique identifier, language, and type 472 (audio, video, subtitles, etc.) of each track. For example, the 473 Tracks Element MAY store information about the resolution of a video 474 track or sample rate of an audio track. 476 The Tracks Element MUST identify all the data needed by the codec to 477 decode the data of the specified track. However, the data required 478 is contingent on the codec used for the track. For example, a Track 479 Element for uncompressed audio only requires the audio bit rate to be 480 present. A codec such as AC-3 would require that the CodecID Element 481 be present for all tracks, as it is the primary way to identify which 482 codec to use to decode the track. 484 +------------------------------------+ 485 | Tracks | TrackEntry | TrackNumber | 486 | | |--------------| 487 | | | TrackUID | 488 | | |--------------| 489 | | | TrackType | 490 | | |--------------| 491 | | | Name | 492 | | |--------------| 493 | | | Language | 494 | | |--------------| 495 | | | CodecID | 496 | | |--------------| 497 | | | CodecPrivate | 498 | | |--------------| 499 | | | CodecName | 500 | | |----------------------------------+ 501 | | | Video | FlagInterlaced | 502 | | | |-------------------| 503 | | | | FieldOrder | 504 | | | |-------------------| 505 | | | | StereoMode | 506 | | | |-------------------| 507 | | | | AlphaMode | 508 | | | |-------------------| 509 | | | | PixelWidth | 510 | | | |-------------------| 511 | | | | PixelHeight | 512 | | | |-------------------| 513 | | | | DisplayWidth | 514 | | | |-------------------| 515 | | | | DisplayHeight | 516 | | | |-------------------| 517 | | | | AspectRatioType | 518 | | | |-------------------| 519 | | | | Color | 520 | | |----------------------------------| 521 | | | Audio | SamplingFrequency | 522 | | | |-------------------| 523 | | | | Channels | 524 | | | |-------------------| 525 | | | | BitDepth | 526 |--------------------------------------------------------| 528 Figure 4: Representation of the Tracks Element and a selection of its 529 Descendant Elements. 531 The Chapters Element lists all of the chapters. Chapters are a way 532 to set predefined points to jump to in video or audio. 534 +-----------------------------------------+ 535 | Chapters | Edition | EditionUID | 536 | | Entry |--------------------| 537 | | | EditionFlagDefault | 538 | | |--------------------| 539 | | | EditionFlagOrdered | 540 | | |---------------------------------+ 541 | | | ChapterAtom | ChapterUID | 542 | | | |-------------------| 543 | | | | ChapterStringUID | 544 | | | |-------------------| 545 | | | | ChapterTimeStart | 546 | | | |-------------------| 547 | | | | ChapterTimeEnd | 548 | | | |-------------------| 549 | | | | ChapterFlagHidden | 550 | | | |-------------------------------+ 551 | | | | ChapterDisplay | ChapString | 552 | | | | |--------------| 553 | | | | | ChapLanguage | 554 +------------------------------------------------------------------+ 556 Figure 5: Representation of the Chapters Element and a selection 557 of its Descendant Elements. 559 Cluster Elements contain the content for each track, e.g., video 560 frames. A Matroska file SHOULD contain at least one Cluster Element. 561 The Cluster Element helps to break up SimpleBlock or BlockGroup 562 Elements and helps with seeking and error protection. It is 563 RECOMMENDED that the size of each individual Cluster Element be 564 limited to store no more than 5 seconds or 5 megabytes. Every 565 Cluster Element MUST contain a Timestamp Element. This SHOULD be the 566 Timestamp Element used to play the first Block in the Cluster 567 Element. There SHOULD be one or more BlockGroup or SimpleBlock 568 Element in each Cluster Element. A BlockGroup Element MAY contain a 569 Block of data and any information relating directly to that Block. 571 +--------------------------+ 572 | Cluster | Timestamp | 573 | |----------------| 574 | | SilentTracks | 575 | |----------------| 576 | | Position | 577 | |----------------| 578 | | PrevSize | 579 | |----------------| 580 | | SimpleBlock | 581 | |----------------| 582 | | BlockGroup | 583 +--------------------------+ 585 Figure 6: Representation of a Cluster Element and its immediate 586 Child Elements. 588 +----------------------------------+ 589 | Block | Portion of | Data Type | 590 | | a Block | - Bit Flag | 591 | |--------------------------+ 592 | | Header | TrackNumber | 593 | | |-------------| 594 | | | Timestamp | 595 | | |-------------| 596 | | | Flags | 597 | | | - Gap | 598 | | | - Lacing | 599 | | | - Reserved | 600 | |--------------------------| 601 | | Optional | FrameSize | 602 | |--------------------------| 603 | | Data | Frame | 604 +----------------------------------+ 606 Figure 7: Representation of the Block Element structure. 608 Each Cluster MUST contain exactly one Timestamp Element. The 609 Timestamp Element value MUST be stored once per Cluster. The 610 Timestamp Element in the Cluster is relative to the entire Segment. 611 The Timestamp Element SHOULD be the first Element in the Cluster. 613 Additionally, the Block contains an offset that, when added to the 614 Cluster's Timestamp Element value, yields the Block's effective 615 timestamp. Therefore, timestamp in the Block itself is relative to 616 the Timestamp Element in the Cluster. For example, if the Timestamp 617 Element in the Cluster is set to 10 seconds and a Block in that 618 Cluster is supposed to be played 12 seconds into the clip, the 619 timestamp in the Block would be set to 2 seconds. 621 The ReferenceBlock in the BlockGroup is used instead of the basic 622 "P-frame"/"B-frame" description. Instead of simply saying that this 623 Block depends on the Block directly before, or directly afterwards, 624 the Timestamp of the necessary Block is used. Because there can be 625 as many ReferenceBlock Elements as necessary for a Block, it allows 626 for some extremely complex referencing. 628 The Cues Element is used to seek when playing back a file by 629 providing a temporal index for some of the Tracks. It is similar to 630 the SeekHead Element, but used for seeking to a specific time when 631 playing back the file. It is possible to seek without this element, 632 but it is much more difficult because a Matroska Reader would have to 633 'hunt and peck' through the file looking for the correct timestamp. 635 The Cues Element SHOULD contain at least one CuePoint Element. Each 636 CuePoint Element stores the position of the Cluster that contains the 637 BlockGroup or SimpleBlock Element. The timestamp is stored in the 638 CueTime Element and location is stored in the CueTrackPositions 639 Element. 641 The Cues Element is flexible. For instance, Cues Element can be used 642 to index every single timestamp of every Block or they can be indexed 643 selectively. For video files, it is RECOMMENDED to index at least 644 the keyframes of the video track. 646 +-------------------------------------+ 647 | Cues | CuePoint | CueTime | 648 | | |-------------------| 649 | | | CueTrackPositions | 650 | |------------------------------| 651 | | CuePoint | CueTime | 652 | | |-------------------| 653 | | | CueTrackPositions | 654 +-------------------------------------+ 656 Figure 8: Representation of a Cues Element and two levels of its 657 Descendant Elements. 659 The Attachments Element is for attaching files to a Matroska file 660 such as pictures, fonts, webpages, etc. 662 +------------------------------------------------+ 663 | Attachments | AttachedFile | FileDescription | 664 | | |-------------------| 665 | | | FileName | 666 | | |-------------------| 667 | | | FileMimeType | 668 | | |-------------------| 669 | | | FileData | 670 | | |-------------------| 671 | | | FileUID | 672 | | |-------------------| 673 | | | FileName | 674 | | |-------------------| 675 | | | FileReferral | 676 | | |-------------------| 677 | | | FileUsedStartTime | 678 | | |-------------------| 679 | | | FileUsedEndTime | 680 +------------------------------------------------+ 682 Figure 9: Representation of a Attachments Element. 684 The Tags Element contains metadata that describes the Segment and 685 potentially its Tracks, Chapters, and Attachments. Each Track or 686 Chapter that those tags applies to has its UID listed in the Tags. 687 The Tags contain all extra information about the file: scriptwriter, 688 singer, actors, directors, titles, edition, price, dates, genre, 689 comments, etc. Tags can contain their values in multiple languages. 690 For example, a movie's "title" Tag might contain both the original 691 English title as well as the title it was released as in Germany. 693 +-------------------------------------------+ 694 | Tags | Tag | Targets | TargetTypeValue | 695 | | | |------------------| 696 | | | | TargetType | 697 | | | |------------------| 698 | | | | TagTrackUID | 699 | | | |------------------| 700 | | | | TagEditionUID | 701 | | | |------------------| 702 | | | | TagChapterUID | 703 | | | |------------------| 704 | | | | TagAttachmentUID | 705 | | |------------------------------| 706 | | | SimpleTag | TagName | 707 | | | |------------------| 708 | | | | TagLanguage | 709 | | | |------------------| 710 | | | | TagDefault | 711 | | | |------------------| 712 | | | | TagString | 713 | | | |------------------| 714 | | | | TagBinary | 715 | | | |------------------| 716 | | | | SimpleTag | 717 +-------------------------------------------+ 719 Figure 10: Representation of a Tags Element and three levels of 720 its Children Elements. 722 5. Matroska Schema 724 This specification includes an EBML Schema, which defines the 725 Elements and structure of Matroska as an EBML Document Type. The 726 EBML Schema defines every valid Matroska element in a manner defined 727 by the EBML specification. 729 Here the definition of each Matroska Element is provided. 731 5.1. Segment Element 733 name: Segment 735 path: \Segment 737 id: 0x18538067 739 minOccurs: 1 740 maxOccurs: 1 742 type: master 744 unknownsizeallowed: 1 746 definition: The Root Element that contains all other Top-Level 747 Elements (Elements defined only at Level 1). A Matroska file is 748 composed of 1 Segment. 750 5.1.1. SeekHead Element 752 name: SeekHead 754 path: \Segment\SeekHead 756 id: 0x114D9B74 758 maxOccurs: 2 760 type: master 762 definition: Contains the Segment Position of other Top-Level 763 Elements. 765 5.1.1.1. Seek Element 767 name: Seek 769 path: \Segment\SeekHead\Seek 771 id: 0x4DBB 773 minOccurs: 1 775 type: master 777 definition: Contains a single seek entry to an EBML Element. 779 5.1.1.1.1. SeekID Element 781 name: SeekID 783 path: \Segment\SeekHead\Seek\SeekID 785 id: 0x53AB 787 minOccurs: 1 788 maxOccurs: 1 790 type: binary 792 definition: The binary ID corresponding to the Element name. 794 5.1.1.1.2. SeekPosition Element 796 name: SeekPosition 798 path: \Segment\SeekHead\Seek\SeekPosition 800 id: 0x53AC 802 minOccurs: 1 804 maxOccurs: 1 806 type: uinteger 808 definition: The Segment Position of the Element. 810 5.1.2. Info Element 812 name: Info 814 path: \Segment\Info 816 id: 0x1549A966 818 minOccurs: 1 820 maxOccurs: 1 822 type: master 824 recurring: 1 826 definition: Contains general information about the Segment. 828 5.1.2.1. SegmentUID Element 830 name: SegmentUID 832 path: \Segment\Info\SegmentUID 834 id: 0x73A4 835 maxOccurs: 1 837 range: not 0 839 type: binary 841 definition: A randomly generated unique ID to identify the Segment 842 amongst many others (128 bits). 844 usage notes: If the Segment is a part of a Linked Segment, then this 845 Element is REQUIRED. 847 5.1.2.2. SegmentFilename Element 849 name: SegmentFilename 851 path: \Segment\Info\SegmentFilename 853 id: 0x7384 855 maxOccurs: 1 857 type: utf-8 859 definition: A filename corresponding to this Segment. 861 5.1.2.3. PrevUID Element 863 name: PrevUID 865 path: \Segment\Info\PrevUID 867 id: 0x3CB923 869 maxOccurs: 1 871 type: binary 873 definition: A unique ID to identify the previous Segment of a Linked 874 Segment (128 bits). 876 usage notes: If the Segment is a part of a Linked Segment that uses 877 Hard Linking, then either the PrevUID or the NextUID Element is 878 REQUIRED. If a Segment contains a PrevUID but not a NextUID, then 879 it MAY be considered as the last Segment of the Linked Segment. 880 The PrevUID MUST NOT be equal to the SegmentUID. 882 5.1.2.4. PrevFilename Element 884 name: PrevFilename 886 path: \Segment\Info\PrevFilename 888 id: 0x3C83AB 890 maxOccurs: 1 892 type: utf-8 894 definition: A filename corresponding to the file of the previous 895 Linked Segment. 897 usage notes: Provision of the previous filename is for display 898 convenience, but PrevUID SHOULD be considered authoritative for 899 identifying the previous Segment in a Linked Segment. 901 5.1.2.5. NextUID Element 903 name: NextUID 905 path: \Segment\Info\NextUID 907 id: 0x3EB923 909 maxOccurs: 1 911 type: binary 913 definition: A unique ID to identify the next Segment of a Linked 914 Segment (128 bits). 916 usage notes: If the Segment is a part of a Linked Segment that uses 917 Hard Linking, then either the PrevUID or the NextUID Element is 918 REQUIRED. If a Segment contains a NextUID but not a PrevUID, then 919 it MAY be considered as the first Segment of the Linked Segment. 920 The NextUID MUST NOT be equal to the SegmentUID. 922 5.1.2.6. NextFilename Element 924 name: NextFilename 926 path: \Segment\Info\NextFilename 928 id: 0x3E83BB 929 maxOccurs: 1 931 type: utf-8 933 definition: A filename corresponding to the file of the next Linked 934 Segment. 936 usage notes: Provision of the next filename is for display 937 convenience, but NextUID SHOULD be considered authoritative for 938 identifying the Next Segment. 940 5.1.2.7. SegmentFamily Element 942 name: SegmentFamily 944 path: \Segment\Info\SegmentFamily 946 id: 0x4444 948 type: binary 950 definition: A randomly generated unique ID that all Segments of a 951 Linked Segment MUST share (128 bits). 953 usage notes: If the Segment Info contains a ChapterTranslate 954 element, this Element is REQUIRED. 956 5.1.2.8. ChapterTranslate Element 958 name: ChapterTranslate 960 path: \Segment\Info\ChapterTranslate 962 id: 0x6924 964 type: master 966 definition: The mapping between this Segment and a segment value in 967 the given Chapter Codec. 969 rationale: Chapter Codec may need to address different segments, but 970 they may not know of the way to identify such segment when stored 971 in Matroska. This element and its child elements add a way to map 972 the internal segments known to the Chapter Codec to the Segment 973 IDs in Matroska. This allows remuxing a file with Chapter Codec 974 without changing the content of the codec data, just the Segment 975 mapping. 977 5.1.2.8.1. ChapterTranslateID Element 979 name: ChapterTranslateID 981 path: \Segment\Info\ChapterTranslate\ChapterTranslateID 983 id: 0x69A5 985 minOccurs: 1 987 maxOccurs: 1 989 type: binary 991 definition: The binary value used to represent this Segment in the 992 chapter codec data. The format depends on the ChapProcessCodecID 993 used; see Section 5.1.7.1.4.15. 995 5.1.2.8.2. ChapterTranslateCodec Element 997 name: ChapterTranslateCodec 999 path: \Segment\Info\ChapterTranslate\ChapterTranslateCodec 1001 id: 0x69BF 1003 minOccurs: 1 1005 maxOccurs: 1 1007 type: uinteger 1009 definition: This ChapterTranslate applies to this chapter codec of 1010 the given chapter edition(s); see Section 5.1.7.1.4.15. 1012 defined values: 1014 +=======+=================+============================+ 1015 | value | label | definition | 1016 +=======+=================+============================+ 1017 | 0 | Matroska Script | Chapter commands using the | 1018 | | | Matroska Script codec. | 1019 +-------+-----------------+----------------------------+ 1020 | 1 | DVD-menu | Chapter commands using the | 1021 | | | DVD-like codec. | 1022 +-------+-----------------+----------------------------+ 1024 Table 1: ChapterTranslateCodec values 1026 5.1.2.8.3. ChapterTranslateEditionUID Element 1028 name: ChapterTranslateEditionUID 1030 path: \Segment\Info\ChapterTranslate\ChapterTranslateEditionUID 1032 id: 0x69FC 1034 type: uinteger 1036 definition: Specify a chapter edition UID on which this 1037 ChapterTranslate applies. 1039 usage notes: When no ChapterTranslateEditionUID is specified in the 1040 ChapterTranslate, the ChapterTranslate applied to all chapter 1041 editions found in the Segment using the given 1042 ChapterTranslateCodec. 1044 5.1.2.9. TimestampScale Element 1046 name: TimestampScale 1048 path: \Segment\Info\TimestampScale 1050 id: 0x2AD7B1 1052 minOccurs: 1 1054 maxOccurs: 1 1056 range: not 0 1058 default: 1000000 1060 type: uinteger 1062 definition: Base unit for Segment Ticks and Track Ticks, in 1063 nanoseconds. A TimestampScale value of 1.000.000 means scaled 1064 timestamps in the Segment are expressed in milliseconds; see 1065 Section 10 on how to interpret timestamps. 1067 5.1.2.10. Duration Element 1069 name: Duration 1071 path: \Segment\Info\Duration 1073 id: 0x4489 1074 maxOccurs: 1 1076 range: > 0x0p+0 1078 type: float 1080 definition: Duration of the Segment, expressed in Segment Ticks 1081 which is based on TimestampScale; see Section 10.1. 1083 5.1.2.11. DateUTC Element 1085 name: DateUTC 1087 path: \Segment\Info\DateUTC 1089 id: 0x4461 1091 maxOccurs: 1 1093 type: date 1095 definition: The date and time that the Segment was created by the 1096 muxing application or library. 1098 5.1.2.12. Title Element 1100 name: Title 1102 path: \Segment\Info\Title 1104 id: 0x7BA9 1106 maxOccurs: 1 1108 type: utf-8 1110 definition: General name of the Segment. 1112 5.1.2.13. MuxingApp Element 1114 name: MuxingApp 1116 path: \Segment\Info\MuxingApp 1118 id: 0x4D80 1120 minOccurs: 1 1121 maxOccurs: 1 1123 type: utf-8 1125 definition: Muxing application or library (example: "libmatroska- 1126 0.4.3"). 1128 usage notes: Include the full name of the application or library 1129 followed by the version number. 1131 5.1.2.14. WritingApp Element 1133 name: WritingApp 1135 path: \Segment\Info\WritingApp 1137 id: 0x5741 1139 minOccurs: 1 1141 maxOccurs: 1 1143 type: utf-8 1145 definition: Writing application (example: "mkvmerge-0.3.3"). 1147 usage notes: Include the full name of the application followed by 1148 the version number. 1150 5.1.3. Cluster Element 1152 name: Cluster 1154 path: \Segment\Cluster 1156 id: 0x1F43B675 1158 type: master 1160 unknownsizeallowed: 1 1162 definition: The Top-Level Element containing the (monolithic) Block 1163 structure. 1165 5.1.3.1. Timestamp Element 1167 name: Timestamp 1168 path: \Segment\Cluster\Timestamp 1170 id: 0xE7 1172 minOccurs: 1 1174 maxOccurs: 1 1176 type: uinteger 1178 definition: Absolute timestamp of the cluster, expressed in Segment 1179 Ticks which is based on TimestampScale; see Section 10.1. 1181 usage notes: This element SHOULD be the first child element of the 1182 Cluster it belongs to, or the second if that Cluster contains a 1183 CRC-32 element (Section 6.2). 1185 5.1.3.2. Position Element 1187 name: Position 1189 path: \Segment\Cluster\Position 1191 id: 0xA7 1193 maxOccurs: 1 1195 type: uinteger 1197 definition: The Segment Position of the Cluster in the Segment (0 in 1198 live streams). It might help to resynchronise offset on damaged 1199 streams. 1201 5.1.3.3. PrevSize Element 1203 name: PrevSize 1205 path: \Segment\Cluster\PrevSize 1207 id: 0xAB 1209 maxOccurs: 1 1211 type: uinteger 1213 definition: Size of the previous Cluster, in octets. Can be useful 1214 for backward playing. 1216 5.1.3.4. SimpleBlock Element 1218 name: SimpleBlock 1220 path: \Segment\Cluster\SimpleBlock 1222 id: 0xA3 1224 type: binary 1226 minver: 2 1228 definition: Similar to Block, see Section 9, but without all the 1229 extra information, mostly used to reduced overhead when no extra 1230 feature is needed; see Section 9.3 on SimpleBlock Structure. 1232 5.1.3.5. BlockGroup Element 1234 name: BlockGroup 1236 path: \Segment\Cluster\BlockGroup 1238 id: 0xA0 1240 type: master 1242 definition: Basic container of information containing a single Block 1243 and information specific to that Block. 1245 5.1.3.5.1. Block Element 1247 name: Block 1249 path: \Segment\Cluster\BlockGroup\Block 1251 id: 0xA1 1253 minOccurs: 1 1255 maxOccurs: 1 1257 type: binary 1259 definition: Block containing the actual data to be rendered and a 1260 timestamp relative to the Cluster Timestamp; see Section 9 on 1261 Block Structure. 1263 5.1.3.5.2. BlockAdditions Element 1265 name: BlockAdditions 1267 path: \Segment\Cluster\BlockGroup\BlockAdditions 1269 id: 0x75A1 1271 maxOccurs: 1 1273 type: master 1275 definition: Contain additional blocks to complete the main one. An 1276 EBML parser that has no knowledge of the Block structure could 1277 still see and use/skip these data. 1279 5.1.3.5.2.1. BlockMore Element 1281 name: BlockMore 1283 path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore 1285 id: 0xA6 1287 minOccurs: 1 1289 type: master 1291 definition: Contain the BlockAdditional and some parameters. 1293 5.1.3.5.2.2. BlockAddID Element 1295 name: BlockAddID 1297 path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddI 1298 D 1300 id: 0xEE 1302 minOccurs: 1 1304 maxOccurs: 1 1306 range: not 0 1308 default: 1 1310 type: uinteger 1311 definition: An ID to identify the BlockAdditional level. If 1312 BlockAddIDType of the corresponding block is 0, this value is also 1313 the value of BlockAddIDType for the meaning of the content of 1314 BlockAdditional. 1316 5.1.3.5.2.3. BlockAdditional Element 1318 name: BlockAdditional 1320 path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddi 1321 tional 1323 id: 0xA5 1325 minOccurs: 1 1327 maxOccurs: 1 1329 type: binary 1331 definition: Interpreted by the codec as it wishes (using the 1332 BlockAddID). 1334 5.1.3.5.3. BlockDuration Element 1336 name: BlockDuration 1338 path: \Segment\Cluster\BlockGroup\BlockDuration 1340 id: 0x9B 1342 minOccurs: see implementation notes 1344 maxOccurs: 1 1346 default: see implementation notes 1348 type: uinteger 1350 definition: The duration of the Block, expressed in Track Ticks; see 1351 Section 10.1. The BlockDuration Element can be useful at the end 1352 of a Track to define the duration of the last frame (as there is 1353 no subsequent Block available), or when there is a break in a 1354 track like for subtitle tracks. 1356 notes: 1358 +===========+===================================================+ 1359 | attribute | note | 1360 +===========+===================================================+ 1361 | minOccurs | BlockDuration MUST be set (minOccurs=1) if the | 1362 | | associated TrackEntry stores a DefaultDuration | 1363 | | value. | 1364 +-----------+---------------------------------------------------+ 1365 | default | When not written and with no DefaultDuration, the | 1366 | | value is assumed to be the difference between the | 1367 | | timestampof this Block and the timestamp of the | 1368 | | next Block in "display" order (not coding order). | 1369 +-----------+---------------------------------------------------+ 1371 Table 2: BlockDuration implementation notes 1373 5.1.3.5.4. ReferencePriority Element 1375 name: ReferencePriority 1377 path: \Segment\Cluster\BlockGroup\ReferencePriority 1379 id: 0xFA 1381 minOccurs: 1 1383 maxOccurs: 1 1385 default: 0 1387 type: uinteger 1389 definition: This frame is referenced and has the specified cache 1390 priority. In cache only a frame of the same or higher priority 1391 can replace this frame. A value of 0 means the frame is not 1392 referenced. 1394 5.1.3.5.5. ReferenceBlock Element 1396 name: ReferenceBlock 1398 path: \Segment\Cluster\BlockGroup\ReferenceBlock 1400 id: 0xFB 1402 type: integer 1404 definition: A timestamp value, relative to the timestamp of the 1405 Block in this BlockGroup, expressed in Track Ticks; see 1406 Section 10.1. This is used to reference other frames necessary to 1407 decode this frame. The relative value SHOULD correspond to a 1408 valid Block this Block depends on. Historically Matroska Writer 1409 didn't write the actual Block(s) this Block depends on, but _some_ 1410 Block in the past. 1412 The value "0" MAY also be used to signify this Block cannot be 1413 decoded on its own, but without knownledge of which Block is 1414 necessary. In this case, other ReferenceBlock MUST NOT be found in 1415 the same BlockGroup. 1417 If the BlockGroup doesn't have any ReferenceBlock element, then the 1418 Block it contains can be decoded without using any other Block data. 1420 5.1.3.5.6. CodecState Element 1422 name: CodecState 1424 path: \Segment\Cluster\BlockGroup\CodecState 1426 id: 0xA4 1428 maxOccurs: 1 1430 type: binary 1432 minver: 2 1434 definition: The new codec state to use. Data interpretation is 1435 private to the codec. This information SHOULD always be 1436 referenced by a seek entry. 1438 5.1.3.5.7. DiscardPadding Element 1440 name: DiscardPadding 1442 path: \Segment\Cluster\BlockGroup\DiscardPadding 1444 id: 0x75A2 1446 maxOccurs: 1 1448 type: integer 1450 minver: 4 1452 definition: Duration of the silent data added to the Block, 1453 expressed in Matroska Ticks -- ie in nanoseconds; see Section 10.1 1454 (padding at the end of the Block for positive value, at the 1455 beginning of the Block for negative value). The duration of 1456 DiscardPadding is not calculated in the duration of the TrackEntry 1457 and SHOULD be discarded during playback. 1459 5.1.4. Tracks Element 1461 name: Tracks 1463 path: \Segment\Tracks 1465 id: 0x1654AE6B 1467 maxOccurs: 1 1469 type: master 1471 recurring: 1 1473 definition: A Top-Level Element of information with many tracks 1474 described. 1476 5.1.4.1. TrackEntry Element 1478 name: TrackEntry 1480 path: \Segment\Tracks\TrackEntry 1482 id: 0xAE 1484 minOccurs: 1 1486 type: master 1488 definition: Describes a track with all Elements. 1490 5.1.4.1.1. TrackNumber Element 1492 name: TrackNumber 1494 path: \Segment\Tracks\TrackEntry\TrackNumber 1496 id: 0xD7 1498 minOccurs: 1 1500 maxOccurs: 1 1501 range: not 0 1503 type: uinteger 1505 definition: The track number as used in the Block Header (using more 1506 than 127 tracks is not encouraged, though the design allows an 1507 unlimited number). 1509 5.1.4.1.2. TrackUID Element 1511 name: TrackUID 1513 path: \Segment\Tracks\TrackEntry\TrackUID 1515 id: 0x73C5 1517 minOccurs: 1 1519 maxOccurs: 1 1521 range: not 0 1523 type: uinteger 1525 definition: A unique ID to identify the Track. 1527 usage notes: The value of this Element SHOULD be kept the same when 1528 making a direct stream copy to another file. 1530 5.1.4.1.3. TrackType Element 1532 name: TrackType 1534 path: \Segment\Tracks\TrackEntry\TrackType 1536 id: 0x83 1538 minOccurs: 1 1540 maxOccurs: 1 1542 type: uinteger 1544 definition: The TrackType defines the type of each frame found in 1545 the Track. The value SHOULD be stored on 1 octet. 1547 defined values: 1549 +=======+==========+==========================================+ 1550 | value | label | each frame contains | 1551 +=======+==========+==========================================+ 1552 | 1 | video | An image. | 1553 +-------+----------+------------------------------------------+ 1554 | 2 | audio | Audio samples. | 1555 +-------+----------+------------------------------------------+ 1556 | 3 | complex | A mix of different other TrackType. The | 1557 | | | codec needs to define how the Matroska | 1558 | | | Player should interpret such data. | 1559 +-------+----------+------------------------------------------+ 1560 | 16 | logo | An image to be rendered over the video | 1561 | | | track(s). | 1562 +-------+----------+------------------------------------------+ 1563 | 17 | subtitle | Subtitle or closed caption data to be | 1564 | | | rendered over the video track(s). | 1565 +-------+----------+------------------------------------------+ 1566 | 18 | buttons | Interactive button(s) to be rendered | 1567 | | | over the video track(s). | 1568 +-------+----------+------------------------------------------+ 1569 | 32 | control | Metadata used to control the player of | 1570 | | | the Matroska Player. | 1571 +-------+----------+------------------------------------------+ 1572 | 33 | metadata | Timed metadata that can be passed on to | 1573 | | | the Matroska Player. | 1574 +-------+----------+------------------------------------------+ 1576 Table 3: TrackType values 1578 usage notes: The value of this Element SHOULD be kept the same when 1579 making a direct stream copy to another file. 1581 5.1.4.1.4. FlagEnabled Element 1583 name: FlagEnabled 1585 path: \Segment\Tracks\TrackEntry\FlagEnabled 1587 id: 0xB9 1589 minOccurs: 1 1591 maxOccurs: 1 1593 range: 0-1 1595 default: 1 1596 type: uinteger 1598 minver: 2 1600 definition: Set to 1 if the track is usable. It is possible to turn 1601 a not usable track into a usable track using chapter codecs or 1602 control tracks. 1604 5.1.4.1.5. FlagDefault Element 1606 name: FlagDefault 1608 path: \Segment\Tracks\TrackEntry\FlagDefault 1610 id: 0x88 1612 minOccurs: 1 1614 maxOccurs: 1 1616 range: 0-1 1618 default: 1 1620 type: uinteger 1622 definition: Set if that track (audio, video or subs) SHOULD be 1623 eligible for automatic selection by the player; see Section 19 for 1624 more details. 1626 5.1.4.1.6. FlagForced Element 1628 name: FlagForced 1630 path: \Segment\Tracks\TrackEntry\FlagForced 1632 id: 0x55AA 1634 minOccurs: 1 1636 maxOccurs: 1 1638 range: 0-1 1640 default: 0 1642 type: uinteger 1643 definition: Applies only to subtitles. Set if that track SHOULD be 1644 eligible for automatic selection by the player if it matches the 1645 user's language preference, even if the user's preferences would 1646 normally not enable subtitles with the selected audio track; this 1647 can be used for tracks containing only translations of foreign- 1648 language audio or onscreen text. See Section 19 for more details. 1650 5.1.4.1.7. FlagHearingImpaired Element 1652 name: FlagHearingImpaired 1654 path: \Segment\Tracks\TrackEntry\FlagHearingImpaired 1656 id: 0x55AB 1658 maxOccurs: 1 1660 range: 0-1 1662 type: uinteger 1664 minver: 4 1666 definition: Set to 1 if that track is suitable for users with 1667 hearing impairments, set to 0 if it is unsuitable for users with 1668 hearing impairments. 1670 5.1.4.1.8. FlagVisualImpaired Element 1672 name: FlagVisualImpaired 1674 path: \Segment\Tracks\TrackEntry\FlagVisualImpaired 1676 id: 0x55AC 1678 maxOccurs: 1 1680 range: 0-1 1682 type: uinteger 1684 minver: 4 1686 definition: Set to 1 if that track is suitable for users with visual 1687 impairments, set to 0 if it is unsuitable for users with visual 1688 impairments. 1690 5.1.4.1.9. FlagTextDescriptions Element 1692 name: FlagTextDescriptions 1694 path: \Segment\Tracks\TrackEntry\FlagTextDescriptions 1696 id: 0x55AD 1698 maxOccurs: 1 1700 range: 0-1 1702 type: uinteger 1704 minver: 4 1706 definition: Set to 1 if that track contains textual descriptions of 1707 video content, set to 0 if that track does not contain textual 1708 descriptions of video content. 1710 5.1.4.1.10. FlagOriginal Element 1712 name: FlagOriginal 1714 path: \Segment\Tracks\TrackEntry\FlagOriginal 1716 id: 0x55AE 1718 maxOccurs: 1 1720 range: 0-1 1722 type: uinteger 1724 minver: 4 1726 definition: Set to 1 if that track is in the content's original 1727 language, set to 0 if it is a translation. 1729 5.1.4.1.11. FlagCommentary Element 1731 name: FlagCommentary 1733 path: \Segment\Tracks\TrackEntry\FlagCommentary 1735 id: 0x55AF 1737 maxOccurs: 1 1738 range: 0-1 1740 type: uinteger 1742 minver: 4 1744 definition: Set to 1 if that track contains commentary, set to 0 if 1745 it does not contain commentary. 1747 5.1.4.1.12. FlagLacing Element 1749 name: FlagLacing 1751 path: \Segment\Tracks\TrackEntry\FlagLacing 1753 id: 0x9C 1755 minOccurs: 1 1757 maxOccurs: 1 1759 range: 0-1 1761 default: 1 1763 type: uinteger 1765 definition: Set to 1 if the track MAY contain blocks using lacing. 1766 When set to 0 all blocks MUST have their lacing flags set to No 1767 lacing; see Section 9.4 on Block Lacing. 1769 5.1.4.1.13. MinCache Element 1771 name: MinCache 1773 path: \Segment\Tracks\TrackEntry\MinCache 1775 id: 0x6DE7 1777 minOccurs: 1 1779 maxOccurs: 1 1781 default: 0 1783 type: uinteger 1785 definition: The minimum number of frames a player SHOULD be able to 1786 cache during playback. If set to 0, the reference pseudo-cache 1787 system is not used. 1789 5.1.4.1.14. MaxCache Element 1791 name: MaxCache 1793 path: \Segment\Tracks\TrackEntry\MaxCache 1795 id: 0x6DF8 1797 maxOccurs: 1 1799 type: uinteger 1801 definition: The maximum cache size necessary to store referenced 1802 frames in and the current frame. 0 means no cache is needed. 1804 5.1.4.1.15. DefaultDuration Element 1806 name: DefaultDuration 1808 path: \Segment\Tracks\TrackEntry\DefaultDuration 1810 id: 0x23E383 1812 maxOccurs: 1 1814 range: not 0 1816 type: uinteger 1818 definition: Number of nanoseconds per frame, expressed in Matroska 1819 Ticks -- ie in nanoseconds; see Section 10.1 (frame in the 1820 Matroska sense -- one Element put into a (Simple)Block). 1822 usage notes: The value of this Element SHOULD be kept the same when 1823 making a direct stream copy to another file. 1825 5.1.4.1.16. DefaultDecodedFieldDuration Element 1827 name: DefaultDecodedFieldDuration 1829 path: \Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration 1831 id: 0x234E7A 1833 maxOccurs: 1 1834 range: not 0 1836 type: uinteger 1838 minver: 4 1840 definition: The period between two successive fields at the output 1841 of the decoding process, expressed in Matroska Ticks -- ie in 1842 nanoseconds; see Section 10.1. see Section 8 for more information 1844 usage notes: The value of this Element SHOULD be kept the same when 1845 making a direct stream copy to another file. 1847 5.1.4.1.17. TrackTimestampScale Element 1849 name: TrackTimestampScale 1851 path: \Segment\Tracks\TrackEntry\TrackTimestampScale 1853 id: 0x23314F 1855 minOccurs: 1 1857 maxOccurs: 1 1859 range: > 0x0p+0 1861 default: 0x1p+0 1863 type: float 1865 maxver: 3 1867 definition: DEPRECATED, DO NOT USE. The scale to apply on this 1868 track to work at normal speed in relation with other tracks 1869 (mostly used to adjust video speed when the audio length differs). 1871 usage notes: The value of this Element SHOULD be kept the same when 1872 making a direct stream copy to another file. 1874 5.1.4.1.18. MaxBlockAdditionID Element 1876 name: MaxBlockAdditionID 1878 path: \Segment\Tracks\TrackEntry\MaxBlockAdditionID 1880 id: 0x55EE 1881 minOccurs: 1 1883 maxOccurs: 1 1885 default: 0 1887 type: uinteger 1889 definition: The maximum value of BlockAddID (Section 5.1.3.5.2.2). 1890 A value 0 means there is no BlockAdditions (Section 5.1.3.5.2) for 1891 this track. 1893 5.1.4.1.19. BlockAdditionMapping Element 1895 name: BlockAdditionMapping 1897 path: \Segment\Tracks\TrackEntry\BlockAdditionMapping 1899 id: 0x41E4 1901 type: master 1903 minver: 4 1905 definition: Contains elements that extend the track format, by 1906 adding content either to each frame, with BlockAddID 1907 (Section 5.1.3.5.2.2), or to the track as a whole with 1908 BlockAddIDExtraData. 1910 5.1.4.1.19.1. BlockAddIDValue Element 1912 name: BlockAddIDValue 1914 path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDValu 1915 e 1917 id: 0x41F0 1919 maxOccurs: 1 1921 range: >=2 1923 type: uinteger 1925 minver: 4 1927 definition: If the track format extension needs content beside 1928 frames, the value refers to the BlockAddID (Section 5.1.3.5.2.2), 1929 value being described. To keep MaxBlockAdditionID as low as 1930 possible, small values SHOULD be used. 1932 5.1.4.1.19.2. BlockAddIDName Element 1934 name: BlockAddIDName 1936 path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDName 1938 id: 0x41A4 1940 maxOccurs: 1 1942 type: string 1944 minver: 4 1946 definition: A human-friendly name describing the type of 1947 BlockAdditional data, as defined by the associated Block 1948 Additional Mapping. 1950 5.1.4.1.19.3. BlockAddIDType Element 1952 name: BlockAddIDType 1954 path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDType 1956 id: 0x41E7 1958 minOccurs: 1 1960 maxOccurs: 1 1962 default: 0 1964 type: uinteger 1966 minver: 4 1968 definition: Stores the registered identifier of the Block Additional 1969 Mapping to define how the BlockAdditional data should be handled. 1971 5.1.4.1.19.4. BlockAddIDExtraData Element 1973 name: BlockAddIDExtraData 1975 path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDExtr 1976 aData 1978 id: 0x41ED 1980 maxOccurs: 1 1982 type: binary 1984 minver: 4 1986 definition: Extra binary data that the BlockAddIDType can use to 1987 interpret the BlockAdditional data. The interpretation of the 1988 binary data depends on the BlockAddIDType value and the 1989 corresponding Block Additional Mapping. 1991 5.1.4.1.20. Name Element 1993 name: Name 1995 path: \Segment\Tracks\TrackEntry\Name 1997 id: 0x536E 1999 maxOccurs: 1 2001 type: utf-8 2003 definition: A human-readable track name. 2005 5.1.4.1.21. Language Element 2007 name: Language 2009 path: \Segment\Tracks\TrackEntry\Language 2011 id: 0x22B59C 2013 minOccurs: 1 2015 maxOccurs: 1 2017 default: eng 2019 type: string 2021 definition: Specifies the language of the track in the Matroska 2022 languages form; see Section 11 on language codes. This Element 2023 MUST be ignored if the LanguageIETF Element is used in the same 2024 TrackEntry. 2026 5.1.4.1.22. LanguageIETF Element 2028 name: LanguageIETF 2030 path: \Segment\Tracks\TrackEntry\LanguageIETF 2032 id: 0x22B59D 2034 maxOccurs: 1 2036 type: string 2038 minver: 4 2040 definition: Specifies the language of the track according to [BCP47] 2041 and using the IANA Language Subtag Registry [IANALangRegistry]. 2042 If this Element is used, then any Language Elements used in the 2043 same TrackEntry MUST be ignored. 2045 5.1.4.1.23. CodecID Element 2047 name: CodecID 2049 path: \Segment\Tracks\TrackEntry\CodecID 2051 id: 0x86 2053 minOccurs: 1 2055 maxOccurs: 1 2057 type: string 2059 definition: An ID corresponding to the codec, see [MatroskaCodec] 2060 for more info. 2062 usage notes: The value of this Element SHOULD be kept the same when 2063 making a direct stream copy to another file. 2065 5.1.4.1.24. CodecPrivate Element 2067 name: CodecPrivate 2069 path: \Segment\Tracks\TrackEntry\CodecPrivate 2070 id: 0x63A2 2072 maxOccurs: 1 2074 type: binary 2076 definition: Private data only known to the codec. 2078 usage notes: The value of this Element SHOULD be kept the same when 2079 making a direct stream copy to another file. 2081 5.1.4.1.25. CodecName Element 2083 name: CodecName 2085 path: \Segment\Tracks\TrackEntry\CodecName 2087 id: 0x258688 2089 maxOccurs: 1 2091 type: utf-8 2093 definition: A human-readable string specifying the codec. 2095 5.1.4.1.26. AttachmentLink Element 2097 name: AttachmentLink 2099 path: \Segment\Tracks\TrackEntry\AttachmentLink 2101 id: 0x7446 2103 maxOccurs: 1 2105 range: not 0 2107 type: uinteger 2109 maxver: 3 2111 definition: The UID of an attachment that is used by this codec. 2113 usage notes: The value MUST match the FileUID value of an attachment 2114 found in this Segment. 2116 5.1.4.1.27. TrackOverlay Element 2118 name: TrackOverlay 2120 path: \Segment\Tracks\TrackEntry\TrackOverlay 2122 id: 0x6FAB 2124 type: uinteger 2126 definition: Specify that this track is an overlay track for the 2127 Track specified (in the u-integer). That means when this track 2128 has a gap, see Section 26.1 on SilentTracks, the overlay track 2129 SHOULD be used instead. The order of multiple TrackOverlay 2130 matters, the first one is the one that SHOULD be used. If not 2131 found it SHOULD be the second, etc. 2133 5.1.4.1.28. CodecDelay Element 2135 name: CodecDelay 2137 path: \Segment\Tracks\TrackEntry\CodecDelay 2139 id: 0x56AA 2141 minOccurs: 1 2143 maxOccurs: 1 2145 default: 0 2147 type: uinteger 2149 minver: 4 2151 definition: CodecDelay is The codec-built-in delay, expressed in 2152 Matroska Ticks -- ie in nanoseconds; see Section 10.1. It 2153 represents the amount of codec samples that will be discarded by 2154 the decoder during playback. This timestamp value MUST be 2155 subtracted from each frame timestamp in order to get the timestamp 2156 that will be actually played. The value SHOULD be small so the 2157 muxing of tracks with the same actual timestamp are in the same 2158 Cluster. 2160 usage notes: The value of this Element SHOULD be kept the same when 2161 making a direct stream copy to another file. 2163 5.1.4.1.29. SeekPreRoll Element 2165 name: SeekPreRoll 2167 path: \Segment\Tracks\TrackEntry\SeekPreRoll 2169 id: 0x56BB 2171 minOccurs: 1 2173 maxOccurs: 1 2175 default: 0 2177 type: uinteger 2179 minver: 4 2181 definition: After a discontinuity, SeekPreRoll is the duration of 2182 the data the decoder MUST decode before the decoded data is valid, 2183 expressed in Matroska Ticks -- ie in nanoseconds; see 2184 Section 10.1. 2186 usage notes: The value of this Element SHOULD be kept the same when 2187 making a direct stream copy to another file. 2189 5.1.4.1.30. TrackTranslate Element 2191 name: TrackTranslate 2193 path: \Segment\Tracks\TrackEntry\TrackTranslate 2195 id: 0x6624 2197 type: master 2199 definition: The mapping between this TrackEntry and a track value in 2200 the given Chapter Codec. 2202 rationale: Chapter Codec may need to address content in specific 2203 track, but they may not know of the way to identify tracks in 2204 Matroska. This element and its child elements add a way to map 2205 the internal tracks known to the Chapter Codec to the track IDs in 2206 Matroska. This allows remuxing a file with Chapter Codec without 2207 changing the content of the codec data, just the track mapping. 2209 5.1.4.1.30.1. TrackTranslateTrackID Element 2211 name: TrackTranslateTrackID 2213 path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackI 2214 D 2216 id: 0x66A5 2218 minOccurs: 1 2220 maxOccurs: 1 2222 type: binary 2224 definition: The binary value used to represent this TrackEntry in 2225 the chapter codec data. The format depends on the 2226 ChapProcessCodecID used; see Section 5.1.7.1.4.15. 2228 5.1.4.1.30.2. TrackTranslateCodec Element 2230 name: TrackTranslateCodec 2232 path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec 2234 id: 0x66BF 2236 minOccurs: 1 2238 maxOccurs: 1 2240 type: uinteger 2242 definition: This TrackTranslate applies to this chapter codec of the 2243 given chapter edition(s); see Section 5.1.7.1.4.15. 2245 defined values: 2247 +=======+=================+============================+ 2248 | value | label | definition | 2249 +=======+=================+============================+ 2250 | 0 | Matroska Script | Chapter commands using the | 2251 | | | Matroska Script codec. | 2252 +-------+-----------------+----------------------------+ 2253 | 1 | DVD-menu | Chapter commands using the | 2254 | | | DVD-like codec. | 2255 +-------+-----------------+----------------------------+ 2257 Table 4: TrackTranslateCodec values 2259 5.1.4.1.30.3. TrackTranslateEditionUID Element 2261 name: TrackTranslateEditionUID 2263 path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEditio 2264 nUID 2266 id: 0x66FC 2268 type: uinteger 2270 definition: Specify a chapter edition UID on which this 2271 TrackTranslate applies. 2273 usage notes: When no TrackTranslateEditionUID is specified in the 2274 TrackTranslate, the TrackTranslate applies to all chapter editions 2275 found in the Segment using the given TrackTranslateCodec. 2277 5.1.4.1.31. Video Element 2279 name: Video 2281 path: \Segment\Tracks\TrackEntry\Video 2283 id: 0xE0 2285 maxOccurs: 1 2287 type: master 2289 definition: Video settings. 2291 5.1.4.1.31.1. FlagInterlaced Element 2293 name: FlagInterlaced 2294 path: \Segment\Tracks\TrackEntry\Video\FlagInterlaced 2296 id: 0x9A 2298 minOccurs: 1 2300 maxOccurs: 1 2302 default: 0 2304 type: uinteger 2306 minver: 2 2308 definition: Specify whether the video frames in this track are 2309 interlaced or not. 2311 defined values: 2313 +=======+==============+==========================+ 2314 | value | label | definition | 2315 +=======+==============+==========================+ 2316 | 0 | undetermined | Unknown status.This | 2317 | | | value SHOULD be avoided. | 2318 +-------+--------------+--------------------------+ 2319 | 1 | interlaced | Interlaced frames. | 2320 +-------+--------------+--------------------------+ 2321 | 2 | progressive | No interlacing. | 2322 +-------+--------------+--------------------------+ 2324 Table 5: FlagInterlaced values 2326 usage notes: The value of this Element SHOULD be kept the same when 2327 making a direct stream copy to another file. 2329 5.1.4.1.31.2. FieldOrder Element 2331 name: FieldOrder 2333 path: \Segment\Tracks\TrackEntry\Video\FieldOrder 2335 id: 0x9D 2337 minOccurs: 1 2339 maxOccurs: 1 2341 default: 2 2342 type: uinteger 2344 minver: 4 2346 definition: Specify the field ordering of video frames in this 2347 track. 2349 defined values: 2351 +===============+==============+====================================+ 2352 | value | label | definition | 2353 +===============+==============+====================================+ 2354 | 0 | progressive | Interlaced frames.This | 2355 | | | value SHOULD be avoided, | 2356 | | | setting FlagInterlaced | 2357 | | | to 2 is sufficient. | 2358 +---------------+--------------+------------------------------------+ 2359 | 1 | tff | Top field displayed | 2360 | | | first. Top field stored | 2361 | | | first. | 2362 +---------------+--------------+------------------------------------+ 2363 | 2 | undetermined | Unknown field order.This | 2364 | | | value SHOULD be avoided. | 2365 +---------------+--------------+------------------------------------+ 2366 | 6 | bff | Bottom field displayed | 2367 | | | first. Bottom field | 2368 | | | stored first. | 2369 +---------------+--------------+------------------------------------+ 2370 | 9 | bff(swapped) | Top field displayed | 2371 | | | first. Fields are | 2372 | | | interleaved in storage | 2373 +---------------+--------------+------------------------------------+ 2374 | with the top | | | 2375 | line of the | | | 2376 | top field | | | 2377 | stored first. | | | 2378 +---------------+--------------+------------------------------------+ 2379 | 14 | tff(swapped) | Bottom field displayed | 2380 | | | first. Fields are | 2381 | | | interleaved in storage | 2382 +---------------+--------------+------------------------------------+ 2383 | with the top | | | 2384 | line of the | | | 2385 | top field | | | 2386 | stored first. | | | 2387 +---------------+--------------+------------------------------------+ 2389 Table 6: FieldOrder values 2391 usage notes: If FlagInterlaced is not set to 1, this Element MUST be 2392 ignored. 2394 usage notes: The value of this Element SHOULD be kept the same when 2395 making a direct stream copy to another file. 2397 5.1.4.1.31.3. StereoMode Element 2399 name: StereoMode 2401 path: \Segment\Tracks\TrackEntry\Video\StereoMode 2403 id: 0x53B8 2405 minOccurs: 1 2407 maxOccurs: 1 2409 default: 0 2411 type: uinteger 2413 minver: 3 2415 definition: Stereo-3D video mode. There are some more details in 2416 Section 18.10. 2418 restrictions: 2420 +=======+===================================================+ 2421 | value | label | 2422 +=======+===================================================+ 2423 | 0 | mono | 2424 +-------+---------------------------------------------------+ 2425 | 1 | side by side (left eye first) | 2426 +-------+---------------------------------------------------+ 2427 | 2 | top - bottom (right eye is first) | 2428 +-------+---------------------------------------------------+ 2429 | 3 | top - bottom (left eye is first) | 2430 +-------+---------------------------------------------------+ 2431 | 4 | checkboard (right eye is first) | 2432 +-------+---------------------------------------------------+ 2433 | 5 | checkboard (left eye is first) | 2434 +-------+---------------------------------------------------+ 2435 | 6 | row interleaved (right eye is first) | 2436 +-------+---------------------------------------------------+ 2437 | 7 | row interleaved (left eye is first) | 2438 +-------+---------------------------------------------------+ 2439 | 8 | column interleaved (right eye is first) | 2440 +-------+---------------------------------------------------+ 2441 | 9 | column interleaved (left eye is first) | 2442 +-------+---------------------------------------------------+ 2443 | 10 | anaglyph (cyan/red) | 2444 +-------+---------------------------------------------------+ 2445 | 11 | side by side (right eye first) | 2446 +-------+---------------------------------------------------+ 2447 | 12 | anaglyph (green/magenta) | 2448 +-------+---------------------------------------------------+ 2449 | 13 | both eyes laced in one Block (left eye is first) | 2450 +-------+---------------------------------------------------+ 2451 | 14 | both eyes laced in one Block (right eye is first) | 2452 +-------+---------------------------------------------------+ 2454 Table 7: StereoMode values 2456 usage notes: The value of this Element SHOULD be kept the same when 2457 making a direct stream copy to another file. 2459 5.1.4.1.31.4. AlphaMode Element 2461 name: AlphaMode 2463 path: \Segment\Tracks\TrackEntry\Video\AlphaMode 2465 id: 0x53C0 2467 minOccurs: 1 2468 maxOccurs: 1 2470 default: 0 2472 type: uinteger 2474 minver: 3 2476 definition: Indicate whether the BlockAdditional Element with 2477 BlockAddID of "1" contains Alpha data, as defined by to the Codec 2478 Mapping for the CodecID. Undefined values SHOULD NOT be used as 2479 the behavior of known implementations is different (considered 2480 either as 0 or 1). 2482 defined values: 2484 +=======+=========+============================================+ 2485 | value | label | definition | 2486 +=======+=========+============================================+ 2487 | 0 | none | The BlockAdditional Element with | 2488 | | | BlockAddID of "1" does not exist or SHOULD | 2489 | | | NOT be considered as containing such data. | 2490 +-------+---------+--------------------------------------------+ 2491 | 1 | present | The BlockAdditional Element with | 2492 | | | BlockAddID of "1" contains alpha channel | 2493 | | | data. | 2494 +-------+---------+--------------------------------------------+ 2496 Table 8: AlphaMode values 2498 usage notes: The value of this Element SHOULD be kept the same when 2499 making a direct stream copy to another file. 2501 5.1.4.1.31.5. PixelWidth Element 2503 name: PixelWidth 2505 path: \Segment\Tracks\TrackEntry\Video\PixelWidth 2507 id: 0xB0 2509 minOccurs: 1 2511 maxOccurs: 1 2513 range: not 0 2515 type: uinteger 2516 definition: Width of the encoded video frames in pixels. 2518 usage notes: The value of this Element SHOULD be kept the same when 2519 making a direct stream copy to another file. 2521 5.1.4.1.31.6. PixelHeight Element 2523 name: PixelHeight 2525 path: \Segment\Tracks\TrackEntry\Video\PixelHeight 2527 id: 0xBA 2529 minOccurs: 1 2531 maxOccurs: 1 2533 range: not 0 2535 type: uinteger 2537 definition: Height of the encoded video frames in pixels. 2539 usage notes: The value of this Element SHOULD be kept the same when 2540 making a direct stream copy to another file. 2542 5.1.4.1.31.7. PixelCropBottom Element 2544 name: PixelCropBottom 2546 path: \Segment\Tracks\TrackEntry\Video\PixelCropBottom 2548 id: 0x54AA 2550 minOccurs: 1 2552 maxOccurs: 1 2554 default: 0 2556 type: uinteger 2558 definition: The number of video pixels to remove at the bottom of 2559 the image. 2561 usage notes: The value of this Element SHOULD be kept the same when 2562 making a direct stream copy to another file. 2564 5.1.4.1.31.8. PixelCropTop Element 2566 name: PixelCropTop 2568 path: \Segment\Tracks\TrackEntry\Video\PixelCropTop 2570 id: 0x54BB 2572 minOccurs: 1 2574 maxOccurs: 1 2576 default: 0 2578 type: uinteger 2580 definition: The number of video pixels to remove at the top of the 2581 image. 2583 usage notes: The value of this Element SHOULD be kept the same when 2584 making a direct stream copy to another file. 2586 5.1.4.1.31.9. PixelCropLeft Element 2588 name: PixelCropLeft 2590 path: \Segment\Tracks\TrackEntry\Video\PixelCropLeft 2592 id: 0x54CC 2594 minOccurs: 1 2596 maxOccurs: 1 2598 default: 0 2600 type: uinteger 2602 definition: The number of video pixels to remove on the left of the 2603 image. 2605 usage notes: The value of this Element SHOULD be kept the same when 2606 making a direct stream copy to another file. 2608 5.1.4.1.31.10. PixelCropRight Element 2610 name: PixelCropRight 2611 path: \Segment\Tracks\TrackEntry\Video\PixelCropRight 2613 id: 0x54DD 2615 minOccurs: 1 2617 maxOccurs: 1 2619 default: 0 2621 type: uinteger 2623 definition: The number of video pixels to remove on the right of the 2624 image. 2626 usage notes: The value of this Element SHOULD be kept the same when 2627 making a direct stream copy to another file. 2629 5.1.4.1.31.11. DisplayWidth Element 2631 name: DisplayWidth 2633 path: \Segment\Tracks\TrackEntry\Video\DisplayWidth 2635 id: 0x54B0 2637 maxOccurs: 1 2639 range: not 0 2641 default: see implementation notes 2643 type: uinteger 2645 definition: Width of the video frames to display. Applies to the 2646 video frame after cropping (PixelCrop* Elements). 2648 usage notes: The value of this Element SHOULD be kept the same when 2649 making a direct stream copy to another file. 2651 notes: 2653 +===========+=================================================+ 2654 | attribute | note | 2655 +===========+=================================================+ 2656 | default | If the DisplayUnit of the same TrackEntry is 0, | 2657 | | then the default value for DisplayWidth is | 2658 | | equal toPixelWidth - PixelCropLeft - | 2659 | | PixelCropRight, else there is no default value. | 2660 +-----------+-------------------------------------------------+ 2662 Table 9: DisplayWidth implementation notes 2664 5.1.4.1.31.12. DisplayHeight Element 2666 name: DisplayHeight 2668 path: \Segment\Tracks\TrackEntry\Video\DisplayHeight 2670 id: 0x54BA 2672 maxOccurs: 1 2674 range: not 0 2676 default: see implementation notes 2678 type: uinteger 2680 definition: Height of the video frames to display. Applies to the 2681 video frame after cropping (PixelCrop* Elements). 2683 usage notes: The value of this Element SHOULD be kept the same when 2684 making a direct stream copy to another file. 2686 notes: 2688 +===========+==================================================+ 2689 | attribute | note | 2690 +===========+==================================================+ 2691 | default | If the DisplayUnit of the same TrackEntry is 0, | 2692 | | then the default value for DisplayHeight is | 2693 | | equal toPixelHeight - PixelCropTop - | 2694 | | PixelCropBottom, else there is no default value. | 2695 +-----------+--------------------------------------------------+ 2697 Table 10: DisplayHeight implementation notes 2699 5.1.4.1.31.13. DisplayUnit Element 2701 name: DisplayUnit 2703 path: \Segment\Tracks\TrackEntry\Video\DisplayUnit 2705 id: 0x54B2 2707 minOccurs: 1 2709 maxOccurs: 1 2711 default: 0 2713 type: uinteger 2715 definition: How DisplayWidth & DisplayHeight are interpreted. 2717 restrictions: 2719 +=======+======================+ 2720 | value | label | 2721 +=======+======================+ 2722 | 0 | pixels | 2723 +-------+----------------------+ 2724 | 1 | centimeters | 2725 +-------+----------------------+ 2726 | 2 | inches | 2727 +-------+----------------------+ 2728 | 3 | display aspect ratio | 2729 +-------+----------------------+ 2730 | 4 | unknown | 2731 +-------+----------------------+ 2733 Table 11: DisplayUnit values 2735 5.1.4.1.31.14. UncompressedFourCC Element 2737 name: UncompressedFourCC 2739 path: \Segment\Tracks\TrackEntry\Video\UncompressedFourCC 2741 id: 0x2EB524 2743 minOccurs: see implementation notes 2745 maxOccurs: 1 2746 type: binary 2748 definition: Specify the uncompressed pixel format used for the 2749 Track's data as a FourCC. This value is similar in scope to the 2750 biCompression value of AVI's BITMAPINFO [AVIFormat]. See the YUV 2751 video formats [FourCC-YUV] and RGB video formats [FourCC-RGB] for 2752 common values. 2754 usage notes: This Element MUST NOT be used if the CodecID Element of 2755 the TrackEntry is set to "V_UNCOMPRESSED". 2757 usage notes: The value of this Element SHOULD be kept the same when 2758 making a direct stream copy to another file. 2760 notes: 2762 +===========+==============================================+ 2763 | attribute | note | 2764 +===========+==============================================+ 2765 | minOccurs | UncompressedFourCC MUST be set (minOccurs=1) | 2766 | | in TrackEntry, when the CodecID Element of | 2767 | | the TrackEntry is set to "V_UNCOMPRESSED". | 2768 +-----------+----------------------------------------------+ 2770 Table 12: UncompressedFourCC implementation notes 2772 5.1.4.1.31.15. Colour Element 2774 name: Colour 2776 path: \Segment\Tracks\TrackEntry\Video\Colour 2778 id: 0x55B0 2780 maxOccurs: 1 2782 type: master 2784 minver: 4 2786 definition: Settings describing the colour format. 2788 usage notes: The value of this Element SHOULD be kept the same when 2789 making a direct stream copy to another file. 2791 5.1.4.1.31.16. MatrixCoefficients Element 2793 name: MatrixCoefficients 2795 path: \Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients 2797 id: 0x55B1 2799 minOccurs: 1 2801 maxOccurs: 1 2803 default: 2 2805 type: uinteger 2807 minver: 4 2809 definition: The Matrix Coefficients of the video used to derive luma 2810 and chroma values from red, green, and blue color primaries. For 2811 clarity, the value and meanings for MatrixCoefficients are adopted 2812 from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273. 2814 restrictions: 2816 +=======+=======================================+ 2817 | value | label | 2818 +=======+=======================================+ 2819 | 0 | Identity | 2820 +-------+---------------------------------------+ 2821 | 1 | ITU-R BT.709 | 2822 +-------+---------------------------------------+ 2823 | 2 | unspecified | 2824 +-------+---------------------------------------+ 2825 | 3 | reserved | 2826 +-------+---------------------------------------+ 2827 | 4 | US FCC 73.682 | 2828 +-------+---------------------------------------+ 2829 | 5 | ITU-R BT.470BG | 2830 +-------+---------------------------------------+ 2831 | 6 | SMPTE 170M | 2832 +-------+---------------------------------------+ 2833 | 7 | SMPTE 240M | 2834 +-------+---------------------------------------+ 2835 | 8 | YCoCg | 2836 +-------+---------------------------------------+ 2837 | 9 | BT2020 Non-constant Luminance | 2838 +-------+---------------------------------------+ 2839 | 10 | BT2020 Constant Luminance | 2840 +-------+---------------------------------------+ 2841 | 11 | SMPTE ST 2085 | 2842 +-------+---------------------------------------+ 2843 | 12 | Chroma-derived Non-constant Luminance | 2844 +-------+---------------------------------------+ 2845 | 13 | Chroma-derived Constant Luminance | 2846 +-------+---------------------------------------+ 2847 | 14 | ITU-R BT.2100-0 | 2848 +-------+---------------------------------------+ 2850 Table 13: MatrixCoefficients values 2852 usage notes: The value of this Element SHOULD be kept the same when 2853 making a direct stream copy to another file. 2855 5.1.4.1.31.17. BitsPerChannel Element 2857 name: BitsPerChannel 2859 path: \Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel 2861 id: 0x55B2 2863 minOccurs: 1 2864 maxOccurs: 1 2866 default: 0 2868 type: uinteger 2870 minver: 4 2872 definition: Number of decoded bits per channel. A value of 0 2873 indicates that the BitsPerChannel is unspecified. 2875 usage notes: The value of this Element SHOULD be kept the same when 2876 making a direct stream copy to another file. 2878 5.1.4.1.31.18. ChromaSubsamplingHorz Element 2880 name: ChromaSubsamplingHorz 2882 path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz 2884 id: 0x55B3 2886 maxOccurs: 1 2888 type: uinteger 2890 minver: 4 2892 definition: The amount of pixels to remove in the Cr and Cb channels 2893 for every pixel not removed horizontally. Example: For video with 2894 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set 2895 to 1. 2897 usage notes: The value of this Element SHOULD be kept the same when 2898 making a direct stream copy to another file. 2900 5.1.4.1.31.19. ChromaSubsamplingVert Element 2902 name: ChromaSubsamplingVert 2904 path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert 2906 id: 0x55B4 2908 maxOccurs: 1 2910 type: uinteger 2911 minver: 4 2913 definition: The amount of pixels to remove in the Cr and Cb channels 2914 for every pixel not removed vertically. Example: For video with 2915 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be set 2916 to 1. 2918 usage notes: The value of this Element SHOULD be kept the same when 2919 making a direct stream copy to another file. 2921 5.1.4.1.31.20. CbSubsamplingHorz Element 2923 name: CbSubsamplingHorz 2925 path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz 2927 id: 0x55B5 2929 maxOccurs: 1 2931 type: uinteger 2933 minver: 4 2935 definition: The amount of pixels to remove in the Cb channel for 2936 every pixel not removed horizontally. This is additive with 2937 ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma 2938 subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and 2939 CbSubsamplingHorz SHOULD be set to 1. 2941 usage notes: The value of this Element SHOULD be kept the same when 2942 making a direct stream copy to another file. 2944 5.1.4.1.31.21. CbSubsamplingVert Element 2946 name: CbSubsamplingVert 2948 path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert 2950 id: 0x55B6 2952 maxOccurs: 1 2954 type: uinteger 2956 minver: 4 2958 definition: The amount of pixels to remove in the Cb channel for 2959 every pixel not removed vertically. This is additive with 2960 ChromaSubsamplingVert. 2962 usage notes: The value of this Element SHOULD be kept the same when 2963 making a direct stream copy to another file. 2965 5.1.4.1.31.22. ChromaSitingHorz Element 2967 name: ChromaSitingHorz 2969 path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz 2971 id: 0x55B7 2973 minOccurs: 1 2975 maxOccurs: 1 2977 default: 0 2979 type: uinteger 2981 minver: 4 2983 definition: How chroma is subsampled horizontally. 2985 restrictions: 2987 +=======+=================+ 2988 | value | label | 2989 +=======+=================+ 2990 | 0 | unspecified | 2991 +-------+-----------------+ 2992 | 1 | left collocated | 2993 +-------+-----------------+ 2994 | 2 | half | 2995 +-------+-----------------+ 2997 Table 14: 2998 ChromaSitingHorz values 3000 usage notes: The value of this Element SHOULD be kept the same when 3001 making a direct stream copy to another file. 3003 5.1.4.1.31.23. ChromaSitingVert Element 3005 name: ChromaSitingVert 3006 path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert 3008 id: 0x55B8 3010 minOccurs: 1 3012 maxOccurs: 1 3014 default: 0 3016 type: uinteger 3018 minver: 4 3020 definition: How chroma is subsampled vertically. 3022 restrictions: 3024 +=======+================+ 3025 | value | label | 3026 +=======+================+ 3027 | 0 | unspecified | 3028 +-------+----------------+ 3029 | 1 | top collocated | 3030 +-------+----------------+ 3031 | 2 | half | 3032 +-------+----------------+ 3034 Table 15: 3035 ChromaSitingVert 3036 values 3038 usage notes: The value of this Element SHOULD be kept the same when 3039 making a direct stream copy to another file. 3041 5.1.4.1.31.24. Range Element 3043 name: Range 3045 path: \Segment\Tracks\TrackEntry\Video\Colour\Range 3047 id: 0x55B9 3049 minOccurs: 1 3051 maxOccurs: 1 3053 default: 0 3054 type: uinteger 3056 minver: 4 3058 definition: Clipping of the color ranges. 3060 restrictions: 3062 +=======+=========================================================+ 3063 | value | label | 3064 +=======+=========================================================+ 3065 | 0 | unspecified | 3066 +-------+---------------------------------------------------------+ 3067 | 1 | broadcast range | 3068 +-------+---------------------------------------------------------+ 3069 | 2 | full range (no clipping) | 3070 +-------+---------------------------------------------------------+ 3071 | 3 | defined by MatrixCoefficients / TransferCharacteristics | 3072 +-------+---------------------------------------------------------+ 3074 Table 16: Range values 3076 usage notes: The value of this Element SHOULD be kept the same when 3077 making a direct stream copy to another file. 3079 5.1.4.1.31.25. TransferCharacteristics Element 3081 name: TransferCharacteristics 3083 path: \Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteristic 3084 s 3086 id: 0x55BA 3088 minOccurs: 1 3090 maxOccurs: 1 3092 default: 2 3094 type: uinteger 3096 minver: 4 3098 definition: The transfer characteristics of the video. For clarity, 3099 the value and meanings for TransferCharacteristics are adopted 3100 from Table 3 of ISO/IEC 23091-4 or ITU-T H.273. 3102 restrictions: 3104 +=======+=======================================+ 3105 | value | label | 3106 +=======+=======================================+ 3107 | 0 | reserved | 3108 +-------+---------------------------------------+ 3109 | 1 | ITU-R BT.709 | 3110 +-------+---------------------------------------+ 3111 | 2 | unspecified | 3112 +-------+---------------------------------------+ 3113 | 3 | reserved | 3114 +-------+---------------------------------------+ 3115 | 4 | Gamma 2.2 curve - BT.470M | 3116 +-------+---------------------------------------+ 3117 | 5 | Gamma 2.8 curve - BT.470BG | 3118 +-------+---------------------------------------+ 3119 | 6 | SMPTE 170M | 3120 +-------+---------------------------------------+ 3121 | 7 | SMPTE 240M | 3122 +-------+---------------------------------------+ 3123 | 8 | Linear | 3124 +-------+---------------------------------------+ 3125 | 9 | Log | 3126 +-------+---------------------------------------+ 3127 | 10 | Log Sqrt | 3128 +-------+---------------------------------------+ 3129 | 11 | IEC 61966-2-4 | 3130 +-------+---------------------------------------+ 3131 | 12 | ITU-R BT.1361 Extended Colour Gamut | 3132 +-------+---------------------------------------+ 3133 | 13 | IEC 61966-2-1 | 3134 +-------+---------------------------------------+ 3135 | 14 | ITU-R BT.2020 10 bit | 3136 +-------+---------------------------------------+ 3137 | 15 | ITU-R BT.2020 12 bit | 3138 +-------+---------------------------------------+ 3139 | 16 | ITU-R BT.2100 Perceptual Quantization | 3140 +-------+---------------------------------------+ 3141 | 17 | SMPTE ST 428-1 | 3142 +-------+---------------------------------------+ 3143 | 18 | ARIB STD-B67 (HLG) | 3144 +-------+---------------------------------------+ 3146 Table 17: TransferCharacteristics values 3148 usage notes: The value of this Element SHOULD be kept the same when 3149 making a direct stream copy to another file. 3151 5.1.4.1.31.26. Primaries Element 3153 name: Primaries 3155 path: \Segment\Tracks\TrackEntry\Video\Colour\Primaries 3157 id: 0x55BB 3159 minOccurs: 1 3161 maxOccurs: 1 3163 default: 2 3165 type: uinteger 3167 minver: 4 3169 definition: The colour primaries of the video. For clarity, the 3170 value and meanings for Primaries are adopted from Table 2 of ISO/ 3171 IEC 23091-4 or ITU-T H.273. 3173 restrictions: 3175 +=======+========================================+ 3176 | value | label | 3177 +=======+========================================+ 3178 | 0 | reserved | 3179 +-------+----------------------------------------+ 3180 | 1 | ITU-R BT.709 | 3181 +-------+----------------------------------------+ 3182 | 2 | unspecified | 3183 +-------+----------------------------------------+ 3184 | 3 | reserved | 3185 +-------+----------------------------------------+ 3186 | 4 | ITU-R BT.470M | 3187 +-------+----------------------------------------+ 3188 | 5 | ITU-R BT.470BG - BT.601 625 | 3189 +-------+----------------------------------------+ 3190 | 6 | ITU-R BT.601 525 - SMPTE 170M | 3191 +-------+----------------------------------------+ 3192 | 7 | SMPTE 240M | 3193 +-------+----------------------------------------+ 3194 | 8 | FILM | 3195 +-------+----------------------------------------+ 3196 | 9 | ITU-R BT.2020 | 3197 +-------+----------------------------------------+ 3198 | 10 | SMPTE ST 428-1 | 3199 +-------+----------------------------------------+ 3200 | 11 | SMPTE RP 432-2 | 3201 +-------+----------------------------------------+ 3202 | 12 | SMPTE EG 432-2 | 3203 +-------+----------------------------------------+ 3204 | 22 | EBU Tech. 3213-E - JEDEC P22 phosphors | 3205 +-------+----------------------------------------+ 3207 Table 18: Primaries values 3209 usage notes: The value of this Element SHOULD be kept the same when 3210 making a direct stream copy to another file. 3212 5.1.4.1.31.27. MaxCLL Element 3214 name: MaxCLL 3216 path: \Segment\Tracks\TrackEntry\Video\Colour\MaxCLL 3218 id: 0x55BC 3220 maxOccurs: 1 3222 type: uinteger 3223 minver: 4 3225 definition: Maximum brightness of a single pixel (Maximum Content 3226 Light Level) in candelas per square meter (cd/m^2). 3228 usage notes: The value of this Element SHOULD be kept the same when 3229 making a direct stream copy to another file. 3231 5.1.4.1.31.28. MaxFALL Element 3233 name: MaxFALL 3235 path: \Segment\Tracks\TrackEntry\Video\Colour\MaxFALL 3237 id: 0x55BD 3239 maxOccurs: 1 3241 type: uinteger 3243 minver: 4 3245 definition: Maximum brightness of a single full frame (Maximum 3246 Frame-Average Light Level) in candelas per square meter (cd/m^2). 3248 usage notes: The value of this Element SHOULD be kept the same when 3249 making a direct stream copy to another file. 3251 5.1.4.1.31.29. MasteringMetadata Element 3253 name: MasteringMetadata 3255 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata 3257 id: 0x55D0 3259 maxOccurs: 1 3261 type: master 3263 minver: 4 3265 definition: SMPTE 2086 mastering data. 3267 usage notes: The value of this Element SHOULD be kept the same when 3268 making a direct stream copy to another file. 3270 5.1.4.1.31.30. PrimaryRChromaticityX Element 3272 name: PrimaryRChromaticityX 3274 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3275 aryRChromaticityX 3277 id: 0x55D1 3279 maxOccurs: 1 3281 range: 0-1 3283 type: float 3285 minver: 4 3287 definition: Red X chromaticity coordinate, as defined by CIE 1931. 3289 usage notes: The value of this Element SHOULD be kept the same when 3290 making a direct stream copy to another file. 3292 5.1.4.1.31.31. PrimaryRChromaticityY Element 3294 name: PrimaryRChromaticityY 3296 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3297 aryRChromaticityY 3299 id: 0x55D2 3301 maxOccurs: 1 3303 range: 0-1 3305 type: float 3307 minver: 4 3309 definition: Red Y chromaticity coordinate, as defined by CIE 1931. 3311 usage notes: The value of this Element SHOULD be kept the same when 3312 making a direct stream copy to another file. 3314 5.1.4.1.31.32. PrimaryGChromaticityX Element 3316 name: PrimaryGChromaticityX 3317 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3318 aryGChromaticityX 3320 id: 0x55D3 3322 maxOccurs: 1 3324 range: 0-1 3326 type: float 3328 minver: 4 3330 definition: Green X chromaticity coordinate, as defined by CIE 1931. 3332 usage notes: The value of this Element SHOULD be kept the same when 3333 making a direct stream copy to another file. 3335 5.1.4.1.31.33. PrimaryGChromaticityY Element 3337 name: PrimaryGChromaticityY 3339 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3340 aryGChromaticityY 3342 id: 0x55D4 3344 maxOccurs: 1 3346 range: 0-1 3348 type: float 3350 minver: 4 3352 definition: Green Y chromaticity coordinate, as defined by CIE 1931. 3354 usage notes: The value of this Element SHOULD be kept the same when 3355 making a direct stream copy to another file. 3357 5.1.4.1.31.34. PrimaryBChromaticityX Element 3359 name: PrimaryBChromaticityX 3361 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3362 aryBChromaticityX 3364 id: 0x55D5 3365 maxOccurs: 1 3367 range: 0-1 3369 type: float 3371 minver: 4 3373 definition: Blue X chromaticity coordinate, as defined by CIE 1931. 3375 usage notes: The value of this Element SHOULD be kept the same when 3376 making a direct stream copy to another file. 3378 5.1.4.1.31.35. PrimaryBChromaticityY Element 3380 name: PrimaryBChromaticityY 3382 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim 3383 aryBChromaticityY 3385 id: 0x55D6 3387 maxOccurs: 1 3389 range: 0-1 3391 type: float 3393 minver: 4 3395 definition: Blue Y chromaticity coordinate, as defined by CIE 1931. 3397 usage notes: The value of this Element SHOULD be kept the same when 3398 making a direct stream copy to another file. 3400 5.1.4.1.31.36. WhitePointChromaticityX Element 3402 name: WhitePointChromaticityX 3404 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit 3405 ePointChromaticityX 3407 id: 0x55D7 3409 maxOccurs: 1 3411 range: 0-1 3412 type: float 3414 minver: 4 3416 definition: White X chromaticity coordinate, as defined by CIE 1931. 3418 usage notes: The value of this Element SHOULD be kept the same when 3419 making a direct stream copy to another file. 3421 5.1.4.1.31.37. WhitePointChromaticityY Element 3423 name: WhitePointChromaticityY 3425 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit 3426 ePointChromaticityY 3428 id: 0x55D8 3430 maxOccurs: 1 3432 range: 0-1 3434 type: float 3436 minver: 4 3438 definition: White Y chromaticity coordinate, as defined by CIE 1931. 3440 usage notes: The value of this Element SHOULD be kept the same when 3441 making a direct stream copy to another file. 3443 5.1.4.1.31.38. LuminanceMax Element 3445 name: LuminanceMax 3447 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi 3448 nanceMax 3450 id: 0x55D9 3452 maxOccurs: 1 3454 range: >= 0x0p+0 3456 type: float 3458 minver: 4 3459 definition: Maximum luminance. Represented in candelas per square 3460 meter (cd/m^2). 3462 usage notes: The value of this Element SHOULD be kept the same when 3463 making a direct stream copy to another file. 3465 5.1.4.1.31.39. LuminanceMin Element 3467 name: LuminanceMin 3469 path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi 3470 nanceMin 3472 id: 0x55DA 3474 maxOccurs: 1 3476 range: >= 0x0p+0 3478 type: float 3480 minver: 4 3482 definition: Minimum luminance. Represented in candelas per square 3483 meter (cd/m^2). 3485 usage notes: The value of this Element SHOULD be kept the same when 3486 making a direct stream copy to another file. 3488 5.1.4.1.31.40. Projection Element 3490 name: Projection 3492 path: \Segment\Tracks\TrackEntry\Video\Projection 3494 id: 0x7670 3496 maxOccurs: 1 3498 type: master 3500 minver: 4 3502 definition: Describes the video projection details. Used to render 3503 spherical, VR videos or flipping videos horizontally/vertically. 3505 usage notes: The value of this Element SHOULD be kept the same when 3506 making a direct stream copy to another file. 3508 5.1.4.1.31.41. ProjectionType Element 3510 name: ProjectionType 3512 path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionType 3514 id: 0x7671 3516 minOccurs: 1 3518 maxOccurs: 1 3520 default: 0 3522 type: uinteger 3524 minver: 4 3526 definition: Describes the projection used for this video track. 3528 restrictions: 3530 +=======+=================+ 3531 | value | label | 3532 +=======+=================+ 3533 | 0 | rectangular | 3534 +-------+-----------------+ 3535 | 1 | equirectangular | 3536 +-------+-----------------+ 3537 | 2 | cubemap | 3538 +-------+-----------------+ 3539 | 3 | mesh | 3540 +-------+-----------------+ 3542 Table 19: 3543 ProjectionType values 3545 usage notes: The value of this Element SHOULD be kept the same when 3546 making a direct stream copy to another file. 3548 5.1.4.1.31.42. ProjectionPrivate Element 3550 name: ProjectionPrivate 3552 path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate 3554 id: 0x7672 3555 maxOccurs: 1 3557 type: binary 3559 minver: 4 3561 definition: Private data that only applies to a specific projection. 3563 * If ProjectionType equals 0 (Rectangular), then this element must 3564 not be present. 3566 * If ProjectionType equals 1 (Equirectangular), then this element 3567 must be present and contain the same binary data that would be 3568 stored inside an ISOBMFF Equirectangular Projection Box ('equi'). 3570 * If ProjectionType equals 2 (Cubemap), then this element must be 3571 present and contain the same binary data that would be stored 3572 inside an ISOBMFF Cubemap Projection Box ('cbmp'). 3574 * If ProjectionType equals 3 (Mesh), then this element must be 3575 present and contain the same binary data that would be stored 3576 inside an ISOBMFF Mesh Projection Box ('mshp'). 3578 usage notes: ISOBMFF box size and fourcc fields are not included in 3579 the binary data, but the FullBox version and flag fields are. 3580 This is to avoid redundant framing information while preserving 3581 versioning and semantics between the two container formats. 3583 usage notes: The value of this Element SHOULD be kept the same when 3584 making a direct stream copy to another file. 3586 5.1.4.1.31.43. ProjectionPoseYaw Element 3588 name: ProjectionPoseYaw 3590 path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw 3592 id: 0x7673 3594 minOccurs: 1 3596 maxOccurs: 1 3598 range: >= -0xB4p+0, <= 0xB4p+0 3600 default: 0x0p+0 3602 type: float 3603 minver: 4 3605 definition: Specifies a yaw rotation to the projection. 3607 Value represents a clockwise rotation, in degrees, around the up 3608 vector. This rotation must be applied before any ProjectionPosePitch 3609 or ProjectionPoseRoll rotations. The value of this element MUST be 3610 in the -180 to 180 degree range, both included. 3612 Setting ProjectionPoseYaw to 180 or -180 degrees, with the 3613 ProjectionPoseRoll and ProjectionPosePitch set to 0 degrees flips the 3614 image horizontally. 3616 usage notes: The value of this Element SHOULD be kept the same when 3617 making a direct stream copy to another file. 3619 5.1.4.1.31.44. ProjectionPosePitch Element 3621 name: ProjectionPosePitch 3623 path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitc 3624 h 3626 id: 0x7674 3628 minOccurs: 1 3630 maxOccurs: 1 3632 range: >= -0x5Ap+0, <= 0x5Ap+0 3634 default: 0x0p+0 3636 type: float 3638 minver: 4 3640 definition: Specifies a pitch rotation to the projection. 3642 Value represents a counter-clockwise rotation, in degrees, around the 3643 right vector. This rotation must be applied after the 3644 ProjectionPoseYaw rotation and before the ProjectionPoseRoll 3645 rotation. The value of this element MUST be in the -90 to 90 degree 3646 range, both included. 3648 usage notes: The value of this Element SHOULD be kept the same when 3649 making a direct stream copy to another file. 3651 5.1.4.1.31.45. ProjectionPoseRoll Element 3653 name: ProjectionPoseRoll 3655 path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll 3657 id: 0x7675 3659 minOccurs: 1 3661 maxOccurs: 1 3663 range: >= -0xB4p+0, <= 0xB4p+0 3665 default: 0x0p+0 3667 type: float 3669 minver: 4 3671 definition: Specifies a roll rotation to the projection. 3673 Value represents a counter-clockwise rotation, in degrees, around the 3674 forward vector. This rotation must be applied after the 3675 ProjectionPoseYaw and ProjectionPosePitch rotations. The value of 3676 this element MUST be in the -180 to 180 degree range, both included. 3678 Setting ProjectionPoseRoll to 180 or -180 degrees, the 3679 ProjectionPoseYaw to 180 or -180 degrees with ProjectionPosePitch set 3680 to 0 degrees flips the image vertically. 3682 Setting ProjectionPoseRoll to 180 or -180 degrees, with the 3683 ProjectionPoseYaw and ProjectionPosePitch set to 0 degrees flips the 3684 image horizontally and vertically. 3686 usage notes: The value of this Element SHOULD be kept the same when 3687 making a direct stream copy to another file. 3689 5.1.4.1.32. Audio Element 3691 name: Audio 3693 path: \Segment\Tracks\TrackEntry\Audio 3695 id: 0xE1 3697 maxOccurs: 1 3698 type: master 3700 definition: Audio settings. 3702 5.1.4.1.32.1. SamplingFrequency Element 3704 name: SamplingFrequency 3706 path: \Segment\Tracks\TrackEntry\Audio\SamplingFrequency 3708 id: 0xB5 3710 minOccurs: 1 3712 maxOccurs: 1 3714 range: > 0x0p+0 3716 default: 0x1.f4p+12 3718 type: float 3720 definition: Sampling frequency in Hz. 3722 usage notes: The value of this Element SHOULD be kept the same when 3723 making a direct stream copy to another file. 3725 5.1.4.1.32.2. OutputSamplingFrequency Element 3727 name: OutputSamplingFrequency 3729 path: \Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency 3731 id: 0x78B5 3733 maxOccurs: 1 3735 range: > 0x0p+0 3737 default: see implementation notes 3739 type: float 3741 definition: Real output sampling frequency in Hz (used for SBR 3742 techniques). 3744 notes: 3746 +===========+======================================================+ 3747 | attribute | note | 3748 +===========+======================================================+ 3749 | default | The default value for OutputSamplingFrequency of the | 3750 | | same TrackEntry is equal to the SamplingFrequency. | 3751 +-----------+------------------------------------------------------+ 3753 Table 20: OutputSamplingFrequency implementation notes 3755 5.1.4.1.32.3. Channels Element 3757 name: Channels 3759 path: \Segment\Tracks\TrackEntry\Audio\Channels 3761 id: 0x9F 3763 minOccurs: 1 3765 maxOccurs: 1 3767 range: not 0 3769 default: 1 3771 type: uinteger 3773 definition: Numbers of channels in the track. 3775 usage notes: The value of this Element SHOULD be kept the same when 3776 making a direct stream copy to another file. 3778 5.1.4.1.32.4. BitDepth Element 3780 name: BitDepth 3782 path: \Segment\Tracks\TrackEntry\Audio\BitDepth 3784 id: 0x6264 3786 maxOccurs: 1 3788 range: not 0 3790 type: uinteger 3792 definition: Bits per sample, mostly used for PCM. 3794 usage notes: The value of this Element SHOULD be kept the same when 3795 making a direct stream copy to another file. 3797 5.1.4.1.33. TrackOperation Element 3799 name: TrackOperation 3801 path: \Segment\Tracks\TrackEntry\TrackOperation 3803 id: 0xE2 3805 maxOccurs: 1 3807 type: master 3809 minver: 3 3811 definition: Operation that needs to be applied on tracks to create 3812 this virtual track. For more details look at Section 18.8. 3814 usage notes: The value of this Element SHOULD be kept the same when 3815 making a direct stream copy to another file. 3817 5.1.4.1.33.1. TrackCombinePlanes Element 3819 name: TrackCombinePlanes 3821 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes 3823 id: 0xE3 3825 maxOccurs: 1 3827 type: master 3829 minver: 3 3831 definition: Contains the list of all video plane tracks that need to 3832 be combined to create this 3D track 3834 usage notes: The value of this Element SHOULD be kept the same when 3835 making a direct stream copy to another file. 3837 5.1.4.1.33.2. TrackPlane Element 3839 name: TrackPlane 3841 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T 3842 rackPlane 3844 id: 0xE4 3846 minOccurs: 1 3848 type: master 3850 minver: 3 3852 definition: Contains a video plane track that need to be combined to 3853 create this 3D track 3855 usage notes: The value of this Element SHOULD be kept the same when 3856 making a direct stream copy to another file. 3858 5.1.4.1.33.3. TrackPlaneUID Element 3860 name: TrackPlaneUID 3862 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T 3863 rackPlane\TrackPlaneUID 3865 id: 0xE5 3867 minOccurs: 1 3869 maxOccurs: 1 3871 range: not 0 3873 type: uinteger 3875 minver: 3 3877 definition: The trackUID number of the track representing the plane. 3879 usage notes: The value of this Element SHOULD be kept the same when 3880 making a direct stream copy to another file. 3882 5.1.4.1.33.4. TrackPlaneType Element 3884 name: TrackPlaneType 3886 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T 3887 rackPlane\TrackPlaneType 3889 id: 0xE6 3890 minOccurs: 1 3892 maxOccurs: 1 3894 type: uinteger 3896 minver: 3 3898 definition: The kind of plane this track corresponds to. 3900 restrictions: 3902 +=======+============+ 3903 | value | label | 3904 +=======+============+ 3905 | 0 | left eye | 3906 +-------+------------+ 3907 | 1 | right eye | 3908 +-------+------------+ 3909 | 2 | background | 3910 +-------+------------+ 3912 Table 21: 3913 TrackPlaneType values 3915 usage notes: The value of this Element SHOULD be kept the same when 3916 making a direct stream copy to another file. 3918 5.1.4.1.33.5. TrackJoinBlocks Element 3920 name: TrackJoinBlocks 3922 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks 3924 id: 0xE9 3926 maxOccurs: 1 3928 type: master 3930 minver: 3 3932 definition: Contains the list of all tracks whose Blocks need to be 3933 combined to create this virtual track 3935 usage notes: The value of this Element SHOULD be kept the same when 3936 making a direct stream copy to another file. 3938 5.1.4.1.33.6. TrackJoinUID Element 3940 name: TrackJoinUID 3942 path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\Trac 3943 kJoinUID 3945 id: 0xED 3947 minOccurs: 1 3949 range: not 0 3951 type: uinteger 3953 minver: 3 3955 definition: The trackUID number of a track whose blocks are used to 3956 create this virtual track. 3958 usage notes: The value of this Element SHOULD be kept the same when 3959 making a direct stream copy to another file. 3961 5.1.4.1.34. ContentEncodings Element 3963 name: ContentEncodings 3965 path: \Segment\Tracks\TrackEntry\ContentEncodings 3967 id: 0x6D80 3969 maxOccurs: 1 3971 type: master 3973 definition: Settings for several content encoding mechanisms like 3974 compression or encryption. 3976 usage notes: The value of this Element SHOULD be kept the same when 3977 making a direct stream copy to another file. 3979 5.1.4.1.34.1. ContentEncoding Element 3981 name: ContentEncoding 3983 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding 3985 id: 0x6240 3986 minOccurs: 1 3988 type: master 3990 definition: Settings for one content encoding like compression or 3991 encryption. 3993 usage notes: The value of this Element SHOULD be kept the same when 3994 making a direct stream copy to another file. 3996 5.1.4.1.34.2. ContentEncodingOrder Element 3998 name: ContentEncodingOrder 4000 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4001 ntentEncodingOrder 4003 id: 0x5031 4005 minOccurs: 1 4007 maxOccurs: 1 4009 default: 0 4011 type: uinteger 4013 definition: Tell in which order to apply each ContentEncoding of the 4014 ContentEncodings. The decoder/demuxer MUST start with the 4015 ContentEncoding with the highest ContentEncodingOrder and work its 4016 way down to the ContentEncoding with the lowest 4017 ContentEncodingOrder. This value MUST be unique over for each 4018 ContentEncoding found in the ContentEncodings of this TrackEntry. 4020 usage notes: The value of this Element SHOULD be kept the same when 4021 making a direct stream copy to another file. 4023 5.1.4.1.34.3. ContentEncodingScope Element 4025 name: ContentEncodingScope 4027 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4028 ntentEncodingScope 4030 id: 0x5032 4032 minOccurs: 1 4033 maxOccurs: 1 4035 default: 1 4037 type: uinteger 4039 definition: A bit field that describes which Elements have been 4040 modified in this way. Values (big-endian) can be OR'ed. 4042 defined values: 4044 +=======+=========+===================================+ 4045 | value | label | definition | 4046 +=======+=========+===================================+ 4047 | 1 | Block | All frame contents, excluding | 4048 | | | lacing data. | 4049 +-------+---------+-----------------------------------+ 4050 | 2 | Private | The track's private data. | 4051 +-------+---------+-----------------------------------+ 4052 | 4 | Next | The next ContentEncoding (next | 4053 | | | ContentEncodingOrder. Either the | 4054 | | | data inside ContentCompression | 4055 | | | and/or ContentEncryption).This | 4056 | | | value SHOULD NOT be used. | 4057 +-------+---------+-----------------------------------+ 4059 Table 22: ContentEncodingScope values 4061 usage notes: The value of this Element SHOULD be kept the same when 4062 making a direct stream copy to another file. 4064 5.1.4.1.34.4. ContentEncodingType Element 4066 name: ContentEncodingType 4068 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4069 ntentEncodingType 4071 id: 0x5033 4073 minOccurs: 1 4075 maxOccurs: 1 4077 default: 0 4079 type: uinteger 4080 definition: A value describing what kind of transformation is 4081 applied. 4083 restrictions: 4085 +=======+=============+ 4086 | value | label | 4087 +=======+=============+ 4088 | 0 | Compression | 4089 +-------+-------------+ 4090 | 1 | Encryption | 4091 +-------+-------------+ 4093 Table 23: 4094 ContentEncodingType 4095 values 4097 usage notes: The value of this Element SHOULD be kept the same when 4098 making a direct stream copy to another file. 4100 5.1.4.1.34.5. ContentCompression Element 4102 name: ContentCompression 4104 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4105 ntentCompression 4107 id: 0x5034 4109 maxOccurs: 1 4111 type: master 4113 definition: Settings describing the compression used. This Element 4114 MUST be present if the value of ContentEncodingType is 0 and 4115 absent otherwise. Each block MUST be decompressable even if no 4116 previous block is available in order not to prevent seeking. 4118 usage notes: The value of this Element SHOULD be kept the same when 4119 making a direct stream copy to another file. 4121 5.1.4.1.34.6. ContentCompAlgo Element 4123 name: ContentCompAlgo 4125 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4126 ntentCompression\ContentCompAlgo 4128 id: 0x4254 4130 minOccurs: 1 4132 maxOccurs: 1 4134 default: 0 4136 type: uinteger 4138 definition: The compression algorithm used. 4140 defined values: 4142 +=======+===========+=========================================+ 4143 | value | label | definition | 4144 +=======+===========+=========================================+ 4145 | 0 | zlib | zlib compression [RFC1950]. | 4146 +-------+-----------+-----------------------------------------+ 4147 | 1 | bzlib | bzip2 compression [BZIP2], SHOULD NOT | 4148 | | | be used; see usage notes. | 4149 +-------+-----------+-----------------------------------------+ 4150 | 2 | lzo1x | Lempel-Ziv-Oberhumer compression [LZO], | 4151 | | | SHOULD NOT be used; see usage notes. | 4152 +-------+-----------+-----------------------------------------+ 4153 | 3 | Header | Octets in ContentCompSettings | 4154 | | Stripping | (Section 5.1.4.1.34.7) have been | 4155 | | | stripped from each frame. | 4156 +-------+-----------+-----------------------------------------+ 4158 Table 24: ContentCompAlgo values 4160 usage notes: Compression method "1" (bzlib) and "2" (lzo1x) are 4161 lacking proper documentation on the format which limits 4162 implementation possibilities. Due to licensing conflicts on 4163 commonly available libraries compression methods "2" (lzo1x) does 4164 not offer widespread interoperability. Decoding implementations 4165 MAY support methods "1" and "2" as possible. The use of these 4166 compression methods SHOULD NOT be used as a default. 4168 usage notes: The value of this Element SHOULD be kept the same when 4169 making a direct stream copy to another file. 4171 5.1.4.1.34.7. ContentCompSettings Element 4173 name: ContentCompSettings 4175 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4176 ntentCompression\ContentCompSettings 4178 id: 0x4255 4180 maxOccurs: 1 4182 type: binary 4184 definition: Settings that might be needed by the decompressor. For 4185 Header Stripping (ContentCompAlgo=3), the bytes that were removed 4186 from the beginning of each frames of the track. 4188 usage notes: The value of this Element SHOULD be kept the same when 4189 making a direct stream copy to another file. 4191 5.1.4.1.34.8. ContentEncryption Element 4193 name: ContentEncryption 4195 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4196 ntentEncryption 4198 id: 0x5035 4200 maxOccurs: 1 4202 type: master 4204 definition: Settings describing the encryption used. This Element 4205 MUST be present if the value of ContentEncodingType is 1 4206 (encryption) and MUST be ignored otherwise. 4208 usage notes: The value of this Element SHOULD be kept the same when 4209 making a direct stream copy to another file. 4211 5.1.4.1.34.9. ContentEncAlgo Element 4213 name: ContentEncAlgo 4215 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4216 ntentEncryption\ContentEncAlgo 4218 id: 0x47E1 4220 minOccurs: 1 4222 maxOccurs: 1 4223 default: 0 4225 type: uinteger 4227 definition: The encryption algorithm used. The value "0" means that 4228 the contents have not been encrypted. 4230 defined values: 4232 +=======+===============+============================+ 4233 | value | label | definition | 4234 +=======+===============+============================+ 4235 | 0 | Not encrypted | | 4236 +-------+---------------+----------------------------+ 4237 | 1 | DES | Data Encryption Standard | 4238 | | | (DES) [FIPS.46-3]. | 4239 +-------+---------------+----------------------------+ 4240 | 2 | 3DES | Triple Data Encryption | 4241 | | | Algorithm [RFC1851]. | 4242 +-------+---------------+----------------------------+ 4243 | 3 | Twofish | Twofish Encryption | 4244 | | | Algorithm [Twofish]. | 4245 +-------+---------------+----------------------------+ 4246 | 4 | Blowfish | Blowfish Encryption | 4247 | | | Algorithm [Blowfish]. | 4248 +-------+---------------+----------------------------+ 4249 | 5 | AES | Advanced Encryption | 4250 | | | Standard (AES) [FIPS.197]. | 4251 +-------+---------------+----------------------------+ 4253 Table 25: ContentEncAlgo values 4255 usage notes: The value of this Element SHOULD be kept the same when 4256 making a direct stream copy to another file. 4258 5.1.4.1.34.10. ContentEncKeyID Element 4260 name: ContentEncKeyID 4262 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4263 ntentEncryption\ContentEncKeyID 4265 id: 0x47E2 4267 maxOccurs: 1 4269 type: binary 4270 definition: For public key algorithms this is the ID of the public 4271 key the the data was encrypted with. 4273 usage notes: The value of this Element SHOULD be kept the same when 4274 making a direct stream copy to another file. 4276 5.1.4.1.34.11. ContentEncAESSettings Element 4278 name: ContentEncAESSettings 4280 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4281 ntentEncryption\ContentEncAESSettings 4283 id: 0x47E7 4285 maxOccurs: 1 4287 type: master 4289 minver: 4 4291 definition: Settings describing the encryption algorithm used. It 4292 MUST be ignored if ContentEncAlgo is not AES (5). 4294 usage notes: The value of this Element SHOULD be kept the same when 4295 making a direct stream copy to another file. 4297 5.1.4.1.34.12. AESSettingsCipherMode Element 4299 name: AESSettingsCipherMode 4301 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 4302 ntentEncryption\ContentEncAESSettings\AESSettingsCipherMode 4304 id: 0x47E8 4306 minOccurs: 1 4308 maxOccurs: 1 4310 type: uinteger 4312 minver: 4 4314 definition: The AES cipher mode used in the encryption. It MUST be 4315 ignored if ContentEncAlgo is not AES (5). 4317 defined values: 4319 +=======+=========+=====================================+ 4320 | value | label | definition | 4321 +=======+=========+=====================================+ 4322 | 1 | AES-CTR | Counter [SP.800-38A]. | 4323 +-------+---------+-------------------------------------+ 4324 | 2 | AES-CBC | Cipher Block Chaining [SP.800-38A]. | 4325 +-------+---------+-------------------------------------+ 4327 Table 26: AESSettingsCipherMode values 4329 usage notes: The value of this Element SHOULD be kept the same when 4330 making a direct stream copy to another file. 4332 5.1.5. Cues Element 4334 name: Cues 4336 path: \Segment\Cues 4338 id: 0x1C53BB6B 4340 minOccurs: see implementation notes 4342 maxOccurs: 1 4344 type: master 4346 definition: A Top-Level Element to speed seeking access. All 4347 entries are local to the Segment. 4349 notes: 4351 +===========+====================================================+ 4352 | attribute | note | 4353 +===========+====================================================+ 4354 | minOccurs | This Element SHOULD be set when the Segment is not | 4355 | | transmitted as a live stream (see #livestreaming). | 4356 +-----------+----------------------------------------------------+ 4358 Table 27: Cues implementation notes 4360 5.1.5.1. CuePoint Element 4362 name: CuePoint 4364 path: \Segment\Cues\CuePoint 4366 id: 0xBB 4367 minOccurs: 1 4369 type: master 4371 definition: Contains all information relative to a seek point in the 4372 Segment. 4374 5.1.5.1.1. CueTime Element 4376 name: CueTime 4378 path: \Segment\Cues\CuePoint\CueTime 4380 id: 0xB3 4382 minOccurs: 1 4384 maxOccurs: 1 4386 type: uinteger 4388 definition: Absolute timestamp of the seek point, expressed in 4389 Matroska Ticks -- ie in nanoseconds; see Section 10.1. 4391 5.1.5.1.2. CueTrackPositions Element 4393 name: CueTrackPositions 4395 path: \Segment\Cues\CuePoint\CueTrackPositions 4397 id: 0xB7 4399 minOccurs: 1 4401 type: master 4403 definition: Contain positions for different tracks corresponding to 4404 the timestamp. 4406 5.1.5.1.2.1. CueTrack Element 4408 name: CueTrack 4410 path: \Segment\Cues\CuePoint\CueTrackPositions\CueTrack 4412 id: 0xF7 4414 minOccurs: 1 4415 maxOccurs: 1 4417 range: not 0 4419 type: uinteger 4421 definition: The track for which a position is given. 4423 5.1.5.1.2.2. CueClusterPosition Element 4425 name: CueClusterPosition 4427 path: \Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition 4429 id: 0xF1 4431 minOccurs: 1 4433 maxOccurs: 1 4435 type: uinteger 4437 definition: The Segment Position of the Cluster containing the 4438 associated Block. 4440 5.1.5.1.2.3. CueRelativePosition Element 4442 name: CueRelativePosition 4444 path: \Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition 4446 id: 0xF0 4448 maxOccurs: 1 4450 type: uinteger 4452 minver: 4 4454 definition: The relative position inside the Cluster of the 4455 referenced SimpleBlock or BlockGroup with 0 being the first 4456 possible position for an Element inside that Cluster. 4458 5.1.5.1.2.4. CueDuration Element 4460 name: CueDuration 4462 path: \Segment\Cues\CuePoint\CueTrackPositions\CueDuration 4463 id: 0xB2 4465 maxOccurs: 1 4467 type: uinteger 4469 minver: 4 4471 definition: The duration of the block, expressed in Segment Ticks 4472 which is based on TimestampScale; see Section 10.1. If missing, 4473 the track's DefaultDuration does not apply and no duration 4474 information is available in terms of the cues. 4476 5.1.5.1.2.5. CueBlockNumber Element 4478 name: CueBlockNumber 4480 path: \Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber 4482 id: 0x5378 4484 maxOccurs: 1 4486 range: not 0 4488 type: uinteger 4490 definition: Number of the Block in the specified Cluster. 4492 5.1.5.1.2.6. CueCodecState Element 4494 name: CueCodecState 4496 path: \Segment\Cues\CuePoint\CueTrackPositions\CueCodecState 4498 id: 0xEA 4500 minOccurs: 1 4502 maxOccurs: 1 4504 default: 0 4506 type: uinteger 4508 minver: 2 4510 definition: The Segment Position of the Codec State corresponding to 4511 this Cue Element. 0 means that the data is taken from the initial 4512 Track Entry. 4514 5.1.5.1.2.7. CueReference Element 4516 name: CueReference 4518 path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference 4520 id: 0xDB 4522 type: master 4524 minver: 2 4526 definition: The Clusters containing the referenced Blocks. 4528 5.1.5.1.2.8. CueRefTime Element 4530 name: CueRefTime 4532 path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefTi 4533 me 4535 id: 0x96 4537 minOccurs: 1 4539 maxOccurs: 1 4541 type: uinteger 4543 minver: 2 4545 definition: Timestamp of the referenced Block, expressed in Matroska 4546 Ticks -- ie in nanoseconds; see Section 10.1. 4548 5.1.6. Attachments Element 4550 name: Attachments 4552 path: \Segment\Attachments 4554 id: 0x1941A469 4556 maxOccurs: 1 4558 type: master 4559 definition: Contain attached files. 4561 5.1.6.1. AttachedFile Element 4563 name: AttachedFile 4565 path: \Segment\Attachments\AttachedFile 4567 id: 0x61A7 4569 minOccurs: 1 4571 type: master 4573 definition: An attached file. 4575 5.1.6.1.1. FileDescription Element 4577 name: FileDescription 4579 path: \Segment\Attachments\AttachedFile\FileDescription 4581 id: 0x467E 4583 maxOccurs: 1 4585 type: utf-8 4587 definition: A human-friendly name for the attached file. 4589 5.1.6.1.2. FileName Element 4591 name: FileName 4593 path: \Segment\Attachments\AttachedFile\FileName 4595 id: 0x466E 4597 minOccurs: 1 4599 maxOccurs: 1 4601 type: utf-8 4603 definition: Filename of the attached file. 4605 5.1.6.1.3. FileMimeType Element 4607 name: FileMimeType 4609 path: \Segment\Attachments\AttachedFile\FileMimeType 4611 id: 0x4660 4613 minOccurs: 1 4615 maxOccurs: 1 4617 type: string 4619 definition: MIME type of the file. 4621 usage notes: The value of this Element SHOULD be kept the same when 4622 making a direct stream copy to another file. 4624 5.1.6.1.4. FileData Element 4626 name: FileData 4628 path: \Segment\Attachments\AttachedFile\FileData 4630 id: 0x465C 4632 minOccurs: 1 4634 maxOccurs: 1 4636 type: binary 4638 definition: The data of the file. 4640 usage notes: The value of this Element SHOULD be kept the same when 4641 making a direct stream copy to another file. 4643 5.1.6.1.5. FileUID Element 4645 name: FileUID 4647 path: \Segment\Attachments\AttachedFile\FileUID 4649 id: 0x46AE 4651 minOccurs: 1 4652 maxOccurs: 1 4654 range: not 0 4656 type: uinteger 4658 definition: Unique ID representing the file, as random as possible. 4660 usage notes: The value of this Element SHOULD be kept the same when 4661 making a direct stream copy to another file. 4663 5.1.7. Chapters Element 4665 name: Chapters 4667 path: \Segment\Chapters 4669 id: 0x1043A770 4671 maxOccurs: 1 4673 type: master 4675 recurring: 1 4677 definition: A system to define basic menus and partition data. For 4678 more detailed information, look at the Chapters explanation in 4679 Section 20. 4681 5.1.7.1. EditionEntry Element 4683 name: EditionEntry 4685 path: \Segment\Chapters\EditionEntry 4687 id: 0x45B9 4689 minOccurs: 1 4691 type: master 4693 definition: Contains all information about a Segment edition. 4695 5.1.7.1.1. EditionUID Element 4697 name: EditionUID 4699 path: \Segment\Chapters\EditionEntry\EditionUID 4700 id: 0x45BC 4702 maxOccurs: 1 4704 range: not 0 4706 type: uinteger 4708 definition: A unique ID to identify the edition. It's useful for 4709 tagging an edition. 4711 usage notes: The value of this Element SHOULD be kept the same when 4712 making a direct stream copy to another file. 4714 5.1.7.1.2. EditionFlagDefault Element 4716 name: EditionFlagDefault 4718 path: \Segment\Chapters\EditionEntry\EditionFlagDefault 4720 id: 0x45DB 4722 minOccurs: 1 4724 maxOccurs: 1 4726 range: 0-1 4728 default: 0 4730 type: uinteger 4732 definition: Set to 1 if the edition SHOULD be used as the default 4733 one. 4735 5.1.7.1.3. EditionFlagOrdered Element 4737 name: EditionFlagOrdered 4739 path: \Segment\Chapters\EditionEntry\EditionFlagOrdered 4741 id: 0x45DD 4743 minOccurs: 1 4745 maxOccurs: 1 4747 range: 0-1 4748 default: 0 4750 type: uinteger 4752 definition: Set to 1 if the chapters can be defined multiple times 4753 and the order to play them is enforced; see Section 20.1.3. 4755 5.1.7.1.4. ChapterAtom Element 4757 name: ChapterAtom 4759 path: \Segment\Chapters\EditionEntry\+ChapterAtom 4761 id: 0xB6 4763 minOccurs: 1 4765 type: master 4767 recursive: 1 4769 definition: Contains the atom information to use as the chapter atom 4770 (apply to all tracks). 4772 5.1.7.1.4.1. ChapterUID Element 4774 name: ChapterUID 4776 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterUID 4778 id: 0x73C4 4780 minOccurs: 1 4782 maxOccurs: 1 4784 range: not 0 4786 type: uinteger 4788 definition: A unique ID to identify the Chapter. 4790 usage notes: The value of this Element SHOULD be kept the same when 4791 making a direct stream copy to another file. 4793 5.1.7.1.4.2. ChapterStringUID Element 4795 name: ChapterStringUID 4797 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterStringUID 4799 id: 0x5654 4801 maxOccurs: 1 4803 type: utf-8 4805 minver: 3 4807 definition: A unique string ID to identify the Chapter. Use for 4808 WebVTT cue identifier storage [WebVTT]. 4810 5.1.7.1.4.3. ChapterTimeStart Element 4812 name: ChapterTimeStart 4814 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeStart 4816 id: 0x91 4818 minOccurs: 1 4820 maxOccurs: 1 4822 type: uinteger 4824 definition: Timestamp of the start of Chapter, expressed in Matroska 4825 Ticks -- ie in nanoseconds; see Section 10.1. 4827 5.1.7.1.4.4. ChapterTimeEnd Element 4829 name: ChapterTimeEnd 4831 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd 4833 id: 0x92 4835 minOccurs: see implementation notes 4837 maxOccurs: 1 4839 type: uinteger 4840 definition: Timestamp of the end of Chapter timestamp excluded, 4841 expressed in Matroska Ticks -- ie in nanoseconds; see 4842 Section 10.1. The value MUST be greater than or equal to the 4843 ChapterTimeStart of the same ChapterAtom. 4845 usage notes: The ChapterTimeEnd timestamp value being excluded, it 4846 MUST take in account the duration of the last frame it includes, 4847 especially for the ChapterAtom using the last frames of the 4848 Segment. 4850 notes: 4852 +===========+====================================================+ 4853 | attribute | note | 4854 +===========+====================================================+ 4855 | minOccurs | ChapterTimeEnd MUST be set (minOccurs=1) if the | 4856 | | Edition is an ordered edition; see Section 20.1.3, | 4857 | | unless it's a Parent Chapter; see Section 20.2.3 | 4858 +-----------+----------------------------------------------------+ 4860 Table 28: ChapterTimeEnd implementation notes 4862 5.1.7.1.4.5. ChapterFlagHidden Element 4864 name: ChapterFlagHidden 4866 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden 4868 id: 0x98 4870 minOccurs: 1 4872 maxOccurs: 1 4874 range: 0-1 4876 default: 0 4878 type: uinteger 4880 definition: Set to 1 if a chapter is hidden. Hidden chapters SHOULD 4881 NOT be available to the user interface (but still to Control 4882 Tracks; see Section 20.2.5 on Chapter flags). 4884 5.1.7.1.4.6. ChapterSegmentUID Element 4886 name: ChapterSegmentUID 4887 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentUID 4889 id: 0x6E67 4891 minOccurs: see implementation notes 4893 maxOccurs: 1 4895 range: >0 4897 type: binary 4899 definition: The SegmentUID of another Segment to play during this 4900 chapter. 4902 usage notes: The value MUST NOT be the SegmentUID value of the 4903 Segment it belongs to. 4905 notes: 4907 +===========+=============================================+ 4908 | attribute | note | 4909 +===========+=============================================+ 4910 | minOccurs | ChapterSegmentUID MUST be set (minOccurs=1) | 4911 | | if ChapterSegmentEditionUID is used; see | 4912 | | Section 17.2 on medium-linking Segments. | 4913 +-----------+---------------------------------------------+ 4915 Table 29: ChapterSegmentUID implementation notes 4917 5.1.7.1.4.7. ChapterSegmentEditionUID Element 4919 name: ChapterSegmentEditionUID 4921 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentEdit 4922 ionUID 4924 id: 0x6EBC 4926 maxOccurs: 1 4928 range: not 0 4930 type: uinteger 4932 definition: The EditionUID to play from the Segment linked in 4933 ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared, 4934 then no Edition of the linked Segment is used; see Section 17.2 on 4935 medium-linking Segments. 4937 5.1.7.1.4.8. ChapterPhysicalEquiv Element 4939 name: ChapterPhysicalEquiv 4941 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterPhysicalEqu 4942 iv 4944 id: 0x63C3 4946 maxOccurs: 1 4948 type: uinteger 4950 definition: Specify the physical equivalent of this ChapterAtom like 4951 "DVD" (60) or "SIDE" (50); see Section 20.4 for a complete list of 4952 values. 4954 5.1.7.1.4.9. ChapterDisplay Element 4956 name: ChapterDisplay 4958 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay 4960 id: 0x80 4962 type: master 4964 definition: Contains all possible strings to use for the chapter 4965 display. 4967 5.1.7.1.4.10. ChapString Element 4969 name: ChapString 4971 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha 4972 pString 4974 id: 0x85 4976 minOccurs: 1 4978 maxOccurs: 1 4980 type: utf-8 4981 definition: Contains the string to use as the chapter atom. 4983 5.1.7.1.4.11. ChapLanguage Element 4985 name: ChapLanguage 4987 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha 4988 pLanguage 4990 id: 0x437C 4992 minOccurs: 1 4994 default: eng 4996 type: string 4998 definition: A language corresponding to the string, in the 4999 bibliographic ISO-639-2 form [ISO639-2]. This Element MUST be 5000 ignored if a ChapLanguageIETF Element is used within the same 5001 ChapterDisplay Element. 5003 5.1.7.1.4.12. ChapLanguageIETF Element 5005 name: ChapLanguageIETF 5007 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha 5008 pLanguageIETF 5010 id: 0x437D 5012 type: string 5014 minver: 4 5016 definition: Specifies a language corresponding to the ChapString in 5017 the format defined in [BCP47] and using the IANA Language Subtag 5018 Registry [IANALangRegistry]. If a ChapLanguageIETF Element is 5019 used, then any ChapLanguage and ChapCountry Elements used in the 5020 same ChapterDisplay MUST be ignored. 5022 5.1.7.1.4.13. ChapCountry Element 5024 name: ChapCountry 5026 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha 5027 pCountry 5029 id: 0x437E 5031 type: string 5033 definition: A country corresponding to the string, using the same 2 5034 octets country-codes as in Internet domains [IANADomains] based on 5035 [ISO3166-1] alpha-2 codes. This Element MUST be ignored if a 5036 ChapLanguageIETF Element is used within the same ChapterDisplay 5037 Element. 5039 5.1.7.1.4.14. ChapProcess Element 5041 name: ChapProcess 5043 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess 5045 id: 0x6944 5047 type: master 5049 definition: Contains all the commands associated to the Atom. 5051 5.1.7.1.4.15. ChapProcessCodecID Element 5053 name: ChapProcessCodecID 5055 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr 5056 ocessCodecID 5058 id: 0x6955 5060 minOccurs: 1 5062 maxOccurs: 1 5064 default: 0 5066 type: uinteger 5068 definition: Contains the type of the codec used for the processing. 5069 A value of 0 means native Matroska processing (to be defined), a 5070 value of 1 means the DVD command set is used; see Section 20.3 on 5071 DVD menus. More codec IDs can be added later. 5073 5.1.7.1.4.16. ChapProcessPrivate Element 5075 name: ChapProcessPrivate 5076 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr 5077 ocessPrivate 5079 id: 0x450D 5081 maxOccurs: 1 5083 type: binary 5085 definition: Some optional data attached to the ChapProcessCodecID 5086 information. For ChapProcessCodecID = 1, it is the "DVD level" 5087 equivalent; see Section 20.3 on DVD menus. 5089 5.1.7.1.4.17. ChapProcessCommand Element 5091 name: ChapProcessCommand 5093 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr 5094 ocessCommand 5096 id: 0x6911 5098 type: master 5100 definition: Contains all the commands associated to the Atom. 5102 5.1.7.1.4.18. ChapProcessTime Element 5104 name: ChapProcessTime 5106 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr 5107 ocessCommand\ChapProcessTime 5109 id: 0x6922 5111 minOccurs: 1 5113 maxOccurs: 1 5115 type: uinteger 5117 definition: Defines when the process command SHOULD be handled 5119 restrictions: 5121 +=======+===============================+ 5122 | value | label | 5123 +=======+===============================+ 5124 | 0 | during the whole chapter | 5125 +-------+-------------------------------+ 5126 | 1 | before starting playback | 5127 +-------+-------------------------------+ 5128 | 2 | after playback of the chapter | 5129 +-------+-------------------------------+ 5131 Table 30: ChapProcessTime values 5133 5.1.7.1.4.19. ChapProcessData Element 5135 name: ChapProcessData 5137 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr 5138 ocessCommand\ChapProcessData 5140 id: 0x6933 5142 minOccurs: 1 5144 maxOccurs: 1 5146 type: binary 5148 definition: Contains the command information. The data SHOULD be 5149 interpreted depending on the ChapProcessCodecID value. For 5150 ChapProcessCodecID = 1, the data correspond to the binary DVD cell 5151 pre/post commands; see Section 20.3 on DVD menus. 5153 5.1.8. Tags Element 5155 name: Tags 5157 path: \Segment\Tags 5159 id: 0x1254C367 5161 type: master 5163 definition: Element containing metadata describing Tracks, Editions, 5164 Chapters, Attachments, or the Segment as a whole. A list of valid 5165 tags can be found in [MatroskaTags]. 5167 5.1.8.1. Tag Element 5169 name: Tag 5171 path: \Segment\Tags\Tag 5173 id: 0x7373 5175 minOccurs: 1 5177 type: master 5179 definition: A single metadata descriptor. 5181 5.1.8.1.1. Targets Element 5183 name: Targets 5185 path: \Segment\Tags\Tag\Targets 5187 id: 0x63C0 5189 minOccurs: 1 5191 maxOccurs: 1 5193 type: master 5195 definition: Specifies which other elements the metadata represented 5196 by the Tag applies to. If empty or not present, then the Tag 5197 describes everything in the Segment. 5199 5.1.8.1.1.1. TargetTypeValue Element 5201 name: TargetTypeValue 5203 path: \Segment\Tags\Tag\Targets\TargetTypeValue 5205 id: 0x68CA 5207 minOccurs: 1 5209 maxOccurs: 1 5211 default: 50 5213 type: uinteger 5214 definition: A number to indicate the logical level of the target. 5216 defined values: 5218 +=======+==========================+================================+ 5219 | value | label | definition | 5220 +=======+==========================+================================+ 5221 | 70 | COLLECTION | The highest hierarchical level | 5222 | | | that tags can describe. | 5223 +-------+--------------------------+--------------------------------+ 5224 | 60 | EDITION / ISSUE / | A list of lower levels grouped | 5225 | | VOLUME / OPUS / | together. | 5226 | | SEASON / SEQUEL | | 5227 +-------+--------------------------+--------------------------------+ 5228 | 50 | ALBUM / OPERA / | The most common grouping level | 5229 | | CONCERT / MOVIE / | of music and video (equals to | 5230 | | EPISODE | an episode for TV series). | 5231 +-------+--------------------------+--------------------------------+ 5232 | 40 | PART / SESSION | When an album or episode has | 5233 | | | different logical parts. | 5234 +-------+--------------------------+--------------------------------+ 5235 | 30 | TRACK / SONG / | The common parts of an album | 5236 | | CHAPTER | or movie. | 5237 +-------+--------------------------+--------------------------------+ 5238 | 20 | SUBTRACK / PART / | Corresponds to parts of a | 5239 | | MOVEMENT / SCENE | track for audio (like a | 5240 | | | movement). | 5241 +-------+--------------------------+--------------------------------+ 5242 | 10 | SHOT | The lowest hierarchy found in | 5243 | | | music or movies. | 5244 +-------+--------------------------+--------------------------------+ 5246 Table 31: TargetTypeValue values 5248 5.1.8.1.1.2. TargetType Element 5250 name: TargetType 5252 path: \Segment\Tags\Tag\Targets\TargetType 5254 id: 0x63CA 5256 maxOccurs: 1 5258 type: string 5260 definition: An informational string that can be used to display the 5261 logical level of the target like "ALBUM", "TRACK", "MOVIE", 5262 "CHAPTER", etc ; see Section 6.4 of [MatroskaTags]. 5264 restrictions: 5266 +============+============+ 5267 | value | label | 5268 +============+============+ 5269 | COLLECTION | COLLECTION | 5270 +------------+------------+ 5271 | EDITION | EDITION | 5272 +------------+------------+ 5273 | ISSUE | ISSUE | 5274 +------------+------------+ 5275 | VOLUME | VOLUME | 5276 +------------+------------+ 5277 | OPUS | OPUS | 5278 +------------+------------+ 5279 | SEASON | SEASON | 5280 +------------+------------+ 5281 | SEQUEL | SEQUEL | 5282 +------------+------------+ 5283 | ALBUM | ALBUM | 5284 +------------+------------+ 5285 | OPERA | OPERA | 5286 +------------+------------+ 5287 | CONCERT | CONCERT | 5288 +------------+------------+ 5289 | MOVIE | MOVIE | 5290 +------------+------------+ 5291 | EPISODE | EPISODE | 5292 +------------+------------+ 5293 | PART | PART | 5294 +------------+------------+ 5295 | SESSION | SESSION | 5296 +------------+------------+ 5297 | TRACK | TRACK | 5298 +------------+------------+ 5299 | SONG | SONG | 5300 +------------+------------+ 5301 | CHAPTER | CHAPTER | 5302 +------------+------------+ 5303 | SUBTRACK | SUBTRACK | 5304 +------------+------------+ 5305 | PART | PART | 5306 +------------+------------+ 5307 | MOVEMENT | MOVEMENT | 5308 +------------+------------+ 5309 | SCENE | SCENE | 5310 +------------+------------+ 5311 | SHOT | SHOT | 5312 +------------+------------+ 5314 Table 32: TargetType values 5316 5.1.8.1.1.3. TagTrackUID Element 5318 name: TagTrackUID 5320 path: \Segment\Tags\Tag\Targets\TagTrackUID 5322 id: 0x63C5 5324 default: 0 5326 type: uinteger 5328 definition: A unique ID to identify the Track(s) the tags belong to. 5330 usage notes: If the value is 0 at this level, the tags apply to all 5331 tracks in the Segment. If set to any other value, it MUST match 5332 the TrackUID value of a track found in this Segment. 5334 5.1.8.1.1.4. TagEditionUID Element 5336 name: TagEditionUID 5338 path: \Segment\Tags\Tag\Targets\TagEditionUID 5340 id: 0x63C9 5342 default: 0 5344 type: uinteger 5346 definition: A unique ID to identify the EditionEntry(s) the tags 5347 belong to. 5349 usage notes: If the value is 0 at this level, the tags apply to all 5350 editions in the Segment. If set to any other value, it MUST match 5351 the EditionUID value of an edition found in this Segment. 5353 5.1.8.1.1.5. TagChapterUID Element 5355 name: TagChapterUID 5356 path: \Segment\Tags\Tag\Targets\TagChapterUID 5358 id: 0x63C4 5360 default: 0 5362 type: uinteger 5364 definition: A unique ID to identify the Chapter(s) the tags belong 5365 to. 5367 usage notes: If the value is 0 at this level, the tags apply to all 5368 chapters in the Segment. If set to any other value, it MUST match 5369 the ChapterUID value of a chapter found in this Segment. 5371 5.1.8.1.1.6. TagAttachmentUID Element 5373 name: TagAttachmentUID 5375 path: \Segment\Tags\Tag\Targets\TagAttachmentUID 5377 id: 0x63C6 5379 default: 0 5381 type: uinteger 5383 definition: A unique ID to identify the Attachment(s) the tags 5384 belong to. 5386 usage notes: If the value is 0 at this level, the tags apply to all 5387 the attachments in the Segment. If set to any other value, it 5388 MUST match the FileUID value of an attachment found in this 5389 Segment. 5391 5.1.8.1.2. SimpleTag Element 5393 name: SimpleTag 5395 path: \Segment\Tags\Tag\+SimpleTag 5397 id: 0x67C8 5399 minOccurs: 1 5401 type: master 5403 recursive: 1 5404 definition: Contains general information about the target. 5406 5.1.8.1.2.1. TagName Element 5408 name: TagName 5410 path: \Segment\Tags\Tag\+SimpleTag\TagName 5412 id: 0x45A3 5414 minOccurs: 1 5416 maxOccurs: 1 5418 type: utf-8 5420 definition: The name of the Tag that is going to be stored. 5422 5.1.8.1.2.2. TagLanguage Element 5424 name: TagLanguage 5426 path: \Segment\Tags\Tag\+SimpleTag\TagLanguage 5428 id: 0x447A 5430 minOccurs: 1 5432 maxOccurs: 1 5434 default: und 5436 type: string 5438 definition: Specifies the language of the tag specified, in the 5439 Matroska languages form; see Section 11 on language codes. This 5440 Element MUST be ignored if the TagLanguageIETF Element is used 5441 within the same SimpleTag Element. 5443 5.1.8.1.2.3. TagLanguageIETF Element 5445 name: TagLanguageIETF 5447 path: \Segment\Tags\Tag\+SimpleTag\TagLanguageIETF 5449 id: 0x447B 5451 maxOccurs: 1 5452 type: string 5454 minver: 4 5456 definition: Specifies the language used in the TagString according 5457 to [BCP47] and using the IANA Language Subtag Registry 5458 [IANALangRegistry]. If this Element is used, then any TagLanguage 5459 Elements used in the same SimpleTag MUST be ignored. 5461 5.1.8.1.2.4. TagDefault Element 5463 name: TagDefault 5465 path: \Segment\Tags\Tag\+SimpleTag\TagDefault 5467 id: 0x4484 5469 minOccurs: 1 5471 maxOccurs: 1 5473 range: 0-1 5475 default: 1 5477 type: uinteger 5479 definition: A boolean value to indicate if this is the default/ 5480 original language to use for the given tag. 5482 5.1.8.1.2.5. TagString Element 5484 name: TagString 5486 path: \Segment\Tags\Tag\+SimpleTag\TagString 5488 id: 0x4487 5490 maxOccurs: 1 5492 type: utf-8 5494 definition: The value of the Tag. 5496 5.1.8.1.2.6. TagBinary Element 5498 name: TagBinary 5499 path: \Segment\Tags\Tag\+SimpleTag\TagBinary 5501 id: 0x4485 5503 maxOccurs: 1 5505 type: binary 5507 definition: The values of the Tag, if it is binary. Note that this 5508 cannot be used in the same SimpleTag as TagString. 5510 6. Matroska Element Ordering 5512 Except for the EBML Header and the CRC-32 Element, the EBML 5513 specification does not require any particular storage order for 5514 Elements. The Matroska specification however defines mandates and 5515 recommendations for ordering certain Elements in order to facilitate 5516 better playback, seeking, and editing efficiency. This section 5517 describes and offers rationale for ordering requirements and 5518 recommendations for Matroska. 5520 6.1. Top-Level Elements 5522 The Info Element is the only REQUIRED Top-Level Element in a Matroska 5523 file. To be playable, Matroska MUST also contain at least one Tracks 5524 Element and Cluster Element. The first Info Element and the first 5525 Tracks Element MUST either be stored before the first Cluster Element 5526 or both SHALL be referenced by a SeekHead Element occurring before 5527 the first Cluster Element. 5529 It is possible to edit a Matroska file after it has been created. 5530 For example, chapters, tags, or attachments can be added. When new 5531 Top-Level Elements are added to a Matroska file, the SeekHead 5532 Element(s) MUST be updated so that the SeekHead Element(s) itemize 5533 the identity and position of all Top-Level Elements. Editing, 5534 removing, or adding Elements to a Matroska file often requires that 5535 some existing Elements be voided or extended; therefore, it is 5536 RECOMMENDED to use Void Elements as padding in between Top-Level 5537 Elements. 5539 6.2. CRC-32 5541 As noted by the EBML specification, if a CRC-32 Element is used, then 5542 the CRC-32 Element MUST be the first ordered Element within its 5543 Parent Element. The Matroska specification recommends that CRC-32 5544 Elements SHOULD NOT be used as an immediate Child Element of the 5545 Segment Element; however all Top-Level Elements of an EBML Document 5546 SHOULD include a CRC-32 Element as a Child Element. 5548 6.3. SeekHead 5550 If used, the first SeekHead Element SHOULD be the first non-CRC-32 5551 Child Element of the Segment Element. If a second SeekHead Element 5552 is used, then the first SeekHead Element MUST reference the identity 5553 and position of the second SeekHead. Additionally, the second 5554 SeekHead Element MUST only reference Cluster Elements and not any 5555 other Top-Level Element already contained within the first SeekHead 5556 Element. The second SeekHead Element MAY be stored in any order 5557 relative to the other Top-Level Elements. Whether one or two 5558 SeekHead Element(s) are used, the SeekHead Element(s) MUST 5559 collectively reference the identity and position of all Top-Level 5560 Elements except for the first SeekHead Element. 5562 It is RECOMMENDED that the first SeekHead Element be followed by a 5563 Void Element to allow for the SeekHead Element to be expanded to 5564 cover new Top-Level Elements that could be added to the Matroska 5565 file, such as Tags, Chapters, and Attachments Elements. 5567 6.4. Cues (index) 5569 The Cues Element is RECOMMENDED to optimize seeking access in 5570 Matroska. It is programmatically simpler to add the Cues Element 5571 after all Cluster Elements have been written because this does not 5572 require a prediction of how much space to reserve before writing the 5573 Cluster Elements. However, storing the Cues Element before the 5574 Cluster Elements can provide some seeking advantages. If the Cues 5575 Element is present, then it SHOULD either be stored before the first 5576 Cluster Element or be referenced by a SeekHead Element. 5578 6.5. Info 5580 The first Info Element SHOULD occur before the first Tracks Element 5581 and first Cluster Element except when referenced by a SeekHead 5582 Element. 5584 6.6. Chapters Element 5586 The Chapters Element SHOULD be placed before the Cluster Element(s). 5587 The Chapters Element can be used during playback even if the user 5588 does not need to seek. It immediately gives the user information 5589 about what section is being read and what other sections are 5590 available. In the case of Ordered Chapters it is RECOMMENDED to 5591 evaluate the logical linking even before playing. The Chapters 5592 Element SHOULD be placed before the first Tracks Element and after 5593 the first Info Element. 5595 6.7. Attachments 5597 The Attachments Element is not intended to be used by default when 5598 playing the file, but could contain information relevant to the 5599 content, such as cover art or fonts. Cover art is useful even before 5600 the file is played and fonts could be needed before playback starts 5601 for initialization of subtitles. The Attachments Element MAY be 5602 placed before the first Cluster Element; however if the Attachments 5603 Element is likely to be edited, then it SHOULD be placed after the 5604 last Cluster Element. 5606 6.8. Tags 5608 The Tags Element is most subject to changes after the file was 5609 originally created. For easier editing, the Tags Element SHOULD be 5610 placed at the end of the Segment Element, even after the Attachments 5611 Element. On the other hand, it is inconvenient to have to seek in 5612 the Segment for tags, especially for network streams. So it's better 5613 if the Tags Element is found early in the stream. When editing the 5614 Tags Element, the original Tags Element at the beginning can be 5615 overwritten with a Void Element and a new Tags Element written at the 5616 end of the Segment Element. The file size will only marginally 5617 change. 5619 6.9. Optimum layout from a muxer 5621 * SeekHead 5623 * Info 5625 * Tracks 5627 * Chapters 5629 * Attachments 5631 * Tags 5633 * Clusters 5635 * Cues 5637 6.10. Optimum layout after editing tags 5639 * SeekHead 5641 * Info 5642 * Tracks 5644 * Chapters 5646 * Attachments 5648 * Void 5650 * Clusters 5652 * Cues 5654 * Tags 5656 6.11. Optimum layout with Cues at the front 5658 * SeekHead 5660 * Info 5662 * Tracks 5664 * Chapters 5666 * Attachments 5668 * Tags 5670 * Cues 5672 * Clusters 5674 7. Unknown elements 5676 Matroska is based upon the principle that a reading application does 5677 not have to support 100% of the specifications in order to be able to 5678 play the file. A Matroska file therefore contains version indicators 5679 that tell a reading application what to expect. 5681 It is possible and valid to have the version fields indicate that the 5682 file contains Matroska Elements from a higher specification version 5683 number while signaling that a reading application MUST only support a 5684 lower version number properly in order to play it back (possibly with 5685 a reduced feature set). For example, a reading application 5686 supporting at least Matroska version V reading a file whose 5687 DocTypeReadVersion field is equal to or lower than V MUST skip 5688 Matroska/EBML Elements it encounters but does not know about if that 5689 unknown element fits into the size constraints set by the current 5690 Parent Element. 5692 8. DefaultDecodedFieldDuration 5694 The DefaultDecodedFieldDuration Element can signal to the displaying 5695 application how often fields of a video sequence will be available 5696 for displaying. It can be used for both interlaced and progressive 5697 content. If the video sequence is signaled as interlaced, then the 5698 period between two successive fields at the output of the decoding 5699 process equals DefaultDecodedFieldDuration. 5701 For video sequences signaled as progressive, it is twice the value of 5702 DefaultDecodedFieldDuration. 5704 These values are valid at the end of the decoding process before 5705 post-processing (such as deinterlacing or inverse telecine) is 5706 applied. 5708 Examples: 5710 * Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns 5712 * PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns 5714 * N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns 5716 * hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 5717 encoded interlaced fields per second) 5719 * soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 5720 encoded interlaced fields per second, with "repeat_first_field = 5721 1") 5723 9. Block Structure 5725 Bit 0 is the most significant bit. 5727 Frames using references SHOULD be stored in "coding order". That 5728 means the references first, and then the frames referencing them. A 5729 consequence is that timestamps might not be consecutive. But a frame 5730 with a past timestamp MUST reference a frame already known, otherwise 5731 it's considered bad/void. 5733 9.1. Block Header 5735 +========+========+=============================================+ 5736 | Offset | Player | Description | 5737 +========+========+=============================================+ 5738 | 0x00+ | MUST | Track Number (Track Entry). It is coded in | 5739 | | | EBML like form (1 octet if the value is < | 5740 | | | 0x80, 2 if < 0x4000, etc) (most significant | 5741 | | | bits set to increase the range). | 5742 +--------+--------+---------------------------------------------+ 5743 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 5744 | | | signed int16) | 5745 +--------+--------+---------------------------------------------+ 5747 Table 33: Block Header base parts 5749 9.2. Block Header Flags 5751 +========+=====+========+====================================+ 5752 | Offset | Bit | Player | Description | 5753 +========+=====+========+====================================+ 5754 | 0x03+ | 0-3 | - | Reserved, set to 0 | 5755 +--------+-----+--------+------------------------------------+ 5756 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode | 5757 | | | | this frame but not display it | 5758 +--------+-----+--------+------------------------------------+ 5759 | 0x03+ | 5-6 | MUST | Lacing | 5760 +--------+-----+--------+------------------------------------+ 5761 | | | | * 00 : no lacing | 5762 +--------+-----+--------+------------------------------------+ 5763 | | | | * 01 : Xiph lacing | 5764 +--------+-----+--------+------------------------------------+ 5765 | | | | * 11 : EBML lacing | 5766 +--------+-----+--------+------------------------------------+ 5767 | | | | * 10 : fixed-size lacing | 5768 +--------+-----+--------+------------------------------------+ 5769 | 0x03+ | 7 | - | not used | 5770 +--------+-----+--------+------------------------------------+ 5772 Table 34: Block Header flags part 5774 9.3. SimpleBlock Structure 5776 The SimpleBlock is inspired by the Block structure; see Section 9. 5777 The main differences are the added Keyframe flag and Discardable 5778 flag. Otherwise everything is the same. 5780 Bit 0 is the most significant bit. 5782 Frames using references SHOULD be stored in "coding order". That 5783 means the references first, and then the frames referencing them. A 5784 consequence is that timestamps might not be consecutive. But a frame 5785 with a past timestamp MUST reference a frame already known, otherwise 5786 it's considered bad/void. 5788 9.3.1. SimpleBlock Header 5790 +========+========+=============================================+ 5791 | Offset | Player | Description | 5792 +========+========+=============================================+ 5793 | 0x00+ | MUST | Track Number (Track Entry). It is coded in | 5794 | | | EBML like form (1 octet if the value is < | 5795 | | | 0x80, 2 if < 0x4000, etc) (most significant | 5796 | | | bits set to increase the range). | 5797 +--------+--------+---------------------------------------------+ 5798 | 0x01+ | MUST | Timestamp (relative to Cluster timestamp, | 5799 | | | signed int16) | 5800 +--------+--------+---------------------------------------------+ 5802 Table 35: SimpleBlock Header base parts 5804 9.3.2. SimpleBlock Header Flags 5806 +========+=====+========+==========================================+ 5807 | Offset | Bit | Player | Description | 5808 +========+=====+========+==========================================+ 5809 | 0x03+ | 0 | - | Keyframe, set when the Block contains | 5810 | | | | only keyframes | 5811 +--------+-----+--------+------------------------------------------+ 5812 | 0x03+ | 1-3 | - | Reserved, set to 0 | 5813 +--------+-----+--------+------------------------------------------+ 5814 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 5815 | | | | frame but not display it | 5816 +--------+-----+--------+------------------------------------------+ 5817 | 0x03+ | 5-6 | MUST | Lacing | 5818 +--------+-----+--------+------------------------------------------+ 5819 | | | | * 00 : no lacing | 5820 +--------+-----+--------+------------------------------------------+ 5821 | | | | * 01 : Xiph lacing | 5822 +--------+-----+--------+------------------------------------------+ 5823 | | | | * 11 : EBML lacing | 5824 +--------+-----+--------+------------------------------------------+ 5825 | | | | * 10 : fixed-size lacing | 5826 +--------+-----+--------+------------------------------------------+ 5827 | 0x03+ | 7 | - | Discardable, the frames of the Block can | 5828 | | | | be discarded during playing if needed | 5829 +--------+-----+--------+------------------------------------------+ 5831 Table 36: SimpleBlock Header flags part 5833 9.4. Block Lacing 5835 Lacing is a mechanism to save space when storing data. It is 5836 typically used for small blocks of data (referred to as frames in 5837 Matroska). It packs multiple frames into a single Block or 5838 SimpleBlock. 5840 Lacing MUST NOT be used to store a single frame in a Block or 5841 SimpleBlock. 5843 There are 3 types of lacing: 5845 1. Xiph, inspired by what is found in the Ogg container [RFC3533] 5847 2. EBML, which is the same with sizes coded differently 5849 3. fixed-size, where the size is not coded 5851 When lacing is not used, i.e. to store a single frame, the lacing 5852 bits 5 and 6 of the Block or SimpleBlock MUST be set to zero. 5854 For example, a user wants to store 3 frames of the same track. The 5855 first frame is 800 octets long, the second is 500 octets long and the 5856 third is 1000 octets long. As these data are small, they can be 5857 stored in a lace to save space. 5859 It is possible not to use lacing at all and just store a single frame 5860 without any extra data. When the FlagLacing -- Section 5.1.4.1.12 -- 5861 is set to "0" all blocks of that track MUST NOT use lacing. 5863 9.4.1. No lacing 5865 When no lacing is used, the number of frames in the lace is ommitted 5866 and only one frame can be stored in the Block. The bits 5-6 of the 5867 Block Header flags are set to 00. 5869 The Block for a 800 octets frame is as follows: 5871 +==============+=========+===================+ 5872 | Block Octets | Value | Description | 5873 +==============+=========+===================+ 5874 | 4-803 | | Single frame data | 5875 +--------------+---------+-------------------+ 5877 Table 37: No lacing 5879 When a Block contains a single frame, it MUST use this No lacing 5880 mode. 5882 9.4.2. Xiph lacing 5884 The Xiph lacing uses the same coding of size as found in the Ogg 5885 container [RFC3533]. The bits 5-6 of the Block Header flags are set 5886 to 01. 5888 The Block data with laced frames is stored as follows: 5890 * Lacing Head on 1 Octet: Number of frames in the lace minus 1. 5892 * Lacing size of each frame except the last one. 5894 * Binary data of each frame consecutively. 5896 The lacing size is split into 255 values, stored as unsigned octets 5897 -- for example, 500 is coded 255;245 or [0xFF 0xF5]. A frame with a 5898 size multiple of 255 is coded with a 0 at the end of the size -- for 5899 example, 765 is coded 255;255;255;0 or [0xFF 0xFF 0xFF 0x00]. 5901 The size of the last frame is deduced from the size remaining in the 5902 Block after the other frames. 5904 Because large sizes result in large coding of the sizes, it is 5905 RECOMMENDED to use Xiph lacing only with small frames. 5907 In our example, the 800, 500 and 1000 frames are stored with Xiph 5908 lacing in a Block as follows: 5910 +=============+=====================+==========================+ 5911 | Block Octet | Value | Description | 5912 +=============+=====================+==========================+ 5913 | 4 | 0x02 | Number of frames minus 1 | 5914 +-------------+---------------------+--------------------------+ 5915 | 5-8 | 0xFF 0xFF 0xFF 0x23 | Size of the first frame | 5916 | | | (255;255;255;35) | 5917 +-------------+---------------------+--------------------------+ 5918 | 9-10 | 0xFF 0xF5 | Size of the second frame | 5919 | | | (255;245) | 5920 +-------------+---------------------+--------------------------+ 5921 | 11-810 | | First frame data | 5922 +-------------+---------------------+--------------------------+ 5923 | 811-1310 | | Second frame data | 5924 +-------------+---------------------+--------------------------+ 5925 | 1311-2310 | | Third frame data | 5926 +-------------+---------------------+--------------------------+ 5928 Table 38: Xiph lacing example 5930 The Block is 2311 octets large and the last frame starts at 1311, so 5931 we can deduce the size of the last frame is 2311 - 1311 = 1000. 5933 9.4.3. EBML lacing 5935 The EBML lacing encodes the frame size with an EBML-like encoding 5936 [RFC8794]. The bits 5-6 of the Block Header flags are set to 11. 5938 The Block data with laced frames is stored as follows: 5940 * Lacing Head on 1 Octet: Number of frames in the lace minus 1. 5942 * Lacing size of each frame except the last one. 5944 * Binary data of each frame consecutively. 5946 The first frame size is encoded as an EBML Unsigned Integer Element 5947 value. The other frame sizes are encoded as a difference with the 5948 previous frame size as EBML Signed Integer Element values. That 5949 corresponds to an EBML Data Size Values with two's complement 5950 notation with the leftmost bit being the sign bit as found in 5951 [RFC8794], giving this range of values: 5953 +==========================+=======================================+ 5954 | Bit Representation | Value | 5955 +==========================+=======================================+ 5956 | 1xxx xxxx | value -(2^6-1) to 2^6-1 (ie 0 to | 5957 | | 2^7-2 minus 2^6-1, half of the range) | 5958 +--------------------------+---------------------------------------+ 5959 | 01xx xxxx xxxx xxxx | value -(2^13-1) to 2^13-1 | 5960 +--------------------------+---------------------------------------+ 5961 | 001x xxxx xxxx xxxx xxxx | value -(2^20-1) to 2^20-1 | 5962 | xxxx | | 5963 +--------------------------+---------------------------------------+ 5964 | 0001 xxxx xxxx xxxx xxxx | value -(2^27-1) to 2^27-1 | 5965 | xxxx xxxx xxxx | | 5966 +--------------------------+---------------------------------------+ 5967 | 0000 1xxx xxxx xxxx xxxx | value -(2^34-1) to 2^34-1 | 5968 | xxxx xxxx xxxx xxxx xxxx | | 5969 +--------------------------+---------------------------------------+ 5970 | 0000 01xx xxxx xxxx xxxx | value -(2^41-1) to 2^41-1 | 5971 | xxxx xxxx xxxx xxxx xxxx | | 5972 | xxxx xxxx | | 5973 +--------------------------+---------------------------------------+ 5974 | 0000 001x xxxx xxxx xxxx | value -(2^48-1) to 2^48-1 | 5975 | xxxx xxxx xxxx xxxx xxxx | | 5976 | xxxx xxxx xxxx xxxx | | 5977 +--------------------------+---------------------------------------+ 5979 Table 39: EBML Lacing bits usage 5981 In our example, the 800, 500 and 1000 frames are stored with EBML 5982 lacing in a Block as follows: 5984 +==============+===========+=====================================+ 5985 | Block Octets | Value | Description | 5986 +==============+===========+=====================================+ 5987 | 4 | 0x02 | Number of frames minus 1 | 5988 +--------------+-----------+-------------------------------------+ 5989 | 5-6 | 0x43 0x20 | Size of the first frame (800 = | 5990 | | | 0x320 + 0x4000) | 5991 +--------------+-----------+-------------------------------------+ 5992 | 7-8 | 0x5E 0xD3 | Size of the second frame (500 - 800 | 5993 | | | = -300 = - 0x12C + 0x1FFF + 0x4000) | 5994 +--------------+-----------+-------------------------------------+ 5995 | 8-807 | | First frame data | 5996 +--------------+-----------+-------------------------------------+ 5997 | 808-1307 | | Second frame data | 5998 +--------------+-----------+-------------------------------------+ 5999 | 1308-2307 | | Third frame data | 6000 +--------------+-----------+-------------------------------------+ 6002 Table 40: EBML lacing example 6004 The Block is 2308 octets large and the last frame starts at 1308, so 6005 we can deduce the size of the last frame is 2308 - 1308 = 1000. 6007 9.4.4. Fixed-size lacing 6009 The Fixed-size lacing doesn't store the frame size, only the number 6010 of frames in the lace. Each frame MUST have the same size. The 6011 frame size of each frame is deduced from the total size of the Block. 6012 The bits 5-6 of the Block Header flags are set to 10. 6014 The Block data with laced frames is stored as follows: 6016 * Lacing Head on 1 Octet: Number of frames in the lace minus 1. 6018 * Binary data of each frame consecutively. 6020 For example, for 3 frames of 800 octets each: 6022 +==============+==========+==========================+ 6023 | Block Octets | Value | Description | 6024 +==============+==========+==========================+ 6025 | 4 | 0x02 | Number of frames minus 1 | 6026 +--------------+----------+--------------------------+ 6027 | 5-804 | | First frame data | 6028 +--------------+----------+--------------------------+ 6029 | 805-1604 | | Second frame data | 6030 +--------------+----------+--------------------------+ 6031 | 1605-2404 | | Third frame data | 6032 +--------------+----------+--------------------------+ 6034 Table 41: Fixed-size lacing example 6036 This gives a Block of 2405 octets. When reading the Block we find 6037 that there are 3 frames (Octet 4). The data start at Octet 5, so the 6038 size of each frame is (2405 - 5) / 3 = 800. 6040 9.4.5. Laced Frames Timestamp 6042 A Block only contains a single timestamp value. But when lacing is 6043 used, it contains more than one frame. Each frame originally has its 6044 own timestamp, or Presentation Timestamp (PTS). That timestamp 6045 applies to the first frame in the lace. 6047 In the lace, each frame after the first one has an undertermined 6048 timestamp. But each of these frames MUST be contiguous -- i.e. the 6049 decoded data MUST NOT contain any gap between them. If there is a 6050 gap in the stream, the frames around the gap MUST NOT be in the same 6051 Block. 6053 Lacing is only useful for small contiguous data to save space. This 6054 is usually the case for audio tracks and not the case for video -- 6055 which use a lot of data -- or subtitle tracks -- which have long 6056 gaps. For audio, there is usually a fixed output sampling frequency 6057 for the whole track. So the decoder should be able to recover the 6058 timestamp of each sample, knowing each output sample is contiguous 6059 with a fixed frequency. For subtitles this is usually not the case 6060 so lacing SHOULD NOT be used. 6062 9.5. Random Access Points 6064 Random Access Points (RAP) are positions where the parser can seek to 6065 and start playback without decoding of what was before. In Matroska 6066 BlockGroups and SimpleBlocks can be RAPs. To seek to these elements 6067 it is still necessary to seek to the Cluster containing them and 6068 start playback from the BlockGroup or SimpleBlock that is a RAP. 6070 Because a Matroska File is usually composed of multiple tracks 6071 playing at the same time -- video, audio and subtitles -- to seek 6072 properly to a RAP, each selected track must be taken in account. 6073 Usually all audio and subtitle BlockGroup or SimpleBlock are RAP. 6074 They are independent of each other and can be played randomly. 6076 Video tracks on the other hand often use references to previous and 6077 future frames for better coding efficiency. Frames with such 6078 reference MUST either contain one or more ReferenceBlock Elements in 6079 their BlockGroup or MUST be marked as non-keyframe in a SimpleBlock; 6080 see Section 9.3.2. 6082 Frames that are RAP -- i.e. they don't depend on other frames -- MUST 6083 set the keyframe flag if they are in a SimpleBlock or their parent 6084 BlockGroup MUST NOT contain a ReferenceBlock. 6086 There may be cases where the use of BlockGroup is necessary, as the 6087 frame may need a BlockDuration, BlockAdditions, CodecState or a 6088 DiscardPadding element. For thoses cases a SimpleBlock MUST NOT be 6089 used, the reference information SHOULD be recovered for non-RAP 6090 frames. 6092 When a frame in a BlockGroup is not a RAP, all references SHOULD be 6093 listed as a ReferenceBlock, at least some of them, even if not 6094 accurate, or one ReferenceBlock with the value "0" corresponding to a 6095 self or unknown reference. The lack of ReferenceBlock would mean 6096 such a frame is a RAP and seeking on that frame that actually depends 6097 on other frames MAY create bogus output or even crash. 6099 Intra-only video frames, such as the ones found in AV1 or VP9, can be 6100 decoded without any other frame, but they don't reset the codec 6101 state. So seeking to these frames is not possible as the next frames 6102 may need frames that are not known from this seeking point. Such 6103 intra-only frames MUST NOT be considered as keyframes so the keyframe 6104 flag MUST NOT be set in the SimpleBlock or a ReferenceBlock MUST be 6105 used to signify the frame is not a RAP. The timestamp value of the 6106 ReferenceBlock MUST be "0", meaning it's referencing itself. 6108 Because a video SimpleBlock has less references information than a 6109 video BlockGroup, it is possible to remux a video track using 6110 BlockGroup into a SimpleBlock, as long as it doesn't use any other 6111 BlockGroup features than ReferenceBlock. 6113 10. Timestamps 6115 Historically timestamps in Matroska were mistakenly called timecodes. 6116 The Timestamp Element was called Timecode, the TimestampScale Element 6117 was called TimecodeScale, the TrackTimestampScale Element was called 6118 TrackTimecodeScale and the ReferenceTimestamp Element was called 6119 ReferenceTimeCode. 6121 10.1. Timestamp Ticks 6123 All timestamp values in Matroska are expressed in multiples of a 6124 tick. They are usually stored as integers. There are three types of 6125 ticks possible: 6127 10.1.1. Matroska Ticks 6129 For such elements, the timestamp value is stored directly in 6130 nanoseconds. 6132 The elements storing values in Matroska Ticks/nanoseconds are: 6134 * TrackEntry\DefaultDuration; defined in Section 5.1.4.1.15 6136 * TrackEntry\DefaultDecodedFieldDuration; defined in 6137 Section 5.1.4.1.16 6139 * TrackEntry\SeekPreRoll; defined in Section 5.1.4.1.29 6141 * TrackEntry\CodecDelay; defined in Section 5.1.4.1.28 6143 * BlockGroup\DiscardPadding; defined in Section 5.1.3.5.7 6145 * ChapterAtom\ChapterTimeStart; defined in Section 5.1.7.1.4.3 6147 * ChapterAtom\ChapterTimeEnd; defined in Section 5.1.7.1.4.4 6149 * CuePoint\CueTime; defined in Section 5.1.5.1.1 6151 * CueReference\CueRefTime; defined in Section 5.1.5.1.1 6153 10.1.2. Segment Ticks 6155 Elements in Segment Ticks involve the use of the TimestampScale 6156 Element of the Segment to get the timestamp in nanoseconds of the 6157 element, with the following formula: 6159 timestamp in nanosecond = element value * TimestampScale 6160 This allows storing smaller integer values in the elements. 6162 When using the default value of TimestampScale of "1,000,000", one 6163 Segment Tick represents one millisecond. 6165 The elements storing values in Segment Ticks are: 6167 * Cluster\Timestamp; defined in Section 5.1.3.1 6169 * Info\Duration is stored as a floating point but the same formula 6170 applies; defined in Section 5.1.2.10 6172 * CuePoint\CueTrackPositions\CueDuration; defined in 6173 Section 5.1.5.1.2.4 6175 10.1.3. Track Ticks 6177 Elements in Track Ticks involve the use of the TimestampScale Element 6178 of the Segment and the TrackTimestampScale Element of the Track to 6179 get the timestamp in nanoseconds of the element, with the following 6180 formula: 6182 timestamp in nanoseconds = 6183 element value * TrackTimestampScale * TimestampScale 6185 This allows storing smaller integer values in the elements. The 6186 resulting floating point values of the timestamps are still expressed 6187 in nanoseconds. 6189 When using the default values for TimestampScale and 6190 TrackTimestampScale of "1,000,000" and of "1.0" respectively, one 6191 Track Tick represents one millisecond. 6193 The elements storing values in Track Ticks are: 6195 * Cluster\BlockGroup\Block and Cluster\SimpleBlock timestamps; 6196 detailed in Section 10.2 6198 * Cluster\BlockGroup\BlockDuration; defined in Section 5.1.3.5.3 6200 * Cluster\BlockGroup\ReferenceBlock; defined in Section 5.1.3.5.5 6202 When the TrackTimestampScale is interpreted as "1.0", Track Ticks are 6203 equivalent to Segment Ticks and give an integer value in nanoseconds. 6204 This is the most common case as TrackTimestampScale is usually 6205 omitted. 6207 A value of TrackTimestampScale other than "1.0" MAY be used to scale 6208 the timestamps more in tune with each Track sampling frequency. For 6209 historical reasons, a lot of Matroska readers don't take the 6210 TrackTimestampScale value in account. So using a value other than 6211 "1.0" MAY not work in many places. 6213 10.2. Block Timestamps 6215 A Block Element and SimpleBlock Element timestamp is the time when 6216 the decoded data of the first frame in the Block/SimpleBlock MUST be 6217 presented, if the track of that Block/SimpleBlock is selected for 6218 playback. This is also known as the Presentation Timestamp (PTS). 6220 The Block Element and SimpleBlock Element store their timestamps as 6221 signed integers, relative to the Cluster\Timestamp value of the 6222 Cluster they are stored in. To get the timestamp of a Block or 6223 SimpleBlock in nanoseconds you have to use the following formula: 6225 ( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * 6226 TimestampScale 6228 The Block Element and SimpleBlock Element store their timestamps as 6229 16bit signed integers, allowing a range from "-32768" to "+32767" 6230 Track Ticks. Although these values can be negative, when added to 6231 the Cluster\Timestamp, the resulting frame timestamp SHOULD NOT be 6232 negative. 6234 When a CodecDelay Element is set, its value MUST be substracted from 6235 each Block timestamp of that track. To get the timestamp in 6236 nanoseconds of the first frame in a Block or SimpleBlock, the formula 6237 becomes: 6239 ( ( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * 6240 TimestampScale ) - CodecDelay 6242 The resulting frame timestamp SHOULD NOT be negative. 6244 During playback, when a frame has a negative timestamp, the content 6245 MUST be decoded by the decoder but not played to the user. 6247 10.3. TimestampScale Rounding 6249 The default Track Tick duration is one millisecond. 6251 The TimestampScale is a floating value, which is usually 1.0. But 6252 when it's not, the multiplied Block Timestamp is a floating values in 6253 nanoseconds. The Matroska Reader SHOULD use the nearest rounding 6254 value in nanosecond to get the proper nanosecond timestamp of a 6255 Block. This allows some clever TimestampScale values to have more 6256 refined timestampt precision per frame. 6258 11. Language Codes 6260 Matroska from version 1 through 3 uses language codes that can be 6261 either the 3 letters bibliographic ISO-639-2 form [ISO639-2] (like 6262 "fre" for french), or such a language code followed by a dash and a 6263 country code for specialities in languages (like "fre-ca" for 6264 Canadian French). The ISO 639-2 Language Elements are "Language 6265 Element", "TagLanguage Element", and "ChapLanguage Element". 6267 Starting in Matroska version 4, either [ISO639-2] or [BCP47] MAY be 6268 used, although BCP 47 is RECOMMENDED. The BCP 47 Language Elements 6269 are "LanguageIETF Element", "TagLanguageIETF Element", and 6270 "ChapLanguageIETF Element". If a BCP 47 Language Element and an ISO 6271 639-2 Language Element are used within the same Parent Element, then 6272 the ISO 639-2 Language Element MUST be ignored and precedence given 6273 to the BCP 47 Language Element. 6275 Country codes are the same 2 octets country-codes as in Internet 6276 domains [IANADomains] based on [ISO3166-1] alpha-2 codes. 6278 12. Encryption 6280 Encryption in Matroska is designed in a very generic style to allow 6281 people to implement whatever form of encryption is best for them. It 6282 is possible to use the encryption framework in Matroska as a type of 6283 DRM (Digital Rights Management). 6285 Because encryption occurs within the Block Element, it is possible to 6286 manipulate encrypted streams without decrypting them. The streams 6287 could potentially be copied, deleted, cut, appended, or any number of 6288 other possible editing techniques without decryption. The data can 6289 be used without having to expose it or go through the decrypting 6290 process. 6292 Encryption can also be layered within Matroska. This means that two 6293 completely different types of encryption can be used, requiring two 6294 separate keys to be able to decrypt a stream. 6296 Encryption information is stored in the ContentEncodings Element 6297 under the ContentEncryption Element. 6299 13. Image Presentation 6301 13.1. Cropping 6303 The PixelCrop Elements (PixelCropTop, PixelCropBottom, 6304 PixelCropRight, and PixelCropLeft) indicate when, and by how much, 6305 encoded videos frames SHOULD be cropped for display. These Elements 6306 allow edges of the frame that are not intended for display, such as 6307 the sprockets of a full-frame film scan or the VANC area of a 6308 digitized analog videotape, to be stored but hidden. PixelCropTop 6309 and PixelCropBottom store an integer of how many rows of pixels 6310 SHOULD be cropped from the top and bottom of the image 6311 (respectively). PixelCropLeft and PixelCropRight store an integer of 6312 how many columns of pixels SHOULD be cropped from the left and right 6313 of the image (respectively). For example, a pillar-boxed video that 6314 stores a 1440x1080 visual image within the center of a padded 6315 1920x1080 encoded image MAY set both PixelCropLeft and PixelCropRight 6316 to "240", so that a Matroska Player SHOULD crop off 240 columns of 6317 pixels from the left and right of the encoded image to present the 6318 image with the pillar-boxes hidden. 6320 Cropping has to be performed before resizing and the display 6321 dimensions given by DisplayWidth, DisplayHeight and DisplayUnit apply 6322 to the already cropped image. 6324 13.2. Rotation 6326 The ProjectionPoseRoll Element (see Section 5.1.4.1.31.45) can be 6327 used to indicate that the image from the associated video track 6328 SHOULD be rotated for presentation. For instance, the following 6329 representation of the Projection Element Section 5.1.4.1.31.40) and 6330 the ProjectionPoseRoll Element represents a video track where the 6331 image SHOULD be presentation with a 90 degree counter-clockwise 6332 rotation. 6334 6335 90 6336 6338 Figure 11: Rotation example. 6340 14. Matroska versioning 6342 The EBML Header of each Matroska document informs the reading 6343 application on what version of Matroska to expect. The Elements 6344 within EBML Header with jurisdiction over this information are 6345 DocTypeVersion and DocTypeReadVersion. 6347 DocTypeVersion MUST be equal to or greater than the highest Matroska 6348 version number of any Element present in the Matroska file. For 6349 example, a file using the SimpleBlock Element MUST have a 6350 DocTypeVersion equal to or greater than 2. A file containing 6351 CueRelativePosition Elements MUST have a DocTypeVersion equal to or 6352 greater than 4. 6354 The DocTypeReadVersion MUST contain the minimum version number that a 6355 reading application can minimally support in order to play the file 6356 back -- optionally with a reduced feature set. For example, if a 6357 file contains only Elements of version 2 or lower except for 6358 CueRelativePosition (which is a version 4 Matroska Element), then 6359 DocTypeReadVersion SHOULD still be set to 2 and not 4 because 6360 evaluating CueRelativePosition is not necessary for standard playback 6361 -- it makes seeking more precise if used. 6363 DocTypeVersion MUST always be equal to or greater than 6364 DocTypeReadVersion. 6366 A reading application supporting Matroska version V MUST NOT refuse 6367 to read an application with DocReadTypeVersion equal to or lower than 6368 V even if DocTypeVersion is greater than V. See also the note about 6369 Unknown Elements in Section 7. 6371 15. File Extensions 6373 The file extensions for Matroska files are usually as follows: 6375 * ".mkv" for files containing video tracks 6377 * ".mka" for files containing audio tracks with no video tracks 6379 * ".mk3d" for files containing some stereoscopic video tracks 6381 16. Segment Position 6383 The Segment Position of an Element refers to the position of the 6384 first octet of the Element ID of that Element, measured in octets, 6385 from the beginning of the Element Data section of the containing 6386 Segment Element. In other words, the Segment Position of an Element 6387 is the distance in octets from the beginning of its containing 6388 Segment Element minus the size of the Element ID and Element Data 6389 Size of that Segment Element. The Segment Position of the first 6390 Child Element of the Segment Element is 0. An Element which is not 6391 stored within a Segment Element, such as the Elements of the EBML 6392 Header, do not have a Segment Position. 6394 16.1. Segment Position Exception 6396 Elements that are defined to store a Segment Position MAY define 6397 reserved values to indicate a special meaning. 6399 16.2. Example of Segment Position 6401 This table presents an example of Segment Position by showing a 6402 hexadecimal representation of a very small Matroska file with labels 6403 to show the offsets in octets. The file contains a Segment Element 6404 with an Element ID of "0x18538067" and a MuxingApp Element with an 6405 Element ID of "0x4D80". 6407 0 1 2 6408 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 6409 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 6410 0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67| 6411 20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| 6413 In the above example, the Element ID of the Segment Element is stored 6414 at offset 16, the Element Data Size of the Segment Element is stored 6415 at offset 20, and the Element Data of the Segment Element is stored 6416 at offset 21. 6418 The MuxingApp Element is stored at offset 26. Since the Segment 6419 Position of an Element is calculated by subtracting the position of 6420 the Element Data of the containing Segment Element from the position 6421 of that Element, the Segment Position of MuxingApp Element in the 6422 above example is '26 - 21' or '5'. 6424 17. Linked Segments 6426 Matroska provides several methods to link two or more Segment 6427 Elements together to create a Linked Segment. A Linked Segment is a 6428 set of multiple Segments linked together into a single presentation 6429 by using Hard Linking or Medium Linking. 6431 All Segments within a Linked Segment MUST have a SegmentUID. 6433 All Segments within a Linked Segment SHOULD be stored within the same 6434 directory or be accessible quickly based on their SegmentUID in order 6435 to have seamless transition between segments. 6437 All Segments within a Linked Segment MAY set a SegmentFamily with a 6438 common value to make it easier for a Matroska Player to know which 6439 Segments are meant to be played together. 6441 The SegmentFilename, PrevFilename and NextFilename elements MAY also 6442 give hints on the original filenames that were used when the Segment 6443 links were created, in case some SegmentUID are damaged. 6445 17.1. Hard Linking 6447 Hard Linking, also called splitting, is the process of creating a 6448 Linked Segment by linking multiple Segment Elements using the NextUID 6449 and PrevUID Elements. 6451 All Segments within a Hard Linked Segment MUST use the same Tracks 6452 list and TimestampScale. 6454 Within a Linked Segment, the timestamps of Block and SimpleBlock MUST 6455 follow consecutively the timestamps of Block and SimpleBlock from the 6456 previous Segment in linking order. 6458 With Hard Linking, the chapters of any Segment within the Linked 6459 Segment MUST only reference the current Segment. The NextUID and 6460 PrevUID reference the respective SegmentUID values of the next and 6461 previous Segments. 6463 The first Segment of a Linked Segment MUST NOT have a PrevUID 6464 Element. The last Segment of a Linked Segment MUST NOT have a 6465 NextUID Element. 6467 For each node of the chain of Segments of a Linked Segment at least 6468 one Segment MUST reference the other Segment of the node. 6470 In a chain of Segments of a Linked Segment the NextUID always takes 6471 precedence over the PrevUID. So if SegmentA has a NextUID to 6472 SegmentB and SegmentB has a PrevUID to SegmentC, the link to use is 6473 NextUID between SegmentA and SegmentB, SegmentC is not part of the 6474 Linked Segment. 6476 If SegmentB has a PrevUID to SegmentA but SegmentA has no NextUID, 6477 then the Matroska Player MAY consider these two Segments linked as 6478 SegmentA followed by SegmentB. 6480 As an example, three Segments can be Hard Linked as a Linked Segment 6481 through cross-referencing each other with SegmentUID, PrevUID, and 6482 NextUID, as in this table: 6484 +==========+==================+==================+==================+ 6485 |file name | SegmentUID | PrevUID | NextUID | 6486 +==========+==================+==================+==================+ 6487 |start.mkv | 71000c23cd310998 | Invalid | a77b3598941cb803 | 6488 | | 53fbc94dd984a5dd | | eac0fcdafe44fac9 | 6489 +----------+------------------+------------------+------------------+ 6490 |middle.mkv| a77b3598941cb803 | 71000c23cd310998 | 6c92285fa6d3e827 | 6491 | | eac0fcdafe44fac9 | 53fbc94dd984a5dd | b198d120ea3ac674 | 6492 +----------+------------------+------------------+------------------+ 6493 |end.mkv | 6c92285fa6d3e827 | a77b3598941cb803 | Invalid | 6494 | | b198d120ea3ac674 | eac0fcdafe44fac9 | | 6495 +----------+------------------+------------------+------------------+ 6497 Table 42: Usual Hard Linking UIDs 6499 An other example where only the NextUID Element is used: 6501 +============+==================+=========+==================+ 6502 | file name | SegmentUID | PrevUID | NextUID | 6503 +============+==================+=========+==================+ 6504 | start.mkv | 71000c23cd310998 | Invalid | a77b3598941cb803 | 6505 | | 53fbc94dd984a5dd | | eac0fcdafe44fac9 | 6506 +------------+------------------+---------+------------------+ 6507 | middle.mkv | a77b3598941cb803 | n/a | 6c92285fa6d3e827 | 6508 | | eac0fcdafe44fac9 | | b198d120ea3ac674 | 6509 +------------+------------------+---------+------------------+ 6510 | end.mkv | 6c92285fa6d3e827 | n/a | Invalid | 6511 | | b198d120ea3ac674 | | | 6512 +------------+------------------+---------+------------------+ 6514 Table 43: Hard Linking without PrevUID 6516 An example where only the PrevUID Element is used: 6518 +============+==================+==================+=========+ 6519 | file name | SegmentUID | PrevUID | NextUID | 6520 +============+==================+==================+=========+ 6521 | start.mkv | 71000c23cd310998 | Invalid | n/a | 6522 | | 53fbc94dd984a5dd | | | 6523 +------------+------------------+------------------+---------+ 6524 | middle.mkv | a77b3598941cb803 | 71000c23cd310998 | n/a | 6525 | | eac0fcdafe44fac9 | 53fbc94dd984a5dd | | 6526 +------------+------------------+------------------+---------+ 6527 | end.mkv | 6c92285fa6d3e827 | a77b3598941cb803 | Invalid | 6528 | | b198d120ea3ac674 | eac0fcdafe44fac9 | | 6529 +------------+------------------+------------------+---------+ 6531 Table 44: Hard Linking without NextUID 6533 In this example only the middle.mkv is using the PrevUID and NextUID 6534 Elements: 6536 +==========+==================+==================+==================+ 6537 |file name | SegmentUID | PrevUID | NextUID | 6538 +==========+==================+==================+==================+ 6539 |start.mkv | 71000c23cd310998 | Invalid | n/a | 6540 | | 53fbc94dd984a5dd | | | 6541 +----------+------------------+------------------+------------------+ 6542 |middle.mkv| a77b3598941cb803 | 71000c23cd310998 | 6c92285fa6d3e827 | 6543 | | eac0fcdafe44fac9 | 53fbc94dd984a5dd | b198d120ea3ac674 | 6544 +----------+------------------+------------------+------------------+ 6545 |end.mkv | 6c92285fa6d3e827 | n/a | Invalid | 6546 | | b198d120ea3ac674 | | | 6547 +----------+------------------+------------------+------------------+ 6549 Table 45: Hard Linking with mixed UID links 6551 17.2. Medium Linking 6553 Medium Linking creates relationships between Segments using Ordered 6554 Chapters (Section 20.1.3) and the ChapterSegmentUID Element. A 6555 Chapter Edition with Ordered Chapters MAY contain Chapter elements 6556 that reference timestamp ranges from other Segments. The Segment 6557 referenced by the Ordered Chapter via the ChapterSegmentUID Element 6558 SHOULD be played as part of a Linked Segment. 6560 The timestamps of Segment content referenced by Ordered Chapters MUST 6561 be adjusted according to the cumulative duration of the the previous 6562 Ordered Chapters. 6564 As an example a file named intro.mkv could have a SegmentUID of 6565 "0xb16a58609fc7e60653a60c984fc11ead". Another file called 6566 program.mkv could use a Chapter Edition that contains two Ordered 6567 Chapters. The first chapter references the Segment of intro.mkv with 6568 the use of a ChapterSegmentUID, ChapterSegmentEditionUID, 6569 ChapterTimeStart, and optionally a ChapterTimeEnd element. The 6570 second chapter references content within the Segment of program.mkv. 6571 A Matroska Player SHOULD recognize the Linked Segment created by the 6572 use of ChapterSegmentUID in an enabled Edition and present the 6573 reference content of the two Segments as a single presentation. 6575 The ChapterSegmentUID represents the Segment that holds the content 6576 to play in place of the Linked Chapter. The ChapterSegmentUID MUST 6577 NOT be the SegmentUID of its own Segment. 6579 There are 2 ways to use a chapter link: * Linked-Duration linking, * 6580 Linked-Edition linking 6582 17.2.1. Linked-Duration 6584 A Matroska Player MUST play the content of the linked Segment from 6585 the ChapterTimeStart until ChapterTimeEnd timestamp in place of the 6586 Linked Chapter. 6588 ChapterTimeStart and ChapterTimeEnd represent timestamps in the 6589 Linked Segment matching the value of ChapterSegmentUID. Their values 6590 MUST be in the range of the linked Segment duration. 6592 The ChapterTimeEnd value MUST be set when using linked-duration 6593 chapter linking. ChapterSegmentEditionUID MUST NOT be set. 6595 17.2.2. Linked-Edition 6597 A Matroska Player MUST play the whole linked Edition of the linked 6598 Segment in place of the Linked Chapter. 6600 ChapterSegmentEditionUID represents a valid Edition from the Linked 6601 Segment matching the value of ChapterSegmentUID. 6603 When using linked-edition chapter linking. ChapterTimeEnd is 6604 OPTIONAL. 6606 18. Track Flags 6608 18.1. Default flag 6610 The "default track" flag is a hint for a Matroska Player indicating 6611 that a given track SHOULD be eligible to be automatically selected as 6612 the default track for a given language. If no tracks in a given 6613 language have the default track flag set, then all tracks in that 6614 language are eligible for automatic selection. This can be used to 6615 indicate that a track provides "regular service" suitable for users 6616 with default settings, as opposed to specialized services, such as 6617 commentary, hearing-impaired captions, or descriptive audio. 6619 The Matroska Player MAY override the "default track" flag for any 6620 reason, including user preferences to prefer tracks providing 6621 accessibility services. 6623 18.2. Forced flag 6625 The "forced" flag tells the Matroska Player that it SHOULD display 6626 this subtitle track, even if user preferences usually would not call 6627 for any subtitles to be displayed alongside the current selected 6628 audio track. This can be used to indicate that a track contains 6629 translations of onscreen text, or of dialogue spoken in a different 6630 language than the track's primary one. 6632 18.3. Hearing-impaired flag 6634 The "hearing impaired" flag tells the Matroska Player that it SHOULD 6635 prefer this track when selecting a default track for a hearing- 6636 impaired user, and that it MAY prefer to select a different track 6637 when selecting a default track for a non-hearing-impaired user. 6639 18.4. Visual-impaired flag 6641 The "visual impaired" flag tells the Matroska Player that it SHOULD 6642 prefer this track when selecting a default track for a visually- 6643 impaired user, and that it MAY prefer to select a different track 6644 when selecting a default track for a non-visually-impaired user. 6646 18.5. Descriptions flag 6648 The "descriptions" flag tells the Matroska Player that this track is 6649 suitable to play via a text-to-speech system for a visually-impaired 6650 user, and that it SHOULD NOT automatically select this track when 6651 selecting a default track for a non-visually-impaired user. 6653 18.6. Original flag 6655 The "original" flag tells the Matroska Player that this track is in 6656 the original language, and that it SHOULD prefer it if configured to 6657 prefer original-language tracks of this track's type. 6659 18.7. Commentary flag 6661 The "commentary" flag tells the Matroska Player that this track 6662 contains commentary on the content. 6664 18.8. Track Operation 6666 TrackOperation allows combining multiple tracks to make a virtual 6667 one. It uses two separate system to combine tracks. One to create a 6668 3D "composition" (left/right/background planes) and one to simplify 6669 join two tracks together to make a single track. 6671 A track created with TrackOperation is a proper track with a UID and 6672 all its flags. However the codec ID is meaningless because each 6673 "sub" track needs to be decoded by its own decoder before the 6674 "operation" is applied. The Cues Elements corresponding to such a 6675 virtual track SHOULD be the sum of the Cues Elements for each of the 6676 tracks it's composed of (when the Cues are defined per track). 6678 In the case of TrackJoinBlocks, the Block Elements (from BlockGroup 6679 and SimpleBlock) of all the tracks SHOULD be used as if they were 6680 defined for this new virtual Track. When two Block Elements have 6681 overlapping start or end timestamps, it's up to the underlying system 6682 to either drop some of these frames or render them the way they 6683 overlap. This situation SHOULD be avoided when creating such tracks 6684 as you can never be sure of the end result on different platforms. 6686 18.9. Overlay Track 6688 Overlay tracks SHOULD be rendered in the same channel as the track 6689 its linked to. When content is found in such a track, it SHOULD be 6690 played on the rendering channel instead of the original track. 6692 18.10. Multi-planar and 3D videos 6694 There are two different ways to compress 3D videos: have each eye 6695 track in a separate track and have one track have both eyes combined 6696 inside (which is more efficient, compression-wise). Matroska 6697 supports both ways. 6699 For the single track variant, there is the StereoMode Element, which 6700 defines how planes are assembled in the track (mono or left-right 6701 combined). Odd values of StereoMode means the left plane comes first 6702 for more convenient reading. The pixel count of the track 6703 (PixelWidth/PixelHeight) is the raw amount of pixels, for example 6704 3840x1080 for full HD side by side, and the DisplayWidth/ 6705 DisplayHeight in pixels is the amount of pixels for one plane 6706 (1920x1080 for that full HD stream). Old stereo 3D were displayed 6707 using anaglyph (cyan and red colors separated). For compatibility 6708 with such movies, there is a value of the StereoMode that corresponds 6709 to AnaGlyph. 6711 There is also a "packed" mode (values 13 and 14) which consists of 6712 packing two frames together in a Block using lacing. The first frame 6713 is the left eye and the other frame is the right eye (or vice versa). 6714 The frames SHOULD be decoded in that order and are possibly dependent 6715 on each other (P and B frames). 6717 For separate tracks, Matroska needs to define exactly which track 6718 does what. TrackOperation with TrackCombinePlanes do that. For more 6719 details look at Section 18.8 on how TrackOperation works. 6721 The 3D support is still in infancy and may evolve to support more 6722 features. 6724 The StereoMode used to be part of Matroska v2 but it didn't meet the 6725 requirement for multiple tracks. There was also a bug in libmatroska 6726 prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8. 6727 Matroska Readers may support these legacy files by checking Matroska 6728 v2 or 0x53B9. The older values were 0: mono, 1: right eye, 2: left 6729 eye, 3: both eyes. 6731 19. Default track selection 6733 This section provides some example sets of Tracks and hypothetical 6734 user settings, along with indications of which ones a similarly- 6735 configured Matroska Player SHOULD automatically select for playback 6736 by default in such a situation. A player MAY provide additional 6737 settings with more detailed controls for more nuanced scenarios. 6738 These examples are provided as guidelines to illustrate the intended 6739 usages of the various supported Track flags, and their expected 6740 behaviors. 6742 Track names are shown in English for illustrative purposes; actual 6743 files may have titles in the language of each track, or provide 6744 titles in multiple languages. 6746 19.1. Audio Selection 6748 Example track set: 6750 +===+=====+====+======+========+=======+================+===========+ 6751 |No.|Type |Lang|Layout|Original|Default|Other flags |Name | 6752 +===+=====+====+======+========+=======+================+===========+ 6753 |1 |Video|und |N/A |N/A |N/A |None | | 6754 +---+-----+----+------+--------+-------+----------------+-----------+ 6755 |2 |Audio|eng |5.1 |1 |1 |None | | 6756 +---+-----+----+------+--------+-------+----------------+-----------+ 6757 |3 |Audio|eng |2.0 |1 |1 |None | | 6758 +---+-----+----+------+--------+-------+----------------+-----------+ 6759 |4 |Audio|eng |2.0 |1 |0 |Visual-impaired |Descriptive| 6760 | | | | | | | |audio | 6761 +---+-----+----+------+--------+-------+----------------+-----------+ 6762 |5 |Audio|esp |5.1 |0 |1 |None | | 6763 +---+-----+----+------+--------+-------+----------------+-----------+ 6764 |6 |Audio|esp |2.0 |0 |0 |Visual-impaired |Descriptive| 6765 | | | | | | | |audio | 6766 +---+-----+----+------+--------+-------+----------------+-----------+ 6767 |7 |Audio|eng |2.0 |1 |0 |Commentary |Director's | 6768 | | | | | | | |Commentary | 6769 +---+-----+----+------+--------+-------+----------------+-----------+ 6770 |8 |Audio|eng |2.0 |1 |0 |None |Karaoke | 6771 +---+-----+----+------+--------+-------+----------------+-----------+ 6773 Table 46: Audio Tracks for default selection 6775 Here we have a file with 7 audio tracks, of which 5 are in English 6776 and 2 are in Spanish. 6778 The English tracks all have the Original flag, indicating that 6779 English is the original content language. 6781 Generally the player will first consider the track languages: if the 6782 player has an option to prefer original-language audio and the user 6783 has enabled it, then it should prefer one of the Original-flagged 6784 tracks. If configured to specifically prefer audio tracks in English 6785 or Spanish, the player should select one of the tracks in the 6786 corresponding language. The player may also wish to prefer an 6787 Original-flagged track if no tracks matching any of the user's 6788 explicitly-preferred languages are available. 6790 Two of the tracks have the Visual-impaired flag. If the player has 6791 been configured to prefer such tracks, it should select one; 6792 otherwise, it should avoid them if possible. 6794 If selecting an English track, when other settings have left multiple 6795 possible options, it may be useful to exclude the tracks that lack 6796 the Default flag: here, one provides descriptive service for the 6797 visually impaired (which has its own flag and may be automatically 6798 selected by user configuration, but is unsuitable for users with 6799 default-configured players), one is a commentary track (which has its 6800 own flag, which the player may or may not have specialized handling 6801 for), and the last contains karaoke versions of the music that plays 6802 during the film, which is an unusual specialized audio service that 6803 Matroska has no built-in support for indicating, so it's indicated in 6804 the track name instead. By not setting the Default flag on these 6805 specialized tracks, the file's author hints that they should not be 6806 automatically selected by a default-configured player. 6808 Having narrowed its choices down, our example player now may have to 6809 select between tracks 2 and 3. The only difference between these 6810 tracks is their channel layouts: 2 is 5.1 surround, while 3 is 6811 stereo. If the player is aware that the output device is a pair of 6812 headphones or stereo speakers, it may wish to prefer the stereo mix 6813 automatically. On the other hand, if it knows that the device is a 6814 surround system, it may wish to prefer the surround mix. 6816 If the player finishes analyzing all of the available audio tracks 6817 and finds that multiple seem equally and maximally preferable, it 6818 SHOULD default to the first of the group. 6820 19.2. Subtitle selection 6822 Example track set: 6824 +===+===========+====+=========+=======+======+==========+==========+ 6825 |No.| Type |Lang|Original |Default|Forced| Other | Name | 6826 | | | | | | | flags | | 6827 +===+===========+====+=========+=======+======+==========+==========+ 6828 |1 | Video |und |N/A |N/A |N/A | None | | 6829 +---+-----------+----+---------+-------+------+----------+----------+ 6830 |2 | Audio |fra |1 |1 |N/A | None | | 6831 +---+-----------+----+---------+-------+------+----------+----------+ 6832 |3 | Audio |por |0 |1 |N/A | None | | 6833 +---+-----------+----+---------+-------+------+----------+----------+ 6834 |4 | Subtitles |fra |1 |1 |0 | None | | 6835 +---+-----------+----+---------+-------+------+----------+----------+ 6836 |5 | Subtitles |fra |1 |0 |0 | Hearing- | Captions | 6837 | | | | | | | impaired | for the | 6838 | | | | | | | | hearing- | 6839 | | | | | | | | impaired | 6840 +---+-----------+----+---------+-------+------+----------+----------+ 6841 |6 | Subtitles |por |0 |1 |0 | None | | 6842 +---+-----------+----+---------+-------+------+----------+----------+ 6843 |7 | Subtitles |por |0 |0 |1 | None | Signs | 6844 +---+-----------+----+---------+-------+------+----------+----------+ 6845 |8 | Subtitles |por |0 |0 |0 | Hearing- | SDH | 6846 | | | | | | | impaired | | 6847 +---+-----------+----+---------+-------+------+----------+----------+ 6849 Table 47: Subtitle Tracks for default selection 6851 Here we have 2 audio tracks and 5 subtitle tracks. As we can see, 6852 French is the original language. 6854 We'll start by discussing the case where the user prefers French (or 6855 Original-language) audio (or has explicitly selected the French audio 6856 track), and also prefers French subtitles. 6858 In this case, if the player isn't configured to display captions when 6859 the audio matches their preferred subtitle languages, the player 6860 doesn't need to select a subtitle track at all. 6862 If the user _has_ indicated that they want captions to be displayed, 6863 the selection simply comes down to whether Hearing-impaired subtitles 6864 are preferred. 6866 The situation for a user who prefers Portuguese subtitles starts out 6867 somewhat analogous. If they select the original French audio (either 6868 by explicit audio language preference, preference for Original- 6869 language tracks, or by explicitly selecting that track), then the 6870 selection once again comes down to the hearing-impaired preference. 6872 However, the case where the Portuguese audio track is selected has an 6873 important catch: a Forced track in Portuguese is present. This may 6874 contain translations of onscreen text from the video track, or of 6875 portions of the audio that are not translated (music, for instance). 6876 This means that even if the user's preferences wouldn't normally call 6877 for captions here, the Forced track should be selected nonetheless, 6878 rather than selecting no track at all. On the other hand, if the 6879 user's preferences _do_ call for captions, the non-Forced tracks 6880 should be preferred, as the Forced track will not contain captioning 6881 for the dialogue. 6883 20. Chapters 6885 The Matroska Chapters system can have multiple Editions and each 6886 Edition can consist of Simple Chapters where a chapter start time is 6887 used as marker in the timeline only. An Edition can be more complex 6888 with Ordered Chapters where a chapter end time stamp is additionally 6889 used or much more complex with Linked Chapters. The Matroska 6890 Chapters system can also have a menu structure, borrowed from the DVD 6891 menu system, or have it's own Native Matroska menu structure. 6893 20.1. EditionEntry 6895 The EditionEntry is also called an Edition. An Edition contains a 6896 set of Edition flags and MUST contain at least one ChapterAtom 6897 Element. Chapters are always inside an Edition (or a Chapter itself 6898 part of an Edition). Multiple Editions are allowed. Some of these 6899 Editions MAY be ordered and others not. 6901 20.1.1. EditionFlagDefault 6903 Only one Edition SHOULD have an EditionFlagDefault flag set to true. 6905 20.1.2. Default Edition 6907 The Default Edition is the Edition that a Matroska Player SHOULD use 6908 for playback by default. 6910 The first Edition with the EditionFlagDefault flag set to true is the 6911 Default Edition. 6913 When all EditionFlagDefault flags are set to false, then the first 6914 Edition is the Default Edition. 6916 +===========+=============+=================+ 6917 | Edition | FlagDefault | Default Edition | 6918 +===========+=============+=================+ 6919 | Edition 1 | true | X | 6920 +-----------+-------------+-----------------+ 6921 | Edition 2 | true | | 6922 +-----------+-------------+-----------------+ 6923 | Edition 3 | true | | 6924 +-----------+-------------+-----------------+ 6926 Table 48: Default edition, all default 6928 +===========+=============+=================+ 6929 | Edition | FlagDefault | Default Edition | 6930 +===========+=============+=================+ 6931 | Edition 1 | false | X | 6932 +-----------+-------------+-----------------+ 6933 | Edition 2 | false | | 6934 +-----------+-------------+-----------------+ 6935 | Edition 3 | false | | 6936 +-----------+-------------+-----------------+ 6938 Table 49: Default edition, no default 6940 +===========+=============+=================+ 6941 | Edition | FlagDefault | Default Edition | 6942 +===========+=============+=================+ 6943 | Edition 1 | false | | 6944 +-----------+-------------+-----------------+ 6945 | Edition 2 | true | X | 6946 +-----------+-------------+-----------------+ 6947 | Edition 3 | false | | 6948 +-----------+-------------+-----------------+ 6950 Table 50: Default edition, with default 6952 20.1.3. EditionFlagOrdered 6954 The EditionFlagOrdered Flag is a significant feature as it enables an 6955 Edition of Ordered Chapters which defines and arranges a virtual 6956 timeline rather than simply labeling points within the timeline. For 6957 example, with Editions of Ordered Chapters a single Matroska file can 6958 present multiple edits of a film without duplicating content. 6959 Alternatively, if a videotape is digitized in full, one Ordered 6960 Edition could present the full content (including colorbars, 6961 countdown, slate, a feature presentation, and black frames), while 6962 another Edition of Ordered Chapters can use Chapters that only mark 6963 the intended presentation with the colorbars and other ancillary 6964 visual information excluded. If an Edition of Ordered Chapters is 6965 enabled, then the Matroska Player MUST play those Chapters in their 6966 stored order from the timestamp marked in the ChapterTimeStart 6967 Element to the timestamp marked in to ChapterTimeEnd Element. 6969 If the EditionFlagOrdered Flag evaluates to "0", Simple Chapters are 6970 used and only the ChapterTimeStart of a Chapter is used as chapter 6971 mark to jump to the predefined point in the timeline. With Simple 6972 Chapters, a Matroska Player MUST ignore certain Chapter Elements. In 6973 that case these elements are informational only. 6975 The following list shows the different Chapter elements only found in 6976 Ordered Chapters. 6978 +======================================+ 6979 | Ordered Chapter elements | 6980 +======================================+ 6981 | ChapterAtom/ChapterSegmentUID | 6982 +--------------------------------------+ 6983 | ChapterAtom/ChapterSegmentEditionUID | 6984 +--------------------------------------+ 6985 | ChapterAtom/ChapterTrack | 6986 +--------------------------------------+ 6987 | ChapterAtom/ChapProcess | 6988 +--------------------------------------+ 6989 | Info/ChapterTranslate | 6990 +--------------------------------------+ 6991 | TrackEntry/TrackTranslate | 6992 +--------------------------------------+ 6994 Table 51: elements only found in 6995 ordered chapters 6997 Furthermore there are other EBML Elements which could be used if the 6998 EditionFlagOrdered evaluates to "1". 7000 20.1.3.1. Ordered-Edition and Matroska Segment-Linking 7002 * Hard Linking: Ordered-Chapters supersedes the Hard Linking. 7004 * Medium Linking: Ordered Chapters are used in a normal way and can 7005 be combined with the ChapterSegmentUID element which establishes a 7006 link to another Segment. 7008 See Section 17 on the Linked Segments for more information about Hard 7009 Linking and Medium Linking. 7011 20.2. ChapterAtom 7013 The ChapterAtom is also called a Chapter. 7015 20.2.1. ChapterTimeStart 7017 The timestamp of the start of Chapter with nanosecond accuracy, not 7018 scaled by TimestampScale. For Simple Chapters this is the position 7019 of the chapter markers in the timeline. 7021 20.2.2. ChapterTimeEnd 7023 The timestamp of the end of Chapter with nanosecond accuracy, not 7024 scaled by TimestampScale. The timestamp defined by the 7025 ChapterTimeEnd is not part of the Chapter. A Matroska Player 7026 calculates the duration of this Chapter using the difference between 7027 the ChapterTimeEnd and ChapterTimeStart. The end timestamp MUST be 7028 greater than or equal to the start timestamp. 7030 When the ChapterTimeEnd timestamp is equal to the ChapterTimeStart 7031 timestamp, the timestamps is included in the Chapter. It can be 7032 useful to put markers in a file or add chapter commands with ordered 7033 chapter commands without having to play anything; see 7034 Section 5.1.7.1.4.14. 7036 +===========+=================+===============+===============+ 7037 | Chapter | Start timestamp | End timestamp | Duration | 7038 +===========+=================+===============+===============+ 7039 | Chapter 1 | 0 | 1000000000 | 1000000000 | 7040 +-----------+-----------------+---------------+---------------+ 7041 | Chapter 2 | 1000000000 | 5000000000 | 4000000000 | 7042 +-----------+-----------------+---------------+---------------+ 7043 | Chapter 3 | 6000000000 | 6000000000 | 0 | 7044 +-----------+-----------------+---------------+---------------+ 7045 | Chapter 4 | 9000000000 | 8000000000 | Invalid | 7046 | | | | (-1000000000) | 7047 +-----------+-----------------+---------------+---------------+ 7049 Table 52: ChapterTimeEnd usage possibilities 7051 20.2.3. Nested Chapters 7053 A ChapterAtom element can contain other ChapterAtom elements. That 7054 element is a Parent Chapter and the ChapterAtom elements it contains 7055 are Nested Chapters. 7057 Nested Chapters can be useful to tag small parts of a Segment that 7058 already have tags or add Chapter Codec commands on smaller parts of a 7059 Segment that already have Chapter Codec commands. 7061 The ChapterTimeStart of a Nested Chapter MUST be greater than or 7062 equal to the ChapterTimeStart its Parent Chapter. 7064 If the Parent Chapter of a Nested Chapter has a ChapterTimeEnd, the 7065 ChapterTimeStart of that Nested Chapter MUST be smaller than or equal 7066 to the ChapterTimeEnd of the Parent Chapter. 7068 20.2.4. Nested Chapters in Ordered Chapters 7070 The ChapterTimeEnd of the lowest level of Nested Chapters MUST be set 7071 for Ordered Chapters. 7073 When used with Ordered Chapters, the ChapterTimeEnd value of a Parent 7074 Chapter is useless for playback as the proper playback sections are 7075 described in its Nested Chapters. The ChapterTimeEnd SHOULD NOT be 7076 set in Parent Chapters and MUST be ignored for playback. 7078 20.2.5. ChapterFlagHidden 7080 Each Chapter ChapterFlagHidden flag works independently from parent 7081 chapters. A Nested Chapter with a ChapterFlagHidden that evaluates 7082 to "0" remains visible in the user interface even if the Parent 7083 Chapter ChapterFlagHidden flag is set to "1". 7085 +==========================+===================+=========+ 7086 | Chapter + Nested Chapter | ChapterFlagHidden | visible | 7087 +==========================+===================+=========+ 7088 | Chapter 1 | 0 | yes | 7089 +--------------------------+-------------------+---------+ 7090 | Nested Chapter 1.1 | 0 | yes | 7091 +--------------------------+-------------------+---------+ 7092 | Nested Chapter 1.2 | 1 | no | 7093 +--------------------------+-------------------+---------+ 7094 | Chapter 2 | 1 | no | 7095 +--------------------------+-------------------+---------+ 7096 | Nested Chapter 2.1 | 0 | yes | 7097 +--------------------------+-------------------+---------+ 7098 | Nested Chapter 2.2 | 1 | no | 7099 +--------------------------+-------------------+---------+ 7101 Table 53: ChapterFlagHidden nested visibility 7103 20.3. Menu features 7105 The menu features are handled like a chapter codec. That means each 7106 codec has a type, some private data and some data in the chapters. 7108 The type of the menu system is defined by the ChapProcessCodecID 7109 parameter. For now, only 2 values are supported : 0 matroska script, 7110 1 menu borrowed from the DVD. The private data depend on the type of 7111 menu system (stored in ChapProcessPrivate), idem for the data in the 7112 chapters (stored in ChapProcessData). 7114 The menu system, as well as Chapter Codecs in general, can do actions 7115 on the Matroska Player like jumping to another Chapter or Edition, 7116 selecting different tracks and possibly more. The scope of all the 7117 possibilities of Chapter Codecs is not covered in this document as it 7118 depends on the Chapter Codec features and its integration in a 7119 Matroska Player. 7121 20.4. Physical Types 7123 Each level can have different meanings for audio and video. The 7124 ORIGINAL_MEDIUM tag can be used to specify a string for 7125 ChapterPhysicalEquiv = 60. Here is the list of possible levels for 7126 both audio and video: 7128 +=======+=======================+=============+=====================+ 7129 | Value | Audio | Video | Comment | 7130 +=======+=======================+=============+=====================+ 7131 | 70 | SET / PACKAGE | SET / | the collection of | 7132 | | | PACKAGE | different media | 7133 +-------+-----------------------+-------------+---------------------+ 7134 | 60 | CD / 12" / 10" / 7" / | DVD / VHS | the physical medium | 7135 | | TAPE / MINIDISC / DAT | / | like a CD or a DVD | 7136 | | | LASERDISC | | 7137 +-------+-----------------------+-------------+---------------------+ 7138 | 50 | SIDE | SIDE | when the original | 7139 | | | | medium (LP/DVD) has | 7140 | | | | different sides | 7141 +-------+-----------------------+-------------+---------------------+ 7142 | 40 | - | LAYER | another physical | 7143 | | | | level on DVDs | 7144 +-------+-----------------------+-------------+---------------------+ 7145 | 30 | SESSION | SESSION | as found on CDs and | 7146 | | | | DVDs | 7147 +-------+-----------------------+-------------+---------------------+ 7148 | 20 | TRACK | - | as found on audio | 7149 | | | | CDs | 7150 +-------+-----------------------+-------------+---------------------+ 7151 | 10 | INDEX | - | the first logical | 7152 | | | | level of the side/ | 7153 | | | | medium | 7154 +-------+-----------------------+-------------+---------------------+ 7156 Table 54: ChapterPhysicalEquiv meaning per track type 7158 20.5. Chapter Examples 7160 20.5.1. Example 1 : basic chaptering 7162 In this example a movie is split in different chapters. It could 7163 also just be an audio file (album) on which each track corresponds to 7164 a chapter. 7166 * 00000ms - 05000ms : Intro 7168 * 05000ms - 25000ms : Before the crime 7170 * 25000ms - 27500ms : The crime 7172 * 27500ms - 38000ms : The killer arrested 7174 * 38000ms - 43000ms : Credits 7175 This would translate in the following matroska form : 7177 7178 7179 16603393396715046047 7180 7181 1193046 7182 0 7183 5000000000 7184 7185 Intro 7186 7187 7188 7189 2311527 7190 5000000000 7191 25000000000 7192 7193 Before the crime 7194 7195 7196 Avant le crime 7197 fra 7198 7199 7200 7201 3430008 7202 25000000000 7203 27500000000 7204 7205 The crime 7206 7207 7208 Le crime 7209 fra 7210 7211 7212 7213 4548489 7214 27500000000 7215 38000000000 7216 7217 After the crime 7218 7219 7220 Après le crime 7221 fra 7222 7224 7225 7226 5666960 7227 38000000000 7228 43000000000 7229 7230 Credits 7231 7232 7233 Générique 7234 fra 7235 7236 7237 7238 7240 Figure 12: Basic Chapters Example. 7242 20.5.2. Example 2 : nested chapters 7244 In this example an (existing) album is split into different chapters, 7245 and one of them contain another splitting. 7247 20.5.2.1. The Micronauts "Bleep To Bleep" 7249 * 00:00 - 12:28 : Baby Wants To Bleep/Rock 7251 - 00:00 - 04:38 : Baby wants to bleep (pt.1) 7253 - 04:38 - 07:12 : Baby wants to rock 7255 - 07:12 - 10:33 : Baby wants to bleep (pt.2) 7257 - 10:33 - 12:28 : Baby wants to bleep (pt.3) 7259 * 12:30 - 19:38 : Bleeper_O+2 7261 * 19:40 - 22:20 : Baby wants to bleep (pt.4) 7263 * 22:22 - 25:18 : Bleep to bleep 7265 * 25:20 - 33:35 : Baby wants to bleep (k) 7267 * 33:37 - 44:28 : Bleeper 7268 7269 7270 1281690858003401414 7271 7272 1 7273 0 7274 748000000 7275 7276 Baby wants to Bleep/Rock 7277 7278 7279 2 7280 0 7281 278000000 7282 7283 Baby wants to bleep (pt.1) 7284 7285 7286 7287 3 7288 278000000 7289 432000000 7290 7291 Baby wants to rock 7292 7293 7294 7295 4 7296 432000000 7297 633000000 7298 7299 Baby wants to bleep (pt.2) 7300 7301 7302 7303 5 7304 633000000 7305 748000000 7306 7307 Baby wants to bleep (pt.3) 7308 7309 7310 7311 7312 6 7313 750000000 7314 1178500000 7315 7316 Bleeper_O+2 7317 7318 7319 7320 7 7321 1180500000 7322 1340000000 7323 7324 Baby wants to bleep (pt.4) 7325 7326 7327 7328 8 7329 1342000000 7330 1518000000 7331 7332 Bleep to bleep 7333 7334 7335 7336 9 7337 1520000000 7338 2015000000 7339 7340 Baby wants to bleep (k) 7341 7342 7343 7344 10 7345 2017000000 7346 2668000000 7347 7348 Bleeper 7349 7350 7351 7352 7354 Figure 13: Nested Chapters Example. 7356 21. Attachments 7358 Matroska supports storage of related files and data in the 7359 Attachments Element (a Top-Level Element). Attachment Elements can 7360 be used to store related cover art, font files, transcripts, reports, 7361 error recovery files, picture, or text-based annotations, copies of 7362 specifications, or other ancillary files related to the Segment. 7364 Matroska Readers MUST NOT execute files stored as Attachment 7365 Elements. 7367 21.1. Cover Art 7369 This section defines a set of guidelines for the storage of cover art 7370 in Matroska files. A Matroska Reader MAY use embedded cover art to 7371 display a representational still-image depiction of the multimedia 7372 contents of the Matroska file. 7374 Only JPEG and PNG image formats SHOULD be used for cover art 7375 pictures. 7377 There can be two different covers for a movie/album: a portrait style 7378 (e.g., a DVD case) and a landscape style (e.g., a wide banner ad). 7380 There can be two versions of the same cover, the normal cover and the 7381 small cover. The dimension of the normal cover SHOULD be 600 pixels 7382 on the smallest side -- for example, 960x600 for landscape, 600x800 7383 for portrait, or 600x600 for square. The dimension of the small 7384 cover SHOULD be 120 pixels on the smallest side -- for example, 7385 192x120 or 120x160. 7387 Versions of cover art can be differentiated by the filename, which is 7388 stored in the FileName Element. The default filename of the normal 7389 cover in square or portrait mode is cover.(jpg|png). When stored, 7390 the normal cover SHOULD be the first Attachment in storage order. 7391 The small cover SHOULD be prefixed with "small_", such as 7392 small_cover.(jpg|png). The landscape variant SHOULD be suffixed with 7393 "_land", such as cover_land.(jpg|png). The filenames are case 7394 sensitive. 7396 The following table provides examples of file names for cover art in 7397 Attachments. 7399 +======================+===================+=================+ 7400 | FileName | Image Orientation | Pixel Length of | 7401 | | | Smallest Side | 7402 +======================+===================+=================+ 7403 | cover.jpg | Portrait or | 600 | 7404 | | square | | 7405 +----------------------+-------------------+-----------------+ 7406 | small_cover.png | Portrait or | 120 | 7407 | | square | | 7408 +----------------------+-------------------+-----------------+ 7409 | cover_land.png | Landscape | 600 | 7410 +----------------------+-------------------+-----------------+ 7411 | small_cover_land.jpg | Landscape | 120 | 7412 +----------------------+-------------------+-----------------+ 7414 Table 55: Cover Art Filenames 7416 21.2. Font files 7418 Font files MAY be added to a Matroska file as Attachments so that the 7419 font file may be used to display an associated subtitle track. This 7420 allows the presentation of a Matroska file to be consistent in 7421 various environments where the needed fonts might not be available on 7422 the local system. 7424 Depending on the font format in question, each font file can contain 7425 multiple font variants. Each font variant has a name which will be 7426 referred to as Font Name from now on. This Font Name can be 7427 different than the Attachment's FileName, even when disregarding the 7428 extension. In order to select a font for display, a Matroska player 7429 SHOULD consider both the Font Name and the base name of the 7430 Attachment's FileName, preferring the former when there are multiple 7431 matches. 7433 Subtitle codecs, such as SubStation Alpha (SSA/ASS), usually refer to 7434 a font by its Font Name, not by its filename. If none of the 7435 Attachments are a match for the Font Name, the Matroska player SHOULD 7436 attempt to find a system font whose Font Name matches the one used in 7437 the subtitle track. 7439 Since loading fonts temporarily can take a while, a Matroska player 7440 usually loads or installs all the fonts found in attachments so they 7441 are ready to be used during playback. Failure to use the font 7442 attachment might result in incorrect rendering of the subtitles. 7444 If a selected subtitle track has some AttachmentLink elements, the 7445 player MAY use only these fonts. 7447 A Matroska player SHOULD handle the official font MIME types from 7448 [RFC8081] when the system can handle the type: * font/sfnt: Generic 7449 SFNT Font Type, * font/ttf: TTF Font Type, * font/otf: OpenType 7450 Layout (OTF) Font Type, * font/collection: Collection Font Type, * 7451 font/woff: WOFF 1.0, * font/woff2: WOFF 2.0. 7453 Fonts in Matroska existed long before [RFC8081]. A few unofficial 7454 MIME types for fonts were used in existing files. Therefore it is 7455 RECOMMENDED for a Matroska player to support the following legacy 7456 MIME types for font attachments: 7458 * application/x-truetype-font: Truetype fonts, equivalent to font/ 7459 ttf and sometimes font/otf, 7461 * application/x-font-ttf: TTF fonts, equivalent to font/ttf, 7463 * application/vnd.ms-opentype: OpenType Layout fonts, equivalent to 7464 font/otf 7466 * application/font-sfnt: Generic SFNT Font Type, equivalent to font/ 7467 sfnt 7469 * application/font-woff: WOFF 1.0, equivalent to font/woff 7471 There may also be some font attachments with the application/octet- 7472 stream MIME type. In that case the Matroska player MAY try to guess 7473 the font type by checking the file extension of the 7474 AttachedFile\FileName string. Common file extensions for fonts are: 7475 * .ttf for Truetype fonts, equivalent to font/ttf, * .otf for 7476 OpenType Layout fonts, equivalent to font/otf, * .ttc for Collection 7477 fonts, equivalent to font/collection The file extension check MUST be 7478 case insensitive. 7480 Matroska writers SHOULD use a valid font MIME type from [RFC8081] in 7481 the AttachedFile\FileMimeType of the font attachment. They MAY use 7482 the MIME types found in older files when compatibility with older 7483 players is necessary. 7485 22. Cues 7487 The Cues Element provides an index of certain Cluster Elements to 7488 allow for optimized seeking to absolute timestamps within the 7489 Segment. The Cues Element contains one or many CuePoint Elements 7490 which each MUST reference an absolute timestamp (via the CueTime 7491 Element), a Track (via the CueTrack Element), and a Segment Position 7492 (via the CueClusterPosition Element). Additional non-mandated 7493 Elements are part of the CuePoint Element such as CueDuration, 7494 CueRelativePosition, CueCodecState and others which provide any 7495 Matroska Reader with additional information to use in the 7496 optimization of seeking performance. 7498 22.1. Recommendations 7500 The following recommendations are provided to optimize Matroska 7501 performance. 7503 * Unless Matroska is used as a live stream, it SHOULD contain a Cues 7504 Element. 7506 * For each video track, each keyframe SHOULD be referenced by a 7507 CuePoint Element. 7509 * It is RECOMMENDED to not reference non-keyframes of video tracks 7510 in Cues unless it references a Cluster Element which contains a 7511 CodecState Element but no keyframes. 7513 * For each subtitle track present, each subtitle frame SHOULD be 7514 referenced by a CuePoint Element with a CueDuration Element. 7516 * References to audio tracks MAY be skipped in CuePoint Elements if 7517 a video track is present. When included the CuePoint Elements 7518 SHOULD reference audio keyframes at most once every 500 7519 milliseconds. 7521 * If the referenced frame is not stored within the first 7522 SimpleBlock, or first BlockGroup within its Cluster Element, then 7523 the CueRelativePosition Element SHOULD be written to reference 7524 where in the Cluster the reference frame is stored. 7526 * If a CuePoint Element references Cluster Element that includes a 7527 CodecState Element, then that CuePoint Element MUST use a 7528 CueCodecState Element. 7530 * CuePoint Elements SHOULD be numerically sorted in storage order by 7531 the value of the CueTime Element. 7533 23. Matroska Streaming 7535 In Matroska, there are two kinds of streaming: file access and 7536 livestreaming. 7538 23.1. File Access 7540 File access can simply be reading a file located on your computer, 7541 but also includes accessing a file from an HTTP (web) server or CIFS 7542 (Windows share) server. These protocols are usually safe from 7543 reading errors and seeking in the stream is possible. However, when 7544 a file is stored far away or on a slow server, seeking can be an 7545 expensive operation and SHOULD be avoided. The following guidelines, 7546 when followed, help reduce the number of seeking operations for 7547 regular playback and also have the playback start quickly without a 7548 lot of data needed to read first (like a Cues Element, Attachment 7549 Element or SeekHead Element). 7551 Matroska, having a small overhead, is well suited for storing music/ 7552 videos on file servers without a big impact on the bandwidth used. 7553 Matroska does not require the index to be loaded before playing, 7554 which allows playback to start very quickly. The index can be loaded 7555 only when seeking is requested the first time. 7557 23.2. Livestreaming 7559 Livestreaming is the equivalent of television broadcasting on the 7560 internet. There are 2 families of servers for livestreaming: RTP/ 7561 RTSP and HTTP. Matroska is not meant to be used over RTP. RTP 7562 already has timing and channel mechanisms that would be wasted if 7563 doubled in Matroska. Additionally, having the same information at 7564 the RTP and Matroska level would be a source of confusion if they do 7565 not match. Livestreaming of Matroska over HTTP (or any other plain 7566 protocol based on TCP) is possible. 7568 A live Matroska stream is different from a file because it usually 7569 has no known end (only ending when the client disconnects). For 7570 this, all bits of the "size" portion of the Segment Element MUST be 7571 set to 1. Another option is to concatenate Segment Elements with 7572 known sizes, one after the other. This solution allows a change of 7573 codec/resolution between each segment. For example, this allows for 7574 a switch between 4:3 and 16:9 in a television program. 7576 When Segment Elements are continuous, certain Elements, like 7577 MetaSeek, Cues, Chapters, and Attachments, MUST NOT be used. 7579 It is possible for a Matroska Player to detect that a stream is not 7580 seekable. If the stream has neither a MetaSeek list or a Cues list 7581 at the beginning of the stream, it SHOULD be considered non-seekable. 7582 Even though it is possible to seek blindly forward in the stream, it 7583 is NOT RECOMMENDED. 7585 In the context of live radio or web TV, it is possible to "tag" the 7586 content while it is playing. The Tags Element can be placed between 7587 Clusters each time it is necessary. In that case, the new Tags 7588 Element MUST reset the previously encountered Tags Elements and use 7589 the new values instead. 7591 24. Security Considerations 7593 Matroska inherits security considerations from EBML. Attacks on a 7594 Matroska Reader could include: - Storage of a arbitrary and 7595 potentially executable data within an Attachment Element. Matroska 7596 Readers that extract or use data from Matroska Attachments SHOULD 7597 check that the data adheres to expectations. - A Matroska Attachment 7598 with an inaccurate mime-type. 7600 25. IANA Considerations 7602 25.1. Matroska Element IDs Registry 7604 This document creates a new IANA registry called the "Matroska 7605 Element IDs" registry. 7607 To register a new Element ID in this registry, one needs an Element 7608 ID, a Change Controller (IESG or email of registrant) and an optional 7609 Reference to a document describing the Element ID. 7611 Element IDs are described in Section 5 of [RFC8794]. Element IDs are 7612 encoded using the VINT mechanism described in Section 4 of [RFC8794] 7613 and can be between one and five octets long. Five-octet-long Element 7614 IDs are possible only if declared in the EBML header. 7616 One-octet Element IDs MUST be between 0x80 and 0xFE. These items are 7617 valuable because they are short, and they need to be used for 7618 commonly repeated elements. Element IDs are to be allocated within 7619 this range according to the "RFC Required" policy [RFC8126]. 7621 The following one-octet Element ID is RESERVED: 0xFF. 7623 Values in the one-octet range of 0x00 to 0x7F are not valid for use 7624 as an Element ID. 7626 Two-octet Element IDs MUST be between 0x407F and 0x7FFE. Element IDs 7627 are to be allocated within this range according to the "Specification 7628 Required" policy [RFC8126]. 7630 The following two-octet Element ID is RESERVED: 0x7FFF. 7632 Values in the two-octet ranges of 0x0000 to 0x4000 and 0x8000 to 7633 0xFFFF are not valid for use as an Element ID. 7635 Three-octet Element IDs MUST be between 0x203FFF and 0x3FFFFE. 7636 Element IDs are to be allocated within this range according to the 7637 "First Come First Served" policy [RFC8126]. 7639 The following three-octet Element ID is RESERVED: 0x3FFFFF. 7641 Values in the three-octet ranges of 0x000000 to 0x200000 and 0x400000 7642 to 0xFFFFFF are not valid for use as an Element ID. 7644 Four-octet Element IDs MUST be between 0x101FFFFF and 0x1FFFFFFE. 7645 Four-octet Element IDs are somewhat special in that they are useful 7646 for resynchronizing to major structures in the event of data 7647 corruption or loss. As such, four-octet Element IDs are split into 7648 two categories. Four-octet Element IDs whose lower three octets (as 7649 encoded) would make printable 7-bit ASCII values (0x20 to 0x7E, 7650 inclusive) MUST be allocated by the "Specification Required" policy. 7651 Sequential allocation of values is not required: specifications 7652 SHOULD include a specific request and are encouraged to do early 7653 allocations. 7655 To be clear about the above category: four-octet Element IDs always 7656 start with hex 0x10 to 0x1F, and that octet may be chosen so that the 7657 entire VINT has some desirable property, such as a specific CRC. The 7658 other three octets, when ALL having values between 0x20 (32, ASCII 7659 Space) and 0x7E (126, ASCII "~"), fall into this category. 7661 Other four-octet Element IDs may be allocated by the "First Come 7662 First Served" policy. 7664 The following four-octet Element ID is RESERVED: 0x1FFFFFFF. 7666 Values in the four-octet ranges of 0x00000000 to 0x10000000 and 7667 0x20000000 to 0xFFFFFFFF are not valid for use as an Element ID. 7669 Five-octet Element IDs (values from 0x080FFFFFFF to 0x0FFFFFFFFE) are 7670 RESERVED according to the "Experimental Use" policy [RFC8126]: they 7671 may be used by anyone at any time, but there is no coordination. 7673 EBML IDs defined for the EBML Header -- as defined in Section 17.1 of 7674 [RFC8794] -- MUST NOT be used as Matroska Element IDs. 7676 Matroska Element IDs Values found in this document are assigned as 7677 initial values as follows: 7679 +============+=============================+======================+ 7680 | Element ID | Element Name | Reference | 7681 +============+=============================+======================+ 7682 | 0x1043A770 | Chapters | Described in | 7683 | | | Section 5.1.7 | 7684 +------------+-----------------------------+----------------------+ 7685 | 0x114D9B74 | SeekHead | Described in | 7686 | | | Section 5.1.1 | 7687 +------------+-----------------------------+----------------------+ 7688 | 0x1254C367 | Tags | Described in | 7689 | | | Section 5.1.8 | 7690 +------------+-----------------------------+----------------------+ 7691 | 0x1549A966 | Info | Described in | 7692 | | | Section 5.1.2 | 7693 +------------+-----------------------------+----------------------+ 7694 | 0x1654AE6B | Tracks | Described in | 7695 | | | Section 5.1.4 | 7696 +------------+-----------------------------+----------------------+ 7697 | 0x18538067 | Segment | Described in | 7698 | | | Section 5.1 | 7699 +------------+-----------------------------+----------------------+ 7700 | 0x1941A469 | Attachments | Described in | 7701 | | | Section 5.1.6 | 7702 +------------+-----------------------------+----------------------+ 7703 | 0x1C53BB6B | Cues | Described in | 7704 | | | Section 5.1.5 | 7705 +------------+-----------------------------+----------------------+ 7706 | 0x1F43B675 | Cluster | Described in | 7707 | | | Section 5.1.3 | 7708 +------------+-----------------------------+----------------------+ 7709 | 0x22B59C | Language | Described in | 7710 | | | Section 5.1.4.1.21 | 7711 +------------+-----------------------------+----------------------+ 7712 | 0x22B59D | LanguageIETF | Described in | 7713 | | | Section 5.1.4.1.22 | 7714 +------------+-----------------------------+----------------------+ 7715 | 0x23314F | TrackTimestampScale | Described in | 7716 | | | Section 5.1.4.1.17 | 7717 +------------+-----------------------------+----------------------+ 7718 | 0x234E7A | DefaultDecodedFieldDuration | Described in | 7719 | | | Section 5.1.4.1.16 | 7720 +------------+-----------------------------+----------------------+ 7721 | 0x2383E3 | FrameRate | Described in | 7722 | | | Section 26.24 | 7723 +------------+-----------------------------+----------------------+ 7724 | 0x23E383 | DefaultDuration | Described in | 7725 | | | Section 5.1.4.1.15 | 7726 +------------+-----------------------------+----------------------+ 7727 | 0x258688 | CodecName | Described in | 7728 | | | Section 5.1.4.1.25 | 7729 +------------+-----------------------------+----------------------+ 7730 | 0x26B240 | CodecDownloadURL | Described in | 7731 | | | Section 26.19 | 7732 +------------+-----------------------------+----------------------+ 7733 | 0x2AD7B1 | TimestampScale | Described in | 7734 | | | Section 5.1.2.9 | 7735 +------------+-----------------------------+----------------------+ 7736 | 0x2EB524 | UncompressedFourCC | Described in Section | 7737 | | | 5.1.4.1.31.14 | 7738 +------------+-----------------------------+----------------------+ 7739 | 0x2FB523 | GammaValue | Described in | 7740 | | | Section 26.23 | 7741 +------------+-----------------------------+----------------------+ 7742 | 0x3A9697 | CodecSettings | Described in | 7743 | | | Section 26.17 | 7744 +------------+-----------------------------+----------------------+ 7745 | 0x3B4040 | CodecInfoURL | Described in | 7746 | | | Section 26.18 | 7747 +------------+-----------------------------+----------------------+ 7748 | 0x3C83AB | PrevFilename | Described in | 7749 | | | Section 5.1.2.4 | 7750 +------------+-----------------------------+----------------------+ 7751 | 0x3CB923 | PrevUID | Described in | 7752 | | | Section 5.1.2.3 | 7753 +------------+-----------------------------+----------------------+ 7754 | 0x3E83BB | NextFilename | Described in | 7755 | | | Section 5.1.2.6 | 7756 +------------+-----------------------------+----------------------+ 7757 | 0x3EB923 | NextUID | Described in | 7758 | | | Section 5.1.2.5 | 7759 +------------+-----------------------------+----------------------+ 7760 | 0x41A4 | BlockAddIDName | Described in | 7761 | | | Section 5.1.4.1.19.2 | 7762 +------------+-----------------------------+----------------------+ 7763 | 0x41E4 | BlockAdditionMapping | Described in | 7764 | | | Section 5.1.4.1.19 | 7765 +------------+-----------------------------+----------------------+ 7766 | 0x41E7 | BlockAddIDType | Described in | 7767 | | | Section 5.1.4.1.19.3 | 7768 +------------+-----------------------------+----------------------+ 7769 | 0x41ED | BlockAddIDExtraData | Described in | 7770 | | | Section 5.1.4.1.19.4 | 7771 +------------+-----------------------------+----------------------+ 7772 | 0x41F0 | BlockAddIDValue | Described in | 7773 | | | Section 5.1.4.1.19.1 | 7774 +------------+-----------------------------+----------------------+ 7775 | 0x4254 | ContentCompAlgo | Described in | 7776 | | | Section 5.1.4.1.34.6 | 7777 +------------+-----------------------------+----------------------+ 7778 | 0x4255 | ContentCompSettings | Described in | 7779 | | | Section 5.1.4.1.34.7 | 7780 +------------+-----------------------------+----------------------+ 7781 | 0x437C | ChapLanguage | Described in | 7782 | | | Section 5.1.7.1.4.11 | 7783 +------------+-----------------------------+----------------------+ 7784 | 0x437D | ChapLanguageIETF | Described in | 7785 | | | Section 5.1.7.1.4.12 | 7786 +------------+-----------------------------+----------------------+ 7787 | 0x437E | ChapCountry | Described in | 7788 | | | Section 5.1.7.1.4.13 | 7789 +------------+-----------------------------+----------------------+ 7790 | 0x4444 | SegmentFamily | Described in | 7791 | | | Section 5.1.2.7 | 7792 +------------+-----------------------------+----------------------+ 7793 | 0x4461 | DateUTC | Described in | 7794 | | | Section 5.1.2.11 | 7795 +------------+-----------------------------+----------------------+ 7796 | 0x447A | TagLanguage | Described in | 7797 | | | Section 5.1.8.1.2.2 | 7798 +------------+-----------------------------+----------------------+ 7799 | 0x447B | TagLanguageIETF | Described in | 7800 | | | Section 5.1.8.1.2.3 | 7801 +------------+-----------------------------+----------------------+ 7802 | 0x4484 | TagDefault | Described in | 7803 | | | Section 5.1.8.1.2.4 | 7804 +------------+-----------------------------+----------------------+ 7805 | 0x4485 | TagBinary | Described in | 7806 | | | Section 5.1.8.1.2.6 | 7807 +------------+-----------------------------+----------------------+ 7808 | 0x4487 | TagString | Described in | 7809 | | | Section 5.1.8.1.2.5 | 7810 +------------+-----------------------------+----------------------+ 7811 | 0x4489 | Duration | Described in | 7812 | | | Section 5.1.2.10 | 7813 +------------+-----------------------------+----------------------+ 7814 | 0x44B4 | TagDefaultBogus | Described in | 7815 | | | Section 26.41 | 7816 +------------+-----------------------------+----------------------+ 7817 | 0x450D | ChapProcessPrivate | Described in | 7818 | | | Section 5.1.7.1.4.16 | 7819 +------------+-----------------------------+----------------------+ 7820 | 0x45A3 | TagName | Described in | 7821 | | | Section 5.1.8.1.2.1 | 7822 +------------+-----------------------------+----------------------+ 7823 | 0x45B9 | EditionEntry | Described in | 7824 | | | Section 5.1.7.1 | 7825 +------------+-----------------------------+----------------------+ 7826 | 0x45BC | EditionUID | Described in | 7827 | | | Section 5.1.7.1.1 | 7828 +------------+-----------------------------+----------------------+ 7829 | 0x45DB | EditionFlagDefault | Described in | 7830 | | | Section 5.1.7.1.2 | 7831 +------------+-----------------------------+----------------------+ 7832 | 0x45DD | EditionFlagOrdered | Described in | 7833 | | | Section 5.1.7.1.3 | 7834 +------------+-----------------------------+----------------------+ 7835 | 0x465C | FileData | Described in | 7836 | | | Section 5.1.6.1.4 | 7837 +------------+-----------------------------+----------------------+ 7838 | 0x4660 | FileMimeType | Described in | 7839 | | | Section 5.1.6.1.3 | 7840 +------------+-----------------------------+----------------------+ 7841 | 0x4661 | FileUsedStartTime | Described in | 7842 | | | Section 26.39 | 7843 +------------+-----------------------------+----------------------+ 7844 | 0x4662 | FileUsedEndTime | Described in | 7845 | | | Section 26.40 | 7846 +------------+-----------------------------+----------------------+ 7847 | 0x466E | FileName | Described in | 7848 | | | Section 5.1.6.1.2 | 7849 +------------+-----------------------------+----------------------+ 7850 | 0x4675 | FileReferral | Described in | 7851 | | | Section 26.38 | 7852 +------------+-----------------------------+----------------------+ 7853 | 0x467E | FileDescription | Described in | 7854 | | | Section 5.1.6.1.1 | 7855 +------------+-----------------------------+----------------------+ 7856 | 0x46AE | FileUID | Described in | 7857 | | | Section 5.1.6.1.5 | 7858 +------------+-----------------------------+----------------------+ 7859 | 0x47E1 | ContentEncAlgo | Described in | 7860 | | | Section 5.1.4.1.34.9 | 7861 +------------+-----------------------------+----------------------+ 7862 | 0x47E2 | ContentEncKeyID | Described in Section | 7863 | | | 5.1.4.1.34.10 | 7864 +------------+-----------------------------+----------------------+ 7865 | 0x47E3 | ContentSignature | Described in | 7866 | | | Section 26.31 | 7867 +------------+-----------------------------+----------------------+ 7868 | 0x47E4 | ContentSigKeyID | Described in | 7869 | | | Section 26.32 | 7870 +------------+-----------------------------+----------------------+ 7871 | 0x47E5 | ContentSigAlgo | Described in | 7872 | | | Section 26.33 | 7873 +------------+-----------------------------+----------------------+ 7874 | 0x47E6 | ContentSigHashAlgo | Described in | 7875 | | | Section 26.34 | 7876 +------------+-----------------------------+----------------------+ 7877 | 0x47E7 | ContentEncAESSettings | Described in Section | 7878 | | | 5.1.4.1.34.11 | 7879 +------------+-----------------------------+----------------------+ 7880 | 0x47E8 | AESSettingsCipherMode | Described in Section | 7881 | | | 5.1.4.1.34.12 | 7882 +------------+-----------------------------+----------------------+ 7883 | 0x4D80 | MuxingApp | Described in | 7884 | | | Section 5.1.2.13 | 7885 +------------+-----------------------------+----------------------+ 7886 | 0x4DBB | Seek | Described in | 7887 | | | Section 5.1.1.1 | 7888 +------------+-----------------------------+----------------------+ 7889 | 0x5031 | ContentEncodingOrder | Described in | 7890 | | | Section 5.1.4.1.34.2 | 7891 +------------+-----------------------------+----------------------+ 7892 | 0x5032 | ContentEncodingScope | Described in | 7893 | | | Section 5.1.4.1.34.3 | 7894 +------------+-----------------------------+----------------------+ 7895 | 0x5033 | ContentEncodingType | Described in | 7896 | | | Section 5.1.4.1.34.4 | 7897 +------------+-----------------------------+----------------------+ 7898 | 0x5034 | ContentCompression | Described in | 7899 | | | Section 5.1.4.1.34.5 | 7900 +------------+-----------------------------+----------------------+ 7901 | 0x5035 | ContentEncryption | Described in | 7902 | | | Section 5.1.4.1.34.8 | 7903 +------------+-----------------------------+----------------------+ 7904 | 0x535F | CueRefNumber | Described in | 7905 | | | Section 26.36 | 7906 +------------+-----------------------------+----------------------+ 7907 | 0x536E | Name | Described in | 7908 | | | Section 5.1.4.1.20 | 7909 +------------+-----------------------------+----------------------+ 7910 | 0x5378 | CueBlockNumber | Described in | 7911 | | | Section 5.1.5.1.2.5 | 7912 +------------+-----------------------------+----------------------+ 7913 | 0x537F | TrackOffset | Described in | 7914 | | | Section 26.16 | 7915 +------------+-----------------------------+----------------------+ 7916 | 0x53AB | SeekID | Described in | 7917 | | | Section 5.1.1.1.1 | 7918 +------------+-----------------------------+----------------------+ 7919 | 0x53AC | SeekPosition | Described in | 7920 | | | Section 5.1.1.1.2 | 7921 +------------+-----------------------------+----------------------+ 7922 | 0x53B8 | StereoMode | Described in | 7923 | | | Section 5.1.4.1.31.3 | 7924 +------------+-----------------------------+----------------------+ 7925 | 0x53B9 | OldStereoMode | Described in | 7926 | | | Section 26.21 | 7927 +------------+-----------------------------+----------------------+ 7928 | 0x53C0 | AlphaMode | Described in | 7929 | | | Section 5.1.4.1.31.4 | 7930 +------------+-----------------------------+----------------------+ 7931 | 0x54AA | PixelCropBottom | Described in | 7932 | | | Section 5.1.4.1.31.7 | 7933 +------------+-----------------------------+----------------------+ 7934 | 0x54B0 | DisplayWidth | Described in Section | 7935 | | | 5.1.4.1.31.11 | 7936 +------------+-----------------------------+----------------------+ 7937 | 0x54B2 | DisplayUnit | Described in Section | 7938 | | | 5.1.4.1.31.13 | 7939 +------------+-----------------------------+----------------------+ 7940 | 0x54B3 | AspectRatioType | Described in | 7941 | | | Section 26.22 | 7942 +------------+-----------------------------+----------------------+ 7943 | 0x54BA | DisplayHeight | Described in Section | 7944 | | | 5.1.4.1.31.12 | 7945 +------------+-----------------------------+----------------------+ 7946 | 0x54BB | PixelCropTop | Described in | 7947 | | | Section 5.1.4.1.31.8 | 7948 +------------+-----------------------------+----------------------+ 7949 | 0x54CC | PixelCropLeft | Described in | 7950 | | | Section 5.1.4.1.31.9 | 7951 +------------+-----------------------------+----------------------+ 7952 | 0x54DD | PixelCropRight | Described in Section | 7953 | | | 5.1.4.1.31.10 | 7954 +------------+-----------------------------+----------------------+ 7955 | 0x55AA | FlagForced | Described in | 7956 | | | Section 5.1.4.1.6 | 7957 +------------+-----------------------------+----------------------+ 7958 | 0x55AB | FlagHearingImpaired | Described in | 7959 | | | Section 5.1.4.1.7 | 7960 +------------+-----------------------------+----------------------+ 7961 | 0x55AC | FlagVisualImpaired | Described in | 7962 | | | Section 5.1.4.1.8 | 7963 +------------+-----------------------------+----------------------+ 7964 | 0x55AD | FlagTextDescriptions | Described in | 7965 | | | Section 5.1.4.1.9 | 7966 +------------+-----------------------------+----------------------+ 7967 | 0x55AE | FlagOriginal | Described in | 7968 | | | Section 5.1.4.1.10 | 7969 +------------+-----------------------------+----------------------+ 7970 | 0x55AF | FlagCommentary | Described in | 7971 | | | Section 5.1.4.1.11 | 7972 +------------+-----------------------------+----------------------+ 7973 | 0x55B0 | Colour | Described in Section | 7974 | | | 5.1.4.1.31.15 | 7975 +------------+-----------------------------+----------------------+ 7976 | 0x55B1 | MatrixCoefficients | Described in Section | 7977 | | | 5.1.4.1.31.16 | 7978 +------------+-----------------------------+----------------------+ 7979 | 0x55B2 | BitsPerChannel | Described in Section | 7980 | | | 5.1.4.1.31.17 | 7981 +------------+-----------------------------+----------------------+ 7982 | 0x55B3 | ChromaSubsamplingHorz | Described in Section | 7983 | | | 5.1.4.1.31.18 | 7984 +------------+-----------------------------+----------------------+ 7985 | 0x55B4 | ChromaSubsamplingVert | Described in Section | 7986 | | | 5.1.4.1.31.19 | 7987 +------------+-----------------------------+----------------------+ 7988 | 0x55B5 | CbSubsamplingHorz | Described in Section | 7989 | | | 5.1.4.1.31.20 | 7990 +------------+-----------------------------+----------------------+ 7991 | 0x55B6 | CbSubsamplingVert | Described in Section | 7992 | | | 5.1.4.1.31.21 | 7993 +------------+-----------------------------+----------------------+ 7994 | 0x55B7 | ChromaSitingHorz | Described in Section | 7995 | | | 5.1.4.1.31.22 | 7996 +------------+-----------------------------+----------------------+ 7997 | 0x55B8 | ChromaSitingVert | Described in Section | 7998 | | | 5.1.4.1.31.23 | 7999 +------------+-----------------------------+----------------------+ 8000 | 0x55B9 | Range | Described in Section | 8001 | | | 5.1.4.1.31.24 | 8002 +------------+-----------------------------+----------------------+ 8003 | 0x55BA | TransferCharacteristics | Described in Section | 8004 | | | 5.1.4.1.31.25 | 8005 +------------+-----------------------------+----------------------+ 8006 | 0x55BB | Primaries | Described in Section | 8007 | | | 5.1.4.1.31.26 | 8008 +------------+-----------------------------+----------------------+ 8009 | 0x55BC | MaxCLL | Described in Section | 8010 | | | 5.1.4.1.31.27 | 8011 +------------+-----------------------------+----------------------+ 8012 | 0x55BD | MaxFALL | Described in Section | 8013 | | | 5.1.4.1.31.28 | 8014 +------------+-----------------------------+----------------------+ 8015 | 0x55D0 | MasteringMetadata | Described in Section | 8016 | | | 5.1.4.1.31.29 | 8017 +------------+-----------------------------+----------------------+ 8018 | 0x55D1 | PrimaryRChromaticityX | Described in Section | 8019 | | | 5.1.4.1.31.30 | 8020 +------------+-----------------------------+----------------------+ 8021 | 0x55D2 | PrimaryRChromaticityY | Described in Section | 8022 | | | 5.1.4.1.31.31 | 8023 +------------+-----------------------------+----------------------+ 8024 | 0x55D3 | PrimaryGChromaticityX | Described in Section | 8025 | | | 5.1.4.1.31.32 | 8026 +------------+-----------------------------+----------------------+ 8027 | 0x55D4 | PrimaryGChromaticityY | Described in Section | 8028 | | | 5.1.4.1.31.33 | 8029 +------------+-----------------------------+----------------------+ 8030 | 0x55D5 | PrimaryBChromaticityX | Described in Section | 8031 | | | 5.1.4.1.31.34 | 8032 +------------+-----------------------------+----------------------+ 8033 | 0x55D6 | PrimaryBChromaticityY | Described in Section | 8034 | | | 5.1.4.1.31.35 | 8035 +------------+-----------------------------+----------------------+ 8036 | 0x55D7 | WhitePointChromaticityX | Described in Section | 8037 | | | 5.1.4.1.31.36 | 8038 +------------+-----------------------------+----------------------+ 8039 | 0x55D8 | WhitePointChromaticityY | Described in Section | 8040 | | | 5.1.4.1.31.37 | 8041 +------------+-----------------------------+----------------------+ 8042 | 0x55D9 | LuminanceMax | Described in Section | 8043 | | | 5.1.4.1.31.38 | 8044 +------------+-----------------------------+----------------------+ 8045 | 0x55DA | LuminanceMin | Described in Section | 8046 | | | 5.1.4.1.31.39 | 8047 +------------+-----------------------------+----------------------+ 8048 | 0x55EE | MaxBlockAdditionID | Described in | 8049 | | | Section 5.1.4.1.18 | 8050 +------------+-----------------------------+----------------------+ 8051 | 0x5654 | ChapterStringUID | Described in | 8052 | | | Section 5.1.7.1.4.2 | 8053 +------------+-----------------------------+----------------------+ 8054 | 0x56AA | CodecDelay | Described in | 8055 | | | Section 5.1.4.1.28 | 8056 +------------+-----------------------------+----------------------+ 8057 | 0x56BB | SeekPreRoll | Described in | 8058 | | | Section 5.1.4.1.29 | 8059 +------------+-----------------------------+----------------------+ 8060 | 0x5741 | WritingApp | Described in | 8061 | | | Section 5.1.2.14 | 8062 +------------+-----------------------------+----------------------+ 8063 | 0x5854 | SilentTracks | Described in | 8064 | | | Section 26.1 | 8065 +------------+-----------------------------+----------------------+ 8066 | 0x58D7 | SilentTrackNumber | Described in | 8067 | | | Section 26.2 | 8068 +------------+-----------------------------+----------------------+ 8069 | 0x61A7 | AttachedFile | Described in | 8070 | | | Section 5.1.6.1 | 8071 +------------+-----------------------------+----------------------+ 8072 | 0x6240 | ContentEncoding | Described in | 8073 | | | Section 5.1.4.1.34.1 | 8074 +------------+-----------------------------+----------------------+ 8075 | 0x6264 | BitDepth | Described in | 8076 | | | Section 5.1.4.1.32.4 | 8077 +------------+-----------------------------+----------------------+ 8078 | 0x63A2 | CodecPrivate | Described in | 8079 | | | Section 5.1.4.1.24 | 8080 +------------+-----------------------------+----------------------+ 8081 | 0x63C0 | Targets | Described in | 8082 | | | Section 5.1.8.1.1 | 8083 +------------+-----------------------------+----------------------+ 8084 | 0x63C3 | ChapterPhysicalEquiv | Described in | 8085 | | | Section 5.1.7.1.4.8 | 8086 +------------+-----------------------------+----------------------+ 8087 | 0x63C4 | TagChapterUID | Described in | 8088 | | | Section 5.1.8.1.1.5 | 8089 +------------+-----------------------------+----------------------+ 8090 | 0x63C5 | TagTrackUID | Described in | 8091 | | | Section 5.1.8.1.1.3 | 8092 +------------+-----------------------------+----------------------+ 8093 | 0x63C6 | TagAttachmentUID | Described in | 8094 | | | Section 5.1.8.1.1.6 | 8095 +------------+-----------------------------+----------------------+ 8096 | 0x63C9 | TagEditionUID | Described in | 8097 | | | Section 5.1.8.1.1.4 | 8098 +------------+-----------------------------+----------------------+ 8099 | 0x63CA | TargetType | Described in | 8100 | | | Section 5.1.8.1.1.2 | 8101 +------------+-----------------------------+----------------------+ 8102 | 0x6624 | TrackTranslate | Described in | 8103 | | | Section 5.1.4.1.30 | 8104 +------------+-----------------------------+----------------------+ 8105 | 0x66A5 | TrackTranslateTrackID | Described in | 8106 | | | Section 5.1.4.1.30.1 | 8107 +------------+-----------------------------+----------------------+ 8108 | 0x66BF | TrackTranslateCodec | Described in | 8109 | | | Section 5.1.4.1.30.2 | 8110 +------------+-----------------------------+----------------------+ 8111 | 0x66FC | TrackTranslateEditionUID | Described in | 8112 | | | Section 5.1.4.1.30.3 | 8113 +------------+-----------------------------+----------------------+ 8114 | 0x67C8 | SimpleTag | Described in | 8115 | | | Section 5.1.8.1.2 | 8116 +------------+-----------------------------+----------------------+ 8117 | 0x68CA | TargetTypeValue | Described in | 8118 | | | Section 5.1.8.1.1.1 | 8119 +------------+-----------------------------+----------------------+ 8120 | 0x6911 | ChapProcessCommand | Described in | 8121 | | | Section 5.1.7.1.4.17 | 8122 +------------+-----------------------------+----------------------+ 8123 | 0x6922 | ChapProcessTime | Described in | 8124 | | | Section 5.1.7.1.4.18 | 8125 +------------+-----------------------------+----------------------+ 8126 | 0x6924 | ChapterTranslate | Described in | 8127 | | | Section 5.1.2.8 | 8128 +------------+-----------------------------+----------------------+ 8129 | 0x6933 | ChapProcessData | Described in | 8130 | | | Section 5.1.7.1.4.19 | 8131 +------------+-----------------------------+----------------------+ 8132 | 0x6944 | ChapProcess | Described in | 8133 | | | Section 5.1.7.1.4.14 | 8134 +------------+-----------------------------+----------------------+ 8135 | 0x6955 | ChapProcessCodecID | Described in | 8136 | | | Section 5.1.7.1.4.15 | 8137 +------------+-----------------------------+----------------------+ 8138 | 0x69A5 | ChapterTranslateID | Described in | 8139 | | | Section 5.1.2.8.1 | 8140 +------------+-----------------------------+----------------------+ 8141 | 0x69BF | ChapterTranslateCodec | Described in | 8142 | | | Section 5.1.2.8.2 | 8143 +------------+-----------------------------+----------------------+ 8144 | 0x69FC | ChapterTranslateEditionUID | Described in | 8145 | | | Section 5.1.2.8.3 | 8146 +------------+-----------------------------+----------------------+ 8147 | 0x6D80 | ContentEncodings | Described in | 8148 | | | Section 5.1.4.1.34 | 8149 +------------+-----------------------------+----------------------+ 8150 | 0x6DE7 | MinCache | Described in | 8151 | | | Section 5.1.4.1.13 | 8152 +------------+-----------------------------+----------------------+ 8153 | 0x6DF8 | MaxCache | Described in | 8154 | | | Section 5.1.4.1.14 | 8155 +------------+-----------------------------+----------------------+ 8156 | 0x6E67 | ChapterSegmentUID | Described in | 8157 | | | Section 5.1.7.1.4.6 | 8158 +------------+-----------------------------+----------------------+ 8159 | 0x6EBC | ChapterSegmentEditionUID | Described in | 8160 | | | Section 5.1.7.1.4.7 | 8161 +------------+-----------------------------+----------------------+ 8162 | 0x6FAB | TrackOverlay | Described in | 8163 | | | Section 5.1.4.1.27 | 8164 +------------+-----------------------------+----------------------+ 8165 | 0x7373 | Tag | Described in | 8166 | | | Section 5.1.8.1 | 8167 +------------+-----------------------------+----------------------+ 8168 | 0x7384 | SegmentFilename | Described in | 8169 | | | Section 5.1.2.2 | 8170 +------------+-----------------------------+----------------------+ 8171 | 0x73A4 | SegmentUID | Described in | 8172 | | | Section 5.1.2.1 | 8173 +------------+-----------------------------+----------------------+ 8174 | 0x73C4 | ChapterUID | Described in | 8175 | | | Section 5.1.7.1.4.1 | 8176 +------------+-----------------------------+----------------------+ 8177 | 0x73C5 | TrackUID | Described in | 8178 | | | Section 5.1.4.1.2 | 8179 +------------+-----------------------------+----------------------+ 8180 | 0x7446 | AttachmentLink | Described in | 8181 | | | Section 5.1.4.1.26 | 8182 +------------+-----------------------------+----------------------+ 8183 | 0x75A1 | BlockAdditions | Described in | 8184 | | | Section 5.1.3.5.2 | 8185 +------------+-----------------------------+----------------------+ 8186 | 0x75A2 | DiscardPadding | Described in | 8187 | | | Section 5.1.3.5.7 | 8188 +------------+-----------------------------+----------------------+ 8189 | 0x7670 | Projection | Described in Section | 8190 | | | 5.1.4.1.31.40 | 8191 +------------+-----------------------------+----------------------+ 8192 | 0x7671 | ProjectionType | Described in Section | 8193 | | | 5.1.4.1.31.41 | 8194 +------------+-----------------------------+----------------------+ 8195 | 0x7672 | ProjectionPrivate | Described in Section | 8196 | | | 5.1.4.1.31.42 | 8197 +------------+-----------------------------+----------------------+ 8198 | 0x7673 | ProjectionPoseYaw | Described in Section | 8199 | | | 5.1.4.1.31.43 | 8200 +------------+-----------------------------+----------------------+ 8201 | 0x7674 | ProjectionPosePitch | Described in Section | 8202 | | | 5.1.4.1.31.44 | 8203 +------------+-----------------------------+----------------------+ 8204 | 0x7675 | ProjectionPoseRoll | Described in Section | 8205 | | | 5.1.4.1.31.45 | 8206 +------------+-----------------------------+----------------------+ 8207 | 0x78B5 | OutputSamplingFrequency | Described in | 8208 | | | Section 5.1.4.1.32.2 | 8209 +------------+-----------------------------+----------------------+ 8210 | 0x7BA9 | Title | Described in | 8211 | | | Section 5.1.2.12 | 8212 +------------+-----------------------------+----------------------+ 8213 | 0x7D7B | ChannelPositions | Described in | 8214 | | | Section 26.25 | 8215 +------------+-----------------------------+----------------------+ 8216 | 0x80 | ChapterDisplay | Described in | 8217 | | | Section 5.1.7.1.4.9 | 8218 +------------+-----------------------------+----------------------+ 8219 | 0x83 | TrackType | Described in | 8220 | | | Section 5.1.4.1.3 | 8221 +------------+-----------------------------+----------------------+ 8222 | 0x85 | ChapString | Described in | 8223 | | | Section 5.1.7.1.4.10 | 8224 +------------+-----------------------------+----------------------+ 8225 | 0x86 | CodecID | Described in | 8226 | | | Section 5.1.4.1.23 | 8227 +------------+-----------------------------+----------------------+ 8228 | 0x88 | FlagDefault | Described in | 8229 | | | Section 5.1.4.1.5 | 8230 +------------+-----------------------------+----------------------+ 8231 | 0x8E | Slices | Described in | 8232 | | | Section 26.5 | 8233 +------------+-----------------------------+----------------------+ 8234 | 0x91 | ChapterTimeStart | Described in | 8235 | | | Section 5.1.7.1.4.3 | 8236 +------------+-----------------------------+----------------------+ 8237 | 0x92 | ChapterTimeEnd | Described in | 8238 | | | Section 5.1.7.1.4.4 | 8239 +------------+-----------------------------+----------------------+ 8240 | 0x96 | CueRefTime | Described in | 8241 | | | Section 5.1.5.1.2.8 | 8242 +------------+-----------------------------+----------------------+ 8243 | 0x97 | CueRefCluster | Described in | 8244 | | | Section 26.35 | 8245 +------------+-----------------------------+----------------------+ 8246 | 0x98 | ChapterFlagHidden | Described in | 8247 | | | Section 5.1.7.1.4.5 | 8248 +------------+-----------------------------+----------------------+ 8249 | 0x9A | FlagInterlaced | Described in | 8250 | | | Section 5.1.4.1.31.1 | 8251 +------------+-----------------------------+----------------------+ 8252 | 0x9B | BlockDuration | Described in | 8253 | | | Section 5.1.3.5.3 | 8254 +------------+-----------------------------+----------------------+ 8255 | 0x9C | FlagLacing | Described in | 8256 | | | Section 5.1.4.1.12 | 8257 +------------+-----------------------------+----------------------+ 8258 | 0x9D | FieldOrder | Described in | 8259 | | | Section 5.1.4.1.31.2 | 8260 +------------+-----------------------------+----------------------+ 8261 | 0x9F | Channels | Described in | 8262 | | | Section 5.1.4.1.32.3 | 8263 +------------+-----------------------------+----------------------+ 8264 | 0xA0 | BlockGroup | Described in | 8265 | | | Section 5.1.3.5 | 8266 +------------+-----------------------------+----------------------+ 8267 | 0xA1 | Block | Described in | 8268 | | | Section 5.1.3.5.1 | 8269 +------------+-----------------------------+----------------------+ 8270 | 0xA2 | BlockVirtual | Described in | 8271 | | | Section 26.3 | 8272 +------------+-----------------------------+----------------------+ 8273 | 0xA3 | SimpleBlock | Described in | 8274 | | | Section 5.1.3.4 | 8275 +------------+-----------------------------+----------------------+ 8276 | 0xA4 | CodecState | Described in | 8277 | | | Section 5.1.3.5.6 | 8278 +------------+-----------------------------+----------------------+ 8279 | 0xA5 | BlockAdditional | Described in | 8280 | | | Section 5.1.3.5.2.3 | 8281 +------------+-----------------------------+----------------------+ 8282 | 0xA6 | BlockMore | Described in | 8283 | | | Section 5.1.3.5.2.1 | 8284 +------------+-----------------------------+----------------------+ 8285 | 0xA7 | Position | Described in | 8286 | | | Section 5.1.3.2 | 8287 +------------+-----------------------------+----------------------+ 8288 | 0xAA | CodecDecodeAll | Described in | 8289 | | | Section 26.20 | 8290 +------------+-----------------------------+----------------------+ 8291 | 0xAB | PrevSize | Described in | 8292 | | | Section 5.1.3.3 | 8293 +------------+-----------------------------+----------------------+ 8294 | 0xAE | TrackEntry | Described in | 8295 | | | Section 5.1.4.1 | 8296 +------------+-----------------------------+----------------------+ 8297 | 0xAF | EncryptedBlock | Described in | 8298 | | | Section 26.15 | 8299 +------------+-----------------------------+----------------------+ 8300 | 0xB0 | PixelWidth | Described in | 8301 | | | Section 5.1.4.1.31.5 | 8302 +------------+-----------------------------+----------------------+ 8303 | 0xB2 | CueDuration | Described in | 8304 | | | Section 5.1.5.1.2.4 | 8305 +------------+-----------------------------+----------------------+ 8306 | 0xB3 | CueTime | Described in | 8307 | | | Section 5.1.5.1.1 | 8308 +------------+-----------------------------+----------------------+ 8309 | 0xB5 | SamplingFrequency | Described in | 8310 | | | Section 5.1.4.1.32.1 | 8311 +------------+-----------------------------+----------------------+ 8312 | 0xB6 | ChapterAtom | Described in | 8313 | | | Section 5.1.7.1.4 | 8314 +------------+-----------------------------+----------------------+ 8315 | 0xB7 | CueTrackPositions | Described in | 8316 | | | Section 5.1.5.1.2 | 8317 +------------+-----------------------------+----------------------+ 8318 | 0xB9 | FlagEnabled | Described in | 8319 | | | Section 5.1.4.1.4 | 8320 +------------+-----------------------------+----------------------+ 8321 | 0xBA | PixelHeight | Described in | 8322 | | | Section 5.1.4.1.31.6 | 8323 +------------+-----------------------------+----------------------+ 8324 | 0xBB | CuePoint | Described in | 8325 | | | Section 5.1.5.1 | 8326 +------------+-----------------------------+----------------------+ 8327 | 0xC0 | TrickTrackUID | Described in | 8328 | | | Section 26.26 | 8329 +------------+-----------------------------+----------------------+ 8330 | 0xC1 | TrickTrackSegmentUID | Described in | 8331 | | | Section 26.27 | 8332 +------------+-----------------------------+----------------------+ 8333 | 0xC4 | TrickMasterTrackSegmentUID | Described in | 8334 | | | Section 26.30 | 8335 +------------+-----------------------------+----------------------+ 8336 | 0xC6 | TrickTrackFlag | Described in | 8337 | | | Section 26.28 | 8338 +------------+-----------------------------+----------------------+ 8339 | 0xC7 | TrickMasterTrackUID | Described in | 8340 | | | Section 26.29 | 8341 +------------+-----------------------------+----------------------+ 8342 | 0xC8 | ReferenceFrame | Described in | 8343 | | | Section 26.12 | 8344 +------------+-----------------------------+----------------------+ 8345 | 0xC9 | ReferenceOffset | Described in | 8346 | | | Section 26.13 | 8347 +------------+-----------------------------+----------------------+ 8348 | 0xCA | ReferenceTimestamp | Described in | 8349 | | | Section 26.14 | 8350 +------------+-----------------------------+----------------------+ 8351 | 0xCB | BlockAdditionID | Described in | 8352 | | | Section 26.9 | 8353 +------------+-----------------------------+----------------------+ 8354 | 0xCC | LaceNumber | Described in | 8355 | | | Section 26.7 | 8356 +------------+-----------------------------+----------------------+ 8357 | 0xCD | FrameNumber | Described in | 8358 | | | Section 26.8 | 8359 +------------+-----------------------------+----------------------+ 8360 | 0xCE | Delay | Described in | 8361 | | | Section 26.10 | 8362 +------------+-----------------------------+----------------------+ 8363 | 0xCF | SliceDuration | Described in | 8364 | | | Section 26.11 | 8365 +------------+-----------------------------+----------------------+ 8366 | 0xD7 | TrackNumber | Described in | 8367 | | | Section 5.1.4.1.1 | 8368 +------------+-----------------------------+----------------------+ 8369 | 0xDB | CueReference | Described in | 8370 | | | Section 5.1.5.1.2.7 | 8371 +------------+-----------------------------+----------------------+ 8372 | 0xE0 | Video | Described in | 8373 | | | Section 5.1.4.1.31 | 8374 +------------+-----------------------------+----------------------+ 8375 | 0xE1 | Audio | Described in | 8376 | | | Section 5.1.4.1.32 | 8377 +------------+-----------------------------+----------------------+ 8378 | 0xE2 | TrackOperation | Described in | 8379 | | | Section 5.1.4.1.33 | 8380 +------------+-----------------------------+----------------------+ 8381 | 0xE3 | TrackCombinePlanes | Described in | 8382 | | | Section 5.1.4.1.33.1 | 8383 +------------+-----------------------------+----------------------+ 8384 | 0xE4 | TrackPlane | Described in | 8385 | | | Section 5.1.4.1.33.2 | 8386 +------------+-----------------------------+----------------------+ 8387 | 0xE5 | TrackPlaneUID | Described in | 8388 | | | Section 5.1.4.1.33.3 | 8389 +------------+-----------------------------+----------------------+ 8390 | 0xE6 | TrackPlaneType | Described in | 8391 | | | Section 5.1.4.1.33.4 | 8392 +------------+-----------------------------+----------------------+ 8393 | 0xE7 | Timestamp | Described in | 8394 | | | Section 5.1.3.1 | 8395 +------------+-----------------------------+----------------------+ 8396 | 0xE8 | TimeSlice | Described in | 8397 | | | Section 26.6 | 8398 +------------+-----------------------------+----------------------+ 8399 | 0xE9 | TrackJoinBlocks | Described in | 8400 | | | Section 5.1.4.1.33.5 | 8401 +------------+-----------------------------+----------------------+ 8402 | 0xEA | CueCodecState | Described in | 8403 | | | Section 5.1.5.1.2.6 | 8404 +------------+-----------------------------+----------------------+ 8405 | 0xEB | CueRefCodecState | Described in | 8406 | | | Section 26.37 | 8407 +------------+-----------------------------+----------------------+ 8408 | 0xED | TrackJoinUID | Described in | 8409 | | | Section 5.1.4.1.33.6 | 8410 +------------+-----------------------------+----------------------+ 8411 | 0xEE | BlockAddID | Described in | 8412 | | | Section 5.1.3.5.2.2 | 8413 +------------+-----------------------------+----------------------+ 8414 | 0xF0 | CueRelativePosition | Described in | 8415 | | | Section 5.1.5.1.2.3 | 8416 +------------+-----------------------------+----------------------+ 8417 | 0xF1 | CueClusterPosition | Described in | 8418 | | | Section 5.1.5.1.2.2 | 8419 +------------+-----------------------------+----------------------+ 8420 | 0xF7 | CueTrack | Described in | 8421 | | | Section 5.1.5.1.2.1 | 8422 +------------+-----------------------------+----------------------+ 8423 | 0xFA | ReferencePriority | Described in | 8424 | | | Section 5.1.3.5.4 | 8425 +------------+-----------------------------+----------------------+ 8426 | 0xFB | ReferenceBlock | Described in | 8427 | | | Section 5.1.3.5.5 | 8428 +------------+-----------------------------+----------------------+ 8429 | 0xFD | ReferenceVirtual | Described in | 8430 | | | Section 26.4 | 8431 +------------+-----------------------------+----------------------+ 8433 Table 56: IDs and Names for Matroska Element IDs assigned by 8434 this document 8436 25.2. Chapter Codec IDs Registry 8438 This document creates a new IANA registry called the "Matroska 8439 Chapter Codec IDs" registry. The values correspond to the 8440 ChapProcessCodecID value described in Section 5.1.7.1.4.15. 8442 ChapProcessCodecID values of "0" and "1" are RESERVED to the IETF for 8443 future use. 8445 25.3. MIME Types 8447 Matroska files and streams are found in three main forms: audio-video 8448 files, audio-only and occasionally with stereoscopic video tracks. 8450 The MIME types to use for each type is: 8452 * "video/matroska" for streams containing video tracks 8454 * "audio/matroska" for streams containing audio tracks with no video 8455 tracks 8457 * "video/matroska-3d" for streams containing at least a stereoscopic 8458 video track 8460 Historically Matroska files and streams have used the following MIME 8461 types with a "x-" prefix: 8463 * "video/x-matroska" for streams containing video tracks 8465 * "audio/x-matroska" for streams containing audio tracks with no 8466 video tracks 8468 * "video/x-matroska-3d" for streams containing at least a 8469 stereoscopic video track 8471 For better compatibility a system SHOULD be able to handle both 8472 formats. Newer systems SHOULD NOT use the historic format and use 8473 the format that follows the [RFC6838] format instead. 8475 26. Annex A: Historic Deprecated Elements 8477 As Matroska evolved since 2002 many parts that were considered for 8478 use in the format were never used and often incorrectly designed. 8479 Many of the elements that were then defined are not found in any 8480 known files but were part of public specs. DivX also had a few 8481 custom elements that were designed for custom features. 8483 We list these elements that have a known ID that SHOULD NOT be reused 8484 to avoid colliding with existing files. 8486 26.1. SilentTracks Element 8488 path: \Segment\Cluster\SilentTracks 8490 id: 0x5854 8492 type: master 8493 documentation: The list of tracks that are not used in that part of 8494 the stream. It is useful when using overlay tracks on seeking or 8495 to decide what track to use. 8497 26.2. SilentTrackNumber Element 8499 path: \Segment\Cluster\SilentTracks\SilentTrackNumber 8501 id: 0x58D7 8503 type: uinteger 8505 documentation: One of the track number that are not used from now on 8506 in the stream. It could change later if not specified as silent 8507 in a further Cluster. 8509 26.3. BlockVirtual Element 8511 path: \Segment\Cluster\BlockGroup\BlockVirtual 8513 id: 0xA2 8515 type: binary 8517 documentation: A Block with no data. It MUST be stored in the 8518 stream at the place the real Block would be in display order. 8520 26.4. ReferenceVirtual Element 8522 path: \Segment\Cluster\BlockGroup\ReferenceVirtual 8524 id: 0xFD 8526 type: integer 8528 documentation: The Segment Position of the data that would otherwise 8529 be in position of the virtual block. 8531 26.5. Slices Element 8533 path: \Segment\Cluster\BlockGroup\Slices 8535 id: 0x8E 8537 type: master 8539 documentation: Contains slices description. 8541 26.6. TimeSlice Element 8543 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice 8545 id: 0xE8 8547 type: master 8549 documentation: Contains extra time information about the data 8550 contained in the Block. Being able to interpret this Element is 8551 not REQUIRED for playback. 8553 26.7. LaceNumber Element 8555 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber 8557 id: 0xCC 8559 type: uinteger 8561 documentation: The reverse number of the frame in the lace (0 is the 8562 last frame, 1 is the next to last, etc). Being able to interpret 8563 this Element is not REQUIRED for playback. 8565 26.8. FrameNumber Element 8567 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber 8569 id: 0xCD 8571 type: uinteger 8573 documentation: The number of the frame to generate from this lace 8574 with this delay (allow you to generate many frames from the same 8575 Block/Frame). 8577 26.9. BlockAdditionID Element 8579 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID 8581 id: 0xCB 8583 type: uinteger 8585 documentation: The ID of the BlockAdditional Element (0 is the main 8586 Block). 8588 26.10. Delay Element 8590 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay 8592 id: 0xCE 8594 type: uinteger 8596 documentation: The delay to apply to the Element, expressed in Track 8597 Ticks; see Section 10.1. 8599 26.11. SliceDuration Element 8601 path: \Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration 8603 id: 0xCF 8605 type: uinteger 8607 documentation: The duration to apply to the Element, expressed in 8608 Track Ticks; see Section 10.1. 8610 26.12. ReferenceFrame Element 8612 path: \Segment\Cluster\BlockGroup\ReferenceFrame 8614 id: 0xC8 8616 type: master 8618 documentation: Contains information about the last reference frame. 8619 See [DivXTrickTrack]. 8621 26.13. ReferenceOffset Element 8623 path: \Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset 8625 id: 0xC9 8627 type: uinteger 8629 documentation: The relative offset, in bytes, from the previous 8630 BlockGroup element for this Smooth FF/RW video track to the 8631 containing BlockGroup element. See [DivXTrickTrack]. 8633 26.14. ReferenceTimestamp Element 8635 path: \Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimestamp 8637 id: 0xCA 8639 type: uinteger 8641 documentation: The timestamp of the BlockGroup pointed to by 8642 ReferenceOffset, expressed in Track Ticks; see Section 10.1. See 8643 [DivXTrickTrack]. 8645 26.15. EncryptedBlock Element 8647 path: \Segment\Cluster\EncryptedBlock 8649 id: 0xAF 8651 type: binary 8653 documentation: Similar to SimpleBlock, see Section 9.3, but the data 8654 inside the Block are Transformed (encrypt and/or signed). 8656 26.16. TrackOffset Element 8658 path: \Segment\Tracks\TrackEntry\TrackOffset 8660 id: 0x537F 8662 type: integer 8664 documentation: A value to add to the Block's Timestamp, expressed in 8665 Matroska Ticks -- ie in nanoseconds; see Section 10.1. This can 8666 be used to adjust the playback offset of a track. 8668 26.17. CodecSettings Element 8670 path: \Segment\Tracks\TrackEntry\CodecSettings 8672 id: 0x3A9697 8674 type: utf-8 8676 documentation: A string describing the encoding setting used. 8678 26.18. CodecInfoURL Element 8680 path: \Segment\Tracks\TrackEntry\CodecInfoURL 8682 id: 0x3B4040 8684 type: string 8686 documentation: A URL to find information about the codec used. 8688 26.19. CodecDownloadURL Element 8690 path: \Segment\Tracks\TrackEntry\CodecDownloadURL 8692 id: 0x26B240 8694 type: string 8696 documentation: A URL to download about the codec used. 8698 26.20. CodecDecodeAll Element 8700 path: \Segment\Tracks\TrackEntry\CodecDecodeAll 8702 id: 0xAA 8704 type: uinteger 8706 documentation: Set to 1 if the codec can decode potentially damaged 8707 data. 8709 26.21. OldStereoMode Element 8711 path: \Segment\Tracks\TrackEntry\Video\OldStereoMode 8713 id: 0x53B9 8715 type: uinteger 8717 documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used 8718 in old versions of libmatroska. 8720 26.22. AspectRatioType Element 8722 path: \Segment\Tracks\TrackEntry\Video\AspectRatioType 8724 id: 0x54B3 8725 type: uinteger 8727 documentation: Specify the possible modifications to the aspect 8728 ratio. 8730 26.23. GammaValue Element 8732 path: \Segment\Tracks\TrackEntry\Video\GammaValue 8734 id: 0x2FB523 8736 type: float 8738 documentation: Gamma Value. 8740 26.24. FrameRate Element 8742 path: \Segment\Tracks\TrackEntry\Video\FrameRate 8744 id: 0x2383E3 8746 type: float 8748 documentation: Number of frames per second. This value is 8749 Informational only. It is intended for constant frame rate 8750 streams, and SHOULD NOT be used for a variable frame rate 8751 TrackEntry. 8753 26.25. ChannelPositions Element 8755 path: \Segment\Tracks\TrackEntry\Audio\ChannelPositions 8757 id: 0x7D7B 8759 type: binary 8761 documentation: Table of horizontal angles for each successive 8762 channel. 8764 26.26. TrickTrackUID Element 8766 path: \Segment\Tracks\TrackEntry\TrickTrackUID 8768 id: 0xC0 8770 type: uinteger 8772 documentation: The TrackUID of the Smooth FF/RW video in the paired 8773 EBML structure corresponding to this video track. See 8774 [DivXTrickTrack]. 8776 26.27. TrickTrackSegmentUID Element 8778 path: \Segment\Tracks\TrackEntry\TrickTrackSegmentUID 8780 id: 0xC1 8782 type: binary 8784 documentation: The SegmentUID of the Segment containing the track 8785 identified by TrickTrackUID. See [DivXTrickTrack]. 8787 26.28. TrickTrackFlag Element 8789 path: \Segment\Tracks\TrackEntry\TrickTrackFlag 8791 id: 0xC6 8793 type: uinteger 8795 documentation: Set to 1 if this video track is a Smooth FF/RW track. 8796 If set to 1, MasterTrackUID and MasterTrackSegUID should must be 8797 present and BlockGroups for this track must contain ReferenceFrame 8798 structures. Otherwise, TrickTrackUID and TrickTrackSegUID must be 8799 present if this track has a corresponding Smooth FF/RW track. See 8800 [DivXTrickTrack]. 8802 26.29. TrickMasterTrackUID Element 8804 path: \Segment\Tracks\TrackEntry\TrickMasterTrackUID 8806 id: 0xC7 8808 type: uinteger 8810 documentation: The TrackUID of the video track in the paired EBML 8811 structure that corresponds to this Smooth FF/RW track. See 8812 [DivXTrickTrack]. 8814 26.30. TrickMasterTrackSegmentUID Element 8816 path: \Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID 8818 id: 0xC4 8820 type: binary 8821 documentation: The SegmentUID of the Segment containing the track 8822 identified by MasterTrackUID. See [DivXTrickTrack]. 8824 26.31. ContentSignature Element 8826 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 8827 ntentEncryption\ContentSignature 8829 id: 0x47E3 8831 type: binary 8833 documentation: A cryptographic signature of the contents. 8835 26.32. ContentSigKeyID Element 8837 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 8838 ntentEncryption\ContentSigKeyID 8840 id: 0x47E4 8842 type: binary 8844 documentation: This is the ID of the private key the data was signed 8845 with. 8847 26.33. ContentSigAlgo Element 8849 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 8850 ntentEncryption\ContentSigAlgo 8852 id: 0x47E5 8854 type: uinteger 8856 documentation: The algorithm used for the signature. 8858 26.34. ContentSigHashAlgo Element 8860 path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co 8861 ntentEncryption\ContentSigHashAlgo 8863 id: 0x47E6 8865 type: uinteger 8867 documentation: The hash algorithm used for the signature. 8869 26.35. CueRefCluster Element 8871 path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCl 8872 uster 8874 id: 0x97 8876 type: uinteger 8878 documentation: The Segment Position of the Cluster containing the 8879 referenced Block. 8881 26.36. CueRefNumber Element 8883 path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefNu 8884 mber 8886 id: 0x535F 8888 type: uinteger 8890 documentation: Number of the referenced Block of Track X in the 8891 specified Cluster. 8893 26.37. CueRefCodecState Element 8895 path: \Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueRefCo 8896 decState 8898 id: 0xEB 8900 type: uinteger 8902 documentation: The Segment Position of the Codec State corresponding 8903 to this referenced Element. 0 means that the data is taken from 8904 the initial Track Entry. 8906 26.38. FileReferral Element 8908 path: \Segment\Attachments\AttachedFile\FileReferral 8910 id: 0x4675 8912 type: binary 8914 documentation: A binary value that a track/codec can refer to when 8915 the attachment is needed. 8917 26.39. FileUsedStartTime Element 8919 path: \Segment\Attachments\AttachedFile\FileUsedStartTime 8921 id: 0x4661 8923 type: uinteger 8925 documentation: The timestamp at which this optimized font attachment 8926 comes into context, expressed in Segment Ticks which is based on 8927 TimestampScale. See [DivXWorldFonts]. 8929 26.40. FileUsedEndTime Element 8931 path: \Segment\Attachments\AttachedFile\FileUsedEndTime 8933 id: 0x4662 8935 type: uinteger 8937 documentation: The timestamp at which this optimized font attachment 8938 goes out of context, expressed in Segment Ticks which is based on 8939 TimestampScale. See [DivXWorldFonts]. 8941 26.41. TagDefaultBogus Element 8943 path: \Segment\Tags\Tag\+SimpleTag\TagDefaultBogus 8945 id: 0x44B4 8947 type: uinteger 8949 documentation: A variant of the TagDefault element with a bogus 8950 Element ID; see Section 5.1.8.1.2.4. 8952 27. Normative References 8954 [BCP47] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying 8955 Languages", DOI 10.17487/RFC5646, September 2009, 8956 . 8958 [Blowfish] Schneier, B., "The Blowfish Encryption Algorithm", 1993, 8959 . 8961 [BZIP2] Seward, J., "bzip2", 18 July 1996, 8962 . 8964 [FIPS.197] US National Institute of Standards and Technology, 8965 "Advanced Encryption Standard (AES)", 8966 DOI 10.6028/NIST.FIPS.197, 26 November 2001, 8967 . 8970 [FIPS.46-3] 8971 US National Institute of Standards and Technology, "Data 8972 Encryption Standard (DES)", FIPS PUB 46, 25 October 1999, 8973 . 8976 [IANADomains] 8977 "IANA Root Zone Database", 8978 . 8980 [IANALangRegistry] 8981 "IANA Language Subtag Registry", 28 February 2013, 8982 . 8985 [ISO3166-1] 8986 International Organization for Standardization, "Codes for 8987 the representation of names of countries and their 8988 subdivisions -- Part 1: Country code", ISO 3166-1:2020, 8989 August 2020, . 8991 [ISO639-2] United States Library Of Congress, "Codes for the 8992 Representation of Names of Languages", ISO 639-2:1998, 21 8993 December 2017, . 8996 [LZO] Tarreau, W., Rodgman, R., and M. Oberhumer, 8997 "Lempel–Ziv–Oberhumer compression", 30 October 2018, 8998 . 9000 [MatroskaCodec] 9001 Lhomme, S., Bunkus, M., and D. Rice, "Media Container 9002 Codec Specifications", Work in Progress, Internet-Draft, 9003 draft-ietf-cellar-codec-06, 12 April 2021, 9004 . 9007 [MatroskaTags] 9008 Lhomme, S., Bunkus, M., and D. Rice, "Matroska Media 9009 Container Tag Specifications", Work in Progress, Internet- 9010 Draft, draft-ietf-cellar-tags-06, 12 April 2021, 9011 . 9014 [RFC1851] Karn, P., Metzger, P., and W. Simpson, "The ESP Triple DES 9015 Transform", RFC 1851, DOI 10.17487/RFC1851, September 9016 1995, . 9018 [RFC1950] Deutsch, P. and J-L. Gailly, "ZLIB Compressed Data Format 9019 Specification version 3.3", RFC 1950, 9020 DOI 10.17487/RFC1950, May 1996, 9021 . 9023 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 9024 Requirement Levels", BCP 14, RFC 2119, 9025 DOI 10.17487/RFC2119, March 1997, 9026 . 9028 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 9029 Specifications and Registration Procedures", BCP 13, 9030 RFC 6838, DOI 10.17487/RFC6838, January 2013, 9031 . 9033 [RFC8081] Lilley, C., "The "font" Top-Level Media Type", RFC 8081, 9034 DOI 10.17487/RFC8081, February 2017, 9035 . 9037 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 9038 Writing an IANA Considerations Section in RFCs", BCP 26, 9039 RFC 8126, DOI 10.17487/RFC8126, June 2017, 9040 . 9042 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 9043 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 9044 May 2017, . 9046 [RFC8794] Lhomme, S., Rice, D., and M. Bunkus, "Extensible Binary 9047 Meta Language", RFC 8794, DOI 10.17487/RFC8794, July 2020, 9048 . 9050 [SP.800-38A] 9051 US National Institute of Standards and Technology, 9052 "Recommendation for Block Cipher Modes of Operation: 9053 Methods and Techniques", DOI 10.6028/NIST.SP.800-38A, 1 9054 December 2001, 9055 . 9058 [Twofish] Schneier, B., Kelsey, J., Whiting, D., Wagner, D., Hall, 9059 C., and N. Ferguson, "Twofish: A 128-Bit Block Cipher", 15 9060 June 1998, . 9062 [WebVTT] Pieters, S., Pfeiffer, S., Ed., Jägenstedt, P., and I. 9063 Hickson, "WebVTT Cue Identifier", 4 April 2019, 9064 . 9066 28. Informative References 9068 [AVIFormat] 9069 Microsoft, "AVI RIFF File Reference", 31 May 2018, 9070 . 9073 [DivXTrickTrack] 9074 "DivX Trick Track Extensions", 14 December 2010, 9075 . 9078 [DivXWorldFonts] 9079 "DivX World Fonts Extensions", 14 December 2010, 9080 . 9083 [FourCC-RGB] 9084 Silicon.dk ApS, "RGB Pixel Format FourCCs", 9085 . 9087 [FourCC-YUV] 9088 Silicon.dk ApS, "YUV Pixel Format FourCCs", 9089 . 9091 [MCF] "Media Container Format", 17 July 2002, 9092 . 9094 [RFC3533] Pfeiffer, S., "The Ogg Encapsulation Format Version 0", 9095 RFC 3533, DOI 10.17487/RFC3533, May 2003, 9096 . 9098 Authors' Addresses 9100 Steve Lhomme 9101 Email: slhomme@matroska.org 9103 Moritz Bunkus 9104 Email: moritz@bunkus.org 9106 Dave Rice 9107 Email: dave@dericed.com