rfc9559.original | rfc9559.txt | |||
---|---|---|---|---|
CELLAR Group S. Lhomme | Internet Engineering Task Force (IETF) S. Lhomme | |||
Internet-Draft | Request for Comments: 9559 | |||
Intended status: Standards Track M. Bunkus | Updates: 8794 M. Bunkus | |||
Expires: 24 April 2024 | Category: Standards Track | |||
D. Rice | ISSN: 2070-1721 D. Rice | |||
22 October 2023 | April 2024 | |||
Matroska Media Container Format Specifications | Matroska Media Container Format Specifications | |||
draft-ietf-cellar-matroska-21 | ||||
Abstract | Abstract | |||
This document defines the Matroska audiovisual data container | This document defines the Matroska audiovisual data container | |||
structure, including definitions of its structural elements, as well | structure, including definitions of its structural elements, | |||
as its terminology, vocabulary, and application. | terminology, vocabulary, and application. | |||
This document updates [RFC8794] to permit the use of a previously | This document updates RFC 8794 to permit the use of a previously | |||
reserved EBML Element ID. | reserved Extensible Binary Meta Language (EBML) Element ID. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This is an Internet Standards Track document. | |||
provisions of BCP 78 and BCP 79. | ||||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at https://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This document is a product of the Internet Engineering Task Force | |||
and may be updated, replaced, or obsoleted by other documents at any | (IETF). It represents the consensus of the IETF community. It has | |||
time. It is inappropriate to use Internet-Drafts as reference | received public review and has been approved for publication by the | |||
material or to cite them other than as "work in progress." | Internet Engineering Steering Group (IESG). Further information on | |||
Internet Standards is available in Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on 24 April 2024. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc9559. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2023 IETF Trust and the persons identified as the | Copyright (c) 2024 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents | |||
license-info) in effect on the date of publication of this document. | (https://trustee.ietf.org/license-info) in effect on the date of | |||
Please review these documents carefully, as they describe your rights | publication of this document. Please review these documents | |||
and restrictions with respect to this document. Code Components | carefully, as they describe your rights and restrictions with respect | |||
extracted from this document must include Revised BSD License text as | to this document. Code Components extracted from this document must | |||
described in Section 4.e of the Trust Legal Provisions and are | include Revised BSD License text as described in Section 4.e of the | |||
provided without warranty as described in the Revised BSD License. | Trust Legal Provisions and are provided without warranty as described | |||
in the Revised BSD License. | ||||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 6 | 1. Introduction | |||
2. Status of this document . . . . . . . . . . . . . . . . . . . 7 | 2. Status of This Document | |||
3. Notation and Conventions . . . . . . . . . . . . . . . . . . 7 | 3. Notation and Conventions | |||
4. Matroska Overview . . . . . . . . . . . . . . . . . . . . . . 7 | 4. Matroska Overview | |||
4.1. Principles . . . . . . . . . . . . . . . . . . . . . . . 7 | 4.1. Principles | |||
4.2. Updates to RFC 8794 . . . . . . . . . . . . . . . . . . . 7 | 4.2. Updates to RFC 8794 | |||
4.3. Added EBML Constraints . . . . . . . . . . . . . . . . . 8 | 4.3. Added EBML Constraints | |||
4.4. Design Rules . . . . . . . . . . . . . . . . . . . . . . 9 | 4.4. Design Rules | |||
4.5. Data Layout . . . . . . . . . . . . . . . . . . . . . . . 9 | 4.5. Data Layout | |||
5. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 18 | 5. Matroska Schema | |||
5.1. Segment Element . . . . . . . . . . . . . . . . . . . . . 18 | 5.1. Segment Element | |||
5.1.1. SeekHead Element . . . . . . . . . . . . . . . . . . 19 | 5.1.1. SeekHead Element | |||
5.1.1.1. Seek Element . . . . . . . . . . . . . . . . . . 19 | 5.1.1.1. Seek Element | |||
5.1.2. Info Element . . . . . . . . . . . . . . . . . . . . 19 | 5.1.2. Info Element | |||
5.1.2.1. SegmentUUID Element . . . . . . . . . . . . . . . 20 | 5.1.2.1. SegmentUUID Element | |||
5.1.2.2. SegmentFilename Element . . . . . . . . . . . . . 20 | 5.1.2.2. SegmentFilename Element | |||
5.1.2.3. PrevUUID Element . . . . . . . . . . . . . . . . 20 | 5.1.2.3. PrevUUID Element | |||
5.1.2.4. PrevFilename Element . . . . . . . . . . . . . . 20 | 5.1.2.4. PrevFilename Element | |||
5.1.2.5. NextUUID Element . . . . . . . . . . . . . . . . 21 | 5.1.2.5. NextUUID Element | |||
5.1.2.6. NextFilename Element . . . . . . . . . . . . . . 21 | 5.1.2.6. NextFilename Element | |||
5.1.2.7. SegmentFamily Element . . . . . . . . . . . . . . 21 | 5.1.2.7. SegmentFamily Element | |||
5.1.2.8. ChapterTranslate Element . . . . . . . . . . . . 21 | 5.1.2.8. ChapterTranslate Element | |||
5.1.2.9. TimestampScale Element . . . . . . . . . . . . . 23 | 5.1.2.9. TimestampScale Element | |||
5.1.2.10. Duration Element . . . . . . . . . . . . . . . . 23 | 5.1.2.10. Duration Element | |||
5.1.2.11. DateUTC Element . . . . . . . . . . . . . . . . . 23 | 5.1.2.11. DateUTC Element | |||
5.1.2.12. Title Element . . . . . . . . . . . . . . . . . . 23 | 5.1.2.12. Title Element | |||
5.1.2.13. MuxingApp Element . . . . . . . . . . . . . . . . 23 | 5.1.2.13. MuxingApp Element | |||
5.1.2.14. WritingApp Element . . . . . . . . . . . . . . . 23 | 5.1.2.14. WritingApp Element | |||
5.1.3. Cluster Element . . . . . . . . . . . . . . . . . . . 24 | 5.1.3. Cluster Element | |||
5.1.3.1. Timestamp Element . . . . . . . . . . . . . . . . 24 | 5.1.3.1. Timestamp Element | |||
5.1.3.2. Position Element . . . . . . . . . . . . . . . . 24 | 5.1.3.2. Position Element | |||
5.1.3.3. PrevSize Element . . . . . . . . . . . . . . . . 24 | 5.1.3.3. PrevSize Element | |||
5.1.3.4. SimpleBlock Element . . . . . . . . . . . . . . . 24 | 5.1.3.4. SimpleBlock Element | |||
5.1.3.5. BlockGroup Element . . . . . . . . . . . . . . . 25 | 5.1.3.5. BlockGroup Element | |||
5.1.4. Tracks Element . . . . . . . . . . . . . . . . . . . 28 | 5.1.4. Tracks Element | |||
5.1.4.1. TrackEntry Element . . . . . . . . . . . . . . . 28 | 5.1.4.1. TrackEntry Element | |||
5.1.5. Cues Element . . . . . . . . . . . . . . . . . . . . 67 | 5.1.5. Cues Element | |||
5.1.5.1. CuePoint Element . . . . . . . . . . . . . . . . 67 | 5.1.5.1. CuePoint Element | |||
5.1.6. Attachments Element . . . . . . . . . . . . . . . . . 69 | 5.1.6. Attachments Element | |||
5.1.6.1. AttachedFile Element . . . . . . . . . . . . . . 69 | 5.1.6.1. AttachedFile Element | |||
5.1.7. Chapters Element . . . . . . . . . . . . . . . . . . 70 | 5.1.7. Chapters Element | |||
5.1.7.1. EditionEntry Element . . . . . . . . . . . . . . 71 | 5.1.7.1. EditionEntry Element | |||
5.1.8. Tags Element . . . . . . . . . . . . . . . . . . . . 76 | 5.1.8. Tags Element | |||
5.1.8.1. Tag Element . . . . . . . . . . . . . . . . . . . 76 | 5.1.8.1. Tag Element | |||
6. Matroska Element Ordering . . . . . . . . . . . . . . . . . . 82 | 6. Matroska Element Ordering | |||
6.1. Top-Level Elements . . . . . . . . . . . . . . . . . . . 82 | 6.1. Top-Level Elements | |||
6.2. CRC-32 . . . . . . . . . . . . . . . . . . . . . . . . . 83 | 6.2. CRC-32 | |||
6.3. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 83 | 6.3. SeekHead | |||
6.4. Cues (index) . . . . . . . . . . . . . . . . . . . . . . 83 | 6.4. Cues (Index) | |||
6.5. Info . . . . . . . . . . . . . . . . . . . . . . . . . . 83 | 6.5. Info | |||
6.6. Chapters Element . . . . . . . . . . . . . . . . . . . . 84 | 6.6. Chapters Element | |||
6.7. Attachments . . . . . . . . . . . . . . . . . . . . . . . 84 | 6.7. Attachments | |||
6.8. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . 84 | 6.8. Tags | |||
7. Matroska versioning . . . . . . . . . . . . . . . . . . . . . 84 | 7. Matroska Versioning | |||
8. Stream Copy . . . . . . . . . . . . . . . . . . . . . . . . . 85 | 8. Stream Copy | |||
9. DefaultDecodedFieldDuration . . . . . . . . . . . . . . . . . 86 | 9. DefaultDecodedFieldDuration | |||
10. Cluster Blocks . . . . . . . . . . . . . . . . . . . . . . . 86 | 10. Cluster Blocks | |||
10.1. Block Structure . . . . . . . . . . . . . . . . . . . . 87 | 10.1. Block Structure | |||
10.2. SimpleBlock Structure . . . . . . . . . . . . . . . . . 88 | 10.2. SimpleBlock Structure | |||
10.3. Block Lacing . . . . . . . . . . . . . . . . . . . . . . 90 | 10.3. Block Lacing | |||
10.3.1. No lacing . . . . . . . . . . . . . . . . . . . . . 90 | 10.3.1. No Lacing | |||
10.3.2. Xiph lacing . . . . . . . . . . . . . . . . . . . . 91 | 10.3.2. Xiph Lacing | |||
10.3.3. EBML lacing . . . . . . . . . . . . . . . . . . . . 92 | 10.3.3. EBML Lacing | |||
10.3.4. Fixed-size lacing . . . . . . . . . . . . . . . . . 94 | 10.3.4. Fixed-size Lacing | |||
10.3.5. Laced Frames Timestamp . . . . . . . . . . . . . . . 94 | 10.3.5. Laced Frames Timestamp | |||
10.4. Random Access Points . . . . . . . . . . . . . . . . . . 95 | 10.4. Random Access Points | |||
11. Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . 98 | 11. Timestamps | |||
11.1. Timestamp Ticks . . . . . . . . . . . . . . . . . . . . 99 | 11.1. Timestamp Ticks | |||
11.1.1. Matroska Ticks . . . . . . . . . . . . . . . . . . . 99 | 11.1.1. Matroska Ticks | |||
11.1.2. Segment Ticks . . . . . . . . . . . . . . . . . . . 99 | 11.1.2. Segment Ticks | |||
11.1.3. Track Ticks . . . . . . . . . . . . . . . . . . . . 100 | 11.1.3. Track Ticks | |||
11.2. Block Timestamps . . . . . . . . . . . . . . . . . . . . 100 | 11.2. Block Timestamps | |||
11.3. TimestampScale Rounding . . . . . . . . . . . . . . . . 101 | 11.3. TimestampScale Rounding | |||
12. Language Codes . . . . . . . . . . . . . . . . . . . . . . . 101 | 12. Language Codes | |||
13. Country Codes . . . . . . . . . . . . . . . . . . . . . . . . 102 | 13. Country Codes | |||
14. Encryption . . . . . . . . . . . . . . . . . . . . . . . . . 102 | 14. Encryption | |||
15. Image Presentation . . . . . . . . . . . . . . . . . . . . . 103 | 15. Image Presentation | |||
15.1. Cropping . . . . . . . . . . . . . . . . . . . . . . . . 103 | 15.1. Cropping | |||
15.2. Rotation . . . . . . . . . . . . . . . . . . . . . . . . 104 | 15.2. Rotation | |||
16. Segment Position . . . . . . . . . . . . . . . . . . . . . . 104 | 16. Segment Position | |||
16.1. Segment Position Exception . . . . . . . . . . . . . . . 104 | 16.1. Segment Position Exception | |||
16.2. Example of Segment Position . . . . . . . . . . . . . . 104 | 16.2. Example of Segment Position | |||
17. Linked Segments . . . . . . . . . . . . . . . . . . . . . . . 105 | 17. Linked Segments | |||
17.1. Hard Linking . . . . . . . . . . . . . . . . . . . . . . 106 | 17.1. Hard Linking | |||
17.2. Medium Linking . . . . . . . . . . . . . . . . . . . . . 108 | 17.2. Medium Linking | |||
17.2.1. Linked-Duration . . . . . . . . . . . . . . . . . . 109 | 17.2.1. Linked-Duration | |||
17.2.2. Linked-Edition . . . . . . . . . . . . . . . . . . . 109 | 17.2.2. Linked-Edition | |||
18. Track Flags . . . . . . . . . . . . . . . . . . . . . . . . . 109 | 18. Track Flags | |||
18.1. Default flag . . . . . . . . . . . . . . . . . . . . . . 109 | 18.1. Default Flag | |||
18.2. Forced flag . . . . . . . . . . . . . . . . . . . . . . 110 | 18.2. Forced Flag | |||
18.3. Hearing-impaired flag . . . . . . . . . . . . . . . . . 110 | 18.3. Hearing-Impaired Flag | |||
18.4. Visual-impaired flag . . . . . . . . . . . . . . . . . . 110 | 18.4. Visual-Impaired Flag | |||
18.5. Descriptions flag . . . . . . . . . . . . . . . . . . . 110 | 18.5. Descriptions Flag | |||
18.6. Original flag . . . . . . . . . . . . . . . . . . . . . 110 | 18.6. Original Flag | |||
18.7. Commentary flag . . . . . . . . . . . . . . . . . . . . 110 | 18.7. Commentary Flag | |||
18.8. Track Operation . . . . . . . . . . . . . . . . . . . . 110 | 18.8. Track Operation | |||
18.9. Overlay Track . . . . . . . . . . . . . . . . . . . . . 111 | 18.9. Overlay Track | |||
18.10. Multi-planar and 3D videos . . . . . . . . . . . . . . . 111 | 18.10. Multi-planar and 3D Videos | |||
19. Default track selection . . . . . . . . . . . . . . . . . . . 112 | 19. Default Track Selection | |||
19.1. Audio Selection . . . . . . . . . . . . . . . . . . . . 112 | 19.1. Audio Selection | |||
19.2. Subtitle selection . . . . . . . . . . . . . . . . . . . 114 | 19.2. Subtitle Selection | |||
20. Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . 116 | 20. Chapters | |||
20.1. EditionEntry . . . . . . . . . . . . . . . . . . . . . . 116 | 20.1. EditionEntry | |||
20.1.1. EditionFlagDefault . . . . . . . . . . . . . . . . . 116 | 20.1.1. EditionFlagDefault | |||
20.1.2. Default Edition . . . . . . . . . . . . . . . . . . 116 | 20.1.2. Default Edition | |||
20.1.3. EditionFlagOrdered . . . . . . . . . . . . . . . . . 117 | 20.1.3. EditionFlagOrdered | |||
20.1.3.1. Ordered-Edition and Matroska Segment-Linking . . 118 | 20.1.3.1. Ordered-Edition and Matroska Segment Linking | |||
20.2. ChapterAtom . . . . . . . . . . . . . . . . . . . . . . 119 | 20.2. ChapterAtom | |||
20.2.1. ChapterTimeStart . . . . . . . . . . . . . . . . . . 119 | 20.2.1. ChapterTimeStart | |||
20.2.2. ChapterTimeEnd . . . . . . . . . . . . . . . . . . . 119 | 20.2.2. ChapterTimeEnd | |||
20.2.3. Nested Chapters . . . . . . . . . . . . . . . . . . 119 | 20.2.3. Nested Chapters | |||
20.2.4. Nested Chapters in Ordered Chapters . . . . . . . . 120 | 20.2.4. Nested Chapters in Ordered Chapters | |||
20.2.5. ChapterFlagHidden . . . . . . . . . . . . . . . . . 120 | 20.2.5. ChapterFlagHidden | |||
20.3. Menu features . . . . . . . . . . . . . . . . . . . . . 121 | 20.3. Menu Features | |||
20.4. Physical Types . . . . . . . . . . . . . . . . . . . . . 121 | 20.4. Physical Types | |||
20.5. Chapter Examples . . . . . . . . . . . . . . . . . . . . 122 | 20.5. Chapter Examples | |||
20.5.1. Example 1 : basic chaptering . . . . . . . . . . . . 122 | 20.5.1. Example 1: Basic Chaptering | |||
20.5.2. Example 2 : nested chapters . . . . . . . . . . . . 124 | 20.5.2. Example 2: Nested Chapters | |||
20.5.2.1. The Micronauts "Bleep To Bleep" . . . . . . . . 124 | 20.5.2.1. The Micronauts "Bleep To Bleep" | |||
21. Attachments . . . . . . . . . . . . . . . . . . . . . . . . . 126 | 21. Attachments | |||
21.1. Cover Art . . . . . . . . . . . . . . . . . . . . . . . 126 | 21.1. Cover Art | |||
21.2. Font files . . . . . . . . . . . . . . . . . . . . . . . 128 | 21.2. Font Files | |||
22. Cues . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 | 22. Cues | |||
22.1. Recommendations . . . . . . . . . . . . . . . . . . . . 130 | 22.1. Recommendations | |||
23. Matroska Streaming . . . . . . . . . . . . . . . . . . . . . 130 | 23. Matroska Streaming | |||
23.1. File Access . . . . . . . . . . . . . . . . . . . . . . 130 | 23.1. File Access | |||
23.2. Livestreaming . . . . . . . . . . . . . . . . . . . . . 131 | 23.2. Livestreaming | |||
24. Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 | 24. Tags | |||
24.1. Tags Precedence . . . . . . . . . . . . . . . . . . . . 132 | 24.1. Tags Precedence | |||
24.2. Tag Levels . . . . . . . . . . . . . . . . . . . . . . . 133 | 24.2. Tag Levels | |||
25. Implementation Recommendations . . . . . . . . . . . . . . . 133 | 25. Implementation Recommendations | |||
25.1. Cluster . . . . . . . . . . . . . . . . . . . . . . . . 133 | 25.1. Cluster | |||
25.2. SeekHead . . . . . . . . . . . . . . . . . . . . . . . . 133 | 25.2. SeekHead | |||
25.3. Optimum Layouts . . . . . . . . . . . . . . . . . . . . 133 | 25.3. Optimum Layouts | |||
25.3.1. Optimum layout for a muxer . . . . . . . . . . . . . 133 | 25.3.1. Optimum Layout for a Muxer | |||
25.3.2. Optimum layout after editing tags . . . . . . . . . 134 | 25.3.2. Optimum Layout after Editing Tags | |||
25.3.3. Optimum layout with Cues at the front . . . . . . . 134 | 25.3.3. Optimum Layout with Cues at the Front | |||
25.3.4. Optimum layout for livestreaming . . . . . . . . . . 134 | 25.3.4. Optimum Layout for Livestreaming | |||
26. Security Considerations . . . . . . . . . . . . . . . . . . . 135 | 26. Security Considerations | |||
27. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 135 | 27. IANA Considerations | |||
27.1. Matroska Element IDs Registry . . . . . . . . . . . . . 136 | 27.1. Matroska Element IDs Registry | |||
27.2. Chapter Codec IDs Registry . . . . . . . . . . . . . . . 152 | 27.2. Chapter Codec IDs Registry | |||
27.3. Media Types . . . . . . . . . . . . . . . . . . . . . . 153 | 27.3. Media Types | |||
27.3.1. For files containing video tracks . . . . . . . . . 153 | 27.3.1. For Files Containing Video Tracks | |||
27.3.2. For files containing audio tracks with no video | 27.3.2. For Files Containing Audio Tracks with No Video Tracks | |||
tracks . . . . . . . . . . . . . . . . . . . . . . . 154 | 27.3.3. For Files Containing a Stereoscopic Video Track | |||
27.3.3. For files containing a stereoscopic video track . . 154 | 28. References | |||
28. Annex A: Historic Deprecated Elements . . . . . . . . . . . . 155 | 28.1. Normative References | |||
28.1. SilentTracks Element . . . . . . . . . . . . . . . . . . 155 | 28.2. Informative References | |||
28.2. SilentTrackNumber Element . . . . . . . . . . . . . . . 156 | Appendix A. Historic Deprecated Elements | |||
28.3. BlockVirtual Element . . . . . . . . . . . . . . . . . . 156 | A.1. SilentTracks Element | |||
28.4. ReferenceVirtual Element . . . . . . . . . . . . . . . . 156 | A.2. SilentTrackNumber Element | |||
28.5. Slices Element . . . . . . . . . . . . . . . . . . . . . 156 | A.3. BlockVirtual Element | |||
28.6. TimeSlice Element . . . . . . . . . . . . . . . . . . . 156 | A.4. ReferenceVirtual Element | |||
28.7. LaceNumber Element . . . . . . . . . . . . . . . . . . . 156 | A.5. Slices Element | |||
28.8. FrameNumber Element . . . . . . . . . . . . . . . . . . 157 | A.6. TimeSlice Element | |||
28.9. BlockAdditionID Element . . . . . . . . . . . . . . . . 157 | A.7. LaceNumber Element | |||
28.10. Delay Element . . . . . . . . . . . . . . . . . . . . . 157 | A.8. FrameNumber Element | |||
28.11. SliceDuration Element . . . . . . . . . . . . . . . . . 157 | A.9. BlockAdditionID Element | |||
28.12. ReferenceFrame Element . . . . . . . . . . . . . . . . . 157 | A.10. Delay Element | |||
28.13. ReferenceOffset Element . . . . . . . . . . . . . . . . 157 | A.11. SliceDuration Element | |||
28.14. ReferenceTimestamp Element . . . . . . . . . . . . . . . 157 | A.12. ReferenceFrame Element | |||
28.15. EncryptedBlock Element . . . . . . . . . . . . . . . . . 158 | A.13. ReferenceOffset Element | |||
28.16. MinCache Element . . . . . . . . . . . . . . . . . . . . 158 | A.14. ReferenceTimestamp Element | |||
28.17. MaxCache Element . . . . . . . . . . . . . . . . . . . . 158 | A.15. EncryptedBlock Element | |||
28.18. TrackOffset Element . . . . . . . . . . . . . . . . . . 158 | A.16. MinCache Element | |||
28.19. CodecSettings Element . . . . . . . . . . . . . . . . . 158 | A.17. MaxCache Element | |||
28.20. CodecInfoURL Element . . . . . . . . . . . . . . . . . . 158 | A.18. TrackOffset Element | |||
28.21. CodecDownloadURL Element . . . . . . . . . . . . . . . . 159 | A.19. CodecSettings Element | |||
28.22. CodecDecodeAll Element . . . . . . . . . . . . . . . . . 159 | A.20. CodecInfoURL Element | |||
28.23. TrackOverlay Element . . . . . . . . . . . . . . . . . . 159 | A.21. CodecDownloadURL Element | |||
28.24. AspectRatioType Element . . . . . . . . . . . . . . . . 159 | A.22. CodecDecodeAll Element | |||
28.25. GammaValue Element . . . . . . . . . . . . . . . . . . . 159 | A.23. TrackOverlay Element | |||
28.26. FrameRate Element . . . . . . . . . . . . . . . . . . . 159 | A.24. AspectRatioType Element | |||
28.27. ChannelPositions Element . . . . . . . . . . . . . . . . 160 | A.25. GammaValue Element | |||
28.28. TrickTrackUID Element . . . . . . . . . . . . . . . . . 160 | A.26. FrameRate Element | |||
28.29. TrickTrackSegmentUID Element . . . . . . . . . . . . . . 160 | A.27. ChannelPositions Element | |||
28.30. TrickTrackFlag Element . . . . . . . . . . . . . . . . . 160 | A.28. TrickTrackUID Element | |||
28.31. TrickMasterTrackUID Element . . . . . . . . . . . . . . 160 | A.29. TrickTrackSegmentUID Element | |||
28.32. TrickMasterTrackSegmentUID Element . . . . . . . . . . . 160 | A.30. TrickTrackFlag Element | |||
28.33. ContentSignature Element . . . . . . . . . . . . . . . . 161 | A.31. TrickMasterTrackUID Element | |||
28.34. ContentSigKeyID Element . . . . . . . . . . . . . . . . 161 | A.32. TrickMasterTrackSegmentUID Element | |||
28.35. ContentSigAlgo Element . . . . . . . . . . . . . . . . . 161 | A.33. ContentSignature Element | |||
28.36. ContentSigHashAlgo Element . . . . . . . . . . . . . . . 161 | A.34. ContentSigKeyID Element | |||
28.37. CueRefCluster Element . . . . . . . . . . . . . . . . . 161 | A.35. ContentSigAlgo Element | |||
28.38. CueRefNumber Element . . . . . . . . . . . . . . . . . . 161 | A.36. ContentSigHashAlgo Element | |||
28.39. CueRefCodecState Element . . . . . . . . . . . . . . . . 161 | A.37. CueRefCluster Element | |||
28.40. FileReferral Element . . . . . . . . . . . . . . . . . . 162 | A.38. CueRefNumber Element | |||
28.41. FileUsedStartTime Element . . . . . . . . . . . . . . . 162 | A.39. CueRefCodecState Element | |||
28.42. FileUsedEndTime Element . . . . . . . . . . . . . . . . 162 | A.40. FileReferral Element | |||
28.43. TagDefaultBogus Element . . . . . . . . . . . . . . . . 162 | A.41. FileUsedStartTime Element | |||
29. Normative References . . . . . . . . . . . . . . . . . . . . 162 | A.42. FileUsedEndTime Element | |||
30. Informative References . . . . . . . . . . . . . . . . . . . 164 | A.43. TagDefaultBogus Element | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 166 | Authors' Addresses | |||
1. Introduction | 1. Introduction | |||
Matroska is an audiovisual data container format. It was derived | Matroska is an audiovisual data container format. It was derived | |||
from a project called [MCF], but diverges from it significantly | from a project called [MCF] but diverges from it significantly | |||
because it is based on EBML (Extensible Binary Meta Language) | because it is based on EBML (Extensible Binary Meta Language) | |||
[RFC8794], a binary derivative of XML. EBML provides significant | [RFC8794], a binary derivative of XML. EBML provides significant | |||
advantages in terms of future format extensibility, without breaking | advantages in terms of future format extensibility, without breaking | |||
file support in parsers reading the previous versions. | file support in parsers reading the previous versions. | |||
First, it is essential to clarify exactly "What an Audio/Video | To avoid any misunderstandings, it is essential to clarify exactly | |||
container is", to avoid any misunderstandings: | what an audio/video container is: | |||
* It is NOT a video or audio compression format (codec). | ||||
* It is NOT a video or audio compression format (codec) | ||||
* It is an envelope in which there can be many audio, video, and | * It is an envelope in which there can be many audio, video, and | |||
subtitles streams, allowing the user to store a complete movie or | subtitles streams, allowing the user to store a complete movie or | |||
CD in a single file. | CD in a single file. | |||
Matroska is designed with the future in mind. It incorporates | Matroska is designed with the future in mind. It incorporates | |||
features such as: | features such as: | |||
* Fast seeking in the file | * Fast seeking in the file | |||
* Chapter entries | * Chapter entries | |||
* Full metadata (tags) support | * Full metadata (tags) support | |||
* Selectable subtitle/audio/video streams | * Selectable subtitle/audio/video streams | |||
* Modularly expandable | * Modularly expandable | |||
* Error resilience (can recover playback even when the stream is | * Error resilience (can recover playback even when the stream is | |||
damaged) | damaged) | |||
* Streamable over the internet and local networks (HTTP [RFC9110], | ||||
* Streamable over the Internet and local networks (HTTP [RFC9110], | ||||
FTP [RFC0959], SMB [SMB-CIFS], etc.) | FTP [RFC0959], SMB [SMB-CIFS], etc.) | |||
* Menus (like DVDs have [DVD-Video]) | ||||
2. Status of this document | * Menus (like menus that DVDs have [DVD-Video]) | |||
This document covers Matroska versions 1, 2, 3 and 4. Matroska v4 is | 2. Status of This Document | |||
the current version. Matroska 1 to 3 are no longer maintained. No | ||||
new elements are expected in files with version numbers 1, 2, or 3. | This document covers Matroska versions 1, 2, 3, and 4. Matroska | |||
version 4 is the current version. Matroska versions 1 to 3 are no | ||||
longer maintained. No new elements are expected in files with | ||||
version numbers 1, 2, or 3. | ||||
3. Notation and Conventions | 3. Notation and Conventions | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
This document defines specific terms in order to define the format | This document defines the following terms in order to define the | |||
and application of Matroska. Specific terms are defined below: | format and application of Matroska: | |||
Matroska: A multimedia container format based on EBML (Extensible | Matroska: A multimedia container format based on EBML (Extensible | |||
Binary Meta Language). | Binary Meta Language). | |||
Matroska Reader: A data parser that interprets the semantics of a | Matroska Reader: A data parser that interprets the semantics of a | |||
Matroska document and creates a way for programs to use Matroska. | Matroska document and creates a way for programs to use Matroska. | |||
Matroska Player: A Matroska Reader with a primary purpose of playing | ||||
audiovisual files, including Matroska documents. | Matroska Player: A Matroska Reader with the primary purpose of | |||
playing audiovisual files, including Matroska documents. | ||||
Matroska Writer: A data writer that creates Matroska documents. | Matroska Writer: A data writer that creates Matroska documents. | |||
4. Matroska Overview | 4. Matroska Overview | |||
4.1. Principles | 4.1. Principles | |||
Matroska is a Document Type of EBML (Extensible Binary Meta | Matroska is a Document Type of EBML. This specification is dependent | |||
Language). This specification is dependent on the EBML Specification | on the EBML specification [RFC8794]. For an understanding of | |||
[RFC8794]. For an understanding of Matroska's EBML Schema, see in | Matroska's EBML Schema, see in particular the sections of the EBML | |||
particular the sections of the EBML Specification covering EBML | specification that cover EBML Element Types (Section 7), EBML Schema | |||
Element Types (Section 7), EBML Schema (Section 11.1), and EBML | (Section 11.1), and EBML Structure (Section 3). | |||
Structure (Section 3). | ||||
4.2. Updates to RFC 8794 | 4.2. Updates to RFC 8794 | |||
Because of an oversight, [RFC8794] reserved EBML ID 0x80, which is | Because of an oversight, [RFC8794] reserved EBML ID 0x80, which is | |||
used by deployed Matroska implementations. For this reason, this | used by deployed Matroska implementations. For this reason, this | |||
specification updates [RFC8794] to make 0x80 a legal EBML ID. | specification updates [RFC8794] to make 0x80 a legal EBML ID. | |||
Specifically, the following are changed in [RFC8794]: | Additionally, this specification makes the following updates: | |||
* From Errata 7189 | ||||
In Section 17.1, | ||||
OLD: | ||||
One-octet Element IDs MUST be between 0x81 and 0xFE. These items are | ||||
valuable because they are short, and they need to be used for | ||||
commonly repeated elements. Element IDs are to be allocated within | ||||
this range according to the "RFC Required" policy [RFC8126]. | ||||
The following one-octet Element IDs are RESERVED: 0xFF and 0x80. | * Section 17.1 of [RFC8794] (per Erratum ID #7189 [Err7189]) | |||
NEW: | OLD: | |||
One-octet Element IDs MUST be between 0x80 and 0xFE. These items are | | One-octet Element IDs MUST be between 0x81 and 0xFE. These | |||
valuable because they are short, and they need to be used for | | items are valuable because they are short, and they need to be | |||
commonly repeated elements. Element IDs are to be allocated within | | used for commonly repeated elements. Element IDs are to be | |||
this range according to the "RFC Required" policy [RFC8126]. | | allocated within this range according to the "RFC Required" | |||
| policy [RFC8126]. | ||||
| | ||||
| The following one-octet Element IDs are RESERVED: 0xFF and | ||||
| 0x80. | ||||
The following one-octet Element ID is RESERVED: 0xFF. | NEW: | |||
* From Errata 7191 | | One-octet Element IDs MUST be between 0x80 and 0xFE. These | |||
| items are valuable because they are short, and they need to be | ||||
| used for commonly repeated elements. Element IDs are to be | ||||
| allocated within this range according to the "RFC Required" | ||||
| policy [RFC8126]. | ||||
| | ||||
| The following one-octet Element ID is RESERVED: 0xFF. | ||||
In Section 5, | * Section 5 of [RFC8794] (per Erratum ID #7191 [Err7191]) | |||
OLD: | OLD: | |||
+=========================+================+=================+ | +=========================+================+=================+ | |||
| Element ID Octet Length | Range of Valid | Number of Valid | | | Element ID Octet Length | Range of Valid | Number of Valid | | |||
| | Element IDs | Element IDs | | | | Element IDs | Element IDs | | |||
+=========================+================+=================+ | +=========================+================+=================+ | |||
| 1 | 0x81 - 0xFE | 126 | | | 1 | 0x81 - 0xFE | 126 | | |||
+-------------------------+----------------+-----------------+ | +-------------------------+----------------+-----------------+ | |||
NEW: | NEW: | |||
+=========================+================+=================+ | +=========================+================+=================+ | |||
| Element ID Octet Length | Range of Valid | Number of Valid | | | Element ID Octet Length | Range of Valid | Number of Valid | | |||
| | Element IDs | Element IDs | | | | Element IDs | Element IDs | | |||
+=========================+================+=================+ | +=========================+================+=================+ | |||
| 1 | 0x80 - 0xFE | 127 | | | 1 | 0x80 - 0xFE | 127 | | |||
+-------------------------+----------------+-----------------+ | +-------------------------+----------------+-----------------+ | |||
4.3. Added EBML Constraints | 4.3. Added EBML Constraints | |||
As an EBML Document Type, Matroska adds the following constraints to | As an EBML Document Type, Matroska adds the following constraints to | |||
the EBML specification. | the EBML specification [RFC8794]: | |||
* The docType of the EBML Header MUST be "matroska". | * The docType of the EBML Header MUST be "matroska". | |||
* The EBMLMaxIDLength of the EBML Header MUST be 4. | * The EBMLMaxIDLength of the EBML Header MUST be 4. | |||
* The EBMLMaxSizeLength of the EBML Header MUST be between 1 and 8 | ||||
* The EBMLMaxSizeLength of the EBML Header MUST be between 1 and 8, | ||||
inclusive. | inclusive. | |||
4.4. Design Rules | 4.4. Design Rules | |||
The Root Element and all Top-Levels Elements MUST use 4 octets for | The Root Element and all Top-Level Elements MUST use 4 octets for | |||
their EBML Element ID -- i.e. Segment and direct children of Segment. | their EBML Element ID -- i.e., Segment and direct children of | |||
Segment. | ||||
Legacy EBML/Matroska parsers did not handle Empty Elements properly, | Legacy EBML/Matroska parsers did not handle Empty Elements properly; | |||
elements present in the file but with a length of zero. They always | elements were present in the file but had a length of 0. They always | |||
assumed the value was 0 for integers/dates or 0x0p+0, the textual | assumed the value was 0 for integers/dates or 0x0p+0, the textual | |||
expression of floats using the [ISO9899] format, no matter the | expression of floats using the format in [ISO9899], no matter the | |||
default value of the element which should have been used instead. | default value of the element that should have been used instead. | |||
Therefore, Matroska writers MUST NOT use EBML Empty Elements, if the | Therefore, Matroska Writers MUST NOT use EBML Empty Elements if the | |||
element has a default value that is not 0 for integers/dates and | element has a default value that is not 0 for integers/dates and | |||
0x0p+0 for floats. | 0x0p+0 for floats. | |||
When adding new elements to Matroska, these rules apply: | When adding new elements to Matroska, these rules apply: | |||
* A non-mandatory integer/date Element MUST NOT have a default value | * A non-mandatory integer/date Element MUST NOT have a default value | |||
other than 0. | other than 0. | |||
* A non-mandatory float Element MUST NOT have a default value other | * A non-mandatory float Element MUST NOT have a default value other | |||
than 0x0p+0. | than 0x0p+0. | |||
* A non-mandatory string Element MUST NOT have a default value, as | * A non-mandatory string Element MUST NOT have a default value, as | |||
empty string cannot be defined in the XML Schema. | empty strings cannot be defined in the XML Schema. | |||
4.5. Data Layout | 4.5. Data Layout | |||
A Matroska file MUST be composed of at least one EBML Document using | A Matroska file MUST be composed of at least one EBML Document using | |||
the Matroska Document Type. Each EBML Document MUST start with an | the Matroska Document Type. Each EBML Document MUST start with an | |||
EBML Header and MUST be followed by the EBML Root Element, defined as | EBML Header and MUST be followed by the EBML Root Element, defined as | |||
Segment in Matroska. Matroska defines several Top-Level Elements | Segment in Matroska. Matroska defines several Top-Level Elements | |||
which may occur within the Segment. | that may occur within the Segment. | |||
As an example, a simple Matroska file consisting of a single EBML | As an example, a simple Matroska file consisting of a single EBML | |||
Document could be represented like this: | Document could be represented like this: | |||
* EBML Header | * EBML Header | |||
* Segment | * Segment | |||
A more complex Matroska file consisting of an EBML Stream (consisting | A more complex Matroska file consisting of an EBML Stream (consisting | |||
of two EBML Documents) could be represented like this: | of two EBML Documents) could be represented like this: | |||
* EBML Header | * EBML Header | |||
* Segment | * Segment | |||
* EBML Header | * EBML Header | |||
* Segment | * Segment | |||
The following diagram represents a simple Matroska file, comprised of | The following diagram represents a simple Matroska file, comprised of | |||
an EBML Document with an EBML Header, a Segment Element (the Root | an EBML Document with an EBML Header, a Segment Element (the Root | |||
Element), and all eight Matroska Top-Level Elements. In the | Element), and all eight Matroska Top-Level Elements. In the diagrams | |||
following diagrams of this section, horizontal spacing expresses a | in this section, horizontal spacing expresses a parent-child | |||
parent-child relationship between Matroska Elements (e.g., the Info | relationship between Matroska Elements (e.g., the Info Element is | |||
Element is contained within the Segment Element) whereas vertical | contained within the Segment Element), whereas vertical alignment | |||
alignment represents the storage order within the file. | represents the storage order within the file. | |||
+-------------+ | +-------------+ | |||
| EBML Header | | | EBML Header | | |||
+---------------------------+ | +---------------------------+ | |||
| Segment | SeekHead | | | Segment | SeekHead | | |||
| |-------------| | | |-------------| | |||
| | Info | | | | Info | | |||
| |-------------| | | |-------------| | |||
| | Tracks | | | | Tracks | | |||
| |-------------| | | |-------------| | |||
skipping to change at page 10, line 29 ¶ | skipping to change at line 462 ¶ | |||
| |-------------| | | |-------------| | |||
| | Cluster | | | | Cluster | | |||
| |-------------| | | |-------------| | |||
| | Cues | | | | Cues | | |||
| |-------------| | | |-------------| | |||
| | Attachments | | | | Attachments | | |||
| |-------------| | | |-------------| | |||
| | Tags | | | | Tags | | |||
+---------------------------+ | +---------------------------+ | |||
Figure 1: Basic layout of a Matroska file. | Figure 1: Basic Layout of a Matroska File | |||
The Matroska EBML Schema defines eight Top-Level Elements: | The Matroska EBML Schema defines eight Top-Level Elements: | |||
* SeekHead (Section 6.3), | * SeekHead (Section 6.3) | |||
* Info (Section 6.5), | ||||
* Tracks (Section 18), | * Info (Section 6.5) | |||
* Chapters (Section 20), | ||||
* Cluster (Section 10), | * Tracks (Section 18) | |||
* Cues (Section 22), | ||||
* Attachments (Section 21), | * Chapters (Section 20) | |||
* and Tags (Section 6.8). | ||||
* Cluster (Section 10) | ||||
* Cues (Section 22) | ||||
* Attachments (Section 21) | ||||
* Tags (Section 6.8) | ||||
The SeekHead Element (also known as MetaSeek) contains an index of | The SeekHead Element (also known as MetaSeek) contains an index of | |||
Top-Level Elements locations within the Segment. Use of the SeekHead | Top-Level Elements locations within the Segment. Use of the SeekHead | |||
Element is RECOMMENDED. Without a SeekHead Element, a Matroska | Element is RECOMMENDED. Without a SeekHead Element, a Matroska | |||
parser would have to search the entire file to find all of the other | parser would have to search the entire file to find all of the other | |||
Top-Level Elements. This is due to Matroska's flexible ordering | Top-Level Elements. This is due to Matroska's flexible ordering | |||
requirements; for instance, it is acceptable for the Chapters Element | requirements; for instance, it is acceptable for the Chapters Element | |||
to be stored after the Cluster Elements. | to be stored after the Cluster Element. | |||
+--------------------------------+ | +--------------------------------+ | |||
| SeekHead | Seek | SeekID | | | SeekHead | Seek | SeekID | | |||
| | |--------------| | | | |--------------| | |||
| | | SeekPosition | | | | | SeekPosition | | |||
+--------------------------------+ | +--------------------------------+ | |||
Figure 2: Representation of a SeekHead Element. | Figure 2: Representation of a SeekHead Element | |||
The Info Element contains vital information for identifying the whole | The Info Element contains vital information for identifying the whole | |||
Segment. This includes the title for the Segment, a randomly | Segment. This includes the title for the Segment, a randomly | |||
generated unique identifier, and the unique identifier(s) of any | generated unique identifier (UID), and the UID(s) of any linked | |||
linked Segment Elements. | Segment Elements. | |||
+-------------------------+ | +-------------------------+ | |||
| Info | SegmentUUID | | | Info | SegmentUUID | | |||
| |------------------| | | |------------------| | |||
| | SegmentFilename | | | | SegmentFilename | | |||
| |------------------| | | |------------------| | |||
| | PrevUUID | | | | PrevUUID | | |||
| |------------------| | | |------------------| | |||
| | PrevFilename | | | | PrevFilename | | |||
| |------------------| | | |------------------| | |||
skipping to change at page 11, line 48 ¶ | skipping to change at line 533 ¶ | |||
| |------------------| | | |------------------| | |||
| | DateUTC | | | | DateUTC | | |||
| |------------------| | | |------------------| | |||
| | Title | | | | Title | | |||
| |------------------| | | |------------------| | |||
| | MuxingApp | | | | MuxingApp | | |||
| |------------------| | | |------------------| | |||
| | WritingApp | | | | WritingApp | | |||
|-------------------------| | |-------------------------| | |||
Figure 3: Representation of an Info Element and its Child Elements. | Figure 3: Representation of an Info Element and Its Child Elements | |||
The Tracks Element defines the technical details for each track and | The Tracks Element defines the technical details for each track and | |||
can store the name, number, unique identifier, language, and type | can store the name, number, UID, language, and type (audio, video, | |||
(audio, video, subtitles, etc.) of each track. For example, the | subtitles, etc.) of each track. For example, the Tracks Element MAY | |||
Tracks Element MAY store information about the resolution of a video | store information about the resolution of a video track or sample | |||
track or sample rate of an audio track. | rate of an audio track. | |||
The Tracks Element MUST identify all the data needed by the codec to | The Tracks Element MUST identify all the data needed by the codec to | |||
decode the data of the specified track. However, the data required | decode the data of the specified track. However, the data required | |||
is contingent on the codec used for the track. For example, a Track | is contingent on the codec used for the track. For example, a Track | |||
Element for uncompressed audio only requires the audio bit rate to be | Element for uncompressed audio only requires the audio bit rate to be | |||
present. A codec such as AC-3 would require that the CodecID Element | present. A codec such as AC-3 would require that the CodecID Element | |||
be present for all tracks, as it is the primary way to identify which | be present for all tracks, as it is the primary way to identify which | |||
codec to use to decode the track. | codec to use to decode the track. | |||
+------------------------------------+ | +------------------------------------+ | |||
skipping to change at page 13, line 49 ¶ | skipping to change at line 593 ¶ | |||
| | | |-------------------| | | | | |-------------------| | |||
| | | | Color | | | | | | Color | | |||
| | |----------------------------------| | | | |----------------------------------| | |||
| | | Audio | SamplingFrequency | | | | | Audio | SamplingFrequency | | |||
| | | |-------------------| | | | | |-------------------| | |||
| | | | Channels | | | | | | Channels | | |||
| | | |-------------------| | | | | |-------------------| | |||
| | | | BitDepth | | | | | | BitDepth | | |||
|--------------------------------------------------------| | |--------------------------------------------------------| | |||
Figure 4: Representation of the Tracks Element and a selection of its | Figure 4: Representation of the Tracks Element and a Selection of Its | |||
Descendant Elements. | Descendant Elements | |||
The Chapters Element lists all of the chapters. Chapters are a way | The Chapters Element lists all of the chapters. Chapters are a way | |||
to set predefined points to jump to in video or audio. | to set predefined points to jump to in video or audio. | |||
+-----------------------------------------+ | +-----------------------------------------+ | |||
| Chapters | Edition | EditionUID | | | Chapters | Edition | EditionUID | | |||
| | Entry |--------------------| | | | Entry |--------------------| | |||
| | | EditionFlagDefault | | | | | EditionFlagDefault | | |||
| | |--------------------| | | | |--------------------| | |||
| | | EditionFlagOrdered | | | | | EditionFlagOrdered | | |||
skipping to change at page 14, line 30 ¶ | skipping to change at line 621 ¶ | |||
| | | |-------------------| | | | | |-------------------| | |||
| | | | ChapterTimeEnd | | | | | | ChapterTimeEnd | | |||
| | | |-------------------| | | | | |-------------------| | |||
| | | | ChapterFlagHidden | | | | | | ChapterFlagHidden | | |||
| | | |-------------------------------+ | | | | |-------------------------------+ | |||
| | | | ChapterDisplay | ChapString | | | | | | ChapterDisplay | ChapString | | |||
| | | | |--------------| | | | | | |--------------| | |||
| | | | | ChapLanguage | | | | | | | ChapLanguage | | |||
+------------------------------------------------------------------+ | +------------------------------------------------------------------+ | |||
Figure 5: Representation of the Chapters Element and a selection | Figure 5: Representation of the Chapters Element and a Selection | |||
of its Descendant Elements. | of Its Descendant Elements | |||
Cluster Elements contain the content for each track, e.g., video | Cluster Elements contain the content for each track, e.g., video | |||
frames. A Matroska file SHOULD contain at least one Cluster Element. | frames. A Matroska file SHOULD contain at least one Cluster Element. | |||
In the rare case it doesn't, there should be a form of Segment | In the rare case it doesn't, there should be a form of Segment | |||
linking with other Segments, possibly using Chapters, see Section 17. | linking with other Segments, possibly using Chapters; see Section 17. | |||
The Cluster Element helps to break up SimpleBlock or BlockGroup | The Cluster Element helps to break up SimpleBlock or BlockGroup | |||
Elements and helps with seeking and error protection. Every Cluster | Elements and helps with seeking and error protection. Every Cluster | |||
Element MUST contain a Timestamp Element. This SHOULD be the | Element MUST contain a Timestamp Element. This SHOULD be the | |||
Timestamp Element used to play the first Block in the Cluster | Timestamp Element used to play the first Block in the Cluster | |||
Element, unless a different value is needed to accommodate for more | Element, unless a different value is needed to accommodate for more | |||
Blocks, see Section 11.2. | Blocks; see Section 11.2. | |||
Cluster Elements contain one or more block element, such as | Cluster Elements contain one or more block element, such as | |||
BlockGroup or SimpleBlock elements. In some situations, a Cluster | BlockGroup or SimpleBlock elements. In some situations, a Cluster | |||
Element MAY contain no block element, for example in a live recording | Element MAY contain no block element, for example, in a live | |||
when no data has been collected. | recording when no data has been collected. | |||
A BlockGroup Element MAY contain a Block of data and any information | A BlockGroup Element MAY contain a Block of data and any information | |||
relating directly to that Block. | relating directly to that Block. | |||
+--------------------------+ | +--------------------------+ | |||
| Cluster | Timestamp | | | Cluster | Timestamp | | |||
| |----------------| | | |----------------| | |||
| | Position | | | | Position | | |||
| |----------------| | | |----------------| | |||
| | PrevSize | | | | PrevSize | | |||
| |----------------| | | |----------------| | |||
| | SimpleBlock | | | | SimpleBlock | | |||
| |----------------| | | |----------------| | |||
| | BlockGroup | | | | BlockGroup | | |||
+--------------------------+ | +--------------------------+ | |||
Figure 6: Representation of a Cluster Element and its immediate | Figure 6: Representation of a Cluster Element and Its Immediate | |||
Child Elements. | Child Elements | |||
+----------------------------------+ | +----------------------------------+ | |||
| Block | Portion of | Data Type | | | Block | Portion of | Data Type | | |||
| | a Block | - Bit Flag | | | | a Block | - Bit Flag | | |||
| |--------------------------+ | | |--------------------------+ | |||
| | Header | TrackNumber | | | | Header | TrackNumber | | |||
| | |-------------| | | | |-------------| | |||
| | | Timestamp | | | | | Timestamp | | |||
| | |-------------| | | | |-------------| | |||
| | | Flags | | | | | Flags | | |||
| | | - Gap | | | | | - Gap | | |||
| | | - Lacing | | | | | - Lacing | | |||
| | | - Reserved | | | | | - Reserved | | |||
| |--------------------------| | | |--------------------------| | |||
| | Optional | FrameSize | | | | Optional | FrameSize | | |||
| |--------------------------| | | |--------------------------| | |||
| | Data | Frame | | | | Data | Frame | | |||
+----------------------------------+ | +----------------------------------+ | |||
Figure 7: Representation of the Block Element structure. | Figure 7: Representation of the Block Element Structure | |||
Each Cluster MUST contain exactly one Timestamp Element. The | Each Cluster MUST contain exactly one Timestamp Element. The | |||
Timestamp Element value MUST be stored once per Cluster. The | Timestamp Element value MUST be stored once per Cluster. The | |||
Timestamp Element in the Cluster is relative to the entire Segment. | Timestamp Element in the Cluster is relative to the entire Segment. | |||
The Timestamp Element SHOULD be the first Element in the Cluster it | The Timestamp Element SHOULD be the first Element in the Cluster it | |||
belongs to, or the second Element if that Cluster contains a CRC-32 | belongs to or the second Element if that Cluster contains a CRC-32 | |||
element (Section 6.2) | element (Section 6.2) | |||
Additionally, the Block contains an offset that, when added to the | Additionally, the Block contains an offset that, when added to the | |||
Cluster's Timestamp Element value, yields the Block's effective | Cluster's Timestamp Element value, yields the Block's effective | |||
timestamp. Therefore, timestamp in the Block itself is relative to | timestamp. Therefore, the timestamp in the Block itself is relative | |||
the Timestamp Element in the Cluster. For example, if the Timestamp | to the Timestamp Element in the Cluster. For example, if the | |||
Element in the Cluster is set to 10 seconds and a Block in that | Timestamp Element in the Cluster is set to 10 seconds and a Block in | |||
Cluster is supposed to be played 12 seconds into the clip, the | that Cluster is supposed to be played 12 seconds into the clip, the | |||
timestamp in the Block would be set to 2 seconds. | timestamp in the Block would be set to 2 seconds. | |||
The ReferenceBlock in the BlockGroup is used instead of the basic | The ReferenceBlock in the BlockGroup is used instead of the basic | |||
"P-frame"/"B-frame" description. Instead of simply saying that this | "P-frame"/"B-frame" description. Instead of simply saying that this | |||
Block depends on the Block directly before, or directly afterwards, | Block depends on the Block directly before or directly after, the | |||
the Timestamp of the necessary Block is used. Because there can be | Timestamp of the necessary Block is used. Because there can be as | |||
as many ReferenceBlock Elements as necessary for a Block, it allows | many ReferenceBlock Elements as necessary for a Block, it allows for | |||
for some extremely complex referencing. | some extremely complex referencing. | |||
The Cues Element is used to seek when playing back a file by | The Cues Element is used to seek when playing back a file by | |||
providing a temporal index for some of the Tracks. It is similar to | providing a temporal index for some of the Tracks. It is similar to | |||
the SeekHead Element, but used for seeking to a specific time when | the SeekHead Element but is used for seeking to a specific time when | |||
playing back the file. It is possible to seek without this element, | playing back the file. It is possible to seek without this element, | |||
but it is much more difficult because a Matroska Reader would have to | but it is much more difficult because a Matroska Reader would have to | |||
'hunt and peck' through the file looking for the correct timestamp. | "hunt and peck" through the file to look for the correct timestamp. | |||
The Cues Element SHOULD contain at least one CuePoint Element. Each | The Cues Element SHOULD contain at least one CuePoint Element. Each | |||
CuePoint Element stores the position of the Cluster that contains the | CuePoint Element stores the position of the Cluster that contains the | |||
BlockGroup or SimpleBlock Element. The timestamp is stored in the | BlockGroup or SimpleBlock Element. The timestamp is stored in the | |||
CueTime Element and location is stored in the CueTrackPositions | CueTime Element, and the location is stored in the CueTrackPositions | |||
Element. | Element. | |||
The Cues Element is flexible. For instance, Cues Element can be used | The Cues Element is flexible. For instance, the Cues Element can be | |||
to index every single timestamp of every Block or they can be indexed | used to index every single timestamp of every Block or they can be | |||
selectively. | indexed selectively. | |||
+-------------------------------------+ | +-------------------------------------+ | |||
| Cues | CuePoint | CueTime | | | Cues | CuePoint | CueTime | | |||
| | |-------------------| | | | |-------------------| | |||
| | | CueTrackPositions | | | | | CueTrackPositions | | |||
| |------------------------------| | | |------------------------------| | |||
| | CuePoint | CueTime | | | | CuePoint | CueTime | | |||
| | |-------------------| | | | |-------------------| | |||
| | | CueTrackPositions | | | | | CueTrackPositions | | |||
+-------------------------------------+ | +-------------------------------------+ | |||
Figure 8: Representation of a Cues Element and two levels of its | Figure 8: Representation of a Cues Element and Two Levels of Its | |||
Descendant Elements. | Descendant Elements | |||
The Attachments Element is for attaching files to a Matroska file | The Attachments Element is for attaching files to a Matroska file, | |||
such as pictures, fonts, webpages, etc. | such as pictures, fonts, web pages, etc. | |||
+------------------------------------------------+ | +------------------------------------------------+ | |||
| Attachments | AttachedFile | FileDescription | | | Attachments | AttachedFile | FileDescription | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileName | | | | | FileName | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileMediaType | | | | | FileMediaType | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileData | | | | | FileData | | |||
| | |-------------------| | | | |-------------------| | |||
skipping to change at page 17, line 25 ¶ | skipping to change at line 754 ¶ | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileName | | | | | FileName | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileReferral | | | | | FileReferral | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileUsedStartTime | | | | | FileUsedStartTime | | |||
| | |-------------------| | | | |-------------------| | |||
| | | FileUsedEndTime | | | | | FileUsedEndTime | | |||
+------------------------------------------------+ | +------------------------------------------------+ | |||
Figure 9: Representation of an Attachments Element. | Figure 9: Representation of an Attachments Element | |||
The Tags Element contains metadata that describes the Segment and | The Tags Element contains metadata that describes the Segment and | |||
potentially its Tracks, Chapters, and Attachments. Each Track or | potentially its Tracks, Chapters, and Attachments. Each Track or | |||
Chapter that those tags applies to has its UID listed in the Tags. | Chapter that those tags applies to has its UID listed in the Tags. | |||
The Tags contain all extra information about the file: scriptwriter, | The Tags contain all extra information about the file: scriptwriters, | |||
singer, actors, directors, titles, edition, price, dates, genre, | singers, actors, directors, titles, edition, price, dates, genre, | |||
comments, etc. Tags can contain their values in multiple languages. | comments, etc. Tags can contain their values in multiple languages. | |||
For example, a movie's "title" Tag might contain both the original | For example, a movie's "title" Tag might contain both the original | |||
English title as well as the title it was released as in Germany. | English title as well as the title it was released as in Germany. | |||
+-------------------------------------------+ | +-------------------------------------------+ | |||
| Tags | Tag | Targets | TargetTypeValue | | | Tags | Tag | Targets | TargetTypeValue | | |||
| | | |------------------| | | | | |------------------| | |||
| | | | TargetType | | | | | | TargetType | | |||
| | | |------------------| | | | | |------------------| | |||
| | | | TagTrackUID | | | | | | TagTrackUID | | |||
skipping to change at page 18, line 31 ¶ | skipping to change at line 791 ¶ | |||
| | | |------------------| | | | | |------------------| | |||
| | | | TagDefault | | | | | | TagDefault | | |||
| | | |------------------| | | | | |------------------| | |||
| | | | TagString | | | | | | TagString | | |||
| | | |------------------| | | | | |------------------| | |||
| | | | TagBinary | | | | | | TagBinary | | |||
| | | |------------------| | | | | |------------------| | |||
| | | | SimpleTag | | | | | | SimpleTag | | |||
+-------------------------------------------+ | +-------------------------------------------+ | |||
Figure 10: Representation of a Tags Element and three levels of | Figure 10: Representation of a Tags Element and Three Levels of | |||
its Children Elements. | Its Children Elements | |||
5. Matroska Schema | 5. Matroska Schema | |||
This specification includes an EBML Schema, which defines the | This specification includes an EBML Schema that defines the Elements | |||
Elements and structure of Matroska using the EBML Schema elements and | and structure of Matroska using the EBML Schema elements and | |||
attributes defined in Section 11.1 of [RFC8794]. The EBML Schema | attributes defined in Section 11.1 of [RFC8794]. The EBML Schema | |||
defines every valid Matroska element in a manner defined by the EBML | defines every valid Matroska element in a manner defined by the EBML | |||
specification. | specification [RFC8794]. | |||
Attributes using their default value like minOccurs, minver, etc. or | Attributes using their default value (like minOccurs, minver, etc.) | |||
with undefined values like length, maxver, etc. are omitted. | or attributes with undefined values (like length, maxver, etc.) are | |||
omitted. | ||||
Here the definition of each Matroska Element is provided. | The definitions for each Matroska Element are provided below. | |||
5.1. Segment Element | 5.1. Segment Element | |||
id / type: 0x18538067 / master | id / type: 0x18538067 / master | |||
unknownsizeallowed: True | ||||
unknownsizeallowed: True | ||||
path: \Segment | path: \Segment | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The Root Element that contains all other Top-Level | definition: The Root Element that contains all other Top-Level | |||
Elements; see Section 4.5. | Elements; see Section 4.5. | |||
5.1.1. SeekHead Element | 5.1.1. SeekHead Element | |||
id / type: 0x114D9B74 / master | id / type: 0x114D9B74 / master | |||
path: \Segment\SeekHead | path: \Segment\SeekHead | |||
maxOccurs: 2 | maxOccurs: 2 | |||
skipping to change at page 19, line 45 ¶ | skipping to change at line 853 ¶ | |||
path: \Segment\SeekHead\Seek\SeekPosition | path: \Segment\SeekHead\Seek\SeekPosition | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The Segment Position (Section 16) of a Top-Level | definition: The Segment Position (Section 16) of a Top-Level | |||
Element. | Element. | |||
5.1.2. Info Element | 5.1.2. Info Element | |||
id / type: 0x1549A966 / master | id / type: 0x1549A966 / master | |||
path: \Segment\Info | path: \Segment\Info | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
recurring: True | ||||
recurring: True | ||||
definition: Contains general information about the Segment. | definition: Contains general information about the Segment. | |||
5.1.2.1. SegmentUUID Element | 5.1.2.1. SegmentUUID Element | |||
id / type: 0x73A4 / binary | id / type: 0x73A4 / binary | |||
length: 16 | length: 16 | |||
path: \Segment\Info\SegmentUUID | path: \Segment\Info\SegmentUUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: A randomly generated unique ID to identify the Segment | definition: A randomly generated UID that identifies the Segment | |||
amongst many others (128 bits). It is equivalent to a UUID v4 | amongst many others (128 bits). It is equivalent to a Universally | |||
[RFC4122] with all bits randomly (or pseudo-randomly) chosen. An | Unique Identifier (UUID) v4 [RFC4122] with all bits randomly (or | |||
actual UUID v4 value, where some bits are not random, MAY also be | pseudorandomly) chosen. An actual UUID v4 value, where some bits | |||
used. | are not random, MAY also be used. | |||
usage notes: If the Segment is a part of a Linked Segment, then this | usage notes: If the Segment is a part of a Linked Segment, then this | |||
Element is REQUIRED. The value of the unique ID MUST contain at | Element is REQUIRED. The value of the UID MUST contain at least | |||
least one bit set to 1. | one bit set to 1. | |||
5.1.2.2. SegmentFilename Element | 5.1.2.2. SegmentFilename Element | |||
id / type: 0x7384 / utf-8 | id / type: 0x7384 / utf-8 | |||
path: \Segment\Info\SegmentFilename | path: \Segment\Info\SegmentFilename | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: A filename corresponding to this Segment. | definition: A filename corresponding to this Segment. | |||
5.1.2.3. PrevUUID Element | 5.1.2.3. PrevUUID Element | |||
id / type: 0x3CB923 / binary | id / type: 0x3CB923 / binary | |||
length: 16 | length: 16 | |||
path: \Segment\Info\PrevUUID | path: \Segment\Info\PrevUUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: An ID to identify the previous Segment of a Linked | definition: An ID that identifies the previous Segment of a Linked | |||
Segment. | Segment. | |||
usage notes: If the Segment is a part of a Linked Segment that uses | usage notes: If the Segment is a part of a Linked Segment that uses | |||
Hard Linking (Section 17.1), then either the PrevUUID or the | Hard Linking (Section 17.1), then either the PrevUUID or the | |||
NextUUID Element is REQUIRED. If a Segment contains a PrevUUID | NextUUID Element is REQUIRED. If a Segment contains a PrevUUID | |||
but not a NextUUID, then it MAY be considered as the last Segment | but not a NextUUID, then it MAY be considered as the last Segment | |||
of the Linked Segment. The PrevUUID MUST NOT be equal to the | of the Linked Segment. The PrevUUID MUST NOT be equal to the | |||
SegmentUUID. | SegmentUUID. | |||
5.1.2.4. PrevFilename Element | 5.1.2.4. PrevFilename Element | |||
skipping to change at page 21, line 11 ¶ | skipping to change at line 910 ¶ | |||
usage notes: Provision of the previous filename is for display | usage notes: Provision of the previous filename is for display | |||
convenience, but PrevUUID SHOULD be considered authoritative for | convenience, but PrevUUID SHOULD be considered authoritative for | |||
identifying the previous Segment in a Linked Segment. | identifying the previous Segment in a Linked Segment. | |||
5.1.2.5. NextUUID Element | 5.1.2.5. NextUUID Element | |||
id / type: 0x3EB923 / binary | id / type: 0x3EB923 / binary | |||
length: 16 | length: 16 | |||
path: \Segment\Info\NextUUID | path: \Segment\Info\NextUUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: An ID to identify the next Segment of a Linked Segment. | definition: An ID that identifies the next Segment of a Linked | |||
Segment. | ||||
usage notes: If the Segment is a part of a Linked Segment that uses | usage notes: If the Segment is a part of a Linked Segment that uses | |||
Hard Linking (Section 17.1), then either the PrevUUID or the | Hard Linking (Section 17.1), then either the PrevUUID or the | |||
NextUUID Element is REQUIRED. If a Segment contains a NextUUID | NextUUID Element is REQUIRED. If a Segment contains a NextUUID | |||
but not a PrevUUID, then it MAY be considered as the first Segment | but not a PrevUUID, then it MAY be considered as the first Segment | |||
of the Linked Segment. The NextUUID MUST NOT be equal to the | of the Linked Segment. The NextUUID MUST NOT be equal to the | |||
SegmentUUID. | SegmentUUID. | |||
5.1.2.6. NextFilename Element | 5.1.2.6. NextFilename Element | |||
id / type: 0x3E83BB / utf-8 | id / type: 0x3E83BB / utf-8 | |||
skipping to change at page 21, line 35 ¶ | skipping to change at line 935 ¶ | |||
Segment. | Segment. | |||
usage notes: Provision of the next filename is for display | usage notes: Provision of the next filename is for display | |||
convenience, but NextUUID SHOULD be considered authoritative for | convenience, but NextUUID SHOULD be considered authoritative for | |||
identifying the Next Segment. | identifying the Next Segment. | |||
5.1.2.7. SegmentFamily Element | 5.1.2.7. SegmentFamily Element | |||
id / type: 0x4444 / binary | id / type: 0x4444 / binary | |||
length: 16 | length: 16 | |||
path: \Segment\Info\SegmentFamily | path: \Segment\Info\SegmentFamily | |||
definition: A unique ID that all Segments of a Linked Segment MUST | definition: A UID that all Segments of a Linked Segment MUST share | |||
share (128 bits). It is equivalent to a UUID v4 [RFC4122] with | (128 bits). It is equivalent to a UUID v4 [RFC4122] with all bits | |||
all bits randomly (or pseudo-randomly) chosen. An actual UUID v4 | randomly (or pseudorandomly) chosen. An actual UUID v4 value, | |||
value, where some bits are not random, MAY also be used. | where some bits are not random, MAY also be used. | |||
usage notes: If the Segment Info contains a ChapterTranslate | usage notes: If the Segment Info contains a ChapterTranslate | |||
element, this Element is REQUIRED. | element, this Element is REQUIRED. | |||
5.1.2.8. ChapterTranslate Element | 5.1.2.8. ChapterTranslate Element | |||
id / type: 0x6924 / master | id / type: 0x6924 / master | |||
path: \Segment\Info\ChapterTranslate | path: \Segment\Info\ChapterTranslate | |||
definition: The mapping between this Segment and a segment value in | definition: The mapping between this Segment and a segment value in | |||
the given Chapter Codec. | the given Chapter Codec. | |||
rationale: Chapter Codec may need to address different segments, but | rationale: Chapter Codec may need to address different segments, but | |||
they may not know of the way to identify such segment when stored | they may not know of the way to identify such segments when stored | |||
in Matroska. This element and its child elements add a way to map | in Matroska. This element and its child elements add a way to map | |||
the internal segments known to the Chapter Codec to the Segment | the internal segments known to the Chapter Codec to the Segment | |||
IDs in Matroska. This allows remuxing a file with Chapter Codec | IDs in Matroska. This allows remuxing a file with the Chapter | |||
without changing the content of the codec data, just the Segment | Codec without changing the content of the codec data, just the | |||
mapping. | Segment mapping. | |||
5.1.2.8.1. ChapterTranslateID Element | 5.1.2.8.1. ChapterTranslateID Element | |||
id / type: 0x69A5 / binary | id / type: 0x69A5 / binary | |||
path: \Segment\Info\ChapterTranslate\ChapterTranslateID | path: \Segment\Info\ChapterTranslate\ChapterTranslateID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The binary value used to represent this Segment in the | definition: The binary value used to represent this Segment in the | |||
chapter codec data. The format depends on the ChapProcessCodecID | chapter codec data. The format depends on the ChapProcessCodecID | |||
used; see Section 5.1.7.1.4.15. | used; see Section 5.1.7.1.4.15. | |||
5.1.2.8.2. ChapterTranslateCodec Element | 5.1.2.8.2. ChapterTranslateCodec Element | |||
id / type: 0x69BF / uinteger | id / type: 0x69BF / uinteger | |||
path: \Segment\Info\ChapterTranslate\ChapterTranslateCodec | path: \Segment\Info\ChapterTranslate\ChapterTranslateCodec | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: This ChapterTranslate applies to this chapter codec of | definition: This ChapterTranslate applies to this chapter codec of | |||
the given chapter edition(s); see Section 5.1.7.1.4.15. | the given chapter edition(s); see Section 5.1.7.1.4.15. | |||
defined values: See Table 1. | ||||
defined values: | ||||
+=======+=================+============================+ | +=======+=================+============================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+=================+============================+ | +=======+=================+============================+ | |||
| 0 | Matroska Script | Chapter commands using the | | | 0 | Matroska Script | Chapter commands using the | | |||
| | | Matroska Script codec. | | | | | Matroska Script codec. | | |||
+-------+-----------------+----------------------------+ | +-------+-----------------+----------------------------+ | |||
| 1 | DVD-menu | Chapter commands using the | | | 1 | DVD-menu | Chapter commands using the | | |||
| | | DVD-like codec. | | | | | DVD-like codec. | | |||
+-------+-----------------+----------------------------+ | +-------+-----------------+----------------------------+ | |||
Table 1: ChapterTranslateCodec values | Table 1: ChapterTranslateCodec Values | |||
5.1.2.8.3. ChapterTranslateEditionUID Element | 5.1.2.8.3. ChapterTranslateEditionUID Element | |||
id / type: 0x69FC / uinteger | id / type: 0x69FC / uinteger | |||
path: \Segment\Info\ChapterTranslate\ChapterTranslateEditionUID | path: \Segment\Info\ChapterTranslate\ChapterTranslateEditionUID | |||
definition: Specify a chapter edition UID on which this | definition: Specify a chapter edition UID to which this | |||
ChapterTranslate applies. | ChapterTranslate applies. | |||
usage notes: When no ChapterTranslateEditionUID is specified in the | usage notes: When no ChapterTranslateEditionUID is specified in the | |||
ChapterTranslate, the ChapterTranslate applies to all chapter | ChapterTranslate, the ChapterTranslate applies to all chapter | |||
editions found in the Segment using the given | editions found in the Segment using the given | |||
ChapterTranslateCodec. | ChapterTranslateCodec. | |||
5.1.2.9. TimestampScale Element | 5.1.2.9. TimestampScale Element | |||
id / type / default: 0x2AD7B1 / uinteger / 1000000 | id / type / default: 0x2AD7B1 / uinteger / 1000000 | |||
range: not 0 | range: not 0 | |||
skipping to change at page 23, line 22 ¶ | skipping to change at line 1014 ¶ | |||
nanoseconds. A TimestampScale value of 1000000 means scaled | nanoseconds. A TimestampScale value of 1000000 means scaled | |||
timestamps in the Segment are expressed in milliseconds; see | timestamps in the Segment are expressed in milliseconds; see | |||
Section 11 on how to interpret timestamps. | Section 11 on how to interpret timestamps. | |||
5.1.2.10. Duration Element | 5.1.2.10. Duration Element | |||
id / type: 0x4489 / float | id / type: 0x4489 / float | |||
range: > 0x0p+0 | range: > 0x0p+0 | |||
path: \Segment\Info\Duration | path: \Segment\Info\Duration | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Duration of the Segment, expressed in Segment Ticks | definition: Duration of the Segment, expressed in Segment Ticks, | |||
which is based on TimestampScale; see Section 11.1. | which are based on TimestampScale; see Section 11.1. | |||
5.1.2.11. DateUTC Element | 5.1.2.11. DateUTC Element | |||
id / type: 0x4461 / date | id / type: 0x4461 / date | |||
path: \Segment\Info\DateUTC | path: \Segment\Info\DateUTC | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: The date and time that the Segment was created by the | definition: The date and time that the Segment was created by the | |||
muxing application or library. | muxing application or library. | |||
5.1.2.12. Title Element | 5.1.2.12. Title Element | |||
skipping to change at page 24, line 13 ¶ | skipping to change at line 1054 ¶ | |||
id / type: 0x5741 / utf-8 | id / type: 0x5741 / utf-8 | |||
path: \Segment\Info\WritingApp | path: \Segment\Info\WritingApp | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Writing application (example: "mkvmerge-0.3.3"). | definition: Writing application (example: "mkvmerge-0.3.3"). | |||
usage notes: Include the full name of the application followed by | usage notes: Include the full name of the application followed by | |||
the version number. | the version number. | |||
5.1.3. Cluster Element | 5.1.3. Cluster Element | |||
id / type: 0x1F43B675 / master | id / type: 0x1F43B675 / master | |||
unknownsizeallowed: True | ||||
unknownsizeallowed: True | ||||
path: \Segment\Cluster | path: \Segment\Cluster | |||
definition: The Top-Level Element containing the (monolithic) Block | definition: The Top-Level Element containing the (monolithic) Block | |||
structure. | structure. | |||
5.1.3.1. Timestamp Element | 5.1.3.1. Timestamp Element | |||
id / type: 0xE7 / uinteger | id / type: 0xE7 / uinteger | |||
path: \Segment\Cluster\Timestamp | path: \Segment\Cluster\Timestamp | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Absolute timestamp of the cluster, expressed in Segment | definition: Absolute timestamp of the cluster, expressed in Segment | |||
Ticks which is based on TimestampScale; see Section 11.1. | Ticks, which are based on TimestampScale; see Section 11.1. | |||
usage notes: This element SHOULD be the first child element of the | usage notes: This element SHOULD be the first child element of the | |||
Cluster it belongs to, or the second if that Cluster contains a | Cluster it belongs to or the second if that Cluster contains a | |||
CRC-32 element (Section 6.2). | CRC-32 element (Section 6.2). | |||
5.1.3.2. Position Element | 5.1.3.2. Position Element | |||
id / type: 0xA7 / uinteger | id / type: 0xA7 / uinteger | |||
path: \Segment\Cluster\Position | path: \Segment\Cluster\Position | |||
maxOccurs: 1 | maxOccurs: 1 | |||
maxver: 4 | maxver: 4 | |||
definition: The Segment Position of the Cluster in the Segment (0 in | definition: The Segment Position of the Cluster in the Segment (0 in | |||
live streams). It might help to resynchronise offset on damaged | live streams). It might help to resynchronize the offset on | |||
streams. | damaged streams. | |||
5.1.3.3. PrevSize Element | 5.1.3.3. PrevSize Element | |||
id / type: 0xAB / uinteger | id / type: 0xAB / uinteger | |||
path: \Segment\Cluster\PrevSize | path: \Segment\Cluster\PrevSize | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Size of the previous Cluster, in octets. Can be useful | definition: Size of the previous Cluster, in octets. Can be useful | |||
for backward playing. | for backward playing. | |||
5.1.3.4. SimpleBlock Element | 5.1.3.4. SimpleBlock Element | |||
id / type: 0xA3 / binary | id / type: 0xA3 / binary | |||
path: \Segment\Cluster\SimpleBlock | path: \Segment\Cluster\SimpleBlock | |||
minver: 2 | minver: 2 | |||
definition: Similar to Block, see Section 10.1, but without all the | definition: Similar to Block (see Section 10.1) but without all the | |||
extra information, mostly used to reduced overhead when no extra | extra information. Mostly used to reduce overhead when no extra | |||
feature is needed; see Section 10.2 on SimpleBlock Structure. | feature is needed; see Section 10.2 on SimpleBlock Structure. | |||
5.1.3.5. BlockGroup Element | 5.1.3.5. BlockGroup Element | |||
id / type: 0xA0 / master | id / type: 0xA0 / master | |||
path: \Segment\Cluster\BlockGroup | path: \Segment\Cluster\BlockGroup | |||
definition: Basic container of information containing a single Block | definition: Basic container of information containing a single Block | |||
and information specific to that Block. | and information specific to that Block. | |||
5.1.3.5.1. Block Element | 5.1.3.5.1. Block Element | |||
skipping to change at page 25, line 31 ¶ | skipping to change at line 1118 ¶ | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Block containing the actual data to be rendered and a | definition: Block containing the actual data to be rendered and a | |||
timestamp relative to the Cluster Timestamp; see Section 10.1 on | timestamp relative to the Cluster Timestamp; see Section 10.1 on | |||
Block Structure. | Block Structure. | |||
5.1.3.5.2. BlockAdditions Element | 5.1.3.5.2. BlockAdditions Element | |||
id / type: 0x75A1 / master | id / type: 0x75A1 / master | |||
path: \Segment\Cluster\BlockGroup\BlockAdditions | path: \Segment\Cluster\BlockGroup\BlockAdditions | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Contain additional binary data to complete the main one; | definition: Contains additional binary data to complete the main | |||
see Codec BlockAdditions section of [MatroskaCodec] for more | one; see Section 4.1.5 of [MatroskaCodec] for more information. | |||
information. An EBML parser that has no knowledge of the Block | An EBML parser that has no knowledge of the Block structure could | |||
structure could still see and use/skip these data. | still see and use/skip these data. | |||
5.1.3.5.2.1. BlockMore Element | 5.1.3.5.2.1. BlockMore Element | |||
id / type: 0xA6 / master | id / type: 0xA6 / master | |||
path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore | path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Contain the BlockAdditional and some parameters. | definition: Contains the BlockAdditional and some parameters. | |||
5.1.3.5.2.2. BlockAdditional Element | 5.1.3.5.2.2. BlockAdditional Element | |||
id / type: 0xA5 / binary | id / type: 0xA5 / binary | |||
path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddi | path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddi | |||
tional | tional | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Interpreted by the codec as it wishes (using the | definition: Interpreted by the codec as it wishes (using the | |||
BlockAddID). | BlockAddID). | |||
5.1.3.5.2.3. BlockAddID Element | 5.1.3.5.2.3. BlockAddID Element | |||
id / type / default: 0xEE / uinteger / 1 | id / type / default: 0xEE / uinteger / 1 | |||
range: not 0 | range: not 0 | |||
path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddI | path: \Segment\Cluster\BlockGroup\BlockAdditions\BlockMore\BlockAddI | |||
D | D | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: An ID to identify how to interpret the BlockAdditional | definition: An ID that identifies how to interpret the | |||
data; see Codec BlockAdditions section of [MatroskaCodec] for more | BlockAdditional data; see Section 4.1.5 of [MatroskaCodec] for | |||
information. A value of 1 indicates that the meaning of the | more information. A value of 1 indicates that the meaning of the | |||
BlockAdditional data is defined by the codec. Any other value | BlockAdditional data is defined by the codec. Any other value | |||
indicates the meaning of the BlockAdditional data is found in the | indicates the meaning of the BlockAdditional data is found in the | |||
BlockAddIDType found in the TrackEntry. | BlockAddIDType found in the TrackEntry. | |||
usage notes: Each BlockAddID value MUST be unique between all | usage notes: Each BlockAddID value MUST be unique between all | |||
BlockMore elements found in a BlockAdditions. | BlockMore elements found in a BlockAdditions. | |||
usage notes: To keep MaxBlockAdditionID as low as possible, small | usage notes: To keep MaxBlockAdditionID as low as possible, small | |||
values SHOULD be used. | values SHOULD be used. | |||
5.1.3.5.3. BlockDuration Element | 5.1.3.5.3. BlockDuration Element | |||
id / type: 0x9B / uinteger | id / type: 0x9B / uinteger | |||
path: \Segment\Cluster\BlockGroup\BlockDuration | path: \Segment\Cluster\BlockGroup\BlockDuration | |||
minOccurs / maxOccurs: see implementation notes / 1 | minOccurs / maxOccurs: see implementation notes / 1 | |||
definition: The duration of the Block, expressed in Track Ticks; see | definition: The duration of the Block, expressed in Track Ticks; see | |||
Section 11.1. The BlockDuration Element can be useful at the end | Section 11.1. The BlockDuration Element can be useful at the end | |||
of a Track to define the duration of the last frame (as there is | of a Track to define the duration of the last frame (as there is | |||
no subsequent Block available), or when there is a break in a | no subsequent Block available) or when there is a break in a track | |||
track like for subtitle tracks. | like for subtitle tracks. | |||
notes: See Table 2. | ||||
notes: | ||||
+===========+===================================================+ | +===========+===================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+===================================================+ | +===========+===================================================+ | |||
| minOccurs | BlockDuration MUST be set (minOccurs=1) if the | | | minOccurs | BlockDuration MUST be set (minOccurs=1) if the | | |||
| | associated TrackEntry stores a DefaultDuration | | | | associated TrackEntry stores a DefaultDuration | | |||
| | value. | | | | value. | | |||
+-----------+---------------------------------------------------+ | +-----------+---------------------------------------------------+ | |||
| default | When not written and with no DefaultDuration, the | | | default | When not written and with no DefaultDuration, the | | |||
| | value is assumed to be the difference between the | | | | value is assumed to be the difference between the | | |||
| | timestamp of this Block and the timestamp of the | | | | timestamp of this Block and the timestamp of the | | |||
| | next Block in "display" order (not coding order). | | | | next Block in "display" order (not coding order). | | |||
+-----------+---------------------------------------------------+ | +-----------+---------------------------------------------------+ | |||
Table 2: BlockDuration implementation notes | Table 2: BlockDuration Implementation Notes | |||
5.1.3.5.4. ReferencePriority Element | 5.1.3.5.4. ReferencePriority Element | |||
id / type / default: 0xFA / uinteger / 0 | id / type / default: 0xFA / uinteger / 0 | |||
path: \Segment\Cluster\BlockGroup\ReferencePriority | path: \Segment\Cluster\BlockGroup\ReferencePriority | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: This frame is referenced and has the specified cache | definition: This frame is referenced and has the specified cache | |||
priority. In cache only a frame of the same or higher priority | priority. In the cache, only a frame of the same or higher | |||
can replace this frame. A value of 0 means the frame is not | priority can replace this frame. A value of 0 means the frame is | |||
referenced. | not referenced. | |||
5.1.3.5.5. ReferenceBlock Element | 5.1.3.5.5. ReferenceBlock Element | |||
id / type: 0xFB / integer | id / type: 0xFB / integer | |||
path: \Segment\Cluster\BlockGroup\ReferenceBlock | path: \Segment\Cluster\BlockGroup\ReferenceBlock | |||
definition: A timestamp value, relative to the timestamp of the | definition: A timestamp value, relative to the timestamp of the | |||
Block in this BlockGroup, expressed in Track Ticks; see | Block in this BlockGroup, expressed in Track Ticks; see | |||
Section 11.1. This is used to reference other frames necessary to | Section 11.1. This is used to reference other frames necessary to | |||
decode this frame. The relative value SHOULD correspond to a | decode this frame. The relative value SHOULD correspond to a | |||
valid Block this Block depends on. Historically Matroska Writer | valid Block that this Block depends on. Historically, Matroska | |||
didn't write the actual Block(s) this Block depends on, but _some_ | Writers didn't write the actual Block(s) that this Block depends | |||
Block in the past. | on, but they did write _some_ Block(s) in the past. | |||
The value "0" MAY also be used to signify this Block cannot be | The value "0" MAY also be used to signify that this Block cannot be | |||
decoded on its own, but without knownledge of which Block is | decoded on its own, but without knowledge of which Block is | |||
necessary. In this case, other ReferenceBlock MUST NOT be found in | necessary. In this case, other ReferenceBlock Elements MUST NOT be | |||
the same BlockGroup. | found in the same BlockGroup. | |||
If the BlockGroup doesn't have any ReferenceBlock element, then the | If the BlockGroup doesn't have a ReferenceBlock element, then the | |||
Block it contains can be decoded without using any other Block data. | Block it contains can be decoded without using any other Block data. | |||
5.1.3.5.6. CodecState Element | 5.1.3.5.6. CodecState Element | |||
id / type: 0xA4 / binary | id / type: 0xA4 / binary | |||
path: \Segment\Cluster\BlockGroup\CodecState | path: \Segment\Cluster\BlockGroup\CodecState | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 2 | minver: 2 | |||
definition: The new codec state to use. Data interpretation is | definition: The new codec state to use. Data interpretation is | |||
private to the codec. This information SHOULD always be | private to the codec. This information SHOULD always be | |||
referenced by a seek entry. | referenced by a seek entry. | |||
5.1.3.5.7. DiscardPadding Element | 5.1.3.5.7. DiscardPadding Element | |||
id / type: 0x75A2 / integer | id / type: 0x75A2 / integer | |||
path: \Segment\Cluster\BlockGroup\DiscardPadding | path: \Segment\Cluster\BlockGroup\DiscardPadding | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Duration of the silent data added to the Block, | definition: Duration of the silent data added to the Block, | |||
expressed in Matroska Ticks -- i.e., in nanoseconds; see | expressed in Matroska Ticks -- i.e., in nanoseconds; see | |||
Section 11.1 (padding at the end of the Block for positive value, | Section 11.1 (padding at the end of the Block for positive values | |||
at the beginning of the Block for negative value). The duration | and at the beginning of the Block for negative values). The | |||
of DiscardPadding is not calculated in the duration of the | duration of DiscardPadding is not calculated in the duration of | |||
TrackEntry and SHOULD be discarded during playback. | the TrackEntry and SHOULD be discarded during playback. | |||
5.1.4. Tracks Element | 5.1.4. Tracks Element | |||
id / type: 0x1654AE6B / master | id / type: 0x1654AE6B / master | |||
path: \Segment\Tracks | path: \Segment\Tracks | |||
maxOccurs: 1 | maxOccurs: 1 | |||
recurring: True | ||||
recurring: True | ||||
definition: A Top-Level Element of information with many tracks | definition: A Top-Level Element of information with many tracks | |||
described. | described. | |||
5.1.4.1. TrackEntry Element | 5.1.4.1. TrackEntry Element | |||
id / type: 0xAE / master | id / type: 0xAE / master | |||
path: \Segment\Tracks\TrackEntry | path: \Segment\Tracks\TrackEntry | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Describes a track with all Elements. | definition: Describes a track with all Elements. | |||
skipping to change at page 28, line 42 ¶ | skipping to change at line 1267 ¶ | |||
path: \Segment\Tracks\TrackEntry\TrackNumber | path: \Segment\Tracks\TrackEntry\TrackNumber | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The track number as used in the Block Header. | definition: The track number as used in the Block Header. | |||
5.1.4.1.2. TrackUID Element | 5.1.4.1.2. TrackUID Element | |||
id / type: 0x73C5 / uinteger | id / type: 0x73C5 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\TrackUID | path: \Segment\Tracks\TrackEntry\TrackUID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A unique ID to identify the Track. | definition: A UID that identifies the Track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.3. TrackType Element | 5.1.4.1.3. TrackType Element | |||
id / type: 0x83 / uinteger | id / type: 0x83 / uinteger | |||
path: \Segment\Tracks\TrackEntry\TrackType | path: \Segment\Tracks\TrackEntry\TrackType | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The TrackType defines the type of each frame found in | definition: The TrackType defines the type of each frame found in | |||
the Track. The value SHOULD be stored on 1 octet. | the Track. The value SHOULD be stored on 1 octet. | |||
defined values: See Table 3. | ||||
defined values: | stream copy: True (Section 8) | |||
+=======+==========+==========================================+ | +=======+==========+==========================================+ | |||
| value | label | each frame contains | | | value | label | contents of each frame | | |||
+=======+==========+==========================================+ | +=======+==========+==========================================+ | |||
| 1 | video | An image. | | | 1 | video | An image. | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
| 2 | audio | Audio samples. | | | 2 | audio | Audio samples. | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
| 3 | complex | A mix of different other TrackType. The | | | 3 | complex | A mix of different other TrackType. The | | |||
| | | codec needs to define how the Matroska | | | | | codec needs to define how the Matroska | | |||
| | | Player should interpret such data. | | | | | Player should interpret such data. | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
| 16 | logo | An image to be rendered over the video | | | 16 | logo | An image to be rendered over the video | | |||
skipping to change at page 29, line 35 ¶ | skipping to change at line 1307 ¶ | |||
| 18 | buttons | Interactive button(s) to be rendered | | | 18 | buttons | Interactive button(s) to be rendered | | |||
| | | over the video track(s). | | | | | over the video track(s). | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
| 32 | control | Metadata used to control the player of | | | 32 | control | Metadata used to control the player of | | |||
| | | the Matroska Player. | | | | | the Matroska Player. | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
| 33 | metadata | Timed metadata that can be passed on to | | | 33 | metadata | Timed metadata that can be passed on to | | |||
| | | the Matroska Player. | | | | | the Matroska Player. | | |||
+-------+----------+------------------------------------------+ | +-------+----------+------------------------------------------+ | |||
Table 3: TrackType values | Table 3: TrackType Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.4. FlagEnabled Element | 5.1.4.1.4. FlagEnabled Element | |||
id / type / default: 0xB9 / uinteger / 1 | id / type / default: 0xB9 / uinteger / 1 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagEnabled | path: \Segment\Tracks\TrackEntry\FlagEnabled | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 2 | minver: 2 | |||
definition: Set to 1 if the track is usable. It is possible to turn | definition: Set to 1 if the track is usable. It is possible to turn | |||
a not usable track into a usable track using chapter codecs or | a track that is not usable into a usable track using chapter | |||
control tracks. | codecs or control tracks. | |||
5.1.4.1.5. FlagDefault Element | 5.1.4.1.5. FlagDefault Element | |||
id / type / default: 0x88 / uinteger / 1 | id / type / default: 0x88 / uinteger / 1 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagDefault | path: \Segment\Tracks\TrackEntry\FlagDefault | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Set if that track (audio, video or subs) is eligible for | definition: Set if the track (audio, video, or subs) is eligible for | |||
automatic selection by the player; see Section 19 for more | automatic selection by the player; see Section 19 for more | |||
details. | details. | |||
5.1.4.1.6. FlagForced Element | 5.1.4.1.6. FlagForced Element | |||
id / type / default: 0x55AA / uinteger / 0 | id / type / default: 0x55AA / uinteger / 0 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagForced | path: \Segment\Tracks\TrackEntry\FlagForced | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Applies only to subtitles. Set if that track is | definition: Applies only to subtitles. Set if the track is eligible | |||
eligible for automatic selection by the player if it matches the | for automatic selection by the player if it matches the user's | |||
user's language preference, even if the user's preferences would | language preference, even if the user's preferences would not | |||
normally not enable subtitles with the selected audio track; this | normally enable subtitles with the selected audio track; this can | |||
can be used for tracks containing only translations of foreign- | be used for tracks containing only translations of audio in | |||
language audio or onscreen text. See Section 19 for more details. | foreign languages or on-screen text. See Section 19 for more | |||
details. | ||||
5.1.4.1.7. FlagHearingImpaired Element | 5.1.4.1.7. FlagHearingImpaired Element | |||
id / type: 0x55AB / uinteger | id / type: 0x55AB / uinteger | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagHearingImpaired | path: \Segment\Tracks\TrackEntry\FlagHearingImpaired | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Set to 1 if and only if that track is suitable for users | definition: Set to 1 if and only if the track is suitable for users | |||
with hearing impairments. | with hearing impairments. | |||
5.1.4.1.8. FlagVisualImpaired Element | 5.1.4.1.8. FlagVisualImpaired Element | |||
id / type: 0x55AC / uinteger | id / type: 0x55AC / uinteger | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagVisualImpaired | path: \Segment\Tracks\TrackEntry\FlagVisualImpaired | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Set to 1 if and only if that track is suitable for users | definition: Set to 1 if and only if the track is suitable for users | |||
with visual impairments. | with visual impairments. | |||
5.1.4.1.9. FlagTextDescriptions Element | 5.1.4.1.9. FlagTextDescriptions Element | |||
id / type: 0x55AD / uinteger | id / type: 0x55AD / uinteger | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagTextDescriptions | path: \Segment\Tracks\TrackEntry\FlagTextDescriptions | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Set to 1 if and only if that track contains textual | definition: Set to 1 if and only if the track contains textual | |||
descriptions of video content. | descriptions of video content. | |||
5.1.4.1.10. FlagOriginal Element | 5.1.4.1.10. FlagOriginal Element | |||
id / type: 0x55AE / uinteger | id / type: 0x55AE / uinteger | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagOriginal | path: \Segment\Tracks\TrackEntry\FlagOriginal | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Set to 1 if and only if that track is in the content's | definition: Set to 1 if and only if the track is in the content's | |||
original language. | original language. | |||
5.1.4.1.11. FlagCommentary Element | 5.1.4.1.11. FlagCommentary Element | |||
id / type: 0x55AF / uinteger | id / type: 0x55AF / uinteger | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagCommentary | path: \Segment\Tracks\TrackEntry\FlagCommentary | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Set to 1 if and only if that track contains commentary. | definition: Set to 1 if and only if the track contains commentary. | |||
5.1.4.1.12. FlagLacing Element | 5.1.4.1.12. FlagLacing Element | |||
id / type / default: 0x9C / uinteger / 1 | id / type / default: 0x9C / uinteger / 1 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tracks\TrackEntry\FlagLacing | path: \Segment\Tracks\TrackEntry\FlagLacing | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Set to 1 if the track MAY contain blocks using lacing. | definition: Set to 1 if the track MAY contain blocks that use | |||
When set to 0 all blocks MUST have their lacing flags set to No | lacing. When set to 0, all blocks MUST have their lacing flags | |||
lacing; see Section 10.3 on Block Lacing. | set to "no lacing"; see Section 10.3 on Block Lacing. | |||
5.1.4.1.13. DefaultDuration Element | 5.1.4.1.13. DefaultDuration Element | |||
id / type: 0x23E383 / uinteger | id / type: 0x23E383 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\DefaultDuration | path: \Segment\Tracks\TrackEntry\DefaultDuration | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Number of nanoseconds per frame, expressed in Matroska | definition: Number of nanoseconds per frame, expressed in Matroska | |||
Ticks -- i.e., in nanoseconds; see Section 11.1 (frame in the | Ticks -- i.e., in nanoseconds; see Section 11.1 ("frame" in the | |||
Matroska sense -- one Element put into a (Simple)Block). | Matroska sense -- one Element put into a (Simple)Block). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.14. DefaultDecodedFieldDuration Element | 5.1.4.1.14. DefaultDecodedFieldDuration Element | |||
id / type: 0x234E7A / uinteger | id / type: 0x234E7A / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration | path: \Segment\Tracks\TrackEntry\DefaultDecodedFieldDuration | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The period between two successive fields at the output | definition: The period between two successive fields at the output | |||
of the decoding process, expressed in Matroska Ticks -- i.e., in | of the decoding process, expressed in Matroska Ticks -- i.e., in | |||
nanoseconds; see Section 11.1. see Section 9 for more information | nanoseconds; see Section 11.1. See Section 9 for more information | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.15. TrackTimestampScale Element | 5.1.4.1.15. TrackTimestampScale Element | |||
id / type / default: 0x23314F / float / 0x1p+0 | id / type / default: 0x23314F / float / 0x1p+0 | |||
range: > 0x0p+0 | range: > 0x0p+0 | |||
path: \Segment\Tracks\TrackEntry\TrackTimestampScale | path: \Segment\Tracks\TrackEntry\TrackTimestampScale | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
maxver: 3 | maxver: 3 | |||
definition: The scale to apply on this track to work at normal speed | definition: The scale to apply on this track to work at normal speed | |||
in relation with other tracks (mostly used to adjust video speed | in relation with other tracks (mostly used to adjust video speed | |||
when the audio length differs). | when the audio length differs). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.16. MaxBlockAdditionID Element | 5.1.4.1.16. MaxBlockAdditionID Element | |||
id / type / default: 0x55EE / uinteger / 0 | id / type / default: 0x55EE / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\MaxBlockAdditionID | path: \Segment\Tracks\TrackEntry\MaxBlockAdditionID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The maximum value of BlockAddID (Section 5.1.3.5.2.3). | definition: The maximum value of BlockAddID (Section 5.1.3.5.2.3). | |||
A value 0 means there is no BlockAdditions (Section 5.1.3.5.2) for | A value of 0 means there is no BlockAdditions (Section 5.1.3.5.2) | |||
this track. | for this track. | |||
5.1.4.1.17. BlockAdditionMapping Element | 5.1.4.1.17. BlockAdditionMapping Element | |||
id / type: 0x41E4 / master | id / type: 0x41E4 / master | |||
path: \Segment\Tracks\TrackEntry\BlockAdditionMapping | path: \Segment\Tracks\TrackEntry\BlockAdditionMapping | |||
minver: 4 | minver: 4 | |||
definition: Contains elements that extend the track format, by | definition: Contains elements that extend the track format by adding | |||
adding content either to each frame, with BlockAddID | content either to each frame, with BlockAddID | |||
(Section 5.1.3.5.2.3), or to the track as a whole with | (Section 5.1.3.5.2.3), or to the track as a whole with | |||
BlockAddIDExtraData. | BlockAddIDExtraData. | |||
5.1.4.1.17.1. BlockAddIDValue Element | 5.1.4.1.17.1. BlockAddIDValue Element | |||
id / type: 0x41F0 / uinteger | id / type: 0x41F0 / uinteger | |||
range: >=2 | range: >=2 | |||
path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDValu | path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDValu | |||
e | e | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: If the track format extension needs content beside | definition: If the track format extension needs content beside | |||
frames, the value refers to the BlockAddID (Section 5.1.3.5.2.3), | frames, the value refers to the BlockAddID (Section 5.1.3.5.2.3) | |||
value being described. | value being described. | |||
usage notes: To keep MaxBlockAdditionID as low as possible, small | usage notes: To keep MaxBlockAdditionID as low as possible, small | |||
values SHOULD be used. | values SHOULD be used. | |||
5.1.4.1.17.2. BlockAddIDName Element | 5.1.4.1.17.2. BlockAddIDName Element | |||
id / type: 0x41A4 / string | id / type: 0x41A4 / string | |||
path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDName | path: \Segment\Tracks\TrackEntry\BlockAdditionMapping\BlockAddIDName | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
skipping to change at page 34, line 23 ¶ | skipping to change at line 1527 ¶ | |||
form; see Section 12 on language codes. This Element MUST be | form; see Section 12 on language codes. This Element MUST be | |||
ignored if the LanguageBCP47 Element is used in the same | ignored if the LanguageBCP47 Element is used in the same | |||
TrackEntry. | TrackEntry. | |||
5.1.4.1.20. LanguageBCP47 Element | 5.1.4.1.20. LanguageBCP47 Element | |||
id / type: 0x22B59D / string | id / type: 0x22B59D / string | |||
path: \Segment\Tracks\TrackEntry\LanguageBCP47 | path: \Segment\Tracks\TrackEntry\LanguageBCP47 | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The language of the track, in the [BCP47] form; see | definition: The language of the track, in the form defined in | |||
Section 12 on language codes. If this Element is used, then any | [BCP47]; see Section 12 on language codes. If this Element is | |||
Language Elements used in the same TrackEntry MUST be ignored. | used, then any Language Elements used in the same TrackEntry MUST | |||
be ignored. | ||||
5.1.4.1.21. CodecID Element | 5.1.4.1.21. CodecID Element | |||
id / type: 0x86 / string | id / type: 0x86 / string | |||
path: \Segment\Tracks\TrackEntry\CodecID | path: \Segment\Tracks\TrackEntry\CodecID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: An ID corresponding to the codec, see [MatroskaCodec] | definition: An ID corresponding to the codec; see [MatroskaCodec] | |||
for more info. | for more info. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.22. CodecPrivate Element | 5.1.4.1.22. CodecPrivate Element | |||
id / type: 0x63A2 / binary | id / type: 0x63A2 / binary | |||
path: \Segment\Tracks\TrackEntry\CodecPrivate | path: \Segment\Tracks\TrackEntry\CodecPrivate | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Private data only known to the codec. | definition: Private data only known to the codec. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.23. CodecName Element | 5.1.4.1.23. CodecName Element | |||
id / type: 0x258688 / utf-8 | id / type: 0x258688 / utf-8 | |||
path: \Segment\Tracks\TrackEntry\CodecName | path: \Segment\Tracks\TrackEntry\CodecName | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: A human-readable string specifying the codec. | definition: A human-readable string specifying the codec. | |||
5.1.4.1.24. AttachmentLink Element | 5.1.4.1.24. AttachmentLink Element | |||
skipping to change at page 35, line 22 ¶ | skipping to change at line 1573 ¶ | |||
definition: The UID of an attachment that is used by this codec. | definition: The UID of an attachment that is used by this codec. | |||
usage notes: The value MUST match the FileUID value of an attachment | usage notes: The value MUST match the FileUID value of an attachment | |||
found in this Segment. | found in this Segment. | |||
5.1.4.1.25. CodecDelay Element | 5.1.4.1.25. CodecDelay Element | |||
id / type / default: 0x56AA / uinteger / 0 | id / type / default: 0x56AA / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\CodecDelay | path: \Segment\Tracks\TrackEntry\CodecDelay | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: CodecDelay is The codec-built-in delay, expressed in | definition: The built-in delay for the codec, expressed in Matroska | |||
Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. It | Ticks -- i.e., in nanoseconds; see Section 11.1. It represents | |||
represents the amount of codec samples that will be discarded by | the number of codec samples that will be discarded by the decoder | |||
the decoder during playback. This timestamp value MUST be | during playback. This timestamp value MUST be subtracted from | |||
subtracted from each frame timestamp in order to get the timestamp | each frame timestamp in order to get the timestamp that will be | |||
that will be actually played. The value SHOULD be small so the | actually played. The value SHOULD be small so the muxing of | |||
muxing of tracks with the same actual timestamp are in the same | tracks with the same actual timestamp are in the same Cluster. | |||
Cluster. | stream copy: True (Section 8) | |||
stream copy: True (Section 8) | ||||
5.1.4.1.26. SeekPreRoll Element | 5.1.4.1.26. SeekPreRoll Element | |||
id / type / default: 0x56BB / uinteger / 0 | id / type / default: 0x56BB / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\SeekPreRoll | path: \Segment\Tracks\TrackEntry\SeekPreRoll | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: After a discontinuity, SeekPreRoll is the duration of | definition: After a discontinuity, the duration of the data that the | |||
the data the decoder MUST decode before the decoded data is valid, | decoder MUST decode before the decoded data is valid, expressed in | |||
expressed in Matroska Ticks -- i.e., in nanoseconds; see | Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. | |||
Section 11.1. | stream copy: True (Section 8) | |||
stream copy: True (Section 8) | ||||
5.1.4.1.27. TrackTranslate Element | 5.1.4.1.27. TrackTranslate Element | |||
id / type: 0x6624 / master | id / type: 0x6624 / master | |||
path: \Segment\Tracks\TrackEntry\TrackTranslate | path: \Segment\Tracks\TrackEntry\TrackTranslate | |||
definition: The mapping between this TrackEntry and a track value in | definition: The mapping between this TrackEntry and a track value in | |||
the given Chapter Codec. | the given Chapter Codec. | |||
rationale: Chapter Codec may need to address content in specific | rationale: Chapter Codec may need to address content in a specific | |||
track, but they may not know of the way to identify tracks in | track, but they may not know of the way to identify tracks in | |||
Matroska. This element and its child elements add a way to map | Matroska. This element and its child elements add a way to map | |||
the internal tracks known to the Chapter Codec to the track IDs in | the internal tracks known to the Chapter Codec to the track IDs in | |||
Matroska. This allows remuxing a file with Chapter Codec without | Matroska. This allows remuxing a file with Chapter Codec without | |||
changing the content of the codec data, just the track mapping. | changing the content of the codec data, just the track mapping. | |||
5.1.4.1.27.1. TrackTranslateTrackID Element | 5.1.4.1.27.1. TrackTranslateTrackID Element | |||
id / type: 0x66A5 / binary | id / type: 0x66A5 / binary | |||
path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackI | path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateTrackI | |||
skipping to change at page 36, line 25 ¶ | skipping to change at line 1621 ¶ | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The binary value used to represent this TrackEntry in | definition: The binary value used to represent this TrackEntry in | |||
the chapter codec data. The format depends on the | the chapter codec data. The format depends on the | |||
ChapProcessCodecID used; see Section 5.1.7.1.4.15. | ChapProcessCodecID used; see Section 5.1.7.1.4.15. | |||
5.1.4.1.27.2. TrackTranslateCodec Element | 5.1.4.1.27.2. TrackTranslateCodec Element | |||
id / type: 0x66BF / uinteger | id / type: 0x66BF / uinteger | |||
path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec | path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateCodec | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: This TrackTranslate applies to this chapter codec of the | definition: This TrackTranslate applies to the chapter codec of the | |||
given chapter edition(s); see Section 5.1.7.1.4.15. | given chapter edition(s); see Section 5.1.7.1.4.15. | |||
defined values: See Table 4. | ||||
defined values: | ||||
+=======+=================+============================+ | +=======+=================+============================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+=================+============================+ | +=======+=================+============================+ | |||
| 0 | Matroska Script | Chapter commands using the | | | 0 | Matroska Script | Chapter commands using the | | |||
| | | Matroska Script codec. | | | | | Matroska Script codec. | | |||
+-------+-----------------+----------------------------+ | +-------+-----------------+----------------------------+ | |||
| 1 | DVD-menu | Chapter commands using the | | | 1 | DVD-menu | Chapter commands using the | | |||
| | | DVD-like codec. | | | | | DVD-like codec. | | |||
+-------+-----------------+----------------------------+ | +-------+-----------------+----------------------------+ | |||
Table 4: TrackTranslateCodec values | Table 4: TrackTranslateCodec Values | |||
5.1.4.1.27.3. TrackTranslateEditionUID Element | 5.1.4.1.27.3. TrackTranslateEditionUID Element | |||
id / type: 0x66FC / uinteger | id / type: 0x66FC / uinteger | |||
path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEditio | path: \Segment\Tracks\TrackEntry\TrackTranslate\TrackTranslateEditio | |||
nUID | nUID | |||
definition: Specify a chapter edition UID on which this | definition: Specifies a chapter edition UID to which this | |||
TrackTranslate applies. | TrackTranslate applies. | |||
usage notes: When no TrackTranslateEditionUID is specified in the | usage notes: When no TrackTranslateEditionUID is specified in the | |||
TrackTranslate, the TrackTranslate applies to all chapter editions | TrackTranslate, the TrackTranslate applies to all chapter editions | |||
found in the Segment using the given TrackTranslateCodec. | found in the Segment using the given TrackTranslateCodec. | |||
5.1.4.1.28. Video Element | 5.1.4.1.28. Video Element | |||
id / type: 0xE0 / master | id / type: 0xE0 / master | |||
path: \Segment\Tracks\TrackEntry\Video | path: \Segment\Tracks\TrackEntry\Video | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Video settings. | definition: Video settings. | |||
5.1.4.1.28.1. FlagInterlaced Element | 5.1.4.1.28.1. FlagInterlaced Element | |||
id / type / default: 0x9A / uinteger / 0 | id / type / default: 0x9A / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\FlagInterlaced | path: \Segment\Tracks\TrackEntry\Video\FlagInterlaced | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 2 | minver: 2 | |||
definition: Specify whether the video frames in this track are | definition: Specifies whether the video frames in this track are | |||
interlaced. | interlaced. | |||
defined values: See Table 5. | ||||
defined values: | stream copy: True (Section 8) | |||
+=======+==============+==========================+ | +=======+==============+==========================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+==============+==========================+ | +=======+==============+==========================+ | |||
| 0 | undetermined | Unknown status.This | | | 0 | undetermined | Unknown status. This | | |||
| | | value SHOULD be avoided. | | | | | value SHOULD be avoided. | | |||
+-------+--------------+--------------------------+ | +-------+--------------+--------------------------+ | |||
| 1 | interlaced | Interlaced frames. | | | 1 | interlaced | Interlaced frames. | | |||
+-------+--------------+--------------------------+ | +-------+--------------+--------------------------+ | |||
| 2 | progressive | No interlacing. | | | 2 | progressive | No interlacing. | | |||
+-------+--------------+--------------------------+ | +-------+--------------+--------------------------+ | |||
Table 5: FlagInterlaced values | Table 5: FlagInterlaced Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.2. FieldOrder Element | 5.1.4.1.28.2. FieldOrder Element | |||
id / type / default: 0x9D / uinteger / 2 | id / type / default: 0x9D / uinteger / 2 | |||
path: \Segment\Tracks\TrackEntry\Video\FieldOrder | path: \Segment\Tracks\TrackEntry\Video\FieldOrder | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Specify the field ordering of video frames in this | definition: Specifies the field ordering of video frames in this | |||
track. | track. | |||
defined values: See Table 6. | ||||
defined values: | usage notes: If FlagInterlaced is not set to 1, this Element MUST be | |||
ignored. | ||||
stream copy: True (Section 8) | ||||
+=======+==============+=========================================+ | +=======+==============+=========================================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+==============+=========================================+ | +=======+==============+=========================================+ | |||
| 0 | progressive | Interlaced frames.This value SHOULD be | | | 0 | progressive | Interlaced frames. This value SHOULD | | |||
| | | avoided, setting FlagInterlaced to 2 is | | | | | be avoided; setting FlagInterlaced to 2 | | |||
| | | sufficient. | | | | | is sufficient. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
| 1 | tff | Top field displayed first. Top field | | | 1 | tff | Top field displayed first. Top field | | |||
| | | stored first. | | | | | stored first. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
| 2 | undetermined | Unknown field order.This value SHOULD | | | 2 | undetermined | Unknown field order. This value SHOULD | | |||
| | | be avoided. | | | | | be avoided. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
| 6 | bff | Bottom field displayed first. Bottom | | | 6 | bff | Bottom field displayed first. Bottom | | |||
| | | field stored first. | | | | | field stored first. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
| 9 | bff(swapped) | Top field displayed first. Fields are | | | 9 | bff(swapped) | Top field displayed first. Fields are | | |||
| | | interleaved in storage with the top | | | | | interleaved in storage with the top | | |||
| | | line of the top field stored first. | | | | | line of the top field stored first. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
| 14 | tff(swapped) | Bottom field displayed first. Fields | | | 14 | tff(swapped) | Bottom field displayed first. Fields | | |||
| | | are interleaved in storage with the top | | | | | are interleaved in storage with the top | | |||
| | | line of the top field stored first. | | | | | line of the top field stored first. | | |||
+-------+--------------+-----------------------------------------+ | +-------+--------------+-----------------------------------------+ | |||
Table 6: FieldOrder values | Table 6: FieldOrder Values | |||
usage notes: If FlagInterlaced is not set to 1, this Element MUST be | ||||
ignored. | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.3. StereoMode Element | 5.1.4.1.28.3. StereoMode Element | |||
id / type / default: 0x53B8 / uinteger / 0 | id / type / default: 0x53B8 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\StereoMode | path: \Segment\Tracks\TrackEntry\Video\StereoMode | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 3 | minver: 3 | |||
definition: Stereo-3D video mode. There are some more details in | definition: Stereo-3D video mode. See Section 18.10 for more | |||
Section 18.10. | details. | |||
restrictions: See Table 7. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+===================================================+ | +=======+===================================================+ | |||
| value | label | | | value | label | | |||
+=======+===================================================+ | +=======+===================================================+ | |||
| 0 | mono | | | 0 | mono | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 1 | side by side (left eye first) | | | 1 | side by side (left eye first) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 2 | top - bottom (right eye is first) | | | 2 | top - bottom (right eye is first) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
skipping to change at page 39, line 39 ¶ | skipping to change at line 1764 ¶ | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 11 | side by side (right eye first) | | | 11 | side by side (right eye first) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 12 | anaglyph (green/magenta) | | | 12 | anaglyph (green/magenta) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 13 | both eyes laced in one Block (left eye is first) | | | 13 | both eyes laced in one Block (left eye is first) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
| 14 | both eyes laced in one Block (right eye is first) | | | 14 | both eyes laced in one Block (right eye is first) | | |||
+-------+---------------------------------------------------+ | +-------+---------------------------------------------------+ | |||
Table 7: StereoMode values | Table 7: StereoMode Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.4. AlphaMode Element | 5.1.4.1.28.4. AlphaMode Element | |||
id / type / default: 0x53C0 / uinteger / 0 | id / type / default: 0x53C0 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\AlphaMode | path: \Segment\Tracks\TrackEntry\Video\AlphaMode | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 3 | minver: 3 | |||
definition: Indicate whether the BlockAdditional Element with | definition: Indicates whether the BlockAdditional Element with | |||
BlockAddID of "1" contains Alpha data, as defined by to the Codec | BlockAddID of "1" contains Alpha data, as defined by the Codec | |||
Mapping for the CodecID. Undefined values SHOULD NOT be used as | Mapping for the CodecID. Undefined values SHOULD NOT be used, as | |||
the behavior of known implementations is different (considered | the behavior of known implementations is different (considered | |||
either as 0 or 1). | either as 0 or 1). | |||
defined values: See Table 8. | ||||
defined values: | stream copy: True (Section 8) | |||
+=======+=========+============================================+ | +=======+=========+============================================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+=========+============================================+ | +=======+=========+============================================+ | |||
| 0 | none | The BlockAdditional Element with | | | 0 | none | The BlockAdditional Element with | | |||
| | | BlockAddID of "1" does not exist or SHOULD | | | | | BlockAddID of "1" does not exist or SHOULD | | |||
| | | NOT be considered as containing such data. | | | | | NOT be considered as containing such data. | | |||
+-------+---------+--------------------------------------------+ | +-------+---------+--------------------------------------------+ | |||
| 1 | present | The BlockAdditional Element with | | | 1 | present | The BlockAdditional Element with | | |||
| | | BlockAddID of "1" contains alpha channel | | | | | BlockAddID of "1" contains alpha channel | | |||
| | | data. | | | | | data. | | |||
+-------+---------+--------------------------------------------+ | +-------+---------+--------------------------------------------+ | |||
Table 8: AlphaMode values | Table 8: AlphaMode Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.5. OldStereoMode Element | 5.1.4.1.28.5. OldStereoMode Element | |||
id / type: 0x53B9 / uinteger | id / type: 0x53B9 / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\OldStereoMode | path: \Segment\Tracks\TrackEntry\Video\OldStereoMode | |||
maxOccurs: 1 | maxOccurs: 1 | |||
maxver: 2 | maxver: 2 | |||
definition: Bogus StereoMode value used in old versions of | definition: Bogus StereoMode value used in old versions of | |||
libmatroska. | libmatroska. | |||
restrictions: See Table 9. | ||||
restrictions: | usage notes: This Element MUST NOT be used. It was an incorrect | |||
value used in libmatroska up to 0.9.0. | ||||
+=======+===========+ | +=======+===========+ | |||
| value | label | | | value | label | | |||
+=======+===========+ | +=======+===========+ | |||
| 0 | mono | | | 0 | mono | | |||
+-------+-----------+ | +-------+-----------+ | |||
| 1 | right eye | | | 1 | right eye | | |||
+-------+-----------+ | +-------+-----------+ | |||
| 2 | left eye | | | 2 | left eye | | |||
+-------+-----------+ | +-------+-----------+ | |||
| 3 | both eyes | | | 3 | both eyes | | |||
+-------+-----------+ | +-------+-----------+ | |||
Table 9: OldStereoMode | Table 9: OldStereoMode | |||
values | Values | |||
usage notes: This Element MUST NOT be used. It was an incorrect | ||||
value used in libmatroska up to 0.9.0. | ||||
5.1.4.1.28.6. PixelWidth Element | 5.1.4.1.28.6. PixelWidth Element | |||
id / type: 0xB0 / uinteger | id / type: 0xB0 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelWidth | path: \Segment\Tracks\TrackEntry\Video\PixelWidth | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Width of the encoded video frames in pixels. | definition: Width of the encoded video frames in pixels. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.7. PixelHeight Element | 5.1.4.1.28.7. PixelHeight Element | |||
id / type: 0xBA / uinteger | id / type: 0xBA / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelHeight | path: \Segment\Tracks\TrackEntry\Video\PixelHeight | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Height of the encoded video frames in pixels. | definition: Height of the encoded video frames in pixels. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.8. PixelCropBottom Element | 5.1.4.1.28.8. PixelCropBottom Element | |||
id / type / default: 0x54AA / uinteger / 0 | id / type / default: 0x54AA / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelCropBottom | path: \Segment\Tracks\TrackEntry\Video\PixelCropBottom | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The number of video pixels to remove at the bottom of | definition: The number of video pixels to remove at the bottom of | |||
the image. | the image. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.9. PixelCropTop Element | 5.1.4.1.28.9. PixelCropTop Element | |||
id / type / default: 0x54BB / uinteger / 0 | id / type / default: 0x54BB / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelCropTop | path: \Segment\Tracks\TrackEntry\Video\PixelCropTop | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The number of video pixels to remove at the top of the | definition: The number of video pixels to remove at the top of the | |||
image. | image. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.10. PixelCropLeft Element | 5.1.4.1.28.10. PixelCropLeft Element | |||
id / type / default: 0x54CC / uinteger / 0 | id / type / default: 0x54CC / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelCropLeft | path: \Segment\Tracks\TrackEntry\Video\PixelCropLeft | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The number of video pixels to remove on the left of the | definition: The number of video pixels to remove on the left of the | |||
image. | image. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.11. PixelCropRight Element | 5.1.4.1.28.11. PixelCropRight Element | |||
id / type / default: 0x54DD / uinteger / 0 | id / type / default: 0x54DD / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\PixelCropRight | path: \Segment\Tracks\TrackEntry\Video\PixelCropRight | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The number of video pixels to remove on the right of the | definition: The number of video pixels to remove on the right of the | |||
image. | image. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.12. DisplayWidth Element | 5.1.4.1.28.12. DisplayWidth Element | |||
id / type: 0x54B0 / uinteger | id / type: 0x54B0 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Video\DisplayWidth | path: \Segment\Tracks\TrackEntry\Video\DisplayWidth | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Width of the video frames to display. Applies to the | definition: Width of the video frames to display. Applies to the | |||
video frame after cropping (PixelCrop* Elements). | video frame after cropping (PixelCrop* Elements). | |||
notes: See Table 10. | ||||
stream copy: True (Section 8) | ||||
notes: | +===========+==================================================+ | |||
| attribute | note | | ||||
+===========+=================================================+ | +===========+==================================================+ | |||
| attribute | note | | | default | If the DisplayUnit of the same TrackEntry is 0, | | |||
+===========+=================================================+ | | | then the default value for DisplayWidth is equal | | |||
| default | If the DisplayUnit of the same TrackEntry is 0, | | | | to PixelWidth - PixelCropLeft - PixelCropRight; | | |||
| | then the default value for DisplayWidth is | | | | else, there is no default value. | | |||
| | equal toPixelWidth - PixelCropLeft - | | +-----------+--------------------------------------------------+ | |||
| | PixelCropRight, else there is no default value. | | ||||
+-----------+-------------------------------------------------+ | ||||
Table 10: DisplayWidth implementation notes | ||||
stream copy: True (Section 8) | Table 10: DisplayWidth Implementation Notes | |||
5.1.4.1.28.13. DisplayHeight Element | 5.1.4.1.28.13. DisplayHeight Element | |||
id / type: 0x54BA / uinteger | id / type: 0x54BA / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Video\DisplayHeight | path: \Segment\Tracks\TrackEntry\Video\DisplayHeight | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Height of the video frames to display. Applies to the | definition: Height of the video frames to display. Applies to the | |||
video frame after cropping (PixelCrop* Elements). | video frame after cropping (PixelCrop* Elements). | |||
notes: See Table 11. | ||||
stream copy: True (Section 8) | ||||
notes: | +===========+===================================================+ | |||
| attribute | note | | ||||
+===========+==================================================+ | +===========+===================================================+ | |||
| attribute | note | | | default | If the DisplayUnit of the same TrackEntry is 0, | | |||
+===========+==================================================+ | | | then the default value for DisplayHeight is equal | | |||
| default | If the DisplayUnit of the same TrackEntry is 0, | | | | to PixelHeight - PixelCropTop - PixelCropBottom; | | |||
| | then the default value for DisplayHeight is | | | | else, there is no default value. | | |||
| | equal toPixelHeight - PixelCropTop - | | +-----------+---------------------------------------------------+ | |||
| | PixelCropBottom, else there is no default value. | | ||||
+-----------+--------------------------------------------------+ | ||||
Table 11: DisplayHeight implementation notes | ||||
stream copy: True (Section 8) | Table 11: DisplayHeight Implementation Notes | |||
5.1.4.1.28.14. DisplayUnit Element | 5.1.4.1.28.14. DisplayUnit Element | |||
id / type / default: 0x54B2 / uinteger / 0 | id / type / default: 0x54B2 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\DisplayUnit | path: \Segment\Tracks\TrackEntry\Video\DisplayUnit | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: How DisplayWidth & DisplayHeight are interpreted. | definition: How DisplayWidth and DisplayHeight are interpreted. | |||
restrictions: See Table 12. | ||||
restrictions: | ||||
+=======+======================+ | +=======+======================+ | |||
| value | label | | | value | label | | |||
+=======+======================+ | +=======+======================+ | |||
| 0 | pixels | | | 0 | pixels | | |||
+-------+----------------------+ | +-------+----------------------+ | |||
| 1 | centimeters | | | 1 | centimeters | | |||
+-------+----------------------+ | +-------+----------------------+ | |||
| 2 | inches | | | 2 | inches | | |||
+-------+----------------------+ | +-------+----------------------+ | |||
| 3 | display aspect ratio | | | 3 | display aspect ratio | | |||
+-------+----------------------+ | +-------+----------------------+ | |||
| 4 | unknown | | | 4 | unknown | | |||
+-------+----------------------+ | +-------+----------------------+ | |||
Table 12: DisplayUnit values | Table 12: DisplayUnit Values | |||
5.1.4.1.28.15. UncompressedFourCC Element | 5.1.4.1.28.15. UncompressedFourCC Element | |||
id / type: 0x2EB524 / binary | id / type: 0x2EB524 / binary | |||
length: 4 | length: 4 | |||
path: \Segment\Tracks\TrackEntry\Video\UncompressedFourCC | path: \Segment\Tracks\TrackEntry\Video\UncompressedFourCC | |||
minOccurs / maxOccurs: see implementation notes / 1 | minOccurs / maxOccurs: see implementation notes / 1 | |||
definition: Specify the uncompressed pixel format used for the | definition: Specifies the uncompressed pixel format used for the | |||
Track's data as a FourCC. This value is similar in scope to the | Track's data as a FourCC. This value is similar in scope to the | |||
biCompression value of AVI's BITMAPINFO [AVIFormat]. There is no | biCompression value of AVI's BITMAPINFO [AVIFormat]. There is | |||
definitive list of FourCC values, nor an official registry. Some | neither a definitive list of FourCC values nor an official | |||
common values for YUV pixel formats can be found at [MSYUV8], | registry. Some common values for YUV pixel formats can be found | |||
[MSYUV16] and [FourCC-YUV]. Some common values for uncompressed | at [MSYUV8], [MSYUV16], and [FourCC-YUV]. Some common values for | |||
RGB pixel formats can be found at [MSRGB] and [FourCC-RGB]. | uncompressed RGB pixel formats can be found at [MSRGB] and | |||
[FourCC-RGB]. | ||||
notes: | notes: See Table 13. | |||
stream copy: True (Section 8) | ||||
+===========+==============================================+ | +===========+==============================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+==============================================+ | +===========+==============================================+ | |||
| minOccurs | UncompressedFourCC MUST be set (minOccurs=1) | | | minOccurs | UncompressedFourCC MUST be set (minOccurs=1) | | |||
| | in TrackEntry, when the CodecID Element of | | | | in TrackEntry when the CodecID Element of | | |||
| | the TrackEntry is set to "V_UNCOMPRESSED". | | | | the TrackEntry is set to "V_UNCOMPRESSED". | | |||
+-----------+----------------------------------------------+ | +-----------+----------------------------------------------+ | |||
Table 13: UncompressedFourCC implementation notes | Table 13: UncompressedFourCC Implementation Notes | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.16. Colour Element | 5.1.4.1.28.16. Colour Element | |||
id / type: 0x55B0 / master | id / type: 0x55B0 / master | |||
path: \Segment\Tracks\TrackEntry\Video\Colour | path: \Segment\Tracks\TrackEntry\Video\Colour | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Settings describing the colour format. | definition: Settings describing the colour format. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.17. MatrixCoefficients Element | 5.1.4.1.28.17. MatrixCoefficients Element | |||
id / type / default: 0x55B1 / uinteger / 2 | id / type / default: 0x55B1 / uinteger / 2 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients | path: \Segment\Tracks\TrackEntry\Video\Colour\MatrixCoefficients | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: The Matrix Coefficients of the video used to derive luma | definition: The Matrix Coefficients of the video used to derive luma | |||
and chroma values from red, green, and blue color primaries. For | and chroma values from red, green, and blue color primaries. For | |||
clarity, the value and meanings for MatrixCoefficients are adopted | clarity, the value and meanings for MatrixCoefficients are adopted | |||
from Table 4 of [ITU-H.273]. | from Table 4 of [ITU-H.273]. | |||
restrictions: See Table 14. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=======================================+ | +=======+=======================================+ | |||
| value | label | | | value | label | | |||
+=======+=======================================+ | +=======+=======================================+ | |||
| 0 | Identity | | | 0 | Identity | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 1 | ITU-R BT.709 | | | 1 | ITU-R BT.709 | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 2 | unspecified | | | 2 | unspecified | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
skipping to change at page 45, line 39 ¶ | skipping to change at line 2026 ¶ | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 11 | SMPTE ST 2085 | | | 11 | SMPTE ST 2085 | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 12 | Chroma-derived Non-constant Luminance | | | 12 | Chroma-derived Non-constant Luminance | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 13 | Chroma-derived Constant Luminance | | | 13 | Chroma-derived Constant Luminance | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 14 | ITU-R BT.2100-0 | | | 14 | ITU-R BT.2100-0 | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
Table 14: MatrixCoefficients values | Table 14: MatrixCoefficients Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.18. BitsPerChannel Element | 5.1.4.1.28.18. BitsPerChannel Element | |||
id / type / default: 0x55B2 / uinteger / 0 | id / type / default: 0x55B2 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel | path: \Segment\Tracks\TrackEntry\Video\Colour\BitsPerChannel | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Number of decoded bits per channel. A value of 0 | definition: Number of decoded bits per channel. A value of 0 | |||
indicates that the BitsPerChannel is unspecified. | indicates that the BitsPerChannel is unspecified. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.19. ChromaSubsamplingHorz Element | 5.1.4.1.28.19. ChromaSubsamplingHorz Element | |||
id / type: 0x55B3 / uinteger | id / type: 0x55B3 / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz | path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingHorz | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The amount of pixels to remove in the Cr and Cb channels | definition: The number of pixels to remove in the Cr and Cb channels | |||
for every pixel not removed horizontally. Example: For video with | for every pixel not removed horizontally. Example: For video with | |||
4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set | 4:2:0 chroma subsampling, the ChromaSubsamplingHorz SHOULD be set | |||
to 1. | to 1. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.20. ChromaSubsamplingVert Element | 5.1.4.1.28.20. ChromaSubsamplingVert Element | |||
id / type: 0x55B4 / uinteger | id / type: 0x55B4 / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert | path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSubsamplingVert | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The amount of pixels to remove in the Cr and Cb channels | definition: The number of pixels to remove in the Cr and Cb channels | |||
for every pixel not removed vertically. Example: For video with | for every pixel not removed vertically. Example: For video with | |||
4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be set | 4:2:0 chroma subsampling, the ChromaSubsamplingVert SHOULD be set | |||
to 1. | to 1. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.21. CbSubsamplingHorz Element | 5.1.4.1.28.21. CbSubsamplingHorz Element | |||
id / type: 0x55B5 / uinteger | id / type: 0x55B5 / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz | path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingHorz | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The amount of pixels to remove in the Cb channel for | definition: The number of pixels to remove in the Cb channel for | |||
every pixel not removed horizontally. This is additive with | every pixel not removed horizontally. This is additive with | |||
ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma | ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma | |||
subsampling, the ChromaSubsamplingHorz SHOULD be set to 1 and | subsampling, the ChromaSubsamplingHorz SHOULD be set to 1, and | |||
CbSubsamplingHorz SHOULD be set to 1. | CbSubsamplingHorz SHOULD be set to 1. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.22. CbSubsamplingVert Element | 5.1.4.1.28.22. CbSubsamplingVert Element | |||
id / type: 0x55B6 / uinteger | id / type: 0x55B6 / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert | path: \Segment\Tracks\TrackEntry\Video\Colour\CbSubsamplingVert | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The amount of pixels to remove in the Cb channel for | definition: The number of pixels to remove in the Cb channel for | |||
every pixel not removed vertically. This is additive with | every pixel not removed vertically. This is additive with | |||
ChromaSubsamplingVert. | ChromaSubsamplingVert. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.23. ChromaSitingHorz Element | 5.1.4.1.28.23. ChromaSitingHorz Element | |||
id / type / default: 0x55B7 / uinteger / 0 | id / type / default: 0x55B7 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz | path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingHorz | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: How chroma is subsampled horizontally. | definition: How chroma is subsampled horizontally. | |||
restrictions: See Table 15. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=================+ | +=======+=================+ | |||
| value | label | | | value | label | | |||
+=======+=================+ | +=======+=================+ | |||
| 0 | unspecified | | | 0 | unspecified | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
| 1 | left collocated | | | 1 | left collocated | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
| 2 | half | | | 2 | half | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
Table 15: | Table 15: | |||
ChromaSitingHorz values | ChromaSitingHorz Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.24. ChromaSitingVert Element | 5.1.4.1.28.24. ChromaSitingVert Element | |||
id / type / default: 0x55B8 / uinteger / 0 | id / type / default: 0x55B8 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert | path: \Segment\Tracks\TrackEntry\Video\Colour\ChromaSitingVert | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: How chroma is subsampled vertically. | definition: How chroma is subsampled vertically. | |||
restrictions: See Table 16. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+================+ | +=======+================+ | |||
| value | label | | | value | label | | |||
+=======+================+ | +=======+================+ | |||
| 0 | unspecified | | | 0 | unspecified | | |||
+-------+----------------+ | +-------+----------------+ | |||
| 1 | top collocated | | | 1 | top collocated | | |||
+-------+----------------+ | +-------+----------------+ | |||
| 2 | half | | | 2 | half | | |||
+-------+----------------+ | +-------+----------------+ | |||
Table 16: | Table 16: | |||
ChromaSitingVert | ChromaSitingVert | |||
values | Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.25. Range Element | 5.1.4.1.28.25. Range Element | |||
id / type / default: 0x55B9 / uinteger / 0 | id / type / default: 0x55B9 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\Range | path: \Segment\Tracks\TrackEntry\Video\Colour\Range | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Clipping of the color ranges. | definition: Clipping of the color ranges. | |||
restrictions: See Table 17. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=========================================================+ | +=======+=========================================================+ | |||
| value | label | | | value | label | | |||
+=======+=========================================================+ | +=======+=========================================================+ | |||
| 0 | unspecified | | | 0 | unspecified | | |||
+-------+---------------------------------------------------------+ | +-------+---------------------------------------------------------+ | |||
| 1 | broadcast range | | | 1 | broadcast range | | |||
+-------+---------------------------------------------------------+ | +-------+---------------------------------------------------------+ | |||
| 2 | full range (no clipping) | | | 2 | full range (no clipping) | | |||
+-------+---------------------------------------------------------+ | +-------+---------------------------------------------------------+ | |||
| 3 | defined by MatrixCoefficients / TransferCharacteristics | | | 3 | defined by MatrixCoefficients / TransferCharacteristics | | |||
+-------+---------------------------------------------------------+ | +-------+---------------------------------------------------------+ | |||
Table 17: Range values | Table 17: Range Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.26. TransferCharacteristics Element | 5.1.4.1.28.26. TransferCharacteristics Element | |||
id / type / default: 0x55BA / uinteger / 2 | id / type / default: 0x55BA / uinteger / 2 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteristic | path: \Segment\Tracks\TrackEntry\Video\Colour\TransferCharacteristic | |||
s | s | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: The transfer characteristics of the video. For clarity, | definition: The transfer characteristics of the video. For clarity, | |||
the value and meanings for TransferCharacteristics are adopted | the value and meanings for TransferCharacteristics are adopted | |||
from Table 3 of [ITU-H.273]. | from Table 3 of [ITU-H.273]. | |||
restrictions: See Table 18. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=======================================+ | +=======+=======================================+ | |||
| value | label | | | value | label | | |||
+=======+=======================================+ | +=======+=======================================+ | |||
| 0 | reserved | | | 0 | reserved | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 1 | ITU-R BT.709 | | | 1 | ITU-R BT.709 | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 2 | unspecified | | | 2 | unspecified | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
skipping to change at page 50, line 47 ¶ | skipping to change at line 2212 ¶ | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 15 | ITU-R BT.2020 12 bit | | | 15 | ITU-R BT.2020 12 bit | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 16 | ITU-R BT.2100 Perceptual Quantization | | | 16 | ITU-R BT.2100 Perceptual Quantization | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 17 | SMPTE ST 428-1 | | | 17 | SMPTE ST 428-1 | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
| 18 | ARIB STD-B67 (HLG) | | | 18 | ARIB STD-B67 (HLG) | | |||
+-------+---------------------------------------+ | +-------+---------------------------------------+ | |||
Table 18: TransferCharacteristics values | Table 18: TransferCharacteristics Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.27. Primaries Element | 5.1.4.1.28.27. Primaries Element | |||
id / type / default: 0x55BB / uinteger / 2 | id / type / default: 0x55BB / uinteger / 2 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\Primaries | path: \Segment\Tracks\TrackEntry\Video\Colour\Primaries | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: The colour primaries of the video. For clarity, the | definition: The colour primaries of the video. For clarity, the | |||
value and meanings for Primaries are adopted from Table 2 of | value and meanings for Primaries are adopted from Table 2 of | |||
[ITU-H.273]. | [ITU-H.273]. | |||
restrictions: See Table 19. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+========================================+ | +=======+========================================+ | |||
| value | label | | | value | label | | |||
+=======+========================================+ | +=======+========================================+ | |||
| 0 | reserved | | | 0 | reserved | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 1 | ITU-R BT.709 | | | 1 | ITU-R BT.709 | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 2 | unspecified | | | 2 | unspecified | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
skipping to change at page 51, line 49 ¶ | skipping to change at line 2258 ¶ | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 10 | SMPTE ST 428-1 | | | 10 | SMPTE ST 428-1 | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 11 | SMPTE RP 432-2 | | | 11 | SMPTE RP 432-2 | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 12 | SMPTE EG 432-2 | | | 12 | SMPTE EG 432-2 | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
| 22 | EBU Tech. 3213-E - JEDEC P22 phosphors | | | 22 | EBU Tech. 3213-E - JEDEC P22 phosphors | | |||
+-------+----------------------------------------+ | +-------+----------------------------------------+ | |||
Table 19: Primaries values | Table 19: Primaries Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.28. MaxCLL Element | 5.1.4.1.28.28. MaxCLL Element | |||
id / type: 0x55BC / uinteger | id / type: 0x55BC / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MaxCLL | path: \Segment\Tracks\TrackEntry\Video\Colour\MaxCLL | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Maximum brightness of a single pixel (Maximum Content | definition: Maximum brightness of a single pixel (Maximum Content | |||
Light Level) in candelas per square meter (cd/m^2). | Light Level) in candelas per square meter (cd/m^2). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.29. MaxFALL Element | 5.1.4.1.28.29. MaxFALL Element | |||
id / type: 0x55BD / uinteger | id / type: 0x55BD / uinteger | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MaxFALL | path: \Segment\Tracks\TrackEntry\Video\Colour\MaxFALL | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Maximum brightness of a single full frame (Maximum | definition: Maximum brightness of a single full frame (Maximum | |||
Frame-Average Light Level) in candelas per square meter (cd/m^2). | Frame-Average Light Level) in candelas per square meter (cd/m^2). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.30. MasteringMetadata Element | 5.1.4.1.28.30. MasteringMetadata Element | |||
id / type: 0x55D0 / master | id / type: 0x55D0 / master | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: SMPTE 2086 mastering data. | definition: SMPTE 2086 mastering data. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.31. PrimaryRChromaticityX Element | 5.1.4.1.28.31. PrimaryRChromaticityX Element | |||
id / type: 0x55D1 / float | id / type: 0x55D1 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryRChromaticityX | aryRChromaticityX | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Red X chromaticity coordinate, as defined by [CIE-1931]. | definition: Red X chromaticity coordinate, as defined by [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.32. PrimaryRChromaticityY Element | 5.1.4.1.28.32. PrimaryRChromaticityY Element | |||
id / type: 0x55D2 / float | id / type: 0x55D2 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryRChromaticityY | aryRChromaticityY | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Red Y chromaticity coordinate, as defined by [CIE-1931]. | definition: Red Y chromaticity coordinate, as defined by [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.33. PrimaryGChromaticityX Element | 5.1.4.1.28.33. PrimaryGChromaticityX Element | |||
id / type: 0x55D3 / float | id / type: 0x55D3 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryGChromaticityX | aryGChromaticityX | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Green X chromaticity coordinate, as defined by | definition: Green X chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.34. PrimaryGChromaticityY Element | 5.1.4.1.28.34. PrimaryGChromaticityY Element | |||
id / type: 0x55D4 / float | id / type: 0x55D4 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryGChromaticityY | aryGChromaticityY | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Green Y chromaticity coordinate, as defined by | definition: Green Y chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.35. PrimaryBChromaticityX Element | 5.1.4.1.28.35. PrimaryBChromaticityX Element | |||
id / type: 0x55D5 / float | id / type: 0x55D5 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryBChromaticityX | aryBChromaticityX | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Blue X chromaticity coordinate, as defined by | definition: Blue X chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.36. PrimaryBChromaticityY Element | 5.1.4.1.28.36. PrimaryBChromaticityY Element | |||
id / type: 0x55D6 / float | id / type: 0x55D6 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Prim | |||
aryBChromaticityY | aryBChromaticityY | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Blue Y chromaticity coordinate, as defined by | definition: Blue Y chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.37. WhitePointChromaticityX Element | 5.1.4.1.28.37. WhitePointChromaticityX Element | |||
id / type: 0x55D7 / float | id / type: 0x55D7 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit | |||
ePointChromaticityX | ePointChromaticityX | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: White X chromaticity coordinate, as defined by | definition: White X chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.38. WhitePointChromaticityY Element | 5.1.4.1.28.38. WhitePointChromaticityY Element | |||
id / type: 0x55D8 / float | id / type: 0x55D8 / float | |||
range: 0x0p+0-0x1p+0 | range: 0x0p+0-0x1p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Whit | |||
ePointChromaticityY | ePointChromaticityY | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: White Y chromaticity coordinate, as defined by | definition: White Y chromaticity coordinate, as defined by | |||
[CIE-1931]. | [CIE-1931]. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.39. LuminanceMax Element | 5.1.4.1.28.39. LuminanceMax Element | |||
id / type: 0x55D9 / float | id / type: 0x55D9 / float | |||
range: >= 0x0p+0 | range: >= 0x0p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi | |||
nanceMax | nanceMax | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Maximum luminance. Represented in candelas per square | definition: Maximum luminance. Represented in candelas per square | |||
meter (cd/m^2). | meter (cd/m^2). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.40. LuminanceMin Element | 5.1.4.1.28.40. LuminanceMin Element | |||
id / type: 0x55DA / float | id / type: 0x55DA / float | |||
range: >= 0x0p+0 | range: >= 0x0p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi | path: \Segment\Tracks\TrackEntry\Video\Colour\MasteringMetadata\Lumi | |||
nanceMin | nanceMin | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Minimum luminance. Represented in candelas per square | definition: Minimum luminance. Represented in candelas per square | |||
meter (cd/m^2). | meter (cd/m^2). | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.41. Projection Element | 5.1.4.1.28.41. Projection Element | |||
id / type: 0x7670 / master | id / type: 0x7670 / master | |||
path: \Segment\Tracks\TrackEntry\Video\Projection | path: \Segment\Tracks\TrackEntry\Video\Projection | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Describes the video projection details. Used to render | definition: Describes the video projection details. Used to render | |||
spherical, VR videos or flipping videos horizontally/vertically. | spherical or VR videos or to flip videos horizontally or | |||
vertically. | ||||
stream copy: True (Section 8) | stream copy: True (Section 8) | |||
5.1.4.1.28.42. ProjectionType Element | 5.1.4.1.28.42. ProjectionType Element | |||
id / type / default: 0x7671 / uinteger / 0 | id / type / default: 0x7671 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionType | path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionType | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Describes the projection used for this video track. | definition: Describes the projection used for this video track. | |||
restrictions: See Table 20. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=================+ | +=======+=================+ | |||
| value | label | | | value | label | | |||
+=======+=================+ | +=======+=================+ | |||
| 0 | rectangular | | | 0 | rectangular | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
| 1 | equirectangular | | | 1 | equirectangular | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
| 2 | cubemap | | | 2 | cubemap | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
| 3 | mesh | | | 3 | mesh | | |||
+-------+-----------------+ | +-------+-----------------+ | |||
Table 20: | Table 20: | |||
ProjectionType values | ProjectionType Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.28.43. ProjectionPrivate Element | 5.1.4.1.28.43. ProjectionPrivate Element | |||
id / type: 0x7672 / binary | id / type: 0x7672 / binary | |||
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate | path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPrivate | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Private data that only applies to a specific projection. | definition: Private data that only applies to a specific projection. | |||
* If ProjectionType equals 0 (rectangular), then this element | ||||
* If ProjectionType equals 0 (Rectangular), then this element MUST | MUST NOT be present. | |||
NOT be present. | * If ProjectionType equals 1 (equirectangular), then this element | |||
* If ProjectionType equals 1 (Equirectangular), then this element | MUST be present and contain the same binary data that would be | |||
MUST be present and contain the same binary data that would be | stored inside an ISOBMFF Equirectangular Projection Box | |||
stored inside an ISOBMFF Equirectangular Projection Box ('equi'). | ("equi"). | |||
* If ProjectionType equals 2 (Cubemap), then this element MUST be | * If ProjectionType equals 2 (cubemap), then this element MUST be | |||
present and contain the same binary data that would be stored | present and contain the same binary data that would be stored | |||
inside an ISOBMFF Cubemap Projection Box ('cbmp'). | inside an ISOBMFF Cubemap Projection Box ("cbmp"). | |||
* If ProjectionType equals 3 (Mesh), then this element MUST be | * If ProjectionType equals 3 (mesh), then this element MUST be | |||
present and contain the same binary data that would be stored | present and contain the same binary data that would be stored | |||
inside an ISOBMFF Mesh Projection Box ('mshp'). | inside an ISOBMFF Mesh Projection Box ("mshp"). | |||
usage notes: ISOBMFF box size and fourcc fields are not included in | usage notes: ISOBMFF box size and fourcc fields are not included in | |||
the binary data, but the FullBox version and flag fields are. | the binary data, but the FullBox version and flag fields are. | |||
This is to avoid redundant framing information while preserving | This is to avoid redundant framing information while preserving | |||
versioning and semantics between the two container formats. | versioning and semantics between the two container formats. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.28.44. ProjectionPoseYaw Element | 5.1.4.1.28.44. ProjectionPoseYaw Element | |||
id / type / default: 0x7673 / float / 0x0p+0 | id / type / default: 0x7673 / float / 0x0p+0 | |||
range: >= -0xB4p+0, <= 0xB4p+0 | range: >= -0xB4p+0, <= 0xB4p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw | path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseYaw | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Specifies a yaw rotation to the projection. | definition: Specifies a yaw rotation to the projection. | |||
Value represents a clockwise rotation, in degrees, around the up | Value represents a clockwise rotation, in degrees, around the up | |||
vector. This rotation must be applied before any ProjectionPosePitch | vector. This rotation must be applied before any ProjectionPosePitch | |||
or ProjectionPoseRoll rotations. The value of this element MUST be | or ProjectionPoseRoll rotations. The value of this element MUST be | |||
in the -180 to 180 degree range, both included. | in the -180 to 180 degree range, both included. | |||
Setting ProjectionPoseYaw to 180 or -180 degrees, with the | Setting ProjectionPoseYaw to 180 or -180 degrees with | |||
ProjectionPoseRoll and ProjectionPosePitch set to 0 degrees flips the | ProjectionPoseRoll and ProjectionPosePitch set to 0 degrees flips the | |||
image horizontally. | image horizontally. | |||
stream copy: True (Section 8) | stream copy: True (Section 8) | |||
5.1.4.1.28.45. ProjectionPosePitch Element | 5.1.4.1.28.45. ProjectionPosePitch Element | |||
id / type / default: 0x7674 / float / 0x0p+0 | id / type / default: 0x7674 / float / 0x0p+0 | |||
range: >= -0x5Ap+0, <= 0x5Ap+0 | range: >= -0x5Ap+0, <= 0x5Ap+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitc | path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPosePitc | |||
h | h | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Specifies a pitch rotation to the projection. | definition: Specifies a pitch rotation to the projection. | |||
Value represents a counter-clockwise rotation, in degrees, around the | Value represents a counter-clockwise rotation, in degrees, around the | |||
right vector. This rotation must be applied after the | right vector. This rotation must be applied after the | |||
ProjectionPoseYaw rotation and before the ProjectionPoseRoll | ProjectionPoseYaw rotation and before the ProjectionPoseRoll | |||
rotation. The value of this element MUST be in the -90 to 90 degree | rotation. The value of this element MUST be in the -90 to 90 degree | |||
range, both included. | range, both included. | |||
stream copy: True (Section 8) | stream copy: True (Section 8) | |||
5.1.4.1.28.46. ProjectionPoseRoll Element | 5.1.4.1.28.46. ProjectionPoseRoll Element | |||
id / type / default: 0x7675 / float / 0x0p+0 | id / type / default: 0x7675 / float / 0x0p+0 | |||
range: >= -0xB4p+0, <= 0xB4p+0 | range: >= -0xB4p+0, <= 0xB4p+0 | |||
path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll | path: \Segment\Tracks\TrackEntry\Video\Projection\ProjectionPoseRoll | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: Specifies a roll rotation to the projection. | definition: Specifies a roll rotation to the projection. | |||
Value represents a counter-clockwise rotation, in degrees, around the | Value represents a counter-clockwise rotation, in degrees, around the | |||
forward vector. This rotation must be applied after the | forward vector. This rotation must be applied after the | |||
ProjectionPoseYaw and ProjectionPosePitch rotations. The value of | ProjectionPoseYaw and ProjectionPosePitch rotations. The value of | |||
this element MUST be in the -180 to 180 degree range, both included. | this element MUST be in the -180 to 180 degree range, both included. | |||
Setting ProjectionPoseRoll to 180 or -180 degrees, the | Setting ProjectionPoseRoll to 180 or -180 degrees and | |||
ProjectionPoseYaw to 180 or -180 degrees with ProjectionPosePitch set | ProjectionPoseYaw to 180 or -180 degrees with ProjectionPosePitch set | |||
to 0 degrees flips the image vertically. | to 0 degrees flips the image vertically. | |||
Setting ProjectionPoseRoll to 180 or -180 degrees, with the | Setting ProjectionPoseRoll to 180 or -180 degrees with | |||
ProjectionPoseYaw and ProjectionPosePitch set to 0 degrees flips the | ProjectionPoseYaw and ProjectionPosePitch set to 0 degrees flips the | |||
image horizontally and vertically. | image horizontally and vertically. | |||
stream copy: True (Section 8) | stream copy: True (Section 8) | |||
5.1.4.1.29. Audio Element | 5.1.4.1.29. Audio Element | |||
id / type: 0xE1 / master | id / type: 0xE1 / master | |||
path: \Segment\Tracks\TrackEntry\Audio | path: \Segment\Tracks\TrackEntry\Audio | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Audio settings. | definition: Audio settings. | |||
5.1.4.1.29.1. SamplingFrequency Element | 5.1.4.1.29.1. SamplingFrequency Element | |||
id / type / default: 0xB5 / float / 0x1.f4p+12 | id / type / default: 0xB5 / float / 0x1.f4p+12 | |||
range: > 0x0p+0 | range: > 0x0p+0 | |||
path: \Segment\Tracks\TrackEntry\Audio\SamplingFrequency | path: \Segment\Tracks\TrackEntry\Audio\SamplingFrequency | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Sampling frequency in Hz. | definition: Sampling frequency in Hz. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.29.2. OutputSamplingFrequency Element | 5.1.4.1.29.2. OutputSamplingFrequency Element | |||
id / type: 0x78B5 / float | id / type: 0x78B5 / float | |||
range: > 0x0p+0 | range: > 0x0p+0 | |||
path: \Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency | path: \Segment\Tracks\TrackEntry\Audio\OutputSamplingFrequency | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Real output sampling frequency in Hz (used for SBR | definition: Real output sampling frequency in Hz (used for SBR | |||
techniques). | techniques). | |||
notes: See Table 21. | ||||
notes: | ||||
+===========+======================================================+ | +===========+======================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+======================================================+ | +===========+======================================================+ | |||
| default | The default value for OutputSamplingFrequency of the | | | default | The default value for OutputSamplingFrequency of the | | |||
| | same TrackEntry is equal to the SamplingFrequency. | | | | same TrackEntry is equal to the SamplingFrequency. | | |||
+-----------+------------------------------------------------------+ | +-----------+------------------------------------------------------+ | |||
Table 21: OutputSamplingFrequency implementation notes | Table 21: OutputSamplingFrequency Implementation Notes | |||
5.1.4.1.29.3. Channels Element | 5.1.4.1.29.3. Channels Element | |||
id / type / default: 0x9F / uinteger / 1 | id / type / default: 0x9F / uinteger / 1 | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Audio\Channels | path: \Segment\Tracks\TrackEntry\Audio\Channels | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Numbers of channels in the track. | definition: Numbers of channels in the track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.29.4. BitDepth Element | 5.1.4.1.29.4. BitDepth Element | |||
id / type: 0x6264 / uinteger | id / type: 0x6264 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\Audio\BitDepth | path: \Segment\Tracks\TrackEntry\Audio\BitDepth | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Bits per sample, mostly used for PCM. | definition: Bits per sample, mostly used for PCM. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30. TrackOperation Element | 5.1.4.1.30. TrackOperation Element | |||
id / type: 0xE2 / master | id / type: 0xE2 / master | |||
path: \Segment\Tracks\TrackEntry\TrackOperation | path: \Segment\Tracks\TrackEntry\TrackOperation | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: Operation that needs to be applied on tracks to create | definition: Operation that needs to be applied on tracks to create | |||
this virtual track. For more details look at Section 18.8. | this virtual track. For more details, see Section 18.8. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30.1. TrackCombinePlanes Element | 5.1.4.1.30.1. TrackCombinePlanes Element | |||
id / type: 0xE3 / master | id / type: 0xE3 / master | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: Contains the list of all video plane tracks that need to | definition: Contains the list of all video plane tracks that need to | |||
be combined to create this 3D track | be combined to create this 3D track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30.2. TrackPlane Element | 5.1.4.1.30.2. TrackPlane Element | |||
id / type: 0xE4 / master | id / type: 0xE4 / master | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | |||
rackPlane | rackPlane | |||
minOccurs: 1 | minOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: Contains a video plane track that need to be combined to | definition: Contains a video plane track that needs to be combined | |||
create this 3D track | to create this 3D track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30.3. TrackPlaneUID Element | 5.1.4.1.30.3. TrackPlaneUID Element | |||
id / type: 0xE5 / uinteger | id / type: 0xE5 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | |||
rackPlane\TrackPlaneUID | rackPlane\TrackPlaneUID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 3 | minver: 3 | |||
definition: The trackUID number of the track representing the plane. | definition: The trackUID number of the track representing the plane. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30.4. TrackPlaneType Element | 5.1.4.1.30.4. TrackPlaneType Element | |||
id / type: 0xE6 / uinteger | id / type: 0xE6 / uinteger | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackCombinePlanes\T | |||
rackPlane\TrackPlaneType | rackPlane\TrackPlaneType | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 3 | minver: 3 | |||
definition: The kind of plane this track corresponds to. | definition: The kind of plane this track corresponds to. | |||
restrictions: See Table 22. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+============+ | +=======+============+ | |||
| value | label | | | value | label | | |||
+=======+============+ | +=======+============+ | |||
| 0 | left eye | | | 0 | left eye | | |||
+-------+------------+ | +-------+------------+ | |||
| 1 | right eye | | | 1 | right eye | | |||
+-------+------------+ | +-------+------------+ | |||
| 2 | background | | | 2 | background | | |||
+-------+------------+ | +-------+------------+ | |||
Table 22: | Table 22: | |||
TrackPlaneType values | TrackPlaneType Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.30.5. TrackJoinBlocks Element | 5.1.4.1.30.5. TrackJoinBlocks Element | |||
id / type: 0xE9 / master | id / type: 0xE9 / master | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: Contains the list of all tracks whose Blocks need to be | definition: Contains the list of all tracks whose Blocks need to be | |||
combined to create this virtual track | combined to create this virtual track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.30.6. TrackJoinUID Element | 5.1.4.1.30.6. TrackJoinUID Element | |||
id / type: 0xED / uinteger | id / type: 0xED / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\Trac | path: \Segment\Tracks\TrackEntry\TrackOperation\TrackJoinBlocks\Trac | |||
kJoinUID | kJoinUID | |||
minOccurs: 1 | minOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: The trackUID number of a track whose blocks are used to | definition: The trackUID number of a track whose blocks are used to | |||
create this virtual track. | create this virtual track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31. ContentEncodings Element | 5.1.4.1.31. ContentEncodings Element | |||
id / type: 0x6D80 / master | id / type: 0x6D80 / master | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings | path: \Segment\Tracks\TrackEntry\ContentEncodings | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Settings for several content encoding mechanisms like | definition: Settings for several content encoding mechanisms like | |||
compression or encryption. | compression or encryption. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.1. ContentEncoding Element | 5.1.4.1.31.1. ContentEncoding Element | |||
id / type: 0x6240 / master | id / type: 0x6240 / master | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Settings for one content encoding like compression or | definition: Settings for one content encoding like compression or | |||
encryption. | encryption. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.2. ContentEncodingOrder Element | 5.1.4.1.31.2. ContentEncodingOrder Element | |||
id / type / default: 0x5031 / uinteger / 0 | id / type / default: 0x5031 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncodingOrder | ntentEncodingOrder | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Tell in which order to apply each ContentEncoding of the | definition: Tell in which order to apply each ContentEncoding of the | |||
ContentEncodings. The decoder/demuxer MUST start with the | ContentEncodings. The decoder/demuxer MUST start with the | |||
ContentEncoding with the highest ContentEncodingOrder and work its | ContentEncoding with the highest ContentEncodingOrder and work its | |||
way down to the ContentEncoding with the lowest | way down to the ContentEncoding with the lowest | |||
ContentEncodingOrder. This value MUST be unique over for each | ContentEncodingOrder. This value MUST be unique for each | |||
ContentEncoding found in the ContentEncodings of this TrackEntry. | ContentEncoding found in the ContentEncodings of this TrackEntry. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.3. ContentEncodingScope Element | 5.1.4.1.31.3. ContentEncodingScope Element | |||
id / type / default: 0x5032 / uinteger / 1 | id / type / default: 0x5032 / uinteger / 1 | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncodingScope | ntentEncodingScope | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A bit field that describes which Elements have been | definition: A bit field that describes which Elements have been | |||
modified in this way. Values (big-endian) can be OR'ed. | modified in this way. Values (big-endian) can be OR'ed. | |||
defined values: See Table 23. | ||||
stream copy: True (Section 8) | ||||
defined values: | +=======+=========+============================================+ | |||
| value | label | definition | | ||||
+=======+=========+===========================================+ | +=======+=========+============================================+ | |||
| value | label | definition | | | 1 | Block | All frame contents, excluding lacing data. | | |||
+=======+=========+===========================================+ | +-------+---------+--------------------------------------------+ | |||
| 1 | Block | All frame contents, excluding lacing | | | 2 | Private | The track's CodecPrivate data. | | |||
| | | data. | | +-------+---------+--------------------------------------------+ | |||
+-------+---------+-------------------------------------------+ | | 4 | Next | The next ContentEncoding (next | | |||
| 2 | Private | The track's CodecPrivate data. | | | | | ContentEncodingOrder; the data inside | | |||
+-------+---------+-------------------------------------------+ | | | | ContentCompression and/or | | |||
| 4 | Next | The next ContentEncoding (next | | | | | ContentEncryption). This value SHOULD NOT | | |||
| | | ContentEncodingOrder. Either the data | | | | | be used, as it's not supported by players. | | |||
| | | inside ContentCompression and/or | | +-------+---------+--------------------------------------------+ | |||
| | | ContentEncryption).This value SHOULD NOT | | ||||
| | | be used as it's not supported by players. | | ||||
+-------+---------+-------------------------------------------+ | ||||
Table 23: ContentEncodingScope values | ||||
stream copy: True (Section 8) | Table 23: ContentEncodingScope Values | |||
5.1.4.1.31.4. ContentEncodingType Element | 5.1.4.1.31.4. ContentEncodingType Element | |||
id / type / default: 0x5033 / uinteger / 0 | id / type / default: 0x5033 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncodingType | ntentEncodingType | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A value describing what kind of transformation is | definition: A value describing the kind of transformation that is | |||
applied. | applied. | |||
restrictions: See Table 24. | ||||
restrictions: | stream copy: True (Section 8) | |||
+=======+=============+ | +=======+=============+ | |||
| value | label | | | value | label | | |||
+=======+=============+ | +=======+=============+ | |||
| 0 | Compression | | | 0 | Compression | | |||
+-------+-------------+ | +-------+-------------+ | |||
| 1 | Encryption | | | 1 | Encryption | | |||
+-------+-------------+ | +-------+-------------+ | |||
Table 24: | Table 24: | |||
ContentEncodingType | ContentEncodingType | |||
values | Values | |||
stream copy: True (Section 8) | ||||
5.1.4.1.31.5. ContentCompression Element | 5.1.4.1.31.5. ContentCompression Element | |||
id / type: 0x5034 / master | id / type: 0x5034 / master | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentCompression | ntentCompression | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Settings describing the compression used. This Element | definition: Settings describing the compression used. This Element | |||
MUST be present if the value of ContentEncodingType is 0 and | MUST be present if the value of ContentEncodingType is 0 and | |||
absent otherwise. Each block MUST be decompressable even if no | absent otherwise. Each block MUST be decompressable, even if no | |||
previous block is available in order not to prevent seeking. | previous block is available in order to not prevent seeking. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.6. ContentCompAlgo Element | 5.1.4.1.31.6. ContentCompAlgo Element | |||
id / type / default: 0x4254 / uinteger / 0 | id / type / default: 0x4254 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentCompression\ContentCompAlgo | ntentCompression\ContentCompAlgo | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The compression algorithm used. | definition: The compression algorithm used. | |||
defined values: See Table 25. | ||||
defined values: | usage notes: Compression method "1" (bzlib) and "2" (lzo1x) lack | |||
proper documentation on the format, which limits implementation | ||||
possibilities. Due to licensing conflicts on commonly available | ||||
libraries' compression methods, "2" (lzo1x) does not offer | ||||
widespread interoperability. A Matroska Writer SHOULD NOT use | ||||
these compression methods by default. A Matroska Reader MAY | ||||
support methods "1" and "2" as possible and SHOULD support other | ||||
methods. | ||||
stream copy: True (Section 8) | ||||
+=======+===========+=========================================+ | +=======+===========+=========================================+ | |||
| value | label | definition | | | value | label | definition | | |||
+=======+===========+=========================================+ | +=======+===========+=========================================+ | |||
| 0 | zlib | zlib compression [RFC1950]. | | | 0 | zlib | zlib compression [RFC1950]. | | |||
+-------+-----------+-----------------------------------------+ | +-------+-----------+-----------------------------------------+ | |||
| 1 | bzlib | bzip2 compression [BZIP2], SHOULD NOT | | | 1 | bzlib | bzip2 compression [BZIP2] SHOULD NOT be | | |||
| | | be used; see usage notes. | | | | | used; see usage notes. | | |||
+-------+-----------+-----------------------------------------+ | +-------+-----------+-----------------------------------------+ | |||
| 2 | lzo1x | Lempel-Ziv-Oberhumer compression [LZO], | | | 2 | lzo1x | Lempel-Ziv-Oberhumer compression [LZO], | | |||
| | | SHOULD NOT be used; see usage notes. | | | | | SHOULD NOT be used; see usage notes. | | |||
+-------+-----------+-----------------------------------------+ | +-------+-----------+-----------------------------------------+ | |||
| 3 | Header | Octets in ContentCompSettings | | | 3 | Header | Octets in ContentCompSettings | | |||
| | Stripping | (Section 5.1.4.1.31.7) have been | | | | Stripping | (Section 5.1.4.1.31.7) have been | | |||
| | | stripped from each frame. | | | | | stripped from each frame. | | |||
+-------+-----------+-----------------------------------------+ | +-------+-----------+-----------------------------------------+ | |||
Table 25: ContentCompAlgo values | Table 25: ContentCompAlgo Values | |||
usage notes: Compression method "1" (bzlib) and "2" (lzo1x) are | ||||
lacking proper documentation on the format which limits | ||||
implementation possibilities. Due to licensing conflicts on | ||||
commonly available libraries compression methods "2" (lzo1x) does | ||||
not offer widespread interoperability. A Matroska Writer SHOULD | ||||
NOT use these compression methods by default. A Matroska Reader | ||||
MAY support methods "1" and "2" as possible, and SHOULD support | ||||
other methods. | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.7. ContentCompSettings Element | 5.1.4.1.31.7. ContentCompSettings Element | |||
id / type: 0x4255 / binary | id / type: 0x4255 / binary | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentCompression\ContentCompSettings | ntentCompression\ContentCompSettings | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Settings that might be needed by the decompressor. For | definition: Settings that might be needed by the decompressor. For | |||
Header Stripping (ContentCompAlgo=3), the bytes that were removed | Header Stripping (ContentCompAlgo=3), the bytes that were removed | |||
from the beginning of each frames of the track. | from the beginning of each frame of the track. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.8. ContentEncryption Element | 5.1.4.1.31.8. ContentEncryption Element | |||
id / type: 0x5035 / master | id / type: 0x5035 / master | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncryption | ntentEncryption | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Settings describing the encryption used. This Element | definition: Settings describing the encryption used. This Element | |||
MUST be present if the value of ContentEncodingType is 1 | MUST be present if the value of ContentEncodingType is 1 | |||
(encryption) and MUST be ignored otherwise. A Matroska Player MAY | (encryption) and MUST be ignored otherwise. A Matroska Player MAY | |||
support encryption. | support encryption. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.9. ContentEncAlgo Element | 5.1.4.1.31.9. ContentEncAlgo Element | |||
id / type / default: 0x47E1 / uinteger / 0 | id / type / default: 0x47E1 / uinteger / 0 | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncryption\ContentEncAlgo | ntentEncryption\ContentEncAlgo | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The encryption algorithm used. | definition: The encryption algorithm used. | |||
defined values: See Table 26. | ||||
stream copy: True (Section 8) | ||||
defined values: | +=======+===========+============================================+ | |||
| value | label | definition | | ||||
+=======+===============+===========================================+ | +=======+===========+============================================+ | |||
| value | label | definition | | | 0 | Not | The data are not encrypted. | | |||
+=======+===============+===========================================+ | | | encrypted | | | |||
| 0 | Not | The data are not encrypted. | | +-------+-----------+--------------------------------------------+ | |||
| | encrypted | | | | 1 | DES | Data Encryption Standard (DES) [FIPS46-3]. | | |||
+-------+---------------+-------------------------------------------+ | | | | This value SHOULD be avoided. | | |||
| 1 | DES | Data Encryption Standard (DES) | | +-------+-----------+--------------------------------------------+ | |||
| | | [FIPS.46-3].This value SHOULD be avoided. | | | 2 | 3DES | Triple Data Encryption Algorithm | | |||
+-------+---------------+-------------------------------------------+ | | | | [SP800-67]. This value SHOULD be avoided. | | |||
| 2 | 3DES | Triple Data Encryption Algorithm | | +-------+-----------+--------------------------------------------+ | |||
| | | [SP.800-67].This value SHOULD be avoided. | | | 3 | Twofish | Twofish Encryption Algorithm [Twofish]. | | |||
+-------+---------------+-------------------------------------------+ | +-------+-----------+--------------------------------------------+ | |||
| 3 | Twofish | Twofish Encryption Algorithm [Twofish]. | | | 4 | Blowfish | Blowfish Encryption Algorithm [Blowfish]. | | |||
+-------+---------------+-------------------------------------------+ | | | | This value SHOULD be avoided. | | |||
| 4 | Blowfish | Blowfish Encryption Algorithm | | +-------+-----------+--------------------------------------------+ | |||
| | | [Blowfish].This value SHOULD be avoided. | | | 5 | AES | Advanced Encryption Standard (AES) | | |||
+-------+---------------+-------------------------------------------+ | | | | [FIPS197]. | | |||
| 5 | AES | Advanced Encryption Standard (AES) | | +-------+-----------+--------------------------------------------+ | |||
| | | [FIPS.197]. | | ||||
+-------+---------------+-------------------------------------------+ | ||||
Table 26: ContentEncAlgo values | ||||
stream copy: True (Section 8) | Table 26: ContentEncAlgo Values | |||
5.1.4.1.31.10. ContentEncKeyID Element | 5.1.4.1.31.10. ContentEncKeyID Element | |||
id / type: 0x47E2 / binary | id / type: 0x47E2 / binary | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncryption\ContentEncKeyID | ntentEncryption\ContentEncKeyID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: For public key algorithms this is the ID of the public | definition: For public key algorithms, the ID of the public key that | |||
key the data was encrypted with. | the data was encrypted with. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.4.1.31.11. ContentEncAESSettings Element | 5.1.4.1.31.11. ContentEncAESSettings Element | |||
id / type: 0x47E7 / master | id / type: 0x47E7 / master | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncryption\ContentEncAESSettings | ntentEncryption\ContentEncAESSettings | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: Settings describing the encryption algorithm used. | definition: Settings describing the encryption algorithm used. | |||
notes: See Table 27. | ||||
notes: | stream copy: True (Section 8) | |||
+===========+=================================================+ | +===========+=================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+=================================================+ | +===========+=================================================+ | |||
| maxOccurs | ContentEncAESSettings MUST NOT be set | | | maxOccurs | ContentEncAESSettings MUST NOT be set | | |||
| | (maxOccurs=0) if ContentEncAlgo is not AES (5). | | | | (maxOccurs=0) if ContentEncAlgo is not AES (5). | | |||
+-----------+-------------------------------------------------+ | +-----------+-------------------------------------------------+ | |||
Table 27: ContentEncAESSettings implementation notes | Table 27: ContentEncAESSettings Implementation Notes | |||
stream copy: True (Section 8) | ||||
5.1.4.1.31.12. AESSettingsCipherMode Element | 5.1.4.1.31.12. AESSettingsCipherMode Element | |||
id / type: 0x47E8 / uinteger | id / type: 0x47E8 / uinteger | |||
path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | path: \Segment\Tracks\TrackEntry\ContentEncodings\ContentEncoding\Co | |||
ntentEncryption\ContentEncAESSettings\AESSettingsCipherMode | ntentEncryption\ContentEncAESSettings\AESSettingsCipherMode | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 4 | minver: 4 | |||
definition: The AES cipher mode used in the encryption. | definition: The AES cipher mode used in the encryption. | |||
defined values: See Table 28. | ||||
notes: See Table 29. | ||||
stream copy: True (Section 8) | ||||
defined values: | +=======+=========+===================================+ | |||
| value | label | definition | | ||||
+=======+=========+=====================================+ | +=======+=========+===================================+ | |||
| value | label | definition | | | 1 | AES-CTR | Counter [SP800-38A] | | |||
+=======+=========+=====================================+ | +-------+---------+-----------------------------------+ | |||
| 1 | AES-CTR | Counter [SP.800-38A]. | | | 2 | AES-CBC | Cipher Block Chaining [SP800-38A] | | |||
+-------+---------+-------------------------------------+ | +-------+---------+-----------------------------------+ | |||
| 2 | AES-CBC | Cipher Block Chaining [SP.800-38A]. | | ||||
+-------+---------+-------------------------------------+ | ||||
Table 28: AESSettingsCipherMode values | ||||
notes: | Table 28: AESSettingsCipherMode Values | |||
+===========+=================================================+ | +===========+=================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+=================================================+ | +===========+=================================================+ | |||
| maxOccurs | AESSettingsCipherMode MUST NOT be set | | | maxOccurs | AESSettingsCipherMode MUST NOT be set | | |||
| | (maxOccurs=0) if ContentEncAlgo is not AES (5). | | | | (maxOccurs=0) if ContentEncAlgo is not AES (5). | | |||
+-----------+-------------------------------------------------+ | +-----------+-------------------------------------------------+ | |||
Table 29: AESSettingsCipherMode implementation notes | Table 29: AESSettingsCipherMode Implementation Notes | |||
stream copy: True (Section 8) | ||||
5.1.5. Cues Element | 5.1.5. Cues Element | |||
id / type: 0x1C53BB6B / master | id / type: 0x1C53BB6B / master | |||
path: \Segment\Cues | path: \Segment\Cues | |||
minOccurs / maxOccurs: see implementation notes / 1 | minOccurs / maxOccurs: see implementation notes / 1 | |||
definition: A Top-Level Element to speed seeking access. All | definition: A Top-Level Element to speed seeking access. All | |||
entries are local to the Segment. | entries are local to the Segment. | |||
notes: See Table 30. | ||||
notes: | ||||
+===========+====================================================+ | +===========+====================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+====================================================+ | +===========+====================================================+ | |||
| minOccurs | This Element SHOULD be set when the Segment is not | | | minOccurs | This Element SHOULD be set when the Segment is not | | |||
| | transmitted as a live stream; see Section 23.2. | | | | transmitted as a live stream; see Section 23.2. | | |||
+-----------+----------------------------------------------------+ | +-----------+----------------------------------------------------+ | |||
Table 30: Cues implementation notes | Table 30: Cues Implementation Notes | |||
5.1.5.1. CuePoint Element | 5.1.5.1. CuePoint Element | |||
id / type: 0xBB / master | id / type: 0xBB / master | |||
path: \Segment\Cues\CuePoint | path: \Segment\Cues\CuePoint | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Contains all information relative to a seek point in the | definition: Contains all information relative to a seek point in the | |||
Segment. | Segment. | |||
5.1.5.1.1. CueTime Element | 5.1.5.1.1. CueTime Element | |||
skipping to change at page 68, line 10 ¶ | skipping to change at line 2957 ¶ | |||
path: \Segment\Cues\CuePoint\CueTime | path: \Segment\Cues\CuePoint\CueTime | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Absolute timestamp of the seek point, expressed in | definition: Absolute timestamp of the seek point, expressed in | |||
Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. | Matroska Ticks -- i.e., in nanoseconds; see Section 11.1. | |||
5.1.5.1.2. CueTrackPositions Element | 5.1.5.1.2. CueTrackPositions Element | |||
id / type: 0xB7 / master | id / type: 0xB7 / master | |||
path: \Segment\Cues\CuePoint\CueTrackPositions | path: \Segment\Cues\CuePoint\CueTrackPositions | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Contain positions for different tracks corresponding to | definition: Contains positions for different tracks corresponding to | |||
the timestamp. | the timestamp. | |||
5.1.5.1.2.1. CueTrack Element | 5.1.5.1.2.1. CueTrack Element | |||
id / type: 0xF7 / uinteger | id / type: 0xF7 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Cues\CuePoint\CueTrackPositions\CueTrack | path: \Segment\Cues\CuePoint\CueTrackPositions\CueTrack | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The track for which a position is given. | definition: The track for which a position is given. | |||
skipping to change at page 68, line 45 ¶ | skipping to change at line 2992 ¶ | |||
definition: The relative position inside the Cluster of the | definition: The relative position inside the Cluster of the | |||
referenced SimpleBlock or BlockGroup with 0 being the first | referenced SimpleBlock or BlockGroup with 0 being the first | |||
possible position for an Element inside that Cluster. | possible position for an Element inside that Cluster. | |||
5.1.5.1.2.4. CueDuration Element | 5.1.5.1.2.4. CueDuration Element | |||
id / type: 0xB2 / uinteger | id / type: 0xB2 / uinteger | |||
path: \Segment\Cues\CuePoint\CueTrackPositions\CueDuration | path: \Segment\Cues\CuePoint\CueTrackPositions\CueDuration | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The duration of the block, expressed in Segment Ticks | definition: The duration of the block, expressed in Segment Ticks, | |||
which is based on TimestampScale; see Section 11.1. If missing, | which are based on TimestampScale; see Section 11.1. If missing, | |||
the track's DefaultDuration does not apply and no duration | the track's DefaultDuration does not apply and no duration | |||
information is available in terms of the cues. | information is available in terms of the cues. | |||
5.1.5.1.2.5. CueBlockNumber Element | 5.1.5.1.2.5. CueBlockNumber Element | |||
id / type: 0x5378 / uinteger | id / type: 0x5378 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber | path: \Segment\Cues\CuePoint\CueTrackPositions\CueBlockNumber | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Number of the Block in the specified Cluster. | definition: Number of the Block in the specified Cluster. | |||
skipping to change at page 69, line 41 ¶ | skipping to change at line 3037 ¶ | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
minver: 2 | minver: 2 | |||
definition: Timestamp of the referenced Block, expressed in Matroska | definition: Timestamp of the referenced Block, expressed in Matroska | |||
Ticks -- i.e., in nanoseconds; see Section 11.1. | Ticks -- i.e., in nanoseconds; see Section 11.1. | |||
5.1.6. Attachments Element | 5.1.6. Attachments Element | |||
id / type: 0x1941A469 / master | id / type: 0x1941A469 / master | |||
path: \Segment\Attachments | path: \Segment\Attachments | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Contain attached files. | definition: Contains attached files. | |||
5.1.6.1. AttachedFile Element | 5.1.6.1. AttachedFile Element | |||
id / type: 0x61A7 / master | id / type: 0x61A7 / master | |||
path: \Segment\Attachments\AttachedFile | path: \Segment\Attachments\AttachedFile | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: An attached file. | definition: An attached file. | |||
5.1.6.1.1. FileDescription Element | 5.1.6.1.1. FileDescription Element | |||
skipping to change at page 70, line 24 ¶ | skipping to change at line 3065 ¶ | |||
id / type: 0x466E / utf-8 | id / type: 0x466E / utf-8 | |||
path: \Segment\Attachments\AttachedFile\FileName | path: \Segment\Attachments\AttachedFile\FileName | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Filename of the attached file. | definition: Filename of the attached file. | |||
5.1.6.1.3. FileMediaType Element | 5.1.6.1.3. FileMediaType Element | |||
id / type: 0x4660 / string | id / type: 0x4660 / string | |||
path: \Segment\Attachments\AttachedFile\FileMediaType | path: \Segment\Attachments\AttachedFile\FileMediaType | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Media type of the file following the [RFC6838] format. | definition: Media type of the file following the format described in | |||
[RFC6838]. | ||||
stream copy: True (Section 8) | stream copy: True (Section 8) | |||
5.1.6.1.4. FileData Element | 5.1.6.1.4. FileData Element | |||
id / type: 0x465C / binary | id / type: 0x465C / binary | |||
path: \Segment\Attachments\AttachedFile\FileData | path: \Segment\Attachments\AttachedFile\FileData | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The data of the file. | definition: The data of the file. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.6.1.5. FileUID Element | 5.1.6.1.5. FileUID Element | |||
id / type: 0x46AE / uinteger | id / type: 0x46AE / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Attachments\AttachedFile\FileUID | path: \Segment\Attachments\AttachedFile\FileUID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Unique ID representing the file, as random as possible. | definition: UID representing the file, as random as possible. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.7. Chapters Element | 5.1.7. Chapters Element | |||
id / type: 0x1043A770 / master | id / type: 0x1043A770 / master | |||
path: \Segment\Chapters | path: \Segment\Chapters | |||
maxOccurs: 1 | maxOccurs: 1 | |||
recurring: True | recurring: True | |||
definition: A system to define basic menus and partition data. For | definition: A system to define basic menus and partition data. For | |||
more detailed information, look at the Chapters explanation in | more detailed information, see Section 20. | |||
Section 20. | ||||
5.1.7.1. EditionEntry Element | 5.1.7.1. EditionEntry Element | |||
id / type: 0x45B9 / master | id / type: 0x45B9 / master | |||
path: \Segment\Chapters\EditionEntry | path: \Segment\Chapters\EditionEntry | |||
minOccurs: 1 | minOccurs: 1 | |||
definition: Contains all information about a Segment edition. | definition: Contains all information about a Segment edition. | |||
5.1.7.1.1. EditionUID Element | 5.1.7.1.1. EditionUID Element | |||
id / type: 0x45BC / uinteger | id / type: 0x45BC / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Chapters\EditionEntry\EditionUID | path: \Segment\Chapters\EditionEntry\EditionUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: A unique ID to identify the edition. It's useful for | definition: A UID to identify the edition. It's useful for tagging | |||
tagging an edition. | an edition. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.7.1.2. EditionFlagDefault Element | 5.1.7.1.2. EditionFlagDefault Element | |||
id / type / default: 0x45DB / uinteger / 0 | id / type / default: 0x45DB / uinteger / 0 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Chapters\EditionEntry\EditionFlagDefault | path: \Segment\Chapters\EditionEntry\EditionFlagDefault | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Set to 1 if the edition SHOULD be used as the default | definition: Set to 1 if the edition SHOULD be used as the default | |||
one. | one. | |||
skipping to change at page 72, line 4 ¶ | skipping to change at line 3135 ¶ | |||
path: \Segment\Chapters\EditionEntry\EditionFlagOrdered | path: \Segment\Chapters\EditionEntry\EditionFlagOrdered | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Set to 1 if the chapters can be defined multiple times | definition: Set to 1 if the chapters can be defined multiple times | |||
and the order to play them is enforced; see Section 20.1.3. | and the order to play them is enforced; see Section 20.1.3. | |||
5.1.7.1.4. ChapterAtom Element | 5.1.7.1.4. ChapterAtom Element | |||
id / type: 0xB6 / master | id / type: 0xB6 / master | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom | path: \Segment\Chapters\EditionEntry\+ChapterAtom | |||
minOccurs: 1 | minOccurs: 1 | |||
recursive: True | recursive: True | |||
definition: Contains the atom information to use as the chapter atom | definition: Contains the atom information to use as the chapter atom | |||
(apply to all tracks). | (applies to all tracks). | |||
5.1.7.1.4.1. ChapterUID Element | 5.1.7.1.4.1. ChapterUID Element | |||
id / type: 0x73C4 / uinteger | id / type: 0x73C4 / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterUID | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterUID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A unique ID to identify the Chapter. | definition: A UID to identify the Chapter. | |||
stream copy: True (Section 8) | ||||
stream copy: True (Section 8) | ||||
5.1.7.1.4.2. ChapterStringUID Element | 5.1.7.1.4.2. ChapterStringUID Element | |||
id / type: 0x5654 / utf-8 | id / type: 0x5654 / utf-8 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterStringUID | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterStringUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 3 | minver: 3 | |||
definition: A unique string ID to identify the Chapter. For example | definition: A unique string ID to identify the Chapter. For | |||
it is used as the storage for [WebVTT] cue identifier values. | example, it is used as the storage for cue identifier values | |||
[WebVTT]. | ||||
5.1.7.1.4.3. ChapterTimeStart Element | 5.1.7.1.4.3. ChapterTimeStart Element | |||
id / type: 0x91 / uinteger | id / type: 0x91 / uinteger | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeStart | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeStart | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Timestamp of the start of Chapter, expressed in Matroska | definition: Timestamp of the start of Chapter, expressed in Matroska | |||
Ticks -- i.e., in nanoseconds; see Section 11.1. | Ticks -- i.e., in nanoseconds; see Section 11.1. | |||
5.1.7.1.4.4. ChapterTimeEnd Element | 5.1.7.1.4.4. ChapterTimeEnd Element | |||
id / type: 0x92 / uinteger | id / type: 0x92 / uinteger | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTimeEnd | |||
minOccurs / maxOccurs: see implementation notes / 1 | minOccurs / maxOccurs: see implementation notes / 1 | |||
definition: Timestamp of the end of Chapter timestamp excluded, | definition: Timestamp of the end of Chapter timestamp excluded, | |||
expressed in Matroska Ticks -- i.e., in nanoseconds; see | expressed in Matroska Ticks -- i.e., in nanoseconds; see | |||
Section 11.1. The value MUST be greater than or equal to the | Section 11.1. The value MUST be greater than or equal to the | |||
ChapterTimeStart of the same ChapterAtom. | ChapterTimeStart of the same ChapterAtom. | |||
usage notes: The ChapterTimeEnd timestamp value being excluded, it | usage notes: With the ChapterTimeEnd timestamp value being excluded, | |||
MUST take in account the duration of the last frame it includes, | it MUST take into account the duration of the last frame it | |||
especially for the ChapterAtom using the last frames of the | includes, especially for the ChapterAtom using the last frames of | |||
Segment. | the Segment. | |||
notes: See Table 31. | ||||
notes: | ||||
+===========+====================================================+ | +===========+====================================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+====================================================+ | +===========+====================================================+ | |||
| minOccurs | ChapterTimeEnd MUST be set (minOccurs=1) if the | | | minOccurs | ChapterTimeEnd MUST be set (minOccurs=1) if the | | |||
| | Edition is an ordered edition; see Section 20.1.3, | | | | Edition is an ordered edition; see Section 20.1.3. | | |||
| | unless it's a Parent Chapter; see Section 20.2.3 | | | | If it's a Parent Chapter, see Section 20.2.3. | | |||
+-----------+----------------------------------------------------+ | +-----------+----------------------------------------------------+ | |||
Table 31: ChapterTimeEnd implementation notes | Table 31: ChapterTimeEnd Implementation Notes | |||
5.1.7.1.4.5. ChapterFlagHidden Element | 5.1.7.1.4.5. ChapterFlagHidden Element | |||
id / type / default: 0x98 / uinteger / 0 | id / type / default: 0x98 / uinteger / 0 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagHidden | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Set to 1 if a chapter is hidden. Hidden chapters SHOULD | definition: Set to 1 if a chapter is hidden. Hidden chapters SHOULD | |||
NOT be available to the user interface (but still to Control | NOT be available to the user interface (but still to Control | |||
Tracks; see Section 20.2.5 on Chapter flags). | Tracks; see Section 20.2.5 on Chapter flags). | |||
skipping to change at page 73, line 35 ¶ | skipping to change at line 3211 ¶ | |||
5.1.7.1.4.6. ChapterSegmentUUID Element | 5.1.7.1.4.6. ChapterSegmentUUID Element | |||
id / type: 0x6E67 / binary | id / type: 0x6E67 / binary | |||
length: 16 | length: 16 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentUUID | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentUUID | |||
minOccurs / maxOccurs: see implementation notes / 1 | minOccurs / maxOccurs: see implementation notes / 1 | |||
definition: The SegmentUUID of another Segment to play during this | definition: The SegmentUUID of another Segment to play during this | |||
chapter. | chapter. | |||
usage notes: The value MUST NOT be the SegmentUUID value of the | usage notes: The value MUST NOT be the SegmentUUID value of the | |||
Segment it belongs to. | Segment it belongs to. | |||
notes: See Table 32. | ||||
notes: | ||||
+===========+==============================================+ | +===========+==============================================+ | |||
| attribute | note | | | attribute | note | | |||
+===========+==============================================+ | +===========+==============================================+ | |||
| minOccurs | ChapterSegmentUUID MUST be set (minOccurs=1) | | | minOccurs | ChapterSegmentUUID MUST be set (minOccurs=1) | | |||
| | if ChapterSegmentEditionUID is used; see | | | | if ChapterSegmentEditionUID is used; see | | |||
| | Section 17.2 on medium-linking Segments. | | | | Section 17.2 on Medium-Linking Segments. | | |||
+-----------+----------------------------------------------+ | +-----------+----------------------------------------------+ | |||
Table 32: ChapterSegmentUUID implementation notes | Table 32: ChapterSegmentUUID Implementation Notes | |||
5.1.7.1.4.7. ChapterSegmentEditionUID Element | 5.1.7.1.4.7. ChapterSegmentEditionUID Element | |||
id / type: 0x6EBC / uinteger | id / type: 0x6EBC / uinteger | |||
range: not 0 | range: not 0 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentEdit | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterSegmentEdit | |||
ionUID | ionUID | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: The EditionUID to play from the Segment linked in | definition: The EditionUID to play from the Segment linked in | |||
ChapterSegmentUUID. If ChapterSegmentEditionUID is undeclared, | ChapterSegmentUUID. If ChapterSegmentEditionUID is undeclared, | |||
then no Edition of the linked Segment is used; see Section 17.2 on | then no Edition of the linked Segment is used; see Section 17.2 on | |||
medium-linking Segments. | Medium-Linking Segments. | |||
5.1.7.1.4.8. ChapterPhysicalEquiv Element | 5.1.7.1.4.8. ChapterPhysicalEquiv Element | |||
id / type: 0x63C3 / uinteger | id / type: 0x63C3 / uinteger | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterPhysicalEqu | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterPhysicalEqu | |||
iv | iv | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Specify the physical equivalent of this ChapterAtom like | definition: Specifies the physical equivalent of this ChapterAtom, | |||
"DVD" (60) or "SIDE" (50); see Section 20.4 for a complete list of | e.g., "DVD" (60) or "SIDE" (50); see Section 20.4 for a complete | |||
values. | list of values. | |||
5.1.7.1.4.9. ChapterDisplay Element | 5.1.7.1.4.9. ChapterDisplay Element | |||
id / type: 0x80 / master | id / type: 0x80 / master | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay | |||
definition: Contains all possible strings to use for the chapter | definition: Contains all possible strings to use for the chapter | |||
display. | display. | |||
5.1.7.1.4.10. ChapString Element | 5.1.7.1.4.10. ChapString Element | |||
skipping to change at page 75, line 4 ¶ | skipping to change at line 3276 ¶ | |||
definition: A language corresponding to the string, in the Matroska | definition: A language corresponding to the string, in the Matroska | |||
languages form; see Section 12 on language codes. This Element | languages form; see Section 12 on language codes. This Element | |||
MUST be ignored if a ChapLanguageBCP47 Element is used within the | MUST be ignored if a ChapLanguageBCP47 Element is used within the | |||
same ChapterDisplay Element. | same ChapterDisplay Element. | |||
5.1.7.1.4.12. ChapLanguageBCP47 Element | 5.1.7.1.4.12. ChapLanguageBCP47 Element | |||
id / type: 0x437D / string | id / type: 0x437D / string | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha | |||
pLanguageBCP47 | pLanguageBCP47 | |||
minver: 4 | minver: 4 | |||
definition: A language corresponding to the ChapString, in the | definition: A language corresponding to the ChapString, in the form | |||
[BCP47] form; see Section 12 on language codes. If a | defined in [BCP47]; see Section 12 on language codes. If a | |||
ChapLanguageBCP47 Element is used, then any ChapLanguage and | ChapLanguageBCP47 Element is used, then any ChapLanguage and | |||
ChapCountry Elements used in the same ChapterDisplay MUST be | ChapCountry Elements used in the same ChapterDisplay MUST be | |||
ignored. | ignored. | |||
5.1.7.1.4.13. ChapCountry Element | 5.1.7.1.4.13. ChapCountry Element | |||
id / type: 0x437E / string | id / type: 0x437E / string | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterDisplay\Cha | |||
pCountry | pCountry | |||
definition: A country corresponding to the string, in the Matroska | definition: A country corresponding to the string, in the Matroska | |||
skipping to change at page 75, line 34 ¶ | skipping to change at line 3305 ¶ | |||
id / type: 0x6944 / master | id / type: 0x6944 / master | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess | |||
definition: Contains all the commands associated to the Atom. | definition: Contains all the commands associated to the Atom. | |||
5.1.7.1.4.15. ChapProcessCodecID Element | 5.1.7.1.4.15. ChapProcessCodecID Element | |||
id / type / default: 0x6955 / uinteger / 0 | id / type / default: 0x6955 / uinteger / 0 | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | |||
ocessCodecID | ocessCodecID | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Contains the type of the codec used for the processing. | definition: Contains the type of the codec used for processing. A | |||
A value of 0 means built-in Matroska processing (to be defined), a | value of 0 means built-in Matroska processing (to be defined), and | |||
value of 1 means the DVD command set is used; see Section 20.3 on | a value of 1 means the DVD command set is used; see Section 20.3 | |||
DVD menus. More codec IDs can be added later. | on DVD menus. More codec IDs can be added later. | |||
5.1.7.1.4.16. ChapProcessPrivate Element | 5.1.7.1.4.16. ChapProcessPrivate Element | |||
id / type: 0x450D / binary | id / type: 0x450D / binary | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | |||
ocessPrivate | ocessPrivate | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: Some optional data attached to the ChapProcessCodecID | definition: Optional data attached to the ChapProcessCodecID | |||
information. For ChapProcessCodecID = 1, it is the "DVD level" | information. For ChapProcessCodecID = 1, it is the "DVD level" | |||
equivalent; see Section 20.3 on DVD menus. | equivalent; see Section 20.3 on DVD menus. | |||
5.1.7.1.4.17. ChapProcessCommand Element | 5.1.7.1.4.17. ChapProcessCommand Element | |||
id / type: 0x6911 / master | id / type: 0x6911 / master | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | |||
ocessCommand | ocessCommand | |||
definition: Contains all the commands associated to the Atom. | definition: Contains all the commands associated with the Atom. | |||
5.1.7.1.4.18. ChapProcessTime Element | 5.1.7.1.4.18. ChapProcessTime Element | |||
id / type: 0x6922 / uinteger | id / type: 0x6922 / uinteger | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | |||
ocessCommand\ChapProcessTime | ocessCommand\ChapProcessTime | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Defines when the process command SHOULD be handled | definition: Defines when the process command SHOULD be handled. | |||
restrictions: See Table 33. | ||||
restrictions: | ||||
+=======+===============================+ | +=======+===============================+ | |||
| value | label | | | value | label | | |||
+=======+===============================+ | +=======+===============================+ | |||
| 0 | during the whole chapter | | | 0 | during the whole chapter | | |||
+-------+-------------------------------+ | +-------+-------------------------------+ | |||
| 1 | before starting playback | | | 1 | before starting playback | | |||
+-------+-------------------------------+ | +-------+-------------------------------+ | |||
| 2 | after playback of the chapter | | | 2 | after playback of the chapter | | |||
+-------+-------------------------------+ | +-------+-------------------------------+ | |||
Table 33: ChapProcessTime values | Table 33: ChapProcessTime Values | |||
5.1.7.1.4.19. ChapProcessData Element | 5.1.7.1.4.19. ChapProcessData Element | |||
id / type: 0x6933 / binary | id / type: 0x6933 / binary | |||
path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapProcess\ChapPr | |||
ocessCommand\ChapProcessData | ocessCommand\ChapProcessData | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Contains the command information. The data SHOULD be | definition: Contains the command information. The data SHOULD be | |||
interpreted depending on the ChapProcessCodecID value. For | interpreted depending on the ChapProcessCodecID value. For | |||
ChapProcessCodecID = 1, the data correspond to the binary DVD cell | ChapProcessCodecID = 1, the data correspond to the binary DVD cell | |||
skipping to change at page 77, line 22 ¶ | skipping to change at line 3389 ¶ | |||
definition: Specifies which other elements the metadata represented | definition: Specifies which other elements the metadata represented | |||
by the Tag applies to. If empty or omitted, then the Tag | by the Tag applies to. If empty or omitted, then the Tag | |||
describes everything in the Segment. | describes everything in the Segment. | |||
5.1.8.1.1.1. TargetTypeValue Element | 5.1.8.1.1.1. TargetTypeValue Element | |||
id / type / default: 0x68CA / uinteger / 50 | id / type / default: 0x68CA / uinteger / 50 | |||
path: \Segment\Tags\Tag\Targets\TargetTypeValue | path: \Segment\Tags\Tag\Targets\TargetTypeValue | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A number to indicate the logical level of the target. | definition: A number to indicate the logical level of the target. | |||
defined values: See Table 34. | ||||
defined values: | +=======+==========================+================================+ | |||
| value | label | definition | | ||||
+=======+===================+=================================+ | +=======+==========================+================================+ | |||
| value | label | definition | | | 70 | COLLECTION | The highest hierarchical level | | |||
+=======+===================+=================================+ | | | | that tags can describe. | | |||
| 70 | COLLECTION | The highest hierarchical level | | +-------+--------------------------+--------------------------------+ | |||
| | | that tags can describe. | | | 60 | EDITION / ISSUE / | A list of lower levels grouped | | |||
+-------+-------------------+---------------------------------+ | | | VOLUME / OPUS / | together. | | |||
| 60 | EDITION / ISSUE / | A list of lower levels grouped | | | | SEASON / SEQUEL | | | |||
| | VOLUME / OPUS / | together. | | +-------+--------------------------+--------------------------------+ | |||
| | SEASON / SEQUEL | | | | 50 | ALBUM / OPERA / | The most common grouping level | | |||
+-------+-------------------+---------------------------------+ | | | CONCERT / MOVIE / | of music and video (e.g., an | | |||
| 50 | ALBUM / OPERA / | The most common grouping level | | | | EPISODE | episode for TV series). | | |||
| | CONCERT / MOVIE / | of music and video (equals to | | +-------+--------------------------+--------------------------------+ | |||
| | EPISODE | an episode for TV series). | | | 40 | PART / SESSION | When an album or episode has | | |||
+-------+-------------------+---------------------------------+ | | | | different logical parts. | | |||
| 40 | PART / SESSION | When an album or episode has | | +-------+--------------------------+--------------------------------+ | |||
| | | different logical parts. | | | 30 | TRACK / SONG / | The common parts of an album | | |||
+-------+-------------------+---------------------------------+ | | | CHAPTER | or movie. | | |||
| 30 | TRACK / SONG / | The common parts of an album or | | +-------+--------------------------+--------------------------------+ | |||
| | CHAPTER | movie. | | | 20 | SUBTRACK / | Corresponds to parts of a | | |||
+-------+-------------------+---------------------------------+ | | | MOVEMENT / SCENE | track for audio, such as a | | |||
| 20 | SUBTRACK / | Corresponds to parts of a track | | | | | movement or scene in a movie. | | |||
| | MOVEMENT / SCENE | for audio like a movement, or a | | +-------+--------------------------+--------------------------------+ | |||
| | | scene in a movie. | | | 10 | SHOT | The lowest hierarchy found in | | |||
+-------+-------------------+---------------------------------+ | | | | music or movies. | | |||
| 10 | SHOT | The lowest hierarchy found in | | +-------+--------------------------+--------------------------------+ | |||
| | | music or movies. | | ||||
+-------+-------------------+---------------------------------+ | ||||
Table 34: TargetTypeValue values | Table 34: TargetTypeValue Values | |||
5.1.8.1.1.2. TargetType Element | 5.1.8.1.1.2. TargetType Element | |||
id / type: 0x63CA / string | id / type: 0x63CA / string | |||
path: \Segment\Tags\Tag\Targets\TargetType | path: \Segment\Tags\Tag\Targets\TargetType | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: An informational string that can be used to display the | definition: An informational string that can be used to display the | |||
logical level of the target like "ALBUM", "TRACK", "MOVIE", | logical level of the target, such as "ALBUM", "TRACK", "MOVIE", | |||
"CHAPTER", etc. | "CHAPTER", etc. | |||
restrictions: See Table 35. | ||||
restrictions: | ||||
+============+====================+ | +============+====================+ | |||
| value | label | | | value | label | | |||
+============+====================+ | +============+====================+ | |||
| COLLECTION | TargetTypeValue 70 | | | COLLECTION | TargetTypeValue 70 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| EDITION | TargetTypeValue 60 | | | EDITION | TargetTypeValue 60 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| ISSUE | TargetTypeValue 60 | | | ISSUE | TargetTypeValue 60 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
skipping to change at page 79, line 51 ¶ | skipping to change at line 3477 ¶ | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| SUBTRACK | TargetTypeValue 20 | | | SUBTRACK | TargetTypeValue 20 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| MOVEMENT | TargetTypeValue 20 | | | MOVEMENT | TargetTypeValue 20 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| SCENE | TargetTypeValue 20 | | | SCENE | TargetTypeValue 20 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
| SHOT | TargetTypeValue 10 | | | SHOT | TargetTypeValue 10 | | |||
+------------+--------------------+ | +------------+--------------------+ | |||
Table 35: TargetType values | Table 35: TargetType Values | |||
5.1.8.1.1.3. TagTrackUID Element | 5.1.8.1.1.3. TagTrackUID Element | |||
id / type / default: 0x63C5 / uinteger / 0 | id / type / default: 0x63C5 / uinteger / 0 | |||
path: \Segment\Tags\Tag\Targets\TagTrackUID | path: \Segment\Tags\Tag\Targets\TagTrackUID | |||
definition: A unique ID to identify the Track(s) the tags belong to. | definition: A UID to identify the Track(s) that the tags belong to. | |||
usage notes: If the value is 0 at this level, the tags apply to all | usage notes: If the value is 0 at this level, the tags apply to all | |||
tracks in the Segment. If set to any other value, it MUST match | tracks in the Segment. If set to any other value, it MUST match | |||
the TrackUID value of a track found in this Segment. | the TrackUID value of a track found in this Segment. | |||
5.1.8.1.1.4. TagEditionUID Element | 5.1.8.1.1.4. TagEditionUID Element | |||
id / type / default: 0x63C9 / uinteger / 0 | id / type / default: 0x63C9 / uinteger / 0 | |||
path: \Segment\Tags\Tag\Targets\TagEditionUID | path: \Segment\Tags\Tag\Targets\TagEditionUID | |||
definition: A unique ID to identify the EditionEntry(s) the tags | definition: A UID to identify the EditionEntry(s) that the tags | |||
belong to. | belong to. | |||
usage notes: If the value is 0 at this level, the tags apply to all | usage notes: If the value is 0 at this level, the tags apply to all | |||
editions in the Segment. If set to any other value, it MUST match | editions in the Segment. If set to any other value, it MUST match | |||
the EditionUID value of an edition found in this Segment. | the EditionUID value of an edition found in this Segment. | |||
5.1.8.1.1.5. TagChapterUID Element | 5.1.8.1.1.5. TagChapterUID Element | |||
id / type / default: 0x63C4 / uinteger / 0 | id / type / default: 0x63C4 / uinteger / 0 | |||
path: \Segment\Tags\Tag\Targets\TagChapterUID | path: \Segment\Tags\Tag\Targets\TagChapterUID | |||
definition: A unique ID to identify the Chapter(s) the tags belong | definition: A UID to identify the Chapter(s) that the tags belong | |||
to. | to. | |||
usage notes: If the value is 0 at this level, the tags apply to all | usage notes: If the value is 0 at this level, the tags apply to all | |||
chapters in the Segment. If set to any other value, it MUST match | chapters in the Segment. If set to any other value, it MUST match | |||
the ChapterUID value of a chapter found in this Segment. | the ChapterUID value of a chapter found in this Segment. | |||
5.1.8.1.1.6. TagAttachmentUID Element | 5.1.8.1.1.6. TagAttachmentUID Element | |||
id / type / default: 0x63C6 / uinteger / 0 | id / type / default: 0x63C6 / uinteger / 0 | |||
path: \Segment\Tags\Tag\Targets\TagAttachmentUID | path: \Segment\Tags\Tag\Targets\TagAttachmentUID | |||
definition: A unique ID to identify the Attachment(s) the tags | definition: A UID to identify the Attachment(s) that the tags belong | |||
belong to. | to. | |||
usage notes: If the value is 0 at this level, the tags apply to all | usage notes: If the value is 0 at this level, the tags apply to all | |||
the attachments in the Segment. If set to any other value, it | the attachments in the Segment. If set to any other value, it | |||
MUST match the FileUID value of an attachment found in this | MUST match the FileUID value of an attachment found in this | |||
Segment. | Segment. | |||
5.1.8.1.2. SimpleTag Element | 5.1.8.1.2. SimpleTag Element | |||
id / type: 0x67C8 / master | id / type: 0x67C8 / master | |||
path: \Segment\Tags\Tag\+SimpleTag | path: \Segment\Tags\Tag\+SimpleTag | |||
minOccurs: 1 | minOccurs: 1 | |||
recursive: True | ||||
recursive: True | ||||
definition: Contains general information about the target. | definition: Contains general information about the target. | |||
5.1.8.1.2.1. TagName Element | 5.1.8.1.2.1. TagName Element | |||
id / type: 0x45A3 / utf-8 | id / type: 0x45A3 / utf-8 | |||
path: \Segment\Tags\Tag\+SimpleTag\TagName | path: \Segment\Tags\Tag\+SimpleTag\TagName | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: The name of the Tag that is going to be stored. | definition: The name of the Tag that is going to be stored. | |||
5.1.8.1.2.2. TagLanguage Element | 5.1.8.1.2.2. TagLanguage Element | |||
id / type / default: 0x447A / string / und | id / type / default: 0x447A / string / und | |||
path: \Segment\Tags\Tag\+SimpleTag\TagLanguage | path: \Segment\Tags\Tag\+SimpleTag\TagLanguage | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: Specifies the language of the tag specified, in the | definition: Specifies the language of the specified tag in the | |||
Matroska languages form; see Section 12 on language codes. This | Matroska languages form; see Section 12 on language codes. This | |||
Element MUST be ignored if the TagLanguageBCP47 Element is used | Element MUST be ignored if the TagLanguageBCP47 Element is used | |||
within the same SimpleTag Element. | within the same SimpleTag Element. | |||
5.1.8.1.2.3. TagLanguageBCP47 Element | 5.1.8.1.2.3. TagLanguageBCP47 Element | |||
id / type: 0x447B / string | id / type: 0x447B / string | |||
path: \Segment\Tags\Tag\+SimpleTag\TagLanguageBCP47 | path: \Segment\Tags\Tag\+SimpleTag\TagLanguageBCP47 | |||
maxOccurs: 1 | maxOccurs: 1 | |||
minver: 4 | minver: 4 | |||
definition: The language used in the TagString, in the [BCP47] form; | definition: The language used in the TagString, in the form defined | |||
see Section 12 on language codes. If this Element is used, then | in [BCP47]; see Section 12 on language codes. If this Element is | |||
any TagLanguage Elements used in the same SimpleTag MUST be | used, then any TagLanguage Elements used in the same SimpleTag | |||
ignored. | MUST be ignored. | |||
5.1.8.1.2.4. TagDefault Element | 5.1.8.1.2.4. TagDefault Element | |||
id / type / default: 0x4484 / uinteger / 1 | id / type / default: 0x4484 / uinteger / 1 | |||
range: 0-1 | range: 0-1 | |||
path: \Segment\Tags\Tag\+SimpleTag\TagDefault | path: \Segment\Tags\Tag\+SimpleTag\TagDefault | |||
minOccurs / maxOccurs: 1 / 1 | minOccurs / maxOccurs: 1 / 1 | |||
definition: A boolean value to indicate if this is the default/ | definition: A boolean value to indicate if this is the default/ | |||
original language to use for the given tag. | original language to use for the given tag. | |||
skipping to change at page 82, line 10 ¶ | skipping to change at line 3576 ¶ | |||
id / type: 0x4487 / utf-8 | id / type: 0x4487 / utf-8 | |||
path: \Segment\Tags\Tag\+SimpleTag\TagString | path: \Segment\Tags\Tag\+SimpleTag\TagString | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: The value of the Tag. | definition: The value of the Tag. | |||
5.1.8.1.2.6. TagBinary Element | 5.1.8.1.2.6. TagBinary Element | |||
id / type: 0x4485 / binary | id / type: 0x4485 / binary | |||
path: \Segment\Tags\Tag\+SimpleTag\TagBinary | path: \Segment\Tags\Tag\+SimpleTag\TagBinary | |||
maxOccurs: 1 | maxOccurs: 1 | |||
definition: The values of the Tag, if it is binary. Note that this | definition: The values of the Tag if it is binary. Note that this | |||
cannot be used in the same SimpleTag as TagString. | cannot be used in the same SimpleTag as TagString. | |||
6. Matroska Element Ordering | 6. Matroska Element Ordering | |||
Except for the EBML Header and the CRC-32 Element, the EBML | With the exceptions of the EBML Header and the CRC-32 Element, the | |||
specification does not require any particular storage order for | EBML specification [RFC8794] does not require any particular storage | |||
Elements. This specification however defines mandates and | order for Elements. However, this specification defines mandates and | |||
recommendations for ordering certain Elements in order to facilitate | recommendations for ordering certain Elements to facilitate better | |||
better playback, seeking, and editing efficiency. This section | playback, seeking, and editing efficiency. This section describes | |||
describes and offers rationale for ordering requirements and | and offers rationale for ordering requirements and recommendations | |||
recommendations for Matroska. | for Matroska. | |||
6.1. Top-Level Elements | 6.1. Top-Level Elements | |||
The Info Element is the only REQUIRED Top-Level Element in a Matroska | The Info Element is the only REQUIRED Top-Level Element in a Matroska | |||
file. To be playable, Matroska MUST also contain at least one Tracks | file. To be playable, Matroska MUST also contain at least one Tracks | |||
Element and Cluster Element. The first Info Element and the first | Element and Cluster Element. The first Info Element and the first | |||
Tracks Element MUST either be stored before the first Cluster Element | Tracks Element either MUST be stored before the first Cluster Element | |||
or both SHALL be referenced by a SeekHead Element occurring before | or SHALL both be referenced by a SeekHead Element occurring before | |||
the first Cluster Element. | the first Cluster Element. | |||
All Top-Level Elements MUST use a 4-octet long EBML Element ID. | All Top-Level Elements MUST use a 4-octet EBML Element ID. | |||
When using Medium Linking, chapters are used to reference other | When using Medium Linking, chapters are used to reference other | |||
Segments to play in a given order Section 17.2. A Segment containing | Segments to play in a given order (see Section 17.2). A Segment | |||
these linked Chapters does not require a Track Element or a Cluster | containing these Linked Chapters does not require a Track Element or | |||
Element. | a Cluster Element. | |||
It is possible to edit a Matroska file after it has been created. | It is possible to edit a Matroska file after it has been created. | |||
For example, chapters, tags, or attachments can be added. When new | For example, chapters, tags, or attachments can be added. When new | |||
Top-Level Elements are added to a Matroska file, the SeekHead | Top-Level Elements are added to a Matroska file, the SeekHead | |||
Element(s) MUST be updated so that the SeekHead Element(s) itemize | Element(s) MUST be updated so that the SeekHead Element(s) itemizes | |||
the identity and position of all Top-Level Elements. | the identity and position of all Top-Level Elements. | |||
Editing, removing, or adding Elements to a Matroska file often | Editing, removing, or adding Elements to a Matroska file often | |||
requires that some existing Elements be voided or extended. | requires that some existing Elements be voided or extended. | |||
Transforming the existing Elements into Void Elements as padding can | Transforming the existing Elements into Void Elements as padding can | |||
be used as a method to avoid moving large amounts of data around. | be used as a method to avoid moving large amounts of data around. | |||
6.2. CRC-32 | 6.2. CRC-32 | |||
As noted by the EBML specification, if a CRC-32 Element is used, then | As noted by the EBML specification [RFC8794], if a CRC-32 Element is | |||
the CRC-32 Element MUST be the first ordered Element within its | used, then the CRC-32 Element MUST be the first ordered Element | |||
Parent Element. | within its Parent Element. | |||
In Matroska all Top-Level Elements of an EBML Document SHOULD include | In Matroska, all Top-Level Elements of an EBML Document SHOULD | |||
a CRC-32 Element as their first Child Element. The Segment Element, | include a CRC-32 Element as their first Child Element. The Segment | |||
which is the Root Element, SHOULD NOT have a CRC-32 Element. | Element, which is the Root Element, SHOULD NOT have a CRC-32 Element. | |||
6.3. SeekHead | 6.3. SeekHead | |||
If used, the first SeekHead Element MUST be the first non-CRC-32 | If used, the first SeekHead Element MUST be the first non-CRC-32 | |||
Child Element of the Segment Element. If a second SeekHead Element | Child Element of the Segment Element. If a second SeekHead Element | |||
is used, then the first SeekHead Element MUST reference the identity | is used, then the first SeekHead Element MUST reference the identity | |||
and position of the second SeekHead. | and position of the second SeekHead Element. | |||
Additionally, the second SeekHead Element MUST only reference Cluster | Additionally, the second SeekHead Element MUST only reference Cluster | |||
Elements and not any other Top-Level Element already contained within | Elements and not any other Top-Level Element already contained within | |||
the first SeekHead Element. | the first SeekHead Element. | |||
The second SeekHead Element MAY be stored in any order relative to | The second SeekHead Element MAY be stored in any order relative to | |||
the other Top-Level Elements. Whether one or two SeekHead Element(s) | the other Top-Level Elements. Whether one or two SeekHead Elements | |||
are used, the SeekHead Element(s) MUST collectively reference the | are used, the SeekHead Element(s) MUST collectively reference the | |||
identity and position of all Top-Level Elements except for the first | identity and position of all Top-Level Elements except for the first | |||
SeekHead Element. | SeekHead Element. | |||
6.4. Cues (index) | 6.4. Cues (Index) | |||
The Cues Element is RECOMMENDED to optimize seeking access in | The Cues Element is RECOMMENDED to optimize seeking access in | |||
Matroska. It is programmatically simpler to add the Cues Element | Matroska. It is programmatically simpler to add the Cues Element | |||
after all Cluster Elements have been written because this does not | after all Cluster Elements have been written because this does not | |||
require a prediction of how much space to reserve before writing the | require a prediction of how much space to reserve before writing the | |||
Cluster Elements. However, storing the Cues Element before the | Cluster Elements. However, storing the Cues Element before the | |||
Cluster Elements can provide some seeking advantages. If the Cues | Cluster Elements can provide some seeking advantages. If the Cues | |||
Element is present, then it SHOULD either be stored before the first | Element is present, then it SHOULD either be stored before the first | |||
Cluster Element or be referenced by a SeekHead Element. | Cluster Element or be referenced by a SeekHead Element. | |||
skipping to change at page 84, line 11 ¶ | skipping to change at line 3666 ¶ | |||
The first Info Element SHOULD occur before the first Tracks Element | The first Info Element SHOULD occur before the first Tracks Element | |||
and first Cluster Element except when referenced by a SeekHead | and first Cluster Element except when referenced by a SeekHead | |||
Element. | Element. | |||
6.6. Chapters Element | 6.6. Chapters Element | |||
The Chapters Element SHOULD be placed before the Cluster Element(s). | The Chapters Element SHOULD be placed before the Cluster Element(s). | |||
The Chapters Element can be used during playback even if the user | The Chapters Element can be used during playback even if the user | |||
does not need to seek. It immediately gives the user information | does not need to seek. It immediately gives the user information | |||
about what section is being read and what other sections are | about what section is being read and what other sections are | |||
available. In the case of Ordered Chapters it is RECOMMENDED to | available. In the case of Ordered Chapters, it is RECOMMENDED to | |||
evaluate the logical linking even before playing. The Chapters | evaluate the logical linking before playing. The Chapters Element | |||
Element SHOULD be placed before the first Tracks Element and after | SHOULD be placed before the first Tracks Element and after the first | |||
the first Info Element. | Info Element. | |||
6.7. Attachments | 6.7. Attachments | |||
The Attachments Element is not intended to be used by default when | The Attachments Element is not intended to be used by default when | |||
playing the file, but could contain information relevant to the | playing the file but could contain information relevant to the | |||
content, such as cover art or fonts. Cover art is useful even before | content, such as cover art or fonts. Cover art is useful even before | |||
the file is played and fonts could be needed before playback starts | the file is played, and fonts could be needed before playback starts | |||
for initialization of subtitles. The Attachments Element MAY be | for the initialization of subtitles. The Attachments Element MAY be | |||
placed before the first Cluster Element; however, if the Attachments | placed before the first Cluster Element; however, if the Attachments | |||
Element is likely to be edited, then it SHOULD be placed after the | Element is likely to be edited, then it SHOULD be placed after the | |||
last Cluster Element. | last Cluster Element. | |||
6.8. Tags | 6.8. Tags | |||
The Tags Element is most subject to changes after the file was | The Tags Element is most subject to changes after the file was | |||
originally created. For easier editing, the Tags Element can be | originally created. For easier editing, the Tags Element can be | |||
placed at the end of the Segment Element, even after the Attachments | placed at the end of the Segment Element, even after the Attachments | |||
Element. On the other hand, it is inconvenient to have to seek in | Element. On the other hand, it is inconvenient to have to seek in | |||
the Segment for tags, especially for network streams. So it's better | the Segment for tags, especially for network streams; thus, it's | |||
if the Tags Element is found early in the stream. When editing the | better if the Tags Element is found early in the stream. When | |||
Tags Element, the original Tags Element at the beginning can be | editing the Tags Element, the original Tags Element at the beginning | |||
overwritten with a Void Element and a new Tags Element written at the | can be overwritten with a Void Element and a new Tags Element written | |||
end of the Segment Element. The file and Segment sizes will only | at the end of the Segment Element. The file and Segment sizes will | |||
marginally change. | only marginally change. | |||
7. Matroska versioning | 7. Matroska Versioning | |||
Matroska is based upon the principle that a reading application does | Matroska is based on the principle that a reading application does | |||
not have to support 100% of the specifications in order to be able to | not have to support 100% of the specifications in order to be able to | |||
play the file. A Matroska file therefore contains version indicators | play the file. Therefore, a Matroska file contains version | |||
that tell a reading application what to expect. | indicators that tell a reading application what to expect. | |||
It is possible and valid to have the version fields indicate that the | It is possible and valid to have the version fields indicate that the | |||
file contains Matroska Elements from a higher specification version | file contains Matroska Elements from a higher specification version | |||
number while signaling that a reading application MUST only support a | number while signaling that a reading application MUST only support a | |||
lower version number properly in order to play it back (possibly with | lower version number properly in order to play it back (possibly with | |||
a reduced feature set). | a reduced feature set). | |||
The EBML Header of each Matroska document informs the reading | The EBML Header of each Matroska document informs the reading | |||
application on what version of Matroska to expect. The Elements | application on what version of Matroska to expect. The Elements | |||
within EBML Header with jurisdiction over this information are | within the EBML Header with jurisdiction over this information are | |||
DocTypeVersion and DocTypeReadVersion. | DocTypeVersion and DocTypeReadVersion. | |||
DocTypeVersion MUST be equal to or greater than the highest Matroska | DocTypeVersion MUST be equal to or greater than the highest Matroska | |||
version number of any Element present in the Matroska file. For | version number of any Element present in the Matroska file. For | |||
example, a file using the SimpleBlock Element (Section 5.1.3.4) MUST | example, a file using the SimpleBlock Element (Section 5.1.3.4) MUST | |||
have a DocTypeVersion equal to or greater than 2. A file containing | have a DocTypeVersion equal to or greater than 2. A file containing | |||
CueRelativePosition Elements (Section 5.1.5.1.2.3) MUST have a | CueRelativePosition Elements (Section 5.1.5.1.2.3) MUST have a | |||
DocTypeVersion equal to or greater than 4. | DocTypeVersion equal to or greater than 4. | |||
The DocTypeReadVersion MUST contain the minimum version number that a | The DocTypeReadVersion MUST contain the minimum version number that a | |||
reading application can minimally support in order to play the file | reading application can minimally support in order to play the file | |||
back -- optionally with a reduced feature set. For example, if a | back -- optionally with a reduced feature set. For example, if a | |||
file contains only Elements of version 2 or lower except for | file contains only Elements of version 2 or lower except for | |||
CueRelativePosition (which is a version 4 Matroska Element), then | CueRelativePosition (which is a version 4 Matroska Element), then | |||
DocTypeReadVersion SHOULD still be set to 2 and not 4 because | DocTypeReadVersion SHOULD still be set to 2 and not 4 because | |||
evaluating CueRelativePosition is not necessary for standard playback | evaluating CueRelativePosition is not necessary for standard playback | |||
-- it makes seeking more precise if used. | -- it makes seeking more precise if used. | |||
A reading application supporting Matroska version V MUST NOT refuse | A reading application supporting Matroska version V MUST NOT refuse | |||
to read a file with DocReadTypeVersion equal to or lower than V even | to read a file with DocReadTypeVersion equal to or lower than V, even | |||
if DocTypeVersion is greater than V. | if DocTypeVersion is greater than V. | |||
A reading application supporting at least Matroska version V reading | A reading application supporting at least Matroska version V and | |||
a file whose DocTypeReadVersion field is equal to or lower than V | reading a file whose DocTypeReadVersion field is equal to or lower | |||
MUST skip Matroska/EBML Elements it encounters but does not know | than V MUST skip Matroska/EBML Elements it encounters but does not | |||
about if that unknown element fits into the size constraints set by | know about if that unknown element fits into the size constraints set | |||
the current Parent Element. | by the current Parent Element. | |||
8. Stream Copy | 8. Stream Copy | |||
It is sometimes necessary to create a Matroska file from another | It is sometimes necessary to create a Matroska file from another | |||
Matroska file, for example to add subtitles in a language or to edit | Matroska file, for example, to add subtitles in a language or to edit | |||
out a portion of the content. Some values from the original Matroska | out a portion of the content. Some values from the original Matroska | |||
file need to be kept the same in the destination file. For example, | file need to be kept the same in the destination file. For example, | |||
the SamplingFrequency of an audio track wouldn't change between the | the SamplingFrequency of an audio track wouldn't change between the | |||
two files. Some other values may change between the two files, for | two files. Some other values may change between the two files, for | |||
example the TrackNumber of an audio track when another track has been | example, the TrackNumber of an audio track when another track has | |||
added. | been added. | |||
An Element is marked with a property: stream copy: True when the | An Element is marked with a property: stream copy: True when the | |||
values of that Element need to be kept identical between the source | values of that Element need to be kept identical between the source | |||
and destination file. If that property is not set, elements may or | and destination files. If that property is not set, elements may or | |||
may not keep the same value between the source and destination. | may not keep the same value between the source and destination files. | |||
9. DefaultDecodedFieldDuration | 9. DefaultDecodedFieldDuration | |||
The DefaultDecodedFieldDuration Element can signal to the displaying | The DefaultDecodedFieldDuration Element can signal to the displaying | |||
application how often fields of a video sequence will be available | application how often fields of a video sequence will be available | |||
for displaying. It can be used for both interlaced and progressive | for displaying. It can be used for both interlaced and progressive | |||
content. | content. | |||
If the video sequence is signaled as interlaced Section 5.1.4.1.28.1, | If the video sequence is signaled as interlaced | |||
then DefaultDecodedFieldDuration equals the period between two | (Section 5.1.4.1.28.1), then DefaultDecodedFieldDuration equals the | |||
successive fields at the output of the decoding process. For video | period between two successive fields at the output of the decoding | |||
sequences signaled as progressive, DefaultDecodedFieldDuration is | process. For video sequences signaled as progressive, | |||
half of the period between two successive frames at the output of the | DefaultDecodedFieldDuration is half of the period between two | |||
decoding process. | successive frames at the output of the decoding process. | |||
These values are valid at the end of the decoding process before | These values are valid at the end of the decoding process before | |||
post-processing (such as deinterlacing or inverse telecine) is | post-processing (such as deinterlacing or inverse telecine) is | |||
applied. | applied. | |||
Examples: | Examples: | |||
* Blu-ray movie: 1000000000 ns/(48/1.001) = 20854167 ns | * Blu-ray movie: 1000000000 ns/(48/1.001) = 20854167 ns | |||
* PAL broadcast/DVD: 1000000000 ns/(50/1.000) = 20000000 ns | * PAL broadcast/DVD: 1000000000 ns/(50/1.000) = 20000000 ns | |||
* N/ATSC broadcast: 1000000000 ns/(60/1.001) = 16683333 ns | * N/ATSC broadcast: 1000000000 ns/(60/1.001) = 16683333 ns | |||
* hard-telecined DVD: 1000000000 ns/(60/1.001) = 16683333 ns (60 | ||||
* Hard-telecined DVD: 1000000000 ns/(60/1.001) = 16683333 ns (60 | ||||
encoded interlaced fields per second) | encoded interlaced fields per second) | |||
* soft-telecined DVD: 1000000000 ns/(60/1.001) = 16683333 ns (48 | ||||
* Soft-telecined DVD: 1000000000 ns/(60/1.001) = 16683333 ns (48 | ||||
encoded interlaced fields per second, with "repeat_first_field = | encoded interlaced fields per second, with "repeat_first_field = | |||
1") | 1") | |||
10. Cluster Blocks | 10. Cluster Blocks | |||
Frames using references SHOULD be stored in "coding order". That | Frames using references SHOULD be stored in "coding order" (i.e., the | |||
means the references first, and then the frames referencing them. A | references first and then the frames referencing them). A | |||
consequence is that timestamps might not be consecutive. But a frame | consequence is that timestamps might not be consecutive. However, a | |||
with a past timestamp MUST reference a frame already known, otherwise | frame with a past timestamp MUST reference a frame already known; | |||
it's considered bad/void. | otherwise, it is considered bad/void. | |||
Matroska has two similar ways to store frames in a block: | Matroska has two similar ways to store frames in a block: | |||
* in a Block which is contained inside a BlockGroup, | * in a Block that is contained inside a BlockGroup | |||
* or in a SimpleBlock which is directly in the Cluster. | ||||
* in a SimpleBlock that is directly in the Cluster | ||||
The SimpleBlock is usually preferred unless some extra elements of | The SimpleBlock is usually preferred unless some extra elements of | |||
the BlockGroup need to be used. A Matroska Reader MUST support both | the BlockGroup need to be used. A Matroska Reader MUST support both | |||
types of blocks. | types of blocks. | |||
Each block contains the same parts in the following order: | Each block contains the same parts in the following order: | |||
* a variable length header, | * a variable-length header | |||
* optionally the lacing information, | ||||
* the lacing information (optional) | ||||
* the consecutive frame(s) | * the consecutive frame(s) | |||
The block header starts with the number of the Track it corresponds | The block header starts with the number of the Track it corresponds | |||
to. The value MUST corresponding to the TrackNumber | to. The value MUST correspond to the TrackNumber (Section 5.1.4.1.1) | |||
(Section 5.1.4.1.1) of a TrackEntry of the Segment. | of a TrackEntry of the Segment. | |||
The TrackNumber is coded using the VINT mechanism described in | The TrackNumber is coded using the Variable-Size Integer (VINT) | |||
Section 4 of [RFC8794]. To save space, the shortest VINT form SHOULD | mechanism described in Section 4 of [RFC8794]. To save space, the | |||
be used. The value can be coded on up to 8 octets. This is the only | shortest VINT form SHOULD be used. The value can be coded on up to 8 | |||
element with a variable size in the block header. | octets. This is the only element with a variable size in the block | |||
header. | ||||
The timestamp is expressed in Track Ticks; see Section 11.1. The | The timestamp is expressed in Track Ticks; see Section 11.1. The | |||
value is stored as a signed value on 16 bits. | value is stored as a signed value on 16 bits. | |||
10.1. Block Structure | 10.1. Block Structure | |||
This section describes the binary data contained in the Block Element | This section describes the binary data contained in the Block Element | |||
Section 5.1.3.5.1. Bit 0 is the most significant bit. | (Section 5.1.3.5.1). Bit 0 is the most significant bit. | |||
As the TrackNumber size can vary between 1 and 8 octets, there are 8 | As the TrackNumber size can vary between 1 and 8 octets, there are 8 | |||
different sizes for the Block header. We only provide the | different sizes for the Block header. The definitions for | |||
definitions for TrackNumber sizes of 1 and 2. The other variants can | TrackNumber sizes of 1 and 2 are provided; the other variants can be | |||
be deduced by extending the size of the TrackNumber by multiples of 8 | deduced by extending the size of the TrackNumber by multiples of 8 | |||
bits. | bits. | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | | |I|LAC|U| | | | | |I|LAC|U| | |||
| Track Number | Timestamp | Rsvrd |N|ING|N| | | Track Number | Timestamp | Rsvrd |N|ING|N| | |||
| | | |V| |U| | | | | |V| |U| | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Figure 11: Block Header with 1 octet TrackNumber | Figure 11: Block Header with 1-Octet TrackNumber | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Track Number | Timestamp | | | Track Number | Timestamp | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| |I|LAC|U| | | |I|LAC|U| | |||
| Rsvrd |N|ING|N| ... | | Rsvrd |N|ING|N| ... | |||
| |V| |U| | | |V| |U| | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Figure 12: Block Header with 2 octets TrackNumber | Figure 12: Block Header with 2-Octet TrackNumber | |||
where: | where: | |||
Track Number: 8, 16, 24, 32, 40, 48 or 64 bits | Track Number: 8, 16, 24, 32, 40, 48, or 64 bits. An EBML VINT-coded | |||
an EBML VINT coded track number | track number. | |||
Timestamp: 16 bits | Timestamp: 16 bits. Signed timestamp in Track Ticks. | |||
signed timestamp in Track Ticks | ||||
Rsvrd: 4 bits | Rsvrd: 4 bits. Reserved bits MUST be set to 0. | |||
Reserved bits MUST be set to 0 | ||||
INV: 1 bit | INV: 1 bit. Invisible. The codec SHOULD decode this frame but not | |||
Invisible, the codec SHOULD decode this frame but not display it | display it. | |||
LACING: 2 bits | LACING: 2 bits. Uses lacing mode. | |||
using lacing mode | ||||
* 00b : no lacing (Section 10.3.1) | 00b: no lacing (Section 10.3.1) | |||
* 01b : Xiph lacing (Section 10.3.2) | 01b: Xiph lacing (Section 10.3.2) | |||
* 11b : EBML lacing (Section 10.3.3) | 11b: EBML lacing (Section 10.3.3) | |||
* 10b : fixed-size lacing (Section 10.3.4) | 10b: fixed-size lacing (Section 10.3.4) | |||
UNU: 1 bit | UNU: 1 bit. Unused bit. | |||
unused bit | ||||
The following data in the Block correspond to the lacing data and | The following data in the Block corresponds to the lacing data and | |||
frames usage as described in each respective lacing mode. | frames usage as described in each respective lacing mode. | |||
10.2. SimpleBlock Structure | 10.2. SimpleBlock Structure | |||
This section describes the binary data contained in the SimpleBlock | This section describes the binary data contained in the SimpleBlock | |||
Element Section 5.1.3.4. Bit 0 is the most significant bit. | Element (Section 5.1.3.4). Bit 0 is the most significant bit. | |||
The SimpleBlock is inspired by the Block structure; see Section 10.1. | The SimpleBlock structure is inspired by the Block structure; see | |||
The main differences are the added Keyframe flag and Discardable | Section 10.1. The main differences are the added Keyframe flag and | |||
flag. Otherwise, everything is the same. | Discardable flag. Otherwise, everything is the same. | |||
As the TrackNumber size can vary between 1 and 8 octets, there are 8 | As the TrackNumber size can vary between 1 and 8 octets, there are 8 | |||
different sizes for the SimpleBlock header. We only provide the | different sizes for the SimpleBlock header. The definitions for | |||
definitions for TrackNumber sizes of 1 and 2. The other variants can | TrackNumber sizes of 1 and 2 are provided; the other variants can be | |||
be deduced by extending the size of the TrackNumber by multiples of 8 | deduced by extending the size of the TrackNumber by multiples of 8 | |||
bits. | bits. | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | |K| |I|LAC|D| | | | |K| |I|LAC|D| | |||
| Track Number | Timestamp |E|Rsvrd|N|ING|I| | | Track Number | Timestamp |E|Rsvrd|N|ING|I| | |||
| | |Y| |V| |S| | | | |Y| |V| |S| | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Figure 13: SimpleBlock Header with 1 octet TrackNumber | Figure 13: SimpleBlock Header with 1-Octet TrackNumber | |||
0 1 2 3 | 0 1 2 3 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
| Track Number | Timestamp | | | Track Number | Timestamp | | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
|K| |I|LAC|D| | |K| |I|LAC|D| | |||
|E|Rsvrd|N|ING|I| ... | |E|Rsvrd|N|ING|I| ... | |||
|Y| |V| |S| | |Y| |V| |S| | |||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |||
Figure 14: SimpleBlock Header with 2 octets TrackNumber | Figure 14: SimpleBlock Header with 2-Octet TrackNumber | |||
where: | where: | |||
Track Number: 8, 16, 24, 32, 40, 48 or 64 bits | Track Number: 8, 16, 24, 32, 40, 48, or 64 bits. An EBML VINT-coded | |||
an EBML VINT coded track number | track number. | |||
Timestamp: 16 bits | Timestamp: 16 bits. Signed timestamp in Track Ticks. | |||
signed timestamp in Track Ticks | ||||
KEY: 1 bit | KEY: 1 bit. Keyframe. Set when the Block contains only keyframes. | |||
Keyframe, set when the Block contains only keyframes | ||||
Rsvrd: 3 bits | Rsvrd: 3 bits. Reserved bits MUST be set to 0. | |||
Reserved bits MUST be set to 0 | ||||
INV: 1 bit | INV: 1 bit. Invisible. The codec SHOULD decode this frame but not | |||
Invisible, the codec SHOULD decode this frame but not display it | display it. | |||
LACING: 2 bits | LACING: 2 bits. Uses lacing mode. | |||
using lacing mode | ||||
* 00b : no lacing (Section 10.3.1) | 00b: no lacing (Section 10.3.1) | |||
* 01b : Xiph lacing (Section 10.3.2) | 01b: Xiph lacing (Section 10.3.2) | |||
* 11b : EBML lacing (Section 10.3.3) | 11b: EBML lacing (Section 10.3.3) | |||
* 10b : fixed-size lacing (Section 10.3.4) | 10b: fixed-size lacing (Section 10.3.4) | |||
DIS: 1 bit | DIS: 1 bit. Discardable. The frames of the Block can be discarded | |||
Discardable, the frames of the Block can be discarded during | during playing if needed. | |||
playing if needed | ||||
The following data in the SimpleBlock correspond to the lacing data | The following data in the SimpleBlock corresponds to the lacing data | |||
and frames usage as described in each respective lacing mode. | and frames usage as described in each respective lacing mode. | |||
10.3. Block Lacing | 10.3. Block Lacing | |||
Lacing is a mechanism to save space when storing data. It is | Lacing is a mechanism to save space when storing data. It is | |||
typically used for small blocks of data (referred to as frames in | typically used for small blocks of data (referred to as frames in | |||
Matroska). It packs multiple frames into a single Block or | Matroska). It packs multiple frames into a single Block or | |||
SimpleBlock. | SimpleBlock. | |||
Lacing MUST NOT be used to store a single frame in a Block or | Lacing MUST NOT be used to store a single frame in a Block or | |||
SimpleBlock. | SimpleBlock. | |||
There are 3 types of lacing: | There are three types of lacing: | |||
1. Xiph, inspired by what is found in the Ogg container [RFC3533] | * Xiph, which is inspired by what is found in the Ogg container | |||
2. EBML, which is the same with sizes coded differently | [RFC3533] | |||
3. fixed-size, where the size is not coded | ||||
When lacing is not used, i.e. to store a single frame, the lacing | * EBML, which is the same with sizes coded differently | |||
bits 5 and 6 of the Block or SimpleBlock MUST be set to zero. | ||||
For example, a user wants to store 3 frames of the same track. The | * Fixed-size, where the size is not coded | |||
first frame is 800 octets long, the second is 500 octets long and the | ||||
third is 1000 octets long. As these data are small, they can be | ||||
stored in a lace to save space. | ||||
It is possible not to use lacing at all and just store a single frame | When lacing is not used, i.e., to store a single frame, lacing bits 5 | |||
without any extra data. When the FlagLacing -- Section 5.1.4.1.12 -- | and 6 of the Block or SimpleBlock MUST be set to 0. | |||
is set to "0" all blocks of that track MUST NOT use lacing. | ||||
10.3.1. No lacing | For example, a user wants to store three frames of the same track. | |||
The first frame is 800 octets long, the second is 500 octets long, | ||||
and the third is 1000 octets long. Because these frames are small, | ||||
they can be stored in a lace to save space. | ||||
When no lacing is used, the number of frames in the lace is ommitted | It is possible to not use lacing at all and just store a single frame | |||
and only one frame can be stored in the Block. The bits 5-6 of the | without any extra data. When the FlagLacing (Section 5.1.4.1.12) is | |||
set to 0, all blocks of that track MUST NOT use lacing. | ||||
10.3.1. No Lacing | ||||
When no lacing is used, the number of frames in the lace is ommitted, | ||||
and only one frame can be stored in the Block. Bits 5 and 6 of the | ||||
Block Header flags are set to 0b00. | Block Header flags are set to 0b00. | |||
The Block for an 800 octets frame is as follows: | The Block for an 800-octet frame is as follows: | |||
+==============+=========+===================+ | +=============+=========+===================+ | |||
| Block Octets | Value | Description | | | Block Octet | Value | Description | | |||
+==============+=========+===================+ | +=============+=========+===================+ | |||
| 4-803 | <frame> | Single frame data | | | 4-803 | <frame> | Single frame data | | |||
+--------------+---------+-------------------+ | +-------------+---------+-------------------+ | |||
Table 36: No lacing | Table 36: No Lacing | |||
When a Block contains a single frame, it MUST use this No lacing | When a Block contains a single frame, it MUST use this "no lacing" | |||
mode. | mode. | |||
10.3.2. Xiph lacing | 10.3.2. Xiph Lacing | |||
The Xiph lacing uses the same coding of size as found in the Ogg | The Xiph lacing uses the same coding of size as found in the Ogg | |||
container [RFC3533]. The bits 5-6 of the Block Header flags are set | container [RFC3533]. Bits 5 and 6 of the Block Header flags are set | |||
to 0b01. | to 0b01. | |||
The Block data with laced frames is stored as follows: | The Block data with laced frames is stored as follows: | |||
* Lacing Head on 1 Octet: Number of frames in the lace minus 1. | * Lacing Head on 1 octet: Number of frames in the lace minus 1. | |||
* Lacing size of each frame except the last one. | * Lacing size of each frame except the last one. | |||
* Binary data of each frame consecutively. | * Binary data of each frame consecutively. | |||
The lacing size is split into 255 values, stored as unsigned octets | The lacing size is split into 255 values, stored as unsigned octets | |||
-- for example, 500 is coded 255;245 or [0xFF 0xF5]. A frame with a | -- for example, 500 is coded 255;245 or [0xFF 0xF5]. A frame with a | |||
size multiple of 255 is coded with a 0 at the end of the size -- for | size multiple of 255 is coded with a 0 at the end of the size -- for | |||
example, 765 is coded 255;255;255;0 or [0xFF 0xFF 0xFF 0x00]. | example, 765 is coded 255;255;255;0 or [0xFF 0xFF 0xFF 0x00]. | |||
The size of the last frame is deduced from the size remaining in the | The size of the last frame is deduced from the size remaining in the | |||
Block after the other frames. | Block after the other frames. | |||
Because large sizes result in large coding of the sizes, it is | Because large sizes result in large coding of the sizes, it is | |||
RECOMMENDED to use Xiph lacing only with small frames. | RECOMMENDED to use Xiph lacing only with small frames. | |||
In our example, the 800, 500 and 1000 frames are stored with Xiph | In our example, the 800-, 500-, and 1000-octet frames are stored with | |||
lacing in a Block as follows: | Xiph lacing in a Block as follows: | |||
+=============+=====================+==========================+ | +==============+=====================+==========================+ | |||
| Block Octet | Value | Description | | | Block Octets | Value | Description | | |||
+=============+=====================+==========================+ | +==============+=====================+==========================+ | |||
| 4 | 0x02 | Number of frames minus 1 | | | 4 | 0x02 | Number of frames minus 1 | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
| 5-8 | 0xFF 0xFF 0xFF 0x23 | Size of the first frame | | | 5-8 | 0xFF 0xFF 0xFF 0x23 | Size of the first frame | | |||
| | | (255;255;255;35) | | | | | (255;255;255;35) | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
| 9-10 | 0xFF 0xF5 | Size of the second frame | | | 9-10 | 0xFF 0xF5 | Size of the second frame | | |||
| | | (255;245) | | | | | (255;245) | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
| 11-810 | | First frame data | | | 11-810 | | First frame data | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
| 811-1310 | | Second frame data | | | 811-1310 | | Second frame data | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
| 1311-2310 | | Third frame data | | | 1311-2310 | | Third frame data | | |||
+-------------+---------------------+--------------------------+ | +--------------+---------------------+--------------------------+ | |||
Table 37: Xiph lacing example | Table 37: Xiph Lacing Example | |||
The Block is 2311 octets large and the last frame starts at 1311, so | The Block is 2311 octets, and the last frame starts at 1311, so we | |||
we can deduce the size of the last frame is 2311 - 1311 = 1000. | can deduce that the size of the last frame is 2311 - 1311 = 1000. | |||
10.3.3. EBML lacing | 10.3.3. EBML Lacing | |||
The EBML lacing encodes the frame size with an EBML-like encoding | The EBML lacing encodes the frame size with an EBML-like encoding | |||
[RFC8794]. The bits 5-6 of the Block Header flags are set to 0b11. | [RFC8794]. Bits 5 and 6 of the Block Header flags are set to 0b11. | |||
The Block data with laced frames is stored as follows: | The Block data with laced frames is stored as follows: | |||
* Lacing Head on 1 Octet: Number of frames in the lace minus 1. | * Lacing Head on 1 Octet: Number of frames in the lace minus 1. | |||
* Lacing size of each frame except the last one. | * Lacing size of each frame except the last one. | |||
* Binary data of each frame consecutively. | * Binary data of each frame consecutively. | |||
The first frame size is encoded as an EBML Variable-Size Integer | The first frame size is encoded as an EBML VINT value. The remaining | |||
value, also known as VINT in [RFC8794]. The remaining frame sizes | frame sizes are encoded as signed values using the difference between | |||
are encoded as signed values using the difference between the frame | the frame size and the previous frame size. These signed values are | |||
size and the previous frame size. These signed values are encoded as | encoded as VINT, with a mapping from signed to unsigned numbers. | |||
VINT, with a mapping from signed to unsigned numbers. Decoding the | Decoding the unsigned number stored in the VINT to a signed number is | |||
unsigned number stored in the VINT to a signed number is done by | done by subtracting 2^((7*n)-1)-1, where n is the octet size of the | |||
subtracting 2^((7*n)-1)-1, where n is the octet size of the VINT. | VINT. | |||
+===================================+======================+ | +===================================+======================+ | |||
| Bit Representation of signed VINT | Possible Value Range | | | Bit Representation of Signed VINT | Possible Value Range | | |||
+===================================+======================+ | +===================================+======================+ | |||
| 1xxx xxxx | 2^7 values from | | | 1xxx xxxx | 2^7 values from | | |||
| | -(2^6-1) to 2^6 | | | | -(2^6-1) to 2^6 | | |||
+-----------------------------------+----------------------+ | +-----------------------------------+----------------------+ | |||
| 01xx xxxx xxxx xxxx | 2^14 values from | | | 01xx xxxx xxxx xxxx | 2^14 values from | | |||
| | -(2^13-1) to 2^13 | | | | -(2^13-1) to 2^13 | | |||
+-----------------------------------+----------------------+ | +-----------------------------------+----------------------+ | |||
| 001x xxxx xxxx xxxx xxxx xxxx | 2^21 values from | | | 001x xxxx xxxx xxxx xxxx xxxx | 2^21 values from | | |||
| | -(2^20-1) to 2^20 | | | | -(2^20-1) to 2^20 | | |||
+-----------------------------------+----------------------+ | +-----------------------------------+----------------------+ | |||
| 0001 xxxx xxxx xxxx xxxx xxxx | 2^28 values from | | | 0001 xxxx xxxx xxxx xxxx xxxx | 2^28 values from | | |||
| xxxx xxxx | -(2^27-1) to 2^27 | | | xxxx xxxx | -(2^27-1) to 2^27 | | |||
+-----------------------------------+----------------------+ | +-----------------------------------+----------------------+ | |||
| 0000 1xxx xxxx xxxx xxxx xxxx | 2^35 values from | | | 0000 1xxx xxxx xxxx xxxx xxxx | 2^35 values from | | |||
| xxxx xxxx xxxx xxxx | -(2^34-1) to 2^34 | | | xxxx xxxx xxxx xxxx | -(2^34-1) to 2^34 | | |||
+-----------------------------------+----------------------+ | +-----------------------------------+----------------------+ | |||
Table 38: EBML Lacing signed VINT bits usage | Table 38: EBML Lacing Signed VINT Bits Usage | |||
In our example, the 800, 500 and 1000 frames are stored with EBML | In our example, the 800-, 500- and 1000-octet frames are stored with | |||
lacing in a Block as follows: | EBML lacing in a Block as follows: | |||
+==============+===========+=====================================+ | +==============+===========+=====================================+ | |||
| Block Octets | Value | Description | | | Block Octets | Value | Description | | |||
+==============+===========+=====================================+ | +==============+===========+=====================================+ | |||
| 4 | 0x02 | Number of frames minus 1 | | | 4 | 0x02 | Number of frames minus 1 | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
| 5-6 | 0x43 0x20 | Size of the first frame (800 = | | | 5-6 | 0x43 0x20 | Size of the first frame (800 = | | |||
| | | 0x320 + 0x4000) | | | | | 0x320 + 0x4000) | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
| 7-8 | 0x5E 0xD3 | Size of the second frame (500 - 800 | | | 7-8 | 0x5E 0xD3 | Size of the second frame (500 - 800 | | |||
| | | = -300 = - 0x12C + 0x1FFF + 0x4000) | | | | | = -300 = - 0x12C + 0x1FFF + 0x4000) | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
| 8-807 | <frame1> | First frame data | | | 8-807 | <frame1> | First frame data | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
| 808-1307 | <frame2> | Second frame data | | | 808-1307 | <frame2> | Second frame data | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
| 1308-2307 | <frame3> | Third frame data | | | 1308-2307 | <frame3> | Third frame data | | |||
+--------------+-----------+-------------------------------------+ | +--------------+-----------+-------------------------------------+ | |||
Table 39: EBML lacing example | Table 39: EBML Lacing Example | |||
The Block is 2308 octets large and the last frame starts at 1308, so | The Block is 2308 octets, and the last frame starts at 1308, so we | |||
we can deduce the size of the last frame is 2308 - 1308 = 1000. | can deduce that the size of the last frame is 2308 - 1308 = 1000. | |||
10.3.4. Fixed-size lacing | 10.3.4. Fixed-size Lacing | |||
The Fixed-size lacing doesn't store the frame size, only the number | Fixed-size lacing doesn't store the frame size; rather, it only | |||
of frames in the lace. Each frame MUST have the same size. The | stores the number of frames in the lace. Each frame MUST have the | |||
frame size of each frame is deduced from the total size of the Block. | same size. The frame size of each frame is deduced from the total | |||
The bits 5-6 of the Block Header flags are set to 0b10. | size of the Block. Bits 5 and 6 of the Block Header flags are set to | |||
0b10. | ||||
The Block data with laced frames is stored as follows: | The Block data with laced frames is stored as follows: | |||
* Lacing Head on 1 Octet: Number of frames in the lace minus 1. | * Lacing Head on 1 Octet: Number of frames in the lace minus 1. | |||
* Binary data of each frame consecutively. | * Binary data of each frame consecutively. | |||
For example, for 3 frames of 800 octets each: | For example, for three frames that are 800 octets each: | |||
+==============+==========+==========================+ | +==============+==========+==========================+ | |||
| Block Octets | Value | Description | | | Block Octets | Value | Description | | |||
+==============+==========+==========================+ | +==============+==========+==========================+ | |||
| 4 | 0x02 | Number of frames minus 1 | | | 4 | 0x02 | Number of frames minus 1 | | |||
+--------------+----------+--------------------------+ | +--------------+----------+--------------------------+ | |||
| 5-804 | <frame1> | First frame data | | | 5-804 | <frame1> | First frame data | | |||
+--------------+----------+--------------------------+ | +--------------+----------+--------------------------+ | |||
| 805-1604 | <frame2> | Second frame data | | | 805-1604 | <frame2> | Second frame data | | |||
+--------------+----------+--------------------------+ | +--------------+----------+--------------------------+ | |||
| 1605-2404 | <frame3> | Third frame data | | | 1605-2404 | <frame3> | Third frame data | | |||
+--------------+----------+--------------------------+ | +--------------+----------+--------------------------+ | |||
Table 40: Fixed-size lacing example | Table 40: Fixed-Size Lacing Example | |||
This gives a Block of 2405 octets. When reading the Block we find | This gives a Block of 2405 octets. When reading the Block, we find | |||
that there are 3 frames (Octet 4). The data start at Octet 5, so the | that there are three frames (Octet 4). The data start at Octet 5, so | |||
size of each frame is (2405 - 5) / 3 = 800. | the size of each frame is (2405 - 5) / 3 = 800. | |||
10.3.5. Laced Frames Timestamp | 10.3.5. Laced Frames Timestamp | |||
A Block only contains a single timestamp value. But when lacing is | A Block only contains a single timestamp value. But when lacing is | |||
used, it contains more than one frame. Each frame originally has its | used, it contains more than one frame. Each frame originally has its | |||
own timestamp, or Presentation Timestamp (PTS). That timestamp | own timestamp, or Presentation Timestamp (PTS). That timestamp | |||
applies to the first frame in the lace. | applies to the first frame in the lace. | |||
In the lace, each frame after the first one has an underdetermined | In the lace, each frame after the first one has an underdetermined | |||
timestamp. But each of these frames MUST be contiguous -- i.e. the | timestamp. However, each of these frames MUST be contiguous -- i.e., | |||
decoded data MUST NOT contain any gap between them. If there is a | the decoded data MUST NOT contain any gap between them. If there is | |||
gap in the stream, the frames around the gap MUST NOT be in the same | a gap in the stream, the frames around the gap MUST NOT be in the | |||
Block. | same Block. | |||
Lacing is only useful for small contiguous data to save space. This | Lacing is only useful for small contiguous data to save space. This | |||
is usually the case for audio tracks and not the case for video -- | is usually the case for audio tracks and not the case for video | |||
which use a lot of data -- or subtitle tracks -- which have long | (which use a lot of data) or subtitle tracks (which have long gaps). | |||
gaps. For audio, there is usually a fixed output sampling frequency | For audio, there is usually a fixed output sampling frequency for the | |||
for the whole track. So the decoder should be able to recover the | whole track, so the decoder should be able to recover the timestamp | |||
timestamp of each sample, knowing each output sample is contiguous | of each sample, knowing each output sample is contiguous with a fixed | |||
with a fixed frequency. For subtitles this is usually not the case | frequency. For subtitles, this is usually not the case, so lacing | |||
so lacing SHOULD NOT be used. | SHOULD NOT be used. | |||
10.4. Random Access Points | 10.4. Random Access Points | |||
Random Access Points (RAP) are positions where the parser can seek to | Random Access Points (RAPs) are positions where the parser can seek | |||
and start playback without decoding of what was before. In Matroska | to and start playback without decoding what was before. In Matroska, | |||
BlockGroups and SimpleBlocks can be RAPs. To seek to these elements | BlockGroups and SimpleBlocks can be RAPs. To seek to these elements, | |||
it is still necessary to seek to the Cluster containing them, read | it is still necessary to seek to the Cluster containing them, read | |||
the Cluster Timestamp and start playback from the BlockGroup or | the Cluster Timestamp, and start playback from the BlockGroup or | |||
SimpleBlock that is a RAP. | SimpleBlock that is a RAP. | |||
Because a Matroska File is usually composed of multiple tracks | Because a Matroska File is usually composed of multiple tracks | |||
playing at the same time -- video, audio and subtitles -- to seek | playing at the same time -- video, audio, and subtitles -- to seek | |||
properly to a RAP, each selected track must be taken in account. | properly to a RAP, each selected track must be taken in account. | |||
Usually all audio and subtitle BlockGroup or SimpleBlock are RAP. | Usually, all audio and subtitle BlockGroups or SimpleBlocks are RAPs. | |||
They are independent of each other and can be played randomly. | They are independent of each other and can be played randomly. | |||
Video tracks on the other hand often use references to previous and | On the other hand, video tracks often use references to previous and | |||
future frames for better coding efficiency. Frames with such | future frames for better coding efficiency. Frames with such | |||
reference MUST either contain one or more ReferenceBlock Elements in | references MUST either contain one or more ReferenceBlock Elements in | |||
their BlockGroup or MUST be marked as non-keyframe in a SimpleBlock; | their BlockGroup or MUST be marked as non-keyframe in a SimpleBlock; | |||
see Section 10.2. | see Section 10.2. | |||
* BlockGroup with a frame that references another frame, with the | BlockGroup with a frame that references another frame, with the EBML | |||
EBML tree shown as XML: | tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- References a Block 40 Track Ticks before this one --> | <!-- References a Block 40 Track Ticks before this one --> | |||
<ReferenceBlock>-40</ReferenceBlock> | <ReferenceBlock>-40</ReferenceBlock> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
* SimpleBlock with a frame that references another frame, with the | SimpleBlock with a frame that references another frame, with the EBML | |||
EBML tree shown as XML: | tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<SimpleBlock/> (octet 3 bit 0 not set) | <SimpleBlock/> (octet 3 bit 0 not set) | |||
... | ... | |||
</Cluster> | </Cluster> | |||
Frames that are RAP -- i.e. they don't depend on other frames -- MUST | ||||
set the keyframe flag if they are in a SimpleBlock or their parent | ||||
BlockGroup MUST NOT contain a ReferenceBlock. | ||||
* BlockGroup with a frame that references no other frame, with the | Frames that are RAPs (i.e., frames that don't depend on other frames) | |||
EBML tree shown as XML: | MUST set the keyframe flag if they are in a SimpleBlock or their | |||
parent BlockGroup MUST NOT contain a ReferenceBlock. | ||||
BlockGroup with a frame that references no other frame, with the EBML | ||||
tree shown as XML: | ||||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- No ReferenceBlock allowed in this BlockGroup --> | <!-- No ReferenceBlock allowed in this BlockGroup --> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
* SimpleBlock with a frame that references no other frame, with the | SimpleBlock with a frame that references no other frame, with the | |||
EBML tree shown as XML: | EBML tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<SimpleBlock/> (octet 3 bit 0 set) | <SimpleBlock/> (octet 3 bit 0 set) | |||
... | ... | |||
</Cluster> | </Cluster> | |||
There may be cases where the use of BlockGroup is necessary, as the | There may be cases where the use of BlockGroup is necessary, as the | |||
frame may need a BlockDuration, BlockAdditions, CodecState or a | frame may need a BlockDuration, BlockAdditions, CodecState, or | |||
DiscardPadding element. For thoses cases a SimpleBlock MUST NOT be | DiscardPadding element. For thoses cases, a SimpleBlock MUST NOT be | |||
used, the reference information SHOULD be recovered for non-RAP | used; the reference information SHOULD be recovered for non-RAP | |||
frames. | frames. | |||
* SimpleBlock with a frame that references another frame, with the | SimpleBlock with a frame that references another frame, with the EBML | |||
EBML tree shown as XML: | tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<SimpleBlock/> (octet 3 bit 0 not set) | <SimpleBlock/> (octet 3 bit 0 not set) | |||
... | ... | |||
</Cluster> | </Cluster> | |||
* Same frame that references another frame put inside a BlockGroup | Same frame that references another frame put inside a BlockGroup to | |||
to add BlockDuration, with the EBML tree shown as XML: | add BlockDuration, with the EBML tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- ReferenceBlock value recovered based on the codec --> | <!-- ReferenceBlock value recovered based on the codec --> | |||
<ReferenceBlock>-40</ReferenceBlock> | <ReferenceBlock>-40</ReferenceBlock> | |||
<BlockDuration>20<BlockDuration> | <BlockDuration>20</BlockDuration> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
When a frame in a BlockGroup is not a RAP, the BlockGroup MUST | When a frame in a BlockGroup is not a RAP, the BlockGroup MUST | |||
contain at least a ReferenceBlock. The ReferenceBlocks MUST be used | contain at least a ReferenceBlock. The ReferenceBlocks MUST be used | |||
in one of the following ways: | in one of the following ways: | |||
* each reference frame listed as a ReferenceBlock, | * each reference frame listed as a ReferenceBlock, | |||
* some referenced frame listed as a ReferenceBlock, even if the | ||||
timestamp value is accurate, | ||||
* or one ReferenceBlock with the timestamp value "0" corresponding | ||||
to a self or unknown reference. | ||||
The lack of ReferenceBlock would mean such a frame is a RAP and | * some referenced frames listed as a ReferenceBlock, even if the | |||
timestamp value is accurate, or | ||||
* one ReferenceBlock with the timestamp value "0" corresponding to a | ||||
self or unknown reference. | ||||
The lack of ReferenceBlock would mean such a frame is a RAP, and | ||||
seeking on that frame that actually depends on other frames may | seeking on that frame that actually depends on other frames may | |||
create bogus output or even crash. | create a bogus output or even crash. | |||
* Same frame that references another frame put inside a BlockGroup | Same frame that references another frame put inside a BlockGroup, but | |||
but the reference could not be recovered, with the EBML tree shown | the reference could not be recovered, with the EBML tree shown as | |||
as XML: | XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- ReferenceBlock value not recovered from the codec --> | <!-- ReferenceBlock value not recovered from the codec --> | |||
<ReferenceBlock>0</ReferenceBlock> | <ReferenceBlock>0</ReferenceBlock> | |||
<BlockDuration>20<BlockDuration> | <BlockDuration>20</BlockDuration> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
* BlockGroup with a frame that references two other frames, with the | BlockGroup with a frame that references two other frames, with the | |||
EBML tree shown as XML: | EBML tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- References a Block 80 Track Ticks before this one --> | <!-- References a Block 80 Track Ticks before this one --> | |||
<ReferenceBlock>-80</ReferenceBlock> | <ReferenceBlock>-80</ReferenceBlock> | |||
<!-- References a Block 40 Track Ticks after this one --> | <!-- References a Block 40 Track Ticks after this one --> | |||
<ReferenceBlock>40</ReferenceBlock> | <ReferenceBlock>40</ReferenceBlock> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
Intra-only video frames, such as the ones found in AV1 or VP9, can be | Intra-only video frames, such as the ones found in AV1 or VP9, can be | |||
decoded without any other frame, but they don't reset the codec | decoded without any other frame, but they don't reset the codec | |||
state. So seeking to these frames is not possible as the next frames | state. Thus, seeking to these frames is not possible, as the next | |||
may need frames that are not known from this seeking point. Such | frames may need frames that are not known from this seeking point. | |||
intra-only frames MUST NOT be considered as keyframes so the keyframe | Such intra-only frames MUST NOT be considered as keyframes, so the | |||
flag MUST NOT be set in the SimpleBlock or a ReferenceBlock MUST be | keyframe flag MUST NOT be set in the SimpleBlock or a ReferenceBlock | |||
used to signify the frame is not a RAP. The timestamp value of the | MUST be used to signify the frame is not a RAP. The timestamp value | |||
ReferenceBlock MUST be "0", meaning it's referencing itself. | of the ReferenceBlock MUST be "0", meaning it's referencing itself. | |||
* Intra-only frame not an RAP, with the EBML tree shown as XML: | Intra-only frame not an RAP, with the EBML tree shown as XML: | |||
<Cluster> | <Cluster> | |||
<Timestamp>123456</Timestamp> | <Timestamp>123456</Timestamp> | |||
<BlockGroup> | <BlockGroup> | |||
<!-- References itself to mark it should not be used as RAP --> | <!-- References itself to mark it should not be used as RAP --> | |||
<ReferenceBlock>0</ReferenceBlock> | <ReferenceBlock>0</ReferenceBlock> | |||
<Block/> | <Block/> | |||
</BlockGroup> | </BlockGroup> | |||
... | ... | |||
</Cluster> | </Cluster> | |||
Because a video SimpleBlock has less references information than a | Because a video SimpleBlock has less information on references than a | |||
video BlockGroup, it is possible to remux a video track using | video BlockGroup, it is possible to remux a video track using | |||
BlockGroup into a SimpleBlock, as long as it doesn't use any other | BlockGroup into a SimpleBlock, as long as it doesn't use any other | |||
BlockGroup features than ReferenceBlock. | BlockGroup features than ReferenceBlock. | |||
11. Timestamps | 11. Timestamps | |||
Historically timestamps in Matroska were mistakenly called timecodes. | Historically, timestamps in Matroska were mistakenly called | |||
The Timestamp Element was called Timecode, the TimestampScale Element | timecodes. The Timestamp Element was called Timecode, the | |||
was called TimecodeScale, the TrackTimestampScale Element was called | TimestampScale Element was called TimecodeScale, the | |||
TrackTimecodeScale and the ReferenceTimestamp Element was called | TrackTimestampScale Element was called TrackTimecodeScale, and the | |||
ReferenceTimeCode. | ReferenceTimestamp Element was called ReferenceTimeCode. | |||
11.1. Timestamp Ticks | 11.1. Timestamp Ticks | |||
All timestamp values in Matroska are expressed in multiples of a | All timestamp values in Matroska are expressed in multiples of a | |||
tick. They are usually stored as integers. There are three types of | tick. They are usually stored as integers. There are three types of | |||
ticks possible: | ticks possible: Matroska Ticks, Segment Ticks, and Track Ticks. | |||
11.1.1. Matroska Ticks | 11.1.1. Matroska Ticks | |||
For such elements, the timestamp value is stored directly in | For such elements, the timestamp value is stored directly in | |||
nanoseconds. | nanoseconds. | |||
The elements storing values in Matroska Ticks/nanoseconds are: | The elements storing values in Matroska Ticks/nanoseconds are: | |||
* TrackEntry\DefaultDuration; defined in Section 5.1.4.1.13 | * TrackEntry\DefaultDuration; defined in Section 5.1.4.1.13 | |||
* TrackEntry\DefaultDecodedFieldDuration; defined in | * TrackEntry\DefaultDecodedFieldDuration; defined in | |||
Section 5.1.4.1.14 | Section 5.1.4.1.14 | |||
* TrackEntry\SeekPreRoll; defined in Section 5.1.4.1.26 | * TrackEntry\SeekPreRoll; defined in Section 5.1.4.1.26 | |||
* TrackEntry\CodecDelay; defined in Section 5.1.4.1.25 | * TrackEntry\CodecDelay; defined in Section 5.1.4.1.25 | |||
* BlockGroup\DiscardPadding; defined in Section 5.1.3.5.7 | * BlockGroup\DiscardPadding; defined in Section 5.1.3.5.7 | |||
* ChapterAtom\ChapterTimeStart; defined in Section 5.1.7.1.4.3 | * ChapterAtom\ChapterTimeStart; defined in Section 5.1.7.1.4.3 | |||
* ChapterAtom\ChapterTimeEnd; defined in Section 5.1.7.1.4.4 | * ChapterAtom\ChapterTimeEnd; defined in Section 5.1.7.1.4.4 | |||
* CuePoint\CueTime; defined in Section 5.1.5.1.1 | * CuePoint\CueTime; defined in Section 5.1.5.1.1 | |||
* CueReference\CueRefTime; defined in Section 5.1.5.1.1 | * CueReference\CueRefTime; defined in Section 5.1.5.1.1 | |||
11.1.2. Segment Ticks | 11.1.2. Segment Ticks | |||
Elements in Segment Ticks involve the use of the TimestampScale | Elements in Segment Ticks involve the use of the TimestampScale | |||
Element of the Segment to get the timestamp in nanoseconds of the | Element of the Segment to get the timestamp in nanoseconds of the | |||
element, with the following formula: | element, with the following formula: | |||
timestamp in nanosecond = element value * TimestampScale | timestamp in nanosecond = element value * TimestampScale | |||
This allows storing smaller integer values in the elements. | This allows for storage of smaller integer values in the elements. | |||
When using the default value of TimestampScale of "1,000,000", one | When using the default value of "1,000,000" for TimestampScale, one | |||
Segment Tick represents one millisecond. | Segment Tick represents one millisecond. | |||
The elements storing values in Segment Ticks are: | The elements storing values in Segment Ticks are: | |||
* Cluster\Timestamp; defined in Section 5.1.3.1 | * Cluster\Timestamp; defined in Section 5.1.3.1 | |||
* Info\Duration is stored as a floating-point but the same formula | ||||
* Info\Duration is stored as a floating-point, but the same formula | ||||
applies; defined in Section 5.1.2.10 | applies; defined in Section 5.1.2.10 | |||
* CuePoint\CueTrackPositions\CueDuration; defined in | * CuePoint\CueTrackPositions\CueDuration; defined in | |||
Section 5.1.5.1.2.4 | Section 5.1.5.1.2.4 | |||
11.1.3. Track Ticks | 11.1.3. Track Ticks | |||
Elements in Track Ticks involve the use of the TimestampScale Element | Elements in Track Ticks involve the use of the TimestampScale Element | |||
of the Segment and the TrackTimestampScale Element of the Track to | of the Segment and the TrackTimestampScale Element of the Track to | |||
get the timestamp in nanoseconds of the element, with the following | get the timestamp in nanoseconds of the element, with the following | |||
formula: | formula: | |||
timestamp in nanoseconds = | timestamp in nanoseconds = | |||
element value * TrackTimestampScale * TimestampScale | element value * TrackTimestampScale * TimestampScale | |||
This allows storing smaller integer values in the elements. The | This allows for storage of smaller integer values in the elements. | |||
resulting floating-point values of the timestamps are still expressed | The resulting floating-point values of the timestamps are still | |||
in nanoseconds. | expressed in nanoseconds. | |||
When using the default values for TimestampScale and | When using the default values of "1,000,000" for TimestampScale and | |||
TrackTimestampScale of "1,000,000" and of "1.0" respectively, one | "1.0" for TrackTimestampScale, one Track Tick represents one | |||
Track Tick represents one millisecond. | millisecond. | |||
The elements storing values in Track Ticks are: | The elements storing values in Track Ticks are: | |||
* Cluster\BlockGroup\Block and Cluster\SimpleBlock timestamps; | * Cluster\BlockGroup\Block and Cluster\SimpleBlock timestamps; | |||
detailed in Section 11.2 | detailed in Section 11.2 | |||
* Cluster\BlockGroup\BlockDuration; defined in Section 5.1.3.5.3 | * Cluster\BlockGroup\BlockDuration; defined in Section 5.1.3.5.3 | |||
* Cluster\BlockGroup\ReferenceBlock; defined in Section 5.1.3.5.5 | * Cluster\BlockGroup\ReferenceBlock; defined in Section 5.1.3.5.5 | |||
When the TrackTimestampScale is interpreted as "1.0", Track Ticks are | When the TrackTimestampScale is interpreted as "1.0", Track Ticks are | |||
equivalent to Segment Ticks and give an integer value in nanoseconds. | equivalent to Segment Ticks and give an integer value in nanoseconds. | |||
This is the most common case as TrackTimestampScale is usually | This is the most common case as TrackTimestampScale is usually | |||
omitted. | omitted. | |||
A value of TrackTimestampScale other than "1.0" MAY be used to scale | A value of TrackTimestampScale other than "1.0" MAY be used to scale | |||
the timestamps more in tune with each Track sampling frequency. For | the timestamps more in tune with each Track sampling frequency. For | |||
historical reasons, a lot of Matroska readers don't take the | historical reasons, a lot of Matroska Readers don't take the | |||
TrackTimestampScale value in account. So using a value other than | TrackTimestampScale value into account. Thus, using a value other | |||
"1.0" might not work in many places. | than "1.0" might not work in many places. | |||
11.2. Block Timestamps | 11.2. Block Timestamps | |||
A Block Element and SimpleBlock Element timestamp is the time when | A Block Element and SimpleBlock Element timestamp is the time when | |||
the decoded data of the first frame in the Block/SimpleBlock MUST be | the decoded data of the first frame in the Block/SimpleBlock MUST be | |||
presented, if the track of that Block/SimpleBlock is selected for | presented if the track of that Block/SimpleBlock is selected for | |||
playback. This is also known as the Presentation Timestamp (PTS). | playback. This is also known as the Presentation Timestamp (PTS). | |||
The Block Element and SimpleBlock Element store their timestamps as | The Block Element and SimpleBlock Element store their timestamps as | |||
signed integers, relative to the Cluster\Timestamp value of the | signed integers, relative to the Cluster\Timestamp value of the | |||
Cluster they are stored in. To get the timestamp of a Block or | Cluster they are stored in. To get the timestamp of a Block or | |||
SimpleBlock in nanoseconds you have to use the following formula: | SimpleBlock in nanoseconds, the following formula is used: | |||
( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * | ( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * | |||
TimestampScale | TimestampScale | |||
The Block Element and SimpleBlock Element store their timestamps as | The Block Element and SimpleBlock Element store their timestamps as | |||
16bit signed integers, allowing a range from "-32768" to "+32767" | 16-bit signed integers, allowing a range from "-32768" to "+32767" | |||
Track Ticks. Although these values can be negative, when added to | Track Ticks. Although these values can be negative, when added to | |||
the Cluster\Timestamp, the resulting frame timestamp SHOULD NOT be | the Cluster\Timestamp, the resulting frame timestamp SHOULD NOT be | |||
negative. | negative. | |||
When a CodecDelay Element is set, its value MUST be substracted from | When a CodecDelay Element is set, its value MUST be substracted from | |||
each Block timestamp of that track. To get the timestamp in | each Block timestamp of that track. To get the timestamp in | |||
nanoseconds of the first frame in a Block or SimpleBlock, the formula | nanoseconds of the first frame in a Block or SimpleBlock, the formula | |||
becomes: | becomes: | |||
( ( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * | ( ( Cluster\Timestamp + ( block timestamp * TrackTimestampScale ) ) * | |||
skipping to change at page 101, line 31 ¶ | skipping to change at line 4481 ¶ | |||
The resulting frame timestamp SHOULD NOT be negative. | The resulting frame timestamp SHOULD NOT be negative. | |||
During playback, when a frame has a negative timestamp, the content | During playback, when a frame has a negative timestamp, the content | |||
MUST be decoded by the decoder but not played to the user. | MUST be decoded by the decoder but not played to the user. | |||
11.3. TimestampScale Rounding | 11.3. TimestampScale Rounding | |||
The default Track Tick duration is one millisecond. | The default Track Tick duration is one millisecond. | |||
The TimestampScale is a floating-point value, which is usually 1.0. | The TimestampScale is a floating-point value that is usually "1.0". | |||
But when it's not, the multiplied Block Timestamp is a floating-point | But when it's not, the multiplied Block Timestamp is a floating-point | |||
value in nanoseconds. The Matroska Reader SHOULD use the nearest | value in nanoseconds. The Matroska Reader SHOULD use the nearest | |||
rounding value in nanosecond to get the proper nanosecond timestamp | rounding value in nanoseconds to get the proper nanosecond timestamp | |||
of a Block. This allows some clever TimestampScale values to have | of a Block. This allows some clever TimestampScale values to have a | |||
more refined timestamp precision per frame. | more refined timestamp precision per frame. | |||
12. Language Codes | 12. Language Codes | |||
Matroska from version 1 through 3 uses language codes that can be | Matroska versions 1 through 3 use language codes that can be either | |||
either the 3 letters bibliographic ISO-639-2 form [ISO639-2] (like | the three-letter bibliographic ISO 639-2 form [ISO639-2] (like "fre" | |||
"fre" for French), or such a language code followed by a dash and a | for French) or such a language code followed by a dash and a country | |||
country code for specialities in languages (like "fre-ca" for | code for specialities in languages (like "fre-ca" for Canadian | |||
Canadian French). The ISO 639-2 Language Elements are "Language | French). The ISO 639-2 Language Elements are "Language Element", | |||
Element", "TagLanguage Element", and "ChapLanguage Element". | "TagLanguage Element", and "ChapLanguage Element". | |||
Starting in Matroska version 4, either [ISO639-2] or [BCP47] MAY be | Starting in Matroska version 4, either [ISO639-2] or [BCP47] MAY be | |||
used, although BCP 47 is RECOMMENDED. The BCP 47 Language Elements | used, although BCP 47 is RECOMMENDED. The BCP 47 Language Elements | |||
are "LanguageBCP47 Element", "TagLanguageBCP47 Element", and | are "LanguageBCP47 Element", "TagLanguageBCP47 Element", and | |||
"ChapLanguageBCP47 Element". If a BCP 47 Language Element and an ISO | "ChapLanguageBCP47 Element". If a BCP 47 Language Element and an ISO | |||
639-2 Language Element are used within the same Parent Element, then | 639-2 Language Element are used within the same Parent Element, then | |||
the ISO 639-2 Language Element MUST be ignored and precedence given | the ISO 639-2 Language Element MUST be ignored and precedence given | |||
to the BCP 47 Language Element. | to the BCP 47 Language Element. | |||
13. Country Codes | 13. Country Codes | |||
Country codes are the [BCP47] two-letter region subtag, without the | Country codes are the [BCP47] two-letter region subtags, without the | |||
UK exception. | UK exception. | |||
14. Encryption | 14. Encryption | |||
This Matroska specification provides no interoperable solution for | This Matroska specification provides no interoperable solution for | |||
securing the data container with any assurances of confidentiality, | securing the data container with any assurances of confidentiality, | |||
integrity, authenticity, or to provide authorization. The | integrity, authenticity, or to provide authorization. The | |||
ContentEncryption Element (Section 5.1.4.1.31.8) and associated sub- | ContentEncryption Element (Section 5.1.4.1.31.8) and associated sub- | |||
fields (Section 5.1.4.1.31.9 to Section 5.1.4.1.31.12) are defined | fields (Section 5.1.4.1.31.9 to Section 5.1.4.1.31.12) are defined | |||
only for the benefit of implementers to construct their own | only for the benefit of implementers to construct their own | |||
skipping to change at page 103, line 7 ¶ | skipping to change at line 4547 ¶ | |||
Encryption information is stored in the ContentEncodings Element | Encryption information is stored in the ContentEncodings Element | |||
under the ContentEncryption Element. | under the ContentEncryption Element. | |||
For encryption systems sharing public/private keys, the creation of | For encryption systems sharing public/private keys, the creation of | |||
the keys and the exchange of keys are not covered by this document. | the keys and the exchange of keys are not covered by this document. | |||
They have to be handled by the system using Matroska. | They have to be handled by the system using Matroska. | |||
The algorithms described in Table 26 support different modes of | The algorithms described in Table 26 support different modes of | |||
operations and key sizes. The specification of these parameters is | operations and key sizes. The specification of these parameters is | |||
required for a complete solution, but is out of scope of this | required for a complete solution but is out of scope of this document | |||
document and left to the proprietary implementations using them or | and left to the proprietary implementations using them or subsequent | |||
subsequent profiles of this document. | profiles of this document. | |||
The ContentEncodingScope Element gives an idea of which part of the | The ContentEncodingScope Element gives an idea of which part of the | |||
track are encrypted. But each ContentEncAlgo Element and its sub | track is encrypted, but each ContentEncAlgo Element and its sub- | |||
elements like AESSettingsCipherMode really define how the encrypted | elements (like AESSettingsCipherMode) define exactly how the | |||
should be exactly interpreted. | encrypted track should be interpreted. | |||
An example of an extension that builds upon these security-related | An example of an extension that builds upon these security-related | |||
fields in this specification is [WebM-Enc]. It uses AES-CTR, | fields in this specification is [WebM-Enc]. It uses AES-CTR, | |||
ContentEncAlgo = 5 (Section 5.1.4.1.31.9) and AESSettingsCipherMode = | ContentEncAlgo = 5 (Section 5.1.4.1.31.9), and AESSettingsCipherMode | |||
1 (Section 5.1.4.1.31.12). | = 1 (Section 5.1.4.1.31.12). | |||
A Matroska Writer MUST NOT use insecure cryptographic algorithms to | A Matroska Writer MUST NOT use insecure cryptographic algorithms to | |||
create new archives or streams, but a Matroska Reader MAY support | create new archives or streams, but a Matroska Reader MAY support | |||
these algorithms to read previously made archives or stream. | these algorithms to read previously made archives or streams. | |||
15. Image Presentation | 15. Image Presentation | |||
15.1. Cropping | 15.1. Cropping | |||
The PixelCrop Elements (PixelCropTop, PixelCropBottom, | The PixelCrop Elements (PixelCropTop, PixelCropBottom, | |||
PixelCropRight, and PixelCropLeft) indicate when, and by how much, | PixelCropRight, and PixelCropLeft) indicate when, and by how much, | |||
encoded videos frames SHOULD be cropped for display. These Elements | encoded video frames SHOULD be cropped for display. These Elements | |||
allow edges of the frame that are not intended for display, such as | allow edges of the frame that are not intended for display (such as | |||
the sprockets of a full-frame film scan or the VANC area of a | the sprockets of a full-frame film scan or the VANC area of a | |||
digitized analog videotape, to be stored but hidden. PixelCropTop | digitized analog videotape) to be stored but hidden. PixelCropTop | |||
and PixelCropBottom store an integer of how many rows of pixels | and PixelCropBottom store an integer of how many rows of pixels | |||
SHOULD be cropped from the top and bottom of the image | SHOULD be cropped from the top and bottom of the image, respectively. | |||
(respectively). PixelCropLeft and PixelCropRight store an integer of | PixelCropLeft and PixelCropRight store an integer of how many columns | |||
how many columns of pixels SHOULD be cropped from the left and right | of pixels SHOULD be cropped from the left and right of the image, | |||
of the image (respectively). | respectively. | |||
For example, a pillar-boxed video that stores a 1440x1080 visual | For example, a pillar-boxed video that stores a 1440x1080 visual | |||
image within the center of a padded 1920x1080 encoded image may set | image within the center of a padded 1920x1080 encoded image may set | |||
both PixelCropLeft and PixelCropRight to "240", so that a Matroska | both PixelCropLeft and PixelCropRight to "240", so a Matroska Player | |||
Player should crop off 240 columns of pixels from the left and right | should crop off 240 columns of pixels from the left and right of the | |||
of the encoded image to present the image with the pillar-boxes | encoded image to present the image with the pillar-boxes hidden. | |||
hidden. | ||||
Cropping has to be performed before resizing and the display | Cropping has to be performed before resizing and the display | |||
dimensions given by DisplayWidth, DisplayHeight and DisplayUnit apply | dimensions given by DisplayWidth, DisplayHeight, and DisplayUnit | |||
to the already cropped image. | apply to the already-cropped image. | |||
15.2. Rotation | 15.2. Rotation | |||
The ProjectionPoseRoll Element (see Section 5.1.4.1.28.46) can be | The ProjectionPoseRoll Element (Section 5.1.4.1.28.46) can be used to | |||
used to indicate that the image from the associated video track | indicate that the image from the associated video track SHOULD be | |||
SHOULD be rotated for presentation. For instance, the following | rotated for presentation. For instance, the following example of the | |||
representation of the Projection Element Section 5.1.4.1.28.41) and | Projection Element (Section 5.1.4.1.28.41) and the ProjectionPoseRoll | |||
the ProjectionPoseRoll Element represents a video track where the | Element represents a video track where the image SHOULD be presented | |||
image SHOULD be presented with a 90-degree counter-clockwise | with a 90-degree counter-clockwise rotation, with the EBML tree shown | |||
rotation, with the EBML tree shown as XML : | as XML: | |||
<Projection> | <Projection> | |||
<ProjectionPoseRoll>90</ProjectionPoseRoll> | <ProjectionPoseRoll>90</ProjectionPoseRoll> | |||
</Projection> | </Projection> | |||
Figure 15: Rotation example. | Figure 15: Rotation Example | |||
16. Segment Position | 16. Segment Position | |||
The Segment Position of an Element refers to the position of the | The Segment Position of an Element refers to the position of the | |||
first octet of the Element ID of that Element, measured in octets, | first octet of the Element ID of that Element, measured in octets, | |||
from the beginning of the Element Data section of the containing | from the beginning of the Element Data section of the containing | |||
Segment Element. In other words, the Segment Position of an Element | Segment Element. In other words, the Segment Position of an Element | |||
is the distance in octets from the beginning of its containing | is the distance in octets from the beginning of its containing | |||
Segment Element minus the size of the Element ID and Element Data | Segment Element minus the size of the Element ID and Element Data | |||
Size of that Segment Element. The Segment Position of the first | Size of that Segment Element. The Segment Position of the first | |||
Child Element of the Segment Element is 0. An Element which is not | Child Element of the Segment Element is 0. An Element that is not | |||
stored within a Segment Element, such as the Elements of the EBML | stored within a Segment Element, such as the Elements of the EBML | |||
Header, do not have a Segment Position. | Header, do not have a Segment Position. | |||
16.1. Segment Position Exception | 16.1. Segment Position Exception | |||
Elements that are defined to store a Segment Position MAY define | Elements that are defined to store a Segment Position MAY define | |||
reserved values to indicate a special meaning. | reserved values to indicate a special meaning. | |||
16.2. Example of Segment Position | 16.2. Example of Segment Position | |||
This table presents an example of Segment Position by showing a | This table presents an example of Segment Position by showing a | |||
hexadecimal representation of a very small Matroska file with labels | hexadecimal representation of a very small Matroska file with labels | |||
to show the offsets in octets. The file contains a Segment Element | to show the offsets in octets. The file contains a Segment Element | |||
with an Element ID of "0x18538067" and a MuxingApp Element with an | with an Element ID of "0x18538067" and a MuxingApp Element with an | |||
Element ID of "0x4D80". | Element ID of "0x4D80". | |||
0 1 2 | 0 1 2 | |||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 | 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 | |||
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | |||
0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61| | 0 |1A|45|DF|A3|8B|42|82|88|6D|61|74|72|6F|73|6B|61| | |||
^ EBML Header | ^ EBML Header | |||
0 | |18|53|80|67| | 0 | |18|53|80|67| | |||
^ Segment ID | ^ Segment ID | |||
20 |93| | 20 |93| | |||
^ Segment Data Size | ^ Segment Data Size | |||
20 | |15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| | 20 | |15|49|A9|66|8E|4D|80|84|69|65|74|66|57|41|84|69|65|74|66| | |||
^ Start of Segment data | ^ Start of Segment data | |||
20 | |4D|80|84|69|65|74|66|57|41|84|69|65|74|66| | 20 | |4D|80|84|69|65|74|66|57|41|84|69|65|74|66| | |||
^ MuxingApp start | ^ MuxingApp start | |||
In the above example, the Element ID of the Segment Element is stored | In the above example, the Element ID of the Segment Element is stored | |||
at offset 16, the Element Data Size of the Segment Element is stored | at offset 16, the Element Data Size of the Segment Element is stored | |||
at offset 20, and the Element Data of the Segment Element is stored | at offset 20, and the Element Data of the Segment Element is stored | |||
at offset 21. | at offset 21. | |||
The MuxingApp Element is stored at offset 26. Since the Segment | The MuxingApp Element is stored at offset 26. Since the Segment | |||
Position of an Element is calculated by subtracting the position of | Position of an Element is calculated by subtracting the position of | |||
the Element Data of the containing Segment Element from the position | the Element Data of the containing Segment Element from the position | |||
of that Element, the Segment Position of MuxingApp Element in the | of that Element, the Segment Position of the MuxingApp Element in the | |||
above example is '26 - 21' or '5'. | above example is "26 - 21" or "5". | |||
17. Linked Segments | 17. Linked Segments | |||
Matroska provides several methods to link two or more Segment | Matroska provides several methods to link two or more Segment | |||
Elements together to create a Linked Segment. A Linked Segment is a | Elements together to create a Linked Segment. A Linked Segment is a | |||
set of multiple Segments linked together into a single presentation | set of multiple Segments linked together into a single presentation | |||
by using Hard Linking or Medium Linking. | by using Hard Linking or Medium Linking. | |||
All Segments within a Linked Segment MUST have a SegmentUUID. | All Segments within a Linked Segment MUST have a SegmentUUID. | |||
All Segments within a Linked Segment SHOULD be stored within the same | All Segments within a Linked Segment SHOULD be stored within the same | |||
directory or be accessible quickly based on their SegmentUUID in | directory or be quickly accessible based on their SegmentUUID in | |||
order to have seamless transition between segments. | order to have a seamless transition between segments. | |||
All Segments within a Linked Segment MAY set a SegmentFamily with a | All Segments within a Linked Segment MAY set a SegmentFamily with a | |||
common value to make it easier for a Matroska Player to know which | common value to make it easier for a Matroska Player to know which | |||
Segments are meant to be played together. | Segments are meant to be played together. | |||
The SegmentFilename, PrevFilename and NextFilename elements MAY also | The SegmentFilename, PrevFilename, and NextFilename elements MAY also | |||
give hints on the original filenames that were used when the Segment | give hints on the original filenames that were used when the Segment | |||
links were created, in case some SegmentUUID are damaged. | links were created, in case some SegmentUUIDs are damaged. | |||
17.1. Hard Linking | 17.1. Hard Linking | |||
Hard Linking, also called splitting, is the process of creating a | Hard Linking, also called "splitting", is the process of creating a | |||
Linked Segment by linking multiple Segment Elements using the | Linked Segment by linking multiple Segment Elements using the | |||
NextUUID and PrevUUID Elements. | NextUUID and PrevUUID Elements. | |||
All Segments within a Hard Linked Segment MUST use the same Tracks | All Segments within a Hard Linked Segment MUST use the same Tracks | |||
list and TimestampScale. | list and TimestampScale. | |||
Within a Linked Segment, the timestamps of Block and SimpleBlock MUST | Within a Linked Segment, the timestamps of Block and SimpleBlock MUST | |||
follow consecutively the timestamps of Block and SimpleBlock from the | consecutively follow the timestamps of Block and SimpleBlock from the | |||
previous Segment in linking order. | previous Segment in linking order. | |||
With Hard Linking, the chapters of any Segment within the Linked | With Hard Linking, the chapters of any Segment within the Linked | |||
Segment MUST only reference the current Segment. The NextUUID and | Segment MUST only reference the current Segment. The NextUUID and | |||
PrevUUID reference the respective SegmentUUID values of the next and | PrevUUID reference the respective SegmentUUID values of the next and | |||
previous Segments. | previous Segments. | |||
The first Segment of a Linked Segment MUST NOT have a PrevUUID | The first Segment of a Linked Segment MUST NOT have a PrevUUID | |||
Element. The last Segment of a Linked Segment MUST NOT have a | Element. The last Segment of a Linked Segment MUST NOT have a | |||
NextUUID Element. | NextUUID Element. | |||
For each node of the chain of Segments of a Linked Segment at least | For each node of the chain of Segments of a Linked Segment, at least | |||
one Segment MUST reference the other Segment within the chain. | one Segment MUST reference the other Segment within the chain. | |||
In a chain of Segments of a Linked Segment the NextUUID always takes | In a chain of Segments of a Linked Segment, the NextUUID always takes | |||
precedence over the PrevUUID. So if SegmentA has a NextUUID to | precedence over the PrevUUID. Thus, if SegmentA has a NextUUID to | |||
SegmentB and SegmentB has a PrevUUID to SegmentC, the link to use is | SegmentB and SegmentB has a PrevUUID to SegmentC, the link to use is | |||
NextUUID between SegmentA and SegmentB, SegmentC is not part of the | NextUUID between SegmentA and SegmentB, and SegmentC is not part of | |||
Linked Segment. | the Linked Segment. | |||
If SegmentB has a PrevUUID to SegmentA but SegmentA has no NextUUID, | If SegmentB has a PrevUUID to SegmentA, but SegmentA has no NextUUID, | |||
then the Matroska Player MAY consider these two Segments linked as | then the Matroska Player MAY consider these two Segments linked as | |||
SegmentA followed by SegmentB. | SegmentA followed by SegmentB. | |||
As an example, three Segments can be Hard Linked as a Linked Segment | As an example, three Segments can be Hard Linked as a Linked Segment | |||
through cross-referencing each other with SegmentUUID, PrevUUID, and | through cross-referencing each other with SegmentUUID, PrevUUID, and | |||
NextUUID, as in this table: | NextUUID as shown in this table: | |||
+==========+================+==================+==================+ | +==========+================+==================+==================+ | |||
|file name |SegmentUUID | PrevUUID | NextUUID | | |file name |SegmentUUID | PrevUUID | NextUUID | | |||
+==========+================+==================+==================+ | +==========+================+==================+==================+ | |||
|start.mkv |71000c23cd310998| Invalid | a77b3598941cb803 | | |start.mkv |71000c23cd310998| Invalid | a77b3598941cb803 | | |||
| |53fbc94dd984a5dd| | eac0fcdafe44fac9 | | | |53fbc94dd984a5dd| | eac0fcdafe44fac9 | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
|middle.mkv|a77b3598941cb803| 71000c23cd310998 | 6c92285fa6d3e827 | | |middle.mkv|a77b3598941cb803| 71000c23cd310998 | 6c92285fa6d3e827 | | |||
| |eac0fcdafe44fac9| 53fbc94dd984a5dd | b198d120ea3ac674 | | | |eac0fcdafe44fac9| 53fbc94dd984a5dd | b198d120ea3ac674 | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
|end.mkv |6c92285fa6d3e827| a77b3598941cb803 | Invalid | | |end.mkv |6c92285fa6d3e827| a77b3598941cb803 | Invalid | | |||
| |b198d120ea3ac674| eac0fcdafe44fac9 | | | | |b198d120ea3ac674| eac0fcdafe44fac9 | | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
Table 41: Usual Hard Linking UIDs | Table 41: Usual Hard Linking UIDs | |||
An other example where only the NextUUID Element is used: | An example where only the NextUUID Element is used: | |||
+============+==================+==========+==================+ | +============+==================+==========+==================+ | |||
| file name | SegmentUUID | PrevUUID | NextUUID | | | file name | SegmentUUID | PrevUUID | NextUUID | | |||
+============+==================+==========+==================+ | +============+==================+==========+==================+ | |||
| start.mkv | 71000c23cd310998 | Invalid | a77b3598941cb803 | | | start.mkv | 71000c23cd310998 | Invalid | a77b3598941cb803 | | |||
| | 53fbc94dd984a5dd | | eac0fcdafe44fac9 | | | | 53fbc94dd984a5dd | | eac0fcdafe44fac9 | | |||
+------------+------------------+----------+------------------+ | +------------+------------------+----------+------------------+ | |||
| middle.mkv | a77b3598941cb803 | n/a | 6c92285fa6d3e827 | | | middle.mkv | a77b3598941cb803 | n/a | 6c92285fa6d3e827 | | |||
| | eac0fcdafe44fac9 | | b198d120ea3ac674 | | | | eac0fcdafe44fac9 | | b198d120ea3ac674 | | |||
+------------+------------------+----------+------------------+ | +------------+------------------+----------+------------------+ | |||
skipping to change at page 108, line 5 ¶ | skipping to change at line 4767 ¶ | |||
+------------+------------------+------------------+----------+ | +------------+------------------+------------------+----------+ | |||
| middle.mkv | a77b3598941cb803 | 71000c23cd310998 | n/a | | | middle.mkv | a77b3598941cb803 | 71000c23cd310998 | n/a | | |||
| | eac0fcdafe44fac9 | 53fbc94dd984a5dd | | | | | eac0fcdafe44fac9 | 53fbc94dd984a5dd | | | |||
+------------+------------------+------------------+----------+ | +------------+------------------+------------------+----------+ | |||
| end.mkv | 6c92285fa6d3e827 | a77b3598941cb803 | Invalid | | | end.mkv | 6c92285fa6d3e827 | a77b3598941cb803 | Invalid | | |||
| | b198d120ea3ac674 | eac0fcdafe44fac9 | | | | | b198d120ea3ac674 | eac0fcdafe44fac9 | | | |||
+------------+------------------+------------------+----------+ | +------------+------------------+------------------+----------+ | |||
Table 43: Hard Linking without NextUUID | Table 43: Hard Linking without NextUUID | |||
In this example only the middle.mkv is using the PrevUUID and | An example where only the middle.mkv is using the PrevUUID and | |||
NextUUID Elements: | NextUUID Elements: | |||
+==========+================+==================+==================+ | +==========+================+==================+==================+ | |||
|file name |SegmentUUID | PrevUUID | NextUUID | | |file name |SegmentUUID | PrevUUID | NextUUID | | |||
+==========+================+==================+==================+ | +==========+================+==================+==================+ | |||
|start.mkv |71000c23cd310998| Invalid | n/a | | |start.mkv |71000c23cd310998| Invalid | n/a | | |||
| |53fbc94dd984a5dd| | | | | |53fbc94dd984a5dd| | | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
|middle.mkv|a77b3598941cb803| 71000c23cd310998 | 6c92285fa6d3e827 | | |middle.mkv|a77b3598941cb803| 71000c23cd310998 | 6c92285fa6d3e827 | | |||
| |eac0fcdafe44fac9| 53fbc94dd984a5dd | b198d120ea3ac674 | | | |eac0fcdafe44fac9| 53fbc94dd984a5dd | b198d120ea3ac674 | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
|end.mkv |6c92285fa6d3e827| n/a | Invalid | | |end.mkv |6c92285fa6d3e827| n/a | Invalid | | |||
| |b198d120ea3ac674| | | | | |b198d120ea3ac674| | | | |||
+----------+----------------+------------------+------------------+ | +----------+----------------+------------------+------------------+ | |||
Table 44: Hard Linking with mixed UID links | Table 44: Hard Linking with Mixed UID Links | |||
17.2. Medium Linking | 17.2. Medium Linking | |||
Medium Linking creates relationships between Segments using Ordered | Medium Linking creates relationships between Segments using Ordered | |||
Chapters (Section 20.1.3) and the ChapterSegmentUUID Element. A | Chapters (Section 20.1.3) and the ChapterSegmentUUID Element. A | |||
Chapter Edition with Ordered Chapters MAY contain Chapter elements | Chapter Edition with Ordered Chapters MAY contain Chapter elements | |||
that reference timestamp ranges from other Segments. The Segment | that reference timestamp ranges from other Segments. The Segment | |||
referenced by the Ordered Chapter via the ChapterSegmentUUID Element | referenced by the Ordered Chapter via the ChapterSegmentUUID Element | |||
SHOULD be played as part of a Linked Segment. | SHOULD be played as part of a Linked Segment. | |||
The timestamps of Segment content referenced by Ordered Chapters MUST | The timestamps of Segment content referenced by Ordered Chapters MUST | |||
be adjusted according to the cumulative duration of the previous | be adjusted according to the cumulative duration of the previous | |||
Ordered Chapters. | Ordered Chapters. | |||
As an example a file named intro.mkv could have a SegmentUUID of | As an example, a file named intro.mkv could have a SegmentUUID of | |||
"0xb16a58609fc7e60653a60c984fc11ead". Another file called | "0xb16a58609fc7e60653a60c984fc11ead". Another file called | |||
program.mkv could use a Chapter Edition that contains two Ordered | program.mkv could use a Chapter Edition that contains two Ordered | |||
Chapters. The first chapter references the Segment of intro.mkv with | Chapters. The first chapter references the Segment of intro.mkv with | |||
the use of a ChapterSegmentUUID, ChapterSegmentEditionUID, | the use of a ChapterSegmentUUID, ChapterSegmentEditionUID, | |||
ChapterTimeStart, and optionally a ChapterTimeEnd element. The | ChapterTimeStart, and an optional ChapterTimeEnd element. The second | |||
second chapter references content within the Segment of program.mkv. | chapter references content within the Segment of program.mkv. A | |||
A Matroska Player SHOULD recognize the Linked Segment created by the | Matroska Player SHOULD recognize the Linked Segment created by the | |||
use of ChapterSegmentUUID in an enabled Edition and present the | use of ChapterSegmentUUID in an enabled Edition and present the | |||
reference content of the two Segments as a single presentation. | reference content of the two Segments as a single presentation. | |||
The ChapterSegmentUUID represents the Segment that holds the content | The ChapterSegmentUUID represents the Segment that holds the content | |||
to play in place of the Linked Chapter. The ChapterSegmentUUID MUST | to play in place of the Linked Chapter. The ChapterSegmentUUID MUST | |||
NOT be the SegmentUUID of its own Segment. | NOT be the SegmentUUID of its own Segment. | |||
There are 2 ways to use a chapter link: | There are two ways to use a chapter link: | |||
* Linked-Duration linking, | * Linked-Duration linking | |||
* Linked-Edition linking | * Linked-Edition linking | |||
17.2.1. Linked-Duration | 17.2.1. Linked-Duration | |||
A Matroska Player MUST play the content of the linked Segment from | A Matroska Player MUST play the content of the linked Segment from | |||
the ChapterTimeStart until ChapterTimeEnd timestamp in place of the | the ChapterTimeStart until the ChapterTimeEnd timestamp in place of | |||
Linked Chapter. | the Linked Chapter. | |||
ChapterTimeStart and ChapterTimeEnd represent timestamps in the | ChapterTimeStart and ChapterTimeEnd represent timestamps in the | |||
Linked Segment matching the value of ChapterSegmentUUID. Their | Linked Segment matching the value of ChapterSegmentUUID. Their | |||
values MUST be in the range of the linked Segment duration. | values MUST be in the range of the linked Segment duration. | |||
The ChapterTimeEnd value MUST be set when using linked-duration | The ChapterTimeEnd value MUST be set when using Linked-Duration | |||
chapter linking. ChapterSegmentEditionUID MUST NOT be set. | chapter linking. ChapterSegmentEditionUID MUST NOT be set. | |||
17.2.2. Linked-Edition | 17.2.2. Linked-Edition | |||
A Matroska Player MUST play the whole linked Edition of the linked | A Matroska Player MUST play the whole Linked Edition of the linked | |||
Segment in place of the Linked Chapter. | Segment in place of the Linked Chapter. | |||
ChapterSegmentEditionUID represents a valid Edition from the Linked | ChapterSegmentEditionUID represents a valid Edition from the Linked | |||
Segment matching the value of ChapterSegmentUUID. | Segment matching the value of ChapterSegmentUUID. | |||
When using linked-edition chapter linking. ChapterTimeEnd is | When using Linked-Edition chapter linking, ChapterTimeEnd is | |||
OPTIONAL. | OPTIONAL. | |||
18. Track Flags | 18. Track Flags | |||
18.1. Default flag | 18.1. Default Flag | |||
The "default track" flag is a hint for a Matroska Player indicating | The Default flag is a hint for a Matroska Player indicating that a | |||
that a given track SHOULD be eligible to be automatically selected as | given track SHOULD be eligible to be automatically selected as the | |||
the default track for a given language. If no tracks in a given | default track for a given language. If no tracks in a given language | |||
language have the default track flag set, then all tracks in that | have the Default flag set, then all tracks in that language are | |||
language are eligible for automatic selection. This can be used to | eligible for automatic selection. This can be used to indicate that | |||
indicate that a track provides "regular service" suitable for users | a track provides "regular service" that is suitable for users with | |||
with default settings, as opposed to specialized services, such as | default settings, as opposed to specialized services, such as | |||
commentary, hearing-impaired captions, or descriptive audio. | commentary, hearing-impaired captions, or descriptive audio. | |||
The Matroska Player MAY override the "default track" flag for any | The Matroska Player MAY override the Default flag for any reason, | |||
reason, including user preferences to prefer tracks providing | including user preferences to prefer tracks providing accessibility | |||
accessibility services. | services. | |||
18.2. Forced flag | 18.2. Forced Flag | |||
The "forced" flag tells the Matroska Player that it SHOULD display | The Forced flag tells the Matroska Player that it SHOULD display this | |||
this subtitle track, even if user preferences usually would not call | subtitle track, even if user preferences usually would not call for | |||
for any subtitles to be displayed alongside the current selected | any subtitles to be displayed alongside the audio track that is | |||
audio track. This can be used to indicate that a track contains | currently selected. This can be used to indicate that a track | |||
translations of onscreen text, or of dialogue spoken in a different | contains translations of on-screen text or dialogue spoken in a | |||
language than the track's primary one. | different language than the track's primary language. | |||
18.3. Hearing-impaired flag | 18.3. Hearing-Impaired Flag | |||
The "hearing impaired" flag tells the Matroska Player that it SHOULD | The Hearing-Impaired flag tells the Matroska Player that it SHOULD | |||
prefer this track when selecting a default track for a hearing- | prefer this track when selecting a default track for a hearing- | |||
impaired user, and that it MAY prefer to select a different track | impaired user and that it MAY prefer to select a different track when | |||
when selecting a default track for a non-hearing-impaired user. | selecting a default track for a user that is not hearing-impaired. | |||
18.4. Visual-impaired flag | 18.4. Visual-Impaired Flag | |||
The "visual impaired" flag tells the Matroska Player that it SHOULD | The Visual-Impaired flag tells the Matroska Player that it SHOULD | |||
prefer this track when selecting a default track for a visually- | prefer this track when selecting a default track for a visually | |||
impaired user, and that it MAY prefer to select a different track | impaired user and that it MAY prefer to select a different track when | |||
when selecting a default track for a non-visually-impaired user. | selecting a default track for a user that is not visually impaired. | |||
18.5. Descriptions flag | 18.5. Descriptions Flag | |||
The "descriptions" flag tells the Matroska Player that this track is | The Descriptions flag tells the Matroska Player that this track is | |||
suitable to play via a text-to-speech system for a visually-impaired | suitable to play via a text-to-speech system for a visually impaired | |||
user, and that it SHOULD NOT automatically select this track when | user and that it SHOULD NOT automatically select this track when | |||
selecting a default track for a non-visually-impaired user. | selecting a default track for a user that is not visually impaired. | |||
18.6. Original flag | 18.6. Original Flag | |||
The "original" flag tells the Matroska Player that this track is in | The Original flag tells the Matroska Player that this track is in the | |||
the original language, and that it SHOULD prefer it if configured to | original language and that it SHOULD prefer the original language if | |||
prefer original-language tracks of this track's type. | configured to prefer original-language tracks of this track's type. | |||
18.7. Commentary flag | 18.7. Commentary Flag | |||
The "commentary" flag tells the Matroska Player that this track | The Commentary flag tells the Matroska Player that this track | |||
contains commentary on the content. | contains commentary on the content. | |||
18.8. Track Operation | 18.8. Track Operation | |||
TrackOperation allows combining multiple tracks to make a virtual | TrackOperation allows for the combination of multiple tracks to make | |||
one. It uses two separate system to combine tracks. One to create a | a virtual one. It uses two separate system to combine tracks. One | |||
3D "composition" (left/right/background planes) and one to simplify | to create a 3D "composition" (left/right/background planes) and one | |||
join two tracks together to make a single track. | to simplify join two tracks together to make a single track. | |||
A track created with TrackOperation is a proper track with a UID and | A track created with TrackOperation is a proper track with a UID and | |||
all its flags. However, the codec ID is meaningless because each | all its flags. However, the codec ID is meaningless because each | |||
"sub" track needs to be decoded by its own decoder before the | "sub" track needs to be decoded by its own decoder before the | |||
"operation" is applied. The Cues Elements corresponding to such a | "operation" is applied. The Cues Elements corresponding to such a | |||
virtual track SHOULD be the union of the Cues Elements for each of | virtual track SHOULD be the union of the Cues Elements for each of | |||
the tracks it's composed of (when the Cues are defined per track). | the tracks it's composed of (when the Cues are defined per track). | |||
In the case of TrackJoinBlocks, the Block Elements (from BlockGroup | In the case of TrackJoinBlocks, the Block Elements (from BlockGroup | |||
and SimpleBlock) of all the tracks SHOULD be used as if they were | and SimpleBlock) of all the tracks SHOULD be used as if they were | |||
defined for this new virtual Track. When two Block Elements have | defined for this new virtual Track. When two Block Elements have | |||
overlapping start or end timestamps, it's up to the underlying system | overlapping start or end timestamps, it's up to the underlying system | |||
to either drop some of these frames or render them the way they | to either drop some of these frames or render them the way they | |||
overlap. This situation SHOULD be avoided when creating such tracks | overlap. This situation SHOULD be avoided when creating such tracks, | |||
as you can never be sure of the end result on different platforms. | as you can never be sure of the end result on different platforms. | |||
18.9. Overlay Track | 18.9. Overlay Track | |||
Overlay tracks SHOULD be rendered in the same channel as the track | Overlay tracks SHOULD be rendered in the same channel as the track | |||
it's linked to. When content is found in such a track, it SHOULD be | it's linked to. When content is found in such a track, it SHOULD be | |||
played on the rendering channel instead of the original track. | played on the rendering channel instead of the original track. | |||
18.10. Multi-planar and 3D videos | 18.10. Multi-planar and 3D Videos | |||
There are two different ways to compress 3D videos: have each eye | There are two different ways to compress 3D videos: have each eye | |||
track in a separate track and have one track have both eyes combined | track in a separate track and have one track have both eyes combined | |||
inside (which is more efficient, compression-wise). Matroska | inside (which is more efficient compression-wise). Matroska supports | |||
supports both ways. | both ways. | |||
For the single track variant, there is the StereoMode Element, which | For the single-track variant, there is the StereoMode Element, which | |||
defines how planes are assembled in the track (mono or left-right | defines how planes are assembled in the track (mono or left-right | |||
combined). Odd values of StereoMode means the left plane comes first | combined). Odd values of StereoMode means the left plane comes first | |||
for more convenient reading. The pixel count of the track | for more convenient reading. The pixel count of the track | |||
(PixelWidth/PixelHeight) is the raw amount of pixels, for example | (PixelWidth/PixelHeight) is the raw number of pixels (for example, | |||
3840x1080 for full HD side by side, and the DisplayWidth/ | 3840x1080 for full HD side by side), and the DisplayWidth/ | |||
DisplayHeight in pixels is the amount of pixels for one plane | DisplayHeight in pixels is the number of pixels for one plane | |||
(1920x1080 for that full HD stream). Old stereo 3D were displayed | (1920x1080 for that full HD stream). Old stereo 3D were displayed | |||
using anaglyph (cyan and red colors separated). For compatibility | using anaglyph (cyan and red colors separated). For compatibility | |||
with such movies, there is a value of the StereoMode that corresponds | with such movies, there is a value of the StereoMode that corresponds | |||
to AnaGlyph. | to AnaGlyph. | |||
There is also a "packed" mode (values 13 and 14) which consists of | There is also a "packed" mode (values 13 and 14) that consists of | |||
packing two frames together in a Block using lacing. The first frame | packing two frames together in a Block that uses lacing. The first | |||
is the left eye and the other frame is the right eye (or vice versa). | frame is the left eye and the other frame is the right eye (or vice | |||
The frames SHOULD be decoded in that order and are possibly dependent | versa). The frames SHOULD be decoded in that order and are possibly | |||
on each other (P and B frames). | dependent on each other (P and B frames). | |||
For separate tracks, Matroska needs to define exactly which track | For separate tracks, Matroska needs to define exactly which track | |||
does what. TrackOperation with TrackCombinePlanes do that. For more | does what. TrackOperation with TrackCombinePlanes does that. For | |||
details look at Section 18.8 on how TrackOperation works. | more details, see Section 18.8 on how TrackOperation works. | |||
The 3D support is still in infancy and may evolve to support more | The 3D support is still in infancy and may evolve to support more | |||
features. | features. | |||
The StereoMode used to be part of Matroska v2 but it didn't meet the | The StereoMode used to be part of Matroska v2, but it didn't meet the | |||
requirement for multiple tracks. There was also a bug in libmatroska | requirement for multiple tracks. There was also a bug in libmatroska | |||
prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8; | prior to 0.9.0 that would save/read it as 0x53B9 instead of 0x53B8; | |||
see OldStereoMode (Section 5.1.4.1.28.5). Matroska Readers MAY | see OldStereoMode (Section 5.1.4.1.28.5). Matroska Readers MAY | |||
support these legacy files by checking Matroska v2 or 0x53B9. The | support these legacy files by checking Matroska v2 or 0x53B9. The | |||
older values of StereoMode were 0: mono, 1: right eye, 2: left eye, | older values of StereoMode were 0 (mono), 1 (right eye), 2 (left | |||
3: both eyes, the only values that can be found in OldStereoMode. | eye), and 3 (both eyes); these are the only values that can be found | |||
They are not compatible with the StereoMode values found in Matroska | in OldStereoMode. They are not compatible with the StereoMode values | |||
v3 and above. | found in Matroska v3 and above. | |||
19. Default track selection | 19. Default Track Selection | |||
This section provides some example sets of Tracks and hypothetical | This section provides some example sets of Tracks and hypothetical | |||
user settings, along with indications of which ones a similarly- | user settings, along with indications of which ones a similarly | |||
configured Matroska Player SHOULD automatically select for playback | configured Matroska Player SHOULD automatically select for playback | |||
by default in such a situation. A player MAY provide additional | by default in such a situation. A player MAY provide additional | |||
settings with more detailed controls for more nuanced scenarios. | settings with more detailed controls for more nuanced scenarios. | |||
These examples are provided as guidelines to illustrate the intended | These examples are provided as guidelines to illustrate the intended | |||
usages of the various supported Track flags, and their expected | usages of the various supported Track flags and their expected | |||
behaviors. | behaviors. | |||
Track names are shown in English for illustrative purposes; actual | Track names are shown in English for illustrative purposes; actual |