RFC 8108
Sending Multiple RTP Streams in a Single RTP Session
RFC 8108: Sending Multiple RTP Streams in a Single RTP Session ๐
okay bestie, let's get into it ๐ฆ first, the title block, because it's the vibe check for the whole doc:
- Number: RFC 8108 ๐
- Title: Sending Multiple RTP Streams in a Single RTP Session
- Stream: Internet Engineering Task Force (IETF)
- Category: Standards Track
- Date: March 2017
- ISSN: 2070-1721
- Authors: J. Lennox (Vidyo), M. Westerlund (Ericsson), Q. Wu (Huawei), and C. Perkins (University of Glasgow) ๐
- Updates: RFC 3550 and RFC 4585 โจ
Abstract ๐
so the abstract is basically the TL;DR ๐ซถ this memo expands and clarifies how Real-time Transport Protocol (RTP) endpoints behave when they use multiple synchronization sources (SSRCs). that happens, for example, when one endpoint sends several RTP streams in a single RTP session. it updates RFC 3550 for handling multiple SSRCs per endpoint in RTP sessions, with a big focus on RTP Control Protocol (RTCP) behavior. it also updates RFC 4585 to change and clarify how SSRC timeouts are calculated and when feedback messages get included. iconic, honestly ๐ฅ
Status of This Memo ๐
this is an Internet Standards Track document โจ it's a product of the Internet Engineering Task Force (IETF), so it represents the consensus of the IETF community. it got public review and was approved for publication by the Internet Engineering Steering Group (IESG). if you want more on Internet Standards, check Section 2 of RFC 7841 ๐ธ
for the current status, any errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc8108 ๐
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 in effect on the date it was published. please actually read those, bestie, because they explain your rights and restrictions for this document ๐ also, any Code Components pulled out of this document have to include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as described in the Simplified BSD License. no cap, read the fine print ๐ญ
Table of Contents ๐บ๏ธ
1. Introduction ....................................................4
2. Terminology .....................................................4
3. Use Cases for Multi-Stream Endpoints ............................4
3.1. Endpoints with Multiple Capture Devices ....................4
3.2. Multiple Media Types in a Single RTP Session ...............5
3.3. Multiple Stream Mixers .....................................5
3.4. Multiple SSRCs for a Single Media Source ...................5
4. Use of RTP by Endpoints That Send Multiple Media Streams ........6
5. Use of RTCP by Endpoints That Send Multiple Media Streams .......6
5.1. RTCP Reporting Requirement .................................7
5.2. Initial Reporting Interval .................................7
5.3. Aggregation of Reports into Compound RTCP Packets ..........8
5.3.1. Maintaining AVG_RTCP_SIZE ...........................9
5.3.2. Scheduling RTCP when Aggregating Multiple SSRCs ....10
5.4. Use of RTP/AVPF or RTP/SAVPF Feedback .....................13
5.4.1. Choice of SSRC for Feedback Packets ................13
5.4.2. Scheduling an RTCP Feedback Packet .................14
6. Adding and Removing SSRCs ......................................15
6.1. Adding RTP Streams ........................................16
6.2. Removing RTP Streams ......................................16
7. RTCP Considerations for Streams with Disparate Rates ...........17
7.1. Timing Out SSRCs ..........................................19
7.1.1. Problems with the RTP/AVPF T_rr_interval
Parameter ..........................................19
7.1.2. Avoiding Premature Timeout .........................20
7.1.3. Interoperability between RTP/AVP and RTP/AVPF ......21
7.1.4. Updated SSRC Timeout Rules .........................22
7.2. Tuning RTCP Transmissions .................................22
7.2.1. RTP/AVP and RTP/SAVP ...............................22
7.2.2. RTP/AVPF and RTP/SAVPF .............................24
8. Security Considerations ........................................25
9. References .....................................................26
9.1. Normative References ......................................26
9.2. Informative References ....................................26
Acknowledgments ...................................................29
Authors' Addresses ................................................29
1. Introduction ๐
back in the day, when the Real-Time Transport Protocol (RTP) [RFC3550] was first designed, and for a long time after, endpoints in RTP sessions usually only sent one media source ๐ง so they used one RTP stream and one synchronization source (SSRC) per RTP session, and separate RTP sessions were typically used for each media type. these days, though, a bunch of scenarios have popped up where endpoints want to send multiple RTP streams, each one told apart by its own SSRC identifier, all in one RTP session. we'll go through them in Section 3. the original RTP design did think about this stuff, ngl, but the spec wasn't written with these use cases consistently in mind, so it's a little unclear in places ๐
this memo updates [RFC3550] to clear up behavior for use cases where endpoints use multiple SSRCs. it also updates [RFC4585] to fix problems with timing out inactive SSRCs and to clarify behavior around including feedback messages ๐
2. Terminology ๐
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 RFC 2119 [RFC2119] and indicate requirement levels for compliant implementations. these are the official requirement words, so they're the ones with real weight here โจ
3. Use Cases for Multi-Stream Endpoints ๐ฌ
this section talks through a few use cases that pushed people to build endpoints sending RTP data with multiple SSRCs in a single RTP session ๐
3.1. Endpoints with Multiple Capture Devices ๐ธ
the most straightforward reason for an endpoint to send multiple simultaneous RTP streams in one RTP session is when it has several capture devices and can therefore produce multiple media sources of the same media type and characteristics. for example, telepresence systems of the type described by the CLUE Telepresence Framework [CLUE-FRAME] often have multiple cameras or microphones covering different parts of a room, so they send several RTP streams of each type within a single RTP session ๐ฅ๐ค
3.2. Multiple Media Types in a Single RTP Session ๐ถ
recent work has updated RTP [MULTI-RTP] and Session Description Protocol (SDP) [SDP-BUNDLE] to drop the old assumption in RTP that media sources of different media types always go on different RTP sessions. in this setup, one endpoint's audio and video RTP streams (for example) are sent in a single RTP session instead, which cuts down on the number of transport-layer flows used ๐ฆ
3.3. Multiple Stream Mixers ๐๏ธ
there are a few RTP topologies where a central device generates multiple RTP streams in a session by itself. one example is a mixer that provides centralized compositing for a multi-capture scenario like the one in Section 3.1. here, the central node acts a lot like a multi-capture endpoint, generating several similar, related sources ๐ธ
a more complex example is the selective forwarding middlebox, described in Section 3.7 of [RFC7667] ๐ง this is a middlebox that receives RTP streams from several endpoints and then selectively forwards modified versions of some of them toward the other endpoints it's connected to. for each connected endpoint, a separate media source shows up in the session for every other source connected to the middlebox, "projected" from the original streams. but at any given time, lots of them can look inactive (so they're receivers, not senders, in RTP). this kind of device is closer to an RTP mixer than an RTP translator: it terminates RTCP reporting about the mixed streams, it can rewrite SSRCs, timestamps, and sequence numbers, as well as the contents of the RTP payloads, and it can turn sources on and off at will without appearing to generate packet loss ๐ซ each projected stream will typically keep its original RTCP source description (SDES) information โจ
3.4. Multiple SSRCs for a Single Media Source ๐
there are also several cases where one media source can send its data using multiple SSRCs within a single RTP session. these include, but aren't limited to, transport robustness tools like the RTP retransmission payload format [RFC4588], which needs one SSRC for the media data and another SSRC for the repair data ๐ similarly, some layered media encoding schemes, like H.264 Scalable Video Coding (SVC) [RFC6190], can be set up so that each layer is sent using a different SSRC within a single RTP session ๐
4. Use of RTP by Endpoints That Send Multiple Media Streams ๐
RTP is inherently a group communication protocol ๐ซถ each endpoint in an RTP session will use one or more SSRCs, and so will some types of RTP-level middlebox. so, unless restrictions on the number of SSRCs have been signaled, RTP endpoints can expect to receive RTP data packets sent using a number of different SSRCs within a single RTP session. this can happen whether the RTP session runs over a point-to-point connection or a multicast group, because middleboxes can connect multiple transport connections together into a single RTP session. (the RTP session is defined by the shared SSRC space, not by the transport connections, bestie ๐ง ) and if RTP mixers are in the mix, some SSRCs might only show up in the contributing source (CSRC) list of an RTP packet and in RTCP, and might not appear directly as the SSRC of an RTP data packet ๐
every RTP endpoint gets an allocated share of the available session bandwidth, as decided by signaling and congestion control ๐ธ the endpoint needs to keep its total media sending rate inside that share. BUT, endpoints that send multiple RTP streams don't necessarily have to split their share independently or evenly across each RTP stream and its SSRCs. an endpoint can vary the bandwidth allocated to different streams based on what they need, and it can dynamically change the bandwidth given to different SSRCs (for example, by using a variable-rate codec), as long as the total sending rate doesn't go over its allocated share. this includes turning RTP streams, or their redundancy streams, on or off as more or less bandwidth becomes available ๐
5. Use of RTCP by Endpoints That Send Multiple Media Streams ๐
Okay so RTCP is defined in Section 6 of [RFC3550] ๐ The whole protocol is written around "participants" in an RTP session, and it quietly assumes every endpoint is one participant with a single SSRC. But when an endpoint has multiple SSRC values, things only work right if implementations MUST treat each SSRC as a separate participant in the RTP session. So an endpoint with multiple SSRCs counts as multiple participants ๐งโจ
5.1. RTCP Reporting Requirement
An RTP endpoint that has multiple SSRCs MUST treat each SSRC as a separate participant in the RTP session ๐ Each SSRC keeps its own RTCP-related state information, so each one gets its own RTCP reporting interval that decides when it sends RTCP reports. If the mechanism in [MULTI-STREAM-OPT] is not used, then each SSRC sends RTCP reports for all the other SSRCs, including the ones sitting at the same endpoint ๐
Here's the tea: if the endpoint has some SSRCs that are sending data and some that are only receivers, they get different shares of the RTCP bandwidth and calculate different base RTCP reporting intervals ๐ Otherwise, all the SSRCs at an endpoint calculate the same base RTCP reporting interval. The actual reporting intervals for each SSRC are randomized in the usual way, but reports can be aggregated as described in Section 5.3 ๐ฆ
5.2. Initial Reporting Interval
When a participant joins a unicast session, this bit from Section 6.2 of [RFC3550] is relevant: "For unicast sessions... the delay before sending the initial compound RTCP packet MAY be zero." ๐ธ The basic assumption is that this should also apply when there are multiple SSRCs. Caution is needed though ๐ญ If an endpoint (or middlebox) with a LOT of SSRCs joins a unicast session, sending a ton of RTCP reports immediately can cause a big burst of traffic. That can lead to transient congestion and packet loss from queue overflows, which is not the vibe.
So to keep the initial burst from an RTP endpoint no bigger than what a TCP connection would produce, an RTP endpoint MUST NOT send more than four compound RTCP packets with zero initial delay when it joins an RTP session. That's true no matter how many SSRCs the endpoint uses ๐ฅ Each of those initial compound RTCP packets MAY include aggregated reports from multiple SSRCs, as long as the total compound RTCP packet size doesn't go over the MTU, and the avg_rtcp_size is maintained as in Section 5.3.1 ๐ Aggregating reports from several SSRCs in those initial packets lets a substantial number of SSRCs report right away โจ Endpoints SHOULD prioritize reports on SSRCs that are likely to be most immediately useful, e.g., SSRCs that are initially senders ๐
An endpoint that needs to report on more SSRCs than fit into the four compound RTCP reports that can go out immediately MUST send the other reports later. It follows the usual RTCP timing rules, including timer reconsideration โฐ Those reports MAY be aggregated as described in Section 5.3 ๐ซถ
Note: The above is chosen to match the TCP maximum initial window of four packets [RFC3390], not the larger TCP initial windows for which there is an ongoing experiment [RFC6928]. The reason for this is a desire to be conservative, since an RTP endpoint will also in many cases start sending RTP data packets at the same time as these initial RTCP packets are sent. ๐ง
5.3. Aggregation of Reports into Compound RTCP Packets
As outlined in Section 5.1, an endpoint with multiple SSRCs has to treat each SSRC as a separate participant when it comes to sending RTCP reports ๐ That means each SSRC sends a compound RTCP packet in every reporting interval. Since these packets come from the same endpoint, you might reasonably expect they can be aggregated to cut down on overhead, and you'd be right ๐ง Section 6.1 of [RFC3550] already lets RTP translators and mixers aggregate packets in similar circumstances:
It is RECOMMENDED that translators and mixers combine individual RTCP packets from the multiple sources they are forwarding into one compound packet whenever feasible in order to amortize the packet overhead (see Section 7). An example RTCP compound packet as might be produced by a mixer is shown in Fig. 1. If the overall length of a compound packet would exceed the MTU of the network path, it SHOULD be segmented into multiple shorter compound packets to be transmitted in separate packets of the underlying protocol. This does not impair the RTCP bandwidth estimation because each compound packet represents at least one distinct participant. Note that each of the compound packets MUST begin with an SR or RR packet.
This lets RTP translators and mixers build compound RTCP packets holding multiple Sender Report (SR) or Receiver Report (RR) packets from different SSRCs, plus any of the other packet types ๐ฆ The order of RTCP packets inside the compound packet is totally free, with one exception: the regular rule that the compound RTCP packet starts with an SR or RR packet. Because of that rule, correctly implemented RTP endpoints can handle compound RTCP packets that contain RTCP packets for multiple SSRCs ๐
So endpoints using multiple SSRCs can aggregate the RTCP packets from their different SSRCs into compound RTCP packets, as long as:
- the resulting compound RTCP packets begin with an SR or RR packet,
- they maintain the average RTCP packet size as described in Section 5.3.1, and
- they schedule packet transmission and manage aggregation as described in Section 5.3.2.
5.3.1. Maintaining AVG_RTCP_SIZE
The RTCP scheduling algorithm in [RFC3550] works on a per-SSRC basis ๐ Each SSRC sends a single compound RTCP packet in each RTCP reporting interval. When an endpoint uses multiple SSRCs, it's desirable to aggregate the compound RTCP packets its SSRCs send, which cuts overhead by forming a bigger compound RTCP packet โจ That aggregation can be done as described in Section 5.3.2, provided the average RTCP packet size calculation is updated as follows.
Participants in an RTP session update their estimate of the average RTCP packet size (avg_rtcp_size) each time they send or receive an RTCP packet (see Section 6.3.3 of [RFC3550]) ๐ธ When a compound RTCP packet containing RTCP packets from several SSRCs is sent or received, the avg_rtcp_size estimate for each SSRC that gets reported upon is updated using div_packet_size instead of the actual packet size:
avg_rtcp_size = (1/16) * div_packet_size + (15/16) * avg_rtcp_size
where div_packet_size is packet_size divided by the number of SSRCs reporting in that compound packet. The number of SSRCs reporting in a compound packet is found by counting the number of different SSRCs that are the source of SR or RR RTCP packets within the compound RTCP packet. Non-compound RTCP packets (i.e., RTCP packets that do not contain an SR or RR packet [RFC5506]) are considered to report on a single SSRC ๐ง
A participant that doesn't follow the above rule, and instead uses the full RTCP compound packet size to calculate avg_rtcp_size, will derive an RTCP reporting interval that's overly large ๐ฌ It's too large by a factor proportional to the number of SSRCs aggregated into compound RTCP packets, and to the size of the set of SSRCs being aggregated relative to the total number of participants. That increased interval can cause premature timeouts if it's more than five times the interval chosen by the SSRCs that understand compound RTCP and aggregate reports from many SSRCs. A 1500-octet MTU can fit five typical-size reports into a compound RTCP packet, so this is a real concern if endpoints aggregate RTCP reports from multiple SSRCs ๐
The issue in the previous paragraph is mitigated by the modification in timeout behavior specified in Section 7.1.2 of this memo ๐ซถ That mitigation applies when the RTCP bandwidth is high enough that an endpoint, using avg_rtcp_size calculated without counting the number of reporting SSRCs, can transmit more often than roughly every 5 seconds. Note, however, that the non-updated endpoint's RTCP reporting is still negatively affected even if the premature timeouts of its SSRCs are avoided ๐ฅบ If compatibility with non-updated endpoints is a concern, the number of reports from different SSRCs aggregated into a single compound RTCP packet SHOULD either be limited to two reports, or aggregation ought not be used at all. That keeps the non-updated endpoint's RTCP reporting interval no larger than twice the RTCP reporting interval that an endpoint following this specification would choose ๐
5.3.2. Scheduling RTCP when Aggregating Multiple SSRCs โจ
okay so this section is literally where the RTCP scheduling glow-up happens ๐ it revises and extends what [RFC3550] says in Section 6.3, and what [RFC4585] says in Section 3.5.3 if you're using the RTP/AVPF or RTP/SAVPF profile. the whole point is figuring out what to do when a bunch of reporting SSRCs want to stuff their RTCP packets into the same compound packet ๐ฆ these changes are needed so the important timing stuff still works, like the inter-packet distribution and how things behave during flash joins and other membership changes ๐ฆ no cap, the timing is everything bestie ๐ซถ
the variables tn, tp, tc, T, and Td are defined in Section 6.3 of [RFC3550], so go check there if you forget what they mean ๐ธ T_rr_interval and T_rr_last come from [RFC4585] ๐
okay now the big rule: every endpoint MUST schedule RTCP transmission independently for each of its SSRCs, using the regular tn calculation for whatever RTP profile is being used ๐ every time the tn timer expires for an SSRC, the endpoint MUST do RTCP timer reconsideration and, if it applies, suppression based on T_rr_interval ๐ฅ if that says a compound RTCP packet should go out from that SSRC, and it's not an early RTCP packet [RFC4585], then the endpoint SHOULD try to aggregate RTCP packets from other SSRCs that are scheduled in the future into that compound packet before it's sent ๐ง the reason it might limit or skip aggregating for backwards compatibility is covered in Section 5.3.1 ๐
here's how the aggregation goes down ๐ the endpoint picks the SSRC with the smallest tn value after the current time, tc, and prepares the RTCP packets that SSRC would send if its tn timer expired right at tc โจ if those packets fit in the compound packet being built, taking the path MTU and the packets already added into account, they get added ๐ if they don't fit, they get discarded ๐ this repeats for each SSRC in order of increasing tn until the compound packet is full or everyone's been aggregated, and then it gets sent ๐
when the compound packet goes out, the endpoint MUST update tp, tn, and T_rr_last (if applicable) for every SSRC that got included ๐ here's the update breakdown:
a. for the first SSRC that reported in the compound packet, set its effective transmission time, tt, to tc ๐
b. for each additional SSRC that reported in the compound packet, work out the transmission time that SSRC would've had if it hadn't been aggregated ๐ซ you do that by taking tn for that SSRC, then reconsidering and updating tn until tp + T <= tn ๐ once that's done, set that SSRC's tt to the calculated tn ๐ and if you're using the RTP/AVPF or RTP/SAVPF profile, suppression based on T_rr_interval MUST NOT be used in this calculation ๐ โโ๏ธ
c. work out the average effective transmission time, tt_avg, for the compound packet using the tt values of all the SSRCs sent in it โจ then set tp for each of those SSRCs to tt_avg ๐ and if you're on RTP/AVPF or RTP/SAVPF, set T_tt_last for each SSRC sent to tt_avg too ๐ฆ
d. for each SSRC sent in the compound packet, recalculate tn using the updated parameters and the usual RTCP timing rules, and reschedule the timers ๐ฅ
when you're on RTP/AVPF or RTP/SAVPF, the mechanism above only tries to aggregate when the compound packet isn't an early RTCP packet, so the algorithm in Section 3.5.3 of [RFC4585] is the one running the RTCP scheduling ๐ if T_rr_interval == 0, or if T_rr_interval != 0 and option 1, 2a, or 2b of that algorithm got picked, the mechanism updates the variables it needs ๐ธ but if the transmission gets suppressed under option 2c, then tp is updated to tc, because aggregation didn't actually happen ๐
reverse reconsideration MUST be done following Section 6.3.4 of [RFC3550] ๐ง sometimes that makes tp (after reverse reconsideration) bigger than tc, and that's totally fine, not a problem at all ๐ it has the desired effect of pulling tp toward tc (and tn too) proportionally as the reporting interval shrinks in direct proportion to the smaller group size ๐ฆ
the algorithm above has been shown in simulations [Sim88] [Sim92] to keep the inter-RTCP packet transmission time distribution for each SSRC AND to use the same amount of bandwidth as non-aggregated RTCP packets ๐ญ๐ฅ the actual transmission interval for an SSRC that triggers a compound RTCP transmission still follows the regular rules ๐ tp gets set somewhere in the interval [0, 1.5/1.21828*Td] ahead of tc ๐ the actual value is the average of one instance of tc and the randomized transmission times of the additional SSRCs, so the lower end of the interval is more likely ๐ฅบ this makes up for the bias you'd otherwise get from picking the shortest tn out of the N SSRCs in the aggregate ๐
the algorithm also handles cases where the number of SSRCs that fit in an aggregated packet changes ๐ an SSRC that was aggregated before but doesn't fit this time still has its own transmission scheduled by the normal rules ๐ so it'll trigger a transmission in due time, or get included in another aggregate โจ here's what happens to the algorithm when group size changes:
RTP sessions where the number of SSRCs is growing: when the group grows, Td grows in proportion to the number of new SSRCs in the group ๐ธ when reconsideration runs because the tn timer expired, that SSRC reconsiders and, with a certain probability, reschedules its tn timer ๐ this part of reconsideration is only affected by the above algorithm having tp values that were in the future, instead of set to the time of the actual last transmission when tp got updated ๐ซถ
RTP sessions where the number of SSRCs is shrinking: when the group shrinks, reverse reconsideration moves tp and tn toward tc, proportionally to how many SSRCs left the session compared to the total number of participants when they left ๐ฆ setting tp forward in time relative to tc might look like it has a negative effect ๐ but it's there to make up for the bias from picking the shortest tn out of the N aggregated ๐ that bias sticks around even after the number of SSRCs goes down ๐ reverse reconsideration fixes it whether or not aggregation is being used โจ the negative effect that can happen when an SSRC leaves is that the most favorable tn belonged to the SSRC that got removed ๐ฌ the damage is limited to delaying transmission by, at worst, one reporting interval ๐ซ
so in conclusion ๐ the investigations found no significant negative impact on the scheduling algorithm ๐ iconic behavior tbh ๐
5.4. Use of RTP/AVPF or RTP/SAVPF Feedback ๐ฆ
okay so this section is about sending RTP/AVPF feedback packets when the sending endpoint has multiple SSRCs ๐ the guidelines here also apply to endpoints using the RTP/SAVPF profile โจ
5.4.1. Choice of SSRC for Feedback Packets ๐
when an RTP/AVPF endpoint has multiple SSRCs, it gets to choose which SSRC to use as the source for the RTCP feedback packets it sends ๐ a few factors can affect that choice:
- RTCP feedback packets about a particular media type SHOULD be sent by an SSRC that receives that media type ๐ธ for example, when audio and video are multiplexed onto a single RTP session, endpoints will use their audio SSRC to send feedback on the audio they got from other participants ๐ค
- RTCP feedback packets and RTCP codec control messages that are notifications or indications about RTP data an endpoint processed MUST be sent from the SSRC used for that RTP data ๐ฅ this includes notifications that relate to a previously received request or command [RFC4585][RFC5104] ๐
- if separate SSRCs are used to send and receive media, then the corresponding SSRC SHOULD be used for feedback, since they have differing RTCP bandwidth fractions ๐ฆ this can also affect whether or not the SSRC can be used in immediate mode โจ
- some RTCP feedback packet types need consistency in the SSRC used ๐ for example, if a Temporary Maximum Media Stream Bit Rate Request (TMMBR) limitation [RFC5104] is set by an SSRC, the same SSRC needs to be used to remove the limitation ๐ซถ
- if several SSRCs are suitable for sending feedback, it might be desirable to use one that lets the feedback go out as an early RTCP packet ๐ง
when an RTCP feedback packet is sent as part of a compound RTCP packet that aggregates reports from multiple SSRCs, there's no requirement that the compound packet contain an SR or RR packet generated by the sender of the RTCP feedback packet ๐ for reduced-size RTCP packets, aggregation of RTCP feedback packets from multiple sources is not limited any further than Section 4.2.2 of [RFC5506] ๐ ๐
5.4.2. Scheduling an RTCP Feedback Packet โจ
okay bestie, so when an SSRC needs to send a feedback packet in early mode, it MUST schedule that packet using the algorithm in Section 3.5 of [RFC4585], with a few tweaks ๐
- Figuring out the session vibe ๐งฎ: an endpoint MUST count the distinct RTCP SDES CNAME values used by the SSRCs listed in the
SSRCfield of the RTP data packets it receives, and in theSSRC of senderfield of the RTCP SR, RR, RTPFB, or PSFB packets it receives. An RTP session counts as a multiparty session if more than one CNAME is used by those SSRCs, unless signaling says the session is to be handled as point to point, or RTCP reporting groups [MULTI-STREAM-OPT] are being used. If reporting groups are used, the session counts as point-to-point if the endpoint receives only a single reporting group. It counts as multiparty if multiple reporting groups are received, or if a mix of reporting groups and SSRCs that are not part of a reporting group is received. Endpoints MUST NOT decide whether a session is multiparty or point to point based on the type of connection (unicast or multicast) used, or on the number of SSRCs received. ๐ โโ๏ธ - Checking for an already-scheduled packet ๐: when checking whether there is already a scheduled compound RTCP packet containing feedback messages (Step 2 in Section 3.5.2 of [RFC4585]), that check MUST be done considering all local SSRCs.
- Early-mode permission slip ๐ซ: if an SSRC is not allowed to send an early RTCP packet, the feedback message MAY be queued for transmission as part of any early or regular scheduled transmission that can happen within the maximum useful lifetime of the feedback message (
T_max_fb_delay). This modifies the behavior in item 4a in Section 3.5.2 of [RFC4585].
The first bullet point above sets a rule for deciding whether an RTP session is point-to-point or multiparty. It's straightforward to implement, but it's known to sometimes misclassify sessions as multiparty. The known problems are:
- Endpoint with multiple synchronization contexts: an endpoint that is part of a point-to-point session can have multiple synchronization contexts, for example because it forwards an external media source into an interactive real-time conversation. In this case the classification treats the peer as two endpoints, even though one endpoint is actually in control of the RTP/RTCP transmission.
- Selective Forwarding Middlebox: the Selective Forwarding Middlebox (SFM) defined in Section 3.7 of [RFC7667] controls the transmission and configuration between itself and each peer endpoint individually. It also fully controls the RTCP packets forwarded between the individual legs. So this kind of middlebox is comparable to an RTP mixer, which uses its own SSRCs to mix or select the media it forwards, and it will be classified as a point-to-point RTP session by the rule above. ๐ซฃ
In the cases above, using RTCP reporting groups [MULTI-STREAM-OPT] is very reasonable. If that extension is used, an endpoint can indicate that the multitude of CNAMEs are actually under the control of a single endpoint or middlebox, by using only a single reporting group. ๐ง
The rules above will also classify some sessions as point to point when the endpoint is connected to an RTP mixer. For example, the mixer could act as a gateway to an RTP session based on Any Source Multicast for the endpoint in question. In most cases this is fine, though, because the RTP mixer separates the two parts of the session. It's then up to the mixer to act accordingly in each domain. ๐ธ
Finally, signaling mechanisms could be defined to override the rules in cases where they would produce the wrong classification. ๐
6. Adding and Removing SSRCs ๐ฆ
The set of SSRCs in a single RTP session can change over time, because the number of endpoints in the session changes, or because the number or type of RTP streams being sent changes. ๐
Every endpoint in an RTP session has at least one SSRC that it uses for RTCP reporting, and for sending media if it wants to. It can also have extra SSRCs, for sending extra media sources or for additional RTCP reporting. If the set of media sources being sent changes, the set of SSRCs being sent changes too. Changes in the media format or clock rate might also require changes to the set of SSRCs in use. An endpoint can also have more SSRCs than it has active RTP streams. It can send RTCP about SSRCs that aren't currently sending RTP data packets, so its peers know those SSRCs exist and already have the associated context in place (such as clock synchronization and an SDES CNAME). That way they can play out media as soon as the SSRCs become active. ๐ฌ
Below, we go through some things to think about when adding and removing RTP streams and their SSRCs.
6.1. Adding RTP Streams ๐ฑ
When an endpoint joins an RTP session, it can have zero, one, or more RTP streams it will send, or that it is ready to send. If it has no RTP stream it plans to send, it still needs an SSRC for sending RTCP feedback. If it will send one or more RTP streams, it needs the matching number of SSRC values. Other endpoints in the RTP session learn about the SSRCs an endpoint uses when it sends RTP and RTCP packets. SSRCs can also be signaled by non-RTP means (for example, [RFC5576]). Unless signaling restricts it, an endpoint can, at any time, send an additional RTP stream identified by a new SSRC. This might be tied to a signaling event, but that's outside the scope of this memo. Either way, the new SSRC becomes visible to the other endpoints in the session, because they all share the single SSRC space that comes with the definition of an RTP session. ๐
An endpoint that has never sent an RTP stream still has an SSRC that it uses for RTCP reporting. If that endpoint wants to start sending an RTP stream, it is RECOMMENDED that it use its existing SSRC for that stream. Otherwise the participant count in the RTP session goes up for no good reason, which leads to a longer RTCP reporting interval and larger RTCP reports due to cross reporting. ๐ If the endpoint wants to send more than one RTP stream, it needs to generate a new SSRC for the second and any subsequent RTP streams.
An endpoint that has previously stopped sending an RTP stream, and now wants to start a new one, generally can't reuse the existing SSRC. It often needs to generate a new one, because an SSRC cannot change media type (for example, audio to video) or RTP timestamp clock rate [RFC7160], and because the application might attach a particular meaning to the SSRC. ๐ (Note: an RTP stream can pause and restart using the same SSRC, as long as RTCP is sent for that SSRC during the pause. These rules only apply to new RTP streams that reuse an existing SSRC.)
6.2. Removing RTP Streams ๐๏ธ
An SSRC leaves an RTP session in one of two ways. When an endpoint stops sending RTP and RTCP packets using an SSRC, that SSRC eventually times out, as described in Section 6.3.5 of [RFC3550]. Or an SSRC can be explicitly removed from use by sending an RTCP BYE packet, as described in Section 6.3.7 of [RFC3550]. It is RECOMMENDED that SSRCs be removed from use by sending an RTCP BYE packet. Note that [RFC3550] says the RTCP BYE SHOULD be the last RTP/RTCP packet sent in the RTP session for an SSRC. If an endpoint needs to restart an RTP stream after sending an RTCP BYE for its SSRC, it needs to generate a new SSRC value for that stream. ๐
Sending an RTCP BYE is final, so endpoints need to figure out whether stopping an RTP stream is temporary or permanent. Temporarily pausing media on a particular RTP stream (SSRC) means keeping that SSRC as an active participant by continuing RTCP transmission for it. That way the media can resume right away, knowing the context is still in place. โธ๏ธ When transmission is permanently halting, a participant needs to send an RTCP BYE. That lets the other participants reclaim the RTCP bandwidth and clean up their state databases. ๐งน
โ ๏ธ An endpoint that stops transmitting all of its RTP streams but stays in the RTP session MUST maintain at least one SSRC for RTCP reporting and feedback. It can't send a BYE for every SSRC; it needs to keep at least one SSRC active. Because some feedback packets can be bound to a media type, there might be a need to maintain one SSRC per media type within the RTP session. An alternative is to create a new SSRC for RTCP reporting and feedback. However, to avoid the perception that an endpoint has dropped completely out of the RTP session, such a new SSRC ought to be established first, before terminating all the existing SSRCs. ๐ซถ
7. RTCP Considerations for Streams with Disparate Rates ๐
okay bestie, so every RTP session gets just one set of bandwidth settings ๐
That means the RTCP sender and receiver fractions (like the SDP b=RR: and b=RS: lines from [RFC3556]) and the RTP/AVPF profile settings from [RFC4585] (think trr-int) if you're using that profile, or its secure cousin RTP/SAVPF [RFC5124]. The result? The base RTCP reporting interval, before randomization, is the same for every sending SSRC in the session. Receiving SSRCs get the same base interval too, though it can be different from what the sending SSRCs pick. This one-size-fits-all interval can make RTCP reports go out way too often, or way too rarely, for what a particular stream actually needs ๐
Let's look at an example. Picture an audio flow sending at tens of kilobits per second, multiplexed into a session with a multi-megabit, high-quality video flow. If the session bandwidth is set based on the video rate, and you use the default RTCP bandwidth fraction of 5% of session bandwidth, the RTCP bandwidth will likely be bigger than the audio sending rate ๐ญ Now add the reduced minimum RTCP interval from Section 6.2 of [RFC3550]. That's great for video, where you want fast feedback on damaged I-frames. But with one uniform reporting interval for everyone, the audio sources could end up sending RTCP packets more often than their actual audio data packets. You can shrink this mismatch with careful tuning of the RTCP parameters, especially trr_int when RTP/AVPF is in use. It can't be avoided entirely though, because it's built into the RTCP timing rules themselves, and it hits every RTP session that mixes flows with wildly different bandwidths ๐
Different media rates or RTCP needs can also show up with SSRCs carrying the same media type. A super common case in multiparty calls is when a few video streams show up in high resolution while the rest are tiny low-res thumbnails, and voice activity decides who gets the big screen ๐ฌ Here the differences are in both the actual media rate and in which feedback messages might be needed. Another example is the purpose of the source itself. A camera pointed at the speaker is totally different from a document camera. The basic parameters that can differ here are frame-rate, acceptable end-to-end delay, and the Signal-to-Noise Ratio (SNR) fidelity of the image โจ These differences affect more than just the bitrates needed. They also change what transmission behaviors are possible, which repair mechanisms are usable, what feedback messages the control and repair need, what transmission requirements apply to those feedback messages, and how the RTP stream delivery gets monitored. Other similar scenarios can exist too.
Sending multiple media types in one RTP session means that session has more SSRCs than if each media type had its own session. For instance, if two participants each send an audio and a video RTP stream in a single session, that session has four SSRCs. If separate RTP sessions were used for audio and video, each of those two sessions would only have two SSRCs ๐ฆ So when you cram multiple RTP streams into one session, the SSRCs cross-report on each other more, since each one reports on every other SSRC in the session. That makes the RTCP reports bigger, which means they go out less often than they would have if separate sessions were used for the same RTCP bandwidth.
One more thing: when a session has multiple media types, the RTCP reception quality reports, feedback messages, and extended report blocks you're using might not apply to every media type ๐ Endpoints need to look at the media type of each SSRC, and only send or process the reports and feedback that actually apply to that SSRC and its media type. Signaling solutions might also struggle to indicate that a particular set of RTCP reports or feedback messages only applies to one media type within an RTP session.
So from an RTCP point of view, there are real advantages to using a separate RTP session for each media source, instead of stuffing multiple sources into one session. But those advantages are often outweighed by the need to reduce port use and to ease NAT/firewall traversal, which is exactly what combining media sources into one RTP session gets you ๐ The following sections dig deeper into some of the issues with using RTCP in sessions with multiple media sources.
7.1. Timing Out SSRCs ๐ง
Various issues have been identified with timing out SSRC values when you're sending multiple RTP streams in one RTP session. Let's get into them!
7.1.1. Problems with the RTP/AVPF T_rr_interval Parameter ๐ธ
RTP/AVPF has a method to stop regular RTCP reports from going out too often. It's described in Section 3.5.3 of [RFC4585], and it's controlled by the T_rr_interval parameter. Here's how it works: every time a regular RTCP report is sent, a new random value, T_rr_current_interval, is generated, drawn evenly in the range 0.5 to 1.5 times T_rr_interval. If a regular RTCP packet is about to go out sooner than T_rr_current_interval seconds after the previous regular RTCP packet, and there are no feedback messages to send, then that regular RTCP packet gets suppressed and the next regular RTCP packet is scheduled instead. T_rr_current_interval gets recalculated every time a regular RTCP packet is sent. The benefit of suppression is that it avoids wasting bandwidth when nothing needs frequent RTCP transmissions, but it still lets you use the configured bandwidth when feedback is needed โจ
Here's the catch though. This suppression mechanism skews the distribution of RTCP sending intervals compared to the regular reporting intervals ๐ The standard RTCP timing rules, including reconsideration and the compensation factor, make the gaps between RTCP packets skew toward the upper end of the range [0.5/1.21828, 1.5/1.21828]*Td, where Td is the deterministic calculated RTCP reporting interval. With Td = 5 s, that distribution covers [2.052 s, 6.156 s]. By comparison, the RTP/AVPF suppression rules act in a window that's 0.5 to 1.5 times T_rr_interval. For T_rr_interval = 5s, that's [2.5 s, 7.5 s].
This has a big effect: the time between consecutive RTCP packets when T_rr_interval suppression is in use can get really long ๐ญ The maximum gap between sending one regular RTCP packet and the next happens when T_rr_current_interval hits its maximum value, a regular RTCP packet gets suppressed at the end of the suppression period, and then the next regular RTCP packet is scheduled after its largest possible reporting interval. Taking the worst case of those two intervals gives a maximum time between two RTCP reports of 1.5*T_rr_interval + 1.5/1.21828*Td.
This can be really surprising when Td and T_rr_interval have the same value, meaning T_rr_interval is configured to match the regular RTCP reporting interval. You'd expect regular RTCP packets to follow their usual schedule while feedback packets can go out early. But because of the issue above, RTCP packets actually land in the range [0.5*Td, 2.731*Td] with a super non-uniform distribution, rather than the range [0.41*Td, 1.23*Td] you'd expect ๐ It's perhaps unexpected, but it isn't a problem in itself. The trouble starts when it's combined with packet loss, because then it raises the issue of premature timeout ๐ฌ
7.1.2. Avoiding Premature Timeout ๐
In RTP/AVP [RFC3550], the timeout behavior is simple: it's 5 times Td, where Td is calculated with a Tmin value of 5 seconds. Put differently, if the configured RTCP bandwidth allows an average RTCP reporting interval shorter than 5 seconds, the timeout is 25 seconds of no activity from the SSRC (RTP or RTCP). Otherwise, the timeout is 5 average reporting intervals.
RTP/AVPF [RFC4585] brings in different timeout behaviors depending on the value of T_rr_interval. When T_rr_interval is 0, it uses the same timeout calculation as RTP/AVP. But when T_rr_interval is non-zero, it replaces Tmin in the timeout calculation, most likely to speed up detection of timed-out SSRCs. Using a non-zero T_rr_interval does come with two consequences for RTP behavior, though ๐
First, because of suppression, the number of RTP and RTCP packets sent by an SSRC that isn't an active RTP sender can get super low, thanks to the issue discussed in Section 7.1.1. The RTCP packet interval can stretch as long as 2.73*Td, so during a 5*Td time period, an endpoint might actually only transmit a single RTCP packet ๐ Those long intervals mean fewer RTCP packets overall, to the point where losing just one RTCP packet can sometimes time out an SSRC.
Second, the RTP/AVPF changes to the timeout rules reduce robustness to misconfiguration. It's really common to use RTP/AVPF configured so RTCP packets go out frequently for rapid feedback, but that makes timeouts very sensitive to T_rr_interval ๐ซ For example, say two SSRCs are configured, one with T_rr_interval = 0.1 s and the other with T_rr_interval = 0.6 s. That small difference means the SSRC with the shorter T_rr_interval will time out the other one if it stops sending RTP packets, because the other RTCP reporting interval is more than five times its own. When RTP/AVP is used, or RTP/AVPF with T_rr_interval = 0, this is a non-issue. The timeout period is 25 s, and differences in configured RTCP bandwidth can only cause premature timeouts when reporting intervals are greater than 5 s and differ by a factor of five. To limit the scope for this kind of problematic misconfiguration, we define an update to the RTP/AVPF timeout rules in Section 7.1.4 ๐
7.1.3. Interoperability between RTP/AVP and RTP/AVPF ๐
okay bestie, picture this ๐ if RTP/AVP and RTP/AVPF endpoints (or their secure variants) are hanging out in the same RTP session, and the RTP/AVPF ones use a non-zero T_rr_interval that's significantly below 5 seconds, the RTP/AVPF crew could prematurely time out the SSRCs of the RTP/AVP endpoints ๐ญ. why? their RTCP timeout rules are different. flip it: if the RTP/AVPF endpoints use a T_rr_interval significantly larger than 5 seconds, now the RTP/AVP endpoints might time out the RTP/AVPF SSRCs ๐. total chaos, ngl.
Mixing endpoints on two different RTP profiles inside one RTP session is NOT RECOMMENDED ๐
โโ๏ธ. BUT if you're going to mix them anyway, and the RTP/AVPF endpoints haven't been updated to follow Section 7.1.4 of this memo, then the RTP/AVPF session SHOULD be configured with T_rr_interval = 4 seconds to avoid premature timeouts ๐ง.
Now the 4 seconds thing might look sus at first ๐. Intuitively you'd think it should be 5 seconds so both profiles use the same timeout period. But the behavior in Section 7.1.1 shows that real RTP/AVPF reporting intervals can run longer than expected ๐. So setting T_rr_interval = 4 seconds gives actual RTCP intervals close to what RTP/AVP expects, and that's what keeps everyone interoperable ๐ซถโจ.
7.1.4. Updated SSRC Timeout Rules ๐ธ
okay so, to keep things interoperable and avoid premature timeouts, every SSRC in an RTP session MUST use the same timeout behavior ๐ฅ. the problem? older specs are inconsistent about this ๐ค. so to fix the interoperability mess, this memo updates the timeout rules like so:
- For the
RTP/AVP,RTP/SAVP,RTP/AVPF, andRTP/SAVPFprofiles, the timeout interval SHALL be calculated using a multiplier of five times the deterministic RTCP reporting interval. In other words, the timeout interval SHALL be5*Td๐. - For the
RTP/AVP,RTP/SAVP,RTP/AVPF, andRTP/SAVPFprofiles, calculatingTdjust for the participant timeout SHALL be done using aTminvalue of 5 seconds, and NOT the reduced minimal interval ๐ โโ๏ธ. this is true even if the reduced minimum interval is what's used to calculate the RTCP packet transmission intervals ๐.
This changes things for the RTP/AVPF or RTP/SAVPF profiles whenever T_rr_interval != 0 ๐ฆ. Specifically, the first paragraph of Section 3.5.4 of [RFC4585] gets updated so the timeout calculation for RTP/AVPF entities uses Tmin instead of T_rr_interval ๐
.
7.2. Tuning RTCP Transmissions ๐
this subsection is all about what tuning you can do to reduce the downsides of the shared RTCP packet intervals ๐ง. first we'll look at the options for the RTP/AVP [RFC3551] profile, and then the extra tools RTP/AVPF [RFC4585] brings to the table โจ.
7.2.1. RTP/AVP and RTP/SAVP ๐
when you're using RTP/AVP or RTP/SAVP, your tuning options for the RTCP reporting intervals are pretty limited ๐ฎโ๐จ. you've got the RTCP sender and receiver bandwidth, and whether the minimum RTCP interval gets scaled according to the bandwidth. since the scheduling algorithm has both randomization AND reconsideration, you can't just calculate the expected average transmission interval with the formula for Td from Section 6.3.1 of [RFC3550] and call it a day ๐. BUT if you look at the inputs to that expression, plus the randomization and reconsideration rules, you can start to understand how the RTCP transmission interval actually behaves ๐.
Let's start with some basic observations:
- a. Unless the scaled minimum RTCP interval is used,
Tdbefore randomization and reconsideration can never be less thanTmin. The default value ofTminis 5 seconds ๐๏ธ. - b. If the scaled minimum RTCP interval is used,
Tdcan drop as low as360 divided by RTP Session bandwidth in kilobits per second. In SDP, the RTP session bandwidth gets signaled with ab=ASline ๐. An RTP Session bandwidth of 72 kbps gives you aTminof 5 seconds. An RTP session bandwidth of 360 kbps gives aTminof 1 second, of course ๐. And if you want aTminequal to once every frame for a 25 frame-per-second video stream, you need an RTP session bandwidth of 9 Mbps ๐ฌ. using theRTP/AVPForRTP/SAVPFprofile lets you send more frequent RTCP reports for the same bandwidth, which we'll get into below ๐. - c.
Tdscales with the number of SSRCs and the average size of the RTCP reports, so the overall RTCP bandwidth stays constant ๐. - d. The actual transmission interval for a given
Tdvalue lands in the range[0.5*Td/1.21828, 1.5*Td/1.21828], and the distribution is skewed ๐ณ. because of reconsideration, most of the probability mass sits aboveTd. for example, withTd = 5 s, the actual transmission interval is spread across[2.052 s, 6.156 s], and it tends toward the upper half ๐ซ . also, theTminparameter limits the value ofTdbefore randomization and reconsideration get applied, so the actual transmission interval can stretch belowTmintoo ๐ข.
Okay, so with all that, we can work out the number of SSRCs, n, that an RTP session can support when 5% of the session bandwidth is assigned to RTCP, while still keeping Td equal to Tmin ๐งฎ. this tells us how many RTP streams we can report on without the RTCP overhead getting out of hand ๐
. we make two assumptions to keep the math simple: all SSRCs are senders, and they all send compound RTCP packets made of an SR packet with n-1 report blocks, followed by an SDES packet holding a 16 octet CNAME value [RFC7022]. these packets vary in size between 54 and 798 octets depending on n, up to the maximum of 31 report blocks that an SR packet can carry ๐ฆ. if we plug this packet size and a 5% RTCP bandwidth fraction into the RTCP interval calculation in Section 6.3.1 of [RFC3550], and solve for the n that gives Td = Tmin for the scaled minimum interval, we get n=9 SSRCs ๐. (this holds regardless of the interval, because the reporting interval scales with the session bandwidth.) if you want to support more SSRCs without changing the scaled minimum interval, you'd need to raise the RTCP bandwidth fraction above 5%. changing the session bandwidth to a higher value would just lower Tmin instead ๐ค. still, if you stick with the default 5% RTCP allocation, bumping up that fraction means more SSRCs can be supported for a fixed Td target ๐.
so based on all this, when you're using the RTP/AVP or RTP/SAVP profile, the big limitation for rapid RTCP reporting in small unicast sessions is going to be the Tmin value ๐ค. the RTP session bandwidth configured for RTCP has to be high enough to hit the reporting goals your application has, while still following the rules for the scaled minimal RTCP interval ๐.
7.2.2. RTP/AVPF and RTP/SAVPF ๐ฆ
okay, when you use RTP/AVPF or RTP/SAVPF, you get a seriously powerful extra tool for tuning RTCP transmissions: the T_rr_interval parameter ๐. this parameter lets you have short RTCP reporting intervals, or alternatively, lets you send frequent RTCP feedback without sending frequent regular RTCP reports ๐ซถ.
using RTP/AVPF or RTP/SAVPF with T_rr_interval set above zero but below Tmin allows more frequent RTCP feedback than RTP/AVP or RTP/SAVP for the same RTCP bandwidth ๐. here's why: Tmin is set to zero after the initial RTCP report is sent, so the reporting interval for later packets gets determined by the usual bandwidth-based RTCP calculation, using Tmin=0 and T_rr_interval ๐ง . now you're no longer held back by the minimal interval (whether that's the default 5-second minimum or the reduced minimum interval). instead, the RTCP bandwidth and T_rr_interval are the things running the show, and that means faster feedback โก. apps that care about rapid regular RTCP feedback should seriously consider RTP/AVPF or RTP/SAVPF, even if they don't use the feedback features of that profile ๐
.
using RTP/AVPF or RTP/SAVPF means RTCP feedback packets can go out frequently without also needing regular RTCP reports to go out frequently ๐ฅฐ. T_rr_interval limits how often regular RTCP packets can be sent, while still letting RTCP feedback packets be sent ๐. say an app wants feedback packets for some RTP streams, like video, but doesn't want frequent regular reporting for other streams. it can set T_rr_interval to a value where regular reporting for both audio and video sits at a level that's acceptable for the audio ๐ง. then it can use feedback packets for the video reporting, and those feedback packets will include RTCP SR/RR packets unless reduced size RTCP feedback packets [RFC5506] are used ๐จ. this way, the available RTCP bandwidth gets spent on the feedback that's most useful to the app ๐.
using T_rr_interval still means you have to pick suitable values for the RTCP bandwidth ๐งฎ. honestly, it might make that choice even MORE important (oops, lowercase only for me ๐
), since it's more likely to affect RTCP behavior and performance than it is with RTP/AVP or RTP/SAVP, because there are fewer limitations on RTCP transmission ๐ซ .
when T_rr_interval is non-zero, there are some configurations you need to avoid ๐ซ. if the RTCP bandwidth you pick makes the Td value smaller than, but close to, T_rr_interval, then the actual regular RTCP packet transmission interval can get really large, as covered in Section 7.1.1 ๐ฑ. so for configurations where you want Td to be smaller than T_rr_interval, Td is RECOMMENDED to be targeted at values less than 1/4th of T_rr_interval. that makes the range become [0.5*T_rr_interval, 1.81*T_rr_interval] ๐ฏ.
with RTP/AVPF or RTP/SAVPF, setting T_rr_interval = 0 is useful too ๐. this gives a behavior where RTCP transmission is only limited by the bandwidth, meaning no Tmin limitations at all ๐โโ๏ธ. that allows more frequent regular RTCP reporting than RTP/AVP can ever reach. lots of RTCP configurations don't end up using all the bandwidth they've been given, but this one will use whatever it's been handed ๐ธ. also, the same behavior happens as long as T_rr_interval is smaller than 1/3 of Td, since that stops T_rr_interval from affecting the transmission ๐งโโ๏ธ.
last thing: there's no way to use different regular RTCP reporting intervals based on the media type or individual RTP stream, unless you put each type or stream in its own RTP session ๐๏ธ. so plan accordingly, bestie ๐.
8. Security Considerations ๐
okay, this part is serious, so let's go ๐ซก. when you use the secure RTP protocol (RTP/SAVP) [RFC3711], or the secure variant of the feedback profile (RTP/SAVPF) [RFC5124], the cryptographic context of a compound secure RTCP packet is the SSRC of the sender of the first RTCP (sub-)packet ๐. this could matter in some cases, especially for keying mechanisms like MIKEY [RFC3830] that allow per-SSRC keying ๐ณ.
otherwise, the standard security considerations of RTP still apply. sending multiple RTP streams from a single endpoint in a single RTP session doesn't seem to have different security consequences than sending the same number of RTP streams spread across different RTP sessions ๐ธ.
9. References โจ
The reference entries keep going in the next part ๐ง.
9.1. Normative References โจ
These are the must-reads, the ones you need in your back pocket before anything else makes sense ๐
- [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>. - [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>. - [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>. - [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>. - [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>. - [RFC5506] Johansson, I. and M. Westerlund, "Support for Reduced-Size Real-Time Transport Control Protocol (RTCP): Opportunities and Consequences", RFC 5506, DOI 10.17487/RFC5506, April 2009,
<http://www.rfc-editor.org/info/rfc5506>.
9.2. Informative References ๐
These ones are the background reading. Super useful for the deep dive, but you don't need them to get the main idea ๐ง
- [CLUE-FRAME] Duckworth, M., Ed., Pepperell, A., and S. Wenger, "Framework for Telepresence Multi-Streams", Work in Progress, draft-ietf-clue-framework-25, January 2016.
- [MULTI-RTP] Westerlund, M., Perkins, C., and J. Lennox, "Sending Multiple Types of Media in a Single RTP Session", Work in Progress, draft-ietf-avtcore-multi-media-rtp-session-13, December 2015.
- [MULTI-STREAM-OPT] Lennox, J., Westerlund, M., Wu, Q., and C. Perkins, "Sending Multiple Media Streams in a Single RTP Session: Grouping RTCP Reception Statistics and Other Feedback", Work in Progress, draft-ietf-avtcore-rtp-multi-stream-optimisation-12, March 2016.
- [RFC3390] Allman, M., Floyd, S., and C. Partridge, "Increasing TCP's Initial Window", RFC 3390, DOI 10.17487/RFC3390, October 2002,
<http://www.rfc-editor.org/info/rfc3390>. - [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>. - [RFC3556] Casner, S., "Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth", RFC 3556, DOI 10.17487/RFC3556, July 2003,
<http://www.rfc-editor.org/info/rfc3556>. - [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, DOI 10.17487/RFC3830, August 2004,
<http://www.rfc-editor.org/info/rfc3830>. - [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>. - [RFC5104] Wenger, S., Chandra, U., Westerlund, M., and B. Burman, "Codec Control Messages in the RTP Audio-Visual Profile with Feedback (AVPF)", RFC 5104, DOI 10.17487/RFC5104, February 2008,
<http://www.rfc-editor.org/info/rfc5104>. - [RFC5576] Lennox, J., Ott, J., and T. Schierl, "Source-Specific Media Attributes in the Session Description Protocol (SDP)", RFC 5576, DOI 10.17487/RFC5576, June 2009,
<http://www.rfc-editor.org/info/rfc5576>. - [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>. - [RFC6928] Chu, J., Dukkipati, N., Cheng, Y., and M. Mathis, "Increasing TCP's Initial Window", RFC 6928, DOI 10.17487/RFC6928, April 2013,
<http://www.rfc-editor.org/info/rfc6928>. - [RFC7022] Begen, A., Perkins, C., Wing, D., and E. Rescorla, "Guidelines for Choosing RTP Control Protocol (RTCP) Canonical Names (CNAMEs)", RFC 7022, DOI 10.17487/RFC7022, September 2013,
<http://www.rfc-editor.org/info/rfc7022>. - [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>. - [RFC7667] Westerlund, M. and S. Wenger, "RTP Topologies", RFC 7667, DOI 10.17487/RFC7667, November 2015,
<http://www.rfc-editor.org/info/rfc7667>. - [SDP-BUNDLE] Holmberg, C., Alvestrand, H., and C. Jennings, "Negotiating Media Multiplexing Using the Session Description Protocol (SDP)", Work in Progress, draft-ietf-mmusic-sdp-bundle-negotiation-36, October 2016.
- [Sim88] Westerlund, M., "SIMULATION RESULTS FOR MULTI-STREAM", IETF 88 Proceedings, November 2013,
<https://www.ietf.org/proceedings/88/slides/slides-88-avtcore-0.pdf>. - [Sim92] Westerlund, M., Lennox, J., Perkins, C., and Q. Wu, "Changes in RTP Multi-stream", IETF 92 Proceedings, March 2015,
<https://www.ietf.org/proceedings/92/slides/slides-92-avtcore-0.pdf>.
Acknowledgments ๐ซถ
The authors would like to give a big shoutout to Harald Alvestrand and everyone else who helped out with developing this document ๐
Authors' Addresses ๐๏ธ
Jonathan Lennox
Vidyo, Inc.
433 Hackensack Avenue
Seventh Floor
Hackensack, NJ 07601
United States of America
Email: jonathan@vidyo.com
Magnus Westerlund
Ericsson
Farogatan 2
SE-164 80 Kista
Sweden
Phone: +46 10 714 82 87
Email: magnus.westerlund@ericsson.com
Qin Wu
Huawei
101 Software Avenue, Yuhua District
Nanjing, Jiangsu 210012
China
Email: bill.wu@huawei.com
Colin Perkins
University of Glasgow
School of Computing Science
Glasgow G12 8QQ
United Kingdom
Email: csp@csperkins.org
That's the whole RFC, bestie! ๐โจ
๐ฆ where this page comes from
- ietf: rfc8108 2017-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms