idnits 2.17.1 draft-ietf-cellar-chapter-codecs-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (1 May 2022) is 725 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 237 -- Looks like a reference, but probably isn't: '0' on line 238 -- Looks like a reference, but probably isn't: '2' on line 237 Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 cellar S. Lhomme 3 Internet-Draft 4 Intended status: Standards Track M. Bunkus 5 Expires: 2 November 2022 6 D. Rice 7 1 May 2022 9 Matroska Media Container Chapter Codecs Specifications 10 draft-ietf-cellar-chapter-codecs-01 12 Abstract 14 This document defines common Matroska Chapter Codecs, the basic 15 Matroska Script and the DVD inspired DVD menu. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on 2 November 2022. 34 Copyright Notice 36 Copyright (c) 2022 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 41 license-info) in effect on the date of publication of this document. 42 Please review these documents carefully, as they describe your rights 43 and restrictions with respect to this document. Code Components 44 extracted from this document must include Revised BSD License text as 45 described in Section 4.e of the Trust Legal Provisions and are 46 provided without warranty as described in the Revised BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Status of this document . . . . . . . . . . . . . . . . . . . 2 52 3. Security Considerations . . . . . . . . . . . . . . . . . . . 2 53 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 2 54 5. Notation and Conventions . . . . . . . . . . . . . . . . . . 2 55 6. Matroska Chapter Codecs . . . . . . . . . . . . . . . . . . . 3 56 6.1. Segment Linking . . . . . . . . . . . . . . . . . . . . . 3 57 7. Matroska Chapter Codecs and Nested Chapters . . . . . . . . . 3 58 7.1. Matroska Script (0) . . . . . . . . . . . . . . . . . . . 4 59 7.2. DVD menu (1) . . . . . . . . . . . . . . . . . . . . . . 5 60 8. Normative References . . . . . . . . . . . . . . . . . . . . 7 61 9. Informative References . . . . . . . . . . . . . . . . . . . 7 62 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 64 1. Introduction 66 _TODO_ 68 2. Status of this document 70 This document is a work-in-progress specification defining the 71 Matroska file format as part of the IETF Cellar working group 72 (https://datatracker.ietf.org/wg/cellar/charter/). It uses basic 73 elements and concepts already defined in the Matroska specifications 74 defined by this workgroup. 76 3. Security Considerations 78 Tag values can be either strings or binary blobs. This document 79 inherits security considerations from the EBML and Matroska 80 documents. 82 4. IANA Considerations 84 To be determined. 86 5. Notation and Conventions 88 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 89 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 90 "OPTIONAL" in this document are to be interpreted as described in BCP 91 14 [RFC2119] [RFC8174] when, and only when, they appear in all 92 capitals, as shown here. 94 6. Matroska Chapter Codecs 96 Chapter codecs are a way to add more complex playback features than 97 the usual linear playback. 99 Some ChapProcess elements hold commands to execute when entering/ 100 leaving a chapter. 102 When chapter codecs are used the EditionFlagOrdered of the edition 103 they belong to MUST be set. 105 6.1. Segment Linking 107 Chapter Codecs can reference another Segment and jump to that 108 Segment. 110 The Chapter Codecs MAY store the Segment information in their own 111 format, possibly not using the SegmentUID format. The 112 ChapterTranslate element and its child elements SHOULD be used to 113 link the internal chapter codec representation, the chapter codec 114 number and the actual Segment it represents. 116 For example if a chapter codec of type "1" in SegmentA needs to link 117 to SegmentB, it can store that information as "SegB" in its internal 118 data. 120 The translation ChapterTranslate in SegmentB would use the following 121 elements: * ChapterTranslate\ChapterTranslateCodec = 1 * 122 ChapterTranslate\ChapterTranslateID = "SegB" 124 The Matroska Player MUST use the SegmentFamily to find all Segments 125 that need translation between the chapter codec values and the actual 126 segment it targets. 128 7. Matroska Chapter Codecs and Nested Chapters 130 When Nested Chapters contain chapters codecs -- via the ChapProcess 131 Element -- the enter/leave commands -- ChapProcessTime Element -- 132 MUST be executed in a specific order, if the Matroska Player supports 133 the chapter codecs included in the chapters. 135 When starting playback, the Matroska Player MUST start at the 136 ChapterTimeStart of the first chapter of the ordered chapter. The 137 enter commands of that chapter MUST be executed. If that chapter 138 contains Nested Chapters, the enter commands of the Nested Chapter 139 with the same ChapterTimeStart MUST be executed. If that chapter 140 contains Nested Chapters, the enter commands of the Nested Chapter 141 with the same ChapterTimeStart MUST be executed, and so on until 142 there is no Nested Chapter with the same ChapterTimeStart. 144 When switching from a chapter to another: 146 * the leave commands (ChapProcessTime=2) of the chapter MUST be 147 executed, then the leave commands of its parent chapter, etc. 148 until the common Parent Chapter or Edition element. The leave 149 command of that Parent Chapter or Edition element MUST NOT be 150 executed. 152 * the enter commands (ChapProcessTime=1) of the Nested Chapter of 153 the common Parent Chapter or Edition element, to reach the chapter 154 we switch to, MUST be executed, then the enter commands of its 155 Nested Chapter to reach the chapter we switch to MUST be executed, 156 until that chapter is the chapter we switch to. The enter 157 commands of that chapter MUST be executed as well. 159 When the last Chapter finished playing -- i.e. its ChapterTimeEnd has 160 been reached -- the Matroska Player MUST execute its leaved commands, 161 then the leave commands of it's Parent Chapter, until the parent of 162 the chapter is the Edition. 164 7.1. Matroska Script (0) 166 This is the case when ChapProcessCodecID = 0. This is a script 167 language build for Matroska purposes. The inspiration comes from 168 ActionScript, javascript and other similar scripting languages. The 169 commands are stored as text commands, in UTF-8. The syntax is C 170 like, with commands spanned on many lines, each terminating with a 171 ";". You can also include comments at the end of lines with "//" or 172 comment many lines using "/* */". The scripts are stored in 173 ChapProcessData. For the moment ChapProcessPrivate is not used. 175 The one and only command existing for the moment is GotoAndPlay( 176 ChapterUID );. As the same suggests, it means that, when this command 177 is encountered, the Matroska Player SHOULD jump to the Chapter 178 specified by the UID and play it. 180 7.2. DVD menu (1) 182 This is the case when ChapProcessCodecID = 1. Each level of a 183 chapter corresponds to a logical level in the DVD system that is 184 stored in the first octet of the ChapProcessPrivate. This DVD 185 hierarchy is as follows: 187 +====================+======+===========+==========+=============+ 188 | ChapProcessPrivate | DVD | Hierarchy | Commands | Comment | 189 | | Name | | Possible | | 190 +====================+======+===========+==========+=============+ 191 | 0x30 | SS | DVD | - | First Play, | 192 | | | domain | | Video | 193 | | | | | Manager, | 194 | | | | | Video Title | 195 +--------------------+------+-----------+----------+-------------+ 196 | 0x2A | LU | Language | - | Contains | 197 | | | Unit | | only PGCs | 198 +--------------------+------+-----------+----------+-------------+ 199 | 0x28 | TT | Title | - | Contains | 200 | | | | | only PGCs | 201 +--------------------+------+-----------+----------+-------------+ 202 | 0x20 | PGC | Program | * | | 203 | | | Group | | | 204 | | | Chain | | | 205 | | | (PGC) | | | 206 +--------------------+------+-----------+----------+-------------+ 207 | 0x18 | PG | Program 1 | - | | 208 | | | / Program | | | 209 | | | 2 / | | | 210 | | | Program 3 | | | 211 +--------------------+------+-----------+----------+-------------+ 212 | 0x10 | PTT | Part Of | - | Equivalent | 213 | | | Title 1 / | | to the | 214 | | | Part Of | | chapters on | 215 | | | Title 2 | | the sleeve. | 216 +--------------------+------+-----------+----------+-------------+ 217 | 0x08 | CN | Cell 1 / | - | | 218 | | | Cell 2 / | | | 219 | | | Cell 3 / | | | 220 | | | Cell 4 / | | | 221 | | | Cell 5 / | | | 222 | | | Cell 6 | | | 223 +--------------------+------+-----------+----------+-------------+ 225 Table 1 227 You can also recover wether a Segment is a Video Manager (VMG), Video 228 Title Set (VTS) or Video Title Set Menu (VTSM) from the 229 ChapterTranslateID element found in the Segment Info. This field 230 uses 2 octets as follows: 232 1. Domain Type: 0 for VMG, the domain number for VTS and VTSM 234 2. Domain Value: 0 for VMG and VTSM, 1 for the VTS source. 236 For instance, the menu part from VTS_01_0.VOB would be coded [1,0] 237 and the content part from VTS_02_3.VOB would be [2,1]. The VMG is 238 always [0,0] 240 The following octets of ChapProcessPrivate are as follows: 242 +=========+======+=================================================+ 243 | Octet 1 | DVD | Following Octets | 244 | | Name | | 245 +=========+======+=================================================+ 246 | 0x30 | SS | Domain name code (1: 0x00= First play, 0xC0= | 247 | | | VMG, 0x40= VTSM, 0x80= VTS) + VTS(M) number (2) | 248 +---------+------+-------------------------------------------------+ 249 | 0x2A | LU | Language code (2) + Language extension (1) | 250 +---------+------+-------------------------------------------------+ 251 | 0x28 | TT | global Title number (2) + corresponding TTN of | 252 | | | the VTS (1) | 253 +---------+------+-------------------------------------------------+ 254 | 0x20 | PGC | PGC number (2) + Playback Type (1) + Disabled | 255 | | | User Operations (4) | 256 +---------+------+-------------------------------------------------+ 257 | 0x18 | PG | Program number (2) | 258 +---------+------+-------------------------------------------------+ 259 | 0x10 | PTT | PTT-chapter number (1) | 260 +---------+------+-------------------------------------------------+ 261 | 0x08 | CN | Cell number [VOB ID(2)][Cell ID(1)][Angle | 262 | | | Num(1)] | 263 +---------+------+-------------------------------------------------+ 265 Table 2 267 If the level specified in ChapProcessPrivate is a PGC (0x20), there 268 is an octet called the Playback Type, specifying the kind of PGC 269 defined: 271 * 0x00: entry only/basic PGC 273 * 0x82: Title+Entry Menu (only found in the Video Manager domain) 274 * 0x83: Root Menu (only found in the VTSM domain) 276 * 0x84: Subpicture Menu (only found in the VTSM domain) 278 * 0x85: Audio Menu (only found in the VTSM domain) 280 * 0x86: Angle Menu (only found in the VTSM domain) 282 * 0x87: Chapter Menu (only found in the VTSM domain) 284 The next 4 following octets correspond to the User Operation flags in 285 the standard PGC. When a bit is set, the command SHOULD be disabled. 287 ChapProcessData contains the pre/post/cell commands in binary format 288 as there are stored on a DVD. There is just an octet preceding these 289 data to specify the number of commands in the element. As follows: 290 [# of commands(1)][command 1 (8)][command 2 (8)][command 3 (8)]. 292 More information on the DVD commands and format on DVD from the 293 [DVD-Info] project. 295 8. Normative References 297 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 298 Requirement Levels", BCP 14, RFC 2119, 299 DOI 10.17487/RFC2119, March 1997, 300 . 302 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 303 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 304 May 2017, . 306 9. Informative References 308 [DVD-Info] "DVD-Video Information", 309 . 311 Authors' Addresses 313 Steve Lhomme 314 Email: slhomme@matroska.org 316 Moritz Bunkus 317 Email: moritz@bunkus.org 319 Dave Rice 320 Email: dave@dericed.com