idnits 2.17.1 draft-ietf-payload-rtp-ttml-03.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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (October 7, 2019) is 1662 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'IANA' -- Possible downref: Non-RFC (?) normative reference: ref. 'TECH3370' -- Possible downref: Non-RFC (?) normative reference: ref. 'TTML-MTPR' -- Possible downref: Non-RFC (?) normative reference: ref. 'TTML2' Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 A/V Transport Payloads Workgroup J. Sandford 3 Internet-Draft British Broadcasting Corporation 4 Intended status: Standards Track October 7, 2019 5 Expires: April 9, 2020 7 RTP Payload for TTML Timed Text 8 draft-ietf-payload-rtp-ttml-03 10 Abstract 12 This memo describes a Real-time Transport Protocol (RTP) payload 13 format for TTML, an XML based timed text format for live and file 14 based workflows from W3C. This payload format is specifically 15 targeted at live workflows using TTML. 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 http://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 April 9, 2020. 34 Copyright Notice 36 Copyright (c) 2019 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 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Conventions, Definitions, and Abbreviations . . . . . . . . . 2 53 3. Media Format Description . . . . . . . . . . . . . . . . . . 3 54 3.1. Relation to Other Text Payload Types . . . . . . . . . . 3 55 3.2. TTML2 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 4. Payload Format . . . . . . . . . . . . . . . . . . . . . . . 3 57 4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 4 58 4.2. Payload Data . . . . . . . . . . . . . . . . . . . . . . 5 59 4.2.1. TTML Profile for RTP Carriage . . . . . . . . . . . . 5 60 5. Payload Examples . . . . . . . . . . . . . . . . . . . . . . 9 61 6. Congestion Control Considerations . . . . . . . . . . . . . . 10 62 7. Payload Format Parameters . . . . . . . . . . . . . . . . . . 11 63 7.1. Clock Rate . . . . . . . . . . . . . . . . . . . . . . . 11 64 7.2. Mapping to SDP . . . . . . . . . . . . . . . . . . . . . 11 65 7.2.1. Examples . . . . . . . . . . . . . . . . . . . . . . 12 66 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 67 9. Security Considerations . . . . . . . . . . . . . . . . . . . 12 68 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 69 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 70 11.1. Normative References . . . . . . . . . . . . . . . . . . 13 71 11.2. Informative References . . . . . . . . . . . . . . . . . 15 72 Appendix A. RFC Editor Considerations . . . . . . . . . . . . . 16 73 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 75 1. Introduction 77 TTML (Timed Text Markup Language)[TTML2] is a media type for 78 describing timed text such as closed captions (also known as 79 subtitles) in television workflows or broadcasts as XML. This 80 document specifies how TTML should be mapped into an RTP stream in 81 live workflows including, but not restricted to, those described in 82 the television broadcast oriented EBU-TT Part 3[TECH3370] 83 specification. This document does not define a media type for TTML 84 but makes use of the existing application/ttml+xml media type 85 [TTML-MTPR]. 87 2. Conventions, Definitions, and Abbreviations 89 Unless otherwise stated, the term "document" refers to the TTML 90 document being transmitted in the payload of the RTP packet(s). 92 The term "word" refers to byte aligned or 32-bit aligned words of 93 data in a computing sense and not to refer to linguistic words that 94 might appear in the transported text. 96 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 97 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 98 "OPTIONAL" in this document are to be interpreted as described in 99 BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all 100 capitals, as shown here. 102 3. Media Format Description 104 3.1. Relation to Other Text Payload Types 106 Prior payload types for text are not suited to the carriage of closed 107 captions in Television Workflows. RFC 4103 for Text Conversation 108 [RFC4103] is intended for low data rate conversation with its own 109 session management and minimal formatting capabilities. RFC 4734 110 Events for Modem, Fax, and Text Telephony Signals [RFC4734] deals in 111 large parts with the control signalling of facsimile and other 112 systems. RFC 4396 for 3rd Generation Partnership Project (3GPP) 113 Timed Text [RFC4396] describes the carriage of a timed text format 114 with much more restricted formatting capabilities than TTML. The 115 lack of an existing format for TTML or generic XML has necessitated 116 the creation of this payload format. 118 3.2. TTML2 120 TTML2 (Timed Text Markup Language, Version 2)[TTML2] is an XML-based 121 markup language for describing textual information with associated 122 timing metadata. One of its primary use cases is the description of 123 subtitles and closed captions. A number of profiles exist that adapt 124 TTML2 for use in specific contexts [TTML-MTPR]. These include both 125 file based and streaming workflows. 127 4. Payload Format 129 In addition to the required RTP headers, the payload contains a 130 section for the TTML document being transmitted (User Data Words), 131 and a field for the Length of that data. Each RTP payload contains 132 one or part of one TTML document. 134 A representation of the payload format for TTML is Figure 1. 136 0 1 2 3 137 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 138 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 139 |V=2|P|X| CC |M| PT | Sequence Number | 140 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 141 | Timestamp | 142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 143 | Synchronization Source (SSRC) Identifier | 144 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 145 | Reserved | Length | 146 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 147 | User Data Words... 148 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 150 Figure 1: RTP Payload Format for TTML 152 4.1. RTP Header Usage 154 RTP packet header fields SHALL be interpreted as per RFC 3550 155 [RFC3550], with the following specifics: 157 Marker Bit (M): 1 bit 158 The Marker Bit is set to "1" to indicate the last packet of a 159 document. Otherwise set to "0". Note: The first packet might 160 also be the last. 162 Timestamp: 32 bits 163 The RTP Timestamp encodes the time of the text in the packet. The 164 clock frequency used is dependent on the application and is 165 specified in the media type rate parameter as per Section 7.1. 166 Documents spread across multiple packets MUST use the same 167 timestamp but different consecutive Sequence Numbers. Sequential 168 documents MUST NOT use the same timestamp. Because packets do not 169 represent any constant duration, the timestamp cannot be used to 170 directly infer packet loss. 172 Reserved: 16 bits 173 These bits are reserved for future use and MUST be set to 0x0. 175 Length: 16 bits 176 The length of User Data Words in bytes. 178 User Data Words: The length of User Data Words MUST match the value 179 specified in the Length field 180 User Data Words contains the text of the whole document being 181 transmitted or a part of the document being transmitted. 182 Documents using character encodings where characters are not 183 represented by a single byte MUST be serialized in big endian 184 order, a.k.a. network byte order. When the document spans more 185 than one RTP packet, the entire document is obtained by 186 concatenating User Data Words from each contributing packet in 187 ascending order of Sequence Number. Note that the length of each 188 data word depends on the character encoding used: for UTF-8 a word 189 is 8 bits, while it is 16 bits for UTF-16. 191 4.2. Payload Data 193 Documents carried in User Data Words are encoded in accordance with 194 one of the defined TTML profiles specified in the TTML registry 195 [TTML-MTPR]. These profiles specify the document structure used, 196 systems models, timing, and other considerations. 198 Additionally, documents carried over RTP MUST conform to the 199 following profile. 201 4.2.1. TTML Profile for RTP Carriage 203 This section defines constraints on the content and processing of the 204 TTML payload for RTP carriage. 206 4.2.1.1. Payload content restrictions 208 Multiple TTML subtitle streams MUST NOT be interleaved in a single 209 RTP stream. 211 The TTML document instance MUST use the "media" value of the 212 "ttp:timeBase" parameter attribute on the root element. 214 This is equivalent to the following TTML2 content profile definition 215 document: 217 218 224 225 226 227 This document is a minimal TTML2 content profile 228 definition document intended to express the minimal 229 requirements to apply when carrying TTML over RTP. 230 231 232 #timeBase-media 233 #timeBase-smpte 234 #timeBase-clock 235 236 238 4.2.1.2. Payload processing requirements 240 If the TTML document payload is assessed to be invalid then it MUST 241 be discarded. When processing a valid document, the following 242 requirements apply. 244 Each TTML document becomes active at the epoch E. E MUST be set to 245 the RTP Timestamp in the header of the RTP packet carrying the TTML 246 document. Computed TTML media times are offset relative to E. 248 When processing a sequence of TTML documents each delivered in the 249 same RTP stream, exactly zero or one document SHALL be considered 250 active at each moment in the RTP time line. In the event that a 251 document D_(n-1) with E_(n-1) is active, and document D_(n) is 252 delivered with E_(n) where E_(n-1) < E_(n), processing of D_(n-1) 253 MUST be stopped at E_(n) and processing of D_(n) MUST begin. 255 When all defined content within a document has ended then processing 256 of the document MAY be stopped. This can be tested by constructing 257 the intermediate synchronic document sequence from the document, as 258 defined by TTML2. If the last intermediate synchronic document in 259 the sequence is both active and contains no region elements, then all 260 defined content within the document has ended. 262 4.2.1.2.1. TTML Processor profile 264 4.2.1.2.1.1. Feature extension designation 266 This specification defines the following TTML feature extension 267 designation: 269 o urn:ietf:rfc:XXXX#rtp-relative-media-time 271 The namespace "urn:ietf:rfc:XXXX" is as defined by [RFC2648]. 273 A TTML content processor supports the "#rtp-relative-media-time" 274 feature extension if it processes media times in accordance with the 275 payload processing requirements specified in this document, i.e. that 276 the epoch E is set to the time equivalent to the RTP Timestamp as 277 detailed above in Section 4.2.1.2. 279 4.2.1.2.1.2. Processor profile document 281 The required syntax and semantics declared in the following minimal 282 TTML2 processor profile MUST be supported by the receiver, as 283 signified by those "feature" or "extension" elements whose "value" 284 attribute is set to "required": 286 287 293 294 295 296 This document is a minimal TTML2 processor profile 297 definition document intended to express the minimal 298 requirements of a TTML processor able to process TTML 299 delivered over RTP according to RFC XXXX. 300 301 302 #timeBase-media 303 #profile-full-version-2 304 305 306 307 #rtp-relative-media-time 308 309 310 312 Note that this requirement does not imply that the receiver needs to 313 support either TTML1 or TTML2 profile processing, i.e. the TTML2 314 "#profile-full-version-2" feature or any of its dependent features. 316 4.2.1.2.1.3. Processor profile signalling 318 The "codecs" media type parameter MUST specify at least one processor 319 profile. Short codes for TTML profiles are registered at 320 [TTML-MTPR]. The processor profiles specified in "codecs" MUST be 321 compatible with the processor profile specified in this document. 322 Where multiple options exist in "codecs" for possible processor 323 profile combinations (i.e. separated by "|" operator), every 324 permitted option MUST be compatible with the processor profile 325 specified in this document. Where processor profiles other than the 326 one specified in this document are advertised in the "codecs" 327 parameter, the requirements of the processor profile specified in 328 this document MAY be signalled additionally using the "+" operator 329 with its registered short code. 331 A processor profile (X) is compatible with the processor profile 332 specified here (P) if X includes all the features and extensions in 333 P, identified by their character content, and the "value" attribute 334 of each is at least as restrictive as the "value" attribute of the 335 feature or extension in P that has the same character content. The 336 term "restrictive" here is as defined in [TTML2] Section 6. 338 5. Payload Examples 340 The following is an example of a valid TTML document that may be 341 carried using the payload format described in this document: 343 344 351 352 353 Timed Text TTML Example 354 The Authors (c) 2006 355 356 357 358