A/V Transport Payloads Workgroup J. Sandford Internet-Draft British Broadcasting Corporation Intended status: Informational January 24, 2019 Expires: July 28, 2019 RTP Payload for TTML Timed Text draft-sandford-payload-rtp-ttml-01 Abstract This memo describes a Real-time Transport Protocol (RTP) payload format for TTML, an XML based timed text format for live and file based workflows from W3C. This payload format is specifically targeted at live workflows using TTML. Status of This Memo This Internet-Draft is submitted in full conformance with the 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 and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on July 28, 2019. Copyright Notice Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Sandford Expires July 28, 2019 [Page 1] Internet-Draft RTP Payload for TTML Timed Text January 2019 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Conventions, Definitions, and Abbreviations . . . . . . . . . 2 3. Media Format Description . . . . . . . . . . . . . . . . . . 3 3.1. Relation to Other Text Payload Types . . . . . . . . . . 3 4. Payload Format . . . . . . . . . . . . . . . . . . . . . . . 3 4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 4 4.2. Payload Data . . . . . . . . . . . . . . . . . . . . . . 4 4.2.1. TTML Profile for RTP Carriage . . . . . . . . . . . . 5 5. Payload Examples . . . . . . . . . . . . . . . . . . . . . . 6 6. Congestion Control Considerations . . . . . . . . . . . . . . 7 7. Payload Format Parameters . . . . . . . . . . . . . . . . . . 8 7.1. Media Type Definition . . . . . . . . . . . . . . . . . . 8 7.2. Clock Rate . . . . . . . . . . . . . . . . . . . . . . . 12 7.3. Mapping to SDP . . . . . . . . . . . . . . . . . . . . . 12 7.3.1. Examples . . . . . . . . . . . . . . . . . . . . . . 12 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 14 10.1. Normative References . . . . . . . . . . . . . . . . . . 14 10.2. Informative References . . . . . . . . . . . . . . . . . 15 Appendix A. RFC Editor Considerations . . . . . . . . . . . . . 15 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 15 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 1. Introduction TTML (Timed Text Markup Language)[TTML] is a media type for describing timed text such as closed captions (also known as subtitles) in television workflows or broadcasts as XML. This document specifies how TTML should be mapped into an RTP stream in live workflows including, but not restricted to, those described in the television broadcast oriented EBU-TT Part 3[TECH3370] specification. 2. Conventions, Definitions, and Abbreviations Unless otherwise stated, the term "document" is used in this draft to refer to the TTML document being transmitted in the payload of the RTP packet(s). Where the term "word" is used in this draft, it is to refer to byte aligned or 32-bit aligned words of data in a computing sense and not to refer to linguistic words that might appear in the transported text. Sandford Expires July 28, 2019 [Page 2] Internet-Draft RTP Payload for TTML Timed Text January 2019 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 3. Media Format Description 3.1. Relation to Other Text Payload Types Prior payload types for text are not suited to the carriage of closed captions in Television Workflows. RFC 4103 for Text Conversation [RFC4103] is intended for low data rate conversation with its own session management and minimal formatting capabilities. RFC 4734 Events for Modem, Fax, and Text Telephony Signals [RFC4734] deals in large parts with the control signalling of facsimile and other systems. RFC 4396 for 3rd Generation Partnership Project (3GPP) Timed Text [RFC4396] describes the carriage of a timed text format with much more restricted formatting capabilities than TTML. The lack of an existing format for TTML or generic XML has necessitated the creation of this payload format. 4. Payload Format In addition to the required RTP headers, the payload contains a section for the TTML document being transmitted (User Data Words), and a field for the Length of that data. Each RTP payload contains one or part of one TTML document. A representation of the payload format for TTML is Figure 1. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |V=2|P|X| CC |M| PT | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Timestamp | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Synchronization Source (SSRC) Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | User Data Words... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1: RTP Payload Format for TTML Sandford Expires July 28, 2019 [Page 3] Internet-Draft RTP Payload for TTML Timed Text January 2019 4.1. RTP Header Usage RTP packet header fields SHALL be interpreted as per RFC 3550 [RFC3550], with the following specifics: Marker Bit (M): 1 bit The Marker Bit is set to "1" to indicate the last packet of a document. Otherwise set to "0". Note: The first packet might also be the last. Timestamp: 32 bits The RTP Timestamp encodes the time of the text in the packet. The clock frequency used is dependent on the application and is specified in the media type rate parameter as per Section 7.2. Documents spread across multiple packets MUST use the same timestamp but different consecutive Sequence Numbers. Sequential documents MUST NOT use the same timestamp. Because packets do not represent any constant duration, the timestamp cannot be used to directly infer packet loss. Reserved: 16 bits These bits are reserved for future use and MUST be set to 0x0. Length: 16 bits The length of User Data Words in bytes. User Data Words: integer number of words whose length is defined by the character encoding User Data Words contains the text of the whole document being transmitted or a part of the document being transmitted. Documents using character encodings where characters are not represented by a single byte MUST be serialized in big endian order, a.k.a. network byte order. When the document spans more than one RTP packet, the entire document is obtained by concatenating User Data Words from each contributing packet in ascending order of Sequence Number. 4.2. Payload Data Documents carried in User Data Words are encoded in accordance with one of the defined TTML profiles specified in its registry [TTML]. These profiles specify the document structure used, systems models, timing, and other considerations. Additionally, documents carried over RTP MUST conform to the following profile. Sandford Expires July 28, 2019 [Page 4] Internet-Draft RTP Payload for TTML Timed Text January 2019 4.2.1. TTML Profile for RTP Carriage This section defines constraints on the content and processing of the TTML payload for RTP carriage. 4.2.1.1. Payload content restrictions Multiple TTML subtitle streams MUST NOT be interleaved in a single RTP stream. The TTML document instance MUST use the "media" value of the "ttp:timeBase" parameter attribute on the root element. This is equivalent to the following TTML2 content profile definition document: This document is a minimal TTML2 content profile definition document intended to express the minimal requirements to apply when carrying TTML over RTP. #timeBase-media #timeBase-smpte #timeBase-clock 4.2.1.2. Payload processing requirements If the TTML document payload is assessed to be invalid then it MUST be discarded. When processing a valid document, the following requirements apply. The epoch E relative to which computed TTML media times are offset MUST be set to the RTP Timestamp in the header of the RTP packet in which the TTML document instance is carried. Sandford Expires July 28, 2019 [Page 5] Internet-Draft RTP Payload for TTML Timed Text January 2019 When processing a sequence of TTML documents each delivered in the same RTP stream, exactly zero or one document SHALL be considered active at each moment in the RTP time line. Each TTML document becomes active at E. In the event that a document D_(n-1) with E_(n-1) is active, and document D_(n) is delivered with E_(n) where E_(n-1) < E_(n), processing of D_(n-1) MUST be stopped at E_(n) and processing of D_(n) MUST begin. When all defined content within a document has ended, i.e. the active intermediate synchronic document contains no content, then processing of the document MAY be stopped. 4.2.1.2.1. EBU-TT Live considerations EBU-TT Live is a profile of TTML intended to support live contribution of TTML documents as a stream independently of the carriage mechanism. When EBU-TT Live documents are carried in an RTP stream, or when the TTML documents being transferred over RTP use EBU-TT Live semantics, the following considerations apply: E is considered to be the Availability Time as defined by EBU-TT Live. It is an error if two documents are delivered such that E_(n-1) < E_(n) and the "ebuttp:sequenceNumber" of E_(n-1) is greater than the "ebuttp:sequenceNumber" of E_(n). Every EBU-TT Live document in a single RTP stream MUST have a "ebuttp:sequenceIdentifier" with the same value. 5. Payload Examples The following is an example of a valid TTML document that may be carried using the payload format described in this document: Sandford Expires July 28, 2019 [Page 6] Internet-Draft RTP Payload for TTML Timed Text January 2019 Timed Text TTML Example The Authors (c) 2006