idnits 2.17.1 draft-ietf-cellar-control-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 726 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). 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 Control Track Specifications 10 draft-ietf-cellar-control-01 12 Abstract 14 This document defines the Control Track usage found in the Matroska 15 container. 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 . . . . . . . . . . . . . . . . . . 3 55 6. Edition Flags . . . . . . . . . . . . . . . . . . . . . . . . 3 56 6.1. EditionFlagHidden . . . . . . . . . . . . . . . . . . . . 3 57 6.2. EditionFlagDefault . . . . . . . . . . . . . . . . . . . 4 58 6.3. Default Edition . . . . . . . . . . . . . . . . . . . . . 4 59 7. Chapter Flags . . . . . . . . . . . . . . . . . . . . . . . . 6 60 7.1. ChapterFlagEnabled . . . . . . . . . . . . . . . . . . . 6 61 8. Matroska Schema . . . . . . . . . . . . . . . . . . . . . . . 6 62 8.1. Segment . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 8.1.1. Chapters . . . . . . . . . . . . . . . . . . . . . . 7 64 8.1.1.1. EditionEntry . . . . . . . . . . . . . . . . . . 7 65 9. Menu Specifications . . . . . . . . . . . . . . . . . . . . . 8 66 9.1. Requirements . . . . . . . . . . . . . . . . . . . . . . 9 67 9.1.1. Highlights/Hotspots . . . . . . . . . . . . . . . . . 9 68 9.1.2. Playback features . . . . . . . . . . . . . . . . . . 10 69 9.1.3. Player requirements . . . . . . . . . . . . . . . . . 10 70 9.2. Working Graph . . . . . . . . . . . . . . . . . . . . . . 10 71 10. Normative References . . . . . . . . . . . . . . . . . . . . 10 72 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 74 1. Introduction 76 2. Status of this document 78 This document is a work-in-progress specification defining the 79 Matroska file format as part of the IETF Cellar working group 80 (https://datatracker.ietf.org/wg/cellar/charter/). It uses basic 81 elements and concept already defined in the Matroska specifications 82 defined by this workgroup. 84 3. Security Considerations 86 This document inherits security considerations from the EBML and 87 Matroska documents. 89 4. IANA Considerations 91 To be determined. 93 5. Notation and Conventions 95 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 96 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 97 "OPTIONAL" in this document are to be interpreted as described in BCP 98 14 [RFC2119] [RFC8174] when, and only when, they appear in all 99 capitals, as shown here. 101 6. Edition Flags 103 6.1. EditionFlagHidden 105 When the EditionFlagHidden flag is set to false it means the Edition 106 is visible and selectable in a Matroska Player. All ChapterAtoms 107 Elements MUST be interpreted with their own ChapterFlagHidden flags. 109 +===================+=======+======+=========+ 110 | ChapterFlagHidden | False | True | visible | 111 +===================+=======+======+=========+ 112 | Chapter 1 | X | | yes | 113 +-------------------+-------+------+---------+ 114 | Chapter 2 | | X | no | 115 +-------------------+-------+------+---------+ 117 Table 1: ChapterAtom visibility to the user 119 When the EditionFlagHidden flag is set to true the Edition is hidden 120 and SHOULD NOT be selectable in a Matroska Player. If all Editions 121 EditionFlagHidden flags are set to true, there is no visible Edition. 122 In this case all ChapterAtoms Elements MUST also be interpreted as if 123 their ChapterFlagHidden flag is also set to true, regardless with 124 their own ChapterFlagHidden flags. 126 +===================+=======+======+=========+ 127 | ChapterFlagHidden | False | True | visible | 128 +===================+=======+======+=========+ 129 | Chapter 1 | X | | no | 130 +-------------------+-------+------+---------+ 131 | Chapter 2 | | X | no | 132 +-------------------+-------+------+---------+ 134 Table 2: ChapterAtom visibility in hidden 135 editions 137 6.2. EditionFlagDefault 139 It is RECOMMENDED that no more than one Edition have an 140 EditionFlagDefault Flag set to true. The first Edition with both the 141 EditionFlagDefault Flag set to true and the EditionFlagHidden Flag 142 set to false is the Default Edition. When all EditionFlagDefault 143 Flags are set to false, then the first Edition with the 144 EditionFlagHidden Flag set to false is the Default Edition. The 145 Default Edition is the edition that should be used for playback by 146 default. 148 6.3. Default Edition 150 The Default Edition is the Edition that a Matroska Player SHOULD use 151 for playback by default. 153 The first Edition with both the EditionFlagDefault flag set to true 154 and the EditionFlagHidden flag set to false is the Default Edition. 155 When all EditionFlagDefault flags are set to false and all 156 EditionFlagHidden flag set to true, then the first Edition is the 157 Default Edition. When all EditionFlagHidden flags are set to true, 158 then the first Edition with the EditionFlagDefault flag set to true 159 is the Default Edition. When all EditionFlagDefault flags are set to 160 false, then the first Edition with the EditionFlagHidden flag set to 161 false is the Default Edition. When there is no Edition with a 162 EditionFlagDefault flag are set to true and a EditionFlagHidden flags 163 are set to false, then the first Edition with the EditionFlagHidden 164 flag set to false is the Default Edition. 166 In other words, in case the Default Edition is not obvious, the first 167 Edition with a EditionFlagHidden flag set to false SHOULD be 168 preferred. 170 +===========+============+=============+=================+ 171 | Edition | FlagHidden | FlagDefault | Default Edition | 172 +===========+============+=============+=================+ 173 | Edition 1 | true | true | | 174 +-----------+------------+-------------+-----------------+ 175 | Edition 2 | true | true | | 176 +-----------+------------+-------------+-----------------+ 177 | Edition 3 | false | true | X | 178 +-----------+------------+-------------+-----------------+ 180 Table 3: Default edition, some visible, all default 182 +===========+============+=============+=================+ 183 | Edition | FlagHidden | FlagDefault | Default Edition | 184 +===========+============+=============+=================+ 185 | Edition 1 | true | false | X | 186 +-----------+------------+-------------+-----------------+ 187 | Edition 2 | true | false | | 188 +-----------+------------+-------------+-----------------+ 189 | Edition 3 | true | false | | 190 +-----------+------------+-------------+-----------------+ 192 Table 4: Default edition, all hidden, no default 194 +===========+============+=============+=================+ 195 | Edition | FlagHidden | FlagDefault | Default Edition | 196 +===========+============+=============+=================+ 197 | Edition 1 | true | false | | 198 +-----------+------------+-------------+-----------------+ 199 | Edition 2 | true | true | X | 200 +-----------+------------+-------------+-----------------+ 201 | Edition 3 | true | false | | 202 +-----------+------------+-------------+-----------------+ 204 Table 5: Default edition, all hidden, with default 206 +===========+============+=============+=================+ 207 | Edition | FlagHidden | FlagDefault | Default Edition | 208 +===========+============+=============+=================+ 209 | Edition 1 | true | false | | 210 +-----------+------------+-------------+-----------------+ 211 | Edition 2 | false | false | X | 212 +-----------+------------+-------------+-----------------+ 213 | Edition 3 | false | false | | 214 +-----------+------------+-------------+-----------------+ 216 Table 6: Default edition, some visible, no default 218 +===========+============+=============+=================+ 219 | Edition | FlagHidden | FlagDefault | Default Edition | 220 +===========+============+=============+=================+ 221 | Edition 1 | true | false | | 222 +-----------+------------+-------------+-----------------+ 223 | Edition 2 | true | true | | 224 +-----------+------------+-------------+-----------------+ 225 | Edition 3 | false | false | X | 226 +-----------+------------+-------------+-----------------+ 228 Table 7: Default edition, some visible, some default 230 7. Chapter Flags 232 If a Control Track toggles the parent's ChapterFlagHidden flag to 233 false, then only the parent ChapterAtom and its second child 234 ChapterAtom MUST be interpreted as if ChapterFlagHidden is set to 235 false. The first child ChapterAtom, which has the ChapterFlagHidden 236 flag set to true, retains its value until its value is toggled to 237 false by a Control Track. 239 The ChapterFlagEnabled value can be toggled by control tracks. 241 7.1. ChapterFlagEnabled 243 If the ChapterFlagEnabled flag is set to false a Matroska Player MUST 244 NOT use this Chapter and all his Nested Chapters. For Simple 245 Chapters, a Matroska Player MAY display this enabled Chapter with a 246 marker in the timeline. For Ordered Chapters a Matroska Player MUST 247 use the duration of this enabled Chapter. 249 +==========================+====================+======+ 250 | Chapter + Nested Chapter | ChapterFlagEnabled | used | 251 +==========================+====================+======+ 252 | Chapter 1 | true | yes | 253 +--------------------------+--------------------+------+ 254 | +Nested Chapter 1.1 | true | yes | 255 +--------------------------+--------------------+------+ 256 | +Nested Chapter 1.2 | false | no | 257 +--------------------------+--------------------+------+ 258 | ++Nested Chapter 1.2.1 | true | no | 259 +--------------------------+--------------------+------+ 260 | ++Nested Chapter 1.2.2 | false | no | 261 +--------------------------+--------------------+------+ 262 | Chapter 2 | false | no | 263 +--------------------------+--------------------+------+ 264 | +Nested Chapter 2.1 | true | no | 265 +--------------------------+--------------------+------+ 266 | +Nested Chapter 2.2 | true | no | 267 +--------------------------+--------------------+------+ 269 Table 8 271 8. Matroska Schema 273 Extra elements used to handle Control Tracks and advanced selection 274 features: 276 8.1. Segment 277 8.1.1. Chapters 279 8.1.1.1. EditionEntry 281 8.1.1.1.1. EditionFlagHidden Element 283 name: EditionFlagHidden 285 path: \Segment\Chapters\EditionEntry\EditionFlagHidden 287 id: 0x45BD 289 minOccurs: 1 291 maxOccurs: 1 293 range: 0-1 295 default: 0 297 type: uinteger 299 definition: Set to 1 if an edition is hidden. Hidden editions 300 SHOULD NOT be available to the user interface (but still to 301 Control Tracks; see Section 7 on Chapter flags). 303 8.1.1.1.1.1. ChapterFlagEnabled Element 305 name: ChapterFlagEnabled 307 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterFlagEnabled 309 id: 0x4598 311 minOccurs: 1 313 maxOccurs: 1 315 range: 0-1 317 default: 1 319 type: uinteger 321 definition: Set to 1 if the chapter is enabled. It can be enabled/ 322 disabled by a Control Track. When disabled, the movie SHOULD skip 323 all the content between the TimeStart and TimeEnd of this chapter; 324 see Section 7 on Chapter flags. 326 8.1.1.1.1.2. ChapterTrack Element 328 name: ChapterTrack 330 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTrack 332 id: 0x8F 334 maxOccurs: 1 336 type: master 338 definition: List of tracks on which the chapter applies. If this 339 Element is not present, all tracks apply 341 8.1.1.1.1.3. ChapterTrackUID Element 343 name: ChapterTrackUID 345 path: \Segment\Chapters\EditionEntry\+ChapterAtom\ChapterTrack\Chapt 346 erTrackUID 348 id: 0x89 350 minOccurs: 1 352 range: not 0 354 type: uinteger 356 definition: UID of the Track to apply this chapter to. In the 357 absence of a control track, choosing this chapter will select the 358 listed Tracks and deselect unlisted tracks. Absence of this 359 Element indicates that the Chapter SHOULD be applied to any 360 currently used Tracks. 362 9. Menu Specifications 364 This document is a _draft of the Menu system_ that will be the 365 default one in Matroska. As it will just be composed of a Control 366 Track, it will be seen as a "codec" and could be replaced later by 367 something else if needed. 369 A menu is like what you see on DVDs, when you have some screens to 370 select the audio format, subtitles or scene selection. 372 9.1. Requirements 374 What we'll try to have is a system that can do almost everything done 375 on a DVD, or more, or better, or drop the unused features if 376 necessary. 378 As the name suggests, a Control Track is a track that can control the 379 playback of the file and/or all the playback features. To make it as 380 simple as possible for Matroska Players, the Control Track will just 381 give orders to the Matroska Player and get the actions associated 382 with the highlights/hotspots. 384 9.1.1. Highlights/Hotspots 386 A highlight is basically a rectangle/key associated with an action 387 UID. When that rectangle/key is activated, the Matroska Player send 388 the UID of the action to the Control Track handler (codec). The fact 389 that it can also be a key means that even for audio only files, a 390 keyboard shortcut or button panel could be used for menus. But in 391 that case, the hotspot will have to be associated with a name to 392 display. 394 This highlight is sent from the Control Track to the Matroska Player. 395 Then the Matroska Player has to handle that highlight until it's 396 deactivated; see Section 9.1.2. 398 The highlight contains a UID of the action, a displayable name (UTF- 399 8), an associated key (list of keys to be defined, probably 400 up/down/left/right/select), a screen position/range and an image to 401 display. The image will be displayed either when the user place the 402 mouse over the rectangle (or any other shape), or when an option of 403 the screen is selected (not activated). There could be a second 404 image used when the option is activated. And there could be a third 405 image that can serve as background. This way you could have a still 406 image (like in some DVDs) for the menu and behind that image blank 407 video (small bitrate). 409 When a highlight is activated by the user, the Matroska Player has to 410 send the UID of the action to the Control Track. Then the Control 411 Track codec will handle the action and possibly give new orders to 412 the Matroska Player. 414 The format used for storing images SHOULD be extensible. For the 415 moment we'll use PNG and BMP, both with alpha channel. 417 9.1.2. Playback features 419 All the following features will be sent from the Control Track to the 420 Matroska Player : 422 * Jump to chapter (UID, prev, next, number) 424 * Disable all tracks of a kind (audio, video, subtitle) 426 * Enable track UID (the kind doesn't matter) 428 * Define/Disable a highlight 430 * Enable/Disable jumping 432 * Enable/Disable track selection of a kind 434 * Select Edition ID (see chapters) 436 * Pause playback 438 * Stop playback 440 * Enable/Disable a Chapter UID 442 * Hide/Unhide a Chapter UID 444 All the actions will be written in a normal Matroska track, with a 445 timestamp. A "Menu Frame" SHOULD be able to contain more that one 446 action/highlight for a given timestamp. (to be determined, EBML 447 format structure) 449 9.1.3. Player requirements 451 Some Matroska Players might not support the control track. That mean 452 they will play the active/looped parts as part of the data. So I 453 suggest putting the active/looped parts of a movie at the end of a 454 movie. When a Menu-aware Matroska Player encounter the default 455 Control Track of a Matroska file, the first order SHOULD be to jump 456 at the start of the active/looped part of the movie. 458 9.2. Working Graph 460 Matroska Source file -> Control Track <-> Player. 461 -> other tracks -> rendered 463 10. Normative References 465 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 466 Requirement Levels", BCP 14, RFC 2119, 467 DOI 10.17487/RFC2119, March 1997, 468 . 470 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 471 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 472 May 2017, . 474 Authors' Addresses 476 Steve Lhomme 477 Email: slhomme@matroska.org 479 Moritz Bunkus 480 Email: moritz@bunkus.org 482 Dave Rice 483 Email: dave@dericed.com