RFC 8088
How to Write an RTP Payload Format
How to Write an RTP Payload Format ๐
RFC 8088 โจ bestie, this one's titled How to Write an RTP Payload Format. It was written by M. Westerlund from Ericsson and published in May 2017. It's Informational (so not a Standards Track spec ๐ ) and it's part of the IETF stream, with ISSN 2070-1721. It updates RFC 2736 and doesn't obsolete anything ๐ฆ.
Abstract ๐ธ
Okay so this doc is all about how to write an RTP payload format spec the right way ๐. It gives you reading tips, design practices, and practical tricks for getting a spec out quickly and with great results ๐. There's also a template with instructions included, iykyk ๐ง.
Status of This Memo ๐
This document is not an Internet Standards Track specification. It's published for informational purposes only ๐.
It's a product of the Internet Engineering Task Force (IETF) and represents the consensus of the IETF community. It went through public review and got approved for publication by the Internet Engineering Steering Group (IESG) โจ. Not every IESG-approved document is a candidate for any level of Internet Standard, so check Section 2 of RFC 7841 if you're curious ๐.
If you want the current status, errata, or a way to send feedback, head to http://www.rfc-editor.org/info/rfc8088 ๐.
Copyright Notice ๐
Copyright (c) 2017 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 (http://trustee.ietf.org/license-info) as they stand on the date of publication. Please read these carefully, bestie, because they spell out your rights and restrictions for this document ๐ซถ. Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License ๐.
Table of Contents ๐
1. Introduction ....................................................4
1.1. Structure ..................................................4
2. Terminology .....................................................5
2.1. Definitions ................................................5
2.2. Abbreviations ..............................................5
2.3. Use of Normative Requirements Language .....................6
3. Preparations ....................................................6
3.1. Read and Understand the Media Coding Specification .........6
3.2. Recommended Reading ........................................7
3.2.1. IETF Process and Publication ........................7
3.2.2. RTP .................................................9
3.3. Important RTP Details .....................................13
3.3.1. The RTP Session ....................................13
3.3.2. RTP Header .........................................14
3.3.3. RTP Multiplexing ...................................16
3.3.4. RTP Synchronization ................................16
3.4. Signaling Aspects .........................................18
3.4.1. Media Types ........................................19
3.4.2. Mapping to SDP .....................................20
3.5. Transport Characteristics .................................23
3.5.1. Path MTU ...........................................23
3.5.2. Different Queuing Algorithms .......................23
3.5.3. Quality of Service .................................24
4. Standardization Process for an RTP Payload Format ..............24
4.1. IETF ......................................................25
4.1.1. Steps from Idea to Publication .....................25
4.1.2. WG Meetings ........................................27
4.1.3. Draft Naming .......................................27
4.1.4. Writing Style ......................................28
4.1.5. How to Speed Up the Process ........................29
4.2. Other Standards Bodies ....................................29
4.3. Proprietary and Vendor Specific ...........................30
4.4. Joint Development of Media Coding Specification
and RTP Payload Format ....................................31
5. Designing Payload Formats ......................................31
5.1. Features of RTP Payload Formats ...........................32
5.1.1. Aggregation ........................................32
5.1.2. Fragmentation ......................................33
5.1.3. Interleaving and Transmission Rescheduling .........33
5.1.4. Media Back Channels ................................34
5.1.5. Media Scalability ..................................34
5.1.6. High Packet Rates ..................................37
5.2. Selecting Timestamp Definition ............................37
6. Noteworthy Aspects in Payload Format Design ....................39
6.1. Audio Payloads ............................................39
6.2. Video .....................................................40
6.3. Text ......................................................41
6.4. Application ...............................................41
7. Important Specification Sections ...............................42
7.1. Media Format Description ..................................42
7.2. Security Considerations ...................................43
7.3. Congestion Control ........................................44
7.4. IANA Considerations .......................................45
8. Authoring Tools ................................................45
8.1. Editing Tools .............................................46
8.2. Verification Tools ........................................46
9. Security Considerations ........................................47
10. Informative References ........................................47
Appendix A. RTP Payload Format Template ...........................58
A.1. Title .....................................................58
A.2. Front-Page Boilerplate ....................................58
A.3. Abstract ..................................................58
A.4. Table of Contents .........................................58
A.5. Introduction ..............................................59
A.6. Conventions, Definitions, and Abbreviations ...............59
A.7. Media Format Description ..................................59
A.8. Payload Format ............................................59
A.8.1. RTP Header Usage ......................................59
A.8.2. Payload Header ........................................59
A.8.3. Payload Data ..........................................60
A.9. Payload Examples ..........................................60
A.10. Congestion Control Considerations .........................60
A.11. Payload Format Parameters .................................60
A.11.1. Media Type Definition ................................60
A.11.2. Mapping to SDP .......................................62
A.12. IANA Considerations .......................................63
A.13. Security Considerations ...................................63
A.14. RFC Editor Considerations .................................64
A.15. References ................................................64
A.15.1. Normative References .................................64
A.15.2. Informative References ...............................64
A.16. Authors' Addresses ........................................64
Acknowledgements ..................................................64
Contributors ......................................................65
Author's Address ..................................................65
1. Introduction โจ
Okay, first things first: RTP [RFC3550] payload formats define how a specific real-time data format is structured inside the payload of an RTP packet ๐. A real-time data format without a payload format spec can't be sent over RTP at all, so lots of people with media encoders or other real-time data want to write RTP payload formats ๐. But writing a well-designed one is not easy ๐ญ. You need to know RTP and the real-time data format you're working with.
This doc is here to help any author of an RTP payload format spec make the important design decisions, and to think about the key RTP features and RTP security stuff ๐ฅ. It's also a solid starting point for anyone who's new to the IETF and/or RTP and wants to learn the steps ๐ฆ.
This document extends and updates the info in "Guidelines for Writers of RTP Payload Format Specifications" [RFC2736] ๐ . A lot of experience has been gained since that RFC was written, and several new RTP profiles and robustness tools have been defined. Those need to be considered now ๐ธ.
It also covers where you can define an RTP payload format: the IETF, other standards bodies, or proprietary venues ๐.
Heads up, though: this document talks about IETF, IANA, and RFC Editor processes and rules as they were when it was published ๐. That's so you can see how the work of specifying an RTP payload format depends on, uses, and interacts with those rules and processes. These rules and processes can change, and the formal rule and process specs always take precedence over anything written here ๐.
1.1. Structure ๐ง
This document has several parts, each one covering a different aspect of creating an RTP payload format spec ๐. Section 3 covers the preparations the author(s) should make before starting to write a spec โจ. Section 4 covers the different processes used when specifying and finishing a payload format, with a focus on working inside the IETF ๐. Section 5 digs into the design of payload formats themselves ๐ฅ. Section 6 looks at current design trends and gives good examples of practices that should be followed when they apply ๐ . Then Section 7 talks about the important sections in the RTP payload format spec itself, like Security Considerations and IANA Considerations ๐ซถ. The document ends with an appendix containing a template you can use when writing RTP payload format specs ๐.
2. Terminology ๐
2.1. Definitions
- RTP Stream: Okay so an RTP stream is a sequence of RTP packets ๐ that together carry part or all of the content of a specific media (audio, video, text, or data whose form and meaning are defined by a specific real-time application) from a specific sender source within a given RTP session. โจ
- RTP Session: This is an association among a set of participants communicating with RTP ๐ฆ. The distinguishing feature is that each session maintains a full, separate space of synchronization source (SSRC) identifiers. ๐ See also Section 3.3.1.
- RTP Payload Format: The RTP payload format specifies how units of a specific encoded media are put into the RTP packet payloads and how the fields of the RTP packet header are used ๐ง. That's what makes the format usable in RTP applications. ๐
Bestie, the taxonomy document [RFC7656] (A Taxonomy of Semantics and Mechanisms for Real-Time Transport Protocol (RTP) Sources) defines loads of useful terms too, so go check it out. ๐ธ
2.2. Abbreviations
- ABNF: Augmented Backus-Naur Form [RFC5234]
- ADU: Application Data Unit
- ALF: Application Level Framing
- ASM: Any-Source Multicast
- BCP: Best Current Practice
- I-D: Internet-Draft
- IESG: Internet Engineering Steering Group
- MTU: Maximum Transmission Unit
- WG: Working Group
- QoS: Quality of Service
- RFC: Request For Comments
- RTP: Real-time Transport Protocol
- RTCP: RTP Control Protocol
- RTT: Round-Trip Time
- SSM: Source-Specific Multicast
2.3. Use of Normative Requirements Language
Okay this one is a big vibe check ๐. This document is both Informational and instructional rather than a specification, so it does not use any RFC 2119 language ๐. The words "may", "should", "recommended", and "must" carry no special connotation here, they're just regular words. ๐
3. Preparations โจ
Ngl, RTP is a complex real-time media delivery framework ๐ with a lot of details you need to think about when writing an RTP payload format. You also need a good understanding of the media codec or format, so that all of its important features and properties get considered. ๐ฅ Only when you understand both parts can you produce an RTP payload format of high quality ๐. On top of that, you need to get the IETF process and especially the Working Group responsible for standardizing payload formats (currently the PAYLOAD WG) so you can go quickly from the initial idea to a finished RFC ๐ฆ. This section and the next ones help an author get ready for all of that. ๐ซถ
3.1. Read and Understand the Media Coding Specification
It may be obvious, but an author of an RTP payload specification needs a solid understanding of the media being transported ๐ . Not only the transport aspects spelled out in the media coding specification (if there are any), but also the core concepts of the underlying technology matter ๐ง . For example, an RTP payload format for video coded with inter-picture prediction will perform poorly if the payload designer doesn't account for inter-picture prediction ๐ญ. On the flip side, some (mostly older) media codecs come with error-resilience tools against bit errors, and when you misapply those over RTP, they almost always just add overhead with no measurable return ๐.
3.2. Recommended Reading
Here's the reading list ๐. You don't have to read every single thing in full detail ๐ธ, but an author basically needs to be aware of everything below. ๐
3.2.1. IETF Process and Publication
Newcomers to the IETF are strongly recommended to read the "Tao of the IETF" [TAO] ๐ง. It covers most of what you need to know: the history, the organizational structure, how the WGs and meetings work, and so on. ๐
It is very important to understand the IETF Intellectual Property Rights (IPR) policy ๐จ. It requires early disclosures based on personal knowledge from anyone contributing to the IETF. The IETF IPR policies are documented in BCP 78 [BCP78] (copyright, including software copyright, like code) and BCP 79 [BCP79] (patent rights). These rules may be different from other standardization organizations, so be careful! ๐ For example, if a person has a patent or patent application that they reasonably and personally believe covers a mechanism that gets added to the Internet-Draft they're contributing to (by submitting the draft, posting comments or suggestions on a mailing list, or speaking at a meeting), they will need to make a timely IPR disclosure. ๐ Read the above documents for the authoritative rules. Messing up the IPR rules can have dire implications for the specification and the authors, as discussed in [RFC6701]. ๐ฑ
Note: These IPR rules apply to what is specified in the RTP payload format Internet-Draft (and later RFC). An IPR that relates to a codec specification from an external body does not require an IETF IPR disclosure ๐. Informative text explaining the nature of the codec would not normally require an IETF IPR declaration. The appropriate IPR declarations for the codec itself would normally be found in the files of the external body defining the codec, following that external body's own IPR rules. ๐ซถ
The main part of the IETF process is formally defined in BCP 9 [BCP9] ๐. BCP 25 [BCP25] describes the WG process, the relationship between the IESG and the WG, and the responsibilities of WG Chairs and participants. ๐ฆ
It's important to know that the RFC Series contains documents from several different publication streams, as defined by The RFC Series and RFC Editor [RFC4844] ๐ง. The stream that matters most for RTP payload format authors is the IETF Stream, where the work of the IETF is published ๐. This stream holds documents in several categories: Standards Track, Informational, Experimental, Best Current Practice, and Historic ๐. "Standards Track" has two maturity levels: Proposed Standard and Internet Standard [RFC6410] โจ. A Standards Track document must start as a Proposed Standard, and after successful deployment and operational experience with at least two implementations, it can move up to an Internet Standard ๐ฅ. The Independent Submission Stream might look interesting because it publishes documents in categories like Experimental and Informational with a different review process ๐. However, as long as the IETF has a WG chartered to work on RTP payload formats, this stream should not be used. ๐ โโ๏ธ
Once an RFC is published its content can't change, so the only way to modify one is to write and publish a new one that either updates or replaces the old one ๐ . That means whether you're reading or referencing an RFC, you need to check the Category field in the document header AND make sure the RFC is the latest on the subject and still valid ๐. One way to check the current status is the RFC Editor's RFC search page (https://www.rfc-editor.org/search), which shows the current status and which RFC, if any, has updated or obsoleted it ๐ซ. The search engine will also tell you if any errata reports exist for the RFC ๐. A verified errata report contains issues of significant importance, so they should be known before any update or replacement gets published ๐ญ.
Before starting a draft, read the Internet-Draft writing guidelines (http://www.ietf.org/ietf/1id-guidelines.txt), the I-D checklist (http://www.ietf.org/ID-Checklist.html), and the RFC Style Guide [RFC7322] ๐. Another useful one is the "Guide for Internet Standards Writers" [RFC2360] ๐ธ.
There are also a bunch of documents to consider when writing drafts meant to become RFCs ๐ง. They matter when you're writing certain types of text:
- RFC 2606: When writing examples using DNS names in Internet-Drafts, those names shall be chosen from the example.com, example.net, and example.org domains. ๐
- RFC 3849: Defines the range of IPv6 unicast addresses (2001:DB8::/32) that should be used in any examples. โจ
- RFC 5737: Defines the ranges of IPv4 unicast addresses reserved for documentation and examples: 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24. ๐ฆ
- RFC 5234: Augmented Backus-Naur Form (ABNF) is often used when writing text field specifications ๐ง. It's not commonly used in RTP payload formats, but it may be useful when defining media type parameters of some complexity. ๐
3.2.2. RTP ๐
okay bestie, the RTP reading list comes in a few chunks: design guidelines, the RTP protocol itself, profiles, robustness tools, and media-specific recommendations. ๐ง
Any payload format writer should start with "Guidelines for Writers of RTP Payload Format Specifications" [RFC2736] ๐ It introduces Application Level Framing (ALF), the channel characteristics of IP channels, and design guidelines for RTP payload formats. The whole goal of ALF is to transmit Application Data Units (ADUs) that the receiver can use on their own inside individual RTP packets. That way there are fewer dependencies between RTP packets, and packet loss doesn't wreck as much. ๐ฆ
Next, go study the RTP protocol in "RTP: A Transport Protocol for Real-Time Applications" [RFC3550], along with the existing profiles. For extra credit, there's a whole book dedicated to RTP [CSP-RTP] ๐ Right now there are several RTP profiles, but they all build on "RTP Profile for Audio and Video Conferences with Minimal Control" [RFC3551], which is shortened to RTP/AVP. The other profiles you should know about are "The Secure Real-time Transport Protocol (SRTP)" (RTP/SAVP) [RFC3711], "Extended RTP Profile for RTCP-based Feedback (RTP/AVPF)" [RFC4585], and "Extended Secure Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/SAVPF)" [RFC5124]. It's really important to understand RTP and RTP/AVP in detail. For the other profiles, it's enough to know what functionality they give you and what limitations they create. ๐
A bunch of robustness tools have been developed for RTP, and they're built for different use cases and real-time requirements. Here's the tea:
- RFC 2198: "RTP Payload for Redundant Audio Data" [RFC2198] lets you send redundant copies of audio or text payloads. These copies travel together with a primary format in the same RTP payload. This format relies on the RTP timestamp to figure out where data belongs in a sequence, so it's usually most suitable for audio. The RTP Payload format for T.140 [RFC4103] text format also uses this approach. The big catch is that it only preserves the timestamp of the redundant payloads, not the original sequence number, which makes it unusable for most video formats. It's also only suitable for media formats that produce relatively small RTP payloads. ๐
- RFC 6354: The "Forward-Shifted RTP Redundancy Payload Support" [RFC6354] is a variant of RFC 2198 that lets the redundant data be sent before the original. ๐ธ
- RFC 5109: The "RTP Payload Format for Generic Forward Error Correction" [RFC5109] gives you XOR-based Forward Error Correction (FEC) over the whole or parts of a number of RTP packets. It replaced the previous XOR-based FEC specification [RFC2733]. These FEC packets are sent in a separate stream or as a redundant encoding using RFC 2198. This FEC scheme has certain restrictions on how many packets it can protect, so it's a good fit for applications with low-to-medium delay tolerance and a limited number of RTP packets. โจ
- RFC 6015: "RTP Payload Format for 1-D Interleaved Parity Forward Error Correction (FEC)" [RFC6015] is a variant of the XOR-based Generic protection defined in [RFC2733]. The main difference is the interleaving scheme, which decides which packets get included as source packets for a particular protection packet. Every L packets are used as source data, and protection data is then produced over D number of packets. So each block of D x L source packets results in L number of Repair packets, and each of those can repair one loss. The goal is better burst-error robustness when the packet rate is higher. ๐ฅ
- FEC Framework: "Forward Error Correction (FEC) Framework" [RFC6363] defines how to use FEC protection for arbitrary packet flows. It can be applied to RTP/RTCP packet flows too, including using RTP to transmit repair symbols. An example is "RTP Payload Format for Raptor Forward Error Correction (FEC)" [RFC6682]. ๐ง
- RTP Retransmission: The RTP retransmission scheme [RFC4588] is used for semi-reliability of the most important RTP packets in an RTP stream. How close you get to full reliability depends on the properties you're targeting and on parameters like round-trip time (RTT), the extra overhead you can afford, and the delay you can tolerate. It often requires the application to be pretty delay tolerant, since at least one round-trip time plus processing delay is needed to perform a retransmission. So it's mostly suitable for streaming applications, but it can also work in certain other cases on networks with short round-trip times. ๐โโ๏ธ
- RTP over TCP: RFC 4571 [RFC4571] defines how you send RTP and RTCP packets over connection-oriented transports like TCP. With TCP you get reliability for all packets, but you lose some of the real-time behavior RTP was designed to provide. The issues with TCP transport for real-time media include head-of-line blocking and wasting resources retransmitting data that's already late. TCP is also limited to point-to-point connections, which narrows its applicability even more. ๐ฅฒ
There have been both discussion and design of RTP payload formats that support unequal error detection provided by UDP-Lite [RFC3828], such as Adaptive Multi-Rate (AMR) and AMR Wideband (AMR-WB) [RFC4867]. The idea is that by not having a checksum over part of the RTP payload, you let bit errors from the lower layers through. Allowing bit errors can increase the efficiency of some link layers and avoid throwing away data that the payload and media codec can still get at least some benefit from. The main issue is that you have no idea how many bit errors are present in the unprotected part of the payload, which makes it hard or impossible to tell whether something usable can be designed at all. Payload format designers are not recommended to consider features for unequal error detection using UDP-Lite unless very clear requirements exist. ๐ โโ๏ธ
There also exist some management and monitoring extensions. ๐
- RFC 2959: The RTP protocol Management Information Database (MIB) [RFC2959] is used with SNMP [RFC3410] to configure and retrieve information about RTP sessions.
- RFC 3611: The RTCP Extended Reports (RTCP XR) [RFC3611] is a framework for reports sent within RTCP. It can easily be extended by defining new report formats, which has been happening and is still happening. The XRBLOCK WG in the IETF is chartered (at the time of writing) with defining new report formats. You can find the list of specified formats in IANA's RTCP XR Block Type registry at
http://www.iana.org/assignments/rtcp-xr-block-types/. The report formats defined in RFC 3611 cover packet loss, packet duplication, packet reception times, an RTCP statistics summary, and VoIP Quality. [RFC3611] also defines a mechanism that lets receivers calculate the RTT to other session participants when used. โญ - RMONMIB: The Remote Network Monitoring WG has defined a mechanism [RFC3577], based on the MIB, that can be an alternative to RTCP XR. ๐
A number of transport optimizations have also been developed for use in certain environments. They're all meant to be transparent and don't need any special consideration from the RTP payload format writer, so they're mainly listed here for informational reasons. ๐ซถ
- RFC 2508: "Compressing IP/UDP/RTP Headers for Low-Speed Serial Links" (CRTP) [RFC2508] is the first IETF-developed RTP header compression mechanism. It gives quite good compression, but it has clear performance problems when there's packet loss or reordering between the compressor and decompressor. ๐๏ธ
- RFCs 3095 and 5795: These are the base specifications of the robust header compression (ROHC) protocol version 1 [RFC3095] and version 2 [RFC5795]. ROHC was created because CRTP performed poorly when compressed packets were subject to loss. ๐ก๏ธ
- RFC 3545: Enhanced compressed RTP (E-CRTP) [RFC3545] was developed to extend CRTP so it performs better over links with long RTTs, packet loss, and/or reordering. ๐
- RFC 4170: "Tunneling Multiplexed Compressed RTP (TCRTP)" [RFC4170] is a solution that allows header compression within a tunnel carrying multiple multiplexed RTP flows. It's mainly used in voice trunking. ๐
There are a couple of different security mechanisms that may be used with RTP, and generic mechanisms are transparent for the RTP payload format. By definition, they don't need special consideration from the format designer. The main reason so many solutions exist is that different applications have different requirements, so different solutions were developed. For more on this, check out "Options for Securing RTP Sessions" [RFC7201] and "Securing the RTP Framework: Why RTP Does Not Mandate a Single Media Security Solution" [RFC7202]. The main properties of an RTP security mechanism are confidentiality for the RTP payload, integrity protection to detect manipulation of payload and headers, and source authentication. Not every mechanism gives you all of these, which is something to think about when you pick a specific mechanism. ๐
The profile for Secure RTP, SRTP (RTP/SAVP) [RFC3711], and its derived profile (RTP/SAVPF) [RFC5124] are a solution that enables confidentiality, integrity protection, replay protection, and partial source authentication. At the time of writing, it's the solution most commonly used with RTP. There are several key-management solutions for SRTP, plus other choices, and they all affect the security properties. For a deeper look at the options and solutions other than SRTP, go read "Options for Securing RTP Sessions" [RFC7201]. ๐
3.3. Important RTP Details โจ
this section goes over a bunch of RTP features and concepts that exist in RTP no matter what payload format you use. The RTP payload format can use these when it makes sense, and can even affect the behavior (the RTP timestamp and marker bit). Just remember that not every feature and concept matters for every payload format. This section doesn't replace reading up on RTP, though. It just points out a few important details to keep in mind when you're designing a payload format. ๐ง ๐
Okay so this is where things get really juicy, bestie ๐ฆ
3.3.1. The RTP Session โจ
Okay so first things first, we need the official definition of an RTP session from RFC 3550, and it's giving very specific energy ๐ :
An association among a set of participants communicating with RTP.
A participant may be involved in multiple RTP sessions at the same
time. In a multimedia session, each medium is typically carried
in a separate RTP session with its own RTCP packets unless the
encoding itself multiplexes multiple media into a single data
stream. A participant distinguishes multiple RTP sessions by
reception of different sessions using different pairs of
destination transport addresses, where a pair of transport
addresses comprises one network address plus a pair of ports for
RTP and RTCP. All participants in an RTP session may share a
common destination transport address pair, as in the case of IP
multicast, or the pairs may be different for each participant, as
in the case of individual unicast network addresses and port
pairs. In the unicast case, a participant may receive from all
other participants in the session using the same pair of ports, or
may use a distinct pair of ports for each.
The distinguishing feature of an RTP session is that each session
maintains a full, separate space of SSRC identifiers (defined
next). The set of participants included in one RTP session
consists of those that can receive an SSRC identifier transmitted
by any one of the participants either in RTP as the SSRC or a CSRC
(also defined below) or in RTCP. For example, consider a three-
party conference implemented using unicast UDP with each
participant receiving from the other two on separate port pairs.
If each participant sends RTCP feedback about data received from
one other participant only back to that participant, then the
conference is composed of three separate point-to-point RTP
sessions. If each participant provides RTCP feedback about its
reception of one other participant to both of the other
participants, then the conference is composed of one multi-party
RTP session. The latter case simulates the behavior that would
occur with IP multicast communication among the three
participants.
The RTP framework allows the variations defined here, but a
particular control protocol or application design will usually
impose constraints on these variations.
So basically an RTP session is a group of participants chatting over RTP ๐ฌ. One participant can be in multiple sessions at once, and in a multimedia session each medium usually gets its own RTP session with its own RTCP packets ๐. The only exception is when the encoding itself mashes several media into one stream.
Here's the tea โ: a participant tells sessions apart by the destination transport address pairs they receive on. Each pair is one network address plus a pair of ports, one for RTP and one for RTCP ๐ธ. Everyone can share one pair (hi, IP multicast ๐), or everyone can have their own pair (hi, unicast ๐ง). In unicast you can even receive from everybody on the same port pair, or use a different pair for each person. Iconic flexibility ๐ญ.
The thing that makes a session a session is that each one has its own totally separate space of SSRC identifiers ๐ฆ. The participants in a session are whoever can receive an SSRC sent by anyone else, either in RTP (as the SSRC or a CSRC) or in RTCP ๐.
Now let's look at a three-party conference using unicast UDP, where everyone receives from the other two on separate port pairs ๐. If each person only sends RTCP feedback about one other person back to that person, the conference is actually three separate point-to-point RTP sessions ๐. But if each person sends their feedback about one other participant to both of the others, the whole thing is one multi-party RTP session ๐. That second way basically copies what would happen with IP multicast among the three of them โจ.
Last but not least, the RTP framework allows all of these variations, but a particular control protocol or application design will usually put constraints on them ๐ซถ. So don't be surprised if your app makes the choice for you ๐ .
3.3.2. RTP Header โจ
Okay bestie, the RTP header has a bunch of fields ๐. Two of them always need extra specs from the RTP payload format: the RTP timestamp and the marker bit ๐ญ. Some payload formats also use the sequence number for their own stuff, mostly to keep track of the order of their application data units ๐ง. The payload type tells you which payload format is in use ๐. The SSRC is how you tell apart RTP packets from multiple senders and media sources ๐. And finally, [RFC5285] explains how to carry payload-format-independent metadata about the packet or stream ๐ฆ.
Marker Bit ๐ฉ: This is a single bit that usually gives you important hints. In audio, it normally marks the start of a talk burst ๐ฃ๏ธ, which lets the jitter buffer adapt before the burst begins with barely any hit to audio quality ๐ง. In video, it normally marks the last packet of a frame ๐ฌ. That helps the decoder finish the picture right away, instead of waiting around for the next packet just to find out the frame is done ๐.
Timestamp โฐ: The RTP timestamp says what time instant the media sample belongs to ๐. For discrete media like video, it usually shows when the frame was sampled ๐ธ. For continuous media, it usually shows the first time instant the payload's media represents ๐ถ. For audio, that's the sampling time of the first sample ๐ค. Every RTP payload format MUST specify what the timestamp value means and which clock rates are allowed. Hmm, not in caps, sorry, let me say it plainly: every RTP payload format has to spell out what the timestamp means and which clock rates it allows ๐. Picking a timestamp rate is an active design choice, and we talk more about it in Section 5.2 ๐ธ.
Okay, and here's a fun one ๐: Discontinuous Transmission (DTX), which is super common in speech codecs, usually makes gaps or jumps in the timestamp values ๐. Why? Because there's no media payload to send, and the next timestamp shows the actual sampling time of the data that does get sent ๐ง .
Sequence Number ๐ข: This one is monotonically increasing and gets set as the packet is sent ๐. Lots of payload formats rely on it to recover the order of everything, from the whole stream all the way down to fragments of application data units (ADUs) and the order they need to be decoded in ๐ฆ. Here's the kicker: DTX does not create gaps in the sequence number, because it goes up for every RTP packet that's sent ๐.
Payload Type ๐ต: The payload type says, packet by packet, which format is being used ๐๏ธ. The binding between a payload type number and a payload format, plus its configuration, is dynamic and specific to the RTP session ๐. Configuration info can be bound to a payload type value through out-of-band signaling (see Section 3.4) ๐ฌ. An example is video decoder configuration info ๐บ. Usually the same payload type sticks around for a media stream the whole session ๐. But sometimes you may need to change the payload format or its configuration partway through the session ๐.
SSRC ๐: The synchronization source (SSRC) identifier usually isn't used by a payload format for anything except identifying which RTP timestamp and sequence number space a packet belongs to ๐งฉ. That's what lets you receive multiple media sources at the same time ๐ง. Some RTP mechanisms for improving resilience to packet loss use multiple SSRCs to separate the original data from the repair or redundant data ๐ก๏ธ. Multi-stream transmission of scalable codecs does the same kind of thing ๐.
Header Extensions ๐งณ: RTP payload formats often need to carry metadata about the payload data they're transporting ๐ฆ. That metadata gets sent as a payload header, at the start of the payload section of the RTP packet ๐. The RTP packet also has room for a header extension [RFC5285], which can carry payload-format-independent metadata. For example, an SMPTE time code for the packet [RFC5484] โฑ๏ธ. The RTP header extensions are NOT intended to carry headers that relate to a particular payload format ๐ซ, and they must not contain information needed to decode the payload ๐ โโ๏ธ.
The rest of the fields don't usually affect the RTP payload format ๐ . The padding bit is worth clarifying, though: it means one or more bytes are appended after the RTP payload ๐ง. A receiver must remove this padding before any payload format processing can happen ๐งน. So it's totally separate from any padding that might happen inside the payload format itself ๐.
3.3.3. RTP Multiplexing โจ
Okay, this part is so important, so pay attention bestie ๐ซต. RTP has three multiplexing points, and each one is used for a different purpose ๐ธ. You need to understand this to use them correctly ๐.
The first one is separating RTP streams of different types or usages, which is done with different RTP sessions ๐ฆ. For example, in a common multimedia session with audio and video, RTP usually multiplexes audio and video into different RTP sessions ๐ถ. To get that separation, transport-level tools are used, usually UDP port numbers ๐. Different RTP sessions can also support layered scalability, because a receiver can pick one or more layers for multicast RTP sessions just by joining the multicast groups those layers travel over ๐ง. This separation also lets you apply different Quality of Service (QoS) to different media types ๐ . Heads up though: using multiple transport flows can cause issues with NAT and firewall traversal ๐ง. How you apply RTP sessions and transport flows can change the transport properties an RTP media stream experiences ๐.
The next multiplexing point is separating different RTP streams within an RTP session ๐. Here, RTP uses the SSRC to identify individual sources of RTP streams ๐. An example is capturing different microphones that are carried in one RTP session for audio, whether they're connected to the same host or different ones ๐ค. There are also cases where a single media source is sent over multiple RTP streams ๐. Each SSRC gets its own unique RTP sequence number and timestamp space ๐ข.
The third multiplexing point is the RTP header payload type field ๐ต. The payload type tells you what format the content in the RTP payload is ๐ผ. That includes different payload format configurations, different codecs, and also robustness mechanisms like the one described in RFC 2198 [RFC2198] ๐.
3.3.4. RTP Synchronization โจ
Okay so there are a few different kinds of synchronization, and here's how RTP handles each one ๐
- Intra media: Syncing within one media stream from a synchronization source (SSRC) is handled by the RTP timestamp field ๐ฐ๏ธ Every RTP packet carries one, and it tells you where that packet's media payload sits in time, compared to the other packets in the same RTP stream (so, a given SSRC). This is especially handy when transmission is discontinuous ๐ Those gaps can come from network conditions, and when a lot of packets get lost, the RTP timestamp tells the receiver how much later the current media should be played out compared to what it already got.
- Inter-media: Apps often want to use several media sources at once, and those sources might be different media types ๐ฌ๐ต So RTP needs to sync different media coming from the same endpoint. That means two things: figuring out which media come from the same endpoint and whether they should be synced with each other, and having the actual tools to do the syncing ๐ซถ
The first step in inter-media sync is figuring out which SSRCs in each session should be synced with each other ๐ You do that by comparing the CNAME fields in the RTCP source description (SDES) packets. SSRCs that share a CNAME, even if they're sent in any of multiple RTP sessions, can be synced.
Now the actual RTCP mechanism for inter-media sync is built on a neat idea ๐ง Each RTP stream gives you a position on its own media-specific timeline (measured in RTP timestamp ticks), and then there's a common reference timeline. In RTCP, that common reference timeline is expressed as a wall-clock time in the Network Time Protocol (NTP) format. Now, it's important to notice that the wall-clock time does not have to be synced between hosts, for example by using NTP [RFC5905] ๐ โโ๏ธ It can even have nothing to do with the real time at all. For example, the host system's up-time can be used for this purpose. What really matters is that all the media streams from a particular source that are being synced use the same reference clock to derive their relative RTP timestamp time scales โฑ๏ธ The type of reference clock and its timebase can be signaled using RTP Clock Source Signaling [RFC7273].
Figure 1 shows how, if you receive RTCP Sender Report (SR) packet P1 for one RTP stream and RTCP SR packet P2 for the other RTP stream, you can calculate the matching RTP timestamp values for any arbitrary point in time T ๐งฎ To pull that off, you also need to know the RTP timestamp rates for each RTP stream currently in use in the sessions.
TS1 --+---------------+------->
| |
P1 |
| |
NTP ---+-----+---------T------>
| |
P2 |
| |
TS2 ---------+---------+---X-->
Figure 1: RTCP Synchronization
Say medium 1 uses an RTP timestamp clock rate of 16 kHz and medium 2 uses a clock rate of 90 kHz ๐ Then TS1 and TS2 for point T can be calculated like this:
TS1(T) = TS1(P1) + 16000 * (NTP(T)-NTP(P1)) and TS2(T) = TS2(P2) + 90000 * (NTP(T)-NTP(P2)).
This calculation is super useful because it lets the implementation generate a common sync point where all the time values are provided (TS1(T), TS2(T) and T) ๐ So when you want to work out the NTP time that the timestamp value in packet X corresponds to, you do it like this:
NTP(X) = NTP(T) + (TS2(X) - TS2(T))/90000
Improved signaling for layered codecs and fast tune-in has been specified in "Rapid Synchronization for RTP Flows" [RFC6051] ๐
Leap seconds are extra seconds that get added, or seconds that get removed, to keep our clocks in sync with the earth's rotation ๐ Adding or removing seconds can impact the reference clock, as discussed in "RTP and Leap Seconds" [RFC7164]. Also, in cases where the RTP timestamp values are derived from the wall clock during a leap second event, errors can happen ๐ญ Implementations need to consider leap seconds, and they should consider the recommendations in [RFC7164].
3.4. Signaling Aspects ๐๏ธ
RTP payload formats get used in the context of application signaling protocols, like SIP [RFC3261] using the Session Description Protocol (SDP) [RFC4566] with Offer/Answer [RFC3264], RTSP [RFC7826], or the Session Announcement Protocol [RFC2974]. All of these examples use out-of-band signaling to indicate which types of RTP streams are wanted for the session and how they're configured. To be able to declare or negotiate the media format and RTP payload packetization, the payload format has to be given an identifier ๐ชช On top of the identifier, many payload formats also need to signal further configuration information out-of-band for the RTP payloads before the media transport session starts.
SDP is what all the session-establishing protocols above use, but other session description formats can be used too ๐ญ For example, there was discussion within the IETF of a new XML-based session description format (SDP-NG). In the end, that proposal didn't get past draft protocol specification, because of the enormous installed base of SDP implementations. Still, to avoid locking RTP usage into SDP-based out-of-band signaling, the payload formats are identified using a separate definition format for the identifier and its associated parameters. That format is the media type ๐
3.4.1. Media Types ๐ท๏ธ
Media types [RFC6838] are identifiers that were originally created to identify media formats included in email. In that usage they were called MIME types, where the expansion of the MIME acronym includes the word "mail". The term "media type" came along to reflect broader usage, which includes HTTP [RFC7231], Message Session Relay Protocol (MSRP) [RFC4975], and many other protocols that identify arbitrary content carried within them ๐ Media types also provide a media hierarchy that fits RTP payload formats really well. Media type names have two parts: a content type and a sub-type, separated by a slash, e.g., 'audio/PCMA' or 'video/h263-2000'. It's important to pick the correct content type when you create the media type identifying an RTP payload format. In most cases, though, there's little doubt about which content type a format belongs to ๐โโ๏ธ Guidelines for choosing the correct media type, and the registration rules for media type names, are in "Media Type Specifications and Registration Procedures" [RFC6838]. The additional rules for media types for RTP payload formats are in "Media Type Registration of RTP Payload Formats" [RFC4855].
Registering the RTP payload name is something that's required to avoid name collisions in the future ๐ Note that "x-" names are not suitable for any documented format, since they have the same name collision problem and can't be registered ๐
โโ๏ธ The list of already-registered media types can be found at https://www.iana.org/assignments/media-types/media-types.xhtml.
Media types are allowed any number of parameters, which may be required or optional for that media type ๐ They're always written in the form "name=value". There are no restrictions on how the value is defined from the media type's perspective, except that parameters must have a value. However, the way media types are used in SDP and so on has led to the following restrictions, which need to be followed to make media types usable for identifying RTP payload formats ๐
- Arbitrary binary content in the parameters is allowed, but it needs to be encoded so it can be placed within text-based protocols. Base64 [RFC4648] is recommended, but for shorter content, Base16 [RFC4648] may be more appropriate, since it's simpler for humans to interpret ๐ง This needs to be explicitly stated when defining a media type parameter with binary values.
- The end of the value needs to be easy to find when parsing a message ๐ So parameter values that are continuous and not interrupted by common text separators, such as space and semicolon characters, are recommended. If that's not possible, some kind of escaping should be used. Using quote (") is recommended; and don't forget to provide a way of encoding any character used for quoting inside the quoted element โจ
- A common representation form for the media type and its parameters is on a single line. In that case, the media type is followed by a semicolon-separated list of parameter-value pairs, e.g.:
audio/amr octet-align=0; mode-set=0,2,5,7; mode-change-period=2
3.4.2. Mapping to SDP ๐บ๏ธ
SDP [RFC4566] is so commonly used as an out-of-band signaling protocol that a mapping of the media type into SDP exists ๐ The details on how to map the media type and its parameters into SDP are described in [RFC4855]. However, that alone doesn't explain how certain parameters must be interpreted. For example, in the context of Offer/Answer negotiation [RFC3264], you need more than that ๐ซถ
3.4.2.1. The Offer/Answer Model โจ
Okay bestie, the Offer/Answer (O/A) model is how SIP negotiates which media formats and payload formats get used in a session, and how they get configured ๐. But here's the tea: O/A does not have a default behavior. It basically points at the gap and says "you need to define how parameters behave" ๐. It gets even messier because the direction of media in a session changes the rules. So some cases need separate descriptions for RTP streams that are send-only, receive-only, or both sent and received, as identified by the SDP attributes a=sendonly, a=recvonly, and a=sendrecv ๐ฆ. Multicast adds more limits too, since the same RTP stream goes to everyone. If those multicast restrictions are too limiting for unicast, then you'll need separate rules for unicast and multicast ๐.
The simplest and most common O/A interpretation is that a parameter is declarative ๐
. That means the sending agent in the Offer/Answer exchange can declare a value, and it has no direct impact on the other agent's values. The declared value applies to all media that will be sent to the declaring entity. For example, most video codecs have a level parameter that tells everyone the highest complexity the video decoder supports ๐. In unicast, two participants can declare it independently, because the media sender is responsible for transmitting a video stream that fits within the limit the other side declared. In multicast, though, the stream has to follow the limit of the weakest receiver, i.e., the one that supports the lowest level ๐ญ. So to keep negotiation simple in these cases, it's common to require any answerer to a multicast session to take a yes or no approach to parameters ๐ซถ.
A "negotiated" parameter is a totally different vibe ๐ฅ. Here, both sides need to agree on the value. The answerer either accepts the parameter exactly as it was offered, or removes the payload type that the parameter belonged to from its answer. Removing that payload type tells the offerer that the answerer doesn't support the parameter values presented ๐. The annoying part is that you need complete payload types to signal each possible configuration if you want the best chance at interoperability, so the number of payload types can quickly get huge ๐. That's one big reason to limit the total number of capability sets that may be implemented.
The most problematic parameters are the ones that relate to the media the entity sends ๐ฉ. They don't really fit the O/A model, but they can be shoehorned in. Examples can be found in the H.264 video codec's payload format [RFC6184], where every parameter with this property has a name starting with "sprop-" ๐ง. The issue is that these parameters declare properties for an RTP stream that the other party might not accept. The best you can do is explain the assumption that the other party will accept the same parameter value for the media it will receive, as proposed by the offerer of the session ๐ธ. If the answerer needs to change any declarative parameter about streams it will receive, the offerer may be required to make a new offer to update the parameter values for its outgoing RTP stream ๐.
Another thing to consider is send-only RTP streams in offers. Parameters about what the answering entity accepts to receive have no meaning beyond acting as a template for the answer ๐. It's worth pointing out in the specification that these really provide a set of parameter values the sender recommends. Also note that send-only streams in answers need to indicate the offerer's parameters, so the offerer can match the answer to the offer ๐.
Here's one more complication. The answerer is allowed to renumber payload types between offer and answer ๐. This is not recommended, but it's allowed to support gateways to the ITU conferencing suite. That means it must be possible to bind answer payload types to the payload types in the offer, even when the payload type number has changed and some of the proposed payload types have been removed โจ. This binding normally has to be done by matching the configurations originally offered against the ones in the answer. The payload format may need to specify which parameters make up a configuration. For example, Section 8.2.2 of the H.264 RTP Payload format [RFC6184] says: "The parameters identifying a media format configuration for H.264 are profile-level-id and packetization-mode" ๐.
3.4.2.2. Declarative Usage in RTSP and SAP ๐ก
SAP (Session Announcement Protocol) [RFC2974] was used experimentally for announcing multicast sessions ๐ง. Similar but better protocols use SDP in a declarative style to configure multicast-based applications. Whether or not Source-Specific Multicast (SSM) [RFC3569] or Any-Source Multicast (ASM) is in use, the SDP provided by these configuration delivery protocols applies to everyone ๐. All media sent to the session must follow the RTP stream definition given in the SDP. That way, anyone who supports the configuration can receive the session ๐ฆ. Here, SDP is a one-way channel with no way to change the configuration the session creator decided on ๐ โโ๏ธ. Any RTP payload format that needs send-direction parameters with individual values per implementation or instance will fail in a SAP session for a multicast session that lets anyone send ๐ฌ.
Real-Time Streaming Protocol (RTSP) [RFC7826] lets a server and client negotiate transport parameters for RTP streams that are part of a streaming session ๐ฌ. RTSP separates the transport parameters from the media configuration. SDP is commonly used for media configuration in RTSP, and it's sent to the client before session establishment. That can happen through the DESCRIBE method, or through an out-of-band channel like HTTP, email, etc. ๐ฌ The SDP is used to figure out which RTP streams and formats are in use before the session is set up ๐.
So, both SAP and RTSP use SDP to configure receivers and senders with a predetermined configuration for an RTP stream, including the payload format and any of its parameters ๐ . All parameters are used declaratively. This can lead to parameters being treated differently between Offer/Answer and declarative usage in RTSP and SAP ๐. Any such difference needs to be spelled out by the payload format specification ๐.
3.5. Transport Characteristics ๐
The general channel characteristics that RTP flows experience are documented in Section 3 of "Guidelines for Writers of RTP Payload Format Specifications" [RFC2736] โจ. The discussion below gives more detail.
3.5.1. Path MTU ๐
At the time of writing, the most common IP Maximum Transmission Unit (MTU) on commonly deployed link layers is 1500 bytes (the Ethernet data payload) ๐. But there are links with smaller MTUs and links with much larger ones too ๐คฏ. An example of small-MTU links is older generation cellular links ๐ฑ. Certain parts of the Internet already support an IP MTU of 8000 bytes or more, but those are limited islands ๐๏ธ. You're most likely to find MTUs larger than 1500 bytes in enterprise networks, university networks, data centers, storage networks, and over high capacity (10 Gbps or more) links ๐ป. There's a slow, ongoing evolution toward larger MTU sizes ๐ข. At the same time, it's become common to use tunneling protocols, often several at once, and their overhead can add up and shrink the MTU a lot ๐ต. So we need to consider limited MTUs and enable support for larger ones ๐ซถ. This should be considered in the design, especially for features like aggregation of independently decodable data units ๐งฉ.
3.5.2. Different Queuing Algorithms ๐ฆ
Routers and switches on the network path between an IP sender and a particular receiver can behave differently, and that affects the end-to-end characteristics ๐ฃ๏ธ. One of the most important aspects is queuing behavior ๐. Routers and switches have some queue space to handle temporary bursts of data that are headed out the same egress link. A queue that isn't empty adds to the path delay โณ.
How queuing is implemented affects the delay, and it also affects how congestion signals get delivered to the flow, whether that's Explicit Congestion Notification (ECN) [RFC6679] or packet drops ๐. Other things matter too: whether the flow shares its queue with other flows, and how that implementation shapes the way flows interact ๐ค. This gets really important when real-time flows interact with long-lived TCP flows ๐ค. TCP's built-in congestion control tries to fill the buffer, so every flow sharing that buffer experiences the delay build-up ๐ซ .
A common but pretty poor queue-handling mechanism is tail-drop, meaning packets only get dropped when the incoming packet doesn't fit in the queue ๐ . If a bad queuing algorithm is paired with way too much queue space, the queuing time can balloon to multiple seconds. This is called "bufferbloat" [BLOAT] ๐. Active Queue Management (AQM) is the umbrella term for mechanisms that try to be smarter by actively managing the queue. For example, they send congestion signals earlier by dropping packets earlier in the queue ๐ง . AQM also affects how flows interact. Random Early Detection (RED) [RED], for instance, picks which packet(s) to drop at random, so flows with more packets in the queue have a higher chance of experiencing packet loss (the congestion signal) ๐ฒ. There's ongoing work in the IETF WG AQM to find suitable mechanisms to recommend for implementation and to reduce the use of tail-drop ๐.
3.5.3. Quality of Service ๐
Using the best-effort Internet means there are no guarantees about the path's properties ๐คทโโ๏ธ. QoS mechanisms are meant to give you a way to bound those path properties โจ. Diffserv [RFC2475] markings affect how routers queue and forward traffic. But that mechanism only provides statistical guarantees, so you have to be careful about how many marked packets of each type enter the network ๐. Flow-based QoS, like IntServ [RFC1633], has the potential for stricter guarantees, because every hop on the path agrees on the properties ๐ค. The cost is per-flow state in the network ๐ธ.
4. Standardization Process for an RTP Payload Format ๐โจ
This section discusses the recommended process for producing an RTP payload format in the venues described here ๐ธ. The goal is to document current best practice for getting a well-designed, well-specified payload format out as quickly as possible ๐โโ๏ธ. For specifications defined by standards bodies other than the IETF, the primary milestone is registering the media type for the RTP payload format ๐. For proprietary media formats, the primary goal depends on whether interoperability is wanted at the RTP level ๐. Either way, ensuring the best possible quality of the specification still matters a lot ๐ฏ.
4.1. IETF ๐
okay so bestie, for all standardized media formats it is recommended that the payload format gets specified in the IETF โจ the main reason is that there's an openly available RTP payload format spec that people who actually know RTP payload formats have reviewed ๐ฅ at the time of writing, this work happens in the PAYLOAD Working Group (WG), but ngl that could change in the future ๐ฆ
4.1.1. Steps from Idea to Publication ๐บ๏ธ
there are a bunch of steps an RTP payload format goes through from the first idea all the way to being published ๐ this also documents the process the PAYLOAD WG follows when it works with RTP payload formats ๐
Idea: determine the need for an RTP payload format as an IETF specification ๐ก
Initial effort: using this document as a guideline, you should be able to get started ๐ธ if your media codec doesn't fit any of the common design patterns, or you're having trouble figuring out the most suitable way forward, then you should contact the PAYLOAD WG and/or the WG Chairs ๐ซถ the goal of this stage is an initial individual draft. This draft needs to focus on the intro parts that describe the real-time media format and the basic idea of how to packetize it. Not all the details are required to be filled in yet. However, the security chapter is not something you should skip, even at the start ๐ from the very beginning it's important to consider any serious security risks that need to be solved. The first step is done when you have a draft that's detailed enough for a first review by the WG. The less confident you are in the solution, the less work you should spend on details. Instead, concentrate on the codec properties and what's required to make the packetization work ๐ง
Submission of the first version: once you've done all of the above, you submit the draft as an individual draft (https://datatracker.ietf.org/submit/). You can do this any time, except for a period before an IETF meeting (see the important dates related to the next IETF meeting for the draft submission cutoff date) ๐
when the Internet-Draft announcement has been sent out on the draft announcement list (https://www.ietf.org/mailman/listinfo/I-D-Announce), forward it to the PAYLOAD WG (https://www.ietf.org/mailman/listinfo/payload) and request that it be reviewed ๐จ in the email, outline any issues the authors currently have with the design.
Iterative improvements: take the feedback you got into account, update the draft, and try to resolve issues ๐ new revisions can be submitted at any time (again, except for a short period before meetings). It is recommended to submit a new version whenever you've made major updates or have new issues that are easiest to discuss in the context of a new draft version.
Becoming a WG document: since defining RTP payload formats is part of the PAYLOAD WG's charter, RTP payload formats that are going to be published as Standards Track RFCs need to become WG documents ๐ becoming a WG document means the WG Chairs or an appointed document shepherd are responsible for the admin stuff, like issuing publication requests. Be aware, though: making a document a WG document changes the formal ownership and responsibility from the individual authors to the WG ๐ซข the initial authors normally keep being the document editors, unless something unusual happens. The PAYLOAD WG accepts new RTP payload formats based on their suitability and document maturity. Maturity is a requirement, to make sure there are dedicated document editors and that there's a good solution.
Iterative improvements: the updates and review cycles keep going until the draft has reached the level of maturity suitable for publication. The authors are responsible for judging when the document is ready for the next step, most likely WG Last Call, but they can ask the WG Chairs or shepherd ๐ค
WG Last Call: a WG Last Call of at least two weeks is always performed for payload formats in the PAYLOAD WG (see Section 7.4 of [RFC2418]) โณ the authors request WG Last Call for a draft when they think it's mature enough for publication. The WG Chairs or shepherd do a review to check if they agree with the authors' assessment. If they agree on the maturity, the WG Last Call is announced on the WG mailing list. If there are issues raised, these need to be addressed with an updated draft version. For any more substantial changes, a new WG Last Call is announced for the updated version. Minor changes, like editorial fixes, can be progressed without an additional WG Last Call.
Publication requested: for WG documents, the WG Chairs or shepherd request publication of the draft after it has passed WG Last Call ๐ after this, the approval and publication process described in BCP 9 [BCP9] is performed. The status after publication has been requested can be tracked using the IETF Datatracker [TRACKER]. Documents don't expire the way they normally do after publication has been requested, so authors don't have to issue keep-alive updates. Also, any submission of document updates requires the approval of the WG Chair(s). The authors are commonly asked to address comments or issues raised by the IESG. The authors also do one last review of the document right before it's published as an RFC, to make sure no errors or formatting problems slipped in during the publication process ๐
4.1.2. WG Meetings ๐ค
WG meetings are for discussing issues, not presentations ๐ฌ so most RTP payload formats should never need to be discussed in a WG meeting. The ones that would be are either the ones with controversial issues that failed to get resolved on the mailing list, or the ones including new design concepts worth a general discussion.
There's no requirement to present or discuss a draft at a WG meeting before it becomes published as an RFC. So even authors who can't get to WG meetings should still be able to successfully specify an RTP payload format in the IETF ๐ WG meetings may only become necessary if the draft gets stuck in a serious debate that can't easily be resolved.
4.1.3. Draft Naming ๐
to keep things simple for the PAYLOAD WG Chairs and WG members, a specific Internet-Draft file-naming convention shall be used for RTP payload formats ๐๏ธ individual submissions shall be named using the template draft-<lead author family name>-payload-rtp-<descriptive name>-<version>. WG documents shall be named according to this template: draft-ietf-payload-rtp-<descriptive name>-<version>. Putting "payload" in the draft file name means a search for "payload-" will find all PAYLOAD-related drafts, and "rtp" tells us it's an RTP payload format draft ๐ the descriptive name should be as short as possible while still describing what the payload format is for. It is recommended to use the media format or codec abbreviation. Please note that the version must start at 00 and goes up by one for each submission to the IETF secretary of the draft. No version numbers may be skipped ๐ซ for more details on draft naming, see Section 7 of [ID-GUIDE].
4.1.4. Writing Style โ๏ธ
when you're writing an Internet-Draft for an RTP payload format, you should keep a few considerations in mind (these may be a bit different from the style of other IETF documents and/or from the style the media coding spec's author group may use) ๐
Include Motivations: in the IETF it's common to include the motivation for why a particular design or technical path was chosen. These aren't long statements, just a sentence here and there explaining why is enough ๐ญ
Use the Defined Terminology: there's defined terminology both in RTP and in the media codec specification the RTP payload format is designed for. A payload format specification needs to use both, to make clear the relation of features and their functions. It's unwise to introduce, or worse, use without introduction, terminology that seems more accessible to average readers but may miss certain nuances that the defined terms imply ๐ โโ๏ธ an RTP payload format author can assume the reader is reasonably familiar with the terminology in the media coding specification.
Keeping It Simple: the IETF has a history of specifications that are focused on their main usage. Historically, some RTP payload formats have a lot of modes and features, while the actual deployments have only included the most basic features that had very clear requirements. Time and effort can be saved by focusing on only the most important use cases and keeping the solution simple ๐งผ an extension mechanism should be provided to enable backward-compatible extensions, if that's an organic fit.
Normative Requirements: when writing specifications, there's commonly a need to make it clear when something is normative and at what level. In the IETF, the most common method is to use "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119], which defines the meaning of "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" ๐โจ
4.1.5. How to Speed Up the Process โฉ
okay so there are a bunch of ways to lose SO much time in the process above ๐ฉ this section is basically the do's and don'ts ๐
- Don't update the draft only for the meeting deadline ๐ โโ๏ธ every update tied to a meeting automatically caps your draft at three updates per year, which is so not it. instead, ignore the meeting schedule and publish new versions asap โจ
- Try to avoid asking for reviews when people are slammed, like the few weeks right before a meeting ๐ it's actually more likely people have time directly after a meeting ๐ธ
- Perform draft updates quickly โก a super common mistake is authors letting the draft slip. if you update the text right after you get resolution on an issue, things speed up. this shrinks the delay that you have direct control over ๐ the time taken for reviews, responses from Area Directors and WG Chairs, etc. can be way harder to speed up ๐ญ
- Don't forget human nature ๐ง people forget things or need a nudge, and that's totally normal. if things take longer than expected, send a kind reminder to the people you're waiting on ๐ซถ and ask them to estimate when they expect to finish the requested task.
- Make sure there's enough review ๐ it's super common for docs to take forever and go through tons of iterations because not enough review happens in each round. to get more review on your own doc, trade review time with other authors: make a deal that you'll review their draft if they review yours ๐ค even inexperienced reviewers can help with language, editorial, or clarity issues โ๏ธ. also, try approaching the more experienced people in the WG and getting them to commit to a review. the WG Chairs cannot, even if they'd love to ๐ฅบ, be expected to review all versions. because of workload, the Chairs may need to focus on key points in a draft's evolution, like checking initial submissions, a draft's readiness to become a WG document, or its readiness for WG Last Call.
4.2. Other Standards Bodies ๐
okay, other standards bodies can totally define RTP payloads in their own specs โจ when they do, they are strongly recommended to contact the PAYLOAD WG Chairs and request a review of the work. it is recommended that at least two review steps happen. the first should be early, when more fundamental issues can be easily fixed without abandoning a ton of effort ๐ ๏ธ then, when they're nearing completion (but while it's still possible to update the spec), a second review should be scheduled. in that pass, the quality can be assessed, and hopefully no updates will be needed ๐ค using this procedure can avoid both conflicting definitions and serious mistakes, like breaking certain aspects of the RTP model ๐
RTP payload media types may be registered in the standards tree by other standards bodies too ๐ the requirements on the organization are outlined in the media types registration documents [RFC4855] and [RFC6838]). this registration requires a request to the IESG, which makes sure the filled-in registration template is acceptable. to avoid last-minute problems, the registration template must be sent for review both to the PAYLOAD WG and the media types list (ietf-types@iana.org), and it's something that should be included in the IETF reviews of the payload format specification ๐
4.3. Proprietary and Vendor Specific ๐ฆ
proprietary RTP payload formats are commonly specified when the real-time media format is proprietary and not meant to be part of any standardized system. however, there are reasons why proprietary formats should still be correctly documented and registered, iykyk ๐
- Usage in a standardized signaling environment, such as SIP/SDP. RTP needs to be configured with the RTP profiles, payload formats, and their payload types being used. to make that work, it's desirable to have registered media type names so they don't collide with other formats ๐
- Sharing with business partners. RTP payload formats are used for communication, so business partners often want to support a proprietary format ๐ค a well-written spec will save time and money for both parties, because interoperability becomes way easier to achieve ๐ธ
- To ensure interoperability between different implementations on different platforms ๐ฅ๏ธ๐ฑ
to avoid name collisions, there's a central registry keeping track of the registered media type names used by different RTP payload formats ๐๏ธ for proprietary formats, they should be registered in the vendor's own tree. all vendor-specific registrations use sub-type names that start with "vnd.<vendor-name>". names in the vendor's own tree are not required to be registered with IANA. however, registration [RFC6838] is recommended if the media type is used at all in public environments ๐ท
if interoperability at the RTP level is desired, a payload type specification should be standardized in the IETF following the process described above ๐ the IETF does not require full disclosure of the codec when defining an RTP payload format to carry that codec, but a description must be provided that's sufficient to let the IETF judge whether the payload format is well designed ๐ง the media type identifier assigned to a standardized payload format of this sort will live in the standards tree rather than the vendor tree ๐ณ
4.4. Joint Development of Media Coding Specification and RTP Payload Format ๐ง
okay this one is so cute ๐ฅน in the last decade, there have been a few cases where the media codec and the associated RTP payload format were developed concurrently and jointly. developing the two specs together, in close cooperation with the group building the codec, lets you leverage the benefits that joint source/channel coding can provide โจ doing so has historically resulted in well-performing payload formats and success for both the media coding spec and the RTP payload format ๐ so, whenever the opportunity presents itself, it may be useful to keep the media coding group closely in the loop (through appropriate liaison means, whatever those may be) and influence the media coding spec to be RTP friendly ๐ one example is H.264, where the RTP payload header co-serves as the H.264 NAL unit header and vice versa, and it's documented in both specifications ๐ฌ
5. Designing Payload Formats ๐
the best summary of payload format design is KISS (Keep It Simple, Stupid) ๐ a simple payload format is easier to review for correctness, easier to implement, and has low complexity. unfortunately, contradictory requirements sometimes make it hard to keep things simple ๐ฎโ๐จ these are the complexity issues and problems that show up for RTP payload formats:
- Too many configurations: contradictory requirements lead to one configuration being created for each conceivable case ๐ these are often contradictions between functionality and bandwidth. this outcome has two big disadvantages. first, all configurations need to be implemented. second, the user application must select the most suitable configuration. picking the best one can be very difficult, and in negotiating applications this can create interoperability problems. the recommendation is to try to select a very limited set of configurations (preferably just one) that perform well for the most common cases and are capable of handling the other cases, maybe not as well ๐ฏ
- Hard to implement: certain payload formats may become difficult to implement both correctly and efficiently ๐งฉ this needs to be considered in the design.
- Interaction with general mechanisms: special solutions may create issues with deployed tools for RTP, such as tools for more robust transport of RTP ๐ ๏ธ for example, a requirement for an unbroken sequence number space creates issues for mechanisms that rely on payload type switching to interleave media-independent resilience within a stream ๐ฌ
5.1. Features of RTP Payload Formats ๐
there are a number of common features in RTP payload formats โจ there is no general requirement to support these features. instead, their applicability must be considered for each payload format. in fact, it may be that certain features aren't even applicable ๐คทโโ๏ธ
5.1.1. Aggregation ๐
okay, aggregation lets you include multiple Application Data Units (ADUs) in the same RTP payload ๐ฆ this is commonly supported for codecs that produce ADUs smaller than the IP MTU. one reason to use aggregation is cutting down header overhead (IP/UDP/RTP headers) ๐ธ when you're comparing ADU size to MTU size, do remember that the MTU may be significantly larger than 1500 bytes! a 9000-byte MTU is available today, and a 64k MTU may be available in the future ๐ many speech codecs have ADUs of a few fixed sizes. video encoders generally produce ADUs of quite flexible sizes, so the need for aggregation may be less ๐๏ธ but some codecs produce small ADUs mixed with large ones, for example H.264 Supplemental Enhancement Information (SEI) messages. sending individual SEI messages in separate packets is not efficient compared to combining them with other ADUs ๐ค also, some small ADUs are semantically coupled to the larger ADUs within the media domain (for example, in-band parameter sets in H.264 [RFC6184]). in cases like that, aggregation makes sense even if it isn't required from a payload/header overhead viewpoint ๐งก there are also cases where the ADUs are pre-produced and can't be adapted to a specific network's MTU. instead, their packetization needs to be adapted to the network ๐ง all of the above factors should be taken into account when deciding whether to include aggregation, and weighing its benefits against the complexity of defining it (which can be significant, especially when aggregation is performed over ADUs with different playback times) โ๏ธ
the main disadvantage of aggregation, beyond implementation complexity, is the extra delay it introduces (due to buffering until a sufficient number of ADUs have been collected at the sender) and reduced robustness against packet loss ๐ญ aggregation also introduces buffering requirements at the receiver. so, tea โ
5.1.2. Fragmentation ๐ซถ
if the real-time media format has the property that it may produce ADUs larger than common MTU sizes, then fragmentation support should be considered ๐งฉ an RTP payload format may always fall back on IP fragmentation. however, as discussed in RFC 2736, this has some drawbacks. perhaps the most important reason to avoid IP fragmentation is that IP fragmented packets are commonly discarded in the network, especially by NATs or firewalls ๐ซ using fragmentation at the RTP payload format level allows for more efficient use of RTP packet loss recovery mechanisms ๐ it can also, in some cases, allow better usage of partial ADUs by doing media-specific fragmentation at media-specific boundaries ๐ฏ in use cases where the ADUs are pre-produced and can't be adapted to the network's MTU size, support for fragmentation can be crucial ๐
5.1.3. Interleaving and Transmission Rescheduling โจ
Okay so interleaving is literally the glow-up for packet loss ๐ . A lot of payload formats use it so quality doesn't tank as much when packets go missing. When losses are bursty and several consecutive packets vanish at once, quality can get seriously messed up ๐ญ. Interleaving takes that one big burst and turns it into several spread-out single-packet losses, which is way easier to live with. It can also come in clutch when several ADUs are aggregated into the same packets. If one RTP packet carrying several ADUs gets lost, it's the same vibe as a burst loss, as long as those ADUs would've been sent in individual packets. So to make the loss less bursty, the data inside an aggregated payload may be interleaved, which spreads the loss out over a longer stretch of time ๐ฆ.
Here's the rule: to do interleaving inside an RTP payload format, you need aggregation of multiple ADUs. If a format doesn't aggregate, it can still do a transmission order rescheduling mechanism ๐ง. That means packets sent back to back come from different spots in the RTP stream. This can help soften burst losses, which is useful if you send packets at frequent intervals. Bonus: it can also send the more important data earlier, paired with RTP retransmission, so degradation is more graceful and the good stuff (like intra frames of video) is more likely to get through ๐.
The tea though ๐ต: interleaving has a big downside. The transmission buffering delay gets significantly bigger, so it's not great for low-delay apps ๐ฉ. It may also need a lot of buffer space on the receiver side. And that buffering is annoying, because it's usually hard to say when a receiver can start consuming data without running into buffer underrun caused by the interleaving itself. Rescheduling is only really useful in a few specific cases, like streaming with retransmissions. So the gains have to be weighed against how complicated these schemes get ๐ง .
5.1.4. Media Back Channels ๐
A few RTP payload formats have snuck back channels right inside the media format ๐คซ. Those are for specific features, like the AMR [RFC4867] codec mode request (CMR) field. The CMR field shows up in gateways to circuit-switched voice, so an IP terminal can react to what the circuit-switched network needs in terms of a specific encoder mode. A common reason for media back channels is wanting signaling that's directly tied to the media or the media path ๐.
If you're thinking about a back channel for your RTP payload format, it should be for a specific requirement that can't easily be handled by the more generic mechanisms in RTP or RTCP ๐.
5.1.5. Media Scalability ๐
Some codecs can do media scalability, which basically means some data from an RTP stream can get removed to adapt the media's properties, like bitrate and quality โจ. Adaptation can happen along these dimensions of the media:
- Temporal: For most video codecs, you can adapt the frame rate without any specific definition of a temporal scalability mode, e.g., for H.264 [RFC6184] ๐๏ธ. In those cases the sender changes which frames it delivers, and the RTP timestamp makes the frame interval and each frame's relative capture time clear. H.264 Scalable Video Coding (SVC) [RFC6190] has more explicit support for temporal scalability.
- Spatial: Video codecs supporting scalability may adapt the resolution, e.g., in SVC [RFC6190] ๐.
- Quality: The quality of the encoded stream may be scaled by adapting the accuracy of the coding process, as, e.g. possible with Signal to Noise Ratio (SNR) fidelity scalability of SVC [RFC6190] ๐.
At the time of writing, scalable codecs are having a total revival ๐ฆ. People have realized that getting the functionality needed to support the features of the media stream into the RTP framework is seriously challenging. One of the recent examples of layered, scalable codecs is SVC [RFC6190].
SVC is a great example of a payload format supporting media scalability features, and those features were already included in basic form in RTP ๐ . A layered codec supports dropping data parts of an RTP stream. That means RTP packets may not be transmitted or forwarded to a client, which adapts the RTP stream's bitrate and the received encoded stream's quality, while still giving the client a decodable subset of the encoded stream. One example is an RTP Mixer (Multipoint Control Unit) [RFC7667], which controls the rate and quality sent out to participants in a communication by dropping RTP packets or removing part of the payload. Another example is a transport channel that allows differentiation in Quality of Service (QoS) parameters based on RTP sessions in a multicast session. In that case, the more important packets of the scalable encoded stream (base layer) may get better QoS parameters than the less important packets (enhancement layer), giving some kind of graceful degradation. The scalability features needed for an adaptive transport, as in the two examples above, are based on RTP multiplexing, so the packets to be dropped or transmitted/forwarded can be identified. The multiplexing features defined for Scalable Video Coding [RFC6190] are:
- Single Session Transmission (SST), where all media layers of the media are transported as a single synchronization source (SSRC) in a single RTP session; as well as
- Multi-Session Transmission (MST), which should more accurately be called multi-stream transmission, where different media layers or a set of media layers are transported in different RTP streams, i.e., using multiple sources (SSRCs).
In the first case (SST), you need additional in-band as well as out-of-band signaling so you can tell which packets belong to a specific media layer ๐. Adapting the encoded stream also means dropping specific packets so the client still gets a compliant encoded stream. If encryption is in use, an adapting network device typically needs to be in the security context to allow packet dropping and still provide an intact RTP session to the client. That typically means the network device has to be an RTP mixer ๐.
In general, having a media-unaware network device drop excess packets is more problematic than having a Media-Aware Network Entity (MANE) do it ๐ โโ๏ธ. First, the MANE needs to understand the media format and know which ADUs or payloads belong to the layers that no other layer will depend on after the dropping. Second, if the MANE can work as an RTP mixer or translator, it can rewrite the RTP and RTCP so the receiver won't suspect unintentional RTP packet losses that need repair actions. That's because the receiver can't tell whether a lost packet was an important base layer packet or one of the less important extension layers ๐ฅบ.
In the second case (MST), the RTP packet streams can be sent using a single or multiple RTP sessions, and so transport flows, e.g., on different multicast groups ๐ธ. When streams are sent in different RTP sessions, the out-of-band signaling typically provides enough information to identify the media layers and their properties. The decision on dropping packets is based on the Network Address that identifies the RTP session to be dropped. To give a decoder correct data after reception from different sessions, data realignment mechanisms are required. Sometimes existing generic tools, as described below, can handle that realignment, and when those generic mechanisms are sufficient, they should be used. For example, "Rapid Synchronisation for RTP Flows" [RFC6051] uses existing RTP mechanisms, i.e. the NTP timestamp, to ensure timely inter-session synchronization โฐ. Another is the signaling feature for indicating dependencies of RTP sessions in SDP, as defined in the Media Decoding Dependency Grouping in SDP [RFC5583].
Using MST within a single RTP session is also possible, and it allows stream-level handling instead of a MANE looking deeper into the packets ๐ง. However, transport flow-level properties will be the same unless packet-based mechanisms like Diffserv are used.
When QoS settings, e.g., Diffserv markings, are used to make sure the extension layers are dropped before the base layer, the receiving endpoint gets a perk in MST ๐. It can tell which layer or set of layers the missing packets belong to, because they're bound to different RTP sessions or RTP packet streams (SSRCs). That explicitly indicates how important the loss is.
5.1.6. High Packet Rates โก
Some media codecs need high packet rates, and in those cases the RTP sequence number wraps too quickly ๐ญ. As a rule of thumb, it must not be possible to wrap the sequence number space within at least three RTCP reporting intervals. The reporting interval can vary widely due to configuration and session properties, and it also must take into account the randomization of the interval, so you can use the TCP maximum segment lifetime (MSL), i.e., 2 minutes, in your considerations โณ. If earlier wrapping may occur, then the payload format should specify an extended sequence number field, so the receiver can figure out where a specific payload belongs in the sequence, even with extensive reordering. The RTP payload format for uncompressed video [RFC4175] can be used as an example for such a field ๐๏ธ.
RTCP is also affected by high packet rates ๐. For RTCP mechanisms that don't use extended counters, there's a significant risk that they wrap multiple times between RTCP reporting or feedback, which creates uncertainty about which packet(s) are referenced. The payload designer can't change the RTCP packet formats used or their design, but can keep these considerations in mind when configuring RTCP bandwidth and reporting intervals, to avoid wrapping issues ๐.
5.2. Selecting Timestamp Definition ๐
okay bestie, the RTP timestamp is lowkey the MVP of the packet ๐, and it comes with two design choices. The first is the definition, which decides what the timestamp value in a given RTP packet actually means. The second is which timestamp rate to use ๐.
The timestamp definition needs to spell out exactly what the timestamp value in the RTP packet represents for that payload format. No vagueness allowed โจ. There are two common definitions. For discretely sampled media, like video frames, it's the sampling time of the earliest included video frame that the data represents (fully or partially). For continuous media, like audio, it's the sampling time of the earliest sample the payload data represents. There are also cases where more elaborate or different definitions get used ๐ฆ.
โ ๏ธ If the timestamp definition has little or no correlation between the media time instance and its transmission time, the RTCP jitter calculation becomes unusable because the errors come from the sender side ๐. A classic example is a video codec payload format where the RTP timestamp is the capture time of the frame, but frames are big enough that several RTP packets get sent per frame, spread across the framing interval ๐ญ. It should be noted whether or not the payload format has this property.
An RTP payload format also needs to define which timestamp rates, also called clock rates, may be used. Depending on the format, that could be a single rate, several rates, or theoretically any rate ๐. So what should you think about when picking one?
The rate needs to be chosen so you can work out where in the media timeline a particular sample (like one audio sample or a video frame) or set of samples (like audio frames) belongs ๐ง. That's what lets the data line up correctly with previous frames, even across periods of discontinuous transmission or irregularities.
For audio, sample accuracy is usually the goal, so people commonly pick the input sampling rate as the timestamp rate ๐ง. This gets tricky with audio codecs that support multiple sampling frequencies, whether as codec input or used internally in a way that affects output, like frame duration. Depending on how you expect those rates to get used, you can allow multiple timestamp rates, each matching a particular codec input or sampling rate. But because of the issues with using multiple different RTP timestamp rates for the same source (SSRC) [RFC7160], you should avoid this if you expect to need to switch between modes ๐ โโ๏ธ.
Another option is to find a common denominator frequency between the modes, like OPUS [RFC7587], which uses 48 kHz ๐. If the modes use or can use a common input/output frequency, selecting that needs consideration too. But you have to think about all the aspects, as AMR-WB+ [RFC4352] shows. AMR-WB+'s RTP timestamp rate is the super unusual 72 kHz, even though its output is normally at a sample rate of 48kHz ๐คฏ. The reason is that the codec produces a huge range of different frame lengths in time. 72 kHz is the smallest value that makes every frame the codec could produce an integer length in RTP timestamp ticks. That way, a receiver can always place a frame correctly relative to any other frame, even when the frame length changes โจ. The catch is that the decoder outputs for certain frame lengths are actually partial samples, so the output in samples varies from frame to frame, which can make implementation harder ๐ .
Video codecs have commonly used 90 kHz ๐บ, because it's the common denominator between the frame rates people actually use, like 24, 25, 30, 50 and 60, plus NTSC's odd 29.97 Hz. There's at least one exception: the payload format for SMPTE 292M video [RFC3497] uses a clock rate of 148.5 MHz ๐ฅ. The reason is that the timestamp then identifies the exact start sample within a video frame.
Timestamp rates below 1000 Hz are not appropriate, since that gives too low a resolution in the RTCP measurements, which are expressed in RTP timestamps ๐ . That's the main reason text RTP payload formats, like T.140 [RFC4103], use 1000 Hz.
6. Noteworthy Aspects in Payload Format Design ๐
This section shows a few payload formats worth noting, for good or bad design in general or in specific details ๐.
6.1. Audio Payloads ๐ถ
The AMR [RFC4867], AMR-WB [RFC4867], EVRC [RFC3558] and SMV [RFC3558] payload formats are all pretty similar ๐ฏ. They're all for frame-based audio codecs and use a table of contents structure. Each frame gets a table of contents entry that says what type the frame is and whether more frames are present. It's super flexible, but it adds unnecessary overhead if the ADU is fixed size, and if you aggregate multiple ADUs that are usually the same type. In that case, a solution like the one in AMR-WB+ [RFC4352] may be more suitable ๐ง .
The RTP payload format for MIDI [RFC6295] has some interesting features ๐น. MIDI is sensitive to packet loss, because losing a "note off" command leaves a note stuck in an "on" state ๐ฑ. To counter that, a recovery journal is defined that provides a summarized state, so the receiver can recover from packet losses quickly. It also uses RTCP and the reported highest sequence number to prune the state the recovery journal needs to contain. These features seem limited in applicability to media formats that are highly stateful and mainly use symbolic media representations ๐คทโโ๏ธ.
๐จ There's a security concern with variable bitrate audio and speech codecs that change their payload length based on the input data. This can leak information, especially in structured communication like a speech recognition prompt service that asks people to enter info verbally. The issue also exists to some degree with discontinuous transmission, since that lets the length of phrases be determined. It's further discussed in "Guidelines for the Use of Variable Bit Rate Audio with Secure RTP" [RFC6562], which needs to be read by anyone writing an RTP payload format for an audio or speech codec with these properties ๐.
6.2. Video ๐น
The definition of RTP payload formats for video has evolved from early ones like H.261 [RFC4587] toward the newest ones for VP8 [RFC7741] and H.265/HEVC [RFC7798] โจ.
The H.264 RTP payload format [RFC3984] is a total smorgasbord of functionality ๐ฑ. Some of it, like the interleaving, is pretty advanced. The point was to make sure most of the applications the ITU-T and MPEG considered that RTP can support are actually supported. That made a payload format that's rarely fully implemented ๐ . Still, no major interoperability issues have been reported, with one exception: the Offer/Answer and parameter signaling, which led to a revised specification [RFC6184]. But complaints about its complexity are common ๐.
The RTP payload format for uncompressed video [RFC4175] needs to be mentioned here, because it has a special feature you don't see much in RTP payload formats ๐ซ. Uncompressed video has a high bitrate and therefore a high packet rate (gigabits rather than megabits per second), so the format includes a field to extend the RTP sequence number. The normal 16-bit one can wrap in less than a second โฑ๏ธ. [RFC4175] also specifies a registry of different color sub-samplings that can be reused in other video RTP payload formats ๐.
Both the H.264 and uncompressed video formats let the implementer meet the goals of application-level framing ๐ผ๏ธ. That means each individual RTP packet's payload can be decoded independently, and its content used to build a video frame (or part of one), whether or not preceding packets were lost (see Section 4) [RFC2736]. For uncompressed video this is straightforward, since each pixel is represented independently of the others and its location in the frame is known. H.264 depends more on the actual implementation, the video encoder configuration, and how the RTP payload format is used ๐ค.
The common challenge with video is that, in most cases, a single compressed video frame doesn't fit into a single IP packet ๐ฉ. So the compressed representation of a frame has to be split over multiple packets. You can do that unintelligently with a basic payload-level fragmentation method, or more integrated by working with the encoder's capabilities to create ADUs that are independent and fit the MTU for the RTP packet. The latter is more robust and commonly recommended, unless strong packet loss mechanisms are in use and there's enough delay budget for repair ๐ก๏ธ. Usually, both payload-level fragmentation and an explanation of how tailored ADUs can be created are needed in a video payload format. Also, crucial metadata like H.264 Parameter Sets needs handling, since decoding isn't possible without receiving the parameter sets used ๐ซถ.
6.3. Text โจ๏ธ
Only a single text format has been standardized in the IETF: T.140 [RFC4103]. The 3GPP Timed Text format [RFC4396] should be considered to be text, even though it was eventually registered as a video format ๐ฌ. It landed in that part of the tree because it deals with decorated text, usable for subtitles and other embellishments of video. But it has many of the properties text formats generally have ๐.
The RTP payload format for T.140 was designed with high reliability in mind, since real-time text is commonly an extremely low bitrate application ๐. So it recommends using RFC 2198 with many generations of redundancy. However, the format failed to provide a text-block-specific sequence number and instead relies on the RTP one to detect loss. That makes detecting missing text blocks unnecessarily difficult, and hinders deployment with other robustness mechanisms that would involve switching the payload type, since that may result in erroneous error marking in the T.140 text stream ๐ค.
6.4. Application โจ
Okay so, at the time of writing, the application content type has two media types that aren't RTP transport robustness tools ๐ก๏ธ like FEC [RFC3009] [RFC5109] [RFC6015] [RFC6682] or RTP retransmission [RFC4588].
The first one is H.224 [RFC4573], which lets you do far-end camera control over RTP ๐ฅ. This is not an IETF-defined RTP format, just an IETF-performed registration, so keep that in mind ๐ .
The second one is "RTP Payload Format for Society of Motion Picture and Television Engineers (SMPTE) ST 336 Encoded Data" [RFC6597], and it carries generic key length value (KLV) triplets ๐. These pairs can hold arbitrary binary metadata attached to video transmissions. It has a very basic fragmentation mechanism that needs reception without packet loss, and not just of the triplet itself. You also need the packet right before and the packet right after the sequence of fragmented KLV triplet, so it can be received correctly ๐ญ. Specific KLV triplets may have their own recommendations on how to handle incomplete ones, which allows using and repairing them ๐ง. In general, the application using this mechanism must be robust to errors. It also has to combine some mix of application-level repetition, RTP-level transport robustness tools, and network-level requirements to reach low packet loss rates and repair KLV triplets ๐ฅ.
An author should consider applying for a media subtype under the application media type (application/<foo>) when the payload format is generic or doesn't clearly match any of the media types described above (audio, video, or text) ๐ธ. However, existing limitations in, for example, SDP mean that generic mechanisms, which are normally registered in all media types, may have ended up associated with any existing media types in an RTP session ๐.
7. Important Specification Sections โจ
A number of sections in the payload format draft need special consideration ๐. These include the Security Considerations and IANA Considerations sections, which are required in all drafts. Payload formats are also strongly recommended to have the media format description and congestion control considerations ๐ซถ. The included RTP payload format template (Appendix A) has sample text for some of these sections ๐.
7.1. Media Format Description
The point of this section is to help reviewers and other readers get an overview of the capabilities and major properties of the media format โจ. It should be kept short and concise, and it is not a complete replacement for reading the media format specification ๐.
The actual specification of the RTP payload format usually uses normative references to the codec format specification to define how codec data elements are included in the payload format ๐ฆ. That normative reference can point to anything that has sufficient stability for a normative reference. There are no formal requirements on the codec format specification being publicly available or free to access. However, it really helps the review process if that specification is made available to any reviewer ๐ . There are RTP payload format RFCs for open-source project specifications, as well as for an individual company's proprietary format, and for a large variety of standards development organizations or industrial forums ๐.
7.2. Security Considerations
All Internet-Drafts require a Security Considerations section ๐. The Security Considerations section in an RTP payload format needs to focus on the security properties this particular format has ๐. Some payload formats have very few specific issues or properties, and they can fully fall back on the security considerations for RTP in general and those of the profile being used ๐. Because those documents always apply, a reference to them is normally placed first in the Security Considerations section. There is suggested text in the template below โจ.
The security issues of confidentiality, integrity protection, replay protection, and source authentication are common to all payload formats ๐ซฃ. These should be solved by mechanisms external to the payload, so they don't need any special consideration in the payload format beyond a reminder about them ๐ก๏ธ. There are exceptions, like payload formats that include security functionality, such as ISMAcrypt [ISMACrypt2]. The reasons for this division are further documented in "Securing the RTP Protocol Framework: Why RTP Does Not Mandate a Single Media Security Solution" [RFC7202]. For a survey of the available mechanisms that meet these goals, check out "Options for Securing RTP Sessions" [RFC7201] ๐. This also covers key-exchange mechanisms for the security mechanisms, which can be either integrated or separate. The choice of key management can have a big impact on the security properties of the RTP-based application ๐๏ธ. Suitable stock text to inform people about this is included in the template ๐ .
Potential security issues with an RTP payload format and the media encoding that need to be considered, if they apply, are these ๐จ:
- The decoding of the payload format or its media results in substantial non-uniformity, either in output or in complexity to perform the decoding operation. For example, a generic non-destructive compression algorithm may produce output of almost infinite size from a very limited input, which would eat memory or storage space way out of proportion to what the receiving application expected ๐. Such inputs can cause some sort of disruption, i.e., a denial-of-service attack on the receiver side by stopping that host from doing usable work ๐ฑ. Certain decoding operations may also vary in how much processing they need depending on the input. This may be a security risk too, if it's possible to push the processing load well above nominal just by designing a malicious input sequence ๐ฅ. If such potential attacks exist, this must be made clear in the Security Considerations section, so implementers know they need to take precautions against such behavior ๐ฉ.
- The inclusion of active content in the media format or its transport. "Active content" means scripts and similar things that let an attacker perform potentially arbitrary operations on the receiver ๐. Most active content has limited ability to access the system or do anything outside a protected sandbox. RFC 4855 [RFC4855] has a requirement that it be noted in the media types registration whether or not the payload format contains active content ๐. If the payload format has active content, it is strongly recommended that references to any security model applicable to that content are provided ๐. A boilerplate text for "no active content" is included in the template. This must be changed if the format actually carries active content ๐ โโ๏ธ.
- Some media formats allow for the carrying of "user data", meaning types of data that weren't known when the payload format was specified. Such data may be a security risk, so it should be mentioned ๐ซข.
- Audio or speech codecs that support variable bitrate based on 'audio/speech' input, or that have discontinuous transmission support, must consider the issues discussed in "Guidelines for the Use of Variable Bit Rate Audio with Secure RTP" [RFC6562] ๐ง.
Suitable stock text for the Security Considerations section is provided in the template in Appendix A ๐. However, authors really do need to actively consider any security issues from the start ๐ค. Failing to address these issues may block approval and publication, so don't skip this part ๐.
7.3. Congestion Control
RTP and its profiles do discuss congestion control ๐ฆ. There is ongoing work in the IETF with both a basic circuit-breaker mechanism [RFC8083], which uses basic RTCP messages intended to prevent persistent congestion, and more capable congestion avoidance and bitrate adaptation mechanisms in the RMCAT WG ๐ฃ๏ธ.
Congestion control is an important issue for any usage on networks that aren't dedicated ๐. For that reason, it is recommended that all RTP payload format documents discuss the possibilities that exist to regulate the bitrate of transmissions using the described RTP payload format ๐. Some formats may have limited or step-wise regulation of bitrate, and those limiting factors should be discussed ๐ช.
7.4. IANA Considerations
Since all RTP payload formats contain a media type specification, they also need an IANA Considerations section ๐๏ธ. The media type name must be registered, and this is done by requesting that IANA register that media name ๐. When that registration request is written, it shall also be requested that the media type is included under the "RTP Payload Format media types" subregistry of the RTP registry (http://www.iana.org/assignments/rtp-parameters) ๐.
Parameters for the payload format need to be included in this registration, and they can be specified as required or optional ones ๐. The format of these parameters should be such that they can be included in the SDP attribute "a=fmtp" string (see Section 6 [RFC4566]), which is the common mapping ๐งฉ. Some parameters, such as "Channel", are normally mapped to the rtpmap attribute instead. See Section 3 of [RFC4855] for that ๐ธ.
In addition to the above request for media type registration, some payload formats may have parameters where new parameter values need to be added later on ๐ฎ. In these cases, a registry for that parameter must be created. This is done by defining the registry in the IANA Considerations section ๐๏ธ. BCP 26 [BCP26] provides guidelines for specifying such registries. Care should be taken when defining the policy for new registrations โ๏ธ.
Before specifying a new registry, it is worth checking the existing ones in the IANA "MIME Media Type Sub-Parameter Registries" ๐. For example, video formats that need a media parameter expressing color sub-sampling may be able to reuse those defined for 'video/raw' [RFC4175] ๐.
8. Authoring Tools โจ
This section provides information about some tools that may be used ๐งฐ. Don't feel pressured to follow these recommendations ๐ซถ. There are a number of alternatives, including the ones listed at <http://tools.ietf.org>. But these suggestions are worth checking out before you decide that the grass is greener somewhere else ๐.
Note that these options are related to the old text-only RFC format, and they don't cover tools for the recently approved new RFC format, which is described in [RFC7990] ๐.
8.1. Editing Tools ๐
okay so, there are SO many tools you could pick for writing Internet-Drafts ๐ but at the end of the day, whatever you use has to spit out a draft that follows the Internet-Draft requirements. No exceptions ๐
If you've never written an Internet-Draft before, xml2rfc is honestly a bestie โจ It creates a ton of the boilerplate for you, and it follows the latest rules, so you do way less busywork. It also helps with publishing after approval, because the RFC Editor can use your source XML to make the RFC faster ๐
Another popular option is Microsoft Word with a suitable template (see [RFC5385]). You write the draft, then print it to file using the generic text printer ๐จ๏ธ Word is great for spell checking and change bars ๐ but ngl, it can be a little chaotic. It may change your formatting, and what you see in the editor might not match the text document you get out. That's just the author's personal experience, but it's a real vibe ๐
8.2. Verification Tools ๐ฆ
There are a few tools you'll want to know about before you write a draft. They help you check and verify different parts of your work. You can find them at http://tools.ietf.org.
- I-D Nits checker (
https://tools.ietf.org/tools/idnits/) ๐งน This one checks that your boilerplate and other machine-checkable things are okay in your draft. Always run it before you submit so you don't get refused right at the submission step ๐ญ - ABNF Parser and verification (
https://tools.ietf.org/tools/bap/abnf.cgi) ๐ It checks that your ABNF parses correctly and warns you about loose ends, like undefined symbols. BUT it can't tell if the content is actually right. Only a human who knows what it's supposed to describe can verify that ๐ง - RFC diff (
https://tools.ietf.org/rfcdiff) ๐ธ This is a diff tool built for drafts and RFCs. For example, it won't flag the footer and header moving relative to the text on every page, which is very considerate of it ๐ซถ
9. Security Considerations ๐ฅ
Okay, serious moment, bestie ๐ค This is an Informational RFC about writing drafts that are meant to become RFCs, so there are no direct security considerations. HOWEVER, the document does talk about writing Security Considerations sections, and what you should especially think about when you're specifying RTP payload formats. So don't skip your own Security Considerations section ๐ง๐
10. Informative References ๐
[BCP9] Bradner, S., "The Internet Standards Process -- Revision
3", BCP 9, RFC 2026, October 1996.
Kolkman, O., Bradner, S., and S. Turner, "Characterization
of Proposed Standards", BCP 9, RFC 7127, January 2014.
Dusseault, L. and R. Sparks, "Guidance on Interoperation
and Implementation Reports for Advancement to Draft
Standard", BCP 9, RFC 5657, September 2009.
Housley, R., Crocker, D., and E. Burger, "Reducing the
Standards Track to Two Maturity Levels", BCP 9, RFC 6410,
October 2011.
Resnick, P., "Retirement of the "Internet Official
Protocol Standards" Summary Document", BCP 9, RFC 7100,
December 2013.
Dawkins, S., "Increasing the Number of Area Directors in
an IETF Area", BCP 9, RFC 7475, March 2015.
<http://www.rfc-editor.org/info/bcp9>
[BCP25] Wasserman, M., "Updates to RFC 2418 Regarding the
Management of IETF Mailing Lists", BCP 25, RFC 3934,
October 2004.
Bradner, S., "IETF Working Group Guidelines and
Procedures", BCP 25, RFC 2418, September 1998.
Resnick, P. and A. Farrel, "IETF Anti-Harassment
Procedures", BCP 25, RFC 7776, March 2016.
<http://www.rfc-editor.org/info/bcp25>
[BCP26] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008, <http://www.rfc-editor.org/info/bcp26>.
[BCP78] Bradner, S., Ed. and J. Contreras, Ed., "Rights
Contributors Provide to the IETF Trust", BCP 78, RFC 5378,
November 2008, <http://www.rfc-editor.org/info/bcp78>.
[BCP79] Bradner, S., Ed., "Intellectual Property Rights in IETF
Technology", BCP 79, RFC 3979, March 2005.
Narten, T., "Clarification of the Third Party Disclosure
Procedure in RFC 3979", BCP 79, RFC 4879, April 2007.
<http://www.rfc-editor.org/info/bcp79>
[BLOAT] Nichols, K. and V. Jacobson, "Controlling Queue Delay",
ACM Networks, Vol. 10, No. 5, DOI 10.1145/2208917.2209336,
May 2012, <http://queue.acm.org/detail.cfm?id=2209336>.
[CSP-RTP] Perkins, C., "RTP: Audio and Video for the Internet",
Addison-Wesley Professional, ISBN 0-672-32249-8, June
2003.
[ID-GUIDE] Housley, R., "Guidelines to Authors of Internet-Drafts",
December 2010,
<http://www.ietf.org/id-info/guidelines.html>.
[ISMACrypt2]
Internet Streaming Media Alliance (ISMA), "ISMA Encryption
and Authentication, Version 2.0 release version", November
2007, <http://www.oipf.tv/docs/mpegif/isma_easpec2.0.pdf>.
[RED] Floyd, S. and V. Jacobson, "Random Early Detection (RED)
gateways for Congestion Avoidance", IEEE/ACM Transactions
on Networking 1(4) 397--413, August 1993,
<http://www.aciri.org/floyd/papers/early.pdf>.
[RFC1633] Braden, R., Clark, D., and S. Shenker, "Integrated
Services in the Internet Architecture: an Overview",
RFC 1633, DOI 10.17487/RFC1633, June 1994,
<http://www.rfc-editor.org/info/rfc1633>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC2198] Perkins, C., Kouvelas, I., Hodson, O., Hardman, V.,
Handley, M., Bolot, J., Vega-Garcia, A., and S. Fosse-
Parisis, "RTP Payload for Redundant Audio Data", RFC 2198,
DOI 10.17487/RFC2198, September 1997,
<http://www.rfc-editor.org/info/rfc2198>.
[RFC2360] Scott, G., "Guide for Internet Standards Writers", BCP 22,
RFC 2360, DOI 10.17487/RFC2360, June 1998,
<http://www.rfc-editor.org/info/rfc2360>.
[RFC2418] Bradner, S., "IETF Working Group Guidelines and
Procedures", BCP 25, RFC 2418, DOI 10.17487/RFC2418,
September 1998, <http://www.rfc-editor.org/info/rfc2418>.
[RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z.,
and W. Weiss, "An Architecture for Differentiated
Services", RFC 2475, DOI 10.17487/RFC2475, December 1998,
<http://www.rfc-editor.org/info/rfc2475>.
[RFC2508] Casner, S. and V. Jacobson, "Compressing IP/UDP/RTP
Headers for Low-Speed Serial Links", RFC 2508,
DOI 10.17487/RFC2508, February 1999,
<http://www.rfc-editor.org/info/rfc2508>.
[RFC2733] Rosenberg, J. and H. Schulzrinne, "An RTP Payload Format
for Generic Forward Error Correction", RFC 2733,
DOI 10.17487/RFC2733, December 1999,
<http://www.rfc-editor.org/info/rfc2733>.
[RFC2736] Handley, M. and C. Perkins, "Guidelines for Writers of RTP
Payload Format Specifications", BCP 36, RFC 2736,
DOI 10.17487/RFC2736, December 1999,
<http://www.rfc-editor.org/info/rfc2736>.
[RFC2959] Baugher, M., Strahm, B., and I. Suconick, "Real-Time
Transport Protocol Management Information Base", RFC 2959,
DOI 10.17487/RFC2959, October 2000,
<http://www.rfc-editor.org/info/rfc2959>.
[RFC2974] Handley, M., Perkins, C., and E. Whelan, "Session
Announcement Protocol", RFC 2974, DOI 10.17487/RFC2974,
October 2000, <http://www.rfc-editor.org/info/rfc2974>.
[RFC3009] Rosenberg, J. and H. Schulzrinne, "Registration of
parityfec MIME types", RFC 3009, DOI 10.17487/RFC3009,
November 2000, <http://www.rfc-editor.org/info/rfc3009>.
[RFC3095] Bormann, C., Burmeister, C., Degermark, M., Fukushima, H.,
Hannu, H., Jonsson, L-E., Hakenberg, R., Koren, T., Le,
K., Liu, Z., Martensson, A., Miyazaki, A., Svanbro, K.,
Wiebke, T., Yoshimura, T., and H. Zheng, "RObust Header
Compression (ROHC): Framework and four profiles: RTP, UDP,
ESP, and uncompressed", RFC 3095, DOI 10.17487/RFC3095,
July 2001, <http://www.rfc-editor.org/info/rfc3095>.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261,
DOI 10.17487/RFC3261, June 2002,
<http://www.rfc-editor.org/info/rfc3261>.
[RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
with Session Description Protocol (SDP)", RFC 3264,
DOI 10.17487/RFC3264, June 2002,
<http://www.rfc-editor.org/info/rfc3264>.
[RFC3410] Case, J., Mundy, R., Partain, D., and B. Stewart,
"Introduction and Applicability Statements for Internet-
Standard Management Framework", RFC 3410,
DOI 10.17487/RFC3410, December 2002,
<http://www.rfc-editor.org/info/rfc3410>.
[RFC3497] Gharai, L., Perkins, C., Goncher, G., and A. Mankin, "RTP
Payload Format for Society of Motion Picture and
Television Engineers (SMPTE) 292M Video", RFC 3497,
DOI 10.17487/RFC3497, March 2003,
<http://www.rfc-editor.org/info/rfc3497>.
[RFC3545] Koren, T., Casner, S., Geevarghese, J., Thompson, B., and
P. Ruddy, "Enhanced Compressed RTP (CRTP) for Links with
High Delay, Packet Loss and Reordering", RFC 3545,
DOI 10.17487/RFC3545, July 2003,
<http://www.rfc-editor.org/info/rfc3545>.
[RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V.
Jacobson, "RTP: A Transport Protocol for Real-Time
Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
July 2003, <http://www.rfc-editor.org/info/rfc3550>.
[RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and
Video Conferences with Minimal Control", STD 65, RFC 3551,
DOI 10.17487/RFC3551, July 2003,
<http://www.rfc-editor.org/info/rfc3551>.
[RFC3558] Li, A., "RTP Payload Format for Enhanced Variable Rate
Codecs (EVRC) and Selectable Mode Vocoders (SMV)",
RFC 3558, DOI 10.17487/RFC3558, July 2003,
<http://www.rfc-editor.org/info/rfc3558>.
[RFC3569] Bhattacharyya, S., Ed., "An Overview of Source-Specific
Multicast (SSM)", RFC 3569, DOI 10.17487/RFC3569, July
2003, <http://www.rfc-editor.org/info/rfc3569>.
[RFC3577] Waldbusser, S., Cole, R., Kalbfleisch, C., and D.
Romascanu, "Introduction to the Remote Monitoring (RMON)
Family of MIB Modules", RFC 3577, DOI 10.17487/RFC3577,
August 2003, <http://www.rfc-editor.org/info/rfc3577>.
[RFC3611] Friedman, T., Ed., Caceres, R., Ed., and A. Clark, Ed.,
"RTP Control Protocol Extended Reports (RTCP XR)",
RFC 3611, DOI 10.17487/RFC3611, November 2003,
<http://www.rfc-editor.org/info/rfc3611>.
That's the reference list in full, all ๐ nothing skipped ๐ซถ
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. Norrman, "The Secure Real-time Transport Protocol (SRTP)", RFC 3711, DOI 10.17487/RFC3711, March 2004, <http://www.rfc-editor.org/info/rfc3711>.
[RFC3828] Larzon, L-A., Degermark, M., Pink, S., Jonsson, L-E., Ed., and G. Fairhurst, Ed., "The Lightweight User Datagram Protocol (UDP-Lite)", RFC 3828, DOI 10.17487/RFC3828, July 2004, <http://www.rfc-editor.org/info/rfc3828>.
[RFC3984] Wenger, S., Hannuksela, M., Stockhammer, T., Westerlund, M., and D. Singer, "RTP Payload Format for H.264 Video", RFC 3984, DOI 10.17487/RFC3984, February 2005, <http://www.rfc-editor.org/info/rfc3984>.
[RFC4103] Hellstrom, G. and P. Jones, "RTP Payload for Text Conversation", RFC 4103, DOI 10.17487/RFC4103, June 2005, <http://www.rfc-editor.org/info/rfc4103>.
[RFC4170] Thompson, B., Koren, T., and D. Wing, "Tunneling Multiplexed Compressed RTP (TCRTP)", BCP 110, RFC 4170, DOI 10.17487/RFC4170, November 2005, <http://www.rfc-editor.org/info/rfc4170>.
[RFC4175] Gharai, L. and C. Perkins, "RTP Payload Format for Uncompressed Video", RFC 4175, DOI 10.17487/RFC4175, September 2005, <http://www.rfc-editor.org/info/rfc4175>.
[RFC4352] Sjoberg, J., Westerlund, M., Lakaniemi, A., and S. Wenger, "RTP Payload Format for the Extended Adaptive Multi-Rate Wideband (AMR-WB+) Audio Codec", RFC 4352, DOI 10.17487/RFC4352, January 2006, <http://www.rfc-editor.org/info/rfc4352>.
[RFC4396] Rey, J. and Y. Matsui, "RTP Payload Format for 3rd Generation Partnership Project (3GPP) Timed Text", RFC 4396, DOI 10.17487/RFC4396, February 2006, <http://www.rfc-editor.org/info/rfc4396>.
[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session Description Protocol", RFC 4566, DOI 10.17487/RFC4566, July 2006, <http://www.rfc-editor.org/info/rfc4566>.
[RFC4571] Lazzaro, J., "Framing Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) Packets over Connection-Oriented Transport", RFC 4571, DOI 10.17487/RFC4571, July 2006, <http://www.rfc-editor.org/info/rfc4571>.
[RFC4573] Even, R. and A. Lochbaum, "MIME Type Registration for RTP Payload Format for H.224", RFC 4573, DOI 10.17487/RFC4573, July 2006, <http://www.rfc-editor.org/info/rfc4573>.
[RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, "Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, DOI 10.17487/RFC4585, July 2006, <http://www.rfc-editor.org/info/rfc4585>.
[RFC4587] Even, R., "RTP Payload Format for H.261 Video Streams", RFC 4587, DOI 10.17487/RFC4587, August 2006, <http://www.rfc-editor.org/info/rfc4587>.
[RFC4588] Rey, J., Leon, D., Miyazaki, A., Varsa, V., and R. Hakenberg, "RTP Retransmission Payload Format", RFC 4588, DOI 10.17487/RFC4588, July 2006, <http://www.rfc-editor.org/info/rfc4588>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, <http://www.rfc-editor.org/info/rfc4648>.
[RFC4844] Daigle, L., Ed. and Internet Architecture Board, "The RFC Series and RFC Editor", RFC 4844, DOI 10.17487/RFC4844, July 2007, <http://www.rfc-editor.org/info/rfc4844>.
[RFC4855] Casner, S., "Media Type Registration of RTP Payload Formats", RFC 4855, DOI 10.17487/RFC4855, February 2007, <http://www.rfc-editor.org/info/rfc4855>.
[RFC4867] Sjoberg, J., Westerlund, M., Lakaniemi, A., and Q. Xie, "RTP Payload Format and File Storage Format for the Adaptive Multi-Rate (AMR) and Adaptive Multi-Rate Wideband (AMR-WB) Audio Codecs", RFC 4867, DOI 10.17487/RFC4867, April 2007, <http://www.rfc-editor.org/info/rfc4867>.
[RFC4975] Campbell, B., Ed., Mahy, R., Ed., and C. Jennings, Ed., "The Message Session Relay Protocol (MSRP)", RFC 4975, DOI 10.17487/RFC4975, September 2007, <http://www.rfc-editor.org/info/rfc4975>.
[RFC5109] Li, A., Ed., "RTP Payload Format for Generic Forward Error Correction", RFC 5109, DOI 10.17487/RFC5109, December 2007, <http://www.rfc-editor.org/info/rfc5109>.
[RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/SAVPF)", RFC 5124, DOI 10.17487/RFC5124, February 2008, <http://www.rfc-editor.org/info/rfc5124>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, <http://www.rfc-editor.org/info/rfc5234>.
[RFC5285] Singer, D. and H. Desineni, "A General Mechanism for RTP Header Extensions", RFC 5285, DOI 10.17487/RFC5285, July 2008, <http://www.rfc-editor.org/info/rfc5285>.
[RFC5385] Touch, J., "Version 2.0 Microsoft Word Template for Creating Internet Drafts and RFCs", RFC 5385, DOI 10.17487/RFC5385, February 2010, <http://www.rfc-editor.org/info/rfc5385>.
[RFC5484] Singer, D., "Associating Time-Codes with RTP Streams", RFC 5484, DOI 10.17487/RFC5484, March 2009, <http://www.rfc-editor.org/info/rfc5484>.
[RFC5583] Schierl, T. and S. Wenger, "Signaling Media Decoding Dependency in the Session Description Protocol (SDP)", RFC 5583, DOI 10.17487/RFC5583, July 2009, <http://www.rfc-editor.org/info/rfc5583>.
[RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust Header Compression (ROHC) Framework", RFC 5795, DOI 10.17487/RFC5795, March 2010, <http://www.rfc-editor.org/info/rfc5795>.
[RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <http://www.rfc-editor.org/info/rfc5905>.
[RFC6015] Begen, A., "RTP Payload Format for 1-D Interleaved Parity Forward Error Correction (FEC)", RFC 6015, DOI 10.17487/RFC6015, October 2010, <http://www.rfc-editor.org/info/rfc6015>.
[RFC6051] Perkins, C. and T. Schierl, "Rapid Synchronisation of RTP Flows", RFC 6051, DOI 10.17487/RFC6051, November 2010, <http://www.rfc-editor.org/info/rfc6051>.
[RFC6184] Wang, Y., Even, R., Kristensen, T., and R. Jesup, "RTP Payload Format for H.264 Video", RFC 6184, DOI 10.17487/RFC6184, May 2011, <http://www.rfc-editor.org/info/rfc6184>.
[RFC6190] Wenger, S., Wang, Y., Schierl, T., and A. Eleftheriadis, "RTP Payload Format for Scalable Video Coding", RFC 6190, DOI 10.17487/RFC6190, May 2011, <http://www.rfc-editor.org/info/rfc6190>.
[RFC6295] Lazzaro, J. and J. Wawrzynek, "RTP Payload Format for MIDI", RFC 6295, DOI 10.17487/RFC6295, June 2011, <http://www.rfc-editor.org/info/rfc6295>.
[RFC6354] Xie, Q., "Forward-Shifted RTP Redundancy Payload Support", RFC 6354, DOI 10.17487/RFC6354, August 2011, <http://www.rfc-editor.org/info/rfc6354>.
[RFC6363] Watson, M., Begen, A., and V. Roca, "Forward Error Correction (FEC) Framework", RFC 6363, DOI 10.17487/RFC6363, October 2011, <http://www.rfc-editor.org/info/rfc6363>.
[RFC6410] Housley, R., Crocker, D., and E. Burger, "Reducing the Standards Track to Two Maturity Levels", BCP 9, RFC 6410, DOI 10.17487/RFC6410, October 2011, <http://www.rfc-editor.org/info/rfc6410>.
[RFC6562] Perkins, C. and JM. Valin, "Guidelines for the Use of Variable Bit Rate Audio with Secure RTP", RFC 6562, DOI 10.17487/RFC6562, March 2012, <http://www.rfc-editor.org/info/rfc6562>.
[RFC6597] Downs, J., Ed. and J. Arbeiter, Ed., "RTP Payload Format for Society of Motion Picture and Television Engineers (SMPTE) ST 336 Encoded Data", RFC 6597, DOI 10.17487/RFC6597, April 2012, <http://www.rfc-editor.org/info/rfc6597>.
[RFC6679] Westerlund, M., Johansson, I., Perkins, C., O'Hanlon, P., and K. Carlberg, "Explicit Congestion Notification (ECN) for RTP over UDP", RFC 6679, DOI 10.17487/RFC6679, August 2012, <http://www.rfc-editor.org/info/rfc6679>.
[RFC6682] Watson, M., Stockhammer, T., and M. Luby, "RTP Payload Format for Raptor Forward Error Correction (FEC)", RFC 6682, DOI 10.17487/RFC6682, August 2012, <http://www.rfc-editor.org/info/rfc6682>.
[RFC6701] Farrel, A. and P. Resnick, "Sanctions Available for Application to Violators of IETF IPR Policy", RFC 6701, DOI 10.17487/RFC6701, August 2012, <http://www.rfc-editor.org/info/rfc6701>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <http://www.rfc-editor.org/info/rfc6838>.
[RFC7160] Petit-Huguenin, M. and G. Zorn, Ed., "Support for Multiple Clock Rates in an RTP Session", RFC 7160, DOI 10.17487/RFC7160, April 2014, <http://www.rfc-editor.org/info/rfc7160>.
[RFC7164] Gross, K. and R. Brandenburg, "RTP and Leap Seconds", RFC 7164, DOI 10.17487/RFC7164, March 2014, <http://www.rfc-editor.org/info/rfc7164>.
[RFC7201] Westerlund, M. and C. Perkins, "Options for Securing RTP Sessions", RFC 7201, DOI 10.17487/RFC7201, April 2014, <http://www.rfc-editor.org/info/rfc7201>.
[RFC7202] Perkins, C. and M. Westerlund, "Securing the RTP Framework: Why RTP Does Not Mandate a Single Media Security Solution", RFC 7202, DOI 10.17487/RFC7202, April 2014, <http://www.rfc-editor.org/info/rfc7202>.
[RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014, <http://www.rfc-editor.org/info/rfc7231>.
[RFC7273] Williams, A., Gross, K., van Brandenburg, R., and H. Stokking, "RTP Clock Source Signalling", RFC 7273, DOI 10.17487/RFC7273, June 2014, <http://www.rfc-editor.org/info/rfc7273>.
[RFC7322] Flanagan, H. and S. Ginoza, "RFC Style Guide", RFC 7322, DOI 10.17487/RFC7322, September 2014, <http://www.rfc-editor.org/info/rfc7322>.
[RFC7587] Spittka, J., Vos, K., and JM. Valin, "RTP Payload Format for the Opus Speech and Audio Codec", RFC 7587, DOI 10.17487/RFC7587, June 2015, <http://www.rfc-editor.org/info/rfc7587>.
[RFC7656] Lennox, J., Gross, K., Nandakumar, S., Salgueiro, G., and B. Burman, Ed., "A Taxonomy of Semantics and Mechanisms for Real-Time Transport Protocol (RTP) Sources", RFC 7656, DOI 10.17487/RFC7656, November 2015, <http://www.rfc-editor.org/info/rfc7656>.
[RFC7667] Westerlund, M. and S. Wenger, "RTP Topologies", RFC 7667, DOI 10.17487/RFC7667, November 2015, <http://www.rfc-editor.org/info/rfc7667>.
[RFC7741] Westin, P., Lundin, H., Glover, M., Uberti, J., and F. Galligan, "RTP Payload Format for VP8 Video", RFC 7741, DOI 10.17487/RFC7741, March 2016, <http://www.rfc-editor.org/info/rfc7741>.
[RFC7798] Wang, Y., Sanchez, Y., Schierl, T., Wenger, S., and M. Hannuksela, "RTP Payload Format for High Efficiency Video Coding (HEVC)", RFC 7798, DOI 10.17487/RFC7798, March 2016, <http://www.rfc-editor.org/info/rfc7798>.
[RFC7826] Schulzrinne, H., Rao, A., Lanphier, R., Westerlund, M., and M. Stiemerling, Ed., "Real-Time Streaming Protocol Version 2.0", RFC 7826, DOI 10.17487/RFC7826, December 2016, <http://www.rfc-editor.org/info/rfc7826>.
[RFC7990] Flanagan, H., "RFC Format Framework", RFC 7990, DOI 10.17487/RFC7990, December 2016, <http://www.rfc-editor.org/info/rfc7990>.
[RFC8083] Perkins, C. and V. Singh, "Multimedia Congestion Control: Circuit Breakers for Unicast RTP Sessions", RFC 8083, DOI 10.17487/RFC8083, March 2017, <http://www.rfc-editor.org/info/rfc8083>.
[TAO] Hoffman, P., Ed., "The Tao of IETF: A Novice's Guide to the Internet Engineering Task Force", November 2012, <http://www.ietf.org/tao.html>.
[TRACKER] "IETF Datatracker", <https://datatracker.ietf.org/>.
Appendix A. RTP Payload Format Template ๐ง
Okay bestie, this appendix is basically a fill-in-the-blanks template ๐ for writing an RTP payload format as an Internet-Draft. Anything inside [...] is an instruction for you, so it gets deleted from the real draft ๐. Some of the text proposals are conditional, and "..." just marks the spots where you write your own stuff โจ.
A.1. Title
[The title shall be descriptive but as compact as possible. RTP is allowed and recommended abbreviation in the title]
RTP payload format for ... ๐
A.2. Front-Page Boilerplate
Status of this Memo ๐
[Insert the IPR notice and copyright boilerplate from BCP 78 and 79 that applies to this draft.]
[Insert the current Internet-Draft document explanation. At the time of publishing it was:]
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 http://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."
A.3. Abstract
[A payload format abstract should mention the capabilities of the format, for which media format is used, and a little about that codec formats capabilities. Any abbreviation used in the payload format must be spelled out here except the very well known like RTP. No citations are allowed, and no use of language from RFC 2119 either.]
A.4. Table of Contents
[If your draft is approved for publication as an RFC, a Table of Contents is required, per [RFC7322].]
A.5. Introduction
[The Introduction should provide a background and overview of the payload format's capabilities. No normative language in this section, i.e., no MUST, SHOULDs etc.]
A.6. Conventions, Definitions, and Abbreviations
[Define conventions, definitions, and abbreviations used in the document in this section. The most common definition used in RTP payload formats are the RFC 2119 definitions of the uppercase normative words, e.g., MUST and SHOULD.]
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 RFC 2119. ๐ฅ
A.7. Media Format Description
[The intention of this section is to enable reviewers and persons to get an overview of the capabilities and major properties of the media format. It should be kept short and concise and is not a complete replacement for reading the media format specification.]
A.8. Payload Format
[Overview of payload structure]
A.8.1. RTP Header Usage
[RTP header usage needs to be defined. The fields that absolutely need to be defined are timestamp and marker bit. Further fields may be specified if used. All the rest should be left to their RTP specification definition.]
The remaining RTP header fields are used as specified in RTP [RFC3550]. ๐
A.8.2. Payload Header
[Define how the payload header, if it exists, is structured and used.]
A.8.3. Payload Data
[The payload data, i.e., what the media codec has produced. Commonly done through reference to the media codec specification, which defines how the data is structured. Rules for padding may need to be defined to bring data to octet alignment.]
A.9. Payload Examples
[One or more examples are good to help ease the understanding of the RTP payload format.] ๐
A.10. Congestion Control Considerations
[This section is to describe the possibility to vary the bitrate as a response to congestion. Below is also a proposal for an initial text that reference RTP and profiles definition of congestion control.]
Okay so congestion control for RTP SHALL be used in accordance with RFC 3550 [RFC3550], and with any applicable RTP profile: e.g., RFC 3551 [RFC3551]. There's an extra rule if best-effort service is being used: users of this payload format MUST monitor packet loss to make sure the packet loss rate stays within acceptable parameters ๐. Circuit Breakers [RFC8083] is an update to RTP [RFC3550] that defines criteria for when one is required to stop sending RTP Packet Streams ๐. The circuit breakers is to be implemented and followed, no cap. ๐ซถ
A.11. Payload Format Parameters
This RTP payload format is identified using the ... media type, which is registered in accordance with RFC 4855 [RFC4855] and using the template of RFC 6838 [RFC6838]. ๐ฆ
A.11.1. Media Type Definition
[Here the media type registration template from RFC 6838 is placed and filled out. This template is provided with some common RTP boilerplate.]
Type name:
Subtype name:
Required parameters:
Optional parameters:
Encoding considerations:
This media type is framed and binary; see Section 4.8 in RFC 6838
[RFC6838].
Security considerations:
Please see the Security Considerations section in RFC XXXX
Interoperability considerations:
Published specification:
Applications that use this media type:
Additional information:
Deprecated alias names for this type:
[Only applicable if there exists widely deployed alias for this
media type; see Section 4.2.9 of [RFC6838]. Remove or use N/A
otherwise.]
Magic number(s):
[Only applicable for media types that has file format
specification. Remove or use N/A otherwise.]
File extension(s):
[Only applicable for media types that has file format
specification. Remove or use N/A otherwise.]
Macintosh file type code(s):
[Only applicable for media types that has file format
specification. Even for file formats they can be skipped as
they are not relied on after Mac OS 9.X. Remove or use N/A
otherwise.]
Person & email address to contact for further information:
Intended usage:
[One of COMMON, LIMITED USE, or OBSOLETE.]
Restrictions on usage:
[The below text is for media types that is only defined for RTP
payload formats. There exist certain media types that are defined
both as RTP payload formats and file transfer. The rules for such
types are documented in RFC 4855 [RFC4855].]
This media type depends on RTP framing and, hence, is only defined
for transfer via RTP [RFC3550]. Transport within other framing
protocols is not defined at this time.
Author:
Change controller:
IETF Payload working group delegated from the IESG.
Provisional registration? (standards tree only):
No
(Any other information that the author deems interesting may be added
below this line.)
[From RFC 6838:
"N/A", written exactly that way, can be used in any field if
desired to emphasize the fact that it does not apply or that the
question was not omitted by accident. Do not use 'none' or other
words that could be mistaken for a response.
Limited-use media types should also note in the applications list
whether or not that list is exhaustive.]
A.11.2. Mapping to SDP
The mapping of the above defined payload format media type and its parameters SHALL be done according to Section 3 of RFC 4855 [RFC4855]. ๐บ๏ธ
[More specific rules only need to be included if some parameter does not match these rules.]
A.11.2.1. Offer/Answer Considerations
[Here write your Offer/Answer considerations section; please see Section 3.4.2.1 for help.]
A.11.2.2. Declarative SDP Considerations
[Here write your considerations for declarative SDP, please see Section 3.4.2.2 for help.]
A.12. IANA Considerations
This memo requests that IANA registers [insert media type name here] as specified in Appendix A.11.1. The media type is also requested to be added to the IANA registry for "RTP Payload Format MIME types" <http://www.iana.org/assignments/rtp-parameters>. ๐
[See Section 7.4 and consider if any of the parameter needs a registered name space.]
A.13. Security Considerations ๐จ
[See Section 7.2.]
RTP packets using the payload format defined in this specification are subject to the security considerations discussed in the RTP specification [RFC3550] , and in any applicable RTP profile such as RTP/AVP [RFC3551], RTP/AVPF [RFC4585], RTP/SAVP [RFC3711], or RTP/ SAVPF [RFC5124]. However, as "Securing the RTP Protocol Framework: Why RTP Does Not Mandate a Single Media Security Solution" [RFC7202] discusses, it is not an RTP payload format's responsibility to discuss or mandate what solutions are used to meet the basic security goals like confidentiality, integrity, and source authenticity for RTP in general. This responsibility lays on anyone using RTP in an application. They can find guidance on available security mechanisms and important considerations in "Options for Securing RTP Sessions" [RFC7201]. Applications SHOULD use one or more appropriate strong security mechanisms. The rest of this Security Considerations section discusses the security impacting properties of the payload format itself. ๐
This RTP payload format and its media decoder do not exhibit any significant non-uniformity in the receiver-side computational complexity for packet processing, and thus are unlikely to pose a denial-of-service threat due to the receipt of pathological data. Nor does the RTP payload format contain any active content. ๐
[The previous paragraph may need editing due to the format breaking either of the statements. Fill in here any further potential security threats created by the payload format itself.]
A.14. RFC Editor Considerations ๐
okay so this one is a note for the RFC Editor, the people who polish these docs before they get published ๐ Once they've done everything it asks, this whole section can be deleted, bestie ๐ง
The placeholder RFC XXXX gets swapped for whatever number this spec gets when it's published ๐ขโจ
A.15. References ๐
[References must be classified as either normative or informative and added to the relevant section. References should use descriptive reference tags.]
A.15.1. Normative References ๐
[Normative references are those that are required to be used to correctly implement the payload format. Also, when requirements language is used, as in the sample text for "Congestion Control Considerations" above, there should be a normative reference to [RFC2119].]
A.15.2. Informative References ๐
[All other references.]
A.16. Authors' Addresses ๐ธ
[All authors need to include their name and email address as a minimum: postal mail and possibly phone numbers are included commonly.]
[The Template Ends Here!] ๐
Acknowledgements ๐ซถ
The author would like to thank the individuals who have provided input to this document ๐ Those people are Richard Barnes, Ali C. Begen, Bo Burman, Ross Finlayson, Russ Housley, John Lazzaro, Jonathan Lennox, Colin Perkins, Tom Taylor, Stephan Wenger, and Qin Wu. Iconic squad ๐
Contributors โจ
The author would like to thank Tom Taylor for the editing pass of the whole document and for contributing text on proprietary RTP payload formats ๐ Thanks also to Thomas Schierl, who contributed text about Media Scalability features in payload formats (Section 5.1.5) ๐ฆ Stephan Wenger wrote text on the need to understand the media coding (Section 3.1) and on joint development of the payload format with the media coding (Section 4.4) ๐ฅ
Author's Address ๐ง
Magnus Westerlund
Ericsson
Farogatan 2
SE-164 80 Kista
Sweden
Phone: +46 10 714 82 87
Email: magnus.westerlund@ericsson.com
๐ฆ where this page comes from
- ietf: rfc8088 2017-05
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms