idnits 2.17.1 draft-lhomme-cellar-matroska-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 26 instances of too long lines in the document, the longest one being 124 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 804 has weird spacing: '...xx xxxx xxxx ...' == Line 805 has weird spacing: '...1x xxxx xxxx ...' == Line 806 has weird spacing: '...01 xxxx xxxx ...' == Line 808 has weird spacing: '...00 1xxx xxxx ...' == Line 809 has weird spacing: '...xx xxxx xxxx ...' == (4 more instances...) -- The exact meaning of the all-uppercase expression 'MAY NOT' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timecodes MAY NOT be consecutive. But a frame with a past timecode MUST reference a frame already known, otherwise it's considered bad/void. == The expression 'MAY NOT', while looking like RFC 2119 requirements text, is not defined in RFC 2119, and should not be used. Consider using 'MUST NOT' instead (if that is what you mean). Found 'MAY NOT' in this paragraph: Frames using references SHOULD be stored in "coding order". That means the references first and then the frames referencing them. A consequence is that timecodes MAY NOT be consecutive. But a frame with a past timecode MUST reference a frame already known, otherwise it's considered bad/void. -- The document date (May 26, 2017) is 2525 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 9618 -- Looks like a reference, but probably isn't: '2' on line 9620 -- Looks like a reference, but probably isn't: '3' on line 9623 -- Looks like a reference, but probably isn't: '4' on line 9625 -- Looks like a reference, but probably isn't: '5' on line 9627 -- Looks like a reference, but probably isn't: '6' on line 9629 -- Looks like a reference, but probably isn't: '7' on line 9632 -- Looks like a reference, but probably isn't: '8' on line 9635 -- Looks like a reference, but probably isn't: '9' on line 9637 -- Looks like a reference, but probably isn't: '10' on line 9640 -- Looks like a reference, but probably isn't: '11' on line 9643 -- Looks like a reference, but probably isn't: '12' on line 9646 -- Looks like a reference, but probably isn't: '13' on line 9649 -- Looks like a reference, but probably isn't: '14' on line 9651 -- Looks like a reference, but probably isn't: '15' on line 9653 -- Looks like a reference, but probably isn't: '16' on line 9655 -- Looks like a reference, but probably isn't: '17' on line 9657 -- Looks like a reference, but probably isn't: '18' on line 9659 -- Looks like a reference, but probably isn't: '19' on line 9661 -- Looks like a reference, but probably isn't: '20' on line 9663 -- Looks like a reference, but probably isn't: '21' on line 9665 -- Looks like a reference, but probably isn't: '22' on line 9667 -- Looks like a reference, but probably isn't: '23' on line 9669 -- Looks like a reference, but probably isn't: '24' on line 9671 -- Looks like a reference, but probably isn't: '25' on line 9673 -- Looks like a reference, but probably isn't: '26' on line 9675 -- Looks like a reference, but probably isn't: '27' on line 9677 -- Looks like a reference, but probably isn't: '28' on line 9679 -- Looks like a reference, but probably isn't: '29' on line 9681 -- Looks like a reference, but probably isn't: '30' on line 9683 -- Looks like a reference, but probably isn't: '31' on line 9685 -- Looks like a reference, but probably isn't: '32' on line 9687 -- Looks like a reference, but probably isn't: '33' on line 9689 -- Looks like a reference, but probably isn't: '34' on line 9691 -- Looks like a reference, but probably isn't: '35' on line 9693 -- Looks like a reference, but probably isn't: '36' on line 9696 -- Looks like a reference, but probably isn't: '37' on line 9698 -- Looks like a reference, but probably isn't: '38' on line 9700 -- Looks like a reference, but probably isn't: '39' on line 9702 -- Looks like a reference, but probably isn't: '40' on line 9704 -- Looks like a reference, but probably isn't: '41' on line 9706 -- Looks like a reference, but probably isn't: '42' on line 9708 -- Looks like a reference, but probably isn't: '43' on line 9710 -- Looks like a reference, but probably isn't: '44' on line 9712 -- Looks like a reference, but probably isn't: '45' on line 9715 -- Looks like a reference, but probably isn't: '46' on line 9718 -- Looks like a reference, but probably isn't: '47' on line 9721 -- Looks like a reference, but probably isn't: '48' on line 9724 -- Looks like a reference, but probably isn't: '49' on line 9727 -- Looks like a reference, but probably isn't: '50' on line 9730 -- Looks like a reference, but probably isn't: '51' on line 9732 -- Looks like a reference, but probably isn't: '52' on line 9734 -- Looks like a reference, but probably isn't: '53' on line 9737 -- Looks like a reference, but probably isn't: '54' on line 9739 == Missing Reference: 'TM' is mentioned on line 7174, but not defined -- Looks like a reference, but probably isn't: '55' on line 9741 -- Looks like a reference, but probably isn't: '56' on line 9744 -- Looks like a reference, but probably isn't: '57' on line 9746 -- Looks like a reference, but probably isn't: '58' on line 9748 -- Looks like a reference, but probably isn't: '59' on line 9750 -- Looks like a reference, but probably isn't: '60' on line 9752 -- Looks like a reference, but probably isn't: '61' on line 9754 -- Looks like a reference, but probably isn't: '62' on line 9757 -- Looks like a reference, but probably isn't: '63' on line 9760 -- Looks like a reference, but probably isn't: '64' on line 9763 -- Looks like a reference, but probably isn't: '65' on line 9766 -- Looks like a reference, but probably isn't: '66' on line 9769 -- Looks like a reference, but probably isn't: '67' on line 9772 -- Looks like a reference, but probably isn't: '68' on line 9775 -- Looks like a reference, but probably isn't: '69' on line 9778 -- Looks like a reference, but probably isn't: '70' on line 9781 -- Looks like a reference, but probably isn't: '71' on line 9784 -- Looks like a reference, but probably isn't: '72' on line 9786 -- Looks like a reference, but probably isn't: '73' on line 9788 -- Looks like a reference, but probably isn't: '74' on line 9790 -- Looks like a reference, but probably isn't: '75' on line 9792 -- Looks like a reference, but probably isn't: '76' on line 9794 -- Looks like a reference, but probably isn't: '77' on line 9796 -- Looks like a reference, but probably isn't: '78' on line 9798 -- Looks like a reference, but probably isn't: '79' on line 9800 -- Looks like a reference, but probably isn't: '80' on line 9802 -- Looks like a reference, but probably isn't: '81' on line 9804 -- Looks like a reference, but probably isn't: '82' on line 9806 -- Looks like a reference, but probably isn't: '83' on line 9808 -- Looks like a reference, but probably isn't: '84' on line 9810 -- Looks like a reference, but probably isn't: '85' on line 9812 -- Looks like a reference, but probably isn't: '86' on line 9814 -- Looks like a reference, but probably isn't: '87' on line 9816 -- Looks like a reference, but probably isn't: '88' on line 9818 -- Looks like a reference, but probably isn't: '0' on line 7764 -- Looks like a reference, but probably isn't: '89' on line 9820 -- Looks like a reference, but probably isn't: '90' on line 9822 -- Looks like a reference, but probably isn't: '91' on line 9824 -- Looks like a reference, but probably isn't: '92' on line 9826 -- Looks like a reference, but probably isn't: '93' on line 9828 == Missing Reference: 'Events' is mentioned on line 8353, but not defined -- Looks like a reference, but probably isn't: '94' on line 9830 -- Looks like a reference, but probably isn't: '95' on line 9832 -- Looks like a reference, but probably isn't: '96' on line 9834 -- Looks like a reference, but probably isn't: '97' on line 9836 -- Looks like a reference, but probably isn't: '98' on line 9838 -- Looks like a reference, but probably isn't: '99' on line 9841 -- Looks like a reference, but probably isn't: '100' on line 9843 -- Looks like a reference, but probably isn't: '101' on line 9845 -- Looks like a reference, but probably isn't: '102' on line 9847 -- Looks like a reference, but probably isn't: '103' on line 9849 -- Looks like a reference, but probably isn't: '104' on line 9851 -- Looks like a reference, but probably isn't: '105' on line 9853 -- Looks like a reference, but probably isn't: '106' on line 9855 -- Looks like a reference, but probably isn't: '107' on line 9857 -- Looks like a reference, but probably isn't: '108' on line 9859 -- Looks like a reference, but probably isn't: '109' on line 9861 -- Looks like a reference, but probably isn't: '110' on line 9863 -- Looks like a reference, but probably isn't: '111' on line 9865 -- Looks like a reference, but probably isn't: '112' on line 9867 -- Looks like a reference, but probably isn't: '113' on line 9869 -- Looks like a reference, but probably isn't: '114' on line 9871 -- Looks like a reference, but probably isn't: '115' on line 9873 -- Looks like a reference, but probably isn't: '116' on line 9875 -- Looks like a reference, but probably isn't: '117' on line 9877 -- Looks like a reference, but probably isn't: '118' on line 9879 -- Looks like a reference, but probably isn't: '119' on line 9881 -- Looks like a reference, but probably isn't: '120' on line 9883 -- Looks like a reference, but probably isn't: '121' on line 9885 -- Looks like a reference, but probably isn't: '122' on line 9887 -- Looks like a reference, but probably isn't: '123' on line 9889 -- Looks like a reference, but probably isn't: '124' on line 9891 -- Looks like a reference, but probably isn't: '125' on line 9893 -- Looks like a reference, but probably isn't: '126' on line 9895 -- Looks like a reference, but probably isn't: '127' on line 9897 -- Looks like a reference, but probably isn't: '128' on line 9899 ** Downref: Normative reference to an Informational RFC: RFC 6386 Summary: 2 errors (**), 0 flaws (~~), 11 warnings (==), 132 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: November 27, 2017 6 D. Rice 7 May 26, 2017 9 Matroska 10 draft-lhomme-cellar-matroska-02 12 Abstract 14 This document defines the Matroska audiovisual container, including 15 definitions of its structural Elements, as well as its terminology, 16 vocabulary, and application. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://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 November 27, 2017. 35 Copyright Notice 37 Copyright (c) 2017 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 11 53 2. Status of this document . . . . . . . . . . . . . . . . . . . 12 54 3. Security Considerations . . . . . . . . . . . . . . . . . . . 13 55 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 56 5. Notations and Conventions . . . . . . . . . . . . . . . . . . 13 57 6. Basis in EBML . . . . . . . . . . . . . . . . . . . . . . . . 13 58 6.1. Added Constaints on EBML . . . . . . . . . . . . . . . . 13 59 6.2. Matroska Design . . . . . . . . . . . . . . . . . . . . . 14 60 6.2.1. Language Codes . . . . . . . . . . . . . . . . . . . 14 61 6.2.2. Physical Types . . . . . . . . . . . . . . . . . . . 14 62 6.2.3. Block Structure . . . . . . . . . . . . . . . . . . . 15 63 6.2.4. Lacing . . . . . . . . . . . . . . . . . . . . . . . 17 64 7. Matroska Structure . . . . . . . . . . . . . . . . . . . . . 20 65 7.1. Matroska Top Level Elements . . . . . . . . . . . . . . . 22 66 7.2. Matroska Additions to Schema Element Attributes . . . . . 29 67 7.3. Matroska Schema . . . . . . . . . . . . . . . . . . . . . 30 68 7.3.1. Segment Element . . . . . . . . . . . . . . . . . . . 30 69 7.3.2. SeekHead Element . . . . . . . . . . . . . . . . . . 30 70 7.3.3. Seek Element . . . . . . . . . . . . . . . . . . . . 31 71 7.3.4. SeekID Element . . . . . . . . . . . . . . . . . . . 31 72 7.3.5. SeekPosition Element . . . . . . . . . . . . . . . . 31 73 7.3.6. Info Element . . . . . . . . . . . . . . . . . . . . 32 74 7.3.7. SegmentUID Element . . . . . . . . . . . . . . . . . 32 75 7.3.8. SegmentFilename Element . . . . . . . . . . . . . . . 33 76 7.3.9. PrevUID Element . . . . . . . . . . . . . . . . . . . 33 77 7.3.10. PrevFilename Element . . . . . . . . . . . . . . . . 34 78 7.3.11. NextUID Element . . . . . . . . . . . . . . . . . . . 34 79 7.3.12. NextFilename Element . . . . . . . . . . . . . . . . 35 80 7.3.13. SegmentFamily Element . . . . . . . . . . . . . . . . 35 81 7.3.14. ChapterTranslate Element . . . . . . . . . . . . . . 35 82 7.3.15. ChapterTranslateEditionUID Element . . . . . . . . . 36 83 7.3.16. ChapterTranslateCodec Element . . . . . . . . . . . . 36 84 7.3.17. ChapterTranslateID Element . . . . . . . . . . . . . 36 85 7.3.18. TimecodeScale Element . . . . . . . . . . . . . . . . 37 86 7.3.19. Duration Element . . . . . . . . . . . . . . . . . . 37 87 7.3.20. DateUTC Element . . . . . . . . . . . . . . . . . . . 38 88 7.3.21. Title Element . . . . . . . . . . . . . . . . . . . . 38 89 7.3.22. MuxingApp Element . . . . . . . . . . . . . . . . . . 38 90 7.3.23. WritingApp Element . . . . . . . . . . . . . . . . . 39 91 7.3.24. Cluster Element . . . . . . . . . . . . . . . . . . . 39 92 7.3.25. Timecode Element . . . . . . . . . . . . . . . . . . 40 93 7.3.26. SilentTracks Element . . . . . . . . . . . . . . . . 40 94 7.3.27. SilentTrackNumber Element . . . . . . . . . . . . . . 40 95 7.3.28. Position Element . . . . . . . . . . . . . . . . . . 41 96 7.3.29. PrevSize Element . . . . . . . . . . . . . . . . . . 41 97 7.3.30. SimpleBlock Element . . . . . . . . . . . . . . . . . 41 98 7.3.31. BlockGroup Element . . . . . . . . . . . . . . . . . 42 99 7.3.32. Block Element . . . . . . . . . . . . . . . . . . . . 42 100 7.3.33. BlockVirtual Element . . . . . . . . . . . . . . . . 43 101 7.3.34. BlockAdditions Element . . . . . . . . . . . . . . . 43 102 7.3.35. BlockMore Element . . . . . . . . . . . . . . . . . . 43 103 7.3.36. BlockAddID Element . . . . . . . . . . . . . . . . . 44 104 7.3.37. BlockAdditional Element . . . . . . . . . . . . . . . 44 105 7.3.38. BlockDuration Element . . . . . . . . . . . . . . . . 45 106 7.3.39. ReferencePriority Element . . . . . . . . . . . . . . 45 107 7.3.40. ReferenceBlock Element . . . . . . . . . . . . . . . 46 108 7.3.41. ReferenceVirtual Element . . . . . . . . . . . . . . 46 109 7.3.42. CodecState Element . . . . . . . . . . . . . . . . . 46 110 7.3.43. DiscardPadding Element . . . . . . . . . . . . . . . 47 111 7.3.44. Slices Element . . . . . . . . . . . . . . . . . . . 47 112 7.3.45. TimeSlice Element . . . . . . . . . . . . . . . . . . 47 113 7.3.46. LaceNumber Element . . . . . . . . . . . . . . . . . 48 114 7.3.47. FrameNumber Element . . . . . . . . . . . . . . . . . 48 115 7.3.48. BlockAdditionID Element . . . . . . . . . . . . . . . 49 116 7.3.49. Delay Element . . . . . . . . . . . . . . . . . . . . 49 117 7.3.50. SliceDuration Element . . . . . . . . . . . . . . . . 50 118 7.3.51. ReferenceFrame Element . . . . . . . . . . . . . . . 50 119 7.3.52. ReferenceOffset Element . . . . . . . . . . . . . . . 50 120 7.3.53. ReferenceTimeCode Element . . . . . . . . . . . . . . 51 121 7.3.54. EncryptedBlock Element . . . . . . . . . . . . . . . 51 122 7.3.55. Tracks Element . . . . . . . . . . . . . . . . . . . 52 123 7.3.56. TrackEntry Element . . . . . . . . . . . . . . . . . 52 124 7.3.57. TrackNumber Element . . . . . . . . . . . . . . . . . 52 125 7.3.58. TrackUID Element . . . . . . . . . . . . . . . . . . 53 126 7.3.59. TrackType Element . . . . . . . . . . . . . . . . . . 53 127 7.3.60. FlagEnabled Element . . . . . . . . . . . . . . . . . 54 128 7.3.61. FlagDefault Element . . . . . . . . . . . . . . . . . 54 129 7.3.62. FlagForced Element . . . . . . . . . . . . . . . . . 55 130 7.3.63. FlagLacing Element . . . . . . . . . . . . . . . . . 55 131 7.3.64. MinCache Element . . . . . . . . . . . . . . . . . . 56 132 7.3.65. MaxCache Element . . . . . . . . . . . . . . . . . . 56 133 7.3.66. DefaultDuration Element . . . . . . . . . . . . . . . 56 134 7.3.67. DefaultDecodedFieldDuration Element . . . . . . . . . 57 135 7.3.68. TrackTimecodeScale Element . . . . . . . . . . . . . 57 136 7.3.69. TrackOffset Element . . . . . . . . . . . . . . . . . 58 137 7.3.70. MaxBlockAdditionID Element . . . . . . . . . . . . . 58 138 7.3.71. Name Element . . . . . . . . . . . . . . . . . . . . 59 139 7.3.72. Language Element . . . . . . . . . . . . . . . . . . 59 140 7.3.73. LanguageIETF Element . . . . . . . . . . . . . . . . 59 141 7.3.74. CodecID Element . . . . . . . . . . . . . . . . . . . 60 142 7.3.75. CodecPrivate Element . . . . . . . . . . . . . . . . 60 143 7.3.76. CodecName Element . . . . . . . . . . . . . . . . . . 61 144 7.3.77. AttachmentLink Element . . . . . . . . . . . . . . . 61 145 7.3.78. CodecSettings Element . . . . . . . . . . . . . . . . 61 146 7.3.79. CodecInfoURL Element . . . . . . . . . . . . . . . . 62 147 7.3.80. CodecDownloadURL Element . . . . . . . . . . . . . . 62 148 7.3.81. CodecDecodeAll Element . . . . . . . . . . . . . . . 62 149 7.3.82. TrackOverlay Element . . . . . . . . . . . . . . . . 63 150 7.3.83. CodecDelay Element . . . . . . . . . . . . . . . . . 63 151 7.3.84. SeekPreRoll Element . . . . . . . . . . . . . . . . . 64 152 7.3.85. TrackTranslate Element . . . . . . . . . . . . . . . 64 153 7.3.86. TrackTranslateEditionUID Element . . . . . . . . . . 64 154 7.3.87. TrackTranslateCodec Element . . . . . . . . . . . . . 65 155 7.3.88. TrackTranslateTrackID Element . . . . . . . . . . . . 65 156 7.3.89. Video Element . . . . . . . . . . . . . . . . . . . . 66 157 7.3.90. FlagInterlaced Element . . . . . . . . . . . . . . . 66 158 7.3.91. FieldOrder Element . . . . . . . . . . . . . . . . . 66 159 7.3.92. StereoMode Element . . . . . . . . . . . . . . . . . 67 160 7.3.93. AlphaMode Element . . . . . . . . . . . . . . . . . . 67 161 7.3.94. OldStereoMode Element . . . . . . . . . . . . . . . . 68 162 7.3.95. PixelWidth Element . . . . . . . . . . . . . . . . . 68 163 7.3.96. PixelHeight Element . . . . . . . . . . . . . . . . . 68 164 7.3.97. PixelCropBottom Element . . . . . . . . . . . . . . . 69 165 7.3.98. PixelCropTop Element . . . . . . . . . . . . . . . . 69 166 7.3.99. PixelCropLeft Element . . . . . . . . . . . . . . . . 70 167 7.3.100. PixelCropRight Element . . . . . . . . . . . . . . . 70 168 7.3.101. DisplayWidth Element . . . . . . . . . . . . . . . . 70 169 7.3.102. DisplayHeight Element . . . . . . . . . . . . . . . 71 170 7.3.103. DisplayUnit Element . . . . . . . . . . . . . . . . 71 171 7.3.104. AspectRatioType Element . . . . . . . . . . . . . . 72 172 7.3.105. ColourSpace Element . . . . . . . . . . . . . . . . 72 173 7.3.106. GammaValue Element . . . . . . . . . . . . . . . . . 72 174 7.3.107. FrameRate Element . . . . . . . . . . . . . . . . . 73 175 7.3.108. Colour Element . . . . . . . . . . . . . . . . . . . 73 176 7.3.109. MatrixCoefficients Element . . . . . . . . . . . . . 74 177 7.3.110. BitsPerChannel Element . . . . . . . . . . . . . . . 74 178 7.3.111. ChromaSubsamplingHorz Element . . . . . . . . . . . 74 179 7.3.112. ChromaSubsamplingVert Element . . . . . . . . . . . 75 180 7.3.113. CbSubsamplingHorz Element . . . . . . . . . . . . . 75 181 7.3.114. CbSubsamplingVert Element . . . . . . . . . . . . . 76 182 7.3.115. ChromaSitingHorz Element . . . . . . . . . . . . . . 76 183 7.3.116. ChromaSitingVert Element . . . . . . . . . . . . . . 77 184 7.3.117. Range Element . . . . . . . . . . . . . . . . . . . 77 185 7.3.118. TransferCharacteristics Element . . . . . . . . . . 77 186 7.3.119. Primaries Element . . . . . . . . . . . . . . . . . 78 187 7.3.120. MaxCLL Element . . . . . . . . . . . . . . . . . . . 78 188 7.3.121. MaxFALL Element . . . . . . . . . . . . . . . . . . 79 189 7.3.122. MasteringMetadata Element . . . . . . . . . . . . . 79 190 7.3.123. PrimaryRChromaticityX Element . . . . . . . . . . . 79 191 7.3.124. PrimaryRChromaticityY Element . . . . . . . . . . . 80 192 7.3.125. PrimaryGChromaticityX Element . . . . . . . . . . . 80 193 7.3.126. PrimaryGChromaticityY Element . . . . . . . . . . . 80 194 7.3.127. PrimaryBChromaticityX Element . . . . . . . . . . . 81 195 7.3.128. PrimaryBChromaticityY Element . . . . . . . . . . . 81 196 7.3.129. WhitePointChromaticityX Element . . . . . . . . . . 82 197 7.3.130. WhitePointChromaticityY Element . . . . . . . . . . 82 198 7.3.131. LuminanceMax Element . . . . . . . . . . . . . . . . 83 199 7.3.132. LuminanceMin Element . . . . . . . . . . . . . . . . 83 200 7.3.133. Projection Element . . . . . . . . . . . . . . . . . 83 201 7.3.134. ProjectionType Element . . . . . . . . . . . . . . . 84 202 7.3.135. ProjectionPrivate Element . . . . . . . . . . . . . 84 203 7.3.136. ProjectionPoseYaw Element . . . . . . . . . . . . . 85 204 7.3.137. ProjectionPosePitch Element . . . . . . . . . . . . 85 205 7.3.138. ProjectionPoseRoll Element . . . . . . . . . . . . . 86 206 7.3.139. Audio Element . . . . . . . . . . . . . . . . . . . 87 207 7.3.140. SamplingFrequency Element . . . . . . . . . . . . . 87 208 7.3.141. OutputSamplingFrequency Element . . . . . . . . . . 87 209 7.3.142. Channels Element . . . . . . . . . . . . . . . . . . 88 210 7.3.143. ChannelPositions Element . . . . . . . . . . . . . . 88 211 7.3.144. BitDepth Element . . . . . . . . . . . . . . . . . . 89 212 7.3.145. TrackOperation Element . . . . . . . . . . . . . . . 89 213 7.3.146. TrackCombinePlanes Element . . . . . . . . . . . . . 89 214 7.3.147. TrackPlane Element . . . . . . . . . . . . . . . . . 90 215 7.3.148. TrackPlaneUID Element . . . . . . . . . . . . . . . 90 216 7.3.149. TrackPlaneType Element . . . . . . . . . . . . . . . 91 217 7.3.150. TrackJoinBlocks Element . . . . . . . . . . . . . . 91 218 7.3.151. TrackJoinUID Element . . . . . . . . . . . . . . . . 91 219 7.3.152. TrickTrackUID Element . . . . . . . . . . . . . . . 92 220 7.3.153. TrickTrackSegmentUID Element . . . . . . . . . . . . 92 221 7.3.154. TrickTrackFlag Element . . . . . . . . . . . . . . . 93 222 7.3.155. TrickMasterTrackUID Element . . . . . . . . . . . . 93 223 7.3.156. TrickMasterTrackSegmentUID Element . . . . . . . . . 93 224 7.3.157. ContentEncodings Element . . . . . . . . . . . . . . 94 225 7.3.158. ContentEncoding Element . . . . . . . . . . . . . . 94 226 7.3.159. ContentEncodingOrder Element . . . . . . . . . . . . 95 227 7.3.160. ContentEncodingScope Element . . . . . . . . . . . . 95 228 7.3.161. ContentEncodingType Element . . . . . . . . . . . . 96 229 7.3.162. ContentCompression Element . . . . . . . . . . . . . 96 230 7.3.163. ContentCompAlgo Element . . . . . . . . . . . . . . 97 231 7.3.164. ContentCompSettings Element . . . . . . . . . . . . 97 232 7.3.165. ContentEncryption Element . . . . . . . . . . . . . 97 233 7.3.166. ContentEncAlgo Element . . . . . . . . . . . . . . . 98 234 7.3.167. ContentEncKeyID Element . . . . . . . . . . . . . . 98 235 7.3.168. ContentSignature Element . . . . . . . . . . . . . . 99 236 7.3.169. ContentSigKeyID Element . . . . . . . . . . . . . . 99 237 7.3.170. ContentSigAlgo Element . . . . . . . . . . . . . . . 99 238 7.3.171. ContentSigHashAlgo Element . . . . . . . . . . . . . 100 239 7.3.172. Cues Element . . . . . . . . . . . . . . . . . . . . 100 240 7.3.173. CuePoint Element . . . . . . . . . . . . . . . . . . 101 241 7.3.174. CueTime Element . . . . . . . . . . . . . . . . . . 101 242 7.3.175. CueTrackPositions Element . . . . . . . . . . . . . 101 243 7.3.176. CueTrack Element . . . . . . . . . . . . . . . . . . 102 244 7.3.177. CueClusterPosition Element . . . . . . . . . . . . . 102 245 7.3.178. CueRelativePosition Element . . . . . . . . . . . . 102 246 7.3.179. CueDuration Element . . . . . . . . . . . . . . . . 103 247 7.3.180. CueBlockNumber Element . . . . . . . . . . . . . . . 103 248 7.3.181. CueCodecState Element . . . . . . . . . . . . . . . 104 249 7.3.182. CueReference Element . . . . . . . . . . . . . . . . 104 250 7.3.183. CueRefTime Element . . . . . . . . . . . . . . . . . 104 251 7.3.184. CueRefCluster Element . . . . . . . . . . . . . . . 105 252 7.3.185. CueRefNumber Element . . . . . . . . . . . . . . . . 105 253 7.3.186. CueRefCodecState Element . . . . . . . . . . . . . . 106 254 7.3.187. Attachments Element . . . . . . . . . . . . . . . . 106 255 7.3.188. AttachedFile Element . . . . . . . . . . . . . . . . 107 256 7.3.189. FileDescription Element . . . . . . . . . . . . . . 107 257 7.3.190. FileName Element . . . . . . . . . . . . . . . . . . 107 258 7.3.191. FileMimeType Element . . . . . . . . . . . . . . . . 108 259 7.3.192. FileData Element . . . . . . . . . . . . . . . . . . 108 260 7.3.193. FileUID Element . . . . . . . . . . . . . . . . . . 108 261 7.3.194. FileReferral Element . . . . . . . . . . . . . . . . 109 262 7.3.195. FileUsedStartTime Element . . . . . . . . . . . . . 109 263 7.3.196. FileUsedEndTime Element . . . . . . . . . . . . . . 110 264 7.3.197. Chapters Element . . . . . . . . . . . . . . . . . . 110 265 7.3.198. EditionEntry Element . . . . . . . . . . . . . . . . 110 266 7.3.199. EditionUID Element . . . . . . . . . . . . . . . . . 111 267 7.3.200. EditionFlagHidden Element . . . . . . . . . . . . . 111 268 7.3.201. EditionFlagDefault Element . . . . . . . . . . . . . 112 269 7.3.202. EditionFlagOrdered Element . . . . . . . . . . . . . 112 270 7.3.203. ChapterAtom Element . . . . . . . . . . . . . . . . 113 271 7.3.204. ChapterUID Element . . . . . . . . . . . . . . . . . 113 272 7.3.205. ChapterStringUID Element . . . . . . . . . . . . . . 113 273 7.3.206. ChapterTimeStart Element . . . . . . . . . . . . . . 114 274 7.3.207. ChapterTimeEnd Element . . . . . . . . . . . . . . . 114 275 7.3.208. ChapterFlagHidden Element . . . . . . . . . . . . . 115 276 7.3.209. ChapterFlagEnabled Element . . . . . . . . . . . . . 115 277 7.3.210. ChapterSegmentUID Element . . . . . . . . . . . . . 116 278 7.3.211. ChapterSegmentEditionUID Element . . . . . . . . . . 116 279 7.3.212. ChapterPhysicalEquiv Element . . . . . . . . . . . . 117 280 7.3.213. ChapterTrack Element . . . . . . . . . . . . . . . . 117 281 7.3.214. ChapterTrackNumber Element . . . . . . . . . . . . . 117 282 7.3.215. ChapterDisplay Element . . . . . . . . . . . . . . . 118 283 7.3.216. ChapString Element . . . . . . . . . . . . . . . . . 118 284 7.3.217. ChapLanguage Element . . . . . . . . . . . . . . . . 119 285 7.3.218. ChapLanguageIETF Element . . . . . . . . . . . . . . 119 286 7.3.219. ChapCountry Element . . . . . . . . . . . . . . . . 119 287 7.3.220. ChapProcess Element . . . . . . . . . . . . . . . . 120 288 7.3.221. ChapProcessCodecID Element . . . . . . . . . . . . . 120 289 7.3.222. ChapProcessPrivate Element . . . . . . . . . . . . . 121 290 7.3.223. ChapProcessCommand Element . . . . . . . . . . . . . 121 291 7.3.224. ChapProcessTime Element . . . . . . . . . . . . . . 121 292 7.3.225. ChapProcessData Element . . . . . . . . . . . . . . 122 293 7.3.226. Tags Element . . . . . . . . . . . . . . . . . . . . 122 294 7.3.227. Tag Element . . . . . . . . . . . . . . . . . . . . 122 295 7.3.228. Targets Element . . . . . . . . . . . . . . . . . . 123 296 7.3.229. TargetTypeValue Element . . . . . . . . . . . . . . 123 297 7.3.230. TargetType Element . . . . . . . . . . . . . . . . . 124 298 7.3.231. TagTrackUID Element . . . . . . . . . . . . . . . . 124 299 7.3.232. TagEditionUID Element . . . . . . . . . . . . . . . 124 300 7.3.233. TagChapterUID Element . . . . . . . . . . . . . . . 125 301 7.3.234. TagAttachmentUID Element . . . . . . . . . . . . . . 125 302 7.3.235. SimpleTag Element . . . . . . . . . . . . . . . . . 125 303 7.3.236. TagName Element . . . . . . . . . . . . . . . . . . 126 304 7.3.237. TagLanguage Element . . . . . . . . . . . . . . . . 126 305 7.3.238. TagLanguageIETF Element . . . . . . . . . . . . . . 127 306 7.3.239. TagDefault Element . . . . . . . . . . . . . . . . . 127 307 7.3.240. TagString Element . . . . . . . . . . . . . . . . . 128 308 7.3.241. TagBinary Element . . . . . . . . . . . . . . . . . 128 309 8. Beginning of File . . . . . . . . . . . . . . . . . . . . . . 128 310 9. Block Timecodes . . . . . . . . . . . . . . . . . . . . . . . 129 311 10. Default decoded field duration . . . . . . . . . . . . . . . 129 312 11. Default Values . . . . . . . . . . . . . . . . . . . . . . . 130 313 12. DRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 314 13. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 130 315 14. Image cropping . . . . . . . . . . . . . . . . . . . . . . . 130 316 15. Matroska version indicators . . . . . . . . . . . . . . . . . 130 317 16. Mime Types . . . . . . . . . . . . . . . . . . . . . . . . . 131 318 17. Octet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 319 18. Overlay Track . . . . . . . . . . . . . . . . . . . . . . . . 131 320 19. Segment Position . . . . . . . . . . . . . . . . . . . . . . 132 321 19.1. Segment Position Exception . . . . . . . . . . . . . . . 132 322 19.2. Example of Segment Position . . . . . . . . . . . . . . 132 323 20. Raw Timecode . . . . . . . . . . . . . . . . . . . . . . . . 133 324 21. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 133 325 21.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 133 326 21.2. Soft Linking . . . . . . . . . . . . . . . . . . . . . . 134 327 21.3. Medium Linking . . . . . . . . . . . . . . . . . . . . . 134 328 22. Timecode Types . . . . . . . . . . . . . . . . . . . . . . . 135 329 23. TimecodeScale . . . . . . . . . . . . . . . . . . . . . . . . 135 330 24. TimecodeScale Rounding . . . . . . . . . . . . . . . . . . . 135 331 25. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 137 332 25.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 137 333 25.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 137 334 26. TrackTimecodeScale . . . . . . . . . . . . . . . . . . . . . 138 335 27. Unknown elements . . . . . . . . . . . . . . . . . . . . . . 139 336 28. Multi-planar and 3D videos . . . . . . . . . . . . . . . . . 140 337 29. Track Operation . . . . . . . . . . . . . . . . . . . . . . . 140 338 30. Matroska Element Ordering Guidelines . . . . . . . . . . . . 141 339 30.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 141 340 30.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 141 341 30.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 142 342 30.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 142 343 30.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 142 344 30.6. Chapters . . . . . . . . . . . . . . . . . . . . . . . . 142 345 30.7. Attachments . . . . . . . . . . . . . . . . . . . . . . 143 346 30.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 143 347 30.9. Optimum layout from a muxer . . . . . . . . . . . . . . 143 348 30.10. Optimum layout after editing tags . . . . . . . . . . . 143 349 30.11. Optimum layout with Cues at the front . . . . . . . . . 144 350 30.12. Cluster Timecode . . . . . . . . . . . . . . . . . . . . 144 351 31. Codec Mappings . . . . . . . . . . . . . . . . . . . . . . . 144 352 31.1. Defining Matroska Codec Support . . . . . . . . . . . . 145 353 31.1.1. Codec ID . . . . . . . . . . . . . . . . . . . . . . 145 354 31.1.2. Codec Name . . . . . . . . . . . . . . . . . . . . . 145 355 31.1.3. Description . . . . . . . . . . . . . . . . . . . . 146 356 31.1.4. Initialisation . . . . . . . . . . . . . . . . . . . 146 357 31.1.5. Citation . . . . . . . . . . . . . . . . . . . . . . 146 358 31.1.6. Deprecation Date . . . . . . . . . . . . . . . . . . 146 359 31.1.7. Superseded By . . . . . . . . . . . . . . . . . . . 146 360 31.2. Video Codec Mappings . . . . . . . . . . . . . . . . . . 146 361 31.2.1. V_MS/VFW/FOURCC . . . . . . . . . . . . . . . . . . 146 362 31.2.2. V_UNCOMPRESSED . . . . . . . . . . . . . . . . . . . 147 363 31.2.3. V_MPEG4/ISO/SP . . . . . . . . . . . . . . . . . . . 147 364 31.2.4. V_MPEG4/ISO/ASP . . . . . . . . . . . . . . . . . . 147 365 31.2.5. V_MPEG4/ISO/AP . . . . . . . . . . . . . . . . . . . 148 366 31.2.6. V_MPEG4/MS/V3 . . . . . . . . . . . . . . . . . . . 148 367 31.2.7. V_MPEG1 . . . . . . . . . . . . . . . . . . . . . . 148 368 31.2.8. V_MPEG2 . . . . . . . . . . . . . . . . . . . . . . 149 369 31.2.9. V_REAL/RV10 . . . . . . . . . . . . . . . . . . . . 149 370 31.2.10. V_REAL/RV20 . . . . . . . . . . . . . . . . . . . . 149 371 31.2.11. V_REAL/RV30 . . . . . . . . . . . . . . . . . . . . 149 372 31.2.12. V_REAL/RV40 . . . . . . . . . . . . . . . . . . . . 150 373 31.2.13. V_QUICKTIME . . . . . . . . . . . . . . . . . . . . 150 374 31.2.14. V_THEORA . . . . . . . . . . . . . . . . . . . . . . 150 375 31.2.15. V_PRORES . . . . . . . . . . . . . . . . . . . . . . 151 376 31.2.16. V_VP8 . . . . . . . . . . . . . . . . . . . . . . . 151 377 31.2.17. V_VP9 . . . . . . . . . . . . . . . . . . . . . . . 151 378 31.2.18. V_FFV1 . . . . . . . . . . . . . . . . . . . . . . . 152 379 31.3. Audio Codec Mappings . . . . . . . . . . . . . . . . . . 152 380 31.3.1. A_MPEG/L3 . . . . . . . . . . . . . . . . . . . . . 152 381 31.3.2. A_MPEG/L2 . . . . . . . . . . . . . . . . . . . . . 152 382 31.3.3. A_MPEG/L1 . . . . . . . . . . . . . . . . . . . . . 153 383 31.3.4. A_PCM/INT/BIG . . . . . . . . . . . . . . . . . . . 153 384 31.3.5. A_PCM/INT/LIT . . . . . . . . . . . . . . . . . . . 153 385 31.3.6. A_PCM/FLOAT/IEEE . . . . . . . . . . . . . . . . . . 153 386 31.3.7. A_MPC . . . . . . . . . . . . . . . . . . . . . . . 154 387 31.3.8. A_AC3 . . . . . . . . . . . . . . . . . . . . . . . 154 388 31.3.9. A_AC3/BSID9 . . . . . . . . . . . . . . . . . . . . 154 389 31.3.10. A_AC3/BSID10 . . . . . . . . . . . . . . . . . . . . 154 390 31.3.11. A_ALAC . . . . . . . . . . . . . . . . . . . . . . . 155 391 31.3.12. A_DTS . . . . . . . . . . . . . . . . . . . . . . . 155 392 31.3.13. A_DTS/EXPRESS . . . . . . . . . . . . . . . . . . . 155 393 31.3.14. A_DTS/LOSSLESS . . . . . . . . . . . . . . . . . . . 155 394 31.3.15. A_VORBIS . . . . . . . . . . . . . . . . . . . . . . 156 395 31.3.16. A_FLAC . . . . . . . . . . . . . . . . . . . . . . . 156 396 31.3.17. A_REAL/14_4 . . . . . . . . . . . . . . . . . . . . 156 397 31.3.18. A_REAL/28_8 . . . . . . . . . . . . . . . . . . . . 156 398 31.3.19. A_REAL/COOK . . . . . . . . . . . . . . . . . . . . 157 399 31.3.20. A_REAL/SIPR . . . . . . . . . . . . . . . . . . . . 157 400 31.3.21. A_REAL/RALF . . . . . . . . . . . . . . . . . . . . 157 401 31.3.22. A_REAL/ATRC . . . . . . . . . . . . . . . . . . . . 157 402 31.3.23. A_MS/ACM . . . . . . . . . . . . . . . . . . . . . . 158 403 31.3.24. A_AAC/MPEG2/MAIN . . . . . . . . . . . . . . . . . . 158 404 31.3.25. A_AAC/MPEG2/LC . . . . . . . . . . . . . . . . . . . 158 405 31.3.26. A_AAC/MPEG2/LC/SBR . . . . . . . . . . . . . . . . . 158 406 31.3.27. A_AAC/MPEG2/SSR . . . . . . . . . . . . . . . . . . 159 407 31.3.28. A_AAC/MPEG4/MAIN . . . . . . . . . . . . . . . . . . 159 408 31.3.29. A_AAC/MPEG4/LC . . . . . . . . . . . . . . . . . . . 159 409 31.3.30. A_AAC/MPEG4/LC/SBR . . . . . . . . . . . . . . . . . 160 410 31.3.31. A_AAC/MPEG4/SSR . . . . . . . . . . . . . . . . . . 160 411 31.3.32. A_AAC/MPEG4/LTP . . . . . . . . . . . . . . . . . . 160 412 31.3.33. A_QUICKTIME . . . . . . . . . . . . . . . . . . . . 160 413 31.3.34. A_QUICKTIME/QDMC . . . . . . . . . . . . . . . . . . 161 414 31.3.35. A_QUICKTIME/QDM2 . . . . . . . . . . . . . . . . . . 161 415 31.3.36. A_TTA1 . . . . . . . . . . . . . . . . . . . . . . . 161 416 31.3.37. A_WAVPACK4 . . . . . . . . . . . . . . . . . . . . . 162 417 31.4. Subtitle Codec Mappings . . . . . . . . . . . . . . . . 162 418 31.4.1. S_TEXT/UTF8 . . . . . . . . . . . . . . . . . . . . 162 419 31.4.2. S_TEXT/SSA . . . . . . . . . . . . . . . . . . . . . 162 420 31.4.3. S_TEXT/ASS . . . . . . . . . . . . . . . . . . . . . 162 421 31.4.4. S_TEXT/USF . . . . . . . . . . . . . . . . . . . . . 163 422 31.4.5. S_TEXT/WEBVTT . . . . . . . . . . . . . . . . . . . 163 423 31.4.6. S_IMAGE/BMP . . . . . . . . . . . . . . . . . . . . 163 424 31.4.7. S_DVBSUB . . . . . . . . . . . . . . . . . . . . . . 163 425 31.4.8. S_VOBSUB . . . . . . . . . . . . . . . . . . . . . . 163 426 31.4.9. S_HDMV/PGS . . . . . . . . . . . . . . . . . . . . . 164 427 31.4.10. S_HDMV/TEXTST . . . . . . . . . . . . . . . . . . . 164 428 31.4.11. S_KATE . . . . . . . . . . . . . . . . . . . . . . . 164 429 31.5. Button Codec Mappings . . . . . . . . . . . . . . . . . 165 430 31.5.1. B_VOBBTN . . . . . . . . . . . . . . . . . . . . . . 165 431 31.6. Edition and Chapter Flags . . . . . . . . . . . . . . . 165 432 31.6.1. Chapter Flags . . . . . . . . . . . . . . . . . . . 165 433 31.6.2. Edition Flags . . . . . . . . . . . . . . . . . . . 166 435 31.7. Menu features . . . . . . . . . . . . . . . . . . . . . 166 436 31.7.1. Matroska Script (0) . . . . . . . . . . . . . . . . 166 437 31.7.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . 166 438 31.8. Example 1 : basic chaptering . . . . . . . . . . . . . . 168 439 31.9. Example 2 : nested chapters . . . . . . . . . . . . . . 170 440 31.9.1. The Micronauts "Bleep To Bleep" . . . . . . . . . . 170 441 32. Subtitles . . . . . . . . . . . . . . . . . . . . . . . . . . 173 442 33. Images Subtitles . . . . . . . . . . . . . . . . . . . . . . 174 443 34. SRT Subtitles . . . . . . . . . . . . . . . . . . . . . . . . 177 444 35. SSA/ASS Subtitles . . . . . . . . . . . . . . . . . . . . . . 177 445 36. USF Subtitles . . . . . . . . . . . . . . . . . . . . . . . . 180 446 37. WebVTT . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 447 37.1. Storage of WebVTT in Matroska . . . . . . . . . . . . . 181 448 37.1.1. CodecID: codec identification . . . . . . . . . . . 181 449 37.1.2. CodecPrivate: storage of gloal WebVTT blocks . . . . 181 450 37.1.3. Storage of non-global WebVTT blocks . . . . . . . . 181 451 37.1.4. Storage of Cues in Matroska blocks . . . . . . . . . 181 452 37.1.5. BlockAdditions: storing non-global WebVTT blocks, 453 Cue Settings Lists and Cue identifiers . . . . . . . 181 454 37.2. Examples of transformation . . . . . . . . . . . . . . . 182 455 37.2.1. Example WebVTT file . . . . . . . . . . . . . . . . 182 456 37.2.2. CodecPrivate . . . . . . . . . . . . . . . . . . . . 184 457 37.2.3. Storage of Cue 1 . . . . . . . . . . . . . . . . . . 184 458 37.2.4. Storage of Cue 2 . . . . . . . . . . . . . . . . . . 185 459 37.2.5. Storage of Cue 3 . . . . . . . . . . . . . . . . . . 185 460 37.2.6. Storage of Cue 4 . . . . . . . . . . . . . . . . . . 185 461 37.3. Storage of WebVTT in Matroska vs. WebM . . . . . . . . . 185 462 38. HDMV presentation graphics subtitles . . . . . . . . . . . . 186 463 38.1. Storage of HDMV presentation graphics subtitles . . . . 186 464 38.1.1. CodecID & CodecPrivate: codec identification . . . . 186 465 38.1.2. Storage of HDMV PGS Segments in Matroska Blocks . . 186 466 39. HDMV text subtitles . . . . . . . . . . . . . . . . . . . . . 186 467 39.1. Storage of HDMV text subtitles . . . . . . . . . . . . . 187 468 39.1.1. CodecID & CodecPrivate: codec identification . . . . 187 469 39.1.2. Storage of HDMV TextST Dialog Presentation Segments 470 in Matroska Blocks . . . . . . . . . . . . . . . . . 187 471 39.1.3. Character set . . . . . . . . . . . . . . . . . . . 187 472 40. Digital Video Broadcasting (DVB) subtitles . . . . . . . . . 187 473 40.1. Storage of DVB subtitles . . . . . . . . . . . . . . . . 188 474 40.1.1. CodecID . . . . . . . . . . . . . . . . . . . . . . 188 475 40.1.2. CodecPrivate . . . . . . . . . . . . . . . . . . . . 188 476 40.1.3. Storage of DVB subtitles in Matroska Blocks . . . . 188 477 41. Tagging . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 478 41.1. Why official tags matter . . . . . . . . . . . . . . . . 189 479 41.2. Tag translations . . . . . . . . . . . . . . . . . . . . 190 480 41.3. Tag Formatting . . . . . . . . . . . . . . . . . . . . . 190 481 41.4. Target types . . . . . . . . . . . . . . . . . . . . . . 190 482 41.5. Official tags . . . . . . . . . . . . . . . . . . . . . 191 483 41.6. Nesting Information . . . . . . . . . . . . . . . . . . 191 484 41.7. Organization Information . . . . . . . . . . . . . . . . 192 485 41.8. Titles . . . . . . . . . . . . . . . . . . . . . . . . . 192 486 41.9. Nested Information . . . . . . . . . . . . . . . . . . . 193 487 41.10. Entities . . . . . . . . . . . . . . . . . . . . . . . . 193 488 41.11. Search and Classification . . . . . . . . . . . . . . . 195 489 41.12. Temporal Information . . . . . . . . . . . . . . . . . . 197 490 41.13. Spacial Information . . . . . . . . . . . . . . . . . . 197 491 41.14. Personal . . . . . . . . . . . . . . . . . . . . . . . . 198 492 41.15. Technical Information . . . . . . . . . . . . . . . . . 199 493 41.16. Identifiers . . . . . . . . . . . . . . . . . . . . . . 201 494 41.17. Commercial . . . . . . . . . . . . . . . . . . . . . . . 201 495 41.18. Legal . . . . . . . . . . . . . . . . . . . . . . . . . 202 496 41.19. Notes . . . . . . . . . . . . . . . . . . . . . . . . . 202 497 42. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 203 498 42.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 203 499 42.2. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 203 500 42.3. Font files . . . . . . . . . . . . . . . . . . . . . . . 204 501 43. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 502 43.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 204 503 43.2. Recommendations . . . . . . . . . . . . . . . . . . . . 204 504 44. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 205 505 45. File Access . . . . . . . . . . . . . . . . . . . . . . . . . 205 506 46. Live Streaming . . . . . . . . . . . . . . . . . . . . . . . 205 507 47. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 206 508 48. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 206 509 49. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 206 510 49.1. Highlights/Hotspots . . . . . . . . . . . . . . . . . . 206 511 49.2. Playback features . . . . . . . . . . . . . . . . . . . 207 512 49.3. Player requirements . . . . . . . . . . . . . . . . . . 208 513 50. Working Graph . . . . . . . . . . . . . . . . . . . . . . . . 208 514 51. Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 515 52. Data Structure . . . . . . . . . . . . . . . . . . . . . . . 208 516 53. References . . . . . . . . . . . . . . . . . . . . . . . . . 208 517 53.1. Normative References . . . . . . . . . . . . . . . . . . 208 518 53.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 208 519 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 214 521 1. Introduction 523 Matroska aims to become THE standard of multimedia container formats. 524 It was derived from a project called MCF [1], but differentiates from 525 it significantly because it is based on EBML [2] (Extensible Binary 526 Meta Language), a binary derivative of XML. EBML enables significant 527 advantages in terms of future format extensibility, without breaking 528 file support in old parsers. 530 First, it is essential to clarify exactly "What an Audio/Video 531 container is", to avoid any misunderstandings: 533 o It is NOT a video or audio compression format (codec) 535 o It is an envelope for which there can be many audio, video and 536 subtitles streams, allowing the user to store a complete movie or 537 CD in a single file. 539 Matroska is designed with the future in mind. It incorporates 540 features like: 542 o Fast seeking in the file 544 o Chapter entries 546 o Full metadata (tags) support 548 o Selectable subtitle/audio/video streams 550 o Modularly expandable 552 o Error resilience (can recover playback even when the stream is 553 damaged) 555 o Streamable over the internet and local networks (HTTP, CIFS, FTP, 556 etc) 558 o Menus (like DVDs have) 560 Matroska is an open standards project. This means for personal use 561 it is absolutely free to use and that the technical specifications 562 describing the bitstream are open to everybody, even to companies 563 that would like to support it in their products. 565 2. Status of this document 567 This document is a work-in-progress specification defining the 568 Matroska file format as part of the IETF Cellar working group [3]. 569 But since it's quite complete it is used as a reference for the 570 development of libmatroska. Legacy versions of the specification can 571 be found here [4] (PDF doc by Alexander Noe -- outdated). 573 For a simplified diagram of the layout of a Matroska file, see the 574 Diagram page [5]. 576 A more refined and detailed version of the EBML specifications is 577 being worked on here [6]. 579 The table found below is now generated from the "source" of the 580 Matroska specification. This XML file [7] is also used to generate 581 the semantic data used in libmatroska and libmatroska2. We encourage 582 anyone to use and monitor its changes so your code is spec-proof and 583 always up to date. 585 Note that versions 1, 2 and 3 have been finalized. Version 4 is 586 currently work in progress. There MAY be further additions to v4. 588 3. Security Considerations 590 Matroska inherits security considerations from EBML. 592 Attacks on a "Matroska Reader" could include: 594 o Storage of a arbitrary and potentially executable data within an 595 "Attachment Element". "Matroska Readers" that extract or use data 596 from Matroska Attachments SHOULD check that the data adheres to 597 expectations. 599 o A "Matroska Attachment" with an inaccurate mime-type. 601 4. IANA Considerations 603 To be determined. 605 5. Notations and Conventions 607 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 608 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 609 document are to be interpreted as described in RFC 2119 [8]. 611 6. Basis in EBML 613 Matroska is a Document Type of EBML (Extensible Binary Meta 614 Language). This specification is dependent on the EBML Specification 615 [9]. For an understanding of Matroska's EBML Schema, see in 616 particular the sections of the EBML Specification covering EBML 617 Element Types [10], EBML Schema [11], and EBML Structure [12]. 619 6.1. Added Constaints on EBML 621 As an EBML Document Type, Matroska adds the following constraints to 622 the EBML specification. 624 o The "docType" of the "EBML Header" MUST be 'matroska'. 626 o The "EBMLMaxIDLength" of the "EBML Header" MUST be "4". 628 o The "EBMLMaxSizeLength" of the "EBML Header" MUST be "8" or less. 630 6.2. Matroska Design 632 All top-levels elements (Segment and direct sub-elements) are coded 633 on 4 octets, i.e. class D elements. 635 6.2.1. Language Codes 637 Matroska from version 1 through 3 uses language codes that can be 638 either the 3 letters bibliographic ISO-639-2 [13] form (like "fre" 639 for french), or such a language code followed by a dash and a country 640 code for specialities in languages (like "fre-ca" for Canadian 641 French). The "ISO 639-2 Language Elements" are "Language Element", 642 "TagLanguage Element", and "ChapLanguage Element". 644 Starting in Matroska version 4, either "ISO 639-2" or BCP 47 [14] MAY 645 be used, although "BCP 47" is RECOMMENDED. The "BCP 47 Language 646 Elements" are "LanguageIETF Element", "TagLanguageIETF Element", and 647 "ChapLanguageIETF Element". If a "BCP 47 Language Element" and an 648 "ISO 639-2 Language Element" are used within the same "Parent 649 Element", then the "ISO 639-2 Lanaguage Element" MUST be ignored and 650 precedence given to the "BCP 47 Language Element". 652 Country codes are the same as used for internet domains [15]. 654 6.2.2. Physical Types 656 Each level can have different meanings for audio and video. The 657 ORIGINAL_MEDIUM tag can be used to specify a string for 658 ChapterPhysicalEquiv = 60. Here is the list of possible levels for 659 both audio and video : 661 +----------------------+--------------+-----------+-----------------+ 662 | ChapterPhysicalEquiv | Audio | Video | Comment | 663 +----------------------+--------------+-----------+-----------------+ 664 | 70 | SET / | SET / | the collection | 665 | | PACKAGE | PACKAGE | of different | 666 | | | | media | 667 | 60 | CD / 12" / | DVD / VHS | the physical | 668 | | 10" / 7" / | / | medium like a | 669 | | TAPE / | LASERDISC | CD or a DVD | 670 | | MINIDISC / | | | 671 | | DAT | | | 672 | 50 | SIDE | SIDE | when the | 673 | | | | original medium | 674 | | | | (LP/DVD) has | 675 | | | | different sides | 676 | 40 | - | LAYER | another | 677 | | | | physical level | 678 | | | | on DVDs | 679 | 30 | SESSION | SESSION | as found on CDs | 680 | | | | and DVDs | 681 | 20 | TRACK | - | as found on | 682 | | | | audio CDs | 683 | 10 | INDEX | - | the first | 684 | | | | logical level | 685 | | | | of the | 686 | | | | side/medium | 687 +----------------------+--------------+-----------+-----------------+ 689 6.2.3. Block Structure 691 Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets. 693 Bit 0 is the most significant bit. 695 Frames using references SHOULD be stored in "coding order". That 696 means the references first and then the frames referencing them. A 697 consequence is that timecodes MAY NOT be consecutive. But a frame 698 with a past timecode MUST reference a frame already known, otherwise 699 it's considered bad/void. 701 There can be many Blocks in a BlockGroup provided they all have the 702 same timecode. It is used with different parts of a frame with 703 different priorities. 705 6.2.3.1. Block Header 707 +--------+--------+-------------------------------------------------+ 708 | Offset | Player | Description | 709 +--------+--------+-------------------------------------------------+ 710 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 711 | | | like form (1 octet if the value is < 0x80, 2 if | 712 | | | < 0x4000, etc) (most significant bits set to | 713 | | | increase the range). | 714 | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed | 715 | | | int16) | 716 +--------+--------+-------------------------------------------------+ 718 6.2.3.2. Block Header Flags 720 +--------+-----+--------+-------------------------------------------+ 721 | Offset | Bit | Player | Description | 722 +--------+-----+--------+-------------------------------------------+ 723 | 0x03+ | 0-3 | - | Reserved, set to 0 | 724 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 725 | | | | frame but not display it | 726 | 0x03+ | 5-6 | MUST | Lacing | 727 | | | | * 00 : no lacing | 728 | | | | * 01 : Xiph lacing | 729 | | | | * 11 : EBML lacing | 730 | | | | * 10 : fixed-size lacing | 731 | 0x03+ | 7 | - | not used | 732 +--------+-----+--------+-------------------------------------------+ 734 6.2.3.3. Laced Data 736 When lacing bit is set. 738 +--------+--------+-------------------------------------------------+ 739 | Offset | Player | Description | 740 +--------+--------+-------------------------------------------------+ 741 | 0x00 | MUST | Number of frames in the lace-1 (uint8) | 742 | 0x01 / | MUST* | Lace-coded size of each frame of the lace, | 743 | 0xXX | | except for the last one (multiple uint8). *This | 744 | | | is not used with Fixed-size lacing as it is | 745 | | | calculated automatically from (total size of | 746 | | | lace) / (number of frames in lace). | 747 +--------+--------+-------------------------------------------------+ 749 For (possibly) Laced Data 750 +--------+--------+--------------------------+ 751 | Offset | Player | Description | 752 +--------+--------+--------------------------+ 753 | 0x00 | MUST | Consecutive laced frames | 754 +--------+--------+--------------------------+ 756 6.2.4. Lacing 758 Lacing is a mechanism to save space when storing data. It is 759 typically used for small blocks of data (refered to as frames in 760 matroska). There are 3 types of lacing : the Xiph one inspired by 761 what is found in the Ogg container, the EBML one which is the same 762 with sizes coded differently and the fixed-size one where the size is 763 not coded. As an example is better than words... 765 Let's say you want to store 3 frames of the same track. The first 766 frame is 800 octets long, the second is 500 octets long and the third 767 is 1000 octets long. As these data are small, you can store them in 768 a lace to save space. They will then be solved in the same block as 769 follows: 771 6.2.4.1. Xiph lacing 773 o Block head (with lacing bits set to 01) 775 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 776 500 octets one) 778 o Lacing sizes: only the 2 first ones will be coded, 800 gives 779 255;255;255;35, 500 gives 255;245. The size of the last frame is 780 deduced from the total size of the Block. 782 o Data in frame 1 784 o Data in frame 2 786 o Data in frame 3 788 A frame with a size multiple of 255 is coded with a 0 at the end of 789 the size, for example 765 is coded 255;255;255;0. 791 6.2.4.2. EBML lacing 793 In this case the size is not coded as blocks of 255 bytes, but as a 794 difference with the previous size and this size is coded as in EBML. 795 The first size in the lace is unsigned as in EBML. The others use a 796 range shifting to get a sign on each value : 798 +----------------------------------+--------------------------------+ 799 | Bit Representation | Value | 800 +----------------------------------+--------------------------------+ 801 | 1xxx xxxx | value -(2^6-1) to 2^6-1 (ie 0 | 802 | | to 2^7-2 minus 2^6-1, half of | 803 | | the range) | 804 | 01xx xxxx xxxx xxxx | value -(2^13-1) to 2^13-1 | 805 | 001x xxxx xxxx xxxx xxxx xxxx | value -(2^20-1) to 2^20-1 | 806 | 0001 xxxx xxxx xxxx xxxx xxxx | value -(2^27-1) to 2^27-1 | 807 | xxxx xxxx | | 808 | 0000 1xxx xxxx xxxx xxxx xxxx | value -(2^34-1) to 2^34-1 | 809 | xxxx xxxx xxxx xxxx | | 810 | 0000 01xx xxxx xxxx xxxx xxxx | value -(2^41-1) to 2^41-1 | 811 | xxxx xxxx xxxx xxxx xxxx xxxx | | 812 | 0000 001x xxxx xxxx xxxx xxxx | value -(2^48-1) to 2^48-1 | 813 | xxxx xxxx xxxx xxxx xxxx xxxx | | 814 | xxxx xxxx | | 815 +----------------------------------+--------------------------------+ 817 o Block head (with lacing bits set to 11) 819 o Lacing head: Number of frames in the lace -1, i.e. 2 (the 800 and 820 400 octets one) 822 o Lacing sizes: only the 2 first ones will be coded, 800 gives 0x320 823 0x4000 = 0x4320, 500 is coded as -300 : - 0x12C + 0x1FFF + 0x4000 824 = 0x5ED3. The size of the last frame is deduced from the total 825 size of the Block. 827 o Data in frame 1 829 o Data in frame 2 831 o Data in frame 3 833 6.2.4.3. Fixed-size lacing 835 In this case only the number of frames in the lace is saved, the size 836 of each frame is deduced from the total size of the Block. For 837 example, for 3 frames of 800 octets each : 839 o Block head (with lacing bits set to 10) 841 o Lacing head: Number of frames in the lace -1, i.e. 2 843 o Data in frame 1 845 o Data in frame 2 846 o Data in frame 3 848 6.2.4.4. SimpleBlock Structure 850 The SimpleBlock is very inspired by the [Block 851 structure](({{site.baseurl}}/index.html#block-structure). The main 852 differences are the added Keyframe flag and Discardable flag. 853 Otherwise everything is the same. 855 Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets. 857 Bit 0 is the most significant bit. 859 Frames using references SHOULD be stored in "coding order". That 860 means the references first and then the frames referencing them. A 861 consequence is that timecodes MAY NOT be consecutive. But a frame 862 with a past timecode MUST reference a frame already known, otherwise 863 it's considered bad/void. 865 There can be many Blocks in a BlockGroup provided they all have the 866 same timecode. It is used with different parts of a frame with 867 different priorities. 869 6.2.4.4.1. SimpleBlock Header 871 +--------+--------+-------------------------------------------------+ 872 | Offset | Player | Description | 873 +--------+--------+-------------------------------------------------+ 874 | 0x00+ | MUST | Track Number (Track Entry). It is coded in EBML | 875 | | | like form (1 octet if the value is < 0x80, 2 if | 876 | | | < 0x4000, etc) (most significant bits set to | 877 | | | increase the range). | 878 | 0x01+ | MUST | Timecode (relative to Cluster timecode, signed | 879 | | | int16) | 880 +--------+--------+-------------------------------------------------+ 882 6.2.4.4.2. SimpleBlock Header Flags 883 +--------+-----+--------+-------------------------------------------+ 884 | Offset | Bit | Player | Description | 885 +--------+-----+--------+-------------------------------------------+ 886 | 0x03+ | 0 | - | Keyframe, set when the Block contains | 887 | | | | only keyframes | 888 | 0x03+ | 1-3 | - | Reserved, set to 0 | 889 | 0x03+ | 4 | - | Invisible, the codec SHOULD decode this | 890 | | | | frame but not display it | 891 | 0x03+ | 5-6 | MUST | Lacing | 892 | | | | * 00 : no lacing | 893 | | | | * 01 : Xiph lacing | 894 | | | | * 11 : EBML lacing | 895 | | | | * 10 : fixed-size lacing | 896 | 0x03+ | 7 | - | Discardable, the frames of the Block can | 897 | | | | be discarded during playing if needed | 898 +--------+-----+--------+-------------------------------------------+ 900 6.2.4.5. Laced Data 902 When lacing bit is set. 904 +--------+--------+-------------------------------------------------+ 905 | Offset | Player | Description | 906 +--------+--------+-------------------------------------------------+ 907 | 0x00 | MUST | Number of frames in the lace-1 (uint8) | 908 | 0x01 / | MUST* | Lace-coded size of each frame of the lace, | 909 | 0xXX | | except for the last one (multiple uint8). *This | 910 | | | is not used with Fixed-size lacing as it is | 911 | | | calculated automatically from (total size of | 912 | | | lace) / (number of frames in lace). | 913 +--------+--------+-------------------------------------------------+ 915 For (possibly) Laced Data 917 +--------+--------+--------------------------+ 918 | Offset | Player | Description | 919 +--------+--------+--------------------------+ 920 | 0x00 | MUST | Consecutive laced frames | 921 +--------+--------+--------------------------+ 923 7. Matroska Structure 925 A Matroska file is composed of one or many "EBML Documents" that use 926 the "Matroska Document Type". Each "EBML Document" MUST start with 927 an "EBML Header" and then the "Root Element", which is called 928 "Segment" in Matroska. Matroska defines several "Top Level Elements" 929 which MAY occur within the "Segment". 931 As an example, a simple Matroska file consisting of a single "EBML 932 Document" could be represented like this: 934 o EBML Header 936 o Segment 938 A more complex Matroska file consisting of an "EBML Stream" 939 (consisting of two "EBML Documents") could be represented like this: 941 o EBML Header 943 o Segment 945 o EBML Header 947 o Segment 949 The following diagram represents a simple Matroska file, comprised of 950 an "EBML Document" with an "EBML Header", a "Segment Element" (the 951 "Root Element"), and all eight Matroska "Top Level Elements". In the 952 following diagrams of this section, horizontal spacing expresses a 953 parent-child relationship between Matroska Elements (e.g. the "Info 954 Element" is contained within the "Segment Element") whereas vertical 955 alignment represents the storage order within the file. 957 +-------------+ 958 | EBML Header | 959 +---------------------------+ 960 | Segment | SeekHead | 961 | |-------------| 962 | | Info | 963 | |-------------| 964 | | Tracks | 965 | |-------------| 966 | | Chapters | 967 | |-------------| 968 | | Cluster | 969 | |-------------| 970 | | Cues | 971 | |-------------| 972 | | Attachments | 973 | |-------------| 974 | | Tags | 975 +---------------------------+ 977 7.1. Matroska Top Level Elements 979 The Matroska "EBML Schema" defines eight "Top Level Elements": 980 "SeekHead", "Info", "Tracks", "Chapters", "Cluster", "Cues", 981 "Attachments", and "Tags". 983 The "SeekHead Element" (also known as "MetaSeek") contains an index 984 of where other "Top Level Elements" of the "Segment" are located in 985 order to let the parser know where the other major parts of the file 986 are. This element isn't technicaly REQUIRED, but without a "SeekHead 987 Element" a "Matroska Parser" would have to search the entire file to 988 find all of the other "Top Level Elements". This is because Matroska 989 has flexible ordering requirements; for instance, the "Chapters 990 Element" could be stored after the "Cluster Elements". 992 +--------------------------------+ 993 | SeekHead | Seek | SeekID | 994 | | |--------------| 995 | | | SeekPosition | 996 +--------------------------------+ 998 Representation of a SeekHead Element. 1000 The "Info Element" contains vital information for identifying the 1001 whole "Segment". This includes the title for the "Segment", a 1002 randomly generated unique identifier so that the file can be 1003 identified around the world, and if it is part of a series of 1004 "Segments", the unique identifier(s) of any linked "Segments". 1006 +-------------------------+ 1007 | Info | SegmentUID | 1008 | |------------------| 1009 | | SegmentFilename | 1010 | |------------------| 1011 | | PrevUID | 1012 | |------------------| 1013 | | PrevFilename | 1014 | |------------------| 1015 | | NextUID | 1016 | |------------------| 1017 | | NextFilename | 1018 | |------------------| 1019 | | SegmentFamily | 1020 | |------------------| 1021 | | ChapterTranslate | 1022 | |------------------| 1023 | | TimecodeScale | 1024 | |------------------| 1025 | | Duration | 1026 | |------------------| 1027 | | DateUTC | 1028 | |------------------| 1029 | | Title | 1030 | |------------------| 1031 | | MuxingApp | 1032 | |------------------| 1033 | | WritingApp | 1034 |-------------------------| 1036 Representation of a Info Element and its Child Elements. 1038 The "Tracks Elements" tells us the technical details of what is in 1039 each track. For instance, is it a video, audio or subtitle track? 1040 What resolution is the video? What sample rate is the audio? The 1041 "Tracks Elements" can store the name, number, unique identifier, 1042 language, and type (audio, video, subtitles, etc) of each track. The 1043 "Tracks Element" also identifies what codec to use to decode the 1044 track and has the codec's private data for the track. 1046 +------------------------------------+ 1047 | Tracks | TrackEntry | TrackNumber | 1048 | | |--------------| 1049 | | | TrackUID | 1050 | | |--------------| 1051 | | | TrackType | 1052 | | |--------------| 1053 | | | Name | 1054 | | |--------------| 1055 | | | Language | 1056 | | |--------------| 1057 | | | CodecID | 1058 | | |--------------| 1059 | | | CodecPrivate | 1060 | | |--------------| 1061 | | | CodecName | 1062 | | |----------------------------------+ 1063 | | | Video | FlagInterlaced | 1064 | | | |-------------------| 1065 | | | | FieldOrder | 1066 | | | |-------------------| 1067 | | | | StereoMode | 1068 | | | |-------------------| 1069 | | | | AlphaMode | 1070 | | | |-------------------| 1071 | | | | PixelWidth | 1072 | | | |-------------------| 1073 | | | | PixelHeight | 1074 | | | |-------------------| 1075 | | | | DisplayWidth | 1076 | | | |-------------------| 1077 | | | | DisplayHeight | 1078 | | | |-------------------| 1079 | | | | AspectRatioType | 1080 | | | |-------------------| 1081 | | | | Color | 1082 | | |----------------------------------| 1083 | | | Audio | SamplingFrequency | 1084 | | | |-------------------| 1085 | | | | Channels | 1086 | | | |-------------------| 1087 | | | | BitDepth | 1088 |--------------------------------------------------------| 1090 Representation of the Tracks Element and a selection of its 1091 Descendant Elements. 1093 The "Chapters Element" section lists all of the Chapters. Chapters 1094 are a way to set predefined points to jump to in video or audio. 1096 +----------------------------------------------+ 1097 | Chatpers | EditionEntry | EditionUID | 1098 | | |--------------------| 1099 | | | EditionFlagHidden | 1100 | | |--------------------| 1101 | | | EditionFlagDefault | 1102 | | |--------------------| 1103 | | | EditionFlagOrdered | 1104 | | |----------------------------------------+ 1105 | | | ChapterAtom | ChapterUID | 1106 | | | |-------------------| 1107 | | | | ChapterStringUID | 1108 | | | |-------------------| 1109 | | | | ChapterTimeStart | 1110 | | | |-------------------| 1111 | | | | ChapterTimeEnd | 1112 | | | |-------------------| 1113 | | | | ChapterFlagHidden | 1114 | | | |----------------------------------+ 1115 | | | | ChapterDisplay | ChapString | 1116 | | | | |--------------| 1117 | | | | | ChapLanguage | 1118 +---------------------------------------------------------------------------------+ 1120 Representation of the Chapters Element and a selection of its 1121 Descendant Elements. 1123 The "Cluster Elements" contain all of the video frames and audio for 1124 each track. In a given Matroska file, there are usually many 1125 "Cluster Elements". The Clusters help to break up the "SimpleBlock" 1126 or "BlockGroup Elements" and help with seeking and error protection. 1127 It is RECOMMENDED the size of each individual "Cluster Element" be 1128 limited to store no more than 5 seconds or 5 megabytes. Every 1129 Cluster contains a timecode, usually the timecode that the first 1130 Block in the Cluster SHOULD be played back, but it doesn't have to 1131 be. Then there are one or more (usually many more) "BlockGroups" or 1132 "SimpleBlocks" in each Cluster. A BlockGroup can contain a Block of 1133 data, and any information relating directly to that Block. 1135 +--------------------------+ 1136 | Cluster | Timecode | 1137 | |----------------| 1138 | | SilentTracks | 1139 | |----------------| 1140 | | Position | 1141 | |----------------| 1142 | | PrevSize | 1143 | |----------------| 1144 | | SimpleBlock | 1145 | |----------------| 1146 | | BlockGroup | 1147 | |----------------| 1148 | | EncryptedBlock | 1149 +--------------------------+ 1151 Representation of a Cluster Element and its immediate Child Elements. 1153 Below is a representation of the Block structure. 1155 o Portion of Block 1157 * Data Type 1159 + Bit Flag 1161 o Header 1163 * TrackNumber 1165 * Timecode 1167 * Flags 1169 * Gap 1171 * Lacing 1173 * Reserved 1175 o Optional 1177 * FrameSize 1179 o Data 1181 * Frame 1183 Although the Timecode value is stored once per Cluster, another 1184 timecode is stored within the Block structure itself. The way this 1185 works is that the Timecode in the Cluster is relative to the entire 1186 "Segment". It is usually the Timecode that the first Block in the 1187 Cluster needs to be played at. The Timecode in the Block itself is 1188 relative to the Timecode in the Cluster. For example, let's say that 1189 the Timecode in the Cluster is set to 10 seconds, and you have a 1190 Block in that Cluster that is supposed to be played 12 seconds into 1191 the clip; this means that the Timecode in the Block would be set to 2 1192 seconds. 1194 The "ReferenceBlock" in the BlockGroup, is used instead of the basic 1195 "P-frame"/"B-frame" description. Instead of simply saying that this 1196 Block depends on the Block directly before, or directly afterwards, 1197 we put the timecode of the needed Block. And because you can have as 1198 many "ReferenceBlock Elements" as you want for a Block, it allows for 1199 some extremely complex referencing. 1201 The "Cues Element" is used to seek when playing back a file by 1202 providing a temporal index for each of the tracks. It is similar to 1203 the "SeekHead Element", but this is used for seeking to a specific 1204 time when playing back the file. Without this it is possible to 1205 seek, but it is much more difficult because the player has to 'hunt 1206 and peck' through the file looking for the correct timecode. "Cues" 1207 contains "CuePoint Elements" which store the timecode ("CueTime") and 1208 then a listing for the exact position in the file for each of the 1209 tracks for that timecode. The "Cues" are pretty flexible for what 1210 exactly you want to index. For instance, you can index every single 1211 timecode of every "Block" or index selectively. If you have a video 1212 file, it is RECOMMENDED to index at least the keyframes of the video 1213 track. 1215 +-------------------------------------+ 1216 | Cues | CuePoint | CueTime | 1217 | | |-------------------| 1218 | | | CueTrackPositions | 1219 | |------------------------------| 1220 | | CuePoint | CueTime | 1221 | | |-------------------| 1222 | | | CueTrackPositions | 1223 +-------------------------------------+ 1225 Representation of a Cues Element and two levels of its Descendant 1226 Elements. 1228 The "Attachments Element" is for attaching files to a Matroska file 1229 such as pictures, webpages, programs, or even the codec needed to 1230 play back the file. 1232 +------------------------------------------------+ 1233 | Attachments | AttachedFile | FileDescription | 1234 | | |-------------------| 1235 | | | FileName | 1236 | | |-------------------| 1237 | | | FileMimeType | 1238 | | |-------------------| 1239 | | | FileData | 1240 | | |-------------------| 1241 | | | FileUID | 1242 | | |-------------------| 1243 | | | FileName | 1244 | | |-------------------| 1245 | | | FileReferral | 1246 | | |-------------------| 1247 | | | FileUsedStartTime | 1248 | | |-------------------| 1249 | | | FileUsedEndTime | 1250 +------------------------------------------------+ 1252 Representation of a Attachments Element. 1254 The "Tags Element" contains metadata that describes the "Segment" and 1255 potentially its "Tracks", "Chapters", and "Attachments". Each Track 1256 or Chapter that those tags applies to has its UID listed in the tags. 1257 The Tags contain all extra information about the file, script writer, 1258 singer, actors, directors, titles, edition, price, dates, genre, 1259 comments, etc. And it allows you to enter many of these (title, 1260 edition, comments, etc.) in different languages. 1262 +-------------------------------------------+ 1263 | Tags | Tag | Targets | TargetTypeValue | 1264 | | | |------------------| 1265 | | | | TargetType | 1266 | | | |------------------| 1267 | | | | TagTrackUID | 1268 | | | |------------------| 1269 | | | | TagEditionUID | 1270 | | | |------------------| 1271 | | | | TagChapterUID | 1272 | | | |------------------| 1273 | | | | TagAttachmentUID | 1274 | | |------------------------------| 1275 | | | SimpleTag | TagName | 1276 | | | |------------------| 1277 | | | | TagLanguage | 1278 | | | |------------------| 1279 | | | | TagDefault | 1280 | | | |------------------| 1281 | | | | TagString | 1282 | | | |------------------| 1283 | | | | TagBinary | 1284 | | | |------------------| 1285 | | | | SimpleTag | 1286 +-------------------------------------------+ 1288 Representation of a Tags Element and three levels of its Children 1289 Elements. # Matroska Schema 1291 This specification includes an "EBML Schema" which defines the 1292 Elements and structure of Matroska as an EBML Document Type. The 1293 EBML Schema defines every valid Matroska element in a manner defined 1294 by the EBML specification. 1296 7.2. Matroska Additions to Schema Element Attributes 1298 In addition to the EBML Schema definition provided by the EBML 1299 Specification, Matroska adds the following additional attributes: 1301 +-----------+----------+--------------------------------------------+ 1302 | attribute | required | definition | 1303 | name | | | 1304 +-----------+----------+--------------------------------------------+ 1305 | webm | No | A boolean to express if the Matroska | 1306 | | | Element is also supported within version 2 | 1307 | | | of the "webm" specification. Please | 1308 | | | consider the webm specification [16] as | 1309 | | | the authoritative on "webm". | 1310 +-----------+----------+--------------------------------------------+ 1312 7.3. Matroska Schema 1314 Here the definition of each Matroska Element is provided. 1316 % concatenate with Matroska EBML Schema converted to markdown % 1318 7.3.1. Segment Element 1320 name: "Segment" 1322 path: "1*1(\Segment)" 1324 id: "0x18538067" 1326 minOccurs: "1" 1328 maxOccurs: "1" 1330 type: "master" 1332 unknownsizeallowed: "1" 1334 minver: "1" 1336 documentation: The Root Element that contains all other Top-Level 1337 Elements (Elements defined only at Level 1). A Matroska file is 1338 composed of 1 Segment. 1340 7.3.2. SeekHead Element 1342 name: "SeekHead" 1344 path: "0*2(\Segment\SeekHead)" 1346 id: "0x114D9B74" 1348 maxOccurs: "2" 1349 type: "master" 1351 minver: "1" 1353 documentation: Contains the Segment Position of other Top-Level 1354 Elements. 1356 7.3.3. Seek Element 1358 name: "Seek" 1360 path: "1*(\Segment\SeekHead\Seek)" 1362 id: "0x4DBB" 1364 minOccurs: "1" 1366 type: "master" 1368 minver: "1" 1370 documentation: Contains a single seek entry to an EBML Element. 1372 7.3.4. SeekID Element 1374 name: "SeekID" 1376 path: "1*1(\Segment\SeekHead\Seek\SeekID)" 1378 id: "0x53AB" 1380 minOccurs: "1" 1382 maxOccurs: "1" 1384 type: "binary" 1386 minver: "1" 1388 documentation: The binary ID corresponding to the Element name. 1390 7.3.5. SeekPosition Element 1392 name: "SeekPosition" 1394 path: "1*1(\Segment\SeekHead\Seek\SeekPosition)" 1396 id: "0x53AC" 1397 minOccurs: "1" 1399 maxOccurs: "1" 1401 type: "uinteger" 1403 minver: "1" 1405 documentation: The Segment Position of the Element. 1407 7.3.6. Info Element 1409 name: "Info" 1411 path: "1*(\Segment\Info)" 1413 id: "0x1549A966" 1415 minOccurs: "1" 1417 type: "master" 1419 minver: "1" 1421 definition: Contains general information about the Segment. 1423 7.3.7. SegmentUID Element 1425 name: "SegmentUID" 1427 path: "0*1(\Segment\Info\SegmentUID)" 1429 id: "0x73A4" 1431 maxOccurs: "1" 1433 range: "not 0" 1435 size: "16" 1437 type: "binary" 1439 minver: "1" 1441 definition: A randomly generated unique ID to identify the Segment 1442 amongst many others (128 bits). 1444 usage notes: If the Segment is a part of a Linked Segment then this 1445 Element is REQUIRED. 1447 7.3.8. SegmentFilename Element 1449 name: "SegmentFilename" 1451 path: "0*1(\Segment\Info\SegmentFilename)" 1453 id: "0x7384" 1455 maxOccurs: "1" 1457 type: "utf-8" 1459 minver: "1" 1461 definition: A filename corresponding to this Segment. 1463 7.3.9. PrevUID Element 1465 name: "PrevUID" 1467 path: "0*1(\Segment\Info\PrevUID)" 1469 id: "0x3CB923" 1471 maxOccurs: "1" 1473 size: "16" 1475 type: "binary" 1477 minver: "1" 1479 definition: A unique ID to identify the previous Segment of a Linked 1480 Segment (128 bits). 1482 usage notes: If the Segment is a part of a Linked Segment that uses 1483 Hard Linking then either the PrevUID or the NextUID Element is 1484 REQUIRED. If a Segment contains a PrevUID but not a NextUID then it 1485 MAY be considered as the last Segment of the Linked Segment. The 1486 PrevUID MUST NOT be equal to the SegmentUID. 1488 7.3.10. PrevFilename Element 1490 name: "PrevFilename" 1492 path: "0*1(\Segment\Info\PrevFilename)" 1494 id: "0x3C83AB" 1496 maxOccurs: "1" 1498 type: "utf-8" 1500 minver: "1" 1502 definition: A filename corresponding to the file of the previous 1503 Linked Segment. 1505 usage notes: Provision of the previous filename is for display 1506 convenience, but PrevUID SHOULD be considered authoritative for 1507 identifying the previous Segment in a Linked Segment. 1509 7.3.11. NextUID Element 1511 name: "NextUID" 1513 path: "0*1(\Segment\Info\NextUID)" 1515 id: "0x3EB923" 1517 maxOccurs: "1" 1519 size: "16" 1521 type: "binary" 1523 minver: "1" 1525 definition: A unique ID to identify the next Segment of a Linked 1526 Segment (128 bits). 1528 usage notes: If the Segment is a part of a Linked Segment that uses 1529 Hard Linking then either the PrevUID or the NextUID Element is 1530 REQUIRED. If a Segment contains a NextUID but not a PrevUID then it 1531 MAY be considered as the first Segment of the Linked Segment. The 1532 NextUID MUST NOT be equal to the SegmentUID. 1534 7.3.12. NextFilename Element 1536 name: "NextFilename" 1538 path: "0*1(\Segment\Info\NextFilename)" 1540 id: "0x3E83BB" 1542 maxOccurs: "1" 1544 type: "utf-8" 1546 minver: "1" 1548 definition: A filename corresponding to the file of the next Linked 1549 Segment. 1551 usage notes: Provision of the next filename is for display 1552 convenience, but NextUID SHOULD be considered authoritative for 1553 identifying the Next Segment. 1555 7.3.13. SegmentFamily Element 1557 name: "SegmentFamily" 1559 path: "0*(\Segment\Info\SegmentFamily)" 1561 id: "0x4444" 1563 size: "16" 1565 type: "binary" 1567 minver: "1" 1569 definition: A randomly generated unique ID that all Segments of a 1570 Linked Segment MUST share (128 bits). 1572 usage notes: If the Segment is a part of a Linked Segment that uses 1573 Soft Linking then this Element is REQUIRED. 1575 7.3.14. ChapterTranslate Element 1577 name: "ChapterTranslate" 1579 path: "0*(\Segment\Info\ChapterTranslate)" 1581 id: "0x6924" 1582 type: "master" 1584 minver: "1" 1586 documentation: A tuple of corresponding ID used by chapter codecs to 1587 represent this Segment. 1589 7.3.15. ChapterTranslateEditionUID Element 1591 name: "ChapterTranslateEditionUID" 1593 path: "0*(\Segment\Info\ChapterTranslate\ChapterTranslateEditionUID)" 1595 id: "0x69FC" 1597 type: "uinteger" 1599 minver: "1" 1601 documentation: Specify an edition UID on which this correspondance 1602 applies. When not specified, it means for all editions found in the 1603 Segment. 1605 7.3.16. ChapterTranslateCodec Element 1607 name: "ChapterTranslateCodec" 1609 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateCodec)" 1611 id: "0x69BF" 1613 minOccurs: "1" 1615 maxOccurs: "1" 1617 type: "uinteger" 1619 minver: "1" 1621 documentation: The chapter codec 1623 7.3.17. ChapterTranslateID Element 1625 name: "ChapterTranslateID" 1627 path: "1*1(\Segment\Info\ChapterTranslate\ChapterTranslateID)" 1629 id: "0x69A5" 1630 minOccurs: "1" 1632 maxOccurs: "1" 1634 type: "binary" 1636 minver: "1" 1638 documentation: The binary value used to represent this Segment in the 1639 chapter codec data. The format depends on the ChapProcessCodecID 1640 used. 1642 7.3.18. TimecodeScale Element 1644 name: "TimecodeScale" 1646 path: "1*1(\Segment\Info\TimecodeScale)" 1648 id: "0x2AD7B1" 1650 minOccurs: "1" 1652 maxOccurs: "1" 1654 range: "not 0" 1656 default: "1000000" 1658 type: "uinteger" 1660 minver: "1" 1662 documentation: Timestamp scale in nanoseconds (1.000.000 means all 1663 timestamps in the Segment are expressed in milliseconds). 1665 7.3.19. Duration Element 1667 name: "Duration" 1669 path: "0*1(\Segment\Info\Duration)" 1671 id: "0x4489" 1673 maxOccurs: "1" 1675 range: "> 0x0p+0" 1677 type: "float" 1678 minver: "1" 1680 definition: Duration of the Segment in nanoseconds based on 1681 TimecodeScale. 1683 7.3.20. DateUTC Element 1685 name: "DateUTC" 1687 path: "0*1(\Segment\Info\DateUTC)" 1689 id: "0x4461" 1691 maxOccurs: "1" 1693 type: "date" 1695 minver: "1" 1697 documentation: The date and time that the Segment was created by the 1698 muxing application or library. 1700 7.3.21. Title Element 1702 name: "Title" 1704 path: "0*1(\Segment\Info\Title)" 1706 id: "0x7BA9" 1708 maxOccurs: "1" 1710 type: "utf-8" 1712 minver: "1" 1714 documentation: General name of the Segment. 1716 7.3.22. MuxingApp Element 1718 name: "MuxingApp" 1720 path: "1*1(\Segment\Info\MuxingApp)" 1722 id: "0x4D80" 1724 minOccurs: "1" 1725 maxOccurs: "1" 1727 type: "utf-8" 1729 minver: "1" 1731 definition: Muxing application or library (example: "libmatroska- 1732 0.4.3"). 1734 usage notes: Include the full name of the application or library 1735 followed by the version number. 1737 7.3.23. WritingApp Element 1739 name: "WritingApp" 1741 path: "1*1(\Segment\Info\WritingApp)" 1743 id: "0x5741" 1745 minOccurs: "1" 1747 maxOccurs: "1" 1749 type: "utf-8" 1751 minver: "1" 1753 definition: Writing application (example: "mkvmerge-0.3.3"). 1755 usage notes: Include the full name of the application followed by the 1756 version number. 1758 7.3.24. Cluster Element 1760 name: "Cluster" 1762 path: "0*(\Segment\Cluster)" 1764 id: "0x1F43B675" 1766 type: "master" 1768 unknownsizeallowed: "1" 1770 minver: "1" 1771 documentation: The Top-Level Element containing the (monolithic) 1772 Block structure. 1774 7.3.25. Timecode Element 1776 name: "Timecode" 1778 path: "1*1(\Segment\Cluster\Timecode)" 1780 id: "0xE7" 1782 minOccurs: "1" 1784 maxOccurs: "1" 1786 type: "uinteger" 1788 minver: "1" 1790 documentation: Absolute timestamp of the cluster (based on 1791 TimecodeScale). 1793 7.3.26. SilentTracks Element 1795 name: "SilentTracks" 1797 path: "0*1(\Segment\Cluster\SilentTracks)" 1799 id: "0x5854" 1801 maxOccurs: "1" 1803 type: "master" 1805 minver: "1" 1807 documentation: The list of tracks that are not used in that part of 1808 the stream. It is useful when using overlay tracks on seeking or to 1809 decide what track to use. 1811 7.3.27. SilentTrackNumber Element 1813 name: "SilentTrackNumber" 1815 path: "0*(\Segment\Cluster\SilentTracks\SilentTrackNumber)" 1817 id: "0x58D7" 1818 type: "uinteger" 1820 minver: "1" 1822 documentation: One of the track number that are not used from now on 1823 in the stream. It could change later if not specified as silent in a 1824 further Cluster. 1826 7.3.28. Position Element 1828 name: "Position" 1830 path: "0*1(\Segment\Cluster\Position)" 1832 id: "0xA7" 1834 maxOccurs: "1" 1836 type: "uinteger" 1838 minver: "1" 1840 documentation: The Segment Position of the Cluster in the Segment (0 1841 in live broadcast streams). It might help to resynchronise offset on 1842 damaged streams. 1844 7.3.29. PrevSize Element 1846 name: "PrevSize" 1848 path: "0*1(\Segment\Cluster\PrevSize)" 1850 id: "0xAB" 1852 maxOccurs: "1" 1854 type: "uinteger" 1856 minver: "1" 1858 documentation: Size of the previous Cluster, in octets. Can be 1859 useful for backward playing. 1861 7.3.30. SimpleBlock Element 1863 name: "SimpleBlock" 1865 path: "0*(\Segment\Cluster\SimpleBlock)" 1866 id: "0xA3" 1868 type: "binary" 1870 minver: "2" 1872 documentation: Similar to Block but without all the extra 1873 information, mostly used to reduced overhead when no extra feature is 1874 needed. (see SimpleBlock Structure) 1876 7.3.31. BlockGroup Element 1878 name: "BlockGroup" 1880 path: "0*(\Segment\Cluster\BlockGroup)" 1882 id: "0xA0" 1884 type: "master" 1886 minver: "1" 1888 documentation: Basic container of information containing a single 1889 Block and information specific to that Block. 1891 7.3.32. Block Element 1893 name: "Block" 1895 path: "1*1(\Segment\Cluster\BlockGroup\Block)" 1897 id: "0xA1" 1899 minOccurs: "1" 1901 maxOccurs: "1" 1903 type: "binary" 1905 minver: "1" 1907 documentation: Block containing the actual data to be rendered and a 1908 timestamp relative to the Cluster Timecode. (see Block Structure) 1910 7.3.33. BlockVirtual Element 1912 name: "BlockVirtual" 1914 path: "0*1(\Segment\Cluster\BlockGroup\BlockVirtual)" 1916 id: "0xA2" 1918 maxOccurs: "1" 1920 type: "binary" 1922 minver: "0" 1924 maxver: "0" 1926 documentation: A Block with no data. It MUST be stored in the stream 1927 at the place the real Block would be in display order. (see Block 1928 Virtual) 1930 7.3.34. BlockAdditions Element 1932 name: "BlockAdditions" 1934 path: "0*1(\Segment\Cluster\BlockGroup\BlockAdditions)" 1936 id: "0x75A1" 1938 maxOccurs: "1" 1940 type: "master" 1942 minver: "1" 1944 documentation: Contain additional blocks to complete the main one. 1945 An EBML parser that has no knowledge of the Block structure could 1946 still see and use/skip these data. 1948 7.3.35. BlockMore Element 1950 name: "BlockMore" 1952 path: "1*(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore)" 1954 id: "0xA6" 1956 minOccurs: "1" 1957 type: "master" 1959 minver: "1" 1961 documentation: Contain the BlockAdditional and some parameters. 1963 7.3.36. BlockAddID Element 1965 name: "BlockAddID" 1967 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1968 AddID)" 1970 id: "0xEE" 1972 minOccurs: "1" 1974 maxOccurs: "1" 1976 range: "not 0" 1978 default: "1" 1980 type: "uinteger" 1982 minver: "1" 1984 documentation: An ID to identify the BlockAdditional level. 1986 7.3.37. BlockAdditional Element 1988 name: "BlockAdditional" 1990 path: "1*1(\Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\Block 1991 Additional)" 1993 id: "0xA5" 1995 minOccurs: "1" 1997 maxOccurs: "1" 1999 type: "binary" 2001 minver: "1" 2003 documentation: Interpreted by the codec as it wishes (using the 2004 BlockAddID). 2006 7.3.38. BlockDuration Element 2008 name: "BlockDuration" 2010 path: "0*1(\Segment\Cluster\BlockGroup\BlockDuration)" 2012 id: "0x9B" 2014 maxOccurs: "1" 2016 default: "DefaultDuration" 2018 type: "uinteger" 2020 minver: "1" 2022 documentation: The duration of the Block (based on TimecodeScale). 2023 This Element is mandatory when DefaultDuration is set for the track 2024 (but can be omitted as other default values). When not written and 2025 with no DefaultDuration, the value is assumed to be the difference 2026 between the timestamp of this Block and the timestamp of the next 2027 Block in "display" order (not coding order). This Element can be 2028 useful at the end of a Track (as there is not other Block available), 2029 or when there is a break in a track like for subtitle tracks. When 2030 set to 0 that means the frame is not a keyframe. 2032 7.3.39. ReferencePriority Element 2034 name: "ReferencePriority" 2036 path: "1*1(\Segment\Cluster\BlockGroup\ReferencePriority)" 2038 id: "0xFA" 2040 minOccurs: "1" 2042 maxOccurs: "1" 2044 default: "0" 2046 type: "uinteger" 2048 minver: "1" 2050 documentation: This frame is referenced and has the specified cache 2051 priority. In cache only a frame of the same or higher priority can 2052 replace this frame. A value of 0 means the frame is not referenced. 2054 7.3.40. ReferenceBlock Element 2056 name: "ReferenceBlock" 2058 path: "0*(\Segment\Cluster\BlockGroup\ReferenceBlock)" 2060 id: "0xFB" 2062 type: "integer" 2064 minver: "1" 2066 documentation: Timestamp of another frame used as a reference (ie: B 2067 or P frame). The timestamp is relative to the block it's attached 2068 to. 2070 7.3.41. ReferenceVirtual Element 2072 name: "ReferenceVirtual" 2074 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceVirtual)" 2076 id: "0xFD" 2078 maxOccurs: "1" 2080 type: "integer" 2082 minver: "0" 2084 maxver: "0" 2086 documentation: The Segment Position of the data that would otherwise 2087 be in position of the virtual block. 2089 7.3.42. CodecState Element 2091 name: "CodecState" 2093 path: "0*1(\Segment\Cluster\BlockGroup\CodecState)" 2095 id: "0xA4" 2097 maxOccurs: "1" 2099 type: "binary" 2101 minver: "2" 2102 documentation: The new codec state to use. Data interpretation is 2103 private to the codec. This information SHOULD always be referenced 2104 by a seek entry. 2106 7.3.43. DiscardPadding Element 2108 name: "DiscardPadding" 2110 path: "0*1(\Segment\Cluster\BlockGroup\DiscardPadding)" 2112 id: "0x75A2" 2114 maxOccurs: "1" 2116 type: "integer" 2118 minver: "4" 2120 documentation: Duration in nanoseconds of the silent data added to 2121 the Block (padding at the end of the Block for positive value, at the 2122 beginning of the Block for negative value). The duration of 2123 DiscardPadding is not calculated in the duration of the TrackEntry 2124 and SHOULD be discarded during playback. 2126 7.3.44. Slices Element 2128 name: "Slices" 2130 path: "0*1(\Segment\Cluster\BlockGroup\Slices)" 2132 id: "0x8E" 2134 maxOccurs: "1" 2136 type: "master" 2138 minver: "1" 2140 documentation: Contains slices description. 2142 7.3.45. TimeSlice Element 2144 name: "TimeSlice" 2146 path: "0*(\Segment\Cluster\BlockGroup\Slices\TimeSlice)" 2148 id: "0xE8" 2149 type: "master" 2151 minver: "1" 2153 maxver: "1" 2155 documentation: Contains extra time information about the data 2156 contained in the Block. Being able to interpret this Element is not 2157 REQUIRED for playback. 2159 7.3.46. LaceNumber Element 2161 name: "LaceNumber" 2163 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\LaceNumber)" 2165 id: "0xCC" 2167 maxOccurs: "1" 2169 default: "0" 2171 type: "uinteger" 2173 minver: "1" 2175 maxver: "1" 2177 documentation: The reverse number of the frame in the lace (0 is the 2178 last frame, 1 is the next to last, etc). Being able to interpret 2179 this Element is not REQUIRED for playback. 2181 7.3.47. FrameNumber Element 2183 name: "FrameNumber" 2185 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\FrameNumber)" 2187 id: "0xCD" 2189 maxOccurs: "1" 2191 default: "0" 2193 type: "uinteger" 2195 minver: "0" 2196 maxver: "0" 2198 documentation: The number of the frame to generate from this lace 2199 with this delay (allow you to generate many frames from the same 2200 Block/Frame). 2202 7.3.48. BlockAdditionID Element 2204 name: "BlockAdditionID" 2206 path: 2207 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\BlockAdditionID)" 2209 id: "0xCB" 2211 maxOccurs: "1" 2213 default: "0" 2215 type: "uinteger" 2217 minver: "0" 2219 maxver: "0" 2221 documentation: The ID of the BlockAdditional Element (0 is the main 2222 Block). 2224 7.3.49. Delay Element 2226 name: "Delay" 2228 path: "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\Delay)" 2230 id: "0xCE" 2232 maxOccurs: "1" 2234 default: "0" 2236 type: "uinteger" 2238 minver: "0" 2240 maxver: "0" 2242 documentation: The (scaled) delay to apply to the Element. 2244 7.3.50. SliceDuration Element 2246 name: "SliceDuration" 2248 path: 2249 "0*1(\Segment\Cluster\BlockGroup\Slices\TimeSlice\SliceDuration)" 2251 id: "0xCF" 2253 maxOccurs: "1" 2255 default: "0" 2257 type: "uinteger" 2259 minver: "0" 2261 maxver: "0" 2263 documentation: The (scaled) duration to apply to the Element. 2265 7.3.51. ReferenceFrame Element 2267 name: "ReferenceFrame" 2269 path: "0*1(\Segment\Cluster\BlockGroup\ReferenceFrame)" 2271 id: "0xC8" 2273 maxOccurs: "1" 2275 type: "master" 2277 minver: "0" 2279 maxver: "0" 2281 documentation: DivX trick track extensions 2283 7.3.52. ReferenceOffset Element 2285 name: "ReferenceOffset" 2287 path: 2288 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceOffset)" 2290 id: "0xC9" 2291 minOccurs: "1" 2293 maxOccurs: "1" 2295 type: "uinteger" 2297 minver: "0" 2299 maxver: "0" 2301 documentation: DivX trick track extensions 2303 7.3.53. ReferenceTimeCode Element 2305 name: "ReferenceTimeCode" 2307 path: 2308 "1*1(\Segment\Cluster\BlockGroup\ReferenceFrame\ReferenceTimeCode)" 2310 id: "0xCA" 2312 minOccurs: "1" 2314 maxOccurs: "1" 2316 type: "uinteger" 2318 minver: "0" 2320 maxver: "0" 2322 documentation: DivX trick track extensions 2324 7.3.54. EncryptedBlock Element 2326 name: "EncryptedBlock" 2328 path: "0*(\Segment\Cluster\EncryptedBlock)" 2330 id: "0xAF" 2332 type: "binary" 2334 minver: "0" 2336 maxver: "0" 2337 documentation: Similar to SimpleBlock but the data inside the Block 2338 are Transformed (encrypt and/or signed). (see EncryptedBlock 2339 Structure) 2341 7.3.55. Tracks Element 2343 name: "Tracks" 2345 path: "0*(\Segment\Tracks)" 2347 id: "0x1654AE6B" 2349 type: "master" 2351 minver: "1" 2353 documentation: A Top-Level Element of information with many tracks 2354 described. 2356 7.3.56. TrackEntry Element 2358 name: "TrackEntry" 2360 path: "1*(\Segment\Tracks\TrackEntry)" 2362 id: "0xAE" 2364 minOccurs: "1" 2366 type: "master" 2368 minver: "1" 2370 documentation: Describes a track with all Elements. 2372 7.3.57. TrackNumber Element 2374 name: "TrackNumber" 2376 path: "1*1(\Segment\Tracks\TrackEntry\TrackNumber)" 2378 id: "0xD7" 2380 minOccurs: "1" 2382 maxOccurs: "1" 2384 range: "not 0" 2385 type: "uinteger" 2387 minver: "1" 2389 documentation: The track number as used in the Block Header (using 2390 more than 127 tracks is not encouraged, though the design allows an 2391 unlimited number). 2393 7.3.58. TrackUID Element 2395 name: "TrackUID" 2397 path: "1*1(\Segment\Tracks\TrackEntry\TrackUID)" 2399 id: "0x73C5" 2401 minOccurs: "1" 2403 maxOccurs: "1" 2405 range: "not 0" 2407 type: "uinteger" 2409 minver: "1" 2411 documentation: A unique ID to identify the Track. This SHOULD be 2412 kept the same when making a direct stream copy of the Track to 2413 another file. 2415 7.3.59. TrackType Element 2417 name: "TrackType" 2419 path: "1*1(\Segment\Tracks\TrackEntry\TrackType)" 2421 id: "0x83" 2423 minOccurs: "1" 2425 maxOccurs: "1" 2427 range: "1-254" 2429 type: "uinteger" 2431 minver: "1" 2432 documentation: A set of track types coded on 8 bits. 2434 7.3.60. FlagEnabled Element 2436 name: "FlagEnabled" 2438 path: "1*1(\Segment\Tracks\TrackEntry\FlagEnabled)" 2440 id: "0xB9" 2442 minOccurs: "1" 2444 maxOccurs: "1" 2446 range: "0-1" 2448 default: "1" 2450 type: "uinteger" 2452 minver: "2" 2454 documentation: Set if the track is usable. (1 bit) 2456 7.3.61. FlagDefault Element 2458 name: "FlagDefault" 2460 path: "1*1(\Segment\Tracks\TrackEntry\FlagDefault)" 2462 id: "0x88" 2464 minOccurs: "1" 2466 maxOccurs: "1" 2468 range: "0-1" 2470 default: "1" 2472 type: "uinteger" 2474 minver: "1" 2476 documentation: Set if that track (audio, video or subs) SHOULD be 2477 active if no language found matches the user preference. (1 bit) 2479 7.3.62. FlagForced Element 2481 name: "FlagForced" 2483 path: "1*1(\Segment\Tracks\TrackEntry\FlagForced)" 2485 id: "0x55AA" 2487 minOccurs: "1" 2489 maxOccurs: "1" 2491 range: "0-1" 2493 default: "0" 2495 type: "uinteger" 2497 minver: "1" 2499 documentation: Set if that track MUST be active during playback. 2500 There can be many forced track for a kind (audio, video or subs), the 2501 player SHOULD select the one which language matches the user 2502 preference or the default + forced track. Overlay MAY happen between 2503 a forced and non-forced track of the same kind. (1 bit) 2505 7.3.63. FlagLacing Element 2507 name: "FlagLacing" 2509 path: "1*1(\Segment\Tracks\TrackEntry\FlagLacing)" 2511 id: "0x9C" 2513 minOccurs: "1" 2515 maxOccurs: "1" 2517 range: "0-1" 2519 default: "1" 2521 type: "uinteger" 2523 minver: "1" 2525 documentation: Set if the track MAY contain blocks using lacing. (1 2526 bit) 2528 7.3.64. MinCache Element 2530 name: "MinCache" 2532 path: "1*1(\Segment\Tracks\TrackEntry\MinCache)" 2534 id: "0x6DE7" 2536 minOccurs: "1" 2538 maxOccurs: "1" 2540 default: "0" 2542 type: "uinteger" 2544 minver: "1" 2546 documentation: The minimum number of frames a player SHOULD be able 2547 to cache during playback. If set to 0, the reference pseudo-cache 2548 system is not used. 2550 7.3.65. MaxCache Element 2552 name: "MaxCache" 2554 path: "0*1(\Segment\Tracks\TrackEntry\MaxCache)" 2556 id: "0x6DF8" 2558 maxOccurs: "1" 2560 type: "uinteger" 2562 minver: "1" 2564 documentation: The maximum cache size necessary to store referenced 2565 frames in and the current frame. 0 means no cache is needed. 2567 7.3.66. DefaultDuration Element 2569 name: "DefaultDuration" 2571 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDuration)" 2573 id: "0x23E383" 2575 maxOccurs: "1" 2576 range: "not 0" 2578 type: "uinteger" 2580 minver: "1" 2582 documentation: Number of nanoseconds (not scaled via TimecodeScale) 2583 per frame ('frame' in the Matroska sense -- one Element put into a 2584 (Simple)Block). 2586 7.3.67. DefaultDecodedFieldDuration Element 2588 name: "DefaultDecodedFieldDuration" 2590 path: "0*1(\Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration)" 2592 id: "0x234E7A" 2594 maxOccurs: "1" 2596 range: "not 0" 2598 type: "uinteger" 2600 minver: "4" 2602 documentation: The period in nanoseconds (not scaled by TimcodeScale) 2603 between two successive fields at the output of the decoding process 2604 (see the notes) 2606 7.3.68. TrackTimecodeScale Element 2608 name: "TrackTimecodeScale" 2610 path: "1*1(\Segment\Tracks\TrackEntry\TrackTimecodeScale)" 2612 id: "0x23314F" 2614 minOccurs: "1" 2616 maxOccurs: "1" 2618 range: "> 0x0p+0" 2620 default: "0x1p+0" 2622 type: "float" 2623 minver: "1" 2625 maxver: "3" 2627 documentation: DEPRECATED, DO NOT USE. The scale to apply on this 2628 track to work at normal speed in relation with other tracks (mostly 2629 used to adjust video speed when the audio length differs). 2631 7.3.69. TrackOffset Element 2633 name: "TrackOffset" 2635 path: "0*1(\Segment\Tracks\TrackEntry\TrackOffset)" 2637 id: "0x537F" 2639 maxOccurs: "1" 2641 default: "0" 2643 type: "integer" 2645 minver: "0" 2647 maxver: "0" 2649 documentation: A value to add to the Block's Timestamp. This can be 2650 used to adjust the playback offset of a track. 2652 7.3.70. MaxBlockAdditionID Element 2654 name: "MaxBlockAdditionID" 2656 path: "1*1(\Segment\Tracks\TrackEntry\MaxBlockAdditionID)" 2658 id: "0x55EE" 2660 minOccurs: "1" 2662 maxOccurs: "1" 2664 default: "0" 2666 type: "uinteger" 2668 minver: "1" 2669 documentation: The maximum value of BlockAddID. A value 0 means 2670 there is no BlockAdditions for this track. 2672 7.3.71. Name Element 2674 name: "Name" 2676 path: "0*1(\Segment\Tracks\TrackEntry\Name)" 2678 id: "0x536E" 2680 maxOccurs: "1" 2682 type: "utf-8" 2684 minver: "1" 2686 documentation: A human-readable track name. 2688 7.3.72. Language Element 2690 name: "Language" 2692 path: "0*1(\Segment\Tracks\TrackEntry\Language)" 2694 id: "0x22B59C" 2696 maxOccurs: "1" 2698 default: "eng" 2700 type: "string" 2702 minver: "1" 2704 documentation: Specifies the language of the track in the Matroska 2705 languages form. This Element MUST be ignored if the LanguageIETF 2706 Element is used in the same TrackEntry. 2708 7.3.73. LanguageIETF Element 2710 name: "LanguageIETF" 2712 path: "0*1(\Segment\Tracks\TrackEntry\LanguageIETF)" 2714 id: "0x22B59D" 2716 maxOccurs: "1" 2717 type: "string" 2719 minver: "4" 2721 documentation: Specifies the language of the track according to BCP 2722 47 and using the IANA Language Subtag Registry. If this Element is 2723 used, then any Language Elements used in the same TrackEntry MUST be 2724 ignored. 2726 7.3.74. CodecID Element 2728 name: "CodecID" 2730 path: "1*1(\Segment\Tracks\TrackEntry\CodecID)" 2732 id: "0x86" 2734 minOccurs: "1" 2736 maxOccurs: "1" 2738 type: "string" 2740 minver: "1" 2742 documentation: An ID corresponding to the codec, see the codec page 2743 for more info. 2745 7.3.75. CodecPrivate Element 2747 name: "CodecPrivate" 2749 path: "0*1(\Segment\Tracks\TrackEntry\CodecPrivate)" 2751 id: "0x63A2" 2753 maxOccurs: "1" 2755 type: "binary" 2757 minver: "1" 2759 documentation: Private data only known to the codec. 2761 7.3.76. CodecName Element 2763 name: "CodecName" 2765 path: "0*1(\Segment\Tracks\TrackEntry\CodecName)" 2767 id: "0x258688" 2769 maxOccurs: "1" 2771 type: "utf-8" 2773 minver: "1" 2775 documentation: A human-readable string specifying the codec. 2777 7.3.77. AttachmentLink Element 2779 name: "AttachmentLink" 2781 path: "0*1(\Segment\Tracks\TrackEntry\AttachmentLink)" 2783 id: "0x7446" 2785 maxOccurs: "1" 2787 range: "not 0" 2789 type: "uinteger" 2791 minver: "1" 2793 maxver: "3" 2795 documentation: The UID of an attachment that is used by this codec. 2797 7.3.78. CodecSettings Element 2799 name: "CodecSettings" 2801 path: "0*1(\Segment\Tracks\TrackEntry\CodecSettings)" 2803 id: "0x3A9697" 2805 maxOccurs: "1" 2807 type: "utf-8" 2808 minver: "0" 2810 maxver: "0" 2812 documentation: A string describing the encoding setting used. 2814 7.3.79. CodecInfoURL Element 2816 name: "CodecInfoURL" 2818 path: "0*(\Segment\Tracks\TrackEntry\CodecInfoURL)" 2820 id: "0x3B4040" 2822 type: "string" 2824 minver: "0" 2826 maxver: "0" 2828 documentation: A URL to find information about the codec used. 2830 7.3.80. CodecDownloadURL Element 2832 name: "CodecDownloadURL" 2834 path: "0*(\Segment\Tracks\TrackEntry\CodecDownloadURL)" 2836 id: "0x26B240" 2838 type: "string" 2840 minver: "0" 2842 maxver: "0" 2844 documentation: A URL to download about the codec used. 2846 7.3.81. CodecDecodeAll Element 2848 name: "CodecDecodeAll" 2850 path: "1*1(\Segment\Tracks\TrackEntry\CodecDecodeAll)" 2852 id: "0xAA" 2854 minOccurs: "1" 2855 maxOccurs: "1" 2857 range: "0-1" 2859 default: "1" 2861 type: "uinteger" 2863 minver: "2" 2865 documentation: The codec can decode potentially damaged data (1 bit). 2867 7.3.82. TrackOverlay Element 2869 name: "TrackOverlay" 2871 path: "0*(\Segment\Tracks\TrackEntry\TrackOverlay)" 2873 id: "0x6FAB" 2875 type: "uinteger" 2877 minver: "1" 2879 documentation: Specify that this track is an overlay track for the 2880 Track specified (in the u-integer). That means when this track has a 2881 gap (see SilentTracks) the overlay track SHOULD be used instead. The 2882 order of multiple TrackOverlay matters, the first one is the one that 2883 SHOULD be used. If not found it SHOULD be the second, etc. 2885 7.3.83. CodecDelay Element 2887 name: "CodecDelay" 2889 path: "0*1(\Segment\Tracks\TrackEntry\CodecDelay)" 2891 id: "0x56AA" 2893 maxOccurs: "1" 2895 default: "0" 2897 type: "uinteger" 2899 minver: "4" 2901 documentation: CodecDelay is The codec-built-in delay in nanoseconds. 2902 This value MUST be subtracted from each block timestamp in order to 2903 get the actual timestamp. The value SHOULD be small so the muxing of 2904 tracks with the same actual timestamp are in the same Cluster. 2906 7.3.84. SeekPreRoll Element 2908 name: "SeekPreRoll" 2910 path: "1*1(\Segment\Tracks\TrackEntry\SeekPreRoll)" 2912 id: "0x56BB" 2914 minOccurs: "1" 2916 maxOccurs: "1" 2918 default: "0" 2920 type: "uinteger" 2922 minver: "4" 2924 documentation: After a discontinuity, SeekPreRoll is the duration in 2925 nanoseconds of the data the decoder MUST decode before the decoded 2926 data is valid. 2928 7.3.85. TrackTranslate Element 2930 name: "TrackTranslate" 2932 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate)" 2934 id: "0x6624" 2936 type: "master" 2938 minver: "1" 2940 documentation: The track identification for the given Chapter Codec. 2942 7.3.86. TrackTranslateEditionUID Element 2944 name: "TrackTranslateEditionUID" 2946 path: "0*(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEdi 2947 tionUID)" 2949 id: "0x66FC" 2950 type: "uinteger" 2952 minver: "1" 2954 documentation: Specify an edition UID on which this translation 2955 applies. When not specified, it means for all editions found in the 2956 Segment. 2958 7.3.87. TrackTranslateCodec Element 2960 name: "TrackTranslateCodec" 2962 path: 2963 "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec)" 2965 id: "0x66BF" 2967 minOccurs: "1" 2969 maxOccurs: "1" 2971 type: "uinteger" 2973 minver: "1" 2975 documentation: The chapter codec. 2977 7.3.88. TrackTranslateTrackID Element 2979 name: "TrackTranslateTrackID" 2981 path: "1*1(\Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTr 2982 ackID)" 2984 id: "0x66A5" 2986 minOccurs: "1" 2988 maxOccurs: "1" 2990 type: "binary" 2992 minver: "1" 2994 documentation: The binary value used to represent this track in the 2995 chapter codec data. The format depends on the ChapProcessCodecID 2996 used. 2998 7.3.89. Video Element 3000 name: "Video" 3002 path: "0*1(\Segment\Tracks\TrackEntry\Video)" 3004 id: "0xE0" 3006 maxOccurs: "1" 3008 type: "master" 3010 minver: "1" 3012 documentation: Video settings. 3014 7.3.90. FlagInterlaced Element 3016 name: "FlagInterlaced" 3018 path: "1*1(\Segment\Tracks\TrackEntry\Video\FlagInterlaced)" 3020 id: "0x9A" 3022 minOccurs: "1" 3024 maxOccurs: "1" 3026 range: "0-2" 3028 default: "0" 3030 type: "uinteger" 3032 minver: "2" 3034 documentation: A flag to declare is the video is known to be 3035 progressive or interlaced and if applicable to declare details about 3036 the interlacement. 3038 7.3.91. FieldOrder Element 3040 name: "FieldOrder" 3042 path: "1*1(\Segment\Tracks\TrackEntry\Video\FieldOrder)" 3044 id: "0x9D" 3045 minOccurs: "1" 3047 maxOccurs: "1" 3049 range: "0-14" 3051 default: "2" 3053 type: "uinteger" 3055 minver: "4" 3057 documentation: Declare the field ordering of the video. If 3058 FlagInterlaced is not set to 1, this Element MUST be ignored. 3060 7.3.92. StereoMode Element 3062 name: "StereoMode" 3064 path: "0*1(\Segment\Tracks\TrackEntry\Video\StereoMode)" 3066 id: "0x53B8" 3068 maxOccurs: "1" 3070 default: "0" 3072 type: "uinteger" 3074 minver: "3" 3076 documentation: Stereo-3D video mode. There are some more details on 3077 3D support in the Specification Notes. 3079 7.3.93. AlphaMode Element 3081 name: "AlphaMode" 3083 path: "0*1(\Segment\Tracks\TrackEntry\Video\AlphaMode)" 3085 id: "0x53C0" 3087 maxOccurs: "1" 3089 default: "0" 3091 type: "uinteger" 3092 minver: "3" 3094 documentation: Alpha Video Mode. Presence of this Element indicates 3095 that the BlockAdditional Element could contain Alpha data. 3097 7.3.94. OldStereoMode Element 3099 name: "OldStereoMode" 3101 path: "0*1(\Segment\Tracks\TrackEntry\Video\OldStereoMode)" 3103 id: "0x53B9" 3105 maxOccurs: "1" 3107 type: "uinteger" 3109 maxver: "0" 3111 documentation: DEPRECATED, DO NOT USE. Bogus StereoMode value used 3112 in old versions of libmatroska. 3114 7.3.95. PixelWidth Element 3116 name: "PixelWidth" 3118 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelWidth)" 3120 id: "0xB0" 3122 minOccurs: "1" 3124 maxOccurs: "1" 3126 range: "not 0" 3128 type: "uinteger" 3130 minver: "1" 3132 documentation: Width of the encoded video frames in pixels. 3134 7.3.96. PixelHeight Element 3136 name: "PixelHeight" 3138 path: "1*1(\Segment\Tracks\TrackEntry\Video\PixelHeight)" 3139 id: "0xBA" 3141 minOccurs: "1" 3143 maxOccurs: "1" 3145 range: "not 0" 3147 type: "uinteger" 3149 minver: "1" 3151 documentation: Height of the encoded video frames in pixels. 3153 7.3.97. PixelCropBottom Element 3155 name: "PixelCropBottom" 3157 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropBottom)" 3159 id: "0x54AA" 3161 maxOccurs: "1" 3163 default: "0" 3165 type: "uinteger" 3167 minver: "1" 3169 documentation: The number of video pixels to remove at the bottom of 3170 the image (for HDTV content). 3172 7.3.98. PixelCropTop Element 3174 name: "PixelCropTop" 3176 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropTop)" 3178 id: "0x54BB" 3180 maxOccurs: "1" 3182 default: "0" 3184 type: "uinteger" 3186 minver: "1" 3187 documentation: The number of video pixels to remove at the top of the 3188 image. 3190 7.3.99. PixelCropLeft Element 3192 name: "PixelCropLeft" 3194 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropLeft)" 3196 id: "0x54CC" 3198 maxOccurs: "1" 3200 default: "0" 3202 type: "uinteger" 3204 minver: "1" 3206 documentation: The number of video pixels to remove on the left of 3207 the image. 3209 7.3.100. PixelCropRight Element 3211 name: "PixelCropRight" 3213 path: "0*1(\Segment\Tracks\TrackEntry\Video\PixelCropRight)" 3215 id: "0x54DD" 3217 maxOccurs: "1" 3219 default: "0" 3221 type: "uinteger" 3223 minver: "1" 3225 documentation: The number of video pixels to remove on the right of 3226 the image. 3228 7.3.101. DisplayWidth Element 3230 name: "DisplayWidth" 3232 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayWidth)" 3234 id: "0x54B0" 3235 maxOccurs: "1" 3237 range: "not 0" 3239 default: "PixelWidth - PixelCropLeft - PixelCropRight" 3241 type: "uinteger" 3243 minver: "1" 3245 documentation: Width of the video frames to display. Applies to the 3246 video frame after cropping (PixelCrop* Elements). The default value 3247 is only valid when DisplayUnit is 0. 3249 7.3.102. DisplayHeight Element 3251 name: "DisplayHeight" 3253 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayHeight)" 3255 id: "0x54BA" 3257 maxOccurs: "1" 3259 range: "not 0" 3261 default: "PixelHeight - PixelCropTop - PixelCropBottom" 3263 type: "uinteger" 3265 minver: "1" 3267 documentation: Height of the video frames to display. Applies to the 3268 video frame after cropping (PixelCrop* Elements). The default value 3269 is only valid when DisplayUnit is 0. 3271 7.3.103. DisplayUnit Element 3273 name: "DisplayUnit" 3275 path: "0*1(\Segment\Tracks\TrackEntry\Video\DisplayUnit)" 3277 id: "0x54B2" 3279 maxOccurs: "1" 3281 default: "0" 3282 type: "uinteger" 3284 minver: "1" 3286 documentation: How DisplayWidth & DisplayHeight are interpreted. 3288 7.3.104. AspectRatioType Element 3290 name: "AspectRatioType" 3292 path: "0*1(\Segment\Tracks\TrackEntry\Video\AspectRatioType)" 3294 id: "0x54B3" 3296 maxOccurs: "1" 3298 default: "0" 3300 type: "uinteger" 3302 minver: "1" 3304 documentation: Specify the possible modifications to the aspect 3305 ratio. 3307 7.3.105. ColourSpace Element 3309 name: "ColourSpace" 3311 path: "0*1(\Segment\Tracks\TrackEntry\Video\ColourSpace)" 3313 id: "0x2EB524" 3315 maxOccurs: "1" 3317 size: "4" 3319 type: "binary" 3321 minver: "1" 3323 documentation: Same value as in AVI (32 bits). 3325 7.3.106. GammaValue Element 3327 name: "GammaValue" 3329 path: "0*1(\Segment\Tracks\TrackEntry\Video\GammaValue)" 3330 id: "0x2FB523" 3332 maxOccurs: "1" 3334 range: "> 0x0p+0" 3336 type: "float" 3338 minver: "0" 3340 maxver: "0" 3342 documentation: Gamma Value. 3344 7.3.107. FrameRate Element 3346 name: "FrameRate" 3348 path: "0*1(\Segment\Tracks\TrackEntry\Video\FrameRate)" 3350 id: "0x2383E3" 3352 maxOccurs: "1" 3354 range: "> 0x0p+0" 3356 type: "float" 3358 minver: "0" 3360 maxver: "0" 3362 documentation: Number of frames per second. Informational only. 3364 7.3.108. Colour Element 3366 name: "Colour" 3368 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour)" 3370 id: "0x55B0" 3372 maxOccurs: "1" 3374 type: "master" 3376 minver: "4" 3377 documentation: Settings describing the colour format. 3379 7.3.109. MatrixCoefficients Element 3381 name: "MatrixCoefficients" 3383 path: 3384 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients)" 3386 id: "0x55B1" 3388 maxOccurs: "1" 3390 default: "2" 3392 type: "uinteger" 3394 minver: "4" 3396 documentation: The Matrix Coefficients of the video used to derive 3397 luma and chroma values from reg, green, and blue color primaries. 3398 For clarity, the value and meanings for MatrixCoefficients are 3399 adopted from Table 4 of ISO/IEC 23001-8:2013/DCOR1. 3401 7.3.110. BitsPerChannel Element 3403 name: "BitsPerChannel" 3405 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel)" 3407 id: "0x55B2" 3409 maxOccurs: "1" 3411 default: "0" 3413 type: "uinteger" 3415 minver: "4" 3417 documentation: Number of decoded bits per channel. A value of 0 3418 indicates that the BitsPerChannel is unspecified. 3420 7.3.111. ChromaSubsamplingHorz Element 3422 name: "ChromaSubsamplingHorz" 3423 path: 3424 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz)" 3426 id: "0x55B3" 3428 maxOccurs: "1" 3430 type: "uinteger" 3432 minver: "4" 3434 documentation: The amount of pixels to remove in the Cr and Cb 3435 channels for every pixel not removed horizontally. Example: For 3436 video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD 3437 be set to 1. 3439 7.3.112. ChromaSubsamplingVert Element 3441 name: "ChromaSubsamplingVert" 3443 path: 3444 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert)" 3446 id: "0x55B4" 3448 maxOccurs: "1" 3450 type: "uinteger" 3452 minver: "4" 3454 documentation: The amount of pixels to remove in the Cr and Cb 3455 channels for every pixel not removed vertically. Example: For video 3456 with 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be 3457 set to 1. 3459 7.3.113. CbSubsamplingHorz Element 3461 name: "CbSubsamplingHorz" 3463 path: 3464 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz)" 3466 id: "0x55B5" 3468 maxOccurs: "1" 3470 type: "uinteger" 3471 minver: "4" 3473 documentation: The amount of pixels to remove in the Cb channel for 3474 every pixel not removed horizontally. This is additive with 3475 ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma 3476 subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and 3477 CbSubsamplingHorz SHOULD be set to 1. 3479 7.3.114. CbSubsamplingVert Element 3481 name: "CbSubsamplingVert" 3483 path: 3484 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert)" 3486 id: "0x55B6" 3488 maxOccurs: "1" 3490 type: "uinteger" 3492 minver: "4" 3494 documentation: The amount of pixels to remove in the Cb channel for 3495 every pixel not removed vertically. This is additive with 3496 ChromaSubsamplingVert. 3498 7.3.115. ChromaSitingHorz Element 3500 name: "ChromaSitingHorz" 3502 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz)" 3504 id: "0x55B7" 3506 maxOccurs: "1" 3508 default: "0" 3510 type: "uinteger" 3512 minver: "4" 3514 documentation: How chroma is subsampled horizontally. 3516 7.3.116. ChromaSitingVert Element 3518 name: "ChromaSitingVert" 3520 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert)" 3522 id: "0x55B8" 3524 maxOccurs: "1" 3526 default: "0" 3528 type: "uinteger" 3530 minver: "4" 3532 documentation: How chroma is subsampled vertically. 3534 7.3.117. Range Element 3536 name: "Range" 3538 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Range)" 3540 id: "0x55B9" 3542 maxOccurs: "1" 3544 default: "0" 3546 type: "uinteger" 3548 minver: "4" 3550 documentation: Clipping of the color ranges. 3552 7.3.118. TransferCharacteristics Element 3554 name: "TransferCharacteristics" 3556 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteri 3557 stics)" 3559 id: "0x55BA" 3561 maxOccurs: "1" 3563 default: "2" 3564 type: "uinteger" 3566 minver: "4" 3568 documentation: The transfer characteristics of the video. For 3569 clarity, the value and meanings for TransferCharacteristics 1-15 are 3570 adopted from Table 3 of ISO/IEC 23001-8:2013/DCOR1. 3571 TransferCharacteristics 16-18 are proposed values. 3573 7.3.119. Primaries Element 3575 name: "Primaries" 3577 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\Primaries)" 3579 id: "0x55BB" 3581 maxOccurs: "1" 3583 default: "2" 3585 type: "uinteger" 3587 minver: "4" 3589 documentation: The colour primaries of the video. For clarity, the 3590 value and meanings for Primaries are adopted from Table 2 of ISO/IEC 3591 23001-8:2013/DCOR1. 3593 7.3.120. MaxCLL Element 3595 name: "MaxCLL" 3597 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxCLL)" 3599 id: "0x55BC" 3601 maxOccurs: "1" 3603 type: "uinteger" 3605 minver: "4" 3607 documentation: Maximum brightness of a single pixel (Maximum Content 3608 Light Level) in candelas per square meter (cd/m^2). 3610 7.3.121. MaxFALL Element 3612 name: "MaxFALL" 3614 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MaxFALL)" 3616 id: "0x55BD" 3618 maxOccurs: "1" 3620 type: "uinteger" 3622 minver: "4" 3624 documentation: Maximum brightness of a single full frame (Maximum 3625 Frame-Average Light Level) in candelas per square meter (cd/m^2). 3627 7.3.122. MasteringMetadata Element 3629 name: "MasteringMetadata" 3631 path: 3632 "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata)" 3634 id: "0x55D0" 3636 maxOccurs: "1" 3638 type: "master" 3640 minver: "4" 3642 documentation: SMPTE 2086 mastering data. 3644 7.3.123. PrimaryRChromaticityX Element 3646 name: "PrimaryRChromaticityX" 3648 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3649 PrimaryRChromaticityX)" 3651 id: "0x55D1" 3653 maxOccurs: "1" 3655 range: "0-1" 3657 type: "float" 3658 minver: "4" 3660 documentation: Red X chromaticity coordinate as defined by CIE 1931. 3662 7.3.124. PrimaryRChromaticityY Element 3664 name: "PrimaryRChromaticityY" 3666 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3667 PrimaryRChromaticityY)" 3669 id: "0x55D2" 3671 maxOccurs: "1" 3673 range: "0-1" 3675 type: "float" 3677 minver: "4" 3679 documentation: Red Y chromaticity coordinate as defined by CIE 1931. 3681 7.3.125. PrimaryGChromaticityX Element 3683 name: "PrimaryGChromaticityX" 3685 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3686 PrimaryGChromaticityX)" 3688 id: "0x55D3" 3690 maxOccurs: "1" 3692 range: "0-1" 3694 type: "float" 3696 minver: "4" 3698 documentation: Green X chromaticity coordinate as defined by CIE 3699 1931. 3701 7.3.126. PrimaryGChromaticityY Element 3703 name: "PrimaryGChromaticityY" 3704 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3705 PrimaryGChromaticityY)" 3707 id: "0x55D4" 3709 maxOccurs: "1" 3711 range: "0-1" 3713 type: "float" 3715 minver: "4" 3717 documentation: Green Y chromaticity coordinate as defined by CIE 3718 1931. 3720 7.3.127. PrimaryBChromaticityX Element 3722 name: "PrimaryBChromaticityX" 3724 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3725 PrimaryBChromaticityX)" 3727 id: "0x55D5" 3729 maxOccurs: "1" 3731 range: "0-1" 3733 type: "float" 3735 minver: "4" 3737 documentation: Blue X chromaticity coordinate as defined by CIE 1931. 3739 7.3.128. PrimaryBChromaticityY Element 3741 name: "PrimaryBChromaticityY" 3743 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3744 PrimaryBChromaticityY)" 3746 id: "0x55D6" 3748 maxOccurs: "1" 3750 range: "0-1" 3751 type: "float" 3753 minver: "4" 3755 documentation: Blue Y chromaticity coordinate as defined by CIE 1931. 3757 7.3.129. WhitePointChromaticityX Element 3759 name: "WhitePointChromaticityX" 3761 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3762 WhitePointChromaticityX)" 3764 id: "0x55D7" 3766 maxOccurs: "1" 3768 range: "0-1" 3770 type: "float" 3772 minver: "4" 3774 documentation: White X chromaticity coordinate as defined by CIE 3775 1931. 3777 7.3.130. WhitePointChromaticityY Element 3779 name: "WhitePointChromaticityY" 3781 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3782 WhitePointChromaticityY)" 3784 id: "0x55D8" 3786 maxOccurs: "1" 3788 range: "0-1" 3790 type: "float" 3792 minver: "4" 3794 documentation: White Y chromaticity coordinate as defined by CIE 3795 1931. 3797 7.3.131. LuminanceMax Element 3799 name: "LuminanceMax" 3801 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3802 LuminanceMax)" 3804 id: "0x55D9" 3806 maxOccurs: "1" 3808 range: "0-9999.99" 3810 type: "float" 3812 minver: "4" 3814 documentation: Maximum luminance. Represented in candelas per square 3815 meter (cd/m^2). 3817 7.3.132. LuminanceMin Element 3819 name: "LuminanceMin" 3821 path: "0*1(\Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\ 3822 LuminanceMin)" 3824 id: "0x55DA" 3826 maxOccurs: "1" 3828 range: "0-999.9999" 3830 type: "float" 3832 minver: "4" 3834 documentation: Mininum luminance. Represented in candelas per square 3835 meter (cd/m^2). 3837 7.3.133. Projection Element 3839 name: "Projection" 3841 path: "0*1(\Segment\Tracks\TrackEntry\Video\Projection)" 3843 id: "0x7670" 3844 maxOccurs: "1" 3846 type: "master" 3848 minver: "4" 3850 documentation: Describes the video projection details. Used to 3851 render spherical and VR videos. 3853 7.3.134. ProjectionType Element 3855 name: "ProjectionType" 3857 path: 3858 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionType)" 3860 id: "0x7671" 3862 minOccurs: "1" 3864 maxOccurs: "1" 3866 range: "0-3" 3868 default: "0" 3870 type: "uinteger" 3872 minver: "4" 3874 documentation: Describes the projection used for this video track. 3876 7.3.135. ProjectionPrivate Element 3878 name: "ProjectionPrivate" 3880 path: 3881 "0*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate)" 3883 id: "0x7672" 3885 maxOccurs: "1" 3887 type: "binary" 3889 minver: "4" 3890 documentation: Private data that only applies to a specific 3891 projection.SemanticsIf ProjectionType equals 0 (Rectangular), then 3892 this element must not be present.If ProjectionType equals 1 3893 (Equirectangular), then this element must be present and contain the 3894 same binary data that would be stored inside an ISOBMFF 3895 Equirectangular Projection Box ('equi').If ProjectionType equals 2 3896 (Cubemap), then this element must be present and contain the same 3897 binary data that would be stored inside an ISOBMFF Cubemap Projection 3898 Box ('cbmp').If ProjectionType equals 3 (Mesh), then this element 3899 must be present and contain the same binary data that would be stored 3900 inside an ISOBMFF Mesh Projection Box ('mshp').Note: ISOBMFF box size 3901 and fourcc fields are not included in the binary data, but the 3902 FullBox version and flag fields are. This is to avoid redundant 3903 framing information while preserving versioning and semantics between 3904 the two container formats. 3906 7.3.136. ProjectionPoseYaw Element 3908 name: "ProjectionPoseYaw" 3910 path: 3911 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw)" 3913 id: "0x7673" 3915 minOccurs: "1" 3917 maxOccurs: "1" 3919 default: "0x0p+0" 3921 type: "float" 3923 minver: "4" 3925 documentation: Specifies a yaw rotation to the 3926 projection.SemanticsValue represents a clockwise rotation, in 3927 degrees, around the up vector. This rotation must be applied before 3928 any ProjectionPosePitch or ProjectionPoseRoll rotations. The value 3929 of this field should be in the -180 to 180 degree range. 3931 7.3.137. ProjectionPosePitch Element 3933 name: "ProjectionPosePitch" 3935 path: "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPose 3936 Pitch)" 3937 id: "0x7674" 3939 minOccurs: "1" 3941 maxOccurs: "1" 3943 default: "0x0p+0" 3945 type: "float" 3947 minver: "4" 3949 documentation: Specifies a pitch rotation to the 3950 projection.SemanticsValue represents a counter-clockwise rotation, in 3951 degrees, around the right vector. This rotation must be applied 3952 after the ProjectionPoseYaw rotation and before the 3953 ProjectionPoseRoll rotation. The value of this field should be in 3954 the -90 to 90 degree range. 3956 7.3.138. ProjectionPoseRoll Element 3958 name: "ProjectionPoseRoll" 3960 path: 3961 "1*1(\Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll)" 3963 id: "0x7675" 3965 minOccurs: "1" 3967 maxOccurs: "1" 3969 default: "0x0p+0" 3971 type: "float" 3973 minver: "4" 3975 documentation: Specifies a roll rotation to the 3976 projection.SemanticsValue represents a counter-clockwise rotation, in 3977 degrees, around the forward vector. This rotation must be applied 3978 after the ProjectionPoseYaw and ProjectionPosePitch rotations. The 3979 value of this field should be in the -180 to 180 degree range. 3981 7.3.139. Audio Element 3983 name: "Audio" 3985 path: "0*1(\Segment\Tracks\TrackEntry\Audio)" 3987 id: "0xE1" 3989 maxOccurs: "1" 3991 type: "master" 3993 minver: "1" 3995 documentation: Audio settings. 3997 7.3.140. SamplingFrequency Element 3999 name: "SamplingFrequency" 4001 path: "1*1(\Segment\Tracks\TrackEntry\Audio\SamplingFrequency)" 4003 id: "0xB5" 4005 minOccurs: "1" 4007 maxOccurs: "1" 4009 range: "> 0x0p+0" 4011 default: "0x1.f4p+12" 4013 type: "float" 4015 minver: "1" 4017 documentation: Sampling frequency in Hz. 4019 7.3.141. OutputSamplingFrequency Element 4021 name: "OutputSamplingFrequency" 4023 path: "0*1(\Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency)" 4025 id: "0x78B5" 4027 maxOccurs: "1" 4028 range: "> 0x0p+0" 4030 default: "SamplingFrequency" 4032 type: "float" 4034 minver: "1" 4036 documentation: Real output sampling frequency in Hz (used for SBR 4037 techniques). 4039 7.3.142. Channels Element 4041 name: "Channels" 4043 path: "1*1(\Segment\Tracks\TrackEntry\Audio\Channels)" 4045 id: "0x9F" 4047 minOccurs: "1" 4049 maxOccurs: "1" 4051 range: "not 0" 4053 default: "1" 4055 type: "uinteger" 4057 minver: "1" 4059 documentation: Numbers of channels in the track. 4061 7.3.143. ChannelPositions Element 4063 name: "ChannelPositions" 4065 path: "0*1(\Segment\Tracks\TrackEntry\Audio\ChannelPositions)" 4067 id: "0x7D7B" 4069 maxOccurs: "1" 4071 type: "binary" 4073 minver: "0" 4075 maxver: "0" 4076 documentation: Table of horizontal angles for each successive 4077 channel, see appendix. 4079 7.3.144. BitDepth Element 4081 name: "BitDepth" 4083 path: "0*1(\Segment\Tracks\TrackEntry\Audio\BitDepth)" 4085 id: "0x6264" 4087 maxOccurs: "1" 4089 range: "not 0" 4091 type: "uinteger" 4093 minver: "1" 4095 documentation: Bits per sample, mostly used for PCM. 4097 7.3.145. TrackOperation Element 4099 name: "TrackOperation" 4101 path: "0*1(\Segment\Tracks\TrackEntry\TrackOperation)" 4103 id: "0xE2" 4105 maxOccurs: "1" 4107 type: "master" 4109 minver: "3" 4111 documentation: Operation that needs to be applied on tracks to create 4112 this virtual track. For more details look at the Specification Notes 4113 on the subject. 4115 7.3.146. TrackCombinePlanes Element 4117 name: "TrackCombinePlanes" 4119 path: 4120 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes)" 4122 id: "0xE3" 4123 maxOccurs: "1" 4125 type: "master" 4127 minver: "3" 4129 documentation: Contains the list of all video plane tracks that need 4130 to be combined to create this 3D track 4132 7.3.147. TrackPlane Element 4134 name: "TrackPlane" 4136 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlane 4137 s\TrackPlane)" 4139 id: "0xE4" 4141 minOccurs: "1" 4143 type: "master" 4145 minver: "3" 4147 documentation: Contains a video plane track that need to be combined 4148 to create this 3D track 4150 7.3.148. TrackPlaneUID Element 4152 name: "TrackPlaneUID" 4154 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4155 es\TrackPlane\TrackPlaneUID)" 4157 id: "0xE5" 4159 minOccurs: "1" 4161 maxOccurs: "1" 4163 range: "not 0" 4165 type: "uinteger" 4167 minver: "3" 4169 documentation: The trackUID number of the track representing the 4170 plane. 4172 7.3.149. TrackPlaneType Element 4174 name: "TrackPlaneType" 4176 path: "1*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlan 4177 es\TrackPlane\TrackPlaneType)" 4179 id: "0xE6" 4181 minOccurs: "1" 4183 maxOccurs: "1" 4185 type: "uinteger" 4187 minver: "3" 4189 documentation: The kind of plane this track corresponds to. 4191 7.3.150. TrackJoinBlocks Element 4193 name: "TrackJoinBlocks" 4195 path: 4196 "0*1(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks)" 4198 id: "0xE9" 4200 maxOccurs: "1" 4202 type: "master" 4204 minver: "3" 4206 documentation: Contains the list of all tracks whose Blocks need to 4207 be combined to create this virtual track 4209 7.3.151. TrackJoinUID Element 4211 name: "TrackJoinUID" 4213 path: "1*(\Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\T 4214 rackJoinUID)" 4216 id: "0xED" 4218 minOccurs: "1" 4219 range: "not 0" 4221 type: "uinteger" 4223 minver: "3" 4225 documentation: The trackUID number of a track whose blocks are used 4226 to create this virtual track. 4228 7.3.152. TrickTrackUID Element 4230 name: "TrickTrackUID" 4232 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackUID)" 4234 id: "0xC0" 4236 maxOccurs: "1" 4238 type: "uinteger" 4240 minver: "0" 4242 maxver: "0" 4244 documentation: DivX trick track extensions 4246 7.3.153. TrickTrackSegmentUID Element 4248 name: "TrickTrackSegmentUID" 4250 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackSegmentUID)" 4252 id: "0xC1" 4254 maxOccurs: "1" 4256 size: "16" 4258 type: "binary" 4260 minver: "0" 4262 maxver: "0" 4264 documentation: DivX trick track extensions 4266 7.3.154. TrickTrackFlag Element 4268 name: "TrickTrackFlag" 4270 path: "0*1(\Segment\Tracks\TrackEntry\TrickTrackFlag)" 4272 id: "0xC6" 4274 maxOccurs: "1" 4276 default: "0" 4278 type: "uinteger" 4280 minver: "0" 4282 maxver: "0" 4284 documentation: DivX trick track extensions 4286 7.3.155. TrickMasterTrackUID Element 4288 name: "TrickMasterTrackUID" 4290 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackUID)" 4292 id: "0xC7" 4294 maxOccurs: "1" 4296 type: "uinteger" 4298 minver: "0" 4300 maxver: "0" 4302 documentation: DivX trick track extensions 4304 7.3.156. TrickMasterTrackSegmentUID Element 4306 name: "TrickMasterTrackSegmentUID" 4308 path: "0*1(\Segment\Tracks\TrackEntry\TrickMasterTrackSegmentUID)" 4310 id: "0xC4" 4312 maxOccurs: "1" 4313 size: "16" 4315 type: "binary" 4317 minver: "0" 4319 maxver: "0" 4321 documentation: DivX trick track extensions 4323 7.3.157. ContentEncodings Element 4325 name: "ContentEncodings" 4327 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings)" 4329 id: "0x6D80" 4331 maxOccurs: "1" 4333 type: "master" 4335 minver: "1" 4337 documentation: Settings for several content encoding mechanisms like 4338 compression or encryption. 4340 7.3.158. ContentEncoding Element 4342 name: "ContentEncoding" 4344 path: 4345 "1*(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding)" 4347 id: "0x6240" 4349 minOccurs: "1" 4351 type: "master" 4353 minver: "1" 4355 documentation: Settings for one content encoding like compression or 4356 encryption. 4358 7.3.159. ContentEncodingOrder Element 4360 name: "ContentEncodingOrder" 4362 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4363 g\ContentEncodingOrder)" 4365 id: "0x5031" 4367 minOccurs: "1" 4369 maxOccurs: "1" 4371 default: "0" 4373 type: "uinteger" 4375 minver: "1" 4377 documentation: Tells when this modification was used during encoding/ 4378 muxing starting with 0 and counting upwards. The decoder/demuxer has 4379 to start with the highest order number it finds and work its way 4380 down. This value has to be unique over all ContentEncodingOrder 4381 Elements in the Segment. 4383 7.3.160. ContentEncodingScope Element 4385 name: "ContentEncodingScope" 4387 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4388 g\ContentEncodingScope)" 4390 id: "0x5032" 4392 minOccurs: "1" 4394 maxOccurs: "1" 4396 range: "not 0" 4398 default: "1" 4400 type: "uinteger" 4402 minver: "1" 4404 documentation: A bit field that describes which Elements have been 4405 modified in this way. Values (big endian) can be OR'ed. Possible 4406 values: 1 - all frame contents, 2 - the track's private data, 4 - the 4407 next ContentEncoding (next ContentEncodingOrder. Either the data 4408 inside ContentCompression and/or ContentEncryption) 4410 7.3.161. ContentEncodingType Element 4412 name: "ContentEncodingType" 4414 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4415 g\ContentEncodingType)" 4417 id: "0x5033" 4419 minOccurs: "1" 4421 maxOccurs: "1" 4423 default: "0" 4425 type: "uinteger" 4427 minver: "1" 4429 documentation: A value describing what kind of transformation has 4430 been done. Possible values: 0 - compression, 1 - encryption 4432 7.3.162. ContentCompression Element 4434 name: "ContentCompression" 4436 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4437 g\ContentCompression)" 4439 id: "0x5034" 4441 maxOccurs: "1" 4443 type: "master" 4445 minver: "1" 4447 documentation: Settings describing the compression used. This 4448 Element MUST be present if the value of ContentEncodingType is 0 and 4449 absent otherwise. Each block MUST be decompressable even if no 4450 previous block is available in order not to prevent seeking. 4452 7.3.163. ContentCompAlgo Element 4454 name: "ContentCompAlgo" 4456 path: "1*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4457 g\ContentCompression\ContentCompAlgo)" 4459 id: "0x4254" 4461 minOccurs: "1" 4463 maxOccurs: "1" 4465 default: "0" 4467 type: "uinteger" 4469 minver: "1" 4471 documentation: The compression algorithm used. Algorithms that have 4472 been specified so far are: 0 - zlib, 1 - bzlib, 2 - lzo1x 3 - Header 4473 Stripping 4475 7.3.164. ContentCompSettings Element 4477 name: "ContentCompSettings" 4479 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4480 g\ContentCompression\ContentCompSettings)" 4482 id: "0x4255" 4484 maxOccurs: "1" 4486 type: "binary" 4488 minver: "1" 4490 documentation: Settings that might be needed by the decompressor. 4491 For Header Stripping (ContentCompAlgo=3), the bytes that were removed 4492 from the beggining of each frames of the track. 4494 7.3.165. ContentEncryption Element 4496 name: "ContentEncryption" 4498 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4499 g\ContentEncryption)" 4500 id: "0x5035" 4502 maxOccurs: "1" 4504 type: "master" 4506 minver: "1" 4508 documentation: Settings describing the encryption used. This Element 4509 MUST be present if the value of ContentEncodingType is 1 and absent 4510 otherwise. 4512 7.3.166. ContentEncAlgo Element 4514 name: "ContentEncAlgo" 4516 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4517 g\ContentEncryption\ContentEncAlgo)" 4519 id: "0x47E1" 4521 maxOccurs: "1" 4523 default: "0" 4525 type: "uinteger" 4527 minver: "1" 4529 documentation: The encryption algorithm used. The value '0' means 4530 that the contents have not been encrypted but only signed. 4531 Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - 4532 AES 4534 7.3.167. ContentEncKeyID Element 4536 name: "ContentEncKeyID" 4538 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4539 g\ContentEncryption\ContentEncKeyID)" 4541 id: "0x47E2" 4543 maxOccurs: "1" 4545 type: "binary" 4547 minver: "1" 4548 documentation: For public key algorithms this is the ID of the public 4549 key the the data was encrypted with. 4551 7.3.168. ContentSignature Element 4553 name: "ContentSignature" 4555 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4556 g\ContentEncryption\ContentSignature)" 4558 id: "0x47E3" 4560 maxOccurs: "1" 4562 type: "binary" 4564 minver: "1" 4566 documentation: A cryptographic signature of the contents. 4568 7.3.169. ContentSigKeyID Element 4570 name: "ContentSigKeyID" 4572 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4573 g\ContentEncryption\ContentSigKeyID)" 4575 id: "0x47E4" 4577 maxOccurs: "1" 4579 type: "binary" 4581 minver: "1" 4583 documentation: This is the ID of the private key the data was signed 4584 with. 4586 7.3.170. ContentSigAlgo Element 4588 name: "ContentSigAlgo" 4590 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4591 g\ContentEncryption\ContentSigAlgo)" 4593 id: "0x47E5" 4595 maxOccurs: "1" 4596 default: "0" 4598 type: "uinteger" 4600 minver: "1" 4602 documentation: The algorithm used for the signature. A value of '0' 4603 means that the contents have not been signed but only encrypted. 4604 Predefined values: 1 - RSA 4606 7.3.171. ContentSigHashAlgo Element 4608 name: "ContentSigHashAlgo" 4610 path: "0*1(\Segment\Tracks\TrackEntry\ContentEncodings\ContentEncodin 4611 g\ContentEncryption\ContentSigHashAlgo)" 4613 id: "0x47E6" 4615 maxOccurs: "1" 4617 default: "0" 4619 type: "uinteger" 4621 minver: "1" 4623 documentation: The hash algorithm used for the signature. A value of 4624 '0' means that the contents have not been signed but only encrypted. 4625 Predefined values: 1 - SHA1-160 2 - MD5 4627 7.3.172. Cues Element 4629 name: "Cues" 4631 path: "0*1(\Segment\Cues)" 4633 id: "0x1C53BB6B" 4635 maxOccurs: "1" 4637 type: "master" 4639 minver: "1" 4641 documentation: A Top-Level Element to speed seeking access. All 4642 entries are local to the Segment. This Element SHOULD be mandatory 4643 for non "live" streams. 4645 7.3.173. CuePoint Element 4647 name: "CuePoint" 4649 path: "1*(\Segment\Cues\CuePoint)" 4651 id: "0xBB" 4653 minOccurs: "1" 4655 type: "master" 4657 minver: "1" 4659 documentation: Contains all information relative to a seek point in 4660 the Segment. 4662 7.3.174. CueTime Element 4664 name: "CueTime" 4666 path: "1*1(\Segment\Cues\CuePoint\CueTime)" 4668 id: "0xB3" 4670 minOccurs: "1" 4672 maxOccurs: "1" 4674 type: "uinteger" 4676 minver: "1" 4678 documentation: Absolute timestamp according to the Segment time base. 4680 7.3.175. CueTrackPositions Element 4682 name: "CueTrackPositions" 4684 path: "1*(\Segment\Cues\CuePoint\CueTrackPositions)" 4686 id: "0xB7" 4688 minOccurs: "1" 4690 type: "master" 4692 minver: "1" 4693 documentation: Contain positions for different tracks corresponding 4694 to the timestamp. 4696 7.3.176. CueTrack Element 4698 name: "CueTrack" 4700 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueTrack)" 4702 id: "0xF7" 4704 minOccurs: "1" 4706 maxOccurs: "1" 4708 range: "not 0" 4710 type: "uinteger" 4712 minver: "1" 4714 documentation: The track for which a position is given. 4716 7.3.177. CueClusterPosition Element 4718 name: "CueClusterPosition" 4720 path: 4721 "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueClusterPosition)" 4723 id: "0xF1" 4725 minOccurs: "1" 4727 maxOccurs: "1" 4729 type: "uinteger" 4731 minver: "1" 4733 documentation: The Segment Position of the Cluster containing the 4734 associated Block. 4736 7.3.178. CueRelativePosition Element 4738 name: "CueRelativePosition" 4739 path: 4740 "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueRelativePosition)" 4742 id: "0xF0" 4744 maxOccurs: "1" 4746 type: "uinteger" 4748 minver: "4" 4750 documentation: The relative position of the referenced block inside 4751 the cluster with 0 being the first possible position for an Element 4752 inside that cluster. 4754 7.3.179. CueDuration Element 4756 name: "CueDuration" 4758 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueDuration)" 4760 id: "0xB2" 4762 maxOccurs: "1" 4764 type: "uinteger" 4766 minver: "4" 4768 documentation: The duration of the block according to the Segment 4769 time base. If missing the track's DefaultDuration does not apply and 4770 no duration information is available in terms of the cues. 4772 7.3.180. CueBlockNumber Element 4774 name: "CueBlockNumber" 4776 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber)" 4778 id: "0x5378" 4780 maxOccurs: "1" 4782 range: "not 0" 4784 default: "1" 4786 type: "uinteger" 4787 minver: "1" 4789 documentation: Number of the Block in the specified Cluster. 4791 7.3.181. CueCodecState Element 4793 name: "CueCodecState" 4795 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueCodecState)" 4797 id: "0xEA" 4799 maxOccurs: "1" 4801 default: "0" 4803 type: "uinteger" 4805 minver: "2" 4807 documentation: The Segment Position of the Codec State corresponding 4808 to this Cue Element. 0 means that the data is taken from the initial 4809 Track Entry. 4811 7.3.182. CueReference Element 4813 name: "CueReference" 4815 path: "0*(\Segment\Cues\CuePoint\CueTrackPositions\CueReference)" 4817 id: "0xDB" 4819 type: "master" 4821 minver: "2" 4823 documentation: The Clusters containing the referenced Blocks. 4825 7.3.183. CueRefTime Element 4827 name: "CueRefTime" 4829 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4830 efTime)" 4832 id: "0x96" 4834 minOccurs: "1" 4835 maxOccurs: "1" 4837 type: "uinteger" 4839 minver: "2" 4841 documentation: Timestamp of the referenced Block. 4843 7.3.184. CueRefCluster Element 4845 name: "CueRefCluster" 4847 path: "1*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4848 efCluster)" 4850 id: "0x97" 4852 minOccurs: "1" 4854 maxOccurs: "1" 4856 type: "uinteger" 4858 minver: "0" 4860 maxver: "0" 4862 documentation: The Segment Position of the Cluster containing the 4863 referenced Block. 4865 7.3.185. CueRefNumber Element 4867 name: "CueRefNumber" 4869 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4870 efNumber)" 4872 id: "0x535F" 4874 maxOccurs: "1" 4876 range: "not 0" 4878 default: "1" 4880 type: "uinteger" 4882 minver: "0" 4883 maxver: "0" 4885 documentation: Number of the referenced Block of Track X in the 4886 specified Cluster. 4888 7.3.186. CueRefCodecState Element 4890 name: "CueRefCodecState" 4892 path: "0*1(\Segment\Cues\CuePoint\CueTrackPositions\CueReference\CueR 4893 efCodecState)" 4895 id: "0xEB" 4897 maxOccurs: "1" 4899 default: "0" 4901 type: "uinteger" 4903 minver: "0" 4905 maxver: "0" 4907 documentation: The Segment Position of the Codec State corresponding 4908 to this referenced Element. 0 means that the data is taken from the 4909 initial Track Entry. 4911 7.3.187. Attachments Element 4913 name: "Attachments" 4915 path: "0*1(\Segment\Attachments)" 4917 id: "0x1941A469" 4919 maxOccurs: "1" 4921 type: "master" 4923 minver: "1" 4925 documentation: Contain attached files. 4927 7.3.188. AttachedFile Element 4929 name: "AttachedFile" 4931 path: "1*(\Segment\Attachments\AttachedFile)" 4933 id: "0x61A7" 4935 minOccurs: "1" 4937 type: "master" 4939 minver: "1" 4941 documentation: An attached file. 4943 7.3.189. FileDescription Element 4945 name: "FileDescription" 4947 path: "0*1(\Segment\Attachments\AttachedFile\FileDescription)" 4949 id: "0x467E" 4951 maxOccurs: "1" 4953 type: "utf-8" 4955 minver: "1" 4957 documentation: A human-friendly name for the attached file. 4959 7.3.190. FileName Element 4961 name: "FileName" 4963 path: "1*1(\Segment\Attachments\AttachedFile\FileName)" 4965 id: "0x466E" 4967 minOccurs: "1" 4969 maxOccurs: "1" 4971 type: "utf-8" 4973 minver: "1" 4974 documentation: Filename of the attached file. 4976 7.3.191. FileMimeType Element 4978 name: "FileMimeType" 4980 path: "1*1(\Segment\Attachments\AttachedFile\FileMimeType)" 4982 id: "0x4660" 4984 minOccurs: "1" 4986 maxOccurs: "1" 4988 type: "string" 4990 minver: "1" 4992 documentation: MIME type of the file. 4994 7.3.192. FileData Element 4996 name: "FileData" 4998 path: "1*1(\Segment\Attachments\AttachedFile\FileData)" 5000 id: "0x465C" 5002 minOccurs: "1" 5004 maxOccurs: "1" 5006 type: "binary" 5008 minver: "1" 5010 documentation: The data of the file. 5012 7.3.193. FileUID Element 5014 name: "FileUID" 5016 path: "1*1(\Segment\Attachments\AttachedFile\FileUID)" 5018 id: "0x46AE" 5020 minOccurs: "1" 5021 maxOccurs: "1" 5023 range: "not 0" 5025 type: "uinteger" 5027 minver: "1" 5029 documentation: Unique ID representing the file, as random as 5030 possible. 5032 7.3.194. FileReferral Element 5034 name: "FileReferral" 5036 path: "0*1(\Segment\Attachments\AttachedFile\FileReferral)" 5038 id: "0x4675" 5040 maxOccurs: "1" 5042 type: "binary" 5044 minver: "0" 5046 maxver: "0" 5048 documentation: A binary value that a track/codec can refer to when 5049 the attachment is needed. 5051 7.3.195. FileUsedStartTime Element 5053 name: "FileUsedStartTime" 5055 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedStartTime)" 5057 id: "0x4661" 5059 maxOccurs: "1" 5061 type: "uinteger" 5063 minver: "0" 5065 maxver: "0" 5067 documentation: DivX font extension 5069 7.3.196. FileUsedEndTime Element 5071 name: "FileUsedEndTime" 5073 path: "0*1(\Segment\Attachments\AttachedFile\FileUsedEndTime)" 5075 id: "0x4662" 5077 maxOccurs: "1" 5079 type: "uinteger" 5081 minver: "0" 5083 maxver: "0" 5085 documentation: DivX font extension 5087 7.3.197. Chapters Element 5089 name: "Chapters" 5091 path: "0*1(\Segment\Chapters)" 5093 id: "0x1043A770" 5095 maxOccurs: "1" 5097 type: "master" 5099 minver: "1" 5101 documentation: A system to define basic menus and partition data. 5102 For more detailed information, look at the Chapters Explanation. 5104 7.3.198. EditionEntry Element 5106 name: "EditionEntry" 5108 path: "1*(\Segment\Chapters\EditionEntry)" 5110 id: "0x45B9" 5112 minOccurs: "1" 5114 type: "master" 5116 minver: "1" 5117 documentation: Contains all information about a Segment edition. 5119 7.3.199. EditionUID Element 5121 name: "EditionUID" 5123 path: "0*1(\Segment\Chapters\EditionEntry\EditionUID)" 5125 id: "0x45BC" 5127 maxOccurs: "1" 5129 range: "not 0" 5131 type: "uinteger" 5133 minver: "1" 5135 documentation: A unique ID to identify the edition. It's useful for 5136 tagging an edition. 5138 7.3.200. EditionFlagHidden Element 5140 name: "EditionFlagHidden" 5142 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagHidden)" 5144 id: "0x45BD" 5146 minOccurs: "1" 5148 maxOccurs: "1" 5150 range: "0-1" 5152 default: "0" 5154 type: "uinteger" 5156 minver: "1" 5158 documentation: If an edition is hidden (1), it SHOULD NOT be 5159 available to the user interface (but still to Control Tracks; see 5160 flag notes). (1 bit) 5162 7.3.201. EditionFlagDefault Element 5164 name: "EditionFlagDefault" 5166 path: "1*1(\Segment\Chapters\EditionEntry\EditionFlagDefault)" 5168 id: "0x45DB" 5170 minOccurs: "1" 5172 maxOccurs: "1" 5174 range: "0-1" 5176 default: "0" 5178 type: "uinteger" 5180 minver: "1" 5182 documentation: If a flag is set (1) the edition SHOULD be used as the 5183 default one. (1 bit) 5185 7.3.202. EditionFlagOrdered Element 5187 name: "EditionFlagOrdered" 5189 path: "0*1(\Segment\Chapters\EditionEntry\EditionFlagOrdered)" 5191 id: "0x45DD" 5193 maxOccurs: "1" 5195 range: "0-1" 5197 default: "0" 5199 type: "uinteger" 5201 minver: "1" 5203 documentation: Specify if the chapters can be defined multiple times 5204 and the order to play them is enforced. (1 bit) 5206 7.3.203. ChapterAtom Element 5208 name: "ChapterAtom" 5210 path: "1*(\Segment\Chapters\EditionEntry(1*(\ChapterAtom)))" 5212 id: "0xB6" 5214 minOccurs: "1" 5216 type: "master" 5218 recursive: "1" 5220 minver: "1" 5222 documentation: Contains the atom information to use as the chapter 5223 atom (apply to all tracks). 5225 7.3.204. ChapterUID Element 5227 name: "ChapterUID" 5229 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterUID)" 5231 id: "0x73C4" 5233 minOccurs: "1" 5235 maxOccurs: "1" 5237 range: "not 0" 5239 type: "uinteger" 5241 minver: "1" 5243 documentation: A unique ID to identify the Chapter. 5245 7.3.205. ChapterStringUID Element 5247 name: "ChapterStringUID" 5249 path: 5250 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterStringUID)" 5252 id: "0x5654" 5253 maxOccurs: "1" 5255 type: "utf-8" 5257 minver: "3" 5259 documentation: A unique string ID to identify the Chapter. Use for 5260 WebVTT cue identifier storage. 5262 7.3.206. ChapterTimeStart Element 5264 name: "ChapterTimeStart" 5266 path: 5267 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeStart)" 5269 id: "0x91" 5271 minOccurs: "1" 5273 maxOccurs: "1" 5275 type: "uinteger" 5277 minver: "1" 5279 documentation: Timestamp of the start of Chapter (not scaled). 5281 7.3.207. ChapterTimeEnd Element 5283 name: "ChapterTimeEnd" 5285 path: 5286 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTimeEnd)" 5288 id: "0x92" 5290 maxOccurs: "1" 5292 type: "uinteger" 5294 minver: "1" 5296 documentation: Timestamp of the end of Chapter (timestamp excluded, 5297 not scaled). 5299 7.3.208. ChapterFlagHidden Element 5301 name: "ChapterFlagHidden" 5303 path: 5304 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagHidden)" 5306 id: "0x98" 5308 minOccurs: "1" 5310 maxOccurs: "1" 5312 range: "0-1" 5314 default: "0" 5316 type: "uinteger" 5318 minver: "1" 5320 documentation: If a chapter is hidden (1), it SHOULD NOT be available 5321 to the user interface (but still to Control Tracks; see flag notes). 5322 (1 bit) 5324 7.3.209. ChapterFlagEnabled Element 5326 name: "ChapterFlagEnabled" 5328 path: 5329 "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterFlagEnabled)" 5331 id: "0x4598" 5333 minOccurs: "1" 5335 maxOccurs: "1" 5337 range: "0-1" 5339 default: "1" 5341 type: "uinteger" 5343 minver: "1" 5345 documentation: Specify whether the chapter is enabled. It can be 5346 enabled/disabled by a Control Track. When disabled, the movie SHOULD 5347 skip all the content between the TimeStart and TimeEnd of this 5348 chapter (see flag notes). (1 bit) 5350 7.3.210. ChapterSegmentUID Element 5352 name: "ChapterSegmentUID" 5354 path: 5355 "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentUID)" 5357 id: "0x6E67" 5359 maxOccurs: "1" 5361 range: ">0" 5363 size: "16" 5365 type: "binary" 5367 minver: "1" 5369 documentation: The SegmentUID of another Segment to play during this 5370 chapter. 5372 usage notes: ChapterSegmentUID is mandatory if 5373 ChapterSegmentEditionUID is used. 5375 7.3.211. ChapterSegmentEditionUID Element 5377 name: "ChapterSegmentEditionUID" 5379 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterSegmentE 5380 ditionUID)" 5382 id: "0x6EBC" 5384 maxOccurs: "1" 5386 range: "not 0" 5388 type: "uinteger" 5390 minver: "1" 5392 documentation: The EditionUID to play from the Segment linked in 5393 ChapterSegmentUID. If ChapterSegmentEditionUID is undeclared then no 5394 Edition of the linked Segment is used. 5396 7.3.212. ChapterPhysicalEquiv Element 5398 name: "ChapterPhysicalEquiv" 5400 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterPhysical 5401 Equiv)" 5403 id: "0x63C3" 5405 maxOccurs: "1" 5407 type: "uinteger" 5409 minver: "1" 5411 documentation: Specify the physical equivalent of this ChapterAtom 5412 like "DVD" (60) or "SIDE" (50), see complete list of values. 5414 7.3.213. ChapterTrack Element 5416 name: "ChapterTrack" 5418 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack)" 5420 id: "0x8F" 5422 maxOccurs: "1" 5424 type: "master" 5426 minver: "1" 5428 documentation: List of tracks on which the chapter applies. If this 5429 Element is not present, all tracks apply 5431 7.3.214. ChapterTrackNumber Element 5433 name: "ChapterTrackNumber" 5435 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterTrack\Cha 5436 pterTrackNumber)" 5438 id: "0x89" 5440 minOccurs: "1" 5442 range: "not 0" 5443 type: "uinteger" 5445 minver: "1" 5447 documentation: UID of the Track to apply this chapter too. In the 5448 absence of a control track, choosing this chapter will select the 5449 listed Tracks and deselect unlisted tracks. Absence of this Element 5450 indicates that the Chapter SHOULD be applied to any currently used 5451 Tracks. 5453 7.3.215. ChapterDisplay Element 5455 name: "ChapterDisplay" 5457 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay)" 5459 id: "0x80" 5461 type: "master" 5463 minver: "1" 5465 documentation: Contains all possible strings to use for the chapter 5466 display. 5468 7.3.216. ChapString Element 5470 name: "ChapString" 5472 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ 5473 ChapString)" 5475 id: "0x85" 5477 minOccurs: "1" 5479 maxOccurs: "1" 5481 type: "utf-8" 5483 minver: "1" 5485 documentation: Contains the string to use as the chapter atom. 5487 7.3.217. ChapLanguage Element 5489 name: "ChapLanguage" 5491 path: "1*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5492 hapLanguage)" 5494 id: "0x437C" 5496 minOccurs: "1" 5498 default: "eng" 5500 type: "string" 5502 minver: "1" 5504 documentation: The languages corresponding to the string, in the 5505 bibliographic ISO-639-2 form. This Element MUST be ignored if the 5506 ChapLanguageIETF Element is used within the same ChapterDisplay 5507 Element. 5509 7.3.218. ChapLanguageIETF Element 5511 name: "ChapLanguageIETF" 5513 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\ 5514 ChapLanguageIETF)" 5516 id: "0x437D" 5518 maxOccurs: "1" 5520 type: "string" 5522 minver: "4" 5524 documentation: Specifies the language used in the ChapString 5525 according to BCP 47 and using the IANA Language Subtag Registry. If 5526 this Element is used, then any ChapLanguage Elements used in the same 5527 ChapterDisplay MUST be ignored. 5529 7.3.219. ChapCountry Element 5531 name: "ChapCountry" 5533 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapterDisplay\C 5534 hapCountry)" 5535 id: "0x437E" 5537 type: "string" 5539 minver: "1" 5541 documentation: The countries corresponding to the string, same 2 5542 octets as in Internet domains. This Element MUST be ignored if the 5543 ChapLanguageIETF Element is used within the same ChapterDisplay 5544 Element. 5546 7.3.220. ChapProcess Element 5548 name: "ChapProcess" 5550 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess)" 5552 id: "0x6944" 5554 type: "master" 5556 minver: "1" 5558 documentation: Contains all the commands associated to the Atom. 5560 7.3.221. ChapProcessCodecID Element 5562 name: "ChapProcessCodecID" 5564 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5565 pProcessCodecID)" 5567 id: "0x6955" 5569 minOccurs: "1" 5571 maxOccurs: "1" 5573 default: "0" 5575 type: "uinteger" 5577 minver: "1" 5579 documentation: Contains the type of the codec used for the 5580 processing. A value of 0 means native Matroska processing (to be 5581 defined), a value of 1 means the DVD command set is used. More codec 5582 IDs can be added later. 5584 7.3.222. ChapProcessPrivate Element 5586 name: "ChapProcessPrivate" 5588 path: "0*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5589 pProcessPrivate)" 5591 id: "0x450D" 5593 maxOccurs: "1" 5595 type: "binary" 5597 minver: "1" 5599 documentation: Some optional data attached to the ChapProcessCodecID 5600 information. For ChapProcessCodecID = 1, it is the "DVD level" 5601 equivalent. 5603 7.3.223. ChapProcessCommand Element 5605 name: "ChapProcessCommand" 5607 path: "0*(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Chap 5608 ProcessCommand)" 5610 id: "0x6911" 5612 type: "master" 5614 minver: "1" 5616 documentation: Contains all the commands associated to the Atom. 5618 7.3.224. ChapProcessTime Element 5620 name: "ChapProcessTime" 5622 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5623 pProcessCommand\ChapProcessTime)" 5625 id: "0x6922" 5627 minOccurs: "1" 5629 maxOccurs: "1" 5631 type: "uinteger" 5632 minver: "1" 5634 documentation: Defines when the process command SHOULD be handled 5636 7.3.225. ChapProcessData Element 5638 name: "ChapProcessData" 5640 path: "1*1(\Segment\Chapters\EditionEntry\ChapterAtom\ChapProcess\Cha 5641 pProcessCommand\ChapProcessData)" 5643 id: "0x6933" 5645 minOccurs: "1" 5647 maxOccurs: "1" 5649 type: "binary" 5651 minver: "1" 5653 documentation: Contains the command information. The data SHOULD be 5654 interpreted depending on the ChapProcessCodecID value. For 5655 ChapProcessCodecID = 1, the data correspond to the binary DVD cell 5656 pre/post commands. 5658 7.3.226. Tags Element 5660 name: "Tags" 5662 path: "0*(\Segment\Tags)" 5664 id: "0x1254C367" 5666 type: "master" 5668 minver: "1" 5670 documentation: Element containing metadata describing Tracks, 5671 Editions, Chapters, Attachments, or the Segment as a whole. A list 5672 of valid tags can be found here. 5674 7.3.227. Tag Element 5676 name: "Tag" 5678 path: "1*(\Segment\Tags\Tag)" 5679 id: "0x7373" 5681 minOccurs: "1" 5683 type: "master" 5685 minver: "1" 5687 documentation: A single metadata descriptor. 5689 7.3.228. Targets Element 5691 name: "Targets" 5693 path: "1*1(\Segment\Tags\Tag\Targets)" 5695 id: "0x63C0" 5697 minOccurs: "1" 5699 maxOccurs: "1" 5701 type: "master" 5703 minver: "1" 5705 documentation: Specifies which other elements the metadata 5706 represented by the Tag applies to. If empty or not present, then the 5707 Tag describes everything in the Segment. 5709 7.3.229. TargetTypeValue Element 5711 name: "TargetTypeValue" 5713 path: "0*1(\Segment\Tags\Tag\Targets\TargetTypeValue)" 5715 id: "0x68CA" 5717 maxOccurs: "1" 5719 default: "50" 5721 type: "uinteger" 5723 minver: "1" 5725 documentation: A number to indicate the logical level of the target. 5727 7.3.230. TargetType Element 5729 name: "TargetType" 5731 path: "0*1(\Segment\Tags\Tag\Targets\TargetType)" 5733 id: "0x63CA" 5735 maxOccurs: "1" 5737 type: "string" 5739 minver: "1" 5741 documentation: An informational string that can be used to display 5742 the logical level of the target like "ALBUM", "TRACK", "MOVIE", 5743 "CHAPTER", etc (see TargetType). 5745 7.3.231. TagTrackUID Element 5747 name: "TagTrackUID" 5749 path: "0*(\Segment\Tags\Tag\Targets\TagTrackUID)" 5751 id: "0x63C5" 5753 default: "0" 5755 type: "uinteger" 5757 minver: "1" 5759 documentation: A unique ID to identify the Track(s) the tags belong 5760 to. If the value is 0 at this level, the tags apply to all tracks in 5761 the Segment. 5763 7.3.232. TagEditionUID Element 5765 name: "TagEditionUID" 5767 path: "0*(\Segment\Tags\Tag\Targets\TagEditionUID)" 5769 id: "0x63C9" 5771 default: "0" 5773 type: "uinteger" 5774 minver: "1" 5776 documentation: A unique ID to identify the EditionEntry(s) the tags 5777 belong to. If the value is 0 at this level, the tags apply to all 5778 editions in the Segment. 5780 7.3.233. TagChapterUID Element 5782 name: "TagChapterUID" 5784 path: "0*(\Segment\Tags\Tag\Targets\TagChapterUID)" 5786 id: "0x63C4" 5788 default: "0" 5790 type: "uinteger" 5792 minver: "1" 5794 documentation: A unique ID to identify the Chapter(s) the tags belong 5795 to. If the value is 0 at this level, the tags apply to all chapters 5796 in the Segment. 5798 7.3.234. TagAttachmentUID Element 5800 name: "TagAttachmentUID" 5802 path: "0*(\Segment\Tags\Tag\Targets\TagAttachmentUID)" 5804 id: "0x63C6" 5806 default: "0" 5808 type: "uinteger" 5810 minver: "1" 5812 documentation: A unique ID to identify the Attachment(s) the tags 5813 belong to. If the value is 0 at this level, the tags apply to all 5814 the attachments in the Segment. 5816 7.3.235. SimpleTag Element 5818 name: "SimpleTag" 5820 path: "1*(\Segment\Tags\Tag(1*(\SimpleTag)))" 5821 id: "0x67C8" 5823 minOccurs: "1" 5825 type: "master" 5827 recursive: "1" 5829 minver: "1" 5831 documentation: Contains general information about the target. 5833 7.3.236. TagName Element 5835 name: "TagName" 5837 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagName)" 5839 id: "0x45A3" 5841 minOccurs: "1" 5843 maxOccurs: "1" 5845 type: "utf-8" 5847 minver: "1" 5849 documentation: The name of the Tag that is going to be stored. 5851 7.3.237. TagLanguage Element 5853 name: "TagLanguage" 5855 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagLanguage)" 5857 id: "0x447A" 5859 minOccurs: "1" 5861 maxOccurs: "1" 5863 default: "und" 5865 type: "string" 5867 minver: "1" 5868 documentation: Specifies the language of the tag specified, in the 5869 Matroska languages form. This Element MUST be ignored if the 5870 TagLanguageIETF Element is used within the same SimpleTag Element. 5872 7.3.238. TagLanguageIETF Element 5874 name: "TagLanguageIETF" 5876 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagLanguageIETF)" 5878 id: "0x447B" 5880 maxOccurs: "1" 5882 type: "string" 5884 minver: "4" 5886 documentation: Specifies the language used in the TagString according 5887 to BCP 47 and using the IANA Language Subtag Registry. If this 5888 Element is used, then any TagLanguage Elements used in the same 5889 SimpleTag MUST be ignored. 5891 7.3.239. TagDefault Element 5893 name: "TagDefault" 5895 path: "1*1(\Segment\Tags\Tag\SimpleTag\TagDefault)" 5897 id: "0x4484" 5899 minOccurs: "1" 5901 maxOccurs: "1" 5903 range: "0-1" 5905 default: "1" 5907 type: "uinteger" 5909 minver: "1" 5911 documentation: A boolean value to indicate if this is the default/ 5912 original language to use for the given tag. 5914 7.3.240. TagString Element 5916 name: "TagString" 5918 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagString)" 5920 id: "0x4487" 5922 maxOccurs: "1" 5924 type: "utf-8" 5926 minver: "1" 5928 documentation: The value of the Tag. 5930 7.3.241. TagBinary Element 5932 name: "TagBinary" 5934 path: "0*1(\Segment\Tags\Tag\SimpleTag\TagBinary)" 5936 id: "0x4485" 5938 maxOccurs: "1" 5940 type: "binary" 5942 minver: "1" 5944 documentation: The values of the Tag if it is binary. Note that this 5945 cannot be used in the same SimpleTag as TagString. 5947 If you intend to implement a Matroska player, make sure you can 5948 handle all the files in our test suite [17], or at least the features 5949 presented there, not necessarily the same codecs. 5951 8. Beginning of File 5953 An EBML file always starts with 0x1A. The 0x1A makes the DOS command 5954 "type" ends display. That way you can include ASCII text before the 5955 EBML data and it can be displayed. The EBML parser is safe from 5956 false-alarm with these ASCII only codes. 5958 Next the EBML header is stored. This allows the the parser to know 5959 what type of EBML file it is parsing. 5961 9. Block Timecodes 5963 The Block's timecode is signed integer that represents the Raw 5964 Timecode relative to the Cluster's [18] Timecode [19], multiplied by 5965 the TimecodeScale (see the TimecodeScale notes [20]). 5967 The Block's timecode is represented by a 16bit signed integer 5968 (sint16). This means that the Block's timecode has a range of -32768 5969 to +32767 units. When using the default value of TimecodeScale, each 5970 integer represents 1ms. So, the maximum time span of Blocks in a 5971 Cluster using the default TimecodeScale of 1ms is 65536ms. 5973 If a Cluster's [21] Timecode [22] is set to zero, it is possible to 5974 have Blocks with a negative Raw Timecode. Blocks with a negative Raw 5975 Timecode are not valid. 5977 10. Default decoded field duration 5979 The "DefaultDecodedFieldDuration" Element can signal to the 5980 displaying application how often fields of a video sequence will be 5981 available for displaying. It can be used for both interlaced and 5982 progressive content. 5984 If the video sequence is signaled as interlaced, then the period 5985 between two successive fields at the output of the decoding process 5986 equals DefaultDecodedFieldDuration. 5988 For video sequences signaled as progressive it is twice the value of 5989 DefaultDecodedFieldDuration. 5991 These values are valid at the end of the decoding process before 5992 post-processing like deinterlacing or inverse telecine is applied. 5994 Examples: 5996 o Blu-ray movie: 1000000000ns/(48/1.001) = 20854167ns 5998 o PAL broadcast/DVD: 1000000000ns/(50/1.000) = 20000000ns 6000 o N/ATSC broadcast: 1000000000ns/(60/1.001) = 16683333ns 6002 o hard-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (60 6003 encoded interlaced fields per second) 6005 o soft-telecined DVD: 1000000000ns/(60/1.001) = 16683333ns (48 6006 encoded interlaced fields per second, with "repeat_first_field = 6007 1") 6009 11. Default Values 6011 The default value of an Element is assumed when not present in the 6012 data stream. It is assumed only in the scope of its Parent Element 6013 (for example "Language" in the scope of the "Track" element). If the 6014 "Parent Element" is not present or assumed, then the Element cannot 6015 be assumed. 6017 12. DRM 6019 Digital Rights Management. See Encryption [23]. 6021 13. Encryption 6023 Encryption in Matroska is designed in a very generic style that 6024 allows people to implement whatever form of encryption is best for 6025 them. It is easily possible to use the encryption framework in 6026 Matroska as a type of DRM. 6028 Because the encryption occurs within the Block, it is possible to 6029 manipulate encrypted streams without decrypting them. The streams 6030 could potentially be copied, deleted, cut, appended, or any number of 6031 other possible editing techniques without ever decrypting them. This 6032 means that the data is more useful, without having to expose it, or 6033 go through the intensive process of decrypting. 6035 Encryption can also be layered within Matroska. This means that two 6036 completely different types of encryption can be used, requiring two 6037 separate keys to be able to decrypt a stream. 6039 Encryption information is stored in the "ContentEncodings" Master- 6040 element under the "ContentEncryption" Element. 6042 14. Image cropping 6044 Thanks to the PixelCropXXX elements, it's possible to crop the image 6045 before being resized. That means the image size follows this path: 6047 PixelXXX (size of the coded image) -> PixelCropXXX (size of the image 6048 to keep) -> DisplayXXX (resized cropped image) 6050 15. Matroska version indicators 6052 The EBML Header each Matroska file starts with contains two version 6053 number fields that inform a reading application about what to expect. 6054 These are "DocTypeVersion" and "DocTypeReadVersion". 6056 "DocTypeVersion" MUST contain the highest Matroska version number of 6057 any Element present in the Matroska file. For example, a file using 6058 the SimpleBlock Element MUST have a "DocTypeVersion" of at least 2 6059 while a file containing "CueRelativePosition" Elements MUST have a 6060 "DocTypeVersion" of at least 4. 6062 The "DocTypeReadVersion" MUST contain the minimum version number a 6063 reading application MUST at least support properly in order to play 6064 the file back (optionally with a reduced feature set). For example, 6065 if a file contains only Elements of version 2 or lower except for 6066 "CueRelativePosition" (which is a version 4 Matroska Element) then 6067 "DocTypeReadVersion" SHOULD still be set to 2 and not 4 because 6068 evaluating "CueRelativePosition" is not REQUIRED for standard 6069 playback -- it only makes seeking more precise if used. 6071 "DocTypeVersion" MUST always be equal to or greater than 6072 "DocTypeReadVersion". 6074 A reading application supporting Matroska version "V" MUST NOT refuse 6075 to read an application with "DocReadTypeVersion" equal to or lower 6076 than "V" even if "DocTypeVersion" is greater than "V". See also the 6077 note about Unknown Elements [24]. 6079 16. Mime Types 6081 There is no IETF endorsed MIME type for Matroska files. But you can 6082 use the ones we have defined on our web server: 6084 o .mka : Matroska audio "audio/x-matroska" 6086 o .mkv : Matroska video "video/x-matroska" 6088 o .mk3d : Matroska 3D video "video/x-matroska-3d" 6090 17. Octet 6092 An Octet refers to a byte made of 8 bits. 6094 18. Overlay Track 6096 Overlay tracks SHOULD be rendered in the same 'channel' as the track 6097 it's linked to. When content is found in such a track it is played 6098 on the rendering channel instead of the original track. 6100 19. Segment Position 6102 The "Segment Position" of an "Element" refers to the position of the 6103 first octet of the "Element ID" of that "Element", measured in 6104 octets, from the beginning of the "Element Data" section of the 6105 containing "Segment Element". In other words, the "Segment Position" 6106 of an "Element" is the distance in octets from the beginning of its 6107 containing "Segment Element" minus the size of the "Element ID" and 6108 "Element Data Size" of that "Segment Element". The "Segment 6109 Position" of the first "Child Element" of the "Segment Element" is 0. 6110 An "Element" which is not stored within a "Segment Element", such as 6111 the "Elements" of the "EBML Header", do not have a "Segment 6112 Position". 6114 19.1. Segment Position Exception 6116 "Elements" that are defined to store a "Segment Position" MAY define 6117 reserved values to indicate a special meaning. 6119 19.2. Example of Segment Position 6121 This table presents an example of "Segment Position" by showing a 6122 hexadecimal representation of a very small Matroska file with labels 6123 to show the offsets in octets. The file contains a "Segment Element" 6124 with an "Element ID" of "0x18538067" and a "MuxingApp Element" with 6125 an "Element ID" of "0x4D80". 6127 0 1 2 6128 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 6129 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 6130 0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61|18|53|80|67| 6131 20 |93|15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| 6133 In the above example, the "Element ID" of the "Segment Element" is 6134 stored at offset 16, the "Element Data Size" of the "Segment Element" 6135 is stored at offset 20, and the "Element Data" of the "Segment 6136 Element" is stored at offset 21. 6138 The "MuxingApp Element" is stored at offset 26. Since the "Segment 6139 Position" of an "Element" is calculated by subtracting the position 6140 of the "Element Data" of the containing "Segment Element" from the 6141 position of that "Element", the "Segment Position" of "MuxingApp 6142 Element" in the above example is "26 - 21" or "5". 6144 20. Raw Timecode 6146 The exact time of an object represented in nanoseconds. To find out 6147 a Block's Raw Timecode, you need the Block's timecode, the Cluster's 6148 [25] Timecode [26], and the TimecodeScale. For calculation, please 6149 see the see the TimecodeScale notes. 6151 21. Linked Segments 6153 Matroska provides several methods to link two or many Segments 6154 together to create a Linked Segment. A Linked Segment is a set of 6155 multiple Segments related together into a single presentation by 6156 using Hard Linking, Soft Linking, or Medium Linking. All Segments 6157 within a Linked Segment MUST utilize the same track numbers and 6158 timescale. All Segments within a Linked Segment MUST be stored 6159 within the same directory. All Segments within a Linked Segment MUST 6160 store a "SegmentUID". 6162 21.1. Hard Linking 6164 Hard Linking (also called splitting) is the process of creating a 6165 Linked Segment by relating multiple Segments using the "PrevUID" and 6166 "NextUID" Elements. Within a Linked Segment the timestamps of each 6167 Segment MUST follow consecutively in linking order. With Hard 6168 Linking, the chapters of any Segment within the Linked Segment MUST 6169 only reference the current Segment. With Hard Linking, the "NextUID" 6170 and "PrevUID" MUST reference the respective "SegmentUID" values of 6171 the next and previous Segments. The first Segment of a Linked 6172 Segment MUST have a "NextUID" Element and MUST NOT have a "PrevUID" 6173 Element. The last Segment of a Linked Segment MUST have a "PrevUID" 6174 Element and MUST NOT have a "NextUID" Element. The middle Segments 6175 of a Linked Segment MUST have both a "NextUID" Element and a 6176 "PrevUID" Element. 6178 As an example four Segments MAY be Hard Linked as a Linked Segment 6179 through cross-referencing each other with "SegmentUID", "PrevUID", 6180 and "NextUID" as in this table. 6182 +--------+------------------+-------------------+-------------------+ 6183 | file | SegmentUID | PrevUID | NextUID | 6184 | name | | | | 6185 +--------+------------------+-------------------+-------------------+ 6186 | "start | "71000c23cd31099 | n/a | "a77b3598941cb803 | 6187 | .mkv" | 853fbc94dd984a5d | | eac0fcdafe44fac9" | 6188 | | d" | | | 6189 | "middl | "a77b3598941cb80 | "71000c23cd310998 | "6c92285fa6d3e827 | 6190 | e.mkv" | 3eac0fcdafe44fac | 53fbc94dd984a5dd" | b198d120ea3ac674" | 6191 | | 9" | | | 6192 | "end.m | "6c92285fa6d3e82 | "a77b3598941cb803 | n/a | 6193 | kv" | 7b198d120ea3ac67 | eac0fcdafe44fac9" | | 6194 | | 4" | | | 6195 +--------+------------------+-------------------+-------------------+ 6197 21.2. Soft Linking 6199 Soft Linking is used by codec chapters. They can reference another 6200 Segment and jump to that Segment. The way the Segments are described 6201 are internal to the chapter codec and unknown to the Matroska level. 6202 But there are Elements within the "Info" Element (such as 6203 "ChapterTranslate") that can translate a value representing a Segment 6204 in the chapter codec and to the current "SegmentUID". All Segments 6205 that could be used in a Linked Segment in this way SHOULD be marked 6206 as members of the same family via the SegmentFamily Element, so that 6207 the player can quickly switch from one to the other. 6209 21.3. Medium Linking 6211 Medium Linking creates relationships between Segments using Ordered 6212 Chapters and the "ChapterSegmentUID" Element. A Segment Edition with 6213 Ordered Chapters MAY contain Chapters that reference timestamp ranges 6214 from other Segments. The Segment referenced by the Ordered Chapter 6215 via the "ChapterSegmentUID" Element SHOULD be played as part of a 6216 Linked Segment. The timestamps of Segment content referenced by 6217 Ordered Chapters MUST be adjusted according to the cumulative 6218 duration of the the previous Ordered Chapters. 6220 As an example a file named "intro.mkv" could have a "SegmentUID" of 6221 "0xb16a58609fc7e60653a60c984fc11ead". Another file called 6222 "program.mkv" could use a Chapter Edition that contains two Ordered 6223 Chapters. The first chapter references the Segment of "intro.mkv" 6224 with the use of a "ChapterSegmentUID", "ChapterSegmentEditionUID", 6225 "ChapterTimeStart" and optionally a "ChapterTimeEnd" element. The 6226 second chapter references content within the Segment of 6227 "program.mkv". A player SHOULD recognize the Linked Segment created 6228 by the use of "ChapterSegmentUID" in an enabled Edition and present 6229 the reference content of the two Segments together. 6231 22. Timecode Types 6233 o Absolute Timecode = Block+Cluster 6235 o Relative Timecode = Block 6237 o Scaled Timecode = Block+Cluster 6239 o Raw Timecode = (Block+Cluster)_TimecodeScale_TrackTimecodeScale 6241 23. TimecodeScale 6243 The TimecodeScale [27] is used to calculate the Raw Timecode of a 6244 Block. The timecode is obtained by adding the Block's timecode to 6245 the Cluster's [28] Timecode [29], and then multiplying that result by 6246 the TimecodeScale. The result will be the Block's Raw Timecode in 6247 nanoseconds. The formula for this would look like: 6249 (a + b) * c 6251 a = [Block's Timecode]({{site.baseurl}}/index.html#block-header) 6252 b = [Cluster's](#cluster) [Timecode](#timecode) 6253 c = [TimeCodeScale]({{site.baseurl}}/index.html#TimeCodeScale) 6255 An example of this is, assume a Cluster's [30] Timecode [31] has a 6256 value of 564264, the Block has a Timecode of 1233, and the 6257 timecodescale is the default of 1000000. 6259 (1233 + 564264) * 1000000 = 565497000000 6261 So, the Block in this example has a specific time of 565497000000 in 6262 nanoseconds. In milliseconds this would be 565497ms. 6264 24. TimecodeScale Rounding 6266 Because the default value of TimecodeScale is 1000000, which makes 6267 each integer in the Cluster and Block timecodes equal 1ms, this is 6268 the most commonly used. When dealing with audio, this causes 6269 inaccuracy with where you are seeking to. When the audio is combined 6270 with video, this is not an issue. For most cases the the synch of 6271 audio to video does not need to be more than 1ms accurate. This 6272 becomes obvious when one considers that sound will take 2-3ms to 6273 travel a single meter, so distance from your speakers will have a 6274 greater effect on audio/visual synch than this. 6276 However, when dealing with audio only files, seeking accuracy can 6277 become critical. For instance, when storing a whole CD in a single 6278 track, you want to be able to seek to the exact sample that a song 6279 begins at. If you seek a few sample ahead or behind then a 'crack' 6280 or 'pop' may result as a few odd samples are rendered. Also, when 6281 performing precise editing, it may be very useful to have the audio 6282 accuracy down to a single sample. 6284 It is usually true that when storing timecodes for an audio stream, 6285 the TimecodeScale MUST have an accuracy of at least that of the audio 6286 samplerate, otherwise there are rounding errors that prevent you from 6287 knowing the precise location of a sample. Here's how a program has 6288 to round each timecode in order to be able to recreate the sample 6289 number accurately. 6291 Let's assume that the application has an audio track with a sample 6292 rate of 44100. As written above the TimecodeScale MUST have at least 6293 the accuracy of the sample rate itself: 1000000000 / 44100 = 6294 22675.7369614512. This value MUST always be truncated. Otherwise 6295 the accuracy will not suffice. So in this example the application 6296 will use 22675 for the TimecodeScale. The application could even use 6297 some lower value like 22674 which would allow it to be a little bit 6298 imprecise about the original timecodes. But more about that in a 6299 minute. 6301 Next the application wants to write sample number 52340 and 6302 calculates the timecode. This is easy. In order to calculate the 6303 Raw Timecode in ns all it has to do is calculate "RawTimecode = 6304 round(1000000000 * sample_number / sample_rate)". Rounding at this 6305 stage is very important! The application might skip it if it choses 6306 a slightly smaller value for the TimecodeScale factor instead of the 6307 truncated one like shown above. Otherwise it has to round or the 6308 results won't be reversible. For our example we get "RawTimecode = 6309 round(1000000000 * 52340 / 44100) = round(1186848072.56236) = 6310 1186848073". 6312 The next step is to calculate the Absolute Timecode - that is the 6313 timecode that will be stored in the Matroska file. Here the 6314 application has to divide the Raw Timecode from the previous 6315 paragraph by the TimecodeScale factor and round the result: 6316 "AbsoluteTimecode = round(RawTimecode / TimecodeScale_facotr)" which 6317 will result in the following for our example: "AbsoluteTimecode = 6318 round(1186848073 / 22675) = round(52341.7011245866) = 52342". This 6319 number is the one the application has to write to the file. 6321 Now our file is complete, and we want to play it back with another 6322 application. Its task is to find out which sample the first 6323 application wrote into the file. So it starts reading the Matroska 6324 file and finds the TimecodeScale factor 22675 and the audio sample 6325 rate 44100. Later it finds a data block with the Absolute Timecode 6326 of 52342. But how does it get the sample number from these numbers? 6327 First it has to calculate the Raw Timecode of the block it has just 6328 read. Here's no rounding involved, just an integer multiplication: 6329 "RawTimecode = AbsoluteTimecode * TimecodeScale_factor". In our 6330 example: "RawTimecode = 52342 * 22675 = 1186854850". 6332 The conversion from the RawTimecode to the sample number again 6333 requires rounding: "sample_number = round(RawTimecode * sample_rate / 6334 1000000000)". In our example: "sample_number = round(1186854850 * 6335 44100 / 1000000000) = round(52340.298885) = 52340". This is exactly 6336 the sample number that the previous program started with. 6338 Some general notes for a program: 6340 1. Always calculate the timestamps / sample numbers with floating 6341 point numbers of at least 64bit precision (called 'double' in 6342 most modern programming languages). If you're calculating with 6343 integers then make sure they're 64bit long, too. 6345 2. Always round if you divide. Always! If you don't you'll end up 6346 with situations in which you have a timecode in the Matroska file 6347 that does not correspond to the sample number that it started 6348 with. Using a slightly lower timecode scale factor can help here 6349 in that it removes the need for proper rounding in the conversion 6350 from sample number to Raw Timecode. 6352 25. Track Flags 6354 25.1. Default flag 6356 The "default track" flag is a hint for the playback application and 6357 SHOULD always be changeable by the user. If the user wants to see or 6358 hear a track of a certain kind (audio, video, subtitles) and she 6359 hasn't chosen a specific track then the player SHOULD use the first 6360 track of that kind whose "default track" flag is set to "1". If no 6361 such track is found then the first track of this kind SHOULD be 6362 chosen. 6364 Only one track of a kind MAY have its "default track" flag set in a 6365 segment. If a track entry does not contain the "default track" flag 6366 element then its default value "1" is to be used. 6368 25.2. Forced flag 6370 The "forced" flag tells the playback application that it MUST 6371 display/play this track or another track of the same kind that also 6372 has its "forced" flag set. When there are multiple "forced" tracks, 6373 the player SHOULD determined based upon the language of the forced 6374 flag or use the default flag if no track matches the use languages. 6376 Another track of the same kind without the "forced" flag may be use 6377 simultaneously with the "forced" track (like DVD subtitles for 6378 example). 6380 26. TrackTimecodeScale 6382 The TrackTimecodeScale [32] is used align tracks that would otherwise 6383 be played at different speeds. An example of this would be if you 6384 have a film that was originally recorded at 24fps video. When 6385 playing this back through a PAL broadcasting system, it is standard 6386 to speed up the film to 25fps to match the 25fps display speed of the 6387 PAL broadcasting standard. However, when broadcasting the video 6388 through NTSC, it is typical to leave the film at its original speed. 6389 If you wanted to make a single file where there was one video stream, 6390 and an audio stream used from the PAL broadcast, as well as an audio 6391 stream used from the NTSC broadcast, you would have the problem that 6392 the PAL audio stream would be 1/24th faster than the NTSC audio 6393 stream, quickly leading to problems. It is possible to stretch out 6394 the PAL audio track and re-encode it at a slower speed, however when 6395 dealing with lossy audio codecs, this often results in a loss of 6396 audio quality and/or larger file sizes. 6398 This is the type of problem that TrackTimecodeScale was designed to 6399 fix. Using it, the video can be played back at a speed that will 6400 synch with either the NTSC or the PAL audio stream, depending on 6401 which is being used for playback. To continue the above example: 6403 Track 1: Video 6404 Track 2: NTSC Audio 6405 Track 3: PAL Audio 6407 Because the NTSC track is at the original speed, it will used as the 6408 default value of 1.0 for its TrackTimecodeScale. The video will also 6409 be aligned to the NTSC track with the default value of 1.0. 6411 The TrackTimecodeScale value to use for the PAL track would be 6412 calculated by determining how much faster the PAL track is than the 6413 NTSC track. In this case, because we know the video for the NTSC 6414 audio is being played back at 24fps and the video for the PAL audio 6415 is being played back at 25fps, the calculation would be: 6417 (25 / 24) = ~ 1.04166666666666666667 6419 When writing a file that uses a non-default TrackTimecodeScale, the 6420 values of the Block's timecode are whatever they would be when 6421 normally storing the track with a default value for the 6422 TrackTimecodeScale. However, the data is interleaved a little 6423 differently. Data SHOULD be interleaved by its Raw Timecode [33] in 6424 the order handed back from the encoder. The Raw Timecode of a Block 6425 from a track using TrackTimecodeScale is calculated using: 6427 "(Block's Timecode + Cluster's Timecode) * TimecodeScale * 6428 TrackTimecodeScale" 6430 So, a Block from the PAL track above that had a Scaled Timecode [34] 6431 of 100 seconds would have a Raw Timecode of 104.66666667 seconds, and 6432 so would be stored in that part of the file. 6434 When playing back a track using the TrackTimecodeScale, if the track 6435 is being played by itself, there is no need to scale it. From the 6436 above example, when playing the Video with the NTSC Audio, neither 6437 are scaled. However, when playing back the Video with the PAL Audio, 6438 the timecodes from the PAL Audio track are scaled using the 6439 TrackTimecodeScale, resulting in the video playing back in synch with 6440 the audio. 6442 It would be possible for a player to also adjust the audio's 6443 samplerate at the same time as adjusting the timecodes if you wanted 6444 to play the two audio streams synchronously. It would also be 6445 possible to adjust the video to match the audio's speed. However, 6446 for playback, the selected track(s) timecodes SHOULD be adjusted if 6447 they need to be scaled. 6449 While the above example deals specifically with audio tracks, this 6450 element can be used to align video, audio, subtitles, or any other 6451 type of track contained in a Matroska file. 6453 27. Unknown elements 6455 Matroska is based upon the principal that a reading application does 6456 not have to support 100% of the specifications in order to be able to 6457 play the file. A Matroska file therefore contains version indicators 6458 [35] that tell a reading application what to expect. 6460 It is possible and valid to have the version fields indicate that the 6461 file contains Matroska Elements from a higher specification version 6462 number while signalling that a reading application MUST only support 6463 a lower version number properly in order to play it back (possibly 6464 with a reduced feature set). This implies that a reading application 6465 supporting at least Matroska version V reading a file whose 6466 DocTypeReadVersion field is equal to or lower than V MUST skip 6467 Matroska/EBML Elements it encounters but which it does not know about 6468 if that unknown element fits into the size constraints set by the 6469 current parent element. 6471 28. Multi-planar and 3D videos 6473 There are 2 different ways to compress 3D videos: have each 'eye' 6474 track in a separate track and have one track have both 'eyes' 6475 combined inside (which is more efficient, compression-wise). 6476 Matroska supports both ways. 6478 For the single track variant, there is the StereoMode [36] Element 6479 which defines how planes are assembled in the track (mono or left- 6480 right combined). Odd values of StereoMode means the left plane comes 6481 first for more convenient reading. The pixel count of the track 6482 (PixelWidth/PixelHeight) is the raw amount of pixels (for example 6483 3840x1080 for full HD side by side) and the DisplayWidth/Height in 6484 pixels is the amount of pixels for one plane (1920x1080 for that full 6485 HD stream). Old stereo 3D were displayed using anaglyph (cyan and 6486 red colours separated). For compatibility with such movies, there is 6487 a value of the StereoMode that corresponds to AnaGlyph. 6489 There is also a "packed" mode (values 13 and 14) which consists of 6490 packing 2 frames together in a Block using lacing. The first frame 6491 is the left eye and the other frame is the right eye (or vice versa). 6492 The frames SHOULD be decoded in that order and are possibly dependent 6493 on each other (P and B frames). 6495 For separate tracks, Matroska needs to define exactly which track 6496 does what. TrackOperation [37] with TrackCombinePlanes [38] do that. 6497 For more details look at how TrackOperation works [39]. 6499 The 3D support is still in infancy and may evolve to support more 6500 features. 6502 The StereoMode [40] used to be part of Matroska v2 but it didn't meet 6503 the requirement for multiple tracks. There was also a bug in 6504 libmatroska prior to 0.9.0 that would save/read it as 0x53B9 instead 6505 of 0x53B8. Readers may support these legacy files by checking 6506 Matroska v2 or 0x53B9. The olders values were 0: mono, 1: right eye, 6507 2: left eye, 3: both eyes. 6509 29. Track Operation 6511 TrackOperation [41] allows combining multiple tracks to make a 6512 virtual one. It uses 2 separate system to combine tracks. One to 6513 create a 3D "composition" (left/right/background planes) and one to 6514 simplify join 2 tracks together to make a single track. 6516 A track created with TrackOperation is a proper track with a UID and 6517 all its flags. However the codec ID is meaningless because each 6518 "sub" track needs to be decoded by its own decoder before the 6519 "operation" is applied. The Cues corresponding to such a virtual 6520 track SHOULD be the sum of the Cues elements for each of the tracks 6521 it's composed of (when the Cues are defined per track). 6523 In the case of TrackJoinBlocks, the Blocks (from BlockGroup and 6524 SimpleBlock) of all the tracks SHOULD be used as if they were defined 6525 for this new virtual Track. When 2 Blocks have overlapping start or 6526 end timecodes, it's up to the underlying system to either drop some 6527 of these frames or render them the way they overlap. In the end this 6528 situation SHOULD be avoided when creating such tracks as you can 6529 never be sure of the end result on different platforms. 6531 30. Matroska Element Ordering Guidelines 6533 Except for the EBML Header and the CRC-32 Element, the EBML 6534 specification does not require any particular storage order for 6535 Elements. The Matroska specification however defines mandates and 6536 recommendations for ordering certain Elements in order to facilitate 6537 better playback, seeking, and editing efficiency. This section 6538 describes and offers rationale for ordering requirements and 6539 recommendations for Matroska. 6541 30.1. Top-Level Elements 6543 A valid Matroska file requires only one Top-Level Element, the "Info" 6544 Element; however, to be playable Matroska MUST also contain at least 6545 one "Tracks" and "Cluster" Element. The first "Info" Element and the 6546 first "Tracks" Element MUST either be stored before the first 6547 "Cluster" Element or both be referenced by a "SeekHead" Element which 6548 occurs before the first "Cluster" Element. 6550 After a Matroska file has been created it could still be edited. For 6551 example chapters, tags or attachments can be added. When new Top- 6552 Level Elements are added to a Matroska file the "SeekHead" Element(s) 6553 MUST be updated so that the "SeekHead" Element(s) itemize the 6554 identity and position of all Top-Level Elements. Editing, removing, 6555 or adding Elements to a Matroska file often requires that some 6556 existing Elements be voided or extended; therefore, it is RECOMMENDED 6557 to use Void Elements as padding in between Top-Level Elements. 6559 30.2. CRC-32 6561 As noted by the EBML specification, if a "CRC-32" Element is used 6562 then the "CRC-32" Element MUST be the first ordered Element within 6563 its Parent Element. The Matroska specification recommends that "CRC- 6564 32" Elements SHOULD NOT be used as an immediate Child Element of the 6565 "Segment" Element; however all Top-Level Elements of an EBML Document 6566 SHOULD include a CRC-32 Element as a Child Element. 6568 30.3. SeekHead 6570 If used, the first "SeekHead" Element SHOULD be the first non-"CRC- 6571 32" Child Element of the "Segment" Element. If a second "SeekHead" 6572 Element is used then the first "SeekHead" MUST reference the identity 6573 and position of the second "SeekHead", the second "SeekHead" MUST 6574 only reference "Cluster" Elements and not any other Top-Level Element 6575 already contained within the first "SeekHead", and the second 6576 "SeekHead" MAY be stored in any order relative to the other Top-Level 6577 Elements. Whether one or two "SeekHead" Element(s) are used, the 6578 "SeekHead" Element(s) MUST collectively reference the identity and 6579 position of all Top-Level Elements except for the first "SeekHead" 6580 itself. 6582 It is RECOMMENDED that the first "SeekHead" Element be followed by 6583 some padding (a "Void" Element) to allow for the "SeekHead" Element 6584 to be expanded to cover new Top-Level Elements that could be added to 6585 the Matroska file, such as "Tags", "Chapters" and "Attachments" 6586 Elements. 6588 30.4. Cues (index) 6590 The "Cues Element" is RECOMMENDED to optimize seeking access in 6591 Matroska. It is programmatically simpler to add the "Cues Element" 6592 after all of the "Cluster Elements" are written because this does not 6593 require a prediction of how much space to reserve before writing the 6594 "Cluster Elements". On the other hand, storing the "Cues Element" 6595 before the "Cluster Elements" can provide some seeking advantages. 6596 If the "Cues Element" is present, then it SHOULD either be stored 6597 before the first "Cluster Element" or be referenced by a "SeekHead 6598 Element". 6600 30.5. Info 6602 The first "Info" Element SHOULD occur before the first "Tracks" and 6603 first "Cluster" Element. 6605 30.6. Chapters 6607 The "Chapters" Element SHOULD be placed before the "Cluster" 6608 Element(s). The "Chapters" Element can be used during playback even 6609 if the user doesn't need to seek. It immediately gives the user 6610 information of what section is being read and what other sections are 6611 available. In the case of Ordered Chapters it RECOMMENDED to 6612 evaluate the logical linking even before starting playing anything. 6613 The "Chapters" Element SHOULD be placed before the first "Tracks" 6614 Element and after the first "Info" Element. 6616 30.7. Attachments 6618 The "Attachments" Element is not meant to use by default when playing 6619 the file, but could contain the cover art and/or fonts. Cover art is 6620 useful even before the file is played and fonts could be needed 6621 before playback starts for initialization of subtitles that could use 6622 them. The "Attachments" Element MAY be placed before the first 6623 "Cluster" Element; however if the "Attachments" Element is likely to 6624 be edited, then it SHOULD be placed after the last "Cluster" Element. 6626 30.8. Tags 6628 The "Tags" Element is the one that is most subject to changes after 6629 the file was originally created. So for easier editing the "Tags" 6630 Element SHOULD be placed at the end of the "Segment" Element, even 6631 after the "Attachments" Element. On the other hand, it is 6632 inconvenient to have to seek in the "Segment" for tags especially for 6633 network streams. So it's better if the "Tags" Element(s) are found 6634 early in the stream. When editing the "Tags" Element(s), the 6635 original "Tags" Element at the beginning can be voided [42] and a new 6636 one written right at the end [43] of the "Segment" Element. The file 6637 size will only marginally change. 6639 30.9. Optimum layout from a muxer 6641 o SeekHead 6643 o Info 6645 o Tracks 6647 o Chapters 6649 o Attachments 6651 o Tags 6653 o Clusters 6655 o Cues 6657 30.10. Optimum layout after editing tags 6659 o SeekHead 6661 o Info 6663 o Tracks 6664 o Chapters 6666 o Attachments 6668 o Void 6670 o Clusters 6672 o Cues 6674 o Tags 6676 30.11. Optimum layout with Cues at the front 6678 o SeekHead 6680 o Info 6682 o Tracks 6684 o Chapters 6686 o Attachments 6688 o Tags 6690 o Cues 6692 o Clusters 6694 30.12. Cluster Timecode 6696 As each "BlockGroup" and "SimpleBlock" of a "Cluster" Element needs 6697 the Cluster "Timecode", the "Timecode" Element MUST occur as the 6698 first Child Element within the "Cluster" Element. 6700 31. Codec Mappings 6702 A "Codec Mapping" is a set of attributes to identify, name, and 6703 contextualise the format and characteristics of encoded data that can 6704 be contained within Matroska Clusters. 6706 Each TrackEntry used within Matroska MUST reference a defined "Codec 6707 Mapping" using the "Codec ID" to identify and describe the format of 6708 the encoded data in its associated Clusters. This "Codec ID" is a 6709 unique registered identifier that represents the encoding stored 6710 within the Track. Certain encodings MAY also require some form of 6711 codec initialisation in order to provide its decoder with context and 6712 technical metadata. 6714 The intention behind this list is not to list all existing audio and 6715 video codecs, but rather to list those codecs that are currently 6716 supported in Matroska and therefore need a well defined "Codec ID" so 6717 that all developers supporting Matroska will use the same "Codec ID". 6718 If you feel we missed support for a very important codec, please tell 6719 us on our development mailing list (cellar at ietf.org). 6721 31.1. Defining Matroska Codec Support 6723 Support for a codec is defined in Matroska with the following values. 6725 31.1.1. Codec ID 6727 Each codec supported for storage in Matroska MUST have a unique 6728 "Codec ID". Each "Codec ID" MUST be prefixed with the string from 6729 the following table according to the associated type of the codec. 6730 All characters of a "Codec ID Prefix" MUST be capital letters (A-Z) 6731 except for the last character of a "Codec ID Prefix" which MUST be an 6732 underscore ("_"). 6734 Codec Type | Codec ID Prefix Video | "V_" Audio | "A_" Subtitle | 6735 "S_" Button | "B_" 6737 Each "Codec ID" MUST include a "Major Codec ID" immediately following 6738 the "Codec ID Prefix". A "Major Codec ID" MAY be followed by an 6739 OPTIONAL "Codec ID Suffix" to communicate a refinement of the "Major 6740 Codec ID". If a "Codec ID Suffix" is used, then the "Codec ID" MUST 6741 include a forward slash ("/") as a separator between the "Major Codec 6742 ID" and the "Codec ID Suffix". The "Major Codec ID" MUST be composed 6743 of only capital letters (A-Z) and numbers (0-9). The "Codec ID 6744 Suffix" MUST be composed of only capital letters (A-Z), numbers 6745 (0-9), underscore ("_"), and forward slash ("/"). 6747 The following table provides examples of valid "Codec IDs" and their 6748 components: 6750 Codec ID Prefix | Major Codec ID | Separator | Codec ID Suffix | 6751 Codec ID A_ | AAC | / | MPEG2/LC/SBR | A_AAC/MPEG2/LC/SBR V_ | 6752 V_MPEG4 | / | ISO/ASP | V_MPEG4/ISO/ASP V_ | MPEG1 | | | V_MPEG1 6754 31.1.2. Codec Name 6756 Each encoding supported for storage in Matroska MUST have a Codec 6757 Name. The Codec Name provides a readable label for the encoding. 6759 31.1.3. Description 6761 An optional description for the encoding. This value is only 6762 intended for human consumption. 6764 31.1.4. Initialisation 6766 Each encoding supported for storage in Matroska MUST have a defined 6767 Initialisation. The Initialisation MUST describe the storage of data 6768 necessary to initialise the decoder, which MUST be stored within the 6769 "CodecPrivate Element". When the Initialisation is updated within a 6770 track then that updated Initialisation data MUST be written into the 6771 "CodecState Element" of the first "Cluster" to require it. If the 6772 encoding does not require any form of Initialisation then "none" MUST 6773 be used to define the Initialisation and the "CodecPrivate Element" 6774 SHOULD NOT be written and MUST be ignored. Data that is defined 6775 Initialisation to be stored in the "CodecPrivate Element" is known as 6776 "Private Data". 6778 31.1.5. Citation 6780 Documentation of the associated normative and informative references 6781 for the codec is RECOMMENDED. 6783 31.1.6. Deprecation Date 6785 A timestamp, expressed in [RFC3339] that notes when support for the 6786 "Codec Mapping" within Matroska was deprecated. If a "Codec Mapping" 6787 is defined with a "Deprecation Date", then it is RECOMMENDED that 6788 Matroska writers SHOULD NOT use the "Codec Mapping" after the 6789 "Deprecation Date". 6791 31.1.7. Superseded By 6793 A "Codec Mapping" MAY only be defined with a "Superseded By" value, 6794 if it has an expressed "Deprecation Date". If used, the "Superseded 6795 By" value MUST store the "Codec ID" of another "Codec Mapping" that 6796 has superseded the "Codec Mapping". 6798 31.2. Video Codec Mappings 6800 31.2.1. V_MS/VFW/FOURCC 6802 Codec ID: "V_MS/VFW/FOURCC" 6804 Codec Name: Microsoft (TM) Video Codec Manager (VCM) 6805 Description: The private data contains the VCM structure 6806 BITMAPINFOHEADER including the extra private bytes, as defined by 6807 Microsoft [44]. The data are stored in little endian format (like on 6808 IA32 machines). Where is the Huffman table stored in HuffYUV, not 6809 AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ??? 6811 Initialisation: "Private Data" contains the VCM structure 6812 BITMAPINFOHEADER including the extra private bytes, as defined by 6813 Microsoft in . 6816 Citation: 6819 31.2.2. V_UNCOMPRESSED 6821 Codec ID: V_UNCOMPRESSED 6823 Codec Name: Video, raw uncompressed video frames 6825 Description: All details about the used colour specs and bit depth 6826 are to be put/read from the KaxCodecColourSpace elements. 6828 Initialisation: none 6830 31.2.3. V_MPEG4/ISO/SP 6832 Codec ID: V_MPEG4/ISO/SP 6834 Codec Name: MPEG4 ISO simple profile (DivX4) 6836 Description: Stream was created via improved codec API (UCI) or even 6837 transmuxed from AVI (no b-frames in Simple Profile), frame order is 6838 coding order. 6840 Initialisation: none 6842 31.2.4. V_MPEG4/ISO/ASP 6844 Codec ID: V_MPEG4/ISO/ASP 6846 Codec Name: MPEG4 ISO advanced simple profile (DivX5, XviD, FFMPEG) 6848 Description: Stream was created via improved codec API (UCI) or 6849 transmuxed from MP4, not simply transmuxed from AVI. Note there are 6850 differences how b-frames are handled in these native streams, when 6851 being compared to a VfW created stream, as here there are "no" dummy 6852 frames inserted, the frame order is exactly the same as the coding 6853 order, same as in MP4 streams. 6855 Initialisation: none 6857 31.2.5. V_MPEG4/ISO/AP 6859 Codec ID: V_MPEG4/ISO/AP 6861 Codec Name: MPEG4 ISO advanced profile 6863 Description: Stream was created via improved codec API (UCI) or 6864 transmuxed from MP4, not simply transmuxed from AVI. Note there are 6865 differences how b-frames are handled in these native streams, when 6866 being compared to a VfW created stream, as here there are "no" dummy 6867 frames inserted, the frame order is exactly the same as the coding 6868 order, same as in MP4 streams. 6870 Initialisation: none 6872 31.2.6. V_MPEG4/MS/V3 6874 Codec ID: V_MPEG4/MS/V3 6876 Codec Name: Microsoft (TM) MPEG4 V3 6878 Description: Microsoft (TM) MPEG4 V3 and derivates, means DivX3, 6879 Angelpotion, SMR, etc.; stream was created using VfW codec or 6880 transmuxed from AVI; note that V1/V2 are covered in VfW compatibility 6881 mode. 6883 Initialisation: none 6885 31.2.7. V_MPEG1 6887 Codec ID: V_MPEG1 6889 Codec Name: MPEG 1 6891 Description: The Matroska video stream will contain a demuxed 6892 Elementary Stream (ES), where block boundaries are still to be 6893 defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those 6894 files, and to compare the results with self-made implementations 6896 Initialisation: none 6898 31.2.8. V_MPEG2 6900 Codec ID: V_MPEG2 6902 Codec Name: MPEG 2 6904 Description: The Matroska video stream will contain a demuxed 6905 Elementary Stream (ES), where block boundaries are still to be 6906 defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those 6907 files, and to compare the results with self-made implementations 6909 Initialisation: none 6911 31.2.9. V_REAL/RV10 6913 Codec ID: V_REAL/RV10 6915 Codec Name: RealVideo 1.0 aka RealVideo 5 6917 Description: Individual slices from the Real container are combined 6918 into a single frame. 6920 Initialisation: The "Private Data" contains a "real_video_props_t" 6921 structure in Big Endian byte order as found in librmff [45]. 6923 31.2.10. V_REAL/RV20 6925 Codec ID: V_REAL/RV20 6927 Codec Name: RealVideo G2 and RealVideo G2+SVT 6929 Description: Individual slices from the Real container are combined 6930 into a single frame. 6932 Initialisation: The "Private Data" contains a "real_video_props_t" 6933 structure in Big Endian byte order as found in librmff [46]. 6935 31.2.11. V_REAL/RV30 6937 Codec ID: V_REAL/RV30 6939 Codec Name: RealVideo 8 6941 Description: Individual slices from the Real container are combined 6942 into a single frame. 6944 Initialisation: The "Private Data" contains a "real_video_props_t" 6945 structure in Big Endian byte order as found in librmff [47]. 6947 31.2.12. V_REAL/RV40 6949 Codec ID: V_REAL/RV40 6951 Codec Name: rv40 : RealVideo 9 6953 Description: Individual slices from the Real container are combined 6954 into a single frame. 6956 Initialisation: The "Private Data" contains a "real_video_props_t" 6957 structure in Big Endian byte order as found in librmff [48]. 6959 31.2.13. V_QUICKTIME 6961 Codec ID: V_QUICKTIME 6963 Codec Name: Video taken from QuickTime(TM) files 6965 Description: Several codecs as stored in QuickTime, e.g. Sorenson or 6966 Cinepak. 6968 Initialisation: The "Private Data" contains all additional data that 6969 is stored in the 'stsd' (sample description) atom in the QuickTime 6970 file *after* the mandatory video descriptor structure (starting with 6971 the size and FourCC fields). For an explanation of the QuickTime 6972 file format read QuickTime File Format Specification [49]. 6974 31.2.14. V_THEORA 6976 Codec ID: V_THEORA 6978 Codec Name: Theora 6980 Initialisation: The "Private Data" contains the first three Theora 6981 packets in order. The lengths of the packets precedes them. The 6982 actual layout is: 6984 o Byte 1: number of distinct packets '"#p"' minus one inside the 6985 CodecPrivate block. This MUST be '2' for current (as of 6986 2016-07-08) Theora headers. 6988 o Bytes 2..n: lengths of the first '"#p"' packets, coded in Xiph- 6989 style lacing [50]. The length of the last packet is the length of 6990 the CodecPrivate block minus the lengths coded in these bytes 6991 minus one. 6993 o Bytes n+1..: The Theora identification header, followed by the 6994 commend header followed by the codec setup header. Those are 6995 described in the Theora specs [51]. 6997 31.2.15. V_PRORES 6999 Codec ID: V_PRORES 7001 Codec Name: Apple ProRes 7003 Initialisation: The "Private Data" contains the fourcc as found in 7004 MP4 movies: 7006 o apch: ProRes 422 High Quality 7008 o apcn: ProRes 422 Standard Definition 7010 o apcs: ProRes 422 LT 7012 o apco: ProRes 422 Proxy 7014 o ap4h: ProRes 4444 7016 this page for more technical details on ProRes [52] 7018 31.2.16. V_VP8 7020 Codec ID: V_VP8 7022 Codec Name: VP8 Codec format 7024 Description: VP8 is an open and royalty free video compression format 7025 developed by Google and created by On2 Technologies as a successor to 7026 VP7. [RFC6386] 7028 Initialisation: none 7030 31.2.17. V_VP9 7032 Codec ID: V_VP9 7034 Codec Name: VP9 Codec format 7036 Description: VP9 is an open and royalty free video compression format 7037 developed by Google as a successor to VP8. Draft VP9 Bitstream and 7038 Decoding Process Specification [53] 7040 Initialisation: none 7042 31.2.18. V_FFV1 7044 Codec ID: V_FFV1 7046 Codec Name: FF Video Codec 1 7048 Description: FFV1 is a lossless intra-frame video encoding format 7049 designed to efficiently compress video data in a variety of pixel 7050 formats. Compared to uncompressed video, FFV1 offers storage 7051 compression, frame fixity, and self-description, which makes FFV1 7052 useful as a preservation or intermediate video format. Draft FFV1 7053 Specification [54] 7055 Initialisation: For FFV1 versions 0 or 1, "Private Data" SHOULD NOT 7056 be written. For FFV1 version 3 or greater, the "Private Data" MUST 7057 contain the FFV1 Configuration Record structure, as defined in 7058 , and no other data. 7061 31.3. Audio Codec Mappings 7063 31.3.1. A_MPEG/L3 7065 Codec ID: A_MPEG/L3 7067 Codec Name: MPEG Audio 1, 2, 2.5 Layer III 7069 Description: The data contain everything needed for playback in the 7070 MPEG Audio header of each frame. Corresponding ACM wFormatTag : 7071 0x0055 7073 Initialisation: none 7075 31.3.2. A_MPEG/L2 7077 Codec ID: A_MPEG/L2 7079 Codec Name: MPEG Audio 1, 2 Layer II 7081 Description: The data contain everything needed for playback in the 7082 MPEG Audio header of each frame. Corresponding ACM wFormatTag : 7083 0x0050 7085 Initialisation: none 7087 31.3.3. A_MPEG/L1 7089 Codec ID: A_MPEG/L1 7091 Codec Name: MPEG Audio 1, 2 Layer I 7093 Description: The data contain everything needed for playback in the 7094 MPEG Audio header of each frame. Corresponding ACM wFormatTag : 7095 0x0050 7097 Initialisation: none 7099 31.3.4. A_PCM/INT/BIG 7101 Codec ID: A_PCM/INT/BIG 7103 Codec Name: PCM Integer Big Endian 7105 Description: The bitdepth has to be read and set from 7106 KaxAudioBitDepth element. Corresponding ACM wFormatTag : ??? 7108 Initialisation: none 7110 31.3.5. A_PCM/INT/LIT 7112 Codec ID: A_PCM/INT/LIT 7114 Codec Name: PCM Integer Little Endian 7116 Description: The bitdepth has to be read and set from 7117 KaxAudioBitDepth element. Corresponding ACM wFormatTag : 0x0001 7119 Initialisation: none 7121 31.3.6. A_PCM/FLOAT/IEEE 7123 Codec ID: A_PCM/FLOAT/IEEE 7125 Codec Name: Floating Point, IEEE compatible 7127 Description: The bitdepth has to be read and set from 7128 KaxAudioBitDepth element (32 bit in most cases). The float are 7129 stored in little endian order (most common float format). 7130 Corresponding ACM wFormatTag : 0x0003 7132 Initialisation: none 7134 31.3.7. A_MPC 7136 Codec ID: A_MPC 7138 Codec Name: MPC (musepack) SV8 7140 Description: The main developer for musepack has requested that we 7141 wait until the SV8 framing has been fully defined for musepack before 7142 defining how to store it in Matroska. 7144 31.3.8. A_AC3 7146 Codec ID: A_AC3 7148 Codec Name: (Dolby[TM]) AC3 7150 Description: BSID <= 8 !! The private data is void ??? Corresponding 7151 ACM wFormatTag : 0x2000 ; channel number have to be read from the 7152 corresponding audio element 7154 31.3.9. A_AC3/BSID9 7156 Codec ID: A_AC3/BSID9 7158 Codec Name: (Dolby[TM]) AC3 7160 Description: The ac3 frame header has, similar to the mpeg-audio 7161 header a version field. Normal ac3 is defined as bitstream id 8 (5 7162 Bits, numbers are 0-15). Everything below 8 is still compatible with 7163 all decoders that handle 8 correctly. Everything higher are 7164 additions that break decoder compatibility. For the samplerates 7165 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the 7166 samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10 7168 Initialisation: none 7170 31.3.10. A_AC3/BSID10 7172 Codec ID: A_AC3/BSID10 7174 Codec Name: (Dolby[TM]) AC3 7176 Description: The ac3 frame header has, similar to the mpeg-audio 7177 header a version field. Normal ac3 is defined as bitstream id 8 (5 7178 Bits, numbers are 0-15). Everything below 8 is still compatible with 7179 all decoders that handle 8 correctly. Everything higher are 7180 additions that break decoder compatibility. For the samplerates 7181 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the 7182 samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10 7184 Initialisation: none 7186 31.3.11. A_ALAC 7188 Codec ID: A_ALAC 7190 Codec Name: ALAC (Apple Lossless Audio Codec) 7192 Initialisation: The "Private Data" contains ALAC's magic cookie (both 7193 the codec specific configuration as well as the optional channel 7194 layout information). Its format is described in ALAC's official 7195 source code [55]. 7197 31.3.12. A_DTS 7199 Codec ID: A_DTS 7201 Codec Name: Digital Theatre System 7203 Description: Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution 7204 Audio and DTS-HD Master Audio. The private data is void. 7205 Corresponding ACM wFormatTag : 0x2001 7207 Initialisation: none 7209 31.3.13. A_DTS/EXPRESS 7211 Codec ID: A_DTS/EXPRESS 7213 Codec Name: Digital Theatre System Express 7215 Description: DTS Express (a.k.a. LBR) audio streams. The private 7216 data is void. Corresponding ACM wFormatTag : 0x2001 7218 Initialisation: none 7220 31.3.14. A_DTS/LOSSLESS 7222 Codec ID: A_DTS/LOSSLESS 7224 Codec Name: Digital Theatre System Lossless 7226 Description: DTS Lossless audio that does not have a core substream. 7227 The private data is void. Corresponding ACM wFormatTag : 0x2001 7228 Initialisation: none 7230 31.3.15. A_VORBIS 7232 Codec ID: A_VORBIS 7234 Codec Name: Vorbis 7236 Initialisation: The "Private Data" contains the first three Vorbis 7237 packet in order. The lengths of the packets precedes them. The 7238 actual layout is: - Byte 1: number of distinct packets '"#p"' minus 7239 one inside the CodecPrivate block. This MUST be '2' for current (as 7240 of 2016-07-08) Vorbis headers. - Bytes 2..n: lengths of the first 7241 '"#p"' packets, coded in Xiph-style lacing [56]. The length of the 7242 last packet is the length of the CodecPrivate block minus the lengths 7243 coded in these bytes minus one. - Bytes n+1..: The Vorbis 7244 identification header [57], followed by the Vorbis comment header 7245 [58] followed by the codec setup header [59]. 7247 31.3.16. A_FLAC 7249 Codec ID: A_FLAC 7251 Codec Name: FLAC (Free Lossless Audio Codec) [60] 7253 Initialisation: The "Private Data" contains all the header/metadata 7254 packets before the first data packet. These include the first header 7255 packet containing only the word "fLaC" as well as all metadata 7256 packets. 7258 31.3.17. A_REAL/14_4 7260 Codec ID: A_REAL/14_4 7262 Codec Name: Real Audio 1 7264 Initialisation: The "Private Data" contains either the 7265 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7266 (differentiated by their "version" field; Big Endian byte order) as 7267 found in librmff [61]. 7269 31.3.18. A_REAL/28_8 7271 Codec ID: A_REAL/28_8 7273 Codec Name: Real Audio 2 7274 Initialisation: The "Private Data" contains either the 7275 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7276 (differentiated by their "version" field; Big Endian byte order) as 7277 found in librmff [62]. 7279 31.3.19. A_REAL/COOK 7281 Codec ID: A_REAL/COOK 7283 Codec Name: Real Audio Cook Codec (codename: Gecko) 7285 Initialisation: The "Private Data" contains either the 7286 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7287 (differentiated by their "version" field; Big Endian byte order) as 7288 found in librmff [63]. 7290 31.3.20. A_REAL/SIPR 7292 Codec ID: A_REAL/SIPR 7294 Codec Name: Sipro Voice Codec 7296 Initialisation: The "Private Data" contains either the 7297 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7298 (differentiated by their "version" field; Big Endian byte order) as 7299 found in librmff [64]. 7301 31.3.21. A_REAL/RALF 7303 Codec ID: A_REAL/RALF 7305 Codec Name: Real Audio Lossless Format 7307 Initialisation: The "Private Data" contains either the 7308 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7309 (differentiated by their "version" field; Big Endian byte order) as 7310 found in librmff [65]. 7312 31.3.22. A_REAL/ATRC 7314 Codec ID: A_REAL/ATRC 7316 Codec Name: Sony Atrac3 Codec 7318 Initialisation: The "Private Data" contains either the 7319 "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure 7320 (differentiated by their "version" field; Big Endian byte order) as 7321 found in librmff [66]. 7323 31.3.23. A_MS/ACM 7325 Codec ID: A_MS/ACM 7327 Codec Name: Microsoft(TM) Audio Codec Manager (ACM) 7329 Description: The data are stored in little endian format (like on 7330 IA32 machines). 7332 Initialisation: The "Private Data" contains the ACM structure 7333 WAVEFORMATEX including the extra private bytes, as defined by 7334 Microsoft [67]. 7336 31.3.24. A_AAC/MPEG2/MAIN 7338 Codec ID: A_AAC/MPEG2/MAIN 7340 Codec Name: MPEG2 Main Profile 7342 Description: Channel number and sample rate have to be read from the 7343 corresponding audio element. Audio stream is stripped from ADTS 7344 headers and normal Matroska frame based muxing scheme is applied. 7345 AAC audio always uses wFormatTag 0xFF. 7347 Initialisation: none 7349 31.3.25. A_AAC/MPEG2/LC 7351 Codec ID: A_AAC/MPEG2/LC 7353 Codec Name: Low Complexity 7355 Description: Channel number and sample rate have to be read from the 7356 corresponding audio element. Audio stream is stripped from ADTS 7357 headers and normal Matroska frame based muxing scheme is applied. 7358 AAC audio always uses wFormatTag 0xFF. 7360 Initialisation: none 7362 31.3.26. A_AAC/MPEG2/LC/SBR 7364 Codec ID: A_AAC/MPEG2/LC/SBR 7366 Codec Name: Low Complexity with Spectral Band Replication 7368 Description: Channel number and sample rate have to be read from the 7369 corresponding audio element. Audio stream is stripped from ADTS 7370 headers and normal Matroska frame based muxing scheme is applied. 7371 AAC audio always uses wFormatTag 0xFF. 7373 Initialisation: none 7375 31.3.27. A_AAC/MPEG2/SSR 7377 Codec ID: A_AAC/MPEG2/SSR 7379 Codec Name: Scalable Sampling Rate 7381 Description: Channel number and sample rate have to be read from the 7382 corresponding audio element. Audio stream is stripped from ADTS 7383 headers and normal Matroska frame based muxing scheme is applied. 7384 AAC audio always uses wFormatTag 0xFF. 7386 Initialisation: none 7388 31.3.28. A_AAC/MPEG4/MAIN 7390 Codec ID: A_AAC/MPEG4/MAIN 7392 Codec Name: MPEG4 Main Profile 7394 Description: Channel number and sample rate have to be read from the 7395 corresponding audio element. Audio stream is stripped from ADTS 7396 headers and normal Matroska frame based muxing scheme is applied. 7397 AAC audio always uses wFormatTag 0xFF. 7399 Initialisation: none 7401 31.3.29. A_AAC/MPEG4/LC 7403 Codec ID: A_AAC/MPEG4/LC 7405 Codec Name: Low Complexity 7407 Description: Channel number and sample rate have to be read from the 7408 corresponding audio element. Audio stream is stripped from ADTS 7409 headers and normal Matroska frame based muxing scheme is applied. 7410 AAC audio always uses wFormatTag 0xFF. 7412 Initialisation: none 7414 31.3.30. A_AAC/MPEG4/LC/SBR 7416 Codec ID: A_AAC/MPEG4/LC/SBR 7418 Codec Name: Low Complexity with Spectral Band Replication 7420 Description: Channel number and sample rate have to be read from the 7421 corresponding audio element. Audio stream is stripped from ADTS 7422 headers and normal Matroska frame based muxing scheme is applied. 7423 AAC audio always uses wFormatTag 0xFF. 7425 Initialisation: none 7427 31.3.31. A_AAC/MPEG4/SSR 7429 Codec ID: A_AAC/MPEG4/SSR 7431 Codec Name: Scalable Sampling Rate 7433 Description: Channel number and sample rate have to be read from the 7434 corresponding audio element. Audio stream is stripped from ADTS 7435 headers and normal Matroska frame based muxing scheme is applied. 7436 AAC audio always uses wFormatTag 0xFF. 7438 Initialisation: none 7440 31.3.32. A_AAC/MPEG4/LTP 7442 Codec ID: A_AAC/MPEG4/LTP 7444 Codec Name: Long Term Prediction 7446 Description: Channel number and sample rate have to be read from the 7447 corresponding audio element. Audio stream is stripped from ADTS 7448 headers and normal Matroska frame based muxing scheme is applied. 7449 AAC audio always uses wFormatTag 0xFF. 7451 Initialisation: none 7453 31.3.33. A_QUICKTIME 7455 Codec ID: A_QUICKTIME 7457 Codec Name: Audio taken from QuickTime(TM) files 7459 Description: Several codecs as stored in QuickTime, e.g. QDesign 7460 Music v1 or v2. 7462 Initialisation: The "Private Data" contains all additional data that 7463 is stored in the 'stsd' (sample description) atom in the QuickTime 7464 file *after* the mandatory sound descriptor structure (starting with 7465 the size and FourCC fields). For an explanation of the QuickTime 7466 file format read QuickTime File Format Specification [68]. 7468 31.3.34. A_QUICKTIME/QDMC 7470 Codec ID: A_QUICKTIME/QDMC 7472 Codec Name: QDesign Music 7474 Description: 7476 Initialisation: The "Private Data" contains all additional data that 7477 is stored in the 'stsd' (sample description) atom in the QuickTime 7478 file *after* the mandatory sound descriptor structure (starting with 7479 the size and FourCC fields). For an explanation of the QuickTime 7480 file format read QuickTime File Format Specification [69]. 7482 Superseded By: A_QUICKTIME 7484 31.3.35. A_QUICKTIME/QDM2 7486 Codec ID: A_QUICKTIME/QDM2 7488 Codec Name: QDesign Music v2 7490 Description: 7492 Initialisation: The "Private Data" contains all additional data that 7493 is stored in the 'stsd' (sample description) atom in the QuickTime 7494 file *after* the mandatory sound descriptor structure (starting with 7495 the size and FourCC fields). For an explanation of the QuickTime 7496 file format read QuickTime File Format Specification [70]. 7498 Superseded By: A_QUICKTIME 7500 31.3.36. A_TTA1 7502 Codec ID: A_TTA1 7504 Codec Name: The True Audio [71] lossless audio compressor 7506 Description: TTA format description [72] Each frame is kept intact, 7507 including the CRC32. The header and seektable are dropped. 7508 SamplingFrequency, Channels and BitDepth are used in the TrackEntry. 7509 wFormatTag = 0x77A1 7510 Initialisation: none 7512 31.3.37. A_WAVPACK4 7514 Codec ID: A_WAVPACK4 7516 Codec Name: WavPack [73] lossless audio compressor 7518 Description: The Wavpack packets consist of a stripped header 7519 followed by the frame data. For multi-track (> 2 tracks) a frame 7520 consists of many packets. For hybrid files (lossy part + correction 7521 part), the correction part is stored in an additional block (level 7522 1). For more details, check the WavPack muxing description [74]. 7524 Initialisation: none 7526 31.4. Subtitle Codec Mappings 7528 31.4.1. S_TEXT/UTF8 7530 Codec ID: S_TEXT/UTF8 7532 Codec Name: UTF-8 Plain Text 7534 Description: Basic text subtitles. For more information, please look 7535 at the Subtitle specifications [75]. 7537 31.4.2. S_TEXT/SSA 7539 Codec ID: S_TEXT/SSA 7541 Codec Name: Subtitles Format 7543 Description: The [Script Info] and [V4 Styles] sections are stored in 7544 the codecprivate. Each event is stored in its own Block. For more 7545 information, please read the specs for SSA/ASS [76]. 7547 31.4.3. S_TEXT/ASS 7549 Codec ID: S_TEXT/ASS 7551 Codec Name: Advanced Subtitles Format 7553 Description: The [Script Info] and [V4 Styles] sections are stored in 7554 the codecprivate. Each event is stored in its own Block. For more 7555 information, please read the specs for SSA/ASS [77]. 7557 31.4.4. S_TEXT/USF 7559 Codec ID: S_TEXT/USF 7561 Codec Name: Universal Subtitle Format 7563 Description: This is mostly defined, but not typed out yet. It will 7564 first be available on the USF specs page [78]. 7566 31.4.5. S_TEXT/WEBVTT 7568 Codec ID: S_TEXT/WEBVTT 7570 Codec Name: Web Video Text Tracks Format (WebVTT) 7572 Description: Advanced text subtitles. For more information about the 7573 storage please look at the WebVTT in Matroska specifications [79]. 7575 31.4.6. S_IMAGE/BMP 7577 Codec ID: S_IMAGE/BMP 7579 Codec Name: Bitmap 7581 Description: Basic image based subtitle format; The subtitles are 7582 stored as images, like in the DVD. The timestamp in the block header 7583 of Matroska indicates the start display time, the duration is set 7584 with the Duration element. The full data for the subtitle bitmap is 7585 stored in the Block's data section. 7587 31.4.7. S_DVBSUB 7589 Codec ID: S_DVBSUB 7591 Codec Name: Digital Video Broadcasting (DVB) subtitles 7593 Description: This is the graphical subtitle format used in the 7594 Digital Video Broadcasting standard. For more information about the 7595 storage please look at the Digital Video Broadcasting (DVB) subtitles 7596 in Matroska specifications [80]. 7598 31.4.8. S_VOBSUB 7600 Codec ID: S_VOBSUB 7602 Codec Name: VobSub subtitles 7603 Description: The same subtitle format used on DVDs. Supported is 7604 only format version 7 and newer. VobSubs consist of two files, the 7605 .idx containing information, and the .sub, containing the actual 7606 data. The .idx file is stripped of all empty lines, of all comments 7607 and of lines beginning with "alt:" or "langidx:". The line beginning 7608 with "id:" SHOULD be transformed into the appropriate Matroska track 7609 language element and is discarded. All remaining lines but the ones 7610 containing timestamps and file positions are put into the 7611 "CodecPrivate" element. 7613 For each line containing the timestamp and file position data is read 7614 from the appropriate position in the .sub file. This data consists 7615 of a MPEG program stream which in turn contains SPU packets. The 7616 MPEG program stream data is discarded, and each SPU packet is put 7617 into one Matroska frame. 7619 31.4.9. S_HDMV/PGS 7621 Codec ID: S_HDMV/PGS 7623 Codec Name: HDMV presentation graphics subtitles (PGS) 7625 Description: This is the graphical subtitle format used on Blu-rays. 7626 For more information about the storage please look at the HDMV 7627 presentation graphics subtitles in Matroska specifications [81]. 7629 31.4.10. S_HDMV/TEXTST 7631 Codec ID: S_HDMV/TEXTST 7633 Codec Name: HDMV text subtitles 7635 Description: This is the textual subtitle format used on Blu-rays. 7636 For more information about the storage please look at the HDMV text 7637 subtitles in Matroska specifications [82]. 7639 31.4.11. S_KATE 7641 Codec ID: S_KATE 7643 Codec Name: Karaoke And Text Encapsulation 7645 Description: A subtitle format developed for ogg. The mapping for 7646 Matroska is described on the Xiph wiki [83]. As for Theora and 7647 Vorbis, Kate headers are stored in the private data as xiph-laced 7648 packets. 7650 31.5. Button Codec Mappings 7652 31.5.1. B_VOBBTN 7654 Codec ID: B_VOBBTN 7656 Codec Name: VobBtn Buttons 7658 Description: Based on MPEG/VOB PCI packets [84]. The file contains a 7659 header consisting of the string "butonDVD" followed by the width and 7660 height in pixels (16 bits integer each) and 4 reserved bytes. The 7661 rest is full PCI packets [85]. #Chapters 7663 31.6. Edition and Chapter Flags 7665 31.6.1. Chapter Flags 7667 Two "Chapter Flags" are defined to describe the bevahior of the 7668 "ChapterAtom Element": "ChapterFlagHidden" and "ChapterFlagEnabled". 7670 If a "ChapterAtom Element" is a "Child Element" of another 7671 "ChapterAtom Element" which has a "Chapter Flag" set to "true", then 7672 the "Child ChapterAtom Element" MUST be interpretted as having its 7673 same "Chapter Flag" set to "true". If a "ChapterAtom Element" is a 7674 "Child Element" of another "ChapterAtom Element" which has a "Chapter 7675 Flag" set to "false" or the "ChapterAtom Element" does not have a 7676 "ChapterAtom Element" as its "Parent Element", then it MUST be 7677 interpretted according to its own "Chapter Flag". 7679 As an example, consider a "Parent ChapterAtom Element" that has its 7680 "ChapterFlagHidden" set to "true" and also contains two child 7681 "ChapterAtoms", the first with "ChapterFlagHidden" set to "true" and 7682 the second with "ChapterFlagHidden" either set to "false" or not 7683 present at all (in which case the default value of the Element 7684 applies, which is "false"). Since the parent "ChapterAtom" has its 7685 "ChapterFlagHidden" set to "true" then all of its children 7686 "ChapterAtoms" MUST also be interpretted as if their 7687 "ChapterFlagHidden" is also set to "true". However, if a "Control 7688 Track" toggles the parent's "ChapterFlagHidden" flag to "false", then 7689 only the parent "ChapterAtom" and its second child "ChapterAtom" MUST 7690 be interpretted as if "ChapterFlagHidden" is set to "false". The 7691 first child "ChapterAtom" which has the "ChapterFlagHidden" flag set 7692 to "true" retains its value until its value is toggled to "false" by 7693 a "Control Track". 7695 31.6.2. Edition Flags 7697 Three "Edition Flags" are defined to describe the bevahior of the 7698 "EditionEntry Element": "EditionFlagHidden", "EditionFlagDefault" and 7699 "EditionFlagOrdered". 7701 The "EditionFlagHidden" Flag behaves similarly to the 7702 "ChapterFlagHidden" Flag: if "EditionFlagHidden" is set to "true" 7703 then its "Child ChapterAtoms Elements" MUST also be interpretted as 7704 if their "ChapterFlagHidden" is also set to "true", regardless of 7705 their own "ChapterFlagHidden" flags. If the "EditionFlagHidden" is 7706 toggled by a "Control Track" to "false" then the "ChapterFlagHidden" 7707 Flags of the "Child ChapterAtoms Elements" SHALL determine if the 7708 "ChapterAtom" is hidden or not. 7710 31.7. Menu features 7712 The menu features are handled like a _chapter codec_. That means each 7713 codec has a type, some private data and some data in the chapters. 7715 The type of the menu system is defined by the ChapProcessCodecID 7716 parameter. For now only 2 values are supported : 0 matroska script, 7717 1 menu borrowed from the DVD. The private data depend on the type of 7718 menu system (stored in ChapProcessPrivate), idem for the data in the 7719 chapters (stored in ChapProcessData). 7721 31.7.1. Matroska Script (0) 7723 This is the case when ChapProcessCodecID [86] = 0. This is a script 7724 language build for Matroska purposes. The inspiration comes from 7725 ActionScript, javascript and other similar scripting languages. The 7726 commands are stored as text commands, in UTF-8. The syntax is C 7727 like, with commands spanned on many lines, each terminating with a 7728 ";". You can also include comments at the end of lines with "//" or 7729 comment many lines using "/* */". The scripts are stored in 7730 ChapProcessData. For the moment ChapProcessPrivate is not used. 7732 The one and only command existing for the moment is "GotoAndPlay( 7733 ChapterUID );". As the same suggests, it means that when this 7734 command is encountered, the playback SHOULD jump to the Chapter 7735 specified by the UID and play it. 7737 31.7.2. DVD menu (1) 7739 This is the case when ChapProcessCodecID [87] = 1. Each level of a 7740 chapter corresponds to a logical level in the DVD system that is 7741 stored in the first octet of the ChapProcessPrivate. This DVD 7742 hierarchy is as follows: 7744 ChapProcessPrivate | DVD Name | Hierarchy | Commands Possible | 7745 Comment 0x30 | SS | DVD domain | - | First Play, Video Manager, Video 7746 Title 0x2A | LU | Language Unit | - | Contains only PGCs 0x28 | TT | 7747 Title | - | Contains only PGCs 0x20 | PGC | Program Group Chain 7748 (PGC) | * | 0x18 | PG | Program 1 / Program 2 / Program 3 | - | 7749 0x10 | PTT | Part Of Title 1 / Part Of Title 2 | - | Equivalent to 7750 the chapters on the sleeve. 0x08 | CN | Cell 1 / Cell 2 / Cell 3 / 7751 Cell 4 / Cell 5 / Cell 6 | - | 7753 You can also recover wether a Segment is a Video Manager (VMG), Video 7754 Title Set (VTS) or Video Title Set Menu (VTSM) from the 7755 ChapterTranslateID [88] element found in the Segment Info. This 7756 field uses 2 octets as follows: 7758 1. Domain Type: 0 for VMG, the domain number for VTS and VTSM 7760 2. Domain Value: 0 for VMG and VTSM, 1 for the VTS source. 7762 For instance, the menu part from VTS_01_0.VOB would be coded [1,0] 7763 and the content part from VTS_02_3.VOB would be [2,1]. The VMG is 7764 always [0,0] 7766 The following octets of ChapProcessPrivate are as follows: 7768 Octet 1 | DVD Name | Following Octets 0x30 | SS | Domain name code 7769 (1: 0x00= First play, 0xC0= VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) 7770 number (2) 0x2A | LU | Language code (2) + Language extension (1) 7771 0x28 | TT | global Title number (2) + corresponding TTN of the VTS 7772 (1) 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled User 7773 Operations (4) 0x18 | PG | Program number (2) 0x10 | PTT | PTT- 7774 chapter number (1) 0x08 | CN | Cell number [VOB ID(2)][Cell 7775 ID(1)][Angle Num(1)] 7777 If the level specified in ChapProcessPrivate is a PGC (0x20), there 7778 is an octet called the Playback Type, specifying the kind of PGC 7779 defined: 7781 o 0x00: entry only/basic PGC 7783 o 0x82: Title+Entry Menu (only found in the Video Manager domain) 7785 o 0x83: Root Menu (only found in the VTSM domain) 7787 o 0x84: Subpicture Menu (only found in the VTSM domain) 7789 o 0x85: Audio Menu (only found in the VTSM domain) 7791 o 0x86: Angle Menu (only found in the VTSM domain) 7792 o 0x87: Chapter Menu (only found in the VTSM domain) 7794 The next 4 following octets correspond to the User Operation flags 7795 [89] in the standard PGC. When a bit is set, the command SHOULD be 7796 disabled. 7798 ChapProcessData contains the pre/post/cell commands in binary format 7799 as there are stored on a DVD. There is just an octet preceeding 7800 these data to specify the number of commands in the element. As 7801 follows: [# of commands(1)][command 1 (8)][command 2 (8)][command 3 7802 (8)]. 7804 More information on the DVD commands and format on DVD-replica [90], 7805 where we got most of the info about it. You can also get information 7806 on DVD from the DVDinfo project [91]. 7808 31.8. Example 1 : basic chaptering 7810 In this example a movie is split in different chapters. It could 7811 also just be an audio file (album) on which each track corresponds to 7812 a chapter. 7814 o 00000ms - 05000ms : Intro 7816 o 05000ms - 25000ms : Before the crime 7818 o 25000ms - 27500ms : The crime 7820 o 27500ms - 38000ms : The killer arrested 7822 o 38000ms - 43000ms : Credits 7824 This would translate in the following matroska form : 7826 7827 7828 16603393396715046047 7829 7830 1193046 7831 0 7832 5000000000 7833 7834 Intro 7835 eng 7836 7837 0 7838 1 7839 7840 7841 2311527 7842 5000000000 7843 25000000000 7844 7845 Before the crime 7846 eng 7847 7848 7849 Avant le crime 7850 fra 7851 7852 0 7853 1 7854 7855 7856 3430008 7857 25000000000 7858 27500000000 7859 7860 The crime 7861 eng 7862 7863 7864 Le crime 7865 fra 7866 7867 0 7868 1 7869 7870 7871 4548489 7872 27500000000 7873 38000000000 7874 7875 After the crime 7876 eng 7877 7878 7879 Apres le crime 7880 fra 7881 7882 0 7883 1 7884 7885 7886 5666960 7887 38000000000 7888 43000000000 7889 7890 Credits 7891 eng 7892 7893 7894 Generique 7895 fra 7896 7897 0 7898 1 7899 7900 0 7901 0 7902 7903 7905 31.9. Example 2 : nested chapters 7907 In this example an (existing) album is split into different chapters, 7908 and one of them contain another splitting. 7910 31.9.1. The Micronauts "Bleep To Bleep" 7912 o 00:00 - 12:28 : Baby Wants To Bleep/Rock 7914 * 00:00 - 04:38 : Baby wants to bleep (pt.1) 7916 * 04:38 - 07:12 : Baby wants to rock 7918 * 07:12 - 10:33 : Baby wants to bleep (pt.2) 7920 * 10:33 - 12:28 : Baby wants to bleep (pt.3) 7922 o 12:30 - 19:38 : Bleeper_O+2 7924 o 19:40 - 22:20 : Baby wants to bleep (pt.4) 7926 o 22:22 - 25:18 : Bleep to bleep 7928 o 25:20 - 33:35 : Baby wants to bleep (k) 7930 o 33:37 - 44:28 : Bleeper 7932 7933 7934 1281690858003401414 7935 7936 1 7937 0 7938 748000000 7939 7940 Baby wants to Bleep/Rock 7941 eng 7942 7943 7944 2 7945 0 7946 278000000 7947 7948 Baby wants to bleep (pt.1) 7949 eng 7950 7951 0 7952 1 7953 7954 7955 3 7956 278000000 7957 432000000 7958 7959 Baby wants to rock 7960 eng 7961 7962 0 7963 1 7964 7965 7966 4 7967 432000000 7968 633000000 7969 7970 Baby wants to bleep (pt.2) 7971 eng 7972 7973 0 7974 1 7975 7976 7977 5 7978 633000000 7979 748000000 7980 7981 Baby wants to bleep (pt.3) 7982 eng 7983 7984 0 7985 1 7986 7987 0 7988 1 7989 7990 7991 6 7992 750000000 7993 1178500000 7994 7995 Bleeper_O+2 7996 eng 7997 7998 0 7999 1 8000 8001 8002 7 8003 1180500000 8004 1340000000 8005 8006 Baby wants to bleep (pt.4) 8007 eng 8008 8009 0 8010 1 8011 8012 8013 8 8014 1342000000 8015 1518000000 8016 8017 Bleep to bleep 8018 eng 8019 8020 0 8021 1 8022 8023 8024 9 8025 1520000000 8026 2015000000 8027 8028 Baby wants to bleep (k) 8029 eng 8030 8031 0 8032 1 8033 8034 8035 10 8036 2017000000 8037 2668000000 8038 8039 Bleeper 8040 eng 8041 8042 0 8043 1 8044 8045 0 8046 0 8047 8048 8050 32. Subtitles 8052 Because Matroska is a general container format, we try to avoid 8053 specifying the formats to store in it. This type of work is really 8054 outside of the scope of a container-only format. However, because 8055 the use of subtitles in A/V containers has been so limited (with the 8056 exception of DVD) we are taking the time to specify how to store some 8057 of the more common subtitle formats in Matroska. This is being done 8058 to help facilitate their growth. Otherwise, incompatabilities could 8059 prevent the standardization and use of subtitle storage. 8061 This page is not meant to be a complete listing of all subtitle 8062 formats that will be used in Matroska, it is only meant to be a guide 8063 for the more common, current formats. It is possible that we will 8064 add future formats to this page as they are created, but it is not 8065 likely as any other new subtitle format designer would likely have 8066 their own specifications. Any specification listed here SHOULD be 8067 strictly adhered to or it SHOULD NOT use the corresponding Codec ID. 8069 Here is a list of pointers for storing subtitles in Matroska: 8071 o Any Matroska file containing only subtitles SHOULD use the 8072 extension ".mks". 8074 o As a general rule of thumb for all codecs, information that is 8075 global to an entire stream SHOULD be stored in the CodecPrivate 8076 element. 8078 o Start and stop timecodes that are used in a timecodes native 8079 storage format SHOULD be removed when being placed in Matroska as 8080 they could interfere if the file is edited afterwards. Instead, 8081 the Blocks timecode and Duration SHOULD be used to say when the 8082 timecode is displayed. 8084 o Because a "subtitle" stream is actually just an overlay stream, 8085 anything with a transparency layer could be use, including video. 8087 33. Images Subtitles 8089 The first image format that is a goal to import into Matroska is the 8090 VobSub subtitle format. This subtitle type is generated by exporting 8091 the subtitles from a DVD. 8093 The requirement for muxing VobSub into Matroska is v7 subtitles (see 8094 first line of the .IDX file). If the version is smaller, you must 8095 remux them using the SubResync utility from VobSub 2.23 (or MPC) into 8096 v7 format. Generally any newly created subs will be in v7 format. 8098 The .IFO file will not be used at all. 8100 If there is more than one subtitle stream in the VobSub set, each 8101 stream will need to be seperated into seperate tracks for storage in 8102 Matroska. E.g. the VobSub file contains streams for both English and 8103 German subtitles. Then the resulting Matroska file SHOULD contain 8104 two tracks. That way the language information can be 'dropped' and 8105 mapped to Matroska's language tags. 8107 The .IDX file is reformatted (see below) and placed in the 8108 CodecPrivate. 8110 Each .BMP will be stored in its own Block. The Timestamp with be 8111 stored in the Blocks Timecode and the duration will be stored in the 8112 Default Duration. 8114 Here is an example .IDX file: 8116 # VobSub index file, v7 (do not modify this line!) 8117 # 8118 # To repair desyncronization, you can insert gaps this way: 8119 # (it usually happens after vob id changes) 8120 # 8121 # delay: [sign]hh:mm:ss:ms 8122 # 8123 # Where: 8124 # [sign]: +, - (optional) 8125 # hh: hours (0 <= hh) 8126 # mm/ss: minutes/seconds (0 <= mm/ss <= 59) 8127 # ms: milliseconds (0 <= ms <= 999) 8128 # 8129 # Note: You can't position a sub before the previous with a negative 8130 # value. 8131 # 8132 # You can also modify timestamps or delete a few subs you don't like. 8133 # Just make sure they stay in increasing order. 8135 # Settings 8137 # Original frame size 8138 size: 720x480 8140 # Origin, relative to the upper-left corner, can be overloaded by 8141 # aligment 8142 org: 0, 0 8144 # Image scaling (hor,ver), origin is at the upper-left corner or at 8145 # the alignment coord (x, y) 8146 scale: 100%, 100% 8148 # Alpha blending 8149 alpha: 100% 8151 # Smoothing for very blocky images (use OLD for no filtering) 8152 smooth: OFF 8154 # In millisecs 8155 fadein/out: 50, 50 8157 # Force subtitle placement relative to (org.x, org.y) 8158 align: OFF at LEFT TOP 8160 # For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms) 8161 # Note: Not effective in DirectVobSub, use "delay: ... " instead. 8162 time offset: 0 8164 # ON: displays only forced subtitles, OFF: shows everything 8165 forced subs: OFF 8167 # The original palette of the DVD 8168 palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ 8169 b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd 8171 # Custom colors (transp idxs and the four colors) 8172 custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 8173 000000 8175 # Language index in use 8176 langidx: 0 8178 # English 8179 id: en, index: 0 8180 # Decomment next line to activate alternative name in DirectVobSub / 8181 # Windows Media Player 6.x 8182 # alt: English 8183 # Vob/Cell ID: 1, 1 (PTS: 0) 8184 timestamp: 00:00:01:101, filepos: 000000000 8185 timestamp: 00:00:08:708, filepos: 000001000 8187 First, lines beginning with "#" are removed. These are comments to 8188 make text file editing easier, and as this is not a text file, they 8189 aren't needed. 8191 Next remove the "langidx" and "id" lines. These are used to 8192 differenciate the subtitle streams and define the language. As the 8193 streams will be stored seperately anyway, there is no need to 8194 differenciate them here. Also, the language setting will be stored 8195 in the Matroska tags, so there is no need to store it here. 8197 Finally, the "timestamp" will be used to set the Block's timecode. 8198 Once it is set there, there is no need for it to be stored here. 8199 Also, as it may interfere if the file is edited, it SHOULD NOT be 8200 stored here. 8202 Once all of these items are removed, the data to store in the 8203 CodecPrivate SHOULD look like this: 8205 size: 720x480 8206 org: 0, 0 8207 scale: 100%, 100% 8208 alpha: 100% 8209 smooth: OFF 8210 fadein/out: 50, 50 8211 align: OFF at LEFT TOP 8212 time offset: 0 8213 forced subs: OFF 8214 palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ 8215 b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd 8216 custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ 8217 000000 8219 There SHOULD also be two Blocks containing one image each with the 8220 timecodes "00:00:01:101" and "00:00:08:708". 8222 34. SRT Subtitles 8224 SRT is perhaps the most basic of all subtitle formats. 8226 It consists of four parts, all in text.. 8228 1. A number indicating which subtitle it is in the sequence. 2. 8229 The time that the subtitle appears on the screen, and then 8230 disappears. 3. The subtitle itself. 4. A blank line indicating 8231 the start of a new subtitle. 8233 When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/ 8234 UTF8) and placed in the data portion of the Block. Part 2 is used to 8235 set the timecode of the Block, and BlockDuration element. Nothing 8236 else is used. 8238 Here is an example SRT file: 8240 1 8241 00:02:17,440 --> 00:02:20,375 8242 Senator, we're making 8243 our final approach into Coruscant. 8245 2 8246 00:02:20,476 --> 00:02:22,501 8247 Very good, Lieutenant. 8249 In this example, the text "Senator, we're making our final approach 8250 into Coruscant." would be converted into UTF-8 and placed in the 8251 Block. The timecode of the block would be set to "00:02:17,440". 8252 And the BlockDuration element would be set to "00:00:02,935". 8254 The same is repeated for the next subtitle. 8256 Because there are no general settings for SRT, the CodecPrivate is 8257 left blank. 8259 35. SSA/ASS Subtitles 8261 SSA stands for Sub Station Alpha. It's the file format used by the 8262 popular subtitle editor, SubStation Alpha [92]. This format is 8263 widely used by fansubbers. 8265 It allows you to do some advanced display features, like positioning, 8266 karaoke, style managements... 8268 For detailed information on SSA/ASS, see the SSA specs [93]. It 8269 includes an SSA specs description and the avanced features added by 8270 ASS format (standing for Advanced SSA). Because SSA and ASS are so 8271 similar, they are treated the same here. 8273 Like SRT, this format is text based with a particular syntax. 8275 A file consists of 4 or 5 parts, declared ala INI file (but it's not 8276 an INI !) 8278 The first, "[Script Info]" contains some information about the 8279 subtitle file, such as it's title, who created it, type of script and 8280 a very important one : "PlayResY". Be carefull of this value, 8281 everything in your script (font size, positioning) is scaled by it. 8282 Sub Station Alpha uses your desktops Y resolution to write this 8283 value, so if a friend with a large monitor and a high screen 8284 resolution gives you an edited script, you can mess everything up by 8285 saving the script in SSA with your low-cost monitor. 8287 The second, "[V4 Styles]", is a list of style definitions. A style 8288 describe how will look a text on the screen. It defines font, font 8289 size, primary/.../outile colour, position, aligment etc ... 8291 For example this : 8293 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding 8294 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 8296 The third, "[Events]", is the list of text you want to display at the 8297 right timing. You can specify some attribute here. Like the style 8298 to use for this event (MUST be defined in the list), the position of 8299 the text (Left, Right, Vertical Margin), an effect. Name is mostly 8300 used by translator to know who said this sentence. Timing is in 8301 h:mm:ss.cc (centisec). 8303 Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 8304 Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? 8305 Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien. 8307 "[Pictures]" or "[Fonts]" part can be found in some SSA file, they 8308 contains UUE-encoded pictures/font but those features are only used 8309 by Sub Station Alpha, i.e. no filter (Vobsub/Avery Lee Subtiler 8310 filter) use them. 8312 Now, how are they stored in Matroska ? 8314 o All text is converted to UTF-8* All the headers are stored in 8315 CodecPrivate ( Script Info and the Styles list)* Start & End field 8316 are used to set TimeStamp and the BlockDuration element. the data 8317 stored is :* Events are stored in the Block in this order: 8319 ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, 8320 Text (Layer comes from ASS specs ... it's empty for SSA.) 8321 "ReadOrder field is needed for the decoder to be able to reorder 8322 the streamed samples as they were placed originally in the file." 8324 Here is an example of an SSA file. 8326 [Script Info] 8327 ; This is a Sub Station Alpha v4 script. 8328 ; For Sub Station Alpha info and downloads, 8329 ; go to [http://www.eswat.demon.co.uk/](http://www.eswat.demon.co.uk/) 8330 ; or email [kotus@eswat.demon.co.uk](mailto:kotus@eswat.demon.co.uk) 8331 Title: Wolf's rain 2 8332 Original Script: Anime-spirit Ishin-francais 8333 Original Translation: Coolman 8334 Original Editing: Spikewolfwood 8335 Original Timing: Lord_alucard 8336 Original Script Checking: Spikewolfwood 8337 ScriptType: v4.00 8338 Collisions: Normal 8339 PlayResY: 1024 8340 PlayDepth: 0 8341 Wav: 0, 128697,D:\Alex\Anime\- Fansub -\- TAFF -\Wolf's Rain\WR_-_02_Wav.wav 8342 Wav: 0, 120692,H:\team truc\WR_-_02.wav 8343 Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav 8344 LastWav: 3 8345 Timer: 100,0000 8347 [V4 Styles] 8348 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding 8349 Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0 8350 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0 8351 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 8353 [Events] 8354 Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 8355 Dialogue: Marked=0,0:02:40.65,0:02:41.79,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? 8356 Dialogue: Marked=0,0:02:42.42,0:02:44.15,Wolf main,autre,0000,0000,0000,,Toujours rien. 8358 Here is what would be placed into the CodecPrivate element. 8360 [Script Info] 8361 ; This is a Sub Station Alpha v4 script. 8362 ; For Sub Station Alpha info and downloads, 8363 ; go to [http://www.eswat.demon.co.uk/](http://www.eswat.demon.co.uk/) 8364 ; or email [kotus@eswat.demon.co.uk](mailto:kotus@eswat.demon.co.uk) 8365 Title: Wolf's rain 2 8366 Original Script: Anime-spirit Ishin-francais 8367 Original Translation: Coolman 8368 Original Editing: Spikewolfwood 8369 Original Timing: Lord_alucard 8370 Original Script Checking: Spikewolfwood 8371 ScriptType: v4.00 8372 Collisions: Normal 8373 PlayResY: 1024 8374 PlayDepth: 0 8375 Wav: 0, 128697,D:\Alex\Anime\- Fansub -\- TAFF -\Wolf's Rain\WR_-_02_Wav.wav 8376 Wav: 0, 120692,H:\team truc\WR_-_02.wav 8377 Wav: 0, 116504,E:\sub\wolf's_rain\WOLF'S RAIN 02.wav 8378 LastWav: 3 8379 Timer: 100,0000 8381 [V4 Styles] 8382 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding 8383 Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0 8384 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0 8385 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 8387 And here are the two blocks that would be generated. 8389 Block's timecode: 00:02:40.650 BlockDuration: 00:00:01.140 8391 1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? 8393 Block's timecode: 00:02:42.420 BlockDuration: 00:00:01.730 8395 2,,Wolf main,autre,0000,0000,0000,,Toujours rien. 8397 36. USF Subtitles 8399 Under construction 8401 37. WebVTT 8403 The "Web Video Text Tracks Format" (short: WebVTT) is developed by 8404 the World Wide Web Consortium (W3C) [94]. Its specifications are 8405 freely available [95]. 8407 The guiding principles for the storage of WebVTT in Matroska are: 8409 o Consistency: store data in a similar way to other subtitle codecs 8411 o Simplicity: making decoding and remuxing as easy as possible for 8412 existing infrastructures 8414 o Completeness: keeping as much data as possible from the original 8415 WebVTT file 8417 37.1. Storage of WebVTT in Matroska 8419 37.1.1. CodecID: codec identification 8421 The CodecID to use is S_TEXT/WEBVTT. 8423 37.1.2. CodecPrivate: storage of gloal WebVTT blocks 8425 This element contains all global blocks before the first subtitle 8426 entry. This starts at the "WEBVTT" file identification marker but 8427 excludes the optional byte order mark. 8429 37.1.3. Storage of non-global WebVTT blocks 8431 Non-global WebVTT blocks (e.g. "NOTE") before a WebVTT Cue Text are 8432 stored in Matroska's BlockAddition element together with the Matroska 8433 Block containing the WebVTT Cue Text these blocks precede (see below 8434 for the actual format). 8436 37.1.4. Storage of Cues in Matroska blocks 8438 Each WebVTT Cue Text is stored directly in the Matroska Block. 8440 A muxer MUST change all WebVTT Cue Timestamps present within the Cue 8441 Text to be relative to the Matroska Block's timestamp. 8443 The Cue's start timestamp is used as the Matroska Block's timestamp. 8445 The difference between the Cue's end timestamp and its start 8446 timestamp is used as the Matroska Block's duration. 8448 37.1.5. BlockAdditions: storing non-global WebVTT blocks, Cue Settings 8449 Lists and Cue identifiers 8451 Each Matroska Block may be accompanied by one BlockAdditions element. 8452 Its format is as follows: 8454 1. The first line contains the WebVTT Cue Text's optional Cue 8455 Settings List followed by one line feed character (U+0x000a). 8457 The Cue Settings List may be empty in which case the line 8458 consists of the line feed character only. 8460 2. The second line contains the WebVTT Cue Text's optional Cue 8461 Identifier followed by one line feed character (U+0x000a). The 8462 line may be empty indicating that there was no Cue Identifier in 8463 the source file in which case the line consists of the line feed 8464 character only. 8466 3. The third and all following lines contain all WebVTT Comment 8467 Blocks that precede the current WebVTT Cue Block. These may be 8468 absent. 8470 If there is no Matroska BlockAddition element stored together with 8471 the Matroska Block then all three components (Cue Settings List, Cue 8472 Identifier, Cue Comments) MUST be assumed to be absent. 8474 37.2. Examples of transformation 8476 Here's an example how a WebVTT is transformed. 8478 37.2.1. Example WebVTT file 8480 Let's take the following example file: 8482 WEBVTT with text after the signature 8484 STYLE 8485 ::cue { 8486 background-image: linear-gradient(to bottom, dimgray, lightgray); 8487 color: papayawhip; 8488 } 8489 /* Style blocks cannot use blank lines nor "dash dash greater than" */ 8491 NOTE comment blocks can be used between style blocks. 8493 STYLE 8494 ::cue(b) { 8495 color: peachpuff; 8496 } 8498 REGION 8499 id:bill 8500 width:40% 8501 lines:3 8502 regionanchor:0%,100% 8503 viewportanchor:10%,90% 8504 scroll:up 8506 NOTE 8507 Notes always span a whole block and can cover multiple 8508 lines. Like this one. 8509 An empty line ends the block. 8511 hello 8512 00:00:00.000 --> 00:00:10.000 8513 Example entry 1: Hello world. 8515 NOTE style blocks cannot appear after the first cue. 8517 00:00:25.000 --> 00:00:35.000 8518 Example entry 2: Another entry. 8519 This one has multiple lines. 8521 00:01:03.000 --> 00:01:06.500 position:90% align:right size:35% 8522 Example entry 3: That stuff to the right of the timestamps are cue settings. 8524 00:03:10.000 --> 00:03:20.000 8525 Example entry 4: Entries can even include timestamps. 8526 For example:<00:03:15.000>This becomes visible five seconds 8527 after the first part. 8529 37.2.2. CodecPrivate 8531 The resulting CodecPrivate element will look like this: 8533 WEBVTT with text after the signature 8535 STYLE 8536 ::cue { 8537 background-image: linear-gradient(to bottom, dimgray, lightgray); 8538 color: papayawhip; 8539 } 8540 /* Style blocks cannot use blank lines nor "dash dash greater than" */ 8542 NOTE comment blocks can be used between style blocks. 8544 STYLE 8545 ::cue(b) { 8546 color: peachpuff; 8547 } 8549 REGION 8550 id:bill 8551 width:40% 8552 lines:3 8553 regionanchor:0%,100% 8554 viewportanchor:10%,90% 8555 scroll:up 8557 NOTE 8558 Notes always span a whole block and can cover multiple 8559 lines. Like this one. 8560 An empty line ends the block. 8562 37.2.3. Storage of Cue 1 8564 Example Cue 1: timestamp 00:00:00.000, duration 00:00:10.000, Block's 8565 content: 8567 Example entry 1: Hello world. 8569 BlockAddition's content starts with one empty line as there's no Cue 8570 Settings List: 8572 hello 8574 37.2.4. Storage of Cue 2 8576 Example Cue 2: timestamp 00:00:25.000, duration 00:00:10.000, Block's 8577 content: 8579 Example entry 2: Another entry. 8580 This one has multiple lines. 8582 BlockAddition's content starts with two empty lines as there's 8583 neither a Cue Settings List nor a Cue Identifier: 8585 NOTE style blocks cannot appear after the first cue. 8587 37.2.5. Storage of Cue 3 8589 Example Cue 3: timestamp 00:01:03.000, duration 00:00:03.500, Block's 8590 content: 8592 Example entry 3: That stuff to the right of the timestamps are cue settings. 8594 BlockAddition's content ends with an empty line as there's no Cue 8595 Identifier and there were no WebVTT Comment blocks: 8597 position:90% align:right size:35% 8599 37.2.6. Storage of Cue 4 8601 Example Cue 4: timestamp 00:03:10.000, duration 00:00:10.000, Block's 8602 content: 8604 Example entry 4: Entries can even include timestamps. For 8605 example:<00:00:05.000>This becomes visible five seconds after the 8606 first part. 8608 This Block does not need a BlockAddition as the Cue did not contain 8609 an Identifier, nor a Settings List, and it wasn't preceded by Comment 8610 blocks. 8612 37.3. Storage of WebVTT in Matroska vs. WebM 8614 Note: the storage of WebVTT in Matroska is not the same as the design 8615 document for storage of WebVTT in WebM. There are several reasons 8616 for this including but not limited to: the WebM document is old (from 8617 February 2012) and was based on an earlier draft of WebVTT and 8618 ignores several parts that were added to WebVTT later; WebM does 8619 still not support subtitles at all [96]; the proposal suggests 8620 splitting the information across multiple tracks making demuxer's and 8621 remuxer's life very difficult. 8623 38. HDMV presentation graphics subtitles 8625 The specifications for the HDMV presentation graphics subtitle format 8626 (short: HDMV PGS) can be found in the document "Blu-ray Disc Read- 8627 Only Format; Part 3 -- Audio Visual Basic Specifications" in section 8628 9.14 "HDMV graphics streams". 8630 38.1. Storage of HDMV presentation graphics subtitles 8632 38.1.1. CodecID & CodecPrivate: codec identification 8634 The CodecID to use is "S_HDMV/PGS". A CodecPrivate element is not 8635 used. 8637 38.1.2. Storage of HDMV PGS Segments in Matroska Blocks 8639 Each HDMV PGS Segment (short: Segment) will be stored in a Matroska 8640 Block. A Segment is the data structure described in section 9.14.2.1 8641 "Segment coding structure and parameters" of the Blu-ray 8642 specifications. 8644 Each Segment contains a presentation timestamp. This timestamp will 8645 be used as the timestamp for the Matroska Block. 8647 A Segment is normally shown until a subsequent Segment is 8648 encountered. Therefore the Matroska Block MAY have no Duration. In 8649 that case a player MUST display a Segment within a Matroska Block 8650 until the next Segment is encountered. 8652 A muxer MAY use a Duration, e.g. by calculating the distance between 8653 two subsequent Segments. If a Matroska Block has a Duration, a 8654 player MUST display that Segment only for the duration of the Block's 8655 Duration. 8657 39. HDMV text subtitles 8659 The specifications for the HDMV text subtitle format (short: HDMV 8660 TextST) can be found in the document "Blu-ray Disc Read-Only Format; 8661 Part 3 -- Audio Visual Basic Specifications" in section 9.15 "HDMV 8662 text subtitle streams". 8664 39.1. Storage of HDMV text subtitles 8666 39.1.1. CodecID & CodecPrivate: codec identification 8668 The CodecID to use is "S_HDMV/TEXTST". 8670 A CodecPrivate Element is required. It MUST contain the stream's 8671 Dialog Style Segment as described in section 9.15.4.2 "Dialog Style 8672 Segment" of the Blu-ray specifications. 8674 39.1.2. Storage of HDMV TextST Dialog Presentation Segments in Matroska 8675 Blocks 8677 Each HDMV Dialog Presentation Segment (short: Segment) will be stored 8678 in a Matroska Block. A Segment is the data structure described in 8679 section 9.15.4.3 "Dialog presentation segment" of the Blu-ray 8680 specifications. 8682 Each Segment contains a start and an end presentation timestamp 8683 (short: start PTS & end PTS). The start PTS will be used as the 8684 timestamp for the Matroska Block. The Matroska Block MUST have a 8685 Duration, and that Duration is the difference between the end PTS and 8686 the start PTS. 8688 A player MUST use the Matroska Block's timestamp and Duration instead 8689 of the Segment's start and end PTS for determining when and how long 8690 to show the Segment. 8692 39.1.3. Character set 8694 When TextST subtitles are stored inside Matroska, the only allowed 8695 character set is UTF-8. 8697 Each HDMV text subtitle stream in a Blu-ray can use one of a handful 8698 of character sets. This information is not stored in the MPEG2 8699 Transport Stream itself but in the accompanying Clip Information 8700 file. 8702 Therefore a muxer MUST parse the accompanying Clip Information file. 8703 If the information indicates a character set other than UTF-8, it 8704 MUST re-encode all text Dialog Presentation Segments from the 8705 indicated character set to UTF-8 prior to storing them in Matroska. 8707 40. Digital Video Broadcasting (DVB) subtitles 8709 The specifications for the Digital Video Broadcasting subtitle 8710 bitstream format (short: DVB subtitles) can be found in the document 8711 "ETSI EN 300 743 - Digital Video Broadcasting (DVB); Subtitling 8712 systems". The storage of DVB subtitles in MPEG transport streams is 8713 specified in the document "ETSI EN 300 468 - Digital Video 8714 Broadcasting (DVB); Specification for Service Information (SI) in DVB 8715 systems". 8717 40.1. Storage of DVB subtitles 8719 40.1.1. CodecID 8721 The CodecID to use is "S_DVBSUB". 8723 40.1.2. CodecPrivate 8725 The CodecPrivate element is five bytes long and has the following 8726 structure: 8728 o 2 bytes: composition page ID (bit string, left bit first) 8730 o 2 bytes: ancillary page ID (bit string, left bit first) 8732 o 1 byte: subtitling type (bit string, left bit first) 8734 The semantics of these bytes are the same as the ones described in 8735 section 6.2.41 "Subtitling descriptor" of ETSI EN 300 468. 8737 40.1.3. Storage of DVB subtitles in Matroska Blocks 8739 Each Matroska Block consists of one or more DVB Subtitle Segments as 8740 described in segment 7.2 "Syntax and semantics of the subtitling 8741 segment" of ETSI EN 300 743. 8743 Each Matroska Block SHOULD have a Duration indicating how long the 8744 DVB Subtitle Segments in that Block SHOULD be displayed. 8746 41. Tagging 8748 When a Tag is nested within another Tag, the nested Tag becomes an 8749 attribute of the base tag. For instance, if you wanted to store the 8750 dates that a singer used certain addresses for, that singer being the 8751 lead singer for a track that included multiple bands simultaneously, 8752 then your tag tree would look something like this: 8754 o Targets 8756 * TrackUID 8758 o BAND 8759 * LEADPERFORMER 8761 * ADDRESS 8763 + DATE 8765 + DATEEND 8767 * ADDRESS 8769 + DATE 8771 In this way, it becomes possible to store any Tag as attributes of 8772 another tag. 8774 Multiple items SHOULD never be stored as a list in a single 8775 TagString. If there is more than one tag of a certain type to be 8776 stored, then more than one SimpleTag SHOULD be used. 8778 For authoring Tags outside of EBML, the following XML syntax is 8779 proposed [97] used in mkvmerge [98]. Binary data SHOULD be stored 8780 using BASE64 encoding if it is being stored at authoring time. 8782 41.1. Why official tags matter 8784 There is a debate between people who think all tags SHOULD be free 8785 and those who think all tags SHOULD be strict. If you look at this 8786 page you will realise we are in between. 8788 Advanced-users application might let you put any tag in your file. 8789 But for the rest of the applications, they usually give you a basic 8790 list of tags you can use. Both have their needs. But it's usually a 8791 bad idea to use custom/exotic tags because you will probably be the 8792 only person to use this information even though everyone else could 8793 benefit from it. So hopefully when someone wants to put information 8794 in one's file, they will find an official one that fit them and 8795 hopefully use it ! If it's not in the list, this person can contact 8796 us any time for addition of such a missing tag. But it doesn't mean 8797 it will be accepted... Matroska files are not meant the become a 8798 whole database of people who made costumes for a film. A website 8799 would be better for that... It's hard to define what SHOULD be in and 8800 what doesn't make sense in a file. So we'll treat each request 8801 carefully. 8803 We also need an official list simply for developers to be able to 8804 display relevant information in their own design (if they choose to 8805 support a list of meta-information they SHOULD know which tag has the 8806 wanted meaning so that other apps could understand the same meaning). 8808 41.2. Tag translations 8810 To be able to save tags from other systems to Matroska we need to 8811 translate them to our system. There is a translation table on our 8812 site [99]. 8814 41.3. Tag Formatting 8816 o The TagName SHOULD always be written in all capital letters and 8817 contain no space. 8819 o The fields with dates SHOULD have the following format: YYYY-MM-DD 8820 hh:mm:ss.mss YYYY = Year, MM = Month, DD = Days, HH = Hours, mm = 8821 Minutes, ss = Seconds, mss = Milliseconds. To store less 8822 accuracy, you remove items starting from the right. To store only 8823 the year, you would use, "2004". To store a specific day such as 8824 May 1st, 2003, you would use "2003-05-01". 8826 o Fields that require a Float SHOULD use the "." mark instead of the 8827 "," mark. To display it differently for another local, 8828 applications SHOULD support auto replacement on display. Also, a 8829 thousandths separator SHOULD NOT be used. 8831 o For currency amounts, there SHOULD only be a numeric value in the 8832 Tag. Only numbers, no letters or symbols other than ".". For 8833 instance, you would store "15.59" instead of "$15.59USD". 8835 41.4. Target types 8837 The TargetType element allows tagging of different parts that are 8838 inside or outside a given file. For example in an audio file with 8839 one song you could have information about the album it comes from and 8840 even the CD set even if it's not found in the file. 8842 For application to know what kind of information (like TITLE) relates 8843 to a certain level (CD title or track title), we also need a set of 8844 official TargetType names. For now audio and video will have 8845 different values & names. That also means the same tag name can have 8846 different meanings depending on where it is (otherwise we would end 8847 up with 15 TITLE_ tags). 8849 TargetTypeValue | Audio strings | Video strings | Comment 70 | 8850 COLLECTION | COLLECTION | the high hierarchy consisting of many 8851 different lower items 60 | EDITION / ISSUE / VOLUME / OPUS | SEASON / 8852 SEQUEL / VOLUME | a list of lower levels grouped together 50 | ALBUM 8853 / OPERA / CONCERT | MOVIE / EPISODE / CONCERT | the most common 8854 grouping level of music and video (equals to an episode for TV 8855 series) 40 | PART / SESSION | PART / SESSION | when an album or 8856 episode has different logical parts 30 | TRACK / SONG | CHAPTER | the 8857 common parts of an album or a movie 20 | SUBTRACK / PART / MOVEMENT | 8858 SCENE | corresponds to parts of a track for audio (like a movement) 8859 10 | - | SHOT | the lowest hierarchy found in music or movies 8861 An upper level value tag applies to the lower level. That means if a 8862 CD has the same artist for all tracks, you just need to set the 8863 ARTIST tag at level 50 (ALBUM) and not to each TRACK (but you can). 8864 That also means that if some parts of the CD have no known ARTIST the 8865 value MUST be set to nothing (a void string ""). 8867 When a level doesn't exist it MUST NOT be specified in the files, so 8868 that the TOTAL_PARTS and PART_NUMBER elements match the same levels. 8870 Here is an example of how these "organizational" tags work: If you 8871 set 10 TOTAL_PARTS to the ALBUM level (40) it means the album 8872 contains 10 lower parts. The lower part in question is the first 8873 lower level that is specified in the file. So if it's TRACK (30) 8874 then that means it contains 10 tracks. If it's MOVEMENT (20) that 8875 means it's 10 movements, etc. 8877 41.5. Official tags 8879 The following is a complete list of the supported Matroska Tags. 8880 While it is possible to use Tag names that are not listed below, this 8881 is not recommended as compatibility will be compromised. If you find 8882 that there is a Tag missing that you would like to use, then please 8883 contact the Matroska team for its inclusion in the specifications 8884 before the format reaches 1.0. 8886 41.6. Nesting Information 8888 Nesting Information tags are intended to contain other tags. 8890 +----------+-------+------------------------------------------------+ 8891 | Tag Name | Type | Description | 8892 +----------+-------+------------------------------------------------+ 8893 | ORIGINAL | - | A special tag that is meant to have other tags | 8894 | | | inside (using nested tags) to describe the | 8895 | | | original work of art that this item is based | 8896 | | | on. All tags in this list can be used "under" | 8897 | | | the ORIGINAL tag like LYRICIST, PERFORMER, | 8898 | | | etc. | 8899 | SAMPLE | - | A tag that contains other tags to describe a | 8900 | | | sample used in the targeted item taken from | 8901 | | | another work of art. All tags in this list can | 8902 | | | be used "under" the SAMPLE tag like TITLE, | 8903 | | | ARTIST, DATE_RELEASED, etc. | 8904 | COUNTRY | UTF-8 | The name of the country (biblio ISO-639-2 | 8905 | | | [100]) that is meant to have other tags inside | 8906 | | | (using nested tags) to country specific | 8907 | | | information about the item. All tags in this | 8908 | | | list can be used "under" the COUNTRY_SPECIFIC | 8909 | | | tag like LABEL, PUBLISH_RATING, etc. | 8910 +----------+-------+------------------------------------------------+ 8912 41.7. Organization Information 8914 +-------------+-------+---------------------------------------------+ 8915 | Tag Name | Type | Description | 8916 +-------------+-------+---------------------------------------------+ 8917 | TOTAL_PARTS | UTF-8 | Total number of parts defined at the first | 8918 | | | lower level. (e.g. if TargetType is ALBUM, | 8919 | | | the total number of tracks of an audio CD) | 8920 | PART_NUMBER | UTF-8 | Number of the current part of the current | 8921 | | | level. (e.g. if TargetType is TRACK, the | 8922 | | | track number of an audio CD) | 8923 | PART_OFFSET | UTF-8 | A number to add to PART_NUMBER when the | 8924 | | | parts at that level don't start at 1. (e.g. | 8925 | | | if TargetType is TRACK, the track number of | 8926 | | | the second audio CD) | 8927 +-------------+-------+---------------------------------------------+ 8929 41.8. Titles 8930 +----------+-------+------------------------------------------------+ 8931 | Tag Name | Type | Description | 8932 +----------+-------+------------------------------------------------+ 8933 | TITLE | UTF-8 | The title of this item. For example, for music | 8934 | | | you might label this "Canon in D", or for | 8935 | | | video's audio track you might use "English | 8936 | | | 5.1" This is akin to the TIT2 tag in ID3. | 8937 | SUBTITLE | UTF-8 | Sub Title of the entity. | 8938 +----------+-------+------------------------------------------------+ 8940 41.9. Nested Information 8942 Nested Information includes tags contained in other tags. 8944 +-------------+-------+---------------------------------------------+ 8945 | Tag Name | Type | Description | 8946 +-------------+-------+---------------------------------------------+ 8947 | URL | UTF-8 | URL corresponding to the tag it's included | 8948 | | | in. | 8949 | SORT_WITH | UTF-8 | A child element to indicate what | 8950 | | | alternative value the parent tag can have | 8951 | | | to be sorted, for example "Pet Shop Boys" | 8952 | | | instead of "The Pet Shop Boys". Or "Marley | 8953 | | | Bob" and "Marley Ziggy" (no comma needed). | 8954 | INSTRUMENTS | UTF-8 | The instruments that are being used/played, | 8955 | | | separated by a comma. It SHOULD be a child | 8956 | | | of the following tags: ARTIST, | 8957 | | | LEAD_PERFORMER or ACCOMPANIMENT. | 8958 | EMAIL | UTF-8 | Email corresponding to the tag it's | 8959 | | | included in. | 8960 | ADDRESS | UTF-8 | The physical address of the entity. The | 8961 | | | address SHOULD include a country code. It | 8962 | | | can be useful for a recording label. | 8963 | FAX | UTF-8 | The fax number corresponding to the tag | 8964 | | | it's included in. It can be useful for a | 8965 | | | recording label. | 8966 | PHONE | UTF-8 | The phone number corresponding to the tag | 8967 | | | it's included in. It can be useful for a | 8968 | | | recording label. | 8969 +-------------+-------+---------------------------------------------+ 8971 41.10. Entities 8973 +----------------------+-------+------------------------------------+ 8974 | Tag Name | Type | Description | 8975 +----------------------+-------+------------------------------------+ 8976 | ARTIST | UTF-8 | A person or band/collective | 8977 | | | generally considered responsible | 8978 | | | for the work. This is akin to the | 8979 | | | TPE1 tag in ID3 [101]. | 8980 | LEAD_PERFORMER | UTF-8 | Lead Performer/Soloist(s). This | 8981 | | | can sometimes be the same as | 8982 | | | ARTIST. | 8983 | ACCOMPANIMENT | UTF-8 | Band/orchestra/accompaniment/music | 8984 | | | ian. This is akin to the TPE2 tag | 8985 | | | in ID3 [102]. | 8986 | COMPOSER | UTF-8 | The name of the composer of this | 8987 | | | item. This is akin to the TCOM tag | 8988 | | | in ID3 [103]. | 8989 | ARRANGER | UTF-8 | The person who arranged the piece, | 8990 | | | e.g., Ravel. | 8991 | LYRICS | UTF-8 | The lyrics corresponding to a song | 8992 | | | (in case audio synchronization is | 8993 | | | not known or as a doublon to a | 8994 | | | subtitle track). Editing this | 8995 | | | value when subtitles are found | 8996 | | | SHOULD also result in editing the | 8997 | | | subtitle track for more | 8998 | | | consistency. | 8999 | LYRICIST | UTF-8 | The person who wrote the lyrics | 9000 | | | for a musical item. This is akin | 9001 | | | to the TEXT [104] tag in ID3. | 9002 | CONDUCTOR | UTF-8 | Conductor/performer refinement. | 9003 | | | This is akin to the TPE3 [105]. | 9004 | DIRECTOR | UTF-8 | This is akin to the IART tag in | 9005 | | | RIFF [106]. | 9006 | ASSISTANT_DIRECTOR | UTF-8 | The name of the assistant | 9007 | | | director. | 9008 | DIRECTOR_OF_PHOTOGRA | UTF-8 | The name of the director of | 9009 | PHY | | photography, also known as | 9010 | | | cinematographer. This is akin to | 9011 | | | the ICNM tag in Extended RIFF. | 9012 | SOUND_ENGINEER | UTF-8 | The name of the sound engineer or | 9013 | | | sound recordist. | 9014 | ART_DIRECTOR | UTF-8 | The person who oversees the | 9015 | | | artists and craftspeople who build | 9016 | | | the sets. | 9017 | PRODUCTION_DESIGNER | UTF-8 | Artist responsible for designing | 9018 | | | the overall visual appearance of a | 9019 | | | movie. | 9020 | CHOREGRAPHER | UTF-8 | The name of the choregrapher | 9021 | COSTUME_DESIGNER | UTF-8 | The name of the costume designer | 9022 | ACTOR | UTF-8 | An actor or actress playing a role | 9023 | | | in this movie. This is the | 9024 | | | person's real name, not the | 9025 | | | character's name the person is | 9026 | | | playing. | 9027 | CHARACTER | UTF-8 | The name of the character an actor | 9028 | | | or actress plays in this movie. | 9029 | | | This SHOULD be a sub-tag of an | 9030 | | | "ACTOR" tag in order not to cause | 9031 | | | ambiguities. | 9032 | WRITTEN_BY | UTF-8 | The author of the story or script | 9033 | | | (used for movies and TV shows). | 9034 | SCREENPLAY_BY | UTF-8 | The author of the screenplay or | 9035 | | | scenario (used for movies and TV | 9036 | | | shows). | 9037 | EDITED_BY | UTF-8 | This is akin to the IEDT tag in | 9038 | | | Extended RIFF. | 9039 | PRODUCER | UTF-8 | Produced by. This is akin to the | 9040 | | | IPRO tag in Extended RIFF. | 9041 | COPRODUCER | UTF-8 | The name of a co-producer. | 9042 | EXECUTIVE_PRODUCER | UTF-8 | The name of an executive producer. | 9043 | DISTRIBUTED_BY | UTF-8 | This is akin to the IDST tag in | 9044 | | | Extended RIFF. | 9045 | MASTERED_BY | UTF-8 | The engineer who mastered the | 9046 | | | content for a physical medium or | 9047 | | | for digital distribution. | 9048 | ENCODED_BY | UTF-8 | This is akin to the TENC tag [107] | 9049 | | | in ID3. | 9050 | MIXED_BY | UTF-8 | DJ mix by the artist specified | 9051 | REMIXED_BY | UTF-8 | Interpreted, remixed, or otherwise | 9052 | | | modified by. This is akin to the | 9053 | | | TPE4 tag in ID3 [108]. | 9054 | PRODUCTION_STUDIO | UTF-8 | This is akin to the ISTD tag in | 9055 | | | Extended RIFF. | 9056 | THANKS_TO | UTF-8 | A very general tag for everyone | 9057 | | | else that wants to be listed. | 9058 | PUBLISHER | UTF-8 | This is akin to the TPUB tag in | 9059 | | | ID3 [109]. | 9060 | LABEL | UTF-8 | The record label or imprint on the | 9061 | | | disc. | 9062 +----------------------+-------+------------------------------------+ 9064 41.11. Search and Classification 9065 +---------------------+--------+------------------------------------+ 9066 | Tag Name | Type | Description | 9067 +---------------------+--------+------------------------------------+ 9068 | GENRE | UTF-8 | The main genre (classical, | 9069 | | | ambient-house, synthpop, sci-fi, | 9070 | | | drama, etc). The format follows | 9071 | | | the infamous TCON tag in ID3. | 9072 | MOOD | UTF-8 | Intended to reflect the mood of | 9073 | | | the item with a few keywords, e.g. | 9074 | | | "Romantic", "Sad" or "Uplifting". | 9075 | | | The format follows that of the | 9076 | | | TMOO tag in ID3. | 9077 | ORIGINAL_MEDIA_TYPE | UTF-8 | Describes the original type of the | 9078 | | | media, such as, "DVD", "CD", | 9079 | | | "computer image," "drawing," | 9080 | | | "lithograph," and so forth. This | 9081 | | | is akin to the TMED tag in ID3 | 9082 | | | [110]. | 9083 | CONTENT_TYPE | UTF-8 | The type of the item. e.g. | 9084 | | | Documentary, Feature Film, | 9085 | | | Cartoon, Music Video, Music, Sound | 9086 | | | FX, ... | 9087 | SUBJECT | UTF-8 | Describes the topic of the file, | 9088 | | | such as "Aerial view of Seattle." | 9089 | DESCRIPTION | UTF-8 | A short description of the | 9090 | | | content, such as "Two birds | 9091 | | | flying." | 9092 | KEYWORDS | UTF-8 | Keywords to the item separated by | 9093 | | | a comma, used for searching. | 9094 | SUMMARY | UTF-8 | A plot outline or a summary of the | 9095 | | | story. | 9096 | SYNOPSIS | UTF-8 | A description of the story line of | 9097 | | | the item. | 9098 | INITIAL_KEY | UTF-8 | The initial key that a musical | 9099 | | | track starts in. The format is | 9100 | | | identical to ID3. | 9101 | PERIOD | UTF-8 | Describes the period that the | 9102 | | | piece is from or about. For | 9103 | | | example, "Renaissance". | 9104 | LAW_RATING | UTF-8 | Depending on the "COUNTRY" it's | 9105 | | | the format of the rating of a | 9106 | | | movie (P, R, X in the USA, an age | 9107 | | | in other countries or a URI | 9108 | | | defining a logo). | 9109 | ICRA | binary | The ICRA [111] content rating for | 9110 | | | parental control. (Previously | 9111 | | | RSACi) | 9112 +---------------------+--------+------------------------------------+ 9114 41.12. Temporal Information 9116 +----------------+-------+------------------------------------------+ 9117 | Tag Name | Type | Description | 9118 +----------------+-------+------------------------------------------+ 9119 | DATE_RELEASED | UTF-8 | The time that the item was originally | 9120 | | | released. This is akin to the TDRL tag | 9121 | | | in ID3. | 9122 | DATE_RECORDED | UTF-8 | The time that the recording began. This | 9123 | | | is akin to the TDRC tag in ID3. | 9124 | DATE_ENCODED | UTF-8 | The time that the encoding of this item | 9125 | | | was completed began. This is akin to the | 9126 | | | TDEN tag in ID3. | 9127 | DATE_TAGGED | UTF-8 | The time that the tags were done for | 9128 | | | this item. This is akin to the TDTG tag | 9129 | | | in ID3. | 9130 | DATE_DIGITIZED | UTF-8 | The time that the item was transferred | 9131 | | | to a digital medium. This is akin to the | 9132 | | | IDIT tag in RIFF. | 9133 | DATE_WRITTEN | UTF-8 | The time that the writing of the | 9134 | | | music/script began. | 9135 | DATE_PURCHASED | UTF-8 | Information on when the file was | 9136 | | | purchased (see also Section 41.17). | 9137 +----------------+-------+------------------------------------------+ 9139 41.13. Spacial Information 9141 +----------------------+-------+------------------------------------+ 9142 | Tag Name | Type | Description | 9143 +----------------------+-------+------------------------------------+ 9144 | RECORDING_LOCATION | UTF-8 | The location where the item was | 9145 | | | recorded. The countries | 9146 | | | corresponding to the string, same | 9147 | | | 2 octets as in Internet domains | 9148 | | | [112], or possibly ISO-3166 [113]. | 9149 | | | This code is followed by a comma, | 9150 | | | then more detailed information | 9151 | | | such as state/province, another | 9152 | | | comma, and then city. For example, | 9153 | | | "US, Texas, Austin". This will | 9154 | | | allow for easy sorting. It is okay | 9155 | | | to only store the country, or the | 9156 | | | country and the state/province. | 9157 | | | More detailed information can be | 9158 | | | added after the city through the | 9159 | | | use of additional commas. In cases | 9160 | | | where the province/state is | 9161 | | | unknown, but you want to store the | 9162 | | | city, simply leave a space between | 9163 | | | the two commas. For example, "US, | 9164 | | | , Austin". | 9165 | COMPOSITION_LOCATION | UTF-8 | Location that the item was | 9166 | | | originally designed/written. The | 9167 | | | countries corresponding to the | 9168 | | | string, same 2 octets as in | 9169 | | | Internet domains [114], or | 9170 | | | possibly ISO-3166 [115]. This code | 9171 | | | is followed by a comma, then more | 9172 | | | detailed information such as | 9173 | | | state/province, another comma, and | 9174 | | | then city. For example, "US, | 9175 | | | Texas, Austin". This will allow | 9176 | | | for easy sorting. It is okay to | 9177 | | | only store the country, or the | 9178 | | | country and the state/province. | 9179 | | | More detailed information can be | 9180 | | | added after the city through the | 9181 | | | use of additional commas. In cases | 9182 | | | where the province/state is | 9183 | | | unknown, but you want to store the | 9184 | | | city, simply leave a space between | 9185 | | | the two commas. For example, "US, | 9186 | | | , Austin". | 9187 | COMPOSER_NATIONALITY | UTF-8 | Nationality of the main composer | 9188 | | | of the item, mostly for classical | 9189 | | | music. The countries corresponding | 9190 | | | to the string, same 2 octets as in | 9191 | | | Internet domains [116], or | 9192 | | | possibly ISO-3166 [117]. | 9193 +----------------------+-------+------------------------------------+ 9195 41.14. Personal 9196 +--------------+-------+--------------------------------------------+ 9197 | Tag Name | Type | Description | 9198 +--------------+-------+--------------------------------------------+ 9199 | COMMENT | UTF-8 | Any comment related to the content. | 9200 | PLAY_COUNTER | UTF-8 | The number of time the item has been | 9201 | | | played. | 9202 | RATING | UTF-8 | A numeric value defining how much a person | 9203 | | | likes the song/movie. The number is | 9204 | | | between 0 and 5 with decimal values | 9205 | | | possible (e.g. 2.7), 5(.0) being the | 9206 | | | highest possible rating. Other rating | 9207 | | | systems with different ranges will have to | 9208 | | | be scaled. | 9209 +--------------+-------+--------------------------------------------+ 9211 41.15. Technical Information 9212 +------------------+--------+---------------------------------------+ 9213 | Tag Name | Type | Description | 9214 +------------------+--------+---------------------------------------+ 9215 | ENCODER | UTF-8 | The software or hardware used to | 9216 | | | encode this item. ("LAME" or "XviD") | 9217 | ENCODER_SETTINGS | UTF-8 | A list of the settings used for | 9218 | | | encoding this item. No specific | 9219 | | | format. | 9220 | BPS | UTF-8 | The average bits per second of the | 9221 | | | specified item. This is only the data | 9222 | | | in the Blocks, and excludes headers | 9223 | | | and any container overhead. | 9224 | FPS | UTF-8 | The average frames per second of the | 9225 | | | specified item. This is typically the | 9226 | | | average number of Blocks per second. | 9227 | | | In the event that lacing is used, | 9228 | | | each laced chunk is to be counted as | 9229 | | | a separate frame. | 9230 | BPM | UTF-8 | Average number of beats per minute in | 9231 | | | the complete target (e.g. a chapter). | 9232 | | | Usually a decimal number. | 9233 | MEASURE | UTF-8 | In music, a measure is a unit of time | 9234 | | | in Western music like "4/4". It | 9235 | | | represents a regular grouping of | 9236 | | | beats, a meter, as indicated in | 9237 | | | musical notation by the time | 9238 | | | signature.. The majority of the | 9239 | | | contemporary rock and pop music you | 9240 | | | hear on the radio these days is | 9241 | | | written in the 4/4 time signature. | 9242 | TUNING | UTF-8 | It is saved as a frequency in hertz | 9243 | | | to allow near-perfect tuning of | 9244 | | | instruments to the same tone as the | 9245 | | | musical piece (e.g. "441.34" in | 9246 | | | Hertz). The default value is 440.0 | 9247 | | | Hz. | 9248 | REPLAYGAIN_GAIN | binary | The gain to apply to reach 89dB SPL | 9249 | | | on playback. This is based on the | 9250 | | | Replay Gain standard [118]. Note that | 9251 | | | ReplayGain information can be found | 9252 | | | at all TargetType levels (track, | 9253 | | | album, etc). | 9254 | REPLAYGAIN_PEAK | binary | The maximum absolute peak value of | 9255 | | | the item. This is based on the Replay | 9256 | | | Gain standard [119]. | 9257 +------------------+--------+---------------------------------------+ 9259 41.16. Identifiers 9261 +----------------+--------+-----------------------------------------+ 9262 | Tag Name | Type | Description | 9263 +----------------+--------+-----------------------------------------+ 9264 | ISRC | UTF-8 | The International Standard Recording | 9265 | | | Code [120], excluding the "ISRC" prefix | 9266 | | | and including hyphens. | 9267 | MCDI | binary | This is a binary dump of the TOC of the | 9268 | | | CDROM that this item was taken from. | 9269 | | | This holds the same information as the | 9270 | | | MCDI in ID3. | 9271 | ISBN | UTF-8 | International Standard Book Number | 9272 | | | [121] | 9273 | BARCODE | UTF-8 | EAN-13 [122] (European Article | 9274 | | | Numbering) or UPC-A [123] (Universal | 9275 | | | Product Code) bar code identifier | 9276 | CATALOG_NUMBER | UTF-8 | A label-specific string used to | 9277 | | | identify the release (TIC 01 for | 9278 | | | example). | 9279 | LABEL_CODE | UTF-8 | A 4-digit or 5-digit number to identify | 9280 | | | the record label, typically printed as | 9281 | | | (LC) xxxx or (LC) 0xxxx on CDs medias | 9282 | | | or covers (only the number is stored). | 9283 | LCCN | UTF-8 | Library of Congress Control Number | 9284 | | | [124] | 9285 +----------------+--------+-----------------------------------------+ 9287 41.17. Commercial 9288 +-------------------+-------+---------------------------------------+ 9289 | Tag Name | Type | Description | 9290 +-------------------+-------+---------------------------------------+ 9291 | PURCHASE_ITEM | UTF-8 | URL to purchase this file. This is | 9292 | | | akin to the WPAY tag in ID3. | 9293 | PURCHASE_INFO | UTF-8 | Information on where to purchase this | 9294 | | | album. This is akin to the WCOM tag | 9295 | | | in ID3. | 9296 | PURCHASE_OWNER | UTF-8 | Information on the person who | 9297 | | | purchased the file. This is akin to | 9298 | | | the TOWN tag in ID3 [125]. | 9299 | PURCHASE_PRICE | UTF-8 | The amount paid for entity. There | 9300 | | | SHOULD only be a numeric value in | 9301 | | | here. Only numbers, no letters or | 9302 | | | symbols other than ".". For instance, | 9303 | | | you would store "15.59" instead of | 9304 | | | "$15.59USD". | 9305 | PURCHASE_CURRENCY | UTF-8 | The currency type used to pay for the | 9306 | | | entity. Use ISO-4217 [126] for the 3 | 9307 | | | letter currency code. | 9308 +-------------------+-------+---------------------------------------+ 9310 41.18. Legal 9312 +----------------------+-------+------------------------------------+ 9313 | Tag Name | Type | Description | 9314 +----------------------+-------+------------------------------------+ 9315 | COPYRIGHT | UTF-8 | The copyright information as per | 9316 | | | the copyright holder. This is akin | 9317 | | | to the TCOP tag in ID3. | 9318 | PRODUCTION_COPYRIGHT | UTF-8 | The copyright information as per | 9319 | | | the production copyright holder. | 9320 | | | This is akin to the TPRO tag in | 9321 | | | ID3. | 9322 | LICENSE | UTF-8 | The license applied to the content | 9323 | | | (like Creative Commons variants). | 9324 | TERMS_OF_USE | UTF-8 | The terms of use for this item. | 9325 | | | This is akin to the USER tag in | 9326 | | | ID3. | 9327 +----------------------+-------+------------------------------------+ 9329 41.19. Notes 9331 o In the Target list, a logical OR is applied on all tracks, a 9332 logical OR is applied on all chapters. Then a logical AND is 9333 applied between the Tracks list and the Chapters list to know if 9334 an element belongs to this Target. 9336 42. Attachments 9338 42.1. Introduction 9340 Matroska supports storage of related files and data in the 9341 Attachments Top-Level Element. Attachments can be used to store 9342 related cover art, font files, transcripts, reports, error recovery 9343 files, picture or text-based annotations, copies of specifications, 9344 or other ancilliary files related to the Segment. 9346 "Matroska Readers" MUST NOT execute files stored as Attachments. 9348 42.2. Cover Art 9350 This section defines a set of guidelines for the storage of cover art 9351 in Matroska files. A "Matroska Reader" MAY use embedded cover art to 9352 display a representation still-image depiction of the multimedia 9353 contents of the Matroska file. 9355 Cover art SHOULD only use the JPEG and PNG picture formats. 9357 There can be 2 different covers for a movie/album. A portrait one 9358 (like a DVD case) and a landscape one (like a banner ad for example, 9359 looking better on a wide screen). 9361 There can be 2 versions of the same cover, the "normal cover" and the 9362 "small cover". The dimension of the "normal cover" SHOULD be 600 on 9363 the smallest side (for example, 960x600 for landscape, 600x800 for 9364 portrait, or 600x600 for square). The dimension of the "small cover" 9365 SHOULD be 120 on the smallest side (for example, 192x120 or 120x160). 9367 Versions of cover art can be differentiated by the filename, which is 9368 stored in the "FileName Element". The default filename of the 9369 "normal cover" in square or portrait mode is "cover.(jpg|png)". When 9370 stored, the "normal cover" SHOULD be the first Attachment in storage 9371 order. The "small cover" SHOULD be prefixed with "small_", such as 9372 "small_cover.(jpg|png)". The landscape variant SHOULD be suffixed 9373 with "_land", such as "cover_land.(jpg|png)". The filenames are case 9374 sensitive and SHOULD all be lower case. 9376 The following table provides examples of file names for cover art in 9377 Attachments. 9379 FileName | Image Orientation | Pixel Length of Smallest Side 9380 cover.jpg | Portrait or square | 600 small_cover.png | Portrait or 9381 square | 120 cover_land.png | Landscape | 600 small_cover_land.jpg | 9382 Landscape | 120 9384 42.3. Font files 9386 43. Cues 9388 43.1. Introduction 9390 The "Cues Element" provides an index of certain "Cluster Elements" to 9391 allow for optimized seeking to absolute timestamps within the 9392 "Segment". The "Cues Element" contains one or many "CuePoint 9393 Elements" which each MUST reference an absolute timestamp (via the 9394 "CueTime Element"), a "Track" (via the "CueTrack Element"), and a 9395 "Segment Position" (via the "CueClusterPosition Element"). 9396 Additional non-mandated Elements are part of the "CuePoint Element" 9397 such as "CueDuration", "CueRelativePosition", "CueCodecState" and 9398 others which provide any potential Matroska reader with additional 9399 information to use in the optimization of seeking performance. 9401 43.2. Recommendations 9403 The following recommendations are provided to optimize Matroska 9404 performance. 9406 o Unless Matroska is used as a live stream, it SHOULD contain a 9407 "Cues Element". 9409 o For each video track, each keyframe SHOULD be referenced by a 9410 "CuePoint Element". 9412 o It is RECOMMENDED to not reference non-keyframes of video tracks 9413 in "Cues" unless it references a "Cluster Element" which contains 9414 a "CodecState Element" but no keyframes. 9416 o For each subtitle track present, each subtitle frame SHOULD be 9417 referenced by a "CuePoint Element" with a "CueDuration Element". 9419 o Audio tracks SHOULD only be referenced in "CuePoint Elements" if 9420 no video track is present. In this case "CuePoint Elements" 9421 SHOULD reference audio keyframes at most once every 500 9422 milliseconds. 9424 o If the referenced frame is not stored within the first 9425 "SimpleBlock" or first "BlockGroup" within its "Cluster Element", 9426 then the "CueRelativePosition Element" SHOULD be written to 9427 reference where in the "Cluster" the reference frame is stored. 9429 o If a "CuePoint Element" references "Cluster Element" that includes 9430 a "CodecState Element", then that "CuePoint Element" MUST use a 9431 "CueCodecState Element". 9433 o "CuePoint Elements" SHOULD be numerically sorted in storage order 9434 by the value of the "CueTime Element". 9436 44. Matroska Streaming 9438 There exist multiple ways to stream content. The term streaming 9439 itself is very vague. It means reading a file stored on a server. 9440 But the server could be very distant or very close. The transport 9441 system and the protocol used for streaming makes the whole 9442 difference. 9444 In the case of Matroska, there are mostly 2 different kinds of 9445 stream: file access and live streaming. 9447 45. File Access 9449 File access can simply be reading a file located on your computer, 9450 but also accessing it from an HTTP (web) server or CIFS (windows 9451 share) server. All these protocols are usually safe from reading 9452 errors and seeking in the stream is possible. On other hand when the 9453 file is stored far away or on a slow server, seeking can be an 9454 expensive operation and SHOULD be avoided. That's why we set a few 9455 guidelines [127] that, when followed, help reduce the number of 9456 seeking for regular playback and also have the playback start quickly 9457 without a lot of data needed to read first (like the Cues (index), 9458 Attachments or Meta Seek of all the Clusters). 9460 Matroska having a small overhead, it is well suited for storing 9461 music/videos on file servers without having a big impact on the 9462 bandwidth used. It doesn't require to load the index before playing 9463 (the index can be loaded only when seeking is requested the first 9464 time), so playback can start very quickly too. 9466 46. Live Streaming 9468 Live streaming is the equivalent of TV broadcasting on the internet. 9469 There are 2 families of servers for that. The RTP/RTSP ones and the 9470 HTTP servers. Matroska is not meant to be used over RTP. RTP 9471 already has timing and channel mechanisms that would wasted if 9472 doubled in Matroska. On the other hand live streaming of Matroska 9473 over HTTP (or any other plain protocol based on TCP) is very 9474 possible. 9476 A live Matroska stream is different than a file, because it may have 9477 no known end (only when the client disconnects). For that the 9478 Segment MUST use the "unknown" size (all 1s in the size). The other 9479 option would be to concatenate Segments with known sizes one after 9480 the other. This solution allows a change of codec/resolution between 9481 each segment which can be useful in some cases (switch between 4:3 9482 and 16:9 in some TV programs for example). 9484 The Segment(s) being continuous, certain elements like Meta Seek, 9485 Cues, Chapters, Attachments MUST NOT be used in this context. 9487 On the player side, it is possible to detect that a stream is not 9488 seekable. If the stream does not have a Meta Seek list or a Cues 9489 list at the beginning of the stream, it SHOULD be considered as non 9490 seekable. Even though it's still theoretically possible to seek 9491 blindly forward in the stream, if the server supports it. 9493 In the context of a live radio or even web TV it is possible to "Tag" 9494 the content that is currently playing. The Tags level 1 element can 9495 be placed between Clusters each time necessary. In that case, the 9496 new Tags found MUST reset the previously encountered tags and use the 9497 new values instead (be they empty). 9499 47. Menu Specifications 9501 48. Introduction 9503 This document is a _draft of the Menu system_ that will be the 9504 default one in Matroska. As it will just be composed of a Control 9505 Track, it will be seen as a "codec" and could be replaced later by 9506 something else if needed. 9508 A menu is like what you see on DVDs, when you have some screens to 9509 select the audio format, subtitles or scene selection. 9511 49. Requirements 9513 What we'll try to have is a system that can do almost everything done 9514 on a DVD, or more, or better, or drop the unused features if 9515 necessary. 9517 As the name suggests, a Control Track is a track that can control the 9518 playback of the file and/or all the playback features. To make it as 9519 simple as possible for players, the Control Track will just give 9520 orders to the player and get the actions associated with the 9521 highlights/hotspots. 9523 49.1. Highlights/Hotspots 9525 A highlight is basically a rectangle/key associated with an action 9526 UID. When that rectangle/key is activated, the player send the UID 9527 of the action to the Control Track handler (codec). The fact that it 9528 can also be a key means that even for audio only files, a keyboard 9529 shortcut or button panel could be used for menus. But in that case, 9530 the hotspot will have to be associated with a name to display. 9532 So this highlight is sent from the Control Track to the Player. Then 9533 the player has to handle that highlight until it's deactivated (see 9534 Playback features [128]) 9536 The highlight contains a UID of the action, a displayable name (UTF- 9537 8), an associated key (list of keys to be defined, probably 9538 up/down/left/right/select), a screen position/range and an image to 9539 display. The image will be displayed either when the user place the 9540 mouse over the rectangle (or any other shape), or when an option of 9541 the screen is selected (not activated). There could be a second 9542 image used when the option is activated. And there could be a third 9543 image that can serve as background. This way you could have a still 9544 image (like in some DVDs) for the menu and behind that image blank 9545 video (small bitrate). 9547 When a highlight is activated by the user, the player has to send the 9548 UID of the action to the Control Track. Then the Control Track codec 9549 will handle the action and possibly give new orders to the player. 9551 The format used for storing images SHOULD be extensible. For the 9552 moment we'll use PNG and BMP, both with alpha channel. 9554 49.2. Playback features 9556 All the following features will be sent from the Control Track to the 9557 Player : 9559 o Jump to chapter (UID, prev, next, number) 9561 o Disable all tracks of a kind (audio, video, subtitle) 9563 o Enable track UID (the kind doesn't matter) 9565 o Define/Disable a highlight 9567 o Enable/Disable jumping 9569 o Enable/Disable track selection of a kind 9571 o Select Edition ID (see chapters) 9573 o Pause playback 9575 o Stop playback 9576 o Enable/Disable a Chapter UID 9578 o Hide/Unhide a Chapter UID 9580 All the actions will be written in a normal Matroska track, with a 9581 timecode. A "Menu Frame" SHOULD be able to contain more that one 9582 action/highlight for a given timecode. (to be determined, EBML format 9583 structure) 9585 49.3. Player requirements 9587 Some players might not support the control track. That mean they 9588 will play the active/looped parts as part of the data. So I suggest 9589 putting the active/looped parts of a movie at the end of a movie. 9590 When a Menu-aware player encounter the default Control Track of a 9591 Matroska file, the first order SHOULD be to jump at the start of the 9592 active/looped part of the movie. 9594 50. Working Graph 9596 51. Ideas 9598 52. Data Structure 9600 As a Matroska side project, the obvious choice for storing binary 9601 data is EBML. 9603 53. References 9605 53.1. Normative References 9607 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 9608 Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, 9609 . 9611 [RFC6386] Bankoski, J., Koleszar, J., Quillio, L., Salonen, J., 9612 Wilkins, P., and Y. Xu, "VP8 Data Format and Decoding 9613 Guide", RFC 6386, DOI 10.17487/RFC6386, November 2011, 9614 . 9616 53.2. URIs 9618 [1] http://mukoli.free.fr/mcf/mcf.html 9620 [2] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9621 specification.markdown 9623 [3] https://datatracker.ietf.org/wg/cellar/charter/ 9625 [4] https://matroska.org/files/matroska.pdf 9627 [5] diagram.md 9629 [6] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9630 specification.markdown 9632 [7] https://github.com/Matroska-Org/foundation- 9633 source/blob/master/spectool/specdata.xml 9635 [8] https://tools.ietf.org/html/rfc2119 9637 [9] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9638 specification.markdown 9640 [10] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9641 specification.markdown#ebml-element-types 9643 [11] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9644 specification.markdown#ebml-schema 9646 [12] https://github.com/Matroska-Org/ebml-specification/blob/master/ 9647 specification.markdown#structure 9649 [13] https://www.loc.gov/standards/iso639-2/php/English_list.php 9651 [14] https://tools.ietf.org/html/bcp47 9653 [15] https://www.iana.org/domains/root/db 9655 [16] http://www.webmproject.org/docs/container/ 9657 [17] http://www.matroska.org/downloads/test_w1.html 9659 [18] {{site.baseurl}}/index.html#Cluster 9661 [19] {{site.baseurl}}/index.html#Timecode 9663 [20] {{site.baseurl}}/notes.html#TimecodeScale 9665 [21] {{site.baseurl}}/index.html#Cluster 9667 [22] {{site.baseurl}}/index.html#Timecode 9669 [23] {{site.baseurl}}/notes.html#Encryption 9671 [24] {{site.baseurl}}/notes.html#unknown-elements 9673 [25] {{site.baseurl}}/index.html#Cluster 9675 [26] {{site.baseurl}}/index.html#Timecode 9677 [27] {{site.baseurl}}/index.html#TimecodeScale 9679 [28] {{site.baseurl}}/index.html#Cluster 9681 [29] {{site.baseurl}}/index.html#Timecode 9683 [30] {{site.baseurl}}/index.html#Cluster 9685 [31] {{site.baseurl}}/index.html#Timecode 9687 [32] {{site.baseurl}}/index.html#TrackTimeCodeScale 9689 [33] {{site.baseurl}}/notes.html#raw-timecode 9691 [34] {{site.baseurl}}/notes.html#timecode-types 9693 [35] {{site.baseurl}}/notes.html#matroska-version-indicators- 9694 doctypeversion-and-doctypereadversion 9696 [36] {{site.baseurl}}/index.html#StereoMode 9698 [37] {{site.baseurl}}/index.html#TrackOperation 9700 [38] {{site.baseurl}}/index.html#TrackCombinePlanes 9702 [39] {{site.baseurl}}/notes.html#track-operation 9704 [40] {{site.baseurl}}/index.html#StereoMode 9706 [41] {{site.baseurl}}/index.html#TrackOperation 9708 [42] {{site.baseurl}}/index.html#Void 9710 [43] {{site.baseurl}}/order_guidelines.html#tags-end 9712 [44] https://msdn.microsoft.com/en-us/library/windows/desktop/ 9713 dd318229(v=vs.85).aspx 9715 [45] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9716 librmff.h 9718 [46] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9719 librmff.h 9721 [47] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9722 librmff.h 9724 [48] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9725 librmff.h 9727 [49] https://developer.apple.com/library/mac/documentation/QuickTime/ 9728 QTFF/QTFFPreface/qtffPreface.html 9730 [50] {{site.baseurl}}/index.html#lacing 9732 [51] http://www.theora.org/doc/Theora.pdf 9734 [52] http://wiki.multimedia.cx/ 9735 index.php?title=Apple_ProRes#Frame_layout 9737 [53] https://www.webmproject.org/vp9/ 9739 [54] https://datatracker.ietf.org/doc/draft-niedermayer-cellar-ffv1/ 9741 [55] http://alac.macosforge.org/trac/browser/trunk/ 9742 ALACMagicCookieDescription.txt 9744 [56] {{site.baseurl}}/index.html#lacing 9746 [57] https://xiph.org/vorbis/doc/Vorbis_I_spec.html 9748 [58] https://xiph.org/vorbis/doc/v-comment.html 9750 [59] https://xiph.org/vorbis/doc/Vorbis_I_spec.html 9752 [60] http://flac.sourceforge.net/ 9754 [61] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9755 librmff.h 9757 [62] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9758 librmff.h 9760 [63] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9761 librmff.h 9763 [64] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9764 librmff.h 9766 [65] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9767 librmff.h 9769 [66] https://github.com/mbunkus/mkvtoolnix/blob/master/lib/librmff/ 9770 librmff.h 9772 [67] http://msdn.microsoft.com/library/default.asp?url=/library/en- 9773 us/multimed/mmstr_625u.asp 9775 [68] https://developer.apple.com/library/mac/documentation/QuickTime/ 9776 QTFF/QTFFPreface/qtffPreface.html 9778 [69] https://developer.apple.com/library/mac/documentation/QuickTime/ 9779 QTFF/QTFFPreface/qtffPreface.html 9781 [70] https://developer.apple.com/library/mac/documentation/QuickTime/ 9782 QTFF/QTFFPreface/qtffPreface.html 9784 [71] http://tausoft.org/ 9786 [72] http://tausoft.org/wiki/True_Audio_Codec_Format 9788 [73] http://www.wavpack.com/ 9790 [74] wavpack.html 9792 [75] {{site.baseurl}}/subtitles.html 9794 [76] {{site.baseurl}}/subtitles.html 9796 [77] {{site.baseurl}}/subtitles.html 9798 [78] {{site.baseurl}}/subtitles.html 9800 [79] {{site.baseurl}}/subtitles.html 9802 [80] {{site.baseurl}}/subtitles.html 9804 [81] {{site.baseurl}}/subtitles.html 9806 [82] {{site.baseurl}}/subtitles.html 9808 [83] http://wiki.xiph.org/index.php/OggKate#Matroska_mapping 9810 [84] http://dvd.sourceforge.net/dvdinfo/pci_pkt.html 9812 [85] http://dvd.sourceforge.net/dvdinfo/pci_pkt.html 9814 [86] {{site.baseurl}}/index.html#ChapProcessCodecID 9816 [87] {{site.baseurl}}/index.html#ChapProcessCodecID 9818 [88] {{site.baseurl}}/index.html#ChapterTranslateID 9820 [89] http://dvd.sourceforge.net/dvdinfo/uops.html 9822 [90] http://www.dvd-replica.com/DVD/ 9824 [91] http://dvd.sourceforge.net/dvdinfo/ 9826 [92] http://wiki.multimedia.cx/index.php?title=SubStation_Alpha 9828 [93] http://moodub.free.fr/video/ass-specs.doc 9830 [94] https://www.w3.org/ 9832 [95] https://w3c.github.io/webvtt/ 9834 [96] http://www.webmproject.org/docs/container/ 9836 [97] http://www.matroska.org/files/tags/matroskatags.dtd 9838 [98] http://www.bunkus.org/videotools/mkvtoolnix/doc/ 9839 mkvmerge.html#mkvmerge.tags 9841 [99] othertagsystems/comparetable.html 9843 [100] http://lcweb.loc.gov/standards/iso639-2/englangn.html#two 9845 [101] http://id3.org/id3v2.3.0#TPE1 9847 [102] http://id3.org/id3v2.3.0#TPE2 9849 [103] http://id3.org/id3v2.3.0#TCOM 9851 [104] http://id3.org/id3v2.3.0#TEXT 9853 [105] http://id3.org/id3v2.3.0#TPE3 9855 [106] http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/RIFF.html 9857 [107] http://id3.org/id3v2.3.0#TENC 9859 [108] http://id3.org/id3v2.3.0#TPE4 9861 [109] http://id3.org/id3v2.3.0#TPUB 9863 [110] http://id3.org/id3v2.3.0#TMED 9865 [111] http://www.icra.org/ 9867 [112] http://www.iana.org/cctld/cctld-whois.htm 9869 [113] http://www.iso.org/iso/country_codes 9871 [114] http://www.iana.org/cctld/cctld-whois.htm 9873 [115] http://www.iso.org/iso/country_codes 9875 [116] http://www.iana.org/cctld/cctld-whois.htm 9877 [117] http://www.iso.org/iso/country_codes 9879 [118] http://www.replaygain.org/ 9881 [119] http://www.replaygain.org/ 9883 [120] http://www.ifpi.org/isrc/isrc_handbook.html#Heading198 9885 [121] http://www.isbn-international.org/ 9887 [122] http://www.ean-int.org/ 9889 [123] http://www.uc-council.org/ 9891 [124] http://www.loc.gov/marc/lccn.html 9893 [125] http://id3.org/id3v2.3.0#TOWN 9895 [126] http://www.xe.com/iso4217.htm 9897 [127] {{site.baseurl}}/index.html 9899 [128] {{site.baseurl}}/chapters/menu.html#playback-features 9901 Authors' Addresses 9903 Steve Lhomme 9905 Email: slhomme@matroska.org 9907 Moritz Bunkus 9909 Email: moritz@bunkus.org 9910 Dave Rice 9912 Email: dave@dericed.com