Internet-Draft | RTP over QUIC (RoQ) | February 2024 |
Ott, et al. | Expires 15 August 2024 | [Page] |
This document specifies a minimal mapping for encapsulating Real-time Transport Protocol (RTP) and RTP Control Protocol (RTCP) packets within the QUIC protocol. This mapping is called RTP over QUIC (RoQ). It also discusses how to leverage state from the QUIC implementation in the endpoints, in order to reduce the need to exchange RTCP packets and how to implement congestion control and rate adaptation without relying on RTCP feedback.¶
This note is to be removed before publishing as an RFC.¶
Discussion of this document takes place on the Audio/Video Transport Core Maintenance Working Group mailing list (avt@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/avt/.¶
Source for this draft and an issue tracker can be found at https://github.com/mengelbart/rtp-over-quic-draft.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 15 August 2024.¶
Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document specifies a minimal mapping for encapsulating Real-time Transport Protocol (RTP) [RFC3550] and RTP Control Protocol (RTCP) [RFC3550] packets within the QUIC protocol ([RFC9000]). This mapping is called RTP over QUIC (RoQ). It also discusses how to leverage state from the QUIC implementation in the endpoints, in order to reduce the need to exchange RTCP packets, and how to implement congestion control and rate adaptation without relying on RTCP feedback.¶
The Real-time Transport Protocol (RTP) [RFC3550] is generally used to carry real-time media for conversational media sessions, such as video conferences, across the Internet. Since RTP requires real-time delivery and is tolerant to packet losses, the default underlying transport protocol has been UDP, recently with DTLS on top to secure the media exchange and occasionally TCP (and possibly TLS) as a fallback.¶
This specification describes an application usage of QUIC ([RFC9308]). As a baseline, the specification does not expect more than a standard QUIC implementation as defined in [RFC8999], [RFC9000], [RFC9001], and [RFC9002], providing a secure end-to-end transport that is also expected to work well through NATs and firewalls. Beyond this baseline, real-time applications can benefit from QUIC extensions such as unreliable QUIC datagrams [RFC9221], which provides additional desirable properties for real-time traffic (e.g., no unnecessary retransmissions, avoiding head-of-line blocking).¶
From time to time, someone asks the reasonable question, "why should anyone implement and deploy RoQ"? This reasonable question deserves a better answer than "because we can". Upon reflection, the following motivations seem useful to state.¶
The motivations in this section are in no particular order, and this reflects the reality that not all implementers and deployers would agree on "the most important motivations".¶
Although application-level mechanisms to encrypt RTP and RTCP payloads have existed since the introduction of Secure Real-time Transport Protocol (SRTP) [RFC3711], encryption of RTP and RTCP header fields and contributing sources has only been defined recently (in Cryptex [RFC9335], and both SRTP and Cryptex are optional capabilities for RTP.¶
This is in sharp contrast to "always-on" transport-level encryption in the QUIC protocol, using Transport Layer Security (TLS 1.3) as described in [RFC9001]. QUIC implementations always authenticate the entirety of each packet, and encrypt as much of each packet as is practical, even switching from "long headers", which expose more QUIC header fields needed to establish a connection, to "short headers", which only expose the absolute minimum QUIC header fields needed to identify the connection to the receiver, so that the QUIC payload is presented to the right QUIC application [RFC8999].¶
When RTP is carried directly over UDP, as is commonly done, the underlying UDP protocol provides no transport services beyond path multiplexing using UDP ports. All congestion avoidance behavior is up to the RTP application itself, and if anything goes wrong with the application resulting in an RTP sender failing to recognize that it is contributing to path congestion, the "worst case" response is to invoke RTP "circuit breaker" procedures [RFC8083], resulting in "ceasing transmission", as described in Section 4.5 of [RFC8083]. Because RTCP-based circuit breakers only detect long-lived congestion, a response based on these mechanisms will not happen quickly.¶
In contrast, when RTP is carried over QUIC, QUIC implementations maintain their own estimates of key transport parameters needed to detect and respond to possible congestion, and these are independent of any measurements RTP senders and receivers are maintaining. The result is that even if an RTP sender continues to "send", QUIC congestion avoidance procedures (for example, the procedures defined in [RFC9002]) will cause the RTP packets to be buffered while QUIC responds to detected packet loss. This happens without RTP senders taking any action, but the RTP sender has no control over this QUIC mechanism.¶
Moreover, when a single QUIC connection is used to multiplex both RTP-RTCP and non-RTP packets as described in Section 1.2.5, the shared QUIC connection will still be Internet-safe, with no coordination required.¶
While QUIC's response to congestion ensures that RoQ will be "Internet-safe", from the network's perspective, it is helpful to remember that a QUIC sender responds to detected congestion by delaying packets that are already available to send, to give the path to the QUIC receiver time to recover from congestion.¶
If the QUIC connection encapsulates RTP, this means that some RTP packets will be delayed, and will arrive at the receiver later than a user of the RTP flow might prefer.¶
If the QUIC connection also encapsulates RTCP, this means that these RTCP messages will also be delayed, and will not be sent in a timely manner. This delay can interfere with a sender's ability to stabilize rate control and achieve audio/video synchronization.¶
Taken as a whole,¶
RTP makes use of a large number of RTP-specific feedback mechanisms because when RTP is carried directly over UDP, there is no other way to receive feedback. Some of these mechanisms are specific to the type of media RTP is sending, but others can be mapped from underlying QUIC implementations that are using this feedback to perform congestion control for any QUIC connection, regardless of the application reflected in the QUIC STREAM [RFC9000] and DATAGRAM [RFC9221] frames. This is described in (much) more detail in Section 7 on rate adaptation, and in Section 8 on replacing RTCP and RTP header extensions with QUIC feedback.¶
One word of caution is in order - RTP implementations may rely on at least some minimal periodic RTCP feedback, in order to determine that an RTP flow is still active, and is not causing sustained congestion (as described in [RFC8083], but since this "periodicity" is measured in seconds, the impact of this "duplicate" feedback on path bandwidth utilization is likely close to zero.¶
The minimum Path MTU supported by conformant QUIC implementations is 1200 bytes [RFC9000], and in addition, QUIC implementations allow senders to use either DPLPMTUD ([RFC8899]) or PMTUD ([RFC1191], [RFC8201]) to determine the actual MTU size that the receiver and path between sender and receiver support, which can be even larger.¶
This is especially useful in certain conferencing topologies, where otherwise senders have no choice but to use the lowest path MTU for all conference participants, but even in point-to-point RTP sessions, this also allows senders to piggyback audio media in the same UDP packet as video media, for example, and also allows QUIC receivers to piggyback QUIC ACK frames on any QUIC frames being transmitted in the other direction.¶
In order to conserve ports, especially at NATs and Firewalls, this specification defines a flow identifier, so that multiple RTP flows, RTCP flows, and non-RTP flows can be distinguished even if they are carried on the same QUIC connection. This is described in more detail in Section 5.1.¶
Although there is much interest in multiplexing flows on a single QUIC connection as described in Section 1.2.5, QUIC also provides the capability of establishing and validating multiple paths for a single QUIC connection [RFC9000]. Once multiple paths have been validated, a sender can migrate from one path to another with no additional signaling, allowing an endpoint to move from one endpoint address to another without interruption, as long as only a single path is in active use at any point in time.¶
Connection migration may be desireable for a number of reasons, but to give one example, this allows a sender to distinguish between more costly cellular paths and less costly WiFi paths, with no action required from the application.¶
In addition to connection migration as described in Section 1.2.6, the capability of validating multiple paths for simultaneous active use is under active development in the IETF [I-D.draft-ietf-quic-multipath]. We don't discuss Multipath QUIC further in this document, because the specification hasn't been approved yet, but it's one example of ways that RTP, a mature protocol, can exploit new transport capabilities as they become available.¶
This document defines a mapping for RTP and RTCP over QUIC, called RoQ, and describes ways to reduce the amount of RTCP traffic by leveraging state information readily available within a QUIC endpoint. This document also describes different options for implementing congestion control and rate adaptation for RoQ.¶
This specification focuses on providing a secure encapsulation of RTP packets for transmission over QUIC. The expected usage is wherever RTP is used to carry media packets, allowing QUIC in place of other transport protocols such as TCP, UDP, SCTP, DTLS, etc. That is, we expect RoQ to be used in contexts in which a signaling protocol is used to announce or negotiate a media encapsulation and the associated transport parameters (such as IP address, port number). RoQ is not intended as a stand-alone media transport, although QUIC transport parameters could be statically configured.¶
The above implies that RoQ is targeted at peer-to-peer operation; but it may also be used in client-server-style settings, e.g., when talking to a conference server as described in RFC 7667 ([RFC7667]), or, if RoQ is used to replace RTSP ([RFC7826]), to a media server.¶
An appropriate rate adaptation algorithm can be plugged in to adapt the media bitrate to the available bandwidth. This document does not mandate any specific rate adaptation mechanism, so the application can use a rate adaption mechanism of its choice.¶
Moreover, this document describes how a QUIC implementation and its API can be extended to improve efficiency of the RoQ protocol operation.¶
RoQ does not impact the usage of RTP Audio Video Profiles (AVP) ([RFC3551]), or any RTP-based mechanisms, even though it may render some of them unnecessary, e.g., Secure Real-Time Transport Prococol (SRTP) ([RFC3711]) might not be needed, because end-to-end security is already provided by QUIC, and double encryption by QUIC and by SRTP might have more costs than benefits. Nor does RoQ limit the use of RTCP-based mechanisms, even though some information or functions obtained by using RTCP mechanisms may also be available from the underlying QUIC implementation by other means.¶
Between two (or more) endpoints, RoQ supports multiplexing multiple RTP-based media streams within a single QUIC connection and thus using a single (destination IP address, destination port number, source IP address, source port number, protocol) 5-tuple.. We note that multiple independent QUIC connections may be established in parallel using the same destination IP address, destination port number, source IP address, source port number, protocol) 5-tuple., e.g. to carry different media channels. These connections would be logically independent of one another.¶
This document does not attempt to enhance QUIC for real-time media or define a replacement for, or evolution of, RTP. Work to map other media transport protocols to QUIC is under way elsewhere in the IETF.¶
RoQ is designed for use with point-to-point connections, because QUIC itself is not defined for multicast operation. The scope of this document is limited to unicast RTP/RTCP, even though nothing would or should prevent its use in multicast setups once QUIC supports multicast.¶
RoQ does not define congestion control and rate adaptation algorithms for use with media. However, Section 7 discusses options for how congestion control and rate adaptation could be performed at the QUIC and/or at the RTP layer, and how information available at the QUIC layer could be exposed via an API for the benefit of RTP layer implementation.¶
Editor's note: Need to check whether Section 7 will also describe the QUIC interface that's being exposed, or if that ends up somewhere else in the document.¶
RoQ does not define prioritization mechanisms when handling different media as those would be dependent on the media themselves and their relationships. Prioritization is left to the application using RoQ.¶
This document does not cover signaling for session setup. SDP for RoQ is defined in separate documents such as [I-D.draft-dawkins-avtcore-sdp-rtp-quic], and can be carried in any signaling protocol that can carry SDP, including the Session Initiation Protocol (SIP) ([RFC3261]), Real-Time Protocols for Browser-Based Applications (RTCWeb) ([RFC8825]), or WebRTC-HTTP Ingestion Protocol (WHIP) ([I-D.draft-ietf-wish-whip]).¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Editor's note: the list of terms below will almost certainly grow in size as the specification matures.¶
Note to the Reader: the meaning of the terms "congestion control" and "rate adaptation" in the IETF community have evolved over the decades since "slow start" and "congestion avoidance" were added as mandatory to implement in TCP, in Section 4.2.2.15 of [RFC1122]. Historically, "congestion control" usually referred to "achieving network stability" ([VJMK88]), by protecting the network from senders who continue to transmit packets that exceed the ability of the network to carry them, even after packet loss occurs (called "congestion collapse").¶
Modern general-purpose "congestion control" algorithms have moved beyond avoiding congestion collapse, and work to avoid "bufferbloat", which causes increasing round-trip delays, as described in Section 7.2.¶
"Rate adaptation" more commonly refers to strategies intended to guide senders on when to send "the next packet", so that one-way delays along the network path remain minimal.¶
When RTP runs over QUIC, as described in this specification, QUIC is performing congestion control, and the RTP application is responsible for performing rate adaptation.¶
In this document, these terms are used with the meanings listed below, with the recognition that not all the references in this document use these terms in the same way.¶
The following terms are used:¶
An algorithm to estimate the available bandwidth of a link in a network. Such an estimation can be used for rate adaptation, i.e., adapt the rate at which an application transmits data.¶
A mechanism to limit the aggregate amount of data that has been sent over a path to a receiver, but has not been acknowledged by the receiver. This prevents a sender from overwhelming the capacity of a path between a sender and a receiver, causing some outstanding data to be discarded before the receiver can receive the data and acknowledge it to the sender. A congestion control mechanism may respond to packet loss (detected by timeouts), or to impending packet loss (signaled by mechanisms such as Explicit Congestion Notification [RFC3168]). It may also limit growth in round-trip delays, due to increasing queuing delays (signaled by mechanisms such as Low Latency, Low Loss, and Scalable Throughput (L4S) [RFC9330]). Congestion control mechanisms are often implemented at the transport layer of the protocol stack, but can also be implemented at the application layer.¶
Datagrams exist in UDP as well as in QUIC's unreliable datagram extension. If not explicitly noted differently, the term datagram in this document refers to a QUIC Datagram as defined in [RFC9221].¶
A congestion control algorithm that aims at keeping queues, and thus the latency, at intermediary network elements as short as possible. Delay-based congestion control algorithms use, for example, an increasing one-way delay as a signal of impending congestion, and adjust the sending rate to prevent continued increases in one-way delay.¶
A QUIC server or client that participates in an RoQ session.¶
A congestion control algorithm that uses packet loss, or an Explicit Congestion Notification (ECN) that is interpreted as loss (as in [RFC3168]), as a signal for congestion. Loss-based congestion control algorithms allow senders to send data on a path until packets are dropped by intermediary network elements, which the algorithm treats as a signal of congestion.¶
A software component of an application's QUIC implementation that implements a congestion control algorithm.¶
An application-level mechanism that adjusts the sending rate of an application in order to respond to changing path conditions. For example, an application sending video might respond to indications of congestion by adjusting the resolution of the video it is sending.¶
An endpoint that receives media in RTP packets and may send or receive RTCP packets.¶
A software component of an application's RTP implementation that implements a congestion control algorithm.¶
An endpoint that sends media in RTP packets and may send or receive RTCP packets.¶
Packet diagrams in this document use the format defined in Section 1.3 of [RFC9000] to illustrate the order and size of fields.¶
This document introduces a mapping of the Real-time Transport Protocol (RTP) to the QUIC transport protocol. RoQ allows the use of QUIC streams and QUIC datagrams to transport real-time data, and thus, the QUIC implementation MUST support QUIC's datagram extension, if RTP packets should be sent over QUIC datagrams.¶
[RFC3550] specifies that RTP sessions need to be transmitted on different transport addresses to allow multiplexing between them. RoQ uses a different approach to leverage the advantages of QUIC connections without managing a separate QUIC connection per RTP session. QUIC does not provide demultiplexing between different flows on datagrams but suggests that an application implement a demultiplexing mechanism if required. An example of such a mechanism would be flow identifiers prepended to each datagram frame as described in Section 2.1 of [I-D.draft-ietf-masque-h3-datagram]. RoQ uses a flow identifier to replace the network address and port number to multiplex many RTP sessions over the same QUIC connection.¶
An RTP application is responsible for determining what to send in an encoded media stream, and how to send that encoded media stream within a targeted bitrate.¶
This document does not mandate how an application determines what to send in an encoded media stream, because decisions about what to send within a targeted bitrate, and how to adapt to changes in the targeted bitrate, can be application and codec-specific. For example, adjusting quantization in response to changing network conditions may work well in many cases, but if what's being shared is video that includes text, maintaining readability is important.¶
As of this writing, the IETF has produced two Experimental-track congestion control specifications, Network-Assisted Dynamic Adaptation (NADA) [RFC8698] and Self-Clocked Rate Adaptation for Multimedia (SCReAM) [RFC8298]. These congestion control algorithms require some feedback about the network's performance to calculate target bitrates. Traditionally this feedback is generated at the receiver and sent back to the sender via RTCP.¶
Since QUIC also collects some metrics about the network's performance, these metrics can be used to generate the required feedback at the sender-side and provide it to the congestion control algorithm to avoid the additional overhead of the RTCP stream. This is discussed in more detail in Section 8.¶
This document describes the use of both QUIC streams and QUIC datagrams as RTP encapsulations, but does not take a position on which encapsulation an application should use. Indeed, an application can use both QUIC streams and QUIC datagram encapsulations. The choice of which encapsulation is used is up to the application developer, but it is worth noting the differences.¶
QUIC [RFC9000] was initially designed to carry HTTP [RFC9114] in QUIC streams, and QUIC streams provide what HTTP application developers require - for example, QUIC streams provide a stateful, connection-oriented, flow-controlled, reliable, ordered stream of bytes to an application. QUIC streams can be multiplexed over a single QUIC connection, using stream IDs to demultiplex incoming messages.¶
QUIC Datagrams [RFC9221] were developed as a QUIC extension, intended to support applications that do not require reliable delivery of application data. This extension defines two QUIC DATAGRAM frame types (one including a length field, the other not including a length field), and these DATAGRAM frames can co-exist with QUIC STREAM frames within a single QUIC connection, sharing the connection's cryptographic and authentication context, and congestion controller context.¶
There is no default relative priority between DATAGRAM frames with respect to each other, and there is no default priority between DATAGRAM frames and QUIC streams. The implementation likely presents an API to allow appplications to assign relative priorities, but this is not mandated by the standard and may not be present in all implementations.¶
Because QUIC datagrams are an extension to QUIC, they inherit a great deal of functionality from QUIC (much of which is described in Section 1.2); so much so that it is easier to explain what datagrams do NOT inherit.¶
DATAGRAM frames do not provide any explicit flow control signaling. This means that a QUIC receiver may not be able to commit the necessary resources to process incoming frames, but the purpose for DATAGRAM frames is to carry application-level information that can be lost and will not be retransmitted,¶
DATAGRAM frames do inherit the QUIC connection's congestion controller. This means that although there is no frame-level flow control, DATAGRAM frames may be delayed until the controller allows them to be sent, or dropped (with an optional notification to the sending application). Implementations can also delay sending DATAGRAM frames to maintain consistent packet pacing (as described in Section 7.7 of [RFC9002]), and can allow an application to specify a sending expiration time, but these capabilities are not mandated by the standard and may not be present in all implementations.¶
DATAGRAM frames cannot be fragmented. They are limited in size by the max_datagram_frame_size transport parameter, and further limited by the max_udp_payload_size transport parameter and the Maximum Transmission Unit (MTU) of the path between endpoints.¶
DATAGRAM frames belong to a QUIC connection as a whole. There is no QUIC-level way to multiplex/demultiplex DATAGRAM frames within a single QUIC connection. Any multiplexing identifiers must be added, interpreted, and removed by an application, and they will be sent as part of the payload of the DATAGRAM frame itself.¶
Because QUIC datagrams are an extension to QUIC, a RoQ endpoint cannot count on a RoQ peer supporting that extension. The RoQ endpoint may discover that its peer does not support datagrams while using signaling to set up QUIC connections, but may also discover that its peer has not negotiated the use of this extension during the QUIC handshake. When this happens, the RoQ endpoint needs to make a decision about what to do next.¶
RoQ only supports some of the RTP topologies described in [RFC7667]. Most notably, due to QUIC [RFC9000] being a purely IP unicast protocol at the time of writing, RoQ cannot be used as a transport protocol for any of the paths that rely on IP multicast in several multicast topologies (e.g., Topo-ASM, Topo-SSM, Topo-SSM-RAMS).¶
Some "multicast topologies" can include IP unicast paths (e.g., Topo-SSM, Topo-SSM-RAMS). In these cases, the unicast paths can use RoQ.¶
RTP supports different types of translators and mixers. Whenever a middlebox such as a translator or a mixer needs to access the content of RTP/RTCP-packets, the QUIC connection has to be terminated at that middlebox.¶
RoQ streams (see Section 5.2) can support much larger RTP packet sizes than other transport protocols such as UDP can, which can lead to problems with transport translators which translate from RoQ to RTP over a different transport protocol. A similar problem can occur if a translator needs to translate from RTP over UDP to RoQ datagrams, where the MTU of a QUIC datagram may be smaller than the MTU of a UDP datagram. In both cases, the translator may need to rewrite the RTP packets to fit into the smaller MTU of the other protocol. Such a translator may need codec-specific knowledge to packetize the payload of the incoming RTP packets in smaller RTP packets.¶
Additional details are provided in the following table.¶
RFC 7667 Section | Shortcut Name | RTP over QUIC? | Comments |
---|---|---|---|
3.1 | Topo-Point-to-Point | yes | |
3.2.1.1 | Topo-PtP-Relay | yes | Note-NAT |
3.2.1.2 | Topo-Trn-Translator | yes | Note-MTU Note-SEC |
3.2.1.3 | Topo-Media-Translator | yes | Note-MTU |
3.2.2 | Topo-Back-To-Back | yes | Note-SEC Note-MTU Note-MCast |
3.3.1 | Topo-ASM | no | Note-MCast |
3.3.2 | Topo-SSM | partly | Note-MCast Note-UCast-MCast |
3.3.3 | Topo-SSM-RAMS | partly | Note-MCast Note-MCast-UCast |
3.4 | Topo-Mesh | yes | Note-MCast |
3.5.1 | Topo-PtM-Trn-Translator | possibly | Note-MCast Note-MTU Note-Topo-PtM-Trn-Translator |
3.6 | Topo-Mixer | possibly | Note-MCast Note-Topo-Mixer |
3.6.1 | Media-Mixing-Mixer | partly | Note-Topo-Mixer |
3.6.2 | Media-Switching-Mixer | partly | Note-Topo-Mixer |
3.7 | Selective Forwarding Middlebox | yes | Note-MCast Note-Topo-Mixer |
3.8 | Topo-Video-switch-MCU | yes | Note-MTU Note-MCast Note-Topo-Mixer |
3.9 | Topo-RTCP-terminating-MCU | yes | Note-MTU Note-MCast Note-Topo-Mixer |
3.10 | Topo-Split-Terminal | yes | Note-MCast |
3.11 | Topo-Asymmetric | Possibly | Note-Warn, Note-MCast, Note-MTU |
Supported, but may require MTU adaptation.¶
Note that RoQ provides mandatory security, and other RTP transports do not. Section 12 describes strategies to prevent the inadvertent disclosure of RTP sessions to unintended third parties.¶
The topology refers to a Distribution Source, which receives and relays RTP from a number of different media senders via unicast before relaying it to the receivers via multicast. QUIC can be used between the senders and the Distribution Source.¶
The topology refers to a Burst Source or Retransmission Source, which retransmits RTP to receivers via unicast. QUIC can be used between the Retransmission Source and the receivers.¶
Supports unicast paths between RTP sources and translators.¶
Supports unicast paths between RTP senders and mixers.¶
Quote from [RFC7667]: This topology is so problematic and it is so easy to get the RTCP processing wrong, that it is NOT RECOMMENDED to implement this topology.¶
QUIC requires the use of ALPN [RFC7301] tokens during connection setup. RoQ uses "rtp-mux-quic" as ALPN token in the TLS handshake (see also Section 13).¶
Note that the use of a given RTP profile is not reflected in the ALPN token even though it could be considered part of the application usage. This is simply because different RTP sessions, which may use different RTP profiles, may be carried within the same QUIC connection.¶
Editor's note: "rtp-mux-quic" indicates that RTP and other protocols may be multiplexed on the same QUIC connection using a flow identifier as described in Section 5. Applications are responsible for negotiation of protocols in use by appropriate use of a signaling protocol such as SDP.¶
Editor's note: This implies that applications cannot use RoQ as specified in this document over WebTransport.¶
RFC Editor's note: Please remove this section prior to publication of a final version of this document.¶
RoQ uses the token "rtp-mux-quic" to identify itself in ALPN.¶
Only implementations of the final, published RFC can identify themselves as "rtp-mux-quic". Until such an RFC exists, implementations MUST NOT identify themselves using this string.¶
Implementations of draft versions of the protocol MUST add the string "-" and the corresponding draft number to the identifier. For example, draft-ietf-avtcore-rtp-over-quic-04 is identified using the string "rtp-mux-quic-04".¶
Non-compatible experiments that are based on these draft versions MUST append the string "-" and an experiment name to the identifier.¶
This section describes the encapsulation of RTP/RTCP packets in QUIC.¶
QUIC supports two transport methods: streams [RFC9000] and datagrams [RFC9221]. This document specifies mappings of RTP to both of the transport modes. Senders MAY combine both modes by sending some RTP/RTCP packets over the same or different QUIC streams and others in QUIC datagrams.¶
Section 5.1 introduces a multiplexing mechanism that supports multiplexing RTP, RTCP, and, with some constraints, other non-RTP protocols. Section 5.2 and Section 5.3 explain the specifics of mapping RTP to QUIC streams and QUIC datagrams, respectively.¶
RoQ uses flow identifiers to multiplex different RTP, RTCP, and non-RTP data streams on a single QUIC connection. A flow identifier is a QUIC variable-length integer as described in Section 16 of [RFC9000]. Each flow identifier is associated with a stream of RTP packets, RTCP packets, or a data stream of a non-RTP protocol.¶
In a QUIC connection using the ALPN token defined in Section 4, every QUIC datagram and every QUIC stream MUST start with a flow identifier. A peer MUST NOT send any data in a datagram or stream that is not associated with the flow identifier which started the datagram or stream.¶
RTP and RTCP packets of different RTP sessions MUST use distinct flow identifiers. If peers wish to send multiple types of media in a single RTP session, they MAY do so by following [RFC8860].¶
A single RTP session MAY be associated with one or two flow identifiers. Thus, it is possible to send RTP and RTCP packets belonging to the same session using different flow identifiers. RTP and RTCP packets of a single RTP session MAY use the same flow identifier (following the procedures defined in [RFC5761]), or they MAY use different flow identifiers.¶
The association between flow identifiers and data streams MUST be negotiated using appropriate signaling. Applications MAY send data using flow identifiers not associated with any RTP or RTCP stream. If a receiver cannot associate a flow identifier with any RTP/RTCP or non-RTP flow, it MAY drop the data flow. If the data flow was sent on a QUIC stream, the receiver SHOULD send a STOP_SENDING frame with the application error code set to ROQ_UNKNOWN_FLOW_ID.¶
There are different use cases for sharing the same QUIC connection between RTP and non-RTP data streams. Peers might use the same connection to exchange signaling messages or exchange data while sending and receiving media streams. The semantics of non-RTP datagrams or streams are not in the scope of this document. Peers MAY use any protocol on top of the encapsulation described in this document.¶
Flow identifiers introduce some overhead in addition to the header overhead of RTP/RTCP and QUIC. QUIC variable-length integers require between one and eight bytes depending on the number expressed. Thus, it is advisable to use low numbers first and only use higher ones if necessary due to an increased number of flows.¶
To send RTP/RTCP packets over QUIC streams, a sender MUST open at least one new unidirectional QUIC stream. RoQ uses unidirectional streams, because there is no synchronous relationship between sent and received RTP/RTCP packets. A peer that receives a bidirectional stream with a flow identifier that is associated with an RTP or RTCP stream, SHOULD stop reading from the stream and send a STOP_SENDING frame with the application protocol error code set to ROQ_STREAM_CREATION_ERROR.¶
A RoQ sender MAY open new QUIC streams for different packets using the same flow identifier, for example, to avoid head-of-line blocking.¶
Because a sender can continue sending on a lower stream number after starting packet transmission on a higher stream number, a RoQ receiver MUST be prepared to receive RoQ packets on any number of QUIC streams (subject to its limit on parallel open streams) and MUST not make assumptions about which RTP sequence numbers are carried in which streams.¶
Figure 1 shows the encapsulation format for RoQ Streams.¶
Payload { Flow Identifier (i), RTP/RTCP Payload(..) ..., }
Flow identifier to demultiplex different data flows on the same QUIC connection.¶
The payload in a QUIC stream starts with the flow identifier followed by one or more RTP/RTCP payloads. All RTP/RTCP payloads sent on a stream MUST belong to the RTP session with the same flow identifier.¶
Each payload begins with a length field indicating the length of the RTP/RTCP packet, followed by the packet itself, see Figure 2.¶
RTP/RTCP Payload { Length(i), RTP/RTCP Packet(..), }
A QUIC variable length integer (see Section 16 of [RFC9000]) describing the length of the following RTP/RTCP packets in bytes.¶
The RTP/RTCP packet to transmit.¶
QUIC uses RESET_STREAM and STOP_SENDING frames to terminate the sending part of a stream and to request termination of an incoming stream by the sending peer respectively.¶
A RoQ sender MAY use RESET_STREAM if it knows that a packet, which was not yet successfully and completely transmitted, is no longer needed.¶
A RoQ receiver that is no longer interested in reading a certain partition of the media stream MAY signal this to the sending peer using a STOP_SENDING frame.¶
In both cases, the error code of the RESET_STREAM frame or the STOP_SENDING frame MUST be set to ROQ_FRAME_CANCELLED.¶
STOP_SENDING is not a request to the sender to stop sending the RTP media stream, only an indication that a receiver stopped reading the QUIC stream being used. A sender with additional media frames to send SHOULD continue sending them on another QUIC stream. Alternatively, new media frames can be sent as QUIC datagrams (see Section 5.3).¶
Any media frame that has already been sent on the QUIC stream that received the STOP_SENDING frame, MUST NOT be sent again on the new QUIC stream(s) or datagrams.¶
Note that an RTP receiver cannot request a reset of only a particular media frame because the sending QUIC implementation might already have sent data for the following frame on the same stream. In that case, STOP_SENDING and the following RESET_STREAM would also drop the following media frame and thus lead to unintentionally skipping one or more frames.¶
Editor's note: A receiver cannot cancel a certain frame but still receive retransmissions for a frame the was following on the same stream using STOP_SENDING, because STOP_SENDING does not include an offset which would allow signaling where retransmissions should continue.¶
A translator that translates between two endpoints, both connected via QUIC, MUST forward RESET_STREAM frames received from one end to the other unless it forwards the RTP packets on QUIC datagrams.¶
Large RTP packets sent on a stream will be fragmented into smaller QUIC frames. The QUIC frames are transmitted reliably and in order such that a receiving application can read a complete RTP packet from the stream as long as the stream is not closed with a RESET_STREAM frame. No retransmission has to be implemented by the application since QUIC frames lost in transit are retransmitted by QUIC.¶
In order to permit QUIC streams to open, a RoQ sender SHOULD configure non-zero minimum values for the number of permitted streams and the initial stream flow-control window, based on the number of parallel, or simultaneously active, RTP/RTCP flows. Endpoints that excessively restrict the number of streams or the flow-control window of these streams will increase the chance that the remote peer reaches the limit early and becomes blocked.¶
Opening new streams for new packets MAY implicitly limit the number of packets concurrently in transit because the QUIC receiver provides an upper bound of parallel streams, which it can update using QUIC MAX_STREAMS frames. The number of packets that have to be transmitted concurrently depends on several factors, such as the number of RTP streams within a QUIC connection, the bitrate of the media streams, and the maximum acceptable transmission delay of a given packet. Receivers are responsible for providing senders enough credit to open new streams for new packets anytime.¶
As an example, consider a conference scenario with 20 participants. Each participant receives audio and video streams of every other participant from a central server. If the sender opens a new QUIC stream for every frame at 30 frames per second video and 50 frames per second audio, it will open 1520 new QUIC streams per second. A receiver must provide at least that many credits for opening new unidirectional streams to the server every second.¶
In addition, the receiver should also consider the requirements of protocols into account that are multiplexed with RTP, including RTCP and data streams. These considerations may also be relevant when implementing signaling since it may be necessary to inform the receiver about how fast and how many stream credits it will have to provide to the media-sending peer.¶
Senders can also transmit RTP packets in QUIC datagrams. QUIC datagrams are an extension to QUIC described in [RFC9221]. QUIC datagrams can only be used if the use of the datagram extension was successfully negotiated during the QUIC handshake. If the QUIC extension was signaled using a signaling protocol, but that extension was not negotiated during the QUIC handshake, a peer MAY close the connection with the ROQ_EXPECTATION_UNMET error code.¶
QUIC datagrams preserve frame boundaries. Thus, a single RTP packet can be mapped to a single QUIC datagram without additional framing. Senders SHOULD consider the header overhead associated with QUIC datagrams and ensure that the RTP/RTCP packets, including their payloads, flow identifier, QUIC, and IP headers, will fit into path MTU.¶
Figure 3 shows the encapsulation format for RoQ Datagrams.¶
Payload { Flow Identifier (i), RTP/RTCP Packet (..), }
Flow identifier to demultiplex different data flows on the same QUIC connection.¶
The RTP/RTCP packet to transmit.¶
RoQ senders need to be aware that QUIC uses the concept of QUIC frames. Different kinds of QUIC frames are used for different application and control data types. A single QUIC packet can contain more than one QUIC frame, including, for example, QUIC stream or datagram frames carrying application data and acknowledgement frames carrying QUIC acknowledgements, as long as the overall size fits into the MTU. One implication is that the number of packets a QUIC stack transmits depends on whether it can fit acknowledgement and datagram frames in the same QUIC packet. Suppose the application creates many datagram frames that fill up the QUIC packet. In that case, the QUIC stack might have to create additional packets for acknowledgement- (and possibly other control-) frames. The additional overhead could, in some cases, be reduced if the application creates smaller RTP packets, such that the resulting datagram frame can fit into a QUIC packet that can also carry acknowledgement frames.¶
Since QUIC datagrams are not retransmitted on loss (see also Section 8.4 for loss signaling), if an application wishes to retransmit lost RTP packets, the retransmission has to be implemented by the application. RTP retransmissions can be done in the same RTP session or a separate RTP session [RFC4588] and the flow identifier MUST be set to the flow identifier of the RTP session in which the retransmission happens.¶
Either peers MAY close the connection for variety of reasons. If one of the peers wants to close the RoQ connection, the peer can use a QUIC CONNECTION_CLOSE frame with one of the error codes defined in Section 9.¶
Like any other application on the internet, RoQ applications need a mechanism to perform congestion control to avoid overloading the network. QUIC is a congestion-controlled transport protocol. RTP does not mandate a single congestion control mechanism. RTP suggests that the RTP profile defines congestion control according to the expected properties of the application's environment.¶
This document discusses aspects of transport level congestion control in Section 7.1 and application layer rate control in Section 7.2. It does not mandate any specific congestion control algorithm for QUIC or rate adaptation algorithm for RTP.¶
This document also gives guidance about avoiding problems with nested congestion controllers in Section 7.2.¶
This document also discusses congestion control implications of using shared or multiple separate QUIC connections to send and receive multiple independent data streams in Section 7.3.¶
QUIC is a congestion-controlled transport protocol. Senders are required to employ some form of congestion control. The default congestion control specified for QUIC in [RFC9002] is similar to TCP NewReno [RFC6582], but senders are free to choose any congestion control algorithm as long as they follow the guidelines specified in Section 3 of [RFC8085], and QUIC implementors make use of this freedom.¶
It is RECOMMENDED that the QUIC implementation use a congestion controller that seeks to minimize queueing delays. Further recommendations on the transport of RTP and RTCP are contained in Section 3.1.¶
A wide variety of congestion control algorithms for real-time media have been developed (for example, "Google Congestion Controller" [I-D.draft-ietf-rmcat-gcc]). The IETF has defined two such algorithms in Experimental RFCs (SCReAM [RFC8298] and NADA [RFC8698]). These algorithms for RTP are specifically tailored for real-time transmissions at low latencies, but this section would apply to any congestion control algorithm that meets the requirements described in "Congestion Control Requirements for Interactive Real-Time Media" [RFC8836].¶
Some low latency congestion control algorithms depend on detailed arrival time feedback to estimate the current one-way delay between sender and receiver, which is unavailable in QUIC [RFC9000] without extensions. The QUIC implementations of the sender and receiver can use an extension to add this information to QUIC as described in Appendix A. An alternative to these dedicated real-time media congestion-control algorithms that QUIC implementations could support without the need for a protocol extension is the Low Latency, Low Loss, and Scalable Throughput (L4S) Internet Service [RFC9330].¶
The application needs a mechanism to query the available bandwidth to adapt media codec configurations. If the employed congestion controller of the QUIC connection keeps an estimate of the available bandwidth, it could expose an API to the application to query the current estimate. If the congestion controller cannot provide a current bandwidth estimate to the application, the sender can implement an alternative bandwidth estimation at the application layer as described in Section 7.2.¶
It is assumed that the congestion controller in use provides a pacing mechanism to determine when a packet can be sent to avoid bursts and minimize variation in inter-packet arrival times. The currently proposed congestion control algorithms for real-time communications (e.g., SCReAM and NADA) provide such pacing mechanisms, and QUIC recommends pacing for senders based on the congestion control algorithm.¶
RTP itself does not specify a congestion control algorithm, but [RFC8888] defines an RTCP feedback message intended to enable rate adaptation for interactive real-time traffic using RTP, and successful rate adaptation will accomplish congestion control as well.¶
If an application cannot access a bandwidth estimation from the QUIC layer, the
application can alternatively implement a bandwidth estimation algorithm at the
application layer. Congestion control algorithms for real-time media such as GCC
[I-D.draft-ietf-rmcat-gcc], NADA [RFC8698], and SCReAM [RFC8298] expose
a target_bitrate
to dynamically reconfigure media codecs to produce media at
the rate of the observed available bandwidth. Applications can use the same
bandwidth estimation to adapt their rate when using QUIC. However, running an
additional congestion control algorithm at the application layer can have
unintended effects due to the interaction of two nested congestion
controllers.¶
If the application transmits media that does not saturate path bandwidth and paces its transmission, more heavy-handed congestion control mechanisms (drastic reductions in the sending rate when loss is detected, with much slower increases when losses are no longer being detected) should rarely come into play. If the application chooses RoQ as its transport, sends enough media to saturate the path bandwidth, and does not adapt its sending rate, drastic measures will be required to avoid sustained or oscillating congestion along the path.¶
Thus, applications are advised to only use the bandwidth estimation without running the complete congestion control algorithm at the application layer before passing data to the QUIC layer.¶
The bandwidth estimation algorithm typically needs some feedback on the transmission performance. This feedback can be collected via RTCP or following the guidelines in Section 8 and Section 10.¶
Because RTP has so often used UDP as its underlying transport protocol, and receiving little or no feedback from UDP, RTP implementations rely on feedback from the RTP Control Protocol (RTCP) so that RTP senders and receivers can exchange control information to monitor connection statistics and to identify and synchronize streams.¶
Because QUIC provides transport-level feedback, it can replace at least some RTP transport-level feedback with current QUIC feedback [RFC9000]. In addition, RTP-level feedback that is not available in QUIC by default can potentially be replaced with generally useful QUIC extensions in the future as described in Appendix B.6.¶
When statistics contained in RTCP packets are also available from QUIC or can be derived from statistics available from QUIC, it is desirable to provide these statistics at only one protocol layer. This avoids consumption of bandwidth to deliver equivalent control information at more than one level of the protocol stack. QUIC and RTCP both have rules describing when certain signals have to be sent. This document does not change any of the rules described by either protocol, but specifies a baseline for replacing some of the RTCP packet types by mapping the contents to QUIC connection statistics, and reducing the transmission frequency and bandwidth requirements for some RTCP packet types that must be transmitted periodically. Future documents can extend this mapping for other RTCP format types, and can make use of new QUIC extensions that become available over time. The mechanisms described in this section can enhance the statistics provided by RTCP and reduce the bandwidth overhead required by certain RTCP packets. Applications using RoQ need to adhere to the rules for RTCP feedback given by [RFC3550] and the RTP profiles in use.¶
Most statements about "QUIC" in Section 8 are applicable to both RTP encapsulated in QUIC streams and RTP encapsulated in QUIC datagrams. The differences are described in Section 8.1 and Section 8.2.¶
Editor's Note: Additional discussion of bandwidth minimization could go in this section, or in an earlier proposed section on motivations for defining and deploying RoQ.¶
While RoQ places no restrictions on applications sending RTCP, this document assumes that the reason an implementor chooses to support RoQ is to obtain benefits beyond what's available when RTP uses UDP as its underlying transport layer. It is RECOMMENDED to expose relevant information from the QUIC layer to the application instead of exchanging additional RTCP packets, where applicable.¶
Section 8.4 discusses what information can be exposed from the QUIC connection layer to reduce the RTCP overhead.¶
QUIC Datagrams are ack-eliciting packets, which means that an acknowledgment is triggered when a datagram frame is received. Thus, a sender can assume that an RTP packet arrived at the receiver or was lost in transit, using the QUIC acknowledgments of QUIC Datagram frames. In the following, an RTP packet is regarded as acknowledged when the QUIC Datagram frame that carried the RTP packet was acknowledged.¶
For RTP packets that are sent over QUIC streams, an RTP packet is considered acknowledged after all frames that carried fragments of the RTP packet were acknowledged.¶
When QUIC Streams are used, the application should be aware that the direct mapping proposed below may not reflect the real characteristics of the network. RTP packet loss can seem lower than actual packet loss due to QUIC's automatic retransmissions. Similarly, timing information might be incorrect due to retransmissions.¶
In some topologies, RoQ may be used on only some of the links between multiple session participants. Other links may be using RTP over UDP, or over some other supported RTP encapsulation protocol, and some participants might be using implementations that don't support RoQ at all. These participants will not be able to infer feedback from QUIC, and they may receive less RTCP feedback than expected. On the other hand, participants using RoQ might not be aware that other participants are not using RoQ and send as little RTCP as possible since they assume their RoQ peer will be able to infer statistics from QUIC. There are two ways to solve this problem: if the middlebox translating between RoQ and RTP over other RTP transport protocols such as UDP or TCP provides Back-to-Back RTP sessions as described in Section 3.2.2 of [RFC7667], this middlebox can add RTCP packets for the participants not using RoQ by using the statistics the middlebox gets from QUIC and the mappings described in the following sections. If the middlebox does not provide Back-to-Back RTP sessions, participants may use additional signalling to let the RoQ participants know what RTCP is required.¶
This section explains how some of the RTCP packet types that are used to signal reception statistics can be replaced by equivalent statistics that are already collected by QUIC. The following list explains how this mapping can be achieved for the individual fields of different RTCP packet types.¶
The list of RTCP packets in this section is not exhaustive, and similar considerations SHOULD be taken into account before exchanging any other type of RTCP control packets using RoQ.¶
A more thorough analysis of RTCP Control Packet Types (in Appendix B.1), Generic RTP Feedback (RTPFB) (in Appendix B.3), Payload-specific RTP Feedback (PSFB) (in Appendix B.4), Extended Reports (in Appendix B.2), and RTP Header Extensions (in Appendix B.5), including the information that cannot be mapped from QUIC.¶
Generic Negative Acknowledgments (PT=205
, FMT=1
, Name=Generic NACK
,
[RFC4585]) contain information about RTP packets which the receiver
considered lost. Section 6.2.1. of [RFC4585] recommends using this feature
only if the underlying protocol cannot provide similar feedback. QUIC does not
provide negative acknowledgments but can detect lost packets based on the Gap
numbers contained in QUIC ACK frames (Section 6 of [RFC9002]).¶
ECN Feedback (PT=205
, FMT=8
, Name=RTCP-ECN-FB
, [RFC6679]) packets
report the count of observed ECN-CE marks. [RFC6679] defines two RTCP
reports, one packet type (with PT=205
and FMT=8
), and a new report block for
the extended reports, which are listed above. QUIC supports ECN reporting
through acknowledgments. If the QUIC connection supports ECN, the reporting of
ECN counts SHOULD be done using QUIC acknowledgments rather than RTCP ECN
feedback reports.¶
RTP session participants can use Goodbye RTCP packets (PT=203
, Name=BYE
,
[RFC3550]), to indicate that a source is no longer active. If the participant
is also going to close the QUIC connection, the BYE packet can be replaced by
a QUIC CONNECTION_CLOSE frame. In this case, the reason for leaving can be
transmitted in QUIC's CONNECTION_CLOSE Reason Phrase. However, if the
participant wishes to use this QUIC connection for any other multiplexed
traffic, the participant has to use the BYE packet because the QUIC
CONNECTION_CLOSE would close the entire QUIC connection for all other QUIC
streams and datagrams.¶
The following error codes are defined for use when abruptly terminating streams, aborting reading of streams, or immediately closing RoQ connections.¶
No error. This is used when the connection or stream needs to be closed, but there is no error to signal.¶
An error that does not match a more specific error code occured.¶
An internal error has occured in the RoQ stack.¶
Invalid payload format, e.g., length does not match packet, invalid flow id encoding, non-RTP on RTP-flow ID, etc.¶
The endpoint detected that its peer created a stream that violates the ROQ protocol.¶
A receiving endpoint is using STOP_SENDING on the current stream to request new frames be sent on new streams. Similarly, a sender notifies a receiver that retransmissions of a frame were stopped using RESET_STREAM and new frames will be sent on new streams.¶
An endpoint was unable to handle a flow identifier, e.g., because it was not signalled or because the endpoint does not support multiplexing using arbitrary flow identifiers.¶
Expectiations of the QUIC transport set by RoQ out-of-band signalling were not met by the QUIC connection.¶
The mapping described in the previous sections poses some interface requirements for the QUIC implementation. Although RoQ works without these requirements, some optimizations regarding rate adaptation and RTCP mapping require certain functionalities to be exposed to the application.¶
Each item in the following list can be considered individually. Any exposed information or function can be used by RoQ regardless of whether the other items are available. Thus, RoQ does not depend on the availability of all of the listed features but can apply different optimizations depending on the functionality exposed by the QUIC implementation.¶
Maximum Datagram Size: The maximum datagram size that the QUIC connection can transmit on the network path to the QUIC receiver. If a RoQ sender using datagrams does not know the maximum datagram size for the path to the RoQ receiver, there are only two choices - either use heuristics to limit the size of RoQ messages, or be prepared to lose RoQ messages that were too large to be carried through the network path and delivered to the RoQ receiver.¶
Datagram Acknowledgment and Loss: Section 5.2 of [RFC9221] allows QUIC implementations to notify the application that a QUIC Datagram was acknowledged or that it believes a datagram was lost. Given the datagram acknowledgments and losses, the application can deduce which RTP packets arrived at the receiver and which were lost (see also Section 8.1).¶
Stream States: The stream states include which parts of the data sent on a stream were successfully delivered and which are still outstanding to be sent or retransmitted. If an application keeps track of the RTP packets sent on a stream, their respective sizes, and in which order they were transmitted, it can infer which RTP packets were acknowledged according to the definition in Section 8.2.¶
Arrival timestamps: If the QUIC connection uses a timestamp extension like [I-D.draft-smith-quic-receive-ts] or [I-D.draft-huitema-quic-ts], the arrival timestamps or one-way delays can support the application as described in Section 8 and Section 7.¶
Bandwidth Estimation: If a bandwidth estimation is available in the QUIC implementation, exposing it avoids the implementation of an additional bandwidth estimation algorithm in the application.¶
ECN: If ECN marks are available, they can support the bandwidth estimation of the application if necessary.¶
RTP sessions are characterized by a continuous flow of packets into either or both directions. A connection migration may lead to pausing media transmission until reachability of the peer under the new address is validated. This may lead to short breaks in media delivery in the order of RTT and, if RTCP is used for RTT measurements, may cause spikes in observed delays. Application layer congestion control mechanisms (and also packet repair schemes such as retransmissions) need to be prepared to cope with such spikes.¶
If a QUIC connection is established via a signaling channel, this signaling may have involved Interactive Connectivity Establishment (ICE) exchanges to determine and choose suitable (IP address, port number) pairs for the QUIC connection. Subsequent address change events may be noticed by QUIC via its connection migration handling and/or at the ICE or other application layer, e.g., by noticing changing IP addresses at the network interface. This may imply that the two signaling and data "layers" get (temporarily) out of sync.¶
Editor's Note: It may be desirable that the API provides an indication of connection migration event for either case.¶
For repeated connections between peers, the initiator of a QUIC connection can use 0-RTT data for both QUIC streams and datagrams. As such packets are subject to replay attacks, applications shall carefully specify which data types and operations are allowed. 0-RTT data may be beneficial for use with RoQ to reduce the risk of media clipping, e.g., at the beginning of a conversation.¶
This specification defines carrying RTP on top of QUIC and thus does not finally define what the actual application data are going to be. RTP typically carries ephemeral media contents that is rendered and possibly recorded but otherwise causes no side effects. Moreover, the amount of data that can be carried as 0-RTT data is rather limited. But it is the responsibility of the respective application to determine if 0-RTT data is permissible.¶
Editor's Note: Since the QUIC connection will often be created in the context of an existing signaling relationship (e.g., using WebRTC or SIP), specific 0-RTT keying material could be exchanged to prevent replays across sessions. Within the same connection, replayed media packets would be discarded as duplicates by the receiver.¶
RoQ is subject to the security considerations of RTP described in Section 9 of [RFC3550] and the security considerations of any RTP profile in use.¶
The security considerations for the QUIC protocol and datagram extension described in Section 21 of [RFC9000], Section 9 of [RFC9001], Section 8 of [RFC9002] and Section 6 of [RFC9221] also apply to RoQ.¶
Note that RoQ provides mandatory security, and other RTP transports do not. In order to prevent the inadvertent disclosure of RTP sessions to unintended third parties, RTP topologies described in Section 3.2 that include middleboxes supporting both RoQ and non-RoQ paths MUST forward RTP packets on non-RoQ paths using a secure AVP profile ([RFC3711], [RFC4585], or another AVP profile providing equivalent RTP-level security), whether or not RoQ senders are using a secure AVP profile for those RTP packets.¶
This document registers a new ALPN protocol ID (in Section 13.1) and creates a new registry that manages the assignment of error code points in RoQ (in Section 13.2).¶
This document creates a new registration for the identification of RoQ in the "TLS Application-Layer Protocol Negotiation (ALPN) Protocol IDs" registry [RFC7301].¶
The "rtp-mux-quic" string identifies RoQ:¶
This document establishes a registry for RoQ error codes. The "RTP over QUIC (RoQ) Error Codes" registry manages a 62-bit space and is listed under the "Real-Time Transport Protocol (RTP) Parameters" heading.¶
The new error codes registry created in this document operates under the QUIC registration policy documented in Section 22.1 of [RFC9000]. This registry includes the common set of fields listed in Section 22.1.1 of [RFC9000].¶
Permanent registrations in this registry are assigned using the Specification Required policy ([RFC8126]), except for values between 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using Standards Action or IESG Approval as defined in Sections 4.9 and 4.10 of [RFC8126].¶
Registrations for error codes are required to include a description of the error code. An expert reviewer is advised to examine new registrations for possible duplication or interaction with existing error codes.¶
In addition to common fields as described in Section Section 22.1 of [RFC9000], this registry includes two additional fields. Permanent registrations in this registry MUST include the following fields:¶
A name for the error code.¶
A brief description of the error code semantics, which MAY be a summary if a specification reference is provided.¶
The initial allocations in this registry are all assigned permanent status and list a change controller of the IETF and a contact of the AVTCORE working group (avt@ietf.org).¶
The entries in Table 2 are registered by this document.¶
Value | Name | Description | Specification |
---|---|---|---|
0x00 | ROQ_NO_ERROR | No Error | Section 9 |
0x01 | ROQ_GENERAL_ERROR | General error | Section 9 |
0x02 | ROQ_INTERNAL_ERROR | Internal Error | Section 9 |
0x03 | ROQ_PACKET_ERROR | Invalid payload format | Section 9 |
0x04 | ROQ_STREAM_CREATION_ERROR | Invalid stream type | Section 9 |
0x05 | ROQ_FRAME_CANCELLED | Frame cancelled | Section 9 |
0x06 | ROQ_UNKNOWN_FLOW_ID | Unknown Flow ID | Section 9 |
0x07 | ROQ_EXPECTATION_UNMET | Externally signalled requirement unmet | Section 9 |
The following is a list of QUIC protocol extensions that might be beneficial for RoQ, but are not required by RoQ.¶
An Unreliable Datagram Extension to QUIC [RFC9221]. Without support for unreliable datagrams, RoQ cannot use the encapsulation specified in Section 5.3, but can still use QUIC streams as specified in Section 5.2.¶
A version of QUIC receive timestamps can be helpful for improved jitter calculations and congestion control. If the QUIC connection uses a timestamp extension like, the arrival timestamps or one-way delays could be exposed to the application for improved bandwidth estimation or RTCP mappings as described in Section 8 and Appendix B.¶
Quic Timestamps For Measuring One-Way Delays [I-D.draft-huitema-quic-ts]¶
QUIC Extension for Reporting Packet Receive Timestamps [I-D.draft-smith-quic-receive-ts]¶
QUIC Acknowledgement Frequency [I-D.draft-ietf-quic-ack-frequency] can be used by a sender to optimize the acknowledgement behaviour of the receiver, e.g., to optimize congestion control.¶
Signaling That a QUIC Receiver Has Enough Stream Data [I-D.draft-thomson-quic-enough] and Reliable QUIC Stream Resets [I-D.draft-ietf-quic-reliable-stream-reset] would allow RoQ senders and receivers to use versions of CLOSE_STREAM and STOP_SENDING that contain offsets. The offset could be used to reliably retransmit all frames up to a certain frame that should be cancelled before resuming transmission of further frames on new QUIC streams.¶
This section lists all the RTCP packet types and RTP header extensions that were considered in the analysis described in Section 8.¶
Several but not all of these control packets and their attributes can be mapped from QUIC, as described in Section 8.4. Mappable from QUIC has one of four values: yes, partly, QUIC extension needed, and no. Partly is used for packet types for which some fields can be mapped from QUIC, but not all. QUIC extension needed describes packet types which could be mapped with help from one or more QUIC extensions.¶
Examples of how certain packet types could be mapped with the help of QUIC extensions follow in Appendix B.6.¶
Name | Shortcut | PT | Defining Document | Mappable from QUIC | Comments |
---|---|---|---|---|---|
SMPTE time-code mapping | SMPTETC | 194 | [RFC5484] | no | |
Extended inter-arrival jitter report | IJ | 195 | [RFC5450] | no | Would require send-timestamps, which are not provided by any QUIC extension today |
Sender Reports | SR | 200 | [RFC3550] | QUIC extension needed / partly | see Appendix B.6.4 and Appendix B.6.1 |
Receiver Reports | RR | 201 | [RFC3550] | QUIC extension needed | see Appendix B.6.1 |
Source description | SDES | 202 | [RFC3550] | no | |
Goodbye | BYE | 203 | [RFC3550] | partly | see Section 8.4.3 |
Application-defined | APP | 204 | [RFC3550] | no | |
Generic RTP Feedback | RTPFB | 205 | [RFC4585] | partly | see Appendix B.3 |
Payload-specific | PSFB | 205 | [RFC4585] | partly | see Appendix B.4 |
extended report | XR | 207 | [RFC3611] | partly | see Appendix B.2 |
AVB RTCP packet | AVB | ||||
Receiver Summary Information | RSI | 209 | [RFC5760] | ||
Port Mapping | TOKEN | 210 | [RFC6284] | no | |
IDMS Settings | IDMS | 211 | [RFC7272] | no | |
Reporting Group Reporting Sources | RGRS | 212 | [RFC8861] | ||
Splicing Notification Message | SNM | 213 | [RFC8286] | no |
Name | Document | Mappable from QUIC | Comments |
---|---|---|---|
Loss RLE Report Block | [RFC3611] | yes | If only used for acknowledgment, could be replaced by QUIC acknowledgments, see Section 8.1 and Section 8.2 |
Duplicate RLE Report Block | [RFC3611] | no | |
Packet Receipt Times Report Block | [RFC3611] | QUIC extension needed / partly | QUIC could provide packet receive timestamps when using a timestamp extension that reports timestamp for every received packet, such as [I-D.draft-smith-quic-receive-ts]. However, QUIC does not provide feedback in RTP timestamp format. |
Receiver Reference Time Report Block | [RFC3611] | QUIC extension needed | Used together with DLRR Report Blocks to calculate RTTs of non-senders. RTT measurements can natively be provided by QUIC. |
DLRR Report Block | [RFC3611] | QUIC extension needed | Used together with Receiver Reference Time Report Blocks to calculate RTTs of non-senders. RTT can natively be provided by QUIC. |
Statistics Summary Report Block | [RFC3611] | QUIC extension needed / partly | Packet loss and jitter can be inferred from QUIC acknowledgments, if a timestamp extension is used (see [I-D.draft-smith-quic-receive-ts] or [I-D.draft-huitema-quic-ts]). The remaining fields cannot be mapped to QUIC. |
VoIP Metrics Report Block | [RFC3611] | no | as in other reports above, only loss and RTT available |
RTCP XR | [RFC5093] | no | |
Texas Instruments Extended VoIP Quality Block | |||
Post-repair Loss RLE Report Block | [RFC5725] | no | |
Multicast Acquisition Report Block | [RFC6332] | no | |
IDMS Report Block | [RFC7272] | no | |
ECN Summary Report | [RFC6679] | partly | see Section 8.4.2 |
Measurement Information Block | [RFC6776] | no | |
Packet Delay Variation Metrics Block | [RFC6798] | no | QUIC timestamps may be used to achieve the same goal? |
Delay Metrics Block | [RFC6843] | no | QUIC has RTT and can provide timestamps for one-way delay, but no way of informing peers about end-to-end statistics when QUIC is only used on one segment of the path. |
Burst/Gap Loss Summary Statistics Block | [RFC7004] | QUIC ACKs? | |
Burst/Gap Discard Summary Statistics Block | [RFC7004] | no | |
Frame Impairment Statistics Summary | [RFC7004] | no | |
Burst/Gap Loss Metrics Block | [RFC6958] | QUIC ACKs? | |
Burst/Gap Discard Metrics Block | [RFC7003] | no | |
MPEG2 Transport Stream PSI-Independent Decodability Statistics Metrics Block | [RFC6990] | no | |
De-Jitter Buffer Metrics Block | [RFC7005] | no | |
Discard Count Metrics Block | [RFC7002] | no | |
DRLE (Discard RLE Report) | [RFC7097] | no | |
BDR (Bytes Discarded Report) | [RFC7243] | no | |
RFISD (RTP Flows Initial Synchronization Delay) | [RFC7244] | no | |
RFSO (RTP Flows Synchronization Offset Metrics Block) | [RFC7244] | no | |
MOS Metrics Block | [RFC7266] | no | |
LCB (Loss Concealment Metrics Block) | [RFC7294], Section 4.1 | no | |
CSB (Concealed Seconds Metrics Block) | [RFC7294], Section 4.1 | no | |
MPEG2 Transport Stream PSI Decodability Statistics Metrics Block | [RFC7380] | no | |
Post-Repair Loss Count Metrics Report Block | [RFC7509] | no | |
Video Loss Concealment Metric Report Block | [RFC7867] | no | |
Independent Burst/Gap Discard Metrics Block | [RFC8015] | no |
Name | Long Name | Document | Mappable from QUIC | Comments |
---|---|---|---|---|
Generic NACK | Generic negative acknowledgement | [RFC4585] | partly | see Section 8.4.1 |
TMMBR | Temporary Maximum Media Stream Bit Rate Request | [RFC5104] | no | |
TMMBN | Temporary Maximum Media Stream Bit Rate Notification | [RFC5104] | no | |
RTCP-SR-REQ | RTCP Rapid Resynchronisation Request | [RFC6051] | no | |
RAMS | Rapid Acquisition of Multicast Sessions | [RFC6285] | no | |
TLLEI | Transport-Layer Third-Party Loss Early Indication | [RFC6642] | no? | no way of telling QUIC peer "don't ask for retransmission", but QUIC would not ask that anyway, only RTCP NACK? |
RTCP-ECN-FB | RTCP ECN Feedback | [RFC6679] | partly | see Section 8.4.2 |
PAUSE-RESUME | Media Pause/Resume | [RFC7728] | no | |
DBI | Delay Budget Information (DBI) | [_3GPP-TS-26.114] | ||
CCFB | RTP Congestion Control Feedback | [RFC8888] | QUIC extension needed | see Appendix B.6.2 |
Because QUIC is a generic transport protocol, QUIC feedback cannot replace the following Payload-specific RTP Feedback (PSFB) feedback.¶
Name | Long Name | Document |
---|---|---|
PLI | Picture Loss Indication | [RFC4585] |
SLI | Slice Loss Indication | [RFC4585] |
RPSI | Reference Picture Selection Indication | [RFC4585] |
FIR | Full Intra Request Command | [RFC5104] |
TSTR | Temporal-Spatial Trade-off Request | [RFC5104] |
TSTN | Temporal-Spatial Trade-off Notification | [RFC5104] |
VBCM | Video Back Channel Message | [RFC5104] |
PSLEI | Payload-Specific Third-Party Loss Early Indication | [RFC6642] |
ROI | Video region-of-interest (ROI) | [_3GPP-TS-26.114] |
LRR | Layer Refresh Request Command | [I-D.draft-ietf-avtext-lrr-07] |
VP | Viewport (VP) | [_3GPP-TS-26.114] |
AFB | Application Layer Feedback | [RFC4585] |
TSRR | Temporal-Spatial Resolution Request | [I-D.draft-ietf-avtcore-rtcp-green-metadata] |
TSRN | Temporal-Spatial Resolution Notification | [I-D.draft-ietf-avtcore-rtcp-green-metadata] |
Like the payload-specific feedback packets, QUIC cannot directly replace the control information in the following header extensions. RoQ does not place restrictions on sending any RTP header extensions. However, some extensions, such as Transmission Time offsets [RFC5450] are used to improve network jitter calculation, which can be done in QUIC if a timestamp extension is used.¶
Extension URI | Description | Reference | Mappable from QUIC |
---|---|---|---|
urn:ietf:params:rtp-hdrext:toffset | Transmission Time offsets | [RFC5450] | no |
urn:ietf:params:rtp-hdrext:ssrc-audio-level | Audio Level | [RFC6464] | no |
urn:ietf:params:rtp-hdrext:splicing-interval | Splicing Interval | [RFC8286] | no |
urn:ietf:params:rtp-hdrext:smpte-tc | SMPTE time-code mapping | [RFC5484] | no |
urn:ietf:params:rtp-hdrext:sdes | Reserved as base URN for RTCP SDES items that are also defined as RTP compact header extensions. | [RFC7941] | no |
urn:ietf:params:rtp-hdrext:ntp-64 | Synchronisation metadata: 64-bit timestamp format | [RFC6051] | no |
urn:ietf:params:rtp-hdrext:ntp-56 | Synchronisation metadata: 56-bit timestamp format | [RFC6051] | no |
urn:ietf:params:rtp-hdrext:encrypt | Encrypted extension header element | [RFC6904] | no, but maybe irrelevant? |
urn:ietf:params:rtp-hdrext:csrc-audio-level | Mixer-to-client audio level indicators | [RFC6465] | no |
urn:3gpp:video-orientation:6 | Higher granularity (6-bit) coordination of video orientation (CVO) feature, see clause 6.2.3 | [_3GPP-TS-26.114] | probably not(?) |
urn:3gpp:video-orientation | Coordination of video orientation (CVO) feature, see clause 6.2.3 | [_3GPP-TS-26.114] | probably not(?) |
urn:3gpp:roi-sent | Signalling of the arbitrary region-of-interest (ROI) information for the sent video, see clause 6.2.3.4 | [_3GPP-TS-26.114] | probably not(?) |
urn:3gpp:predefined-roi-sent | Signalling of the predefined region-of-interest (ROI) information for the sent video, see clause 6.2.3.4 | [_3GPP-TS-26.114] | probably not(?) |
Extension URI | Description | Reference | Mappable from QUIC |
---|---|---|---|
urn:ietf:params:rtp-hdrext:sdes:cname | Source Description: Canonical End-Point Identifier (SDES CNAME) | [RFC7941] | no |
urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id | RTP Stream Identifier | [RFC8852] | no |
urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id | RTP Repaired Stream Identifier | [RFC8852] | no |
urn:ietf:params:rtp-hdrext:sdes:CaptId | CLUE CaptId | [RFC8849] | no |
urn:ietf:params:rtp-hdrext:sdes:mid | Media identification | [RFC9143] | no |
Considerations for mapping QUIC feedback into Receiver Reports (PT=201
,
Name=RR
, [RFC3550]) are:¶
Fraction lost: When RTP packets are carried in QUIC datagrams, the fraction of lost packets can be directly inferred from QUIC's acknowledgments. The calculation SHOULD include all packets up to the acknowledged RTP packet with the highest RTP sequence number. Later packets SHOULD be ignored since they may still be in flight unless other QUIC packets that were sent after the RTP packet were already acknowledged.¶
Cumulative lost: Similar to the fraction of lost packets, the cumulative loss can be inferred from QUIC's acknowledgments, including all packets up to the latest acknowledged packet.¶
Highest Sequence Number received: In RTCP, this field is a 32-bit field that contains the highest sequence number a receiver received in an RTP packet and the count of sequence number cycles the receiver has observed. A sender sends RTP packets in QUIC packets and receives acknowledgments for the QUIC packets. By keeping a mapping from a QUIC packet to the RTP packets encapsulated in that QUIC packet, the sender can infer the highest sequence number and number of cycles seen by the receiver from QUIC acknowledgments.¶
Interarrival jitter: If QUIC acknowledgments carry timestamps as described in [I-D.draft-smith-quic-receive-ts], senders can infer the interarrival jitter from the arrival timestamps in QUIC acknowledgments.¶
Last SR: Similar to lost packets, the NTP timestamp of the last received sender report can be inferred from QUIC acknowledgments.¶
Delay since last SR: This field is not required when the receiver reports are entirely replaced by QUIC feedback.¶
RTP Congestion Control Feedback (PT=205
, FMT=11
, Name=CCFB
,
[RFC8888]) contains acknowledgments, arrival timestamps, and ECN
notifications for each received packet. Acknowledgments and ECNs can be inferred
from QUIC as described above. Arrival timestamps can be added through extended
acknowledgment frames as described in [I-D.draft-smith-quic-receive-ts] or
[I-D.draft-huitema-quic-ts].¶
Extended Reports (PT=207
, Name=XR
, [RFC3611]) offer an extensible
framework for a variety of different control messages. Some of the statistics
that are defined as extended report blocks can be derived from QUIC, too. Other
report blocks need to be evaluated individually to determine whether the
contained information can be transmitted using QUIC instead. Table 4
in Appendix B.2 lists considerations for mapping QUIC feedback to some
of the Extended Reports.¶
While Appendix B.6.1 presented some RTCP packets that can be replaced by QUIC features, QUIC cannot replace all of the defined RTCP packet types. This mostly affects RTCP packet types, which carry control information that is to be interpreted by the RTP application layer rather than the underlying transport protocol itself.¶
Sender Reports (PT=200
, Name=SR
, [RFC3550]) are similar to Receiver
Reports, as described in Appendix B.6.1. They are sent by media senders and
additionally contain an NTP and an RTP timestamp and the number of packets and
octets transmitted by the sender. The timestamps can be used by a receiver to
synchronize streams. QUIC cannot provide similar control information since it
does not know about RTP timestamps. A QUIC receiver cannot calculate the
packet or octet counts since it does not know about lost datagrams. Thus,
sender reports are required in RoQ to synchronize streams at the receiver. The
sender reports SHOULD not contain any receiver report blocks if the
information can be inferred from the QUIC transport as explained in
Appendix B.6.1.¶
In addition to carrying transmission statistics, RTCP packets can contain application layer control information that cannot directly be mapped to QUIC. Examples of this information may include:¶
Source Description (PT=202
, Name=SDES
) and Application (PT=204
,
Name=APP
) packet types from [RFC3550], or¶
many of the payload-specific feedback messages (PT=206
) defined in
[RFC4585], used to control the codec behavior of the sender.¶
Since QUIC does not provide any kind of application layer control messaging, QUIC feedback cannot be mapped into these RTCP packet types. If the RTP application needs this information, the RTCP packet types are used in the same way as they would be used over any other transport protocol.¶
An experimental implementation of the mapping described in this document can be found on Github. The application implements the RoQ Datagrams mapping and implements SCReAM congestion control at the application layer. It can optionally disable the builtin QUIC congestion control (NewReno). The endpoints only use RTCP for congestion control feedback, which can optionally be disabled and replaced by the QUIC connection statistics as described in Section 8.4.¶
Experimental results of the implementation can be found on Github, too.¶
Early versions of this document were similar in spirit to [I-D.draft-hurst-quic-rtp-tunnelling], although many details differ. The authors would like to thank Sam Hurst for providing his thoughts about how QUIC could be used to carry RTP.¶
The guidance in Section 5.2 about configuring the number of parallel unidirectional QUIC streams is based on Section 6.2 of [RFC9114], with obvious substitutions for RTP/RTCP.¶
The authors would like to thank Bernard Aboba, David Schinazi, Lucas Pardue, Sergio Garcia Murillo, Spencer Dawkins, and Vidhi Goel for their valuable comments and suggestions contributing to this document.¶