idnits 2.17.1 draft-ietf-rtcweb-rtp-usage-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 22, 2012) is 4201 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-18) exists of draft-ietf-avtcore-rtp-circuit-breakers-00 == Outdated reference: A later version (-05) exists of draft-ietf-avtcore-srtp-encrypted-header-ext-02 == Outdated reference: A later version (-11) exists of draft-ietf-avtext-multiple-clock-rates-06 == Outdated reference: A later version (-11) exists of draft-ietf-rtcweb-audio-00 == Outdated reference: A later version (-19) exists of draft-ietf-rtcweb-overview-04 == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-security-03 == Outdated reference: A later version (-20) exists of draft-ietf-rtcweb-security-arch-05 -- Possible downref: Normative reference to a draft: ref. 'I-D.terriberry-avp-codecs' == Outdated reference: A later version (-07) exists of draft-westerlund-avtcore-transport-multiplexing-04 ** Obsolete normative reference: RFC 5285 (Obsoleted by RFC 8285) == Outdated reference: A later version (-16) exists of draft-ietf-rtcweb-use-cases-and-requirements-09 == Outdated reference: A later version (-03) exists of draft-westerlund-avtcore-multiplex-architecture-02 == Outdated reference: A later version (-02) exists of draft-westerlund-avtcore-rtp-topologies-update-01 Summary: 1 error (**), 0 flaws (~~), 12 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group C. Perkins 3 Internet-Draft University of Glasgow 4 Intended status: Standards Track M. Westerlund 5 Expires: April 25, 2013 Ericsson 6 J. Ott 7 Aalto University 8 October 22, 2012 10 Web Real-Time Communication (WebRTC): Media Transport and Use of RTP 11 draft-ietf-rtcweb-rtp-usage-05 13 Abstract 15 The Web Real-Time Communication (WebRTC) framework provides support 16 for direct interactive rich communication using audio, video, text, 17 collaboration, games, etc. between two peers' web-browsers. This 18 memo describes the media transport aspects of the WebRTC framework. 19 It specifies how the Real-time Transport Protocol (RTP) is used in 20 the WebRTC context, and gives requirements for which RTP features, 21 profiles, and extensions need to be supported. 23 Status of this Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on April 25, 2013. 40 Copyright Notice 42 Copyright (c) 2012 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 58 2. Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 4. WebRTC Use of RTP: Core Protocols . . . . . . . . . . . . . . 6 61 4.1. RTP and RTCP . . . . . . . . . . . . . . . . . . . . . . . 6 62 4.2. Choice of the RTP Profile . . . . . . . . . . . . . . . . 7 63 4.3. Choice of RTP Payload Formats . . . . . . . . . . . . . . 8 64 4.4. RTP Session Multiplexing . . . . . . . . . . . . . . . . . 8 65 4.5. RTP and RTCP Multiplexing . . . . . . . . . . . . . . . . 9 66 4.6. Reduced Size RTCP . . . . . . . . . . . . . . . . . . . . 10 67 4.7. Symmetric RTP/RTCP . . . . . . . . . . . . . . . . . . . . 10 68 4.8. Choice of RTP Synchronisation Source (SSRC) . . . . . . . 10 69 4.9. Generation of the RTCP Canonical Name (CNAME) . . . . . . 11 70 5. WebRTC Use of RTP: Extensions . . . . . . . . . . . . . . . . 11 71 5.1. Conferencing Extensions . . . . . . . . . . . . . . . . . 11 72 5.1.1. Full Intra Request (FIR) . . . . . . . . . . . . . . . 12 73 5.1.2. Picture Loss Indication (PLI) . . . . . . . . . . . . 12 74 5.1.3. Slice Loss Indication (SLI) . . . . . . . . . . . . . 13 75 5.1.4. Reference Picture Selection Indication (RPSI) . . . . 13 76 5.1.5. Temporal-Spatial Trade-off Request (TSTR) . . . . . . 13 77 5.1.6. Temporary Maximum Media Stream Bit Rate Request 78 (TMMBR) . . . . . . . . . . . . . . . . . . . . . . . 13 79 5.2. Header Extensions . . . . . . . . . . . . . . . . . . . . 14 80 5.2.1. Rapid Synchronisation . . . . . . . . . . . . . . . . 14 81 5.2.2. Client-to-Mixer Audio Level . . . . . . . . . . . . . 14 82 5.2.3. Mixer-to-Client Audio Level . . . . . . . . . . . . . 15 83 6. WebRTC Use of RTP: Improving Transport Robustness . . . . . . 15 84 6.1. Negative Acknowledgements and RTP Retransmission . . . . . 15 85 6.2. Forward Error Correction (FEC) . . . . . . . . . . . . . . 16 86 7. WebRTC Use of RTP: Rate Control and Media Adaptation . . . . . 16 87 7.1. Boundary Conditions and Circuit Breakers . . . . . . . . . 17 88 7.2. RTCP Limitations for Congestion Control . . . . . . . . . 18 89 7.3. Congestion Control Interoperability With Legacy Systems . 19 90 8. WebRTC Use of RTP: Performance Monitoring . . . . . . . . . . 19 91 9. WebRTC Use of RTP: Future Extensions . . . . . . . . . . . . . 20 92 10. Signalling Considerations . . . . . . . . . . . . . . . . . . 20 93 11. WebRTC API Considerations . . . . . . . . . . . . . . . . . . 21 94 11.1. API MediaStream to RTP Mapping . . . . . . . . . . . . . . 21 95 12. RTP Implementation Considerations . . . . . . . . . . . . . . 22 96 12.1. RTP Sessions and PeerConnection . . . . . . . . . . . . . 22 97 12.2. Multiple Sources . . . . . . . . . . . . . . . . . . . . . 24 98 12.3. Multiparty . . . . . . . . . . . . . . . . . . . . . . . . 24 99 12.4. SSRC Collision Detection . . . . . . . . . . . . . . . . . 25 100 12.5. Contributing Sources . . . . . . . . . . . . . . . . . . . 26 101 12.6. Media Synchronization . . . . . . . . . . . . . . . . . . 27 102 12.7. Multiple RTP End-points . . . . . . . . . . . . . . . . . 27 103 12.8. Simulcast . . . . . . . . . . . . . . . . . . . . . . . . 28 104 12.9. Differentiated Treatment of Flows . . . . . . . . . . . . 29 105 13. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 30 106 14. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 107 15. Security Considerations . . . . . . . . . . . . . . . . . . . 31 108 16. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 32 109 17. References . . . . . . . . . . . . . . . . . . . . . . . . . . 32 110 17.1. Normative References . . . . . . . . . . . . . . . . . . . 32 111 17.2. Informative References . . . . . . . . . . . . . . . . . . 35 112 Appendix A. Supported RTP Topologies . . . . . . . . . . . . . . 36 113 A.1. Point to Point . . . . . . . . . . . . . . . . . . . . . . 37 114 A.2. Multi-Unicast (Mesh) . . . . . . . . . . . . . . . . . . . 40 115 A.3. Mixer Based . . . . . . . . . . . . . . . . . . . . . . . 43 116 A.3.1. Media Mixing . . . . . . . . . . . . . . . . . . . . . 43 117 A.3.2. Media Switching . . . . . . . . . . . . . . . . . . . 46 118 A.3.3. Media Projecting . . . . . . . . . . . . . . . . . . . 49 119 A.4. Translator Based . . . . . . . . . . . . . . . . . . . . . 52 120 A.4.1. Transcoder . . . . . . . . . . . . . . . . . . . . . . 52 121 A.4.2. Gateway / Protocol Translator . . . . . . . . . . . . 53 122 A.4.3. Relay . . . . . . . . . . . . . . . . . . . . . . . . 55 123 A.5. End-point Forwarding . . . . . . . . . . . . . . . . . . . 59 124 A.6. Simulcast . . . . . . . . . . . . . . . . . . . . . . . . 60 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 61 127 1. Introduction 129 The Real-time Transport Protocol (RTP) [RFC3550] provides a framework 130 for delivery of audio and video teleconferencing data and other real- 131 time media applications. Previous work has defined the RTP protocol, 132 along with numerous profiles, payload formats, and other extensions. 133 When combined with appropriate signalling, these form the basis for 134 many teleconferencing systems. 136 The Web Real-Time communication (WebRTC) framework provides the 137 protocol building blocks to support direct, interactive, real-time 138 communication using audio, video, collaboration, games, etc., between 139 two peers' web-browsers. This memo describes how the RTP framework 140 is to be used in the WebRTC context. It proposes a baseline set of 141 RTP features that are to be implemented by all WebRTC-aware end- 142 points, along with suggested extensions for enhanced functionality. 144 The WebRTC overview [I-D.ietf-rtcweb-overview] outlines the complete 145 WebRTC framework, of which this memo is a part. 147 The structure of this memo is as follows. Section 2 outlines our 148 rationale in preparing this memo and choosing these RTP features. 149 Section 3 defines requirement terminology. Requirements for core RTP 150 protocols are described in Section 4 and suggested RTP extensions are 151 described in Section 5. Section 6 outlines mechanisms that can 152 increase robustness to network problems, while Section 7 describes 153 congestion control and rate adaptation mechanisms. The discussion of 154 mandated RTP mechanisms concludes in Section 8 with a review of 155 performance monitoring and network management tools that can be used 156 in the WebRTC context. Section 9 gives some guidelines for future 157 incorporation of other RTP and RTP Control Protocol (RTCP) extensions 158 into this framework. Section 10 describes requirements placed on the 159 signalling channel. Section 11 discusses the relationship between 160 features of the RTP framework and the WebRTC application programming 161 interface (API), and Section 12 discusses RTP implementation 162 considerations. This memo concludes with an appendix discussing 163 several different RTP Topologies, and how they affect the RTP 164 session(s) and various implementation details of possible realization 165 of central nodes. 167 2. Rationale 169 The RTP framework comprises the RTP data transfer protocol, the RTP 170 control protocol, and numerous RTP payload formats, profiles, and 171 extensions. This range of add-ons has allowed RTP to meet various 172 needs that were not envisaged by the original protocol designers, and 173 to support many new media encodings, but raises the question of what 174 extensions are to be supported by new implementations. The 175 development of the WebRTC framework provides an opportunity for us to 176 review the available RTP features and extensions, and to define a 177 common baseline feature set for all WebRTC implementations of RTP. 178 This builds on the past 15 years development of RTP to mandate the 179 use of extensions that have shown widespread utility, while still 180 remaining compatible with the wide installed base of RTP 181 implementations where possible. 183 Other RTP and RTCP extensions not discussed in this document can be 184 implemented by WebRTC end-points if they are beneficial for new use 185 cases. However, they are not necessary to address the WebRTC use 186 cases and requirements identified to date 187 [I-D.ietf-rtcweb-use-cases-and-requirements]. 189 While the baseline set of RTP features and extensions defined in this 190 memo is targeted at the requirements of the WebRTC framework, it is 191 expected to be broadly useful for other conferencing-related uses of 192 RTP. In particular, it is likely that this set of RTP features and 193 extensions will be appropriate for other desktop or mobile video 194 conferencing systems, or for room-based high-quality telepresence 195 applications. 197 3. Terminology 199 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 200 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 201 document are to be interpreted as described in [RFC2119]. The RFC 202 2119 interpretation of these key words applies only when written in 203 ALL CAPS. Lower- or mixed-case uses of these key words are not to be 204 interpreted as carrying special significance in this memo. 206 We define the following terms: 208 RTP Media Stream: A sequence of RTP packets, and associated RTCP 209 packets, using a single synchronisation source (SSRC) that 210 together carries part or all of the content of a specific Media 211 Type from a specific sender source within a given RTP session. 213 RTP Session: As defined by [RFC3550], the endpoints belonging to the 214 same RTP Session are those that share a single SSRC space. That 215 is, those endpoints can see an SSRC identifier transmitted by any 216 one of the other endpoints. An endpoint can see an SSRC either 217 directly in RTP and RTCP packets, or as a contributing source 218 (CSRC) in RTP packets from a mixer. The RTP Session scope is 219 hence decided by the endpoints' network interconnection topology, 220 in combination with RTP and RTCP forwarding strategies deployed by 221 endpoints and any interconnecting middle nodes. 223 WebRTC MediaStream: The MediaStream concept defined by the W3C in 224 the API. 226 Other terms are used according to their definitions from the RTP 227 Specification [RFC3550] and WebRTC overview 228 [I-D.ietf-rtcweb-overview] documents. 230 4. WebRTC Use of RTP: Core Protocols 232 The following sections describe the core features of RTP and RTCP 233 that need to be implemented, along with the mandated RTP profiles and 234 payload formats. Also described are the core extensions providing 235 essential features that all WebRTC implementations need to implement 236 to function effectively on today's networks. 238 4.1. RTP and RTCP 240 The Real-time Transport Protocol (RTP) [RFC3550] is REQUIRED to be 241 implemented as the media transport protocol for WebRTC. RTP itself 242 comprises two parts: the RTP data transfer protocol, and the RTP 243 control protocol (RTCP). RTCP is a fundamental and integral part of 244 RTP, and MUST be implemented in all WebRTC applications. 246 The following RTP and RTCP features are sometimes omitted in limited 247 functionality implementations of RTP, but are REQUIRED in all WebRTC 248 implementations: 250 o Support for use of multiple simultaneous SSRC values in a single 251 RTP session, including support for RTP end-points that send many 252 SSRC values simultaneously. 254 o Random choice of SSRC on joining a session; collision detection 255 and resolution for SSRC values (but see also Section 4.8). 257 o Support for reception of RTP data packets containing CSRC lists, 258 as generated by RTP mixers, and RTCP packets relating to CSRCs. 260 o Support for sending correct synchronization information in the 261 RTCP Sender Reports, to allow a receiver to implement lip-sync, 262 with RECOMMENDED support for the rapid RTP synchronisation 263 extensions (see Section 5.2.1). 265 o Support for sending and receiving RTCP SR, RR, SDES, and BYE 266 packet types, with OPTIONAL support for other RTCP packet types; 267 implementations MUST ignore unknown RTCP packet types. 269 o Support for multiple end-points in a single RTP session, and for 270 scaling the RTCP transmission interval according to the number of 271 participants in the session; support for randomised RTCP 272 transmission intervals to avoid synchronisation of RTCP reports; 273 support for RTCP timer reconsideration. 275 o Support for configuring the RTCP bandwidth as a fraction of the 276 media bandwidth, and for configuring the fraction of the RTCP 277 bandwidth allocated to senders, e.g., using the SDP "b=" line. 279 It is known that a significant number of legacy RTP implementations, 280 especially those targeted at VoIP-only systems, do not support all of 281 the above features, and in some cases do not support RTCP at all. 282 Implementers are advised to consider the requirements for graceful 283 degradation when interoperating with legacy implementations. 285 Other implementation considerations are discussed in Section 12. 287 4.2. Choice of the RTP Profile 289 The complete specification of RTP for a particular application domain 290 requires the choice of an RTP Profile. For WebRTC use, the "Extended 291 Secure RTP Profile for Real-time Transport Control Protocol (RTCP)- 292 Based Feedback (RTP/SAVPF)" [RFC5124] as extended by 293 [I-D.terriberry-avp-codecs] MUST be implemented. This builds on the 294 basic RTP/AVP profile [RFC3551], the RTP profile for RTCP-based 295 feedback (RTP/AVPF) [RFC4585], and the secure RTP profile (RTP/SAVP) 296 [RFC3711]. 298 The RTCP-based feedback extensions [RFC4585] are needed for the 299 improved RTCP timer model, that allows more flexible transmission of 300 RTCP packets in response to events, rather than strictly according to 301 bandwidth. This is vital for being able to report congestion events. 302 These extensions also save RTCP bandwidth, and will commonly only use 303 the full RTCP bandwidth allocation if there are many events that 304 require feedback. They are also needed to make use of the RTP 305 conferencing extensions discussed in Section 5.1. 307 Note: The enhanced RTCP timer model defined in the RTP/AVPF 308 profile is backwards compatible with legacy systems that implement 309 only the base RTP/AVP profile, given some constraints on parameter 310 configuration such as the RTCP bandwidth value and "trr-int" (the 311 most important factor for interworking with RTP/AVP end-points via 312 a gateway is to set the trr-int parameter to a value representing 313 4 seconds). 315 The secure RTP profile [RFC3711] is needed to provide media 316 encryption, integrity protection, replay protection and a limited 317 form of source authentication. WebRTC implementations MUST NOT send 318 packets using the basic RTP/AVP profile or the RTP/AVPF profile; they 319 MUST employ the full RTP/SAVPF profile to protect all RTP and RTCP 320 packets that are generated. The default and mandatory to implement 321 transforms listed in Section 5 of [RFC3711] SHALL apply. 323 Implementations MUST support DTLS-SRTP [RFC5764] for key-management. 324 Other key management schemes MAY be supported. 326 4.3. Choice of RTP Payload Formats 328 Implementations MUST follow the WebRTC Audio Codec and Processing 329 Requirements [I-D.ietf-rtcweb-audio] and SHOULD follow the updated 330 recommendations for audio codecs in the RTP/AVP Profile 331 [I-D.terriberry-avp-codecs]. Support for other audio codecs is 332 OPTIONAL. 334 (tbd: the mandatory to implement video codec is not yet decided) 336 Endpoints MAY signal support for multiple RTP payload formats, or 337 multiple configurations of a single RTP payload format, provided each 338 payload format uses a different RTP payload type number. An endpoint 339 that has signalled support for multiple RTP payload formats SHOULD 340 accept data in any of those payload formats at any time, unless it 341 has previously signalled limitations on its decoding capability. 342 This requirement is constrained if several media types are sent in 343 the same RTP session. In such a case, a source (SSRC) is restricted 344 to switching only between the RTP payload formats signalled for the 345 media type that is being sent by that source; see Section 4.4. To 346 support rapid rate adaptation by changing codec, RTP does not require 347 advance signalling for changes between RTP payload formats that were 348 signalled during session set-up. 350 An RTP sender that changes between two RTP payload types that use 351 different RTP clock rates MUST follow the recommendations in Section 352 4.1 of [I-D.ietf-avtext-multiple-clock-rates]. RTP receivers MUST 353 follow the recommendations in Section 4.3 of 354 [I-D.ietf-avtext-multiple-clock-rates], in order to support sources 355 that switch between clock rates in an RTP session (these 356 recommendations for receivers are backwards compatible with the case 357 where senders use only a single clock rate). 359 4.4. RTP Session Multiplexing 361 An association amongst a set of participants communicating with RTP 362 is known as an RTP session. A participant can be involved in 363 multiple RTP sessions at the same time. In a multimedia session, 364 each medium has typically been carried in a separate RTP session with 365 its own RTCP packets (i.e., one RTP session for the audio, with a 366 separate RTP session using a different transport address for the 367 video; if SDP is used, this corresponds to one RTP session for each 368 "m=" line in the SDP). WebRTC implementations of RTP are REQUIRED to 369 implement support for multimedia sessions in this way, for 370 compatibility with legacy systems. 372 In today's networks, however, with the widespread use of Network 373 Address/Port Translators (NAT/NAPT) and Firewalls (FW), it is 374 desirable to reduce the number of transport addresses used by real- 375 time media applications using RTP by combining multimedia traffic in 376 a single RTP session. (Details of how this is to be done are tbd, 377 but see [I-D.lennox-rtcweb-rtp-media-type-mux], 378 [I-D.holmberg-mmusic-sdp-bundle-negotiation] and 379 [I-D.westerlund-avtcore-multiplex-architecture].) Using a single RTP 380 session also effects the possibility for differentiated treatment of 381 media flows. This is further discussed in Section 12.9. 383 WebRTC implementations of RTP are REQUIRED to support multiplexing of 384 a multimedia session onto a single RTP session according to (tbd). 385 If such RTP session multiplexing is to be used, this MUST be 386 negotiated during the signalling phase. Support for multiple RTP 387 sessions over a single UDP flow as defined by 388 [I-D.westerlund-avtcore-transport-multiplexing] is RECOMMENDED/ 389 OPTIONAL. 391 (tbd: No consensus on the level of including support of Multiple RTP 392 sessions over a single UDP flow.) 394 4.5. RTP and RTCP Multiplexing 396 Historically, RTP and RTCP have been run on separate transport layer 397 addresses (e.g., two UDP ports for each RTP session, one port for RTP 398 and one port for RTCP). With the increased use of Network Address/ 399 Port Translation (NAPT) this has become problematic, since 400 maintaining multiple NAT bindings can be costly. It also complicates 401 firewall administration, since multiple ports need to be opened to 402 allow RTP traffic. To reduce these costs and session set-up times, 403 support for multiplexing RTP data packets and RTCP control packets on 404 a single port for each RTP session is REQUIRED, as specified in 405 [RFC5761]. For backwards compatibility, implementations are also 406 REQUIRED to support sending of RTP and RTCP to separate destination 407 ports. 409 Note that the use of RTP and RTCP multiplexed onto a single transport 410 port ensures that there is occasional traffic sent on that port, even 411 if there is no active media traffic. This can be useful to keep NAT 412 bindings alive, and is the recommend method for application level 413 keep-alives of RTP sessions [RFC6263]. 415 4.6. Reduced Size RTCP 417 RTCP packets are usually sent as compound RTCP packets, and [RFC3550] 418 requires that those compound packets start with an Sender Report (SR) 419 or Receiver Report (RR) packet. When using frequent RTCP feedback 420 messages under the RTP/AVPF Profile [RFC4585] these statistics are 421 not needed in every packet, and unnecessarily increase the mean RTCP 422 packet size. This can limit the frequency at which RTCP packets can 423 be sent within the RTCP bandwidth share. 425 To avoid this problem, [RFC5506] specifies how to reduce the mean 426 RTCP message size and allow for more frequent feedback. Frequent 427 feedback, in turn, is essential to make real-time applications 428 quickly aware of changing network conditions, and to allow them to 429 adapt their transmission and encoding behaviour. Support for sending 430 RTCP feedback packets as [RFC5506] non-compound packets is REQUIRED, 431 but MUST be negotiated using the signalling channel before use. For 432 backwards compatibility, implementations are also REQUIRED to support 433 the use of compound RTCP feedback packets if the remote endpoint does 434 not agree to the use of non-compound RTCP in the signalling exchange. 436 4.7. Symmetric RTP/RTCP 438 To ease traversal of NAT and firewall devices, implementations are 439 REQUIRED to implement and use Symmetric RTP [RFC4961]. This requires 440 that the IP address and port used for sending and receiving RTP and 441 RTCP packets are identical. The reasons for using symmetric RTP is 442 primarily to avoid issues with NAT and Firewalls by ensuring that the 443 flow is actually bi-directional and thus kept alive and registered as 444 flow the intended recipient actually wants. In addition, it saves 445 resources, specifically ports at the end-points, but also in the 446 network as NAT mappings or firewall state is not unnecessary bloated. 447 Also the amount of QoS state is reduced. 449 4.8. Choice of RTP Synchronisation Source (SSRC) 451 Implementations are REQUIRED to support signalled RTP SSRC values, 452 using the "a=ssrc:" SDP attribute defined in Sections 4.1 and 5 of 453 [RFC5576], and MUST also support the "previous-ssrc" source attribute 454 defined in Section 6.2 of [RFC5576]. Other attributes defined in 455 [RFC5576] MAY be supported. 457 Use of the "a=ssrc:" attribute is OPTIONAL. Implementations MUST 458 support random SSRC assignment, and MUST support SSRC collision 459 detection and resolution, both according to [RFC3550]. 461 4.9. Generation of the RTCP Canonical Name (CNAME) 463 The RTCP Canonical Name (CNAME) provides a persistent transport-level 464 identifier for an RTP endpoint. While the Synchronisation Source 465 (SSRC) identifier for an RTP endpoint can change if a collision is 466 detected, or when the RTP application is restarted, its RTCP CNAME is 467 meant to stay unchanged, so that RTP endpoints can be uniquely 468 identified and associated with their RTP media streams within a set 469 of related RTP sessions. For proper functionality, each RTP endpoint 470 needs to have a unique RTCP CNAME value. 472 The RTP specification [RFC3550] includes guidelines for choosing a 473 unique RTP CNAME, but these are not sufficient in the presence of NAT 474 devices. In addition, long-term persistent identifiers can be 475 problematic from a privacy viewpoint. Accordingly, support for 476 generating a short-term persistent RTCP CNAMEs following 477 [I-D.rescorla-avtcore-6222bis] is RECOMMENDED. 479 An WebRTC end-point MUST support reception of any CNAME that matches 480 the syntax limitations specified by the RTP specification [RFC3550] 481 and cannot assume that any CNAME will be chosen according to the form 482 suggested above. 484 5. WebRTC Use of RTP: Extensions 486 There are a number of RTP extensions that are either needed to obtain 487 full functionality, or extremely useful to improve on the baseline 488 performance, in the WebRTC application context. One set of these 489 extensions is related to conferencing, while others are more generic 490 in nature. The following subsections describe the various RTP 491 extensions mandated or suggested for use within the WebRTC context. 493 5.1. Conferencing Extensions 495 RTP is inherently a group communication protocol. Groups can be 496 implemented using a centralised server, multi-unicast, or using IP 497 multicast. While IP multicast was popular in early deployments, in 498 today's practice, overlay-based conferencing dominates, typically 499 using one or more central servers to connect endpoints in a star or 500 flat tree topology. These central servers can be implemented in a 501 number of ways as discussed in Appendix A, and in the memo on RTP 502 Topologies [I-D.westerlund-avtcore-rtp-topologies-update]. 504 As discussed in Section 3.7 of 505 [I-D.westerlund-avtcore-rtp-topologies-update], the use of a video 506 switching MCU makes the use of RTCP for congestion control, or any 507 type of quality reports, very problematic. Also, as discussed in 508 section 3.8 of [I-D.westerlund-avtcore-rtp-topologies-update], the 509 use of a content modifying MCU with RTCP termination breaks RTP loop 510 detection and removes the ability for receivers to identify active 511 senders. RTP Transport Translators (Topo-Translator) are not of 512 immediate interest to WebRTC, although the main difference compared 513 to point to point is the possibility of seeing multiple different 514 transport paths in any RTCP feedback. Accordingly, only Point to 515 Point (Topo-Point-to-Point), Multiple concurrent Point to Point 516 (Mesh) and RTP Mixers (Topo-Mixer) topologies are needed to achieve 517 the use-cases to be supported in WebRTC initially. These RECOMMENDED 518 topologies are expected to be supported by all WebRTC end-points 519 (these topologies require no special RTP-layer support in the end- 520 point if the RTP features mandated in this memo are implemented). 522 The RTP extensions described below to be used with centralised 523 conferencing -- where one RTP Mixer (e.g., a conference bridge) 524 receives a participant's RTP media streams and distributes them to 525 the other participants -- are not necessary for interoperability; an 526 RTP endpoint that does not implement these extensions will work 527 correctly, but might offer poor performance. Support for the listed 528 extensions will greatly improve the quality of experience and, to 529 provide a reasonable baseline quality, some these extensions are 530 mandatory to be supported by WebRTC end-points. 532 The RTCP conferencing extensions are defined in Extended RTP Profile 533 for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/ 534 AVPF) [RFC4585] and the "Codec Control Messages in the RTP Audio- 535 Visual Profile with Feedback (AVPF)" (CCM) [RFC5104] and are fully 536 usable by the Secure variant of this profile (RTP/SAVPF) [RFC5124]. 538 5.1.1. Full Intra Request (FIR) 540 The Full Intra Request is defined in Sections 3.5.1 and 4.3.1 of the 541 Codec Control Messages [RFC5104]. This message is used to make the 542 mixer request a new Intra picture from a participant in the session. 543 This is used when switching between sources to ensure that the 544 receivers can decode the video or other predictive media encoding 545 with long prediction chains. It is REQUIRED that WebRTC senders 546 understand the react to this feedback message since it greatly 547 improves the user experience when using centralised mixer-based 548 conferencing; support for sending the FIR message is OPTIONAL. 550 5.1.2. Picture Loss Indication (PLI) 552 The Picture Loss Indication is defined in Section 6.3.1 of the RTP/ 553 AVPF profile [RFC4585]. It is used by a receiver to tell the sending 554 encoder that it lost the decoder context and would like to have it 555 repaired somehow. This is semantically different from the Full Intra 556 Request above as there there could be multiple ways to fulfil the 557 request. It is REQUIRED that WebRTC senders understand and react to 558 this feedback message as a loss tolerance mechanism; receivers MAY 559 send PLI messages. 561 5.1.3. Slice Loss Indication (SLI) 563 The Slice Loss Indicator is defined in Section 6.3.2 of the RTP/AVPF 564 profile [RFC4585]. It is used by a receiver to tell the encoder that 565 it has detected the loss or corruption of one or more consecutive 566 macro blocks, and would like to have these repaired somehow. The use 567 of this feedback message is OPTIONAL as a loss tolerance mechanism. 569 5.1.4. Reference Picture Selection Indication (RPSI) 571 Reference Picture Selection Indication (RPSI) is defined in Section 572 6.3.3 of the RTP/AVPF profile [RFC4585]. Some video coding standards 573 allow the use of older reference pictures than the most recent one 574 for predictive coding. If such a codec is in used, and if the 575 encoder has learned about a loss of encoder-decoder synchronisation, 576 a known-as-correct reference picture can be used for future coding. 577 The RPSI message allows this to be signalled. Support for RPSI 578 messages is OPTIONAL. 580 5.1.5. Temporal-Spatial Trade-off Request (TSTR) 582 The temporal-spatial trade-off request and notification are defined 583 in Sections 3.5.2 and 4.3.2 of [RFC5104]. This request can be used 584 to ask the video encoder to change the trade-off it makes between 585 temporal and spatial resolution, for example to prefer high spatial 586 image quality but low frame rate. Support for TSTR requests and 587 notifications is OPTIONAL. 589 5.1.6. Temporary Maximum Media Stream Bit Rate Request (TMMBR) 591 This feedback message is defined in Sections 3.5.4 and 4.2.1 of the 592 Codec Control Messages [RFC5104]. This message and its notification 593 message are used by a media receiver to inform the sending party that 594 there is a current limitation on the amount of bandwidth available to 595 this receiver. This can be various reasons for this: for example, an 596 RTP mixer can use this message to limit the media rate of the sender 597 being forwarded by the mixer (without doing media transcoding) to fit 598 the bottlenecks existing towards the other session participants. It 599 is REQUIRED that this feedback message is supported. WebRTC senders 600 are REQUIRED to implement support for TMMBR messages, and MUST follow 601 bandwidth limitations set by a TMMBR message received for their SSRC. 602 The sending of TMMBR requests is OPTIONAL. 604 5.2. Header Extensions 606 The RTP specification [RFC3550] provides the capability to include 607 RTP header extensions containing in-band data, but the format and 608 semantics of the extensions are poorly specified. The use of header 609 extensions is OPTIONAL in the WebRTC context, but if they are used, 610 they MUST be formatted and signalled following the general mechanism 611 for RTP header extensions defined in [RFC5285], since this gives 612 well-defined semantics to RTP header extensions. 614 As noted in [RFC5285], the requirement from the RTP specification 615 that header extensions are "designed so that the header extension may 616 be ignored" [RFC3550] stands. To be specific, header extensions MUST 617 only be used for data that can safely be ignored by the recipient 618 without affecting interoperability, and MUST NOT be used when the 619 presence of the extension has changed the form or nature of the rest 620 of the packet in a way that is not compatible with the way the stream 621 is signalled (e.g., as defined by the payload type). Valid examples 622 might include metadata that is additional to the usual RTP 623 information. 625 5.2.1. Rapid Synchronisation 627 Many RTP sessions require synchronisation between audio, video, and 628 other content. This synchronisation is performed by receivers, using 629 information contained in RTCP SR packets, as described in the RTP 630 specification [RFC3550]. This basic mechanism can be slow, however, 631 so it is RECOMMENDED that the rapid RTP synchronisation extensions 632 described in [RFC6051] be implemented. The rapid synchronisation 633 extensions use the general RTP header extension mechanism [RFC5285], 634 which requires signalling, but are otherwise backwards compatible. 636 5.2.2. Client-to-Mixer Audio Level 638 The Client to Mixer Audio Level extension [RFC6464] is an RTP header 639 extension used by a client to inform a mixer about the level of audio 640 activity in the packet to which the header is attached. This enables 641 a central node to make mixing or selection decisions without decoding 642 or detailed inspection of the payload, reducing the complexity in 643 some types of central RTP nodes. It can also save decoding resources 644 in receivers, which can choose to decode only the most relevant RTP 645 media streams based on audio activity levels. 647 The Client-to-Mixer Audio Level [RFC6464] extension is RECOMMENDED to 648 be implemented. If it is implemented, it is REQUIRED that the header 649 extensions are encrypted according to 650 [I-D.ietf-avtcore-srtp-encrypted-header-ext] since the information 651 contained in these header extensions can be considered sensitive. 653 5.2.3. Mixer-to-Client Audio Level 655 The Mixer to Client Audio Level header extension [RFC6465] provides 656 the client with the audio level of the different sources mixed into a 657 common mix by a RTP mixer. This enables a user interface to indicate 658 the relative activity level of each session participant, rather than 659 just being included or not based on the CSRC field. This is a pure 660 optimisations of non critical functions, and is hence OPTIONAL to 661 implement. If it is implemented, it is REQUIRED that the header 662 extensions are encrypted according to 663 [I-D.ietf-avtcore-srtp-encrypted-header-ext] since the information 664 contained in these header extensions can be considered sensitive. 666 6. WebRTC Use of RTP: Improving Transport Robustness 668 There are some tools that can make RTP flows robust against Packet 669 loss and reduce the impact on media quality. However, they all add 670 extra bits compared to a non-robust stream. These extra bits need to 671 be considered, and the aggregate bit-rate MUST be rate-controlled. 672 Thus, improving robustness might require a lower base encoding 673 quality, but has the potential to deliver that quality with fewer 674 errors. The mechanisms described in the following sub-sections can 675 be used to improve tolerance to packet loss. 677 6.1. Negative Acknowledgements and RTP Retransmission 679 As a consequence of supporting the RTP/SAVPF profile, implementations 680 will support negative acknowledgements (NACKs) for RTP data packets 681 [RFC4585]. This feedback can be used to inform a sender of the loss 682 of particular RTP packets, subject to the capacity limitations of the 683 RTCP feedback channel. A sender can use this information to optimise 684 the user experience by adapting the media encoding to compensate for 685 known lost packets, for example. 687 Senders are REQUIRED to understand the Generic NACK message defined 688 in Section 6.2.1 of [RFC4585], but MAY choose to ignore this feedback 689 (following Section 4.2 of [RFC4585]). Receivers MAY send NACKs for 690 missing RTP packets; [RFC4585] provides some guidelines on when to 691 send NACKs. It is not expected that a receiver will send a NACK for 692 every lost RTP packet, rather it needs to consider the cost of 693 sending NACK feedback, and the importance of the lost packet, to make 694 an informed decision on whether it is worth telling the sender about 695 a packet loss event. 697 The RTP Retransmission Payload Format [RFC4588] offers the ability to 698 retransmit lost packets based on NACK feedback. Retransmission needs 699 to be used with care in interactive real-time applications to ensure 700 that the retransmitted packet arrives in time to be useful, but can 701 be effective in environments with relatively low network RTT (an RTP 702 sender can estimate the RTT to the receivers using the information in 703 RTCP SR and RR packets). The use of retransmissions can also 704 increase the forward RTP bandwidth, and can potentially worsen the 705 problem if the packet loss was caused by network congestion. We 706 note, however, that retransmission of an important lost packet to 707 repair decoder state can have lower cost than sending a full intra 708 frame. It is not appropriate to blindly retransmit RTP packets in 709 response to a NACK. The importance of lost packets and the 710 likelihood of them arriving in time to be useful needs to be 711 considered before RTP retransmission is used. 713 Receivers are REQUIRED to implement support for RTP retransmission 714 packets [RFC4588]. Senders MAY send RTP retransmission packets in 715 response to NACKs if the RTP retransmission payload format has been 716 negotiated for the session, and if the sender believes it is useful 717 to send a retransmission of the packet(s) referenced in the NACK. An 718 RTP sender is not expected to retransmit every NACKed packet. 720 6.2. Forward Error Correction (FEC) 722 The use of Forward Error Correction (FEC) can provide an effective 723 protection against some degree of packet loss, at the cost of steady 724 bandwidth overhead. There are several FEC schemes that are defined 725 for use with RTP. Some of these schemes are specific to a particular 726 RTP payload format, others operate across RTP packets and can be used 727 with any payload format. It needs to be noted that using redundant 728 encoding or FEC will lead to increased play out delay, which needs to 729 be considered when choosing the redundancy or FEC formats and their 730 respective parameters. 732 If an RTP payload format negotiated for use in a WebRTC session 733 supports redundant transmission or FEC as a standard feature of that 734 payload format, then that support MAY be used in the WebRTC session, 735 subject to any appropriate signalling. 737 There are several block-based FEC schemes that are designed for use 738 with RTP independent of the chosen RTP payload format. At the time 739 of this writing there is no consensus on which, if any, of these FEC 740 schemes is appropriate for use in the WebRTC context. Accordingly, 741 this memo makes no recommendation on the choice of block-based FEC 742 for WebRTC use. 744 7. WebRTC Use of RTP: Rate Control and Media Adaptation 746 WebRTC will be used in heterogeneous network environments using a 747 variety set of link technologies, including both wired and wireless 748 links, to interconnect potentially large groups of users around the 749 world. As a result, the network paths between users can have widely 750 varying one-way delays, available bit-rates, load levels, and traffic 751 mixtures. Individual end-points can open one or more RTP sessions to 752 each participant in a WebRTC conference, and there can be several 753 participants. Each of these RTP sessions can contain different types 754 of media, and the type of media, bit rate, and number of flows can be 755 highly asymmetric. Non-RTP traffic can share the network paths RTP 756 flows. Since the network environment is not predictable or stable, 757 WebRTC endpoints MUST ensure that the RTP traffic they generate can 758 adapt to match changes in the available network capacity. 760 The quality of experience for users of WebRTC implementation is very 761 dependent on effective adaptation of the media to the limitations of 762 the network. End-points have to be designed so they do not transmit 763 significantly more data than the network path can support, except for 764 very short time periods, otherwise high levels of network packet loss 765 or delay spikes will occur, causing media quality degradation. The 766 limiting factor on the capacity of the network path might be the link 767 bandwidth, or it might be competition with other traffic on the link 768 (this can be non-WebRTC traffic, traffic due to other WebRTC flows, 769 or even competition with other WebRTC flows in the same session). 771 An effective media congestion control algorithm is therefore an 772 essential part of the WebRTC framework. However, at the time of this 773 writing, there is no standard congestion control algorithm that can 774 be used for interactive media applications such as WebRTC flows. 775 Some requirements for congestion control algorithms for WebRTC 776 sessions are discussed in [I-D.jesup-rtp-congestion-reqs], and it is 777 expected that a future version of this memo will mandate the use of a 778 congestion control algorithm that satisfies these requirements. 780 7.1. Boundary Conditions and Circuit Breakers 782 In the absence of a concrete congestion control algorithm, all WebRTC 783 implementations MUST implement the RTP circuit breaker algorithm that 784 is in described [I-D.ietf-avtcore-rtp-circuit-breakers]. The circuit 785 breaker defines a conservative boundary condition for safe operation, 786 chosen such that applications that trigger the circuit breaker will 787 almost certainly be causing severe network congestion. Any future 788 RTP congestion control algorithms are expected to operate within the 789 envelope allowed by the circuit breaker. 791 The session establishment signalling will also necessarily establish 792 boundaries to which the media bit-rate will conform. The choice of 793 media codecs provides upper- and lower-bounds on the supported bit- 794 rates that the application can utilise to provide useful quality, and 795 the packetization choices that exist. In addition, the signalling 796 channel can establish maximum media bit-rate boundaries using the SDP 797 "b=AS:" or "b=CT:" lines, and the RTP/AVPF Temporary Maximum Media 798 Stream Bit Rate (TMMBR) Requests (see Section 5.1.6 of this memo). 799 The combination of media codec choice and signalled bandwidth limits 800 SHOULD be used to limit traffic based on known bandwidth limitations, 801 for example the capacity of the edge links, to the extent possible. 803 7.2. RTCP Limitations for Congestion Control 805 Experience with the congestion control algorithms of TCP [RFC5681], 806 TFRC [RFC5348], and DCCP [RFC4341], [RFC4342], [RFC4828], has shown 807 that feedback on packet arrivals needs to be sent roughly once per 808 round trip time. We note that the real-time media traffic might not 809 have to adapt to changing path conditions as rapidly as needed for 810 the elastic applications TCP was designed for, but frequent feedback 811 is still needed to allow the congestion control algorithm to track 812 the path dynamics. 814 The total RTCP bandwidth is limited in its transmission rate to a 815 fraction of the RTP traffic (by default 5%). RTCP packets are larger 816 than, e.g., TCP ACKs (even when non-compound RTCP packets are used). 817 The RTP media stream bit rate thus limits the maximum feedback rate 818 as a function of the mean RTCP packet size. 820 Interactive communication might not be able to afford waiting for 821 packet losses to occur to indicate congestion, because an increase in 822 play out delay due to queuing (most prominent in wireless networks) 823 can easily lead to packets being dropped due to late arrival at the 824 receiver. Therefore, more sophisticated cues might need to be 825 reported -- to be defined in a suitable congestion control framework 826 as noted above -- which, in turn, increase the report size again. 827 For example, different RTCP XR report blocks (jointly) provide the 828 necessary details to implement a variety of congestion control 829 algorithms, but the (compound) report size grows quickly. 831 In group communication, the share of RTCP bandwidth needs to be 832 shared by all group members, reducing the capacity and thus the 833 reporting frequency per node. 835 Example: assuming 512 kbit/s video yields 3200 bytes/s RTCP 836 bandwidth, split across two entities in a point-to-point session. An 837 endpoint could thus send a report of 100 bytes about every 70ms or 838 for every other frame in a 30 fps video. 840 7.3. Congestion Control Interoperability With Legacy Systems 842 There are legacy implementations that do not implement RTCP, and 843 hence do not provide any congestion feedback. Congestion control 844 cannot be performed with these end-points. WebRTC implementations 845 that need to interwork with such end-points MUST limit their 846 transmission to a low rate, equivalent to a VoIP call using a low 847 bandwidth codec, that is unlikely to cause any significant 848 congestion. 850 When interworking with legacy implementations that support RTCP using 851 the RTP/AVP profile [RFC3551], congestion feedback is provided in 852 RTCP RR packets every few seconds. Implementations that have to 853 interwork with such end-points MUST ensure that they keep within the 854 RTP circuit breaker [I-D.ietf-avtcore-rtp-circuit-breakers] 855 constraints to limit the congestion they can cause. 857 If a legacy end-point supports RTP/AVPF, this enables negotiation of 858 important parameters for frequent reporting, such as the "trr-int" 859 parameter, and the possibility that the end-point supports some 860 useful feedback format for congestion control purpose such as TMMBR 861 [RFC5104]. Implementations that have to interwork with such end- 862 points MUST ensure that they stay within the RTP circuit breaker 863 [I-D.ietf-avtcore-rtp-circuit-breakers] constraints to limit the 864 congestion they can cause, but might find that they can achieve 865 better congestion response depending on the amount of feedback that 866 is available. 868 8. WebRTC Use of RTP: Performance Monitoring 870 RTCP does contains a basic set of RTP flow monitoring metrics like 871 packet loss and jitter. There are a number of extensions that could 872 be included in the set to be supported. However, in most cases which 873 RTP monitoring that is needed depends on the application, which makes 874 it difficult to select which to include when the set of applications 875 is very large. 877 Exposing some metrics in the WebRTC API needs to be considered 878 allowing the application to gather the measurements of interest. 879 However, security implications for the different data sets exposed 880 will need to be considered in this. 882 (tbd: If any RTCP XR metrics need to be added is still an open 883 question, but possible to extend at a later stage) 885 9. WebRTC Use of RTP: Future Extensions 887 It is possible that the core set of RTP protocols and RTP extensions 888 specified in this memo will prove insufficient for the future needs 889 of WebRTC applications. In this case, future updates to this memo 890 MUST be made following the Guidelines for Writers of RTP Payload 891 Format Specifications [RFC2736] and Guidelines for Extending the RTP 892 Control Protocol [RFC5968], and SHOULD take into account any future 893 guidelines for extending RTP and related protocols that have been 894 developed. 896 Authors of future extensions are urged to consider the wide range of 897 environments in which RTP is used when recommending extensions, since 898 extensions that are applicable in some scenarios can be problematic 899 in others. Where possible, the WebRTC framework will adopt RTP 900 extensions that are of general utility, to enable easy implementation 901 of a gateway to other applications using RTP, rather than adopt 902 mechanisms that are narrowly targeted at specific WebRTC use cases. 904 10. Signalling Considerations 906 RTP is built with the assumption of an external signalling channel 907 that can be used to configure the RTP sessions and their features. 908 The basic configuration of an RTP session consists of the following 909 parameters: 911 RTP Profile: The name of the RTP profile to be used in session. The 912 RTP/AVP [RFC3551] and RTP/AVPF [RFC4585] profiles can interoperate 913 on basic level, as can their secure variants RTP/SAVP [RFC3711] 914 and RTP/SAVPF [RFC5124]. The secure variants of the profiles do 915 not directly interoperate with the non-secure variants, due to the 916 presence of additional header fields in addition to any 917 cryptographic transformation of the packet content. As WebRTC 918 requires the usage of the RTP/SAVPF profile this can be inferred 919 as there is only a single profile, but in SDP this is still 920 information that has to be signalled. Interworking functions 921 might transform this into RTP/SAVP for a legacy use case by 922 indicating to the WebRTC end-point a RTP/SAVPF end-point and 923 limiting the usage of the a=rtcp attribute to indicate a trr-int 924 value of 4 seconds. 926 Transport Information: Source and destination IP address(s) and 927 ports for RTP and RTCP MUST be signalled for each RTP session. In 928 WebRTC these transport addresses will be provided by ICE that 929 signals candidates and arrives at nominated candidate address 930 pairs. If RTP and RTCP multiplexing [RFC5761] is to be used, such 931 that a single port is used for RTP and RTCP flows, this MUST be 932 signalled (see Section 4.5). If several RTP sessions are to be 933 multiplexed onto a single transport layer flow, this MUST also be 934 signalled (see Section 4.4). 936 RTP Payload Types, media formats, and media format 937 parameters: The mapping between media type names (and hence the RTP 938 payload formats to be used) and the RTP payload type numbers MUST 939 be signalled. Each media type MAY also have a number of media 940 type parameters that MUST also be signalled to configure the codec 941 and RTP payload format (the "a=fmtp:" line from SDP). 943 RTP Extensions: The RTP extensions to be used SHOULD be agreed upon, 944 including any parameters for each respective extension. At the 945 very least, this will help avoiding using bandwidth for features 946 that the other end-point will ignore. But for certain mechanisms 947 there is requirement for this to happen as interoperability 948 failure otherwise happens. 950 RTCP Bandwidth: Support for exchanging RTCP Bandwidth values to the 951 end-points will be necessary. This SHALL be done as described in 952 "Session Description Protocol (SDP) Bandwidth Modifiers for RTP 953 Control Protocol (RTCP) Bandwidth" [RFC3556], or something 954 semantically equivalent. This also ensures that the end-points 955 have a common view of the RTCP bandwidth, this is important as too 956 different view of the bandwidths can lead to failure to 957 interoperate. 959 These parameters are often expressed in SDP messages conveyed within 960 an offer/answer exchange. RTP does not depend on SDP or on the 961 offer/answer model, but does require all the necessary parameters to 962 be agreed upon, and provided to the RTP implementation. We note that 963 in the WebRTC context it will depend on the signalling model and API 964 how these parameters need to be configured but they will be need to 965 either set in the API or explicitly signalled between the peers. 967 11. WebRTC API Considerations 969 The following sections describe how the WebRTC API features map onto 970 the RTP mechanisms described in this memo. 972 11.1. API MediaStream to RTP Mapping 974 The WebRTC API and its media function have the concept of a WebRTC 975 MediaStream that consists of zero or more tracks. A track is an 976 individual stream of media from any type of media source like a 977 microphone or a camera, but also conceptual sources, like a audio mix 978 or a video composition, are possible. The tracks within a WebRTC 979 MediaStream are expected to be synchronized. 981 A track correspond to the media received with one particular SSRC. 982 There might be additional SSRCs associated with that SSRC, like for 983 RTP retransmission or Forward Error Correction. However, one SSRC 984 will identify an RTP media stream and its timing. 986 As a result, a WebRTC MediaStream is a collection of SSRCs carrying 987 the different media included in the synchronised aggregate. 988 Therefore, also the synchronization state associated with the 989 included SSRCs are part of concept. It is important to consider that 990 there can be multiple different WebRTC MediaStreams containing a 991 given Track (SSRC). To avoid unnecessary duplication of media at the 992 transport level in such cases, a need arises for a binding defining 993 which WebRTC MediaStreams a given SSRC is associated with at the 994 signalling level. 996 A proposal for how the binding between WebRTC MediaStreams and SSRC 997 can be done is specified in "Cross Session Stream Identification in 998 the Session Description Protocol" [I-D.alvestrand-rtcweb-msid]. 1000 (tbd: This text needs to be improved and achieved consensus on. 1001 Interim meeting in June 2012 shows large differences in opinions.) 1003 12. RTP Implementation Considerations 1005 The following provide some guidance on the implementation of the RTP 1006 features described in this memo. 1008 This section discusses RTP functionality that is part of the RTP 1009 standard, needed by decisions made, or to enable use cases raised and 1010 their motivations. This discussion is from an WebRTC end-point 1011 perspective. It will occasionally talk about central nodes, but as 1012 this specification is for an end-point, this is where the focus lies. 1013 For more discussion on the central nodes and details about RTP 1014 topologies please see Appendix A. 1016 The section will touch on the relation with certain RTP/RTCP 1017 extensions, but will focus on the RTP core functionality. The 1018 definition of what functionalities and the level of requirement on 1019 implementing it is defined in Section 2. 1021 12.1. RTP Sessions and PeerConnection 1023 An RTP session is an association among RTP nodes, which have one 1024 common SSRC space. An RTP session can include any number of end- 1025 points and nodes sourcing, sinking, manipulating or reporting on the 1026 RTP media streams being sent within the RTP session. A 1027 PeerConnection being a point-to-point association between an end- 1028 point and another node. That peer node can be both an end-point or 1029 centralized processing node of some type; thus, the RTP session can 1030 terminate immediately on the far end of the PeerConnection, but it 1031 might also continue as further discussed below in Multiparty 1032 (Section 12.3) and Multiple RTP End-points (Section 12.7). 1034 A PeerConnection can contain one or more RTP session depending on how 1035 it is setup and how many UDP flows it uses. A common usage has been 1036 to have one RTP session per media type, e.g. one for audio and one 1037 for video, each sent over different UDP flows. However, the default 1038 usage in WebRTC will be to use one RTP session for all media types. 1039 This usage then uses only one UDP flow, as also RTP and RTCP 1040 multiplexing is mandated (Section 4.5). However, for legacy 1041 interworking and network prioritization (Section 12.9) based on 1042 flows, a WebRTC end-point needs to support a mode of operation where 1043 one RTP session per media type is used. Currently, each RTP session 1044 has to use its own UDP flow. Discussions are ongoing if a solution 1045 enabling multiple RTP sessions over a single UDP flow, see 1046 Section 4.4. 1048 The multi-unicast- or mesh-based multi-party topology (Figure 1) is a 1049 good example for this section as it concerns the relation between RTP 1050 sessions and PeerConnections. In this topology, each participant 1051 sends individual unicast RTP/UDP/IP flows to each of the other 1052 participants using independent PeerConnections in a full mesh. This 1053 topology has the benefit of not requiring central nodes. The 1054 downside is that it increases the used bandwidth at each sender by 1055 requiring one copy of the RTP media streams for each participant that 1056 are part of the same session beyond the sender itself. Hence, this 1057 topology is limited to scenarios with few participants unless the 1058 media is very low bandwidth. 1060 +---+ +---+ 1061 | A |<---->| B | 1062 +---+ +---+ 1063 ^ ^ 1064 \ / 1065 \ / 1066 v v 1067 +---+ 1068 | C | 1069 +---+ 1071 Figure 1: Multi-unicast 1073 The multi-unicast topology could be implemented as a single RTP 1074 session, spanning multiple peer-to-peer transport layer connections, 1075 or as several pairwise RTP sessions, one between each pair of peers. 1076 To maintain a coherent mapping between the relation between RTP 1077 sessions and PeerConnections we recommend that one implements this as 1078 individual RTP sessions. The only downside is that end-point A will 1079 not learn of the quality of any transmission happening between B and 1080 C based on RTCP. This has not been seen as a significant downside as 1081 no one has yet seen a clear need for why A would need to know about 1082 the B's and C's communication. An advantage of using separate RTP 1083 sessions is that it enables using different media bit-rates to the 1084 different peers, thus not forcing B to endure the same quality 1085 reductions if there are limitations in the transport from A to C as C 1086 will. 1088 12.2. Multiple Sources 1090 A WebRTC end-point might have multiple cameras, microphones or audio 1091 inputs and thus a single end-point can source multiple RTP media 1092 streams of the same media type concurrently. Even if an end-point 1093 does not have multiple media sources of the same media type it has to 1094 support transmission using multiple SSRCs concurrently in the same 1095 RTP session. This is due to the requirement on an WebRTC end-point 1096 to support multiple media types in one RTP session. For example, one 1097 audio and one video source can result in the end-point sending with 1098 two different SSRCs in the same RTP session. As multi-party 1099 conferences are supported, as discussed below in Section 12.3, a 1100 WebRTC end-point will need to be capable of receiving, decoding and 1101 play out multiple RTP media streams of the same type concurrently. 1103 tbd: Are any mechanism needed to signal limitations in the number of 1104 active SSRC that an end-point can handle? 1106 12.3. Multiparty 1108 There are numerous situations and clear use cases for WebRTC 1109 supporting RTP sessions supporting multi-party. This can be realized 1110 in a number of ways using a number of different implementation 1111 strategies. In the following, the focus is on the different set of 1112 WebRTC end-point requirements that arise from different sets of 1113 multi-party topologies. 1115 The multi-unicast mesh (Figure 1)-based multi-party topology 1116 discussed above provides a non-centralized solution but can incur a 1117 heavy tax on the end-points' outgoing paths. It can also consume 1118 large amount of encoding resources if each outgoing stream is 1119 specifically encoded. If an encoding is transmitted to multiple 1120 parties, as in some implementations of the mesh case, a requirement 1121 on the end-point becomes to be able to create RTP media streams 1122 suitable for multiple destinations requirements. These requirements 1123 can both be dependent on transport path and the different end-points 1124 preferences related to play out of the media. 1126 +---+ +------------+ +---+ 1127 | A |<---->| |<---->| B | 1128 +---+ | | +---+ 1129 | Mixer | 1130 +---+ | | +---+ 1131 | C |<---->| |<---->| D | 1132 +---+ +------------+ +---+ 1134 Figure 2: RTP Mixer with Only Unicast Paths 1136 A Mixer (Figure 2) is an RTP end-point that optimizes the 1137 transmission of RTP media streams from certain perspectives, either 1138 by only sending some of the received RTP media stream to any given 1139 receiver or by providing a combined RTP media stream out of a set of 1140 contributing streams. There are various methods of implementation as 1141 discussed in Appendix A.3. A common aspect is that these central 1142 nodes can use a number of tools to control the media encoding 1143 provided by a WebRTC end-point. This includes functions like 1144 requesting breaking the encoding chain and have the encoder produce a 1145 so called Intra frame. Another is limiting the bit-rate of a given 1146 stream to better suit the mixer view of the multiple down-streams. 1147 Others are controlling the most suitable frame-rate, picture 1148 resolution, the trade-off between frame-rate and spatial quality. 1150 A mixer gets a significant responsibility to correctly perform 1151 congestion control, source identification, manage synchronization 1152 while providing the application with suitable media optimizations. 1154 Mixers also need to be trusted nodes when it comes to security as it 1155 manipulates either RTP or the media itself before sending it on 1156 towards the end-point(s), thus they need to be able to decrypt and 1157 then encrypt it before sending it out. 1159 12.4. SSRC Collision Detection 1161 The RTP standard [RFC3550] requires any RTP implementation to have 1162 support for detecting and handling SSRC collisions, i.e., resolve the 1163 conflict when two different end-points use the same SSRC value. This 1164 requirement also applies to WebRTC end-points. There are several 1165 scenarios where SSRC collisions can occur. 1167 In a point-to-point session where each SSRC is associated with either 1168 of the two end-points and where the main media carrying SSRC 1169 identifier will be announced in the signalling channel, a collision 1170 is less likely to occur due to the information about used SSRCs 1171 provided by Source-Specific SDP Attributes [RFC5576]. Still if both 1172 end-points start uses an new SSRC identifier prior to having 1173 signalled it to the peer and received acknowledgement on the 1174 signalling message, there can be collisions. The Source-Specific SDP 1175 Attributes [RFC5576] contains no mechanism to resolve SSRC collisions 1176 or reject a end-points usage of an SSRC. 1178 There could also appear SSRC values that are not signalled. This is 1179 more likely than it appears as certain RTP functions need extra SSRCs 1180 to provide functionality related to another (the "main") SSRC, for 1181 example, SSRC multiplexed RTP retransmission [RFC4588]. In those 1182 cases, an end-point can create a new SSRC that strictly doesn't need 1183 to be announced over the signalling channel to function correctly on 1184 both RTP and PeerConnection level. 1186 The more likely case for SSRC collision is that multiple end-points 1187 in a multiparty conference create new sources and signals those 1188 towards the central server. In cases where the SSRC/CSRC are 1189 propagated between the different end-points from the central node 1190 collisions can occur. 1192 Another scenario is when the central node manages to connect an end- 1193 point's PeerConnection to another PeerConnection the end-point 1194 already has, thus forming a loop where the end-point will receive its 1195 own traffic. While is is clearly considered a bug, it is important 1196 that the end-point is able to recognise and handle the case when it 1197 occurs. 1199 12.5. Contributing Sources 1201 Contributing Sources (CSRC) is a functionality in the RTP header that 1202 allows an RTP node to combine media packets from multiple sources 1203 into one and to identify which sources yielded the result. For 1204 WebRTC end-points, supporting contributing sources is trivial. The 1205 set of CSRCs is provided in a given RTP packet. This information can 1206 then be exposed to the applications using some form of API, possibly 1207 a mapping back into WebRTC MediaStream identities to avoid having to 1208 expose two name spaces and the handling of SSRC collision handling to 1209 the JavaScript. 1211 (tbd: does the API need to provide the ability to add a CSRC list to 1212 an outgoing packet? this is only useful if the sender is mixing 1213 content) 1215 There are also at least one extension that depends on the CSRC list 1216 being used: the Mixer-to-client audio level [RFC6465], which enhances 1217 the information provided by the CSRC to actual energy levels for 1218 audio for each contributing source. 1220 12.6. Media Synchronization 1222 When an end-point sends media from more than one media source, it 1223 needs to consider if (and which of) these media sources are to be 1224 synchronized. In RTP/RTCP, synchronisation is provided by having a 1225 set of RTP media streams be indicated as coming from the same 1226 synchronisation context and logical end-point by using the same CNAME 1227 identifier. 1229 The next provision is that the internal clocks of all media sources, 1230 i.e., what drives the RTP timestamp, can be correlated to a system 1231 clock that is provided in RTCP Sender Reports encoded in an NTP 1232 format. By correlating all RTP timestamps to a common system clock 1233 for all sources, the timing relation of the different RTP media 1234 streams, also across multiple RTP sessions can be derived at the 1235 receiver and, if desired, the streams can be synchronized. The 1236 requirement is for the media sender to provide the correlation 1237 information; it is up to the receiver to use it or not. 1239 12.7. Multiple RTP End-points 1241 Some usages of RTP beyond the recommend topologies result in that an 1242 WebRTC end-point sending media in an RTP session out over a single 1243 PeerConnection will receive receiver reports from multiple RTP 1244 receivers. Note that receiving multiple receiver reports is expected 1245 because any RTP node that has multiple SSRCs has to report to the 1246 media sender. The difference here is that they are multiple nodes, 1247 and thus will likely have different path characteristics. 1249 RTP Mixers can create a situation where an end-point experiences a 1250 situation in-between a session with only two end-points and multiple 1251 end-points. Mixers are expected to not forward RTCP reports 1252 regarding RTP media streams across themselves. This is due to the 1253 difference in the RTP media streams provided to the different end- 1254 points. The original media source lacks information about a mixer's 1255 manipulations prior to sending it the different receivers. This 1256 scenario also results in that an end-point's feedback or requests 1257 goes to the mixer. When the mixer can't act on this by itself, it is 1258 forced to go to the original media source to fulfil the receivers 1259 request. This will not necessarily be explicitly visible any RTP and 1260 RTCP traffic, but the interactions and the time to complete them will 1261 indicate such dependencies. 1263 The topologies in which an end-point receives receiver reports from 1264 multiple other end-points are the centralized relay, multicast and an 1265 end-point forwarding an RTP media stream. Having multiple RTP nodes 1266 receive an RTP flow and send reports and feedback about it has 1267 several impacts. As previously discussed (Section 12.3) any codec 1268 control and rate control needs to be capable of merging the 1269 requirements and preferences to provide a single best encoding 1270 according to the situation RTP media stream. Specifically, when it 1271 comes to congestion control it needs to be capable of identifying the 1272 different end-points to form independent congestion state information 1273 for each different path. 1275 Providing source authentication in multi-party scenarios is a 1276 challenge. In the mixer-based topologies, end-points source 1277 authentication is based on, firstly, verifying that media comes from 1278 the mixer by cryptographic verification and, secondly, trust in the 1279 mixer to correctly identify any source towards the end-point. In RTP 1280 sessions where multiple end-points are directly visible to an end- 1281 point, all end-points will have knowledge about each others' master 1282 keys, and can thus inject packets claimed to come from another end- 1283 point in the session. Any node performing relay can perform non- 1284 cryptographic mitigation by preventing forwarding of packets that 1285 have SSRC fields that came from other end-points before. For 1286 cryptographic verification of the source SRTP would require 1287 additional security mechanisms, like TESLA for SRTP [RFC4383]. 1289 12.8. Simulcast 1291 This section discusses simulcast in the meaning of providing a node, 1292 for example a Mixer, with multiple different encoded versions of the 1293 same media source. In the WebRTC context, this could be accomplished 1294 in two ways. One is to establish multiple PeerConnection all being 1295 feed the same set of WebRTC MediaStreams. Another method is to use 1296 multiple WebRTC MediaStreams that are differently configured when it 1297 comes to the media parameters. This would result in that multiple 1298 different RTP Media Streams (SSRCs) being in used with different 1299 encoding based on the same media source (camera, microphone). 1301 When intending to use simulcast it is important that this is made 1302 explicit so that the end-points don't automatically try to optimize 1303 away the different encodings and provide a single common version. 1304 Thus, some explicit indications that the intent really is to have 1305 different media encodings is likely needed. It is to be noted that 1306 it might be a central node, rather than an WebRTC end-point that 1307 would benefit from receiving simulcast media sources. 1309 tbd: How to perform simulcast needs to be determined and the 1310 appropriate API or signalling for its usage needs to be defined. 1312 12.9. Differentiated Treatment of Flows 1314 There are use cases for differentiated treatment of RTP media 1315 streams. Such differentiation can happen at several places in the 1316 system. First of all is the prioritization within the end-point 1317 sending the media, which controls, both which RTP media streams that 1318 will be sent, and their allocation of bit-rate out of the current 1319 available aggregate as determined by the congestion control. 1321 Secondly, the network can prioritize packet flows, including RTP 1322 media streams. Typically, differential treatment includes two steps, 1323 the first being identifying whether an IP packet belongs to a class 1324 that has to be treated differently, the second the actual mechanism 1325 to prioritize packets. This is done according to three methods; 1327 DiffServ: The end-point marks a packet with a DiffServ code point to 1328 indicate to the network that the packet belongs to a particular 1329 class. 1331 Flow based: Packets that need to be given a particular treatment are 1332 identified using a combination of IP and port address. 1334 Deep Packet Inspection: A network classifier (DPI) inspects the 1335 packet and tries to determine if the packet represents a 1336 particular application and type that is to be prioritized. 1338 With the exception of DiffServ both flow based and DPI have issues 1339 with running multiple media types and flows on a single UDP flow, 1340 especially when combined with data transport (SCTP/DTLS). DPI has 1341 issues because multiple types of flows are aggregated and thus it 1342 becomes more difficult to analyse them. The flow-based 1343 differentiation will provide the same treatment to all packets within 1344 the flow, i.e., relative prioritization is not possible. Moreover, 1345 if the resources are limited it might not be possible to provide 1346 differential treatment compared to best-effort for all the flows in a 1347 WebRTC application. 1349 When flow-based differentiation is available the WebRTC application 1350 needs to know about it so that it can provide the separation of the 1351 RTP media streams onto different UDP flows to enable a more granular 1352 usage of flow based differentiation. 1354 DiffServ assumes that either the end-point or a classifier can mark 1355 the packets with an appropriate DSCP so that the packets are treated 1356 according to that marking. If the end-point is to mark the traffic 1357 two requirements arise in the WebRTC context: 1) The WebRTC 1358 application or browser has to know which DSCP to use and that it can 1359 use them on some set of RTP media streams. 2) The information needs 1360 to be propagated to the operating system when transmitting the 1361 packet. These issues are discussed in DSCP and other packet markings 1362 for RTCWeb QoS [I-D.ietf-rtcweb-qos]. 1364 tbd: The model for providing differentiated treatment needs to be 1365 evolved. Most of this is not the responsibility of this memo. 1366 However, this memo could include: 1368 1. How can the application can prioritize MediaStreamTracks 1369 differently in the API? 1371 2. How MediaStreamTrack prioritization maps to the RTP level, and 1372 what type of marking behaviour can occur on the RTP media stream 1373 and its datagram? 1375 13. Open Issues 1377 This section contains a summary of the open issues or to be done 1378 things noted in the document: 1380 1. Need to add references to the RTP payload format for the Video 1381 Codec chosen in Section 4.3. 1383 2. The methods and solutions for RTP multiplexing over a single 1384 transport is not yet finalized in Section 4.4. 1386 3. RTP congestion control algorithms will probably require some 1387 feedback information to be conveyed in RTCP. Are the tools that 1388 are mandated by this memo sufficient, or do we need additional 1389 information? 1391 4. RTP congestion control could be implementing using either a 1392 sender-based algorithm or a receiver-based algorithm. To ensure 1393 interoperability, does this memo need to mandate which end is in 1394 charge of congestion control for a path? 1396 5. Still open if any RTCP XR performance metrics are needed, as 1397 discussed in Section 8. 1399 6. The API mapping to RTP level concepts has to be agreed and 1400 documented in Section 11. 1402 7. An open question if any requirements are needed to agree and 1403 limit the number of simultaneously used media sources (SSRCs) 1404 within an RTP session. See Section 12.2. 1406 8. Is an API needed for expressing any application level media 1407 mixing of an RTP media stream so that the correct CSRC list can 1408 be set as discussed in Section 12.5? 1410 9. The method for achieving simulcast of a media source has to be 1411 decided as discussed in Section 12.8. 1413 10. Possible documentation of what support for differentiated 1414 treatment that are needed on RTP level as the API and the 1415 network level specification matures as discussed in 1416 Section 12.9. 1418 11. Editing of Appendix A to remove redundancy between this and the 1419 update of RTP Topologies 1420 [I-D.westerlund-avtcore-rtp-topologies-update]. 1422 14. IANA Considerations 1424 This memo makes no request of IANA. 1426 Note to RFC Editor: this section is to be removed on publication as 1427 an RFC. 1429 15. Security Considerations 1431 The security considerations for the WebRTC framework are described in 1432 [I-D.ietf-rtcweb-security]. The overall security architecture for 1433 WebRTC is described in [I-D.ietf-rtcweb-security-arch]. 1435 The security considerations of the RTP specification, the RTP/SAVPF 1436 profile, and the various RTP/RTCP extensions and RTP payload formats 1437 that form the complete protocol suite described in this memo apply. 1438 We do not believe there are any new security considerations resulting 1439 from the combination of these various protocol extensions. 1441 The Extended Secure RTP Profile for Real-time Transport Control 1442 Protocol (RTCP)-Based Feedback [RFC5124] (RTP/SAVPF) provides 1443 handling of fundamental issues by offering confidentiality, integrity 1444 and partial source authentication. A mandatory to implement media 1445 security solution is (tbd). 1447 tbd: Privacy concerns, and the generation of untraceable CNAMEs, are 1448 under discussion. 1450 The guidelines in [RFC6562] apply when using variable bit rate (VBR) 1451 audio codecs, e.g., Opus or the Mixer audio level header extensions. 1453 16. Acknowledgements 1455 The authors would like to thank Harald Alvestrand, Cary Bran, Charles 1456 Eckel and Cullen Jennings for valuable feedback. 1458 17. References 1460 17.1. Normative References 1462 [I-D.holmberg-mmusic-sdp-bundle-negotiation] 1463 Holmberg, C. and H. Alvestrand, "Multiplexing Negotiation 1464 Using Session Description Protocol (SDP) Port Numbers", 1465 draft-holmberg-mmusic-sdp-bundle-negotiation-00 (work in 1466 progress), October 2011. 1468 [I-D.ietf-avtcore-rtp-circuit-breakers] 1469 Perkins, C. and V. Singh, "RTP Congestion Control: Circuit 1470 Breakers for Unicast Sessions", 1471 draft-ietf-avtcore-rtp-circuit-breakers-00 (work in 1472 progress), October 2012. 1474 [I-D.ietf-avtcore-srtp-encrypted-header-ext] 1475 Lennox, J., "Encryption of Header Extensions in the Secure 1476 Real-Time Transport Protocol (SRTP)", 1477 draft-ietf-avtcore-srtp-encrypted-header-ext-02 (work in 1478 progress), July 2012. 1480 [I-D.ietf-avtext-multiple-clock-rates] 1481 Petit-Huguenin, M. and G. Zorn, "Support for Multiple 1482 Clock Rates in an RTP Session", 1483 draft-ietf-avtext-multiple-clock-rates-06 (work in 1484 progress), October 2012. 1486 [I-D.ietf-rtcweb-audio] 1487 Valin, J. and C. Bran, "WebRTC Audio Codec and Processing 1488 Requirements", draft-ietf-rtcweb-audio-00 (work in 1489 progress), September 2012. 1491 [I-D.ietf-rtcweb-overview] 1492 Alvestrand, H., "Overview: Real Time Protocols for Brower- 1493 based Applications", draft-ietf-rtcweb-overview-04 (work 1494 in progress), June 2012. 1496 [I-D.ietf-rtcweb-security] 1497 Rescorla, E., "Security Considerations for RTC-Web", 1498 draft-ietf-rtcweb-security-03 (work in progress), 1499 June 2012. 1501 [I-D.ietf-rtcweb-security-arch] 1502 Rescorla, E., "RTCWEB Security Architecture", 1503 draft-ietf-rtcweb-security-arch-05 (work in progress), 1504 October 2012. 1506 [I-D.lennox-rtcweb-rtp-media-type-mux] 1507 Rosenberg, J. and J. Lennox, "Multiplexing Multiple Media 1508 Types In a Single Real-Time Transport Protocol (RTP) 1509 Session", draft-lennox-rtcweb-rtp-media-type-mux-00 (work 1510 in progress), October 2011. 1512 [I-D.rescorla-avtcore-6222bis] 1513 Rescorla, E. and A. Begen, "Guidelines for Choosing RTP 1514 Control Protocol (RTCP) Canonical Names (CNAMEs)", 1515 draft-rescorla-avtcore-6222bis-00 (work in progress), 1516 October 2012. 1518 [I-D.terriberry-avp-codecs] 1519 Terriberry, T., "Update to Recommended Codecs for the AVP 1520 RTP Profile", draft-terriberry-avp-codecs-00 (work in 1521 progress), August 2012. 1523 [I-D.westerlund-avtcore-transport-multiplexing] 1524 Westerlund, M. and C. Perkins, "Multiple RTP Sessions on a 1525 Single Lower-Layer Transport", 1526 draft-westerlund-avtcore-transport-multiplexing-04 (work 1527 in progress), October 2012. 1529 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1530 Requirement Levels", BCP 14, RFC 2119, March 1997. 1532 [RFC2736] Handley, M. and C. Perkins, "Guidelines for Writers of RTP 1533 Payload Format Specifications", BCP 36, RFC 2736, 1534 December 1999. 1536 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 1537 Jacobson, "RTP: A Transport Protocol for Real-Time 1538 Applications", STD 64, RFC 3550, July 2003. 1540 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 1541 Video Conferences with Minimal Control", STD 65, RFC 3551, 1542 July 2003. 1544 [RFC3556] Casner, S., "Session Description Protocol (SDP) Bandwidth 1545 Modifiers for RTP Control Protocol (RTCP) Bandwidth", 1546 RFC 3556, July 2003. 1548 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 1550 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 1551 RFC 3711, March 2004. 1553 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 1554 "Extended RTP Profile for Real-time Transport Control 1555 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 1556 July 2006. 1558 [RFC4588] Rey, J., Leon, D., Miyazaki, A., Varsa, V., and R. 1559 Hakenberg, "RTP Retransmission Payload Format", RFC 4588, 1560 July 2006. 1562 [RFC4961] Wing, D., "Symmetric RTP / RTP Control Protocol (RTCP)", 1563 BCP 131, RFC 4961, July 2007. 1565 [RFC5104] Wenger, S., Chandra, U., Westerlund, M., and B. Burman, 1566 "Codec Control Messages in the RTP Audio-Visual Profile 1567 with Feedback (AVPF)", RFC 5104, February 2008. 1569 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 1570 Real-time Transport Control Protocol (RTCP)-Based Feedback 1571 (RTP/SAVPF)", RFC 5124, February 2008. 1573 [RFC5285] Singer, D. and H. Desineni, "A General Mechanism for RTP 1574 Header Extensions", RFC 5285, July 2008. 1576 [RFC5506] Johansson, I. and M. Westerlund, "Support for Reduced-Size 1577 Real-Time Transport Control Protocol (RTCP): Opportunities 1578 and Consequences", RFC 5506, April 2009. 1580 [RFC5761] Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 1581 Control Packets on a Single Port", RFC 5761, April 2010. 1583 [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer 1584 Security (DTLS) Extension to Establish Keys for the Secure 1585 Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. 1587 [RFC6051] Perkins, C. and T. Schierl, "Rapid Synchronisation of RTP 1588 Flows", RFC 6051, November 2010. 1590 [RFC6464] Lennox, J., Ivov, E., and E. Marocco, "A Real-time 1591 Transport Protocol (RTP) Header Extension for Client-to- 1592 Mixer Audio Level Indication", RFC 6464, December 2011. 1594 [RFC6465] Ivov, E., Marocco, E., and J. Lennox, "A Real-time 1595 Transport Protocol (RTP) Header Extension for Mixer-to- 1596 Client Audio Level Indication", RFC 6465, December 2011. 1598 [RFC6562] Perkins, C. and JM. Valin, "Guidelines for the Use of 1599 Variable Bit Rate Audio with Secure RTP", RFC 6562, 1600 March 2012. 1602 17.2. Informative References 1604 [I-D.alvestrand-rtcweb-msid] 1605 Alvestrand, H., "Cross Session Stream Identification in 1606 the Session Description Protocol", 1607 draft-alvestrand-rtcweb-msid-02 (work in progress), 1608 May 2012. 1610 [I-D.ietf-avt-srtp-ekt] 1611 Wing, D., McGrew, D., and K. Fischer, "Encrypted Key 1612 Transport for Secure RTP", draft-ietf-avt-srtp-ekt-03 1613 (work in progress), October 2011. 1615 [I-D.ietf-rtcweb-qos] 1616 Dhesikan, S., Druta, D., Jones, P., and J. Polk, "DSCP and 1617 other packet markings for RTCWeb QoS", 1618 draft-ietf-rtcweb-qos-00 (work in progress), October 2012. 1620 [I-D.ietf-rtcweb-use-cases-and-requirements] 1621 Holmberg, C., Hakansson, S., and G. Eriksson, "Web Real- 1622 Time Communication Use-cases and Requirements", 1623 draft-ietf-rtcweb-use-cases-and-requirements-09 (work in 1624 progress), June 2012. 1626 [I-D.jesup-rtp-congestion-reqs] 1627 Jesup, R. and H. Alvestrand, "Congestion Control 1628 Requirements For Real Time Media", 1629 draft-jesup-rtp-congestion-reqs-00 (work in progress), 1630 March 2012. 1632 [I-D.westerlund-avtcore-multiplex-architecture] 1633 Westerlund, M., Burman, B., Perkins, C., and H. 1634 Alvestrand, "Guidelines for using the Multiplexing 1635 Features of RTP", 1636 draft-westerlund-avtcore-multiplex-architecture-02 (work 1637 in progress), July 2012. 1639 [I-D.westerlund-avtcore-rtp-topologies-update] 1640 Westerlund, M. and S. Wenger, "RTP Topologies", 1641 draft-westerlund-avtcore-rtp-topologies-update-01 (work in 1642 progress), October 2012. 1644 [RFC4341] Floyd, S. and E. Kohler, "Profile for Datagram Congestion 1645 Control Protocol (DCCP) Congestion Control ID 2: TCP-like 1646 Congestion Control", RFC 4341, March 2006. 1648 [RFC4342] Floyd, S., Kohler, E., and J. Padhye, "Profile for 1649 Datagram Congestion Control Protocol (DCCP) Congestion 1650 Control ID 3: TCP-Friendly Rate Control (TFRC)", RFC 4342, 1651 March 2006. 1653 [RFC4383] Baugher, M. and E. Carrara, "The Use of Timed Efficient 1654 Stream Loss-Tolerant Authentication (TESLA) in the Secure 1655 Real-time Transport Protocol (SRTP)", RFC 4383, 1656 February 2006. 1658 [RFC4828] Floyd, S. and E. Kohler, "TCP Friendly Rate Control 1659 (TFRC): The Small-Packet (SP) Variant", RFC 4828, 1660 April 2007. 1662 [RFC5348] Floyd, S., Handley, M., Padhye, J., and J. Widmer, "TCP 1663 Friendly Rate Control (TFRC): Protocol Specification", 1664 RFC 5348, September 2008. 1666 [RFC5576] Lennox, J., Ott, J., and T. Schierl, "Source-Specific 1667 Media Attributes in the Session Description Protocol 1668 (SDP)", RFC 5576, June 2009. 1670 [RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion 1671 Control", RFC 5681, September 2009. 1673 [RFC5968] Ott, J. and C. Perkins, "Guidelines for Extending the RTP 1674 Control Protocol (RTCP)", RFC 5968, September 2010. 1676 [RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for 1677 Keeping Alive the NAT Mappings Associated with RTP / RTP 1678 Control Protocol (RTCP) Flows", RFC 6263, June 2011. 1680 Appendix A. Supported RTP Topologies 1682 RTP supports both unicast and group communication, with participants 1683 being connected using wide range of transport-layer topologies. Some 1684 of these topologies involve only the end-points, while others use RTP 1685 translators and mixers to provide in-network processing. Properties 1686 of some RTP topologies are discussed in 1687 [I-D.westerlund-avtcore-rtp-topologies-update], and we further 1688 describe those expected to be useful for WebRTC in the following. We 1689 also goes into important RTP session aspects that the topology or 1690 implementation variant can place on a WebRTC end-point. 1692 This section includes RTP topologies beyond the RECOMMENDED ones. 1694 This in an attempt to highlight the differences and the in many case 1695 small differences in implementation to support a larger set of 1696 possible topologies. 1698 (tbd: This section needs reworking and clearer relation to 1699 [I-D.westerlund-avtcore-rtp-topologies-update].) 1701 A.1. Point to Point 1703 The point-to-point RTP topology (Figure 3) is the simplest scenario 1704 for WebRTC applications. This is going to be very common for user to 1705 user calls. 1707 +---+ +---+ 1708 | A |<------->| B | 1709 +---+ +---+ 1711 Figure 3: Point to Point 1713 This being the basic one lets use the topology to high-light a couple 1714 of details that are common for all RTP usage in the WebRTC context. 1715 First is the intention to multiplex RTP and RTCP over the same UDP- 1716 flow. Secondly is the question of using only a single RTP session or 1717 one per media type for legacy interoperability. Thirdly is the 1718 question of using multiple sender sources (SSRCs) per end-point. 1720 Historically, RTP and RTCP have been run on separate UDP ports. With 1721 the increased use of Network Address/Port Translation (NAPT) this has 1722 become problematic, since maintaining multiple NAT bindings can be 1723 costly. It also complicates firewall administration, since multiple 1724 ports need to be opened to allow RTP traffic. To reduce these costs 1725 and session set-up times, support for multiplexing RTP data packets 1726 and RTCP control packets on a single port [RFC5761] will be 1727 supported. 1729 In cases where there is only one type of media (e.g., a voice-only 1730 call) this topology will be implemented as a single RTP session, with 1731 bidirectional flows of RTP and RTCP packets, all then multiplexed 1732 onto a single 5-tuple. If multiple types of media are to be used 1733 (e.g., audio and video), then each type media can be sent as a 1734 separate RTP session using a different 5-tuple, allowing for separate 1735 transport level treatment of each type of media. Alternatively, all 1736 types of media can be multiplexed onto a single 5-tuple as a single 1737 RTP session, or as several RTP sessions if using a demultiplexing 1738 shim. Multiplexing different types of media onto a single 5-tuple 1739 places some limitations on how RTP is used, as described in "RTP 1740 Multiplexing Architecture" 1741 [I-D.westerlund-avtcore-multiplex-architecture]. It is not expected 1742 that these limitations will significantly affect the scenarios 1743 targeted by WebRTC, but they can impact interoperability with legacy 1744 systems. 1746 An RTP session have good support for simultaneously transport 1747 multiple media sources. Each media source uses an unique SSRC 1748 identifier and each SSRC has independent RTP sequence number and 1749 timestamp spaces. This is being utilized in WebRTC for several 1750 cases. One is to enable multiple media sources of the same type, an 1751 end-point that has two video cameras can potentially transmit video 1752 from both to its peer(s). Another usage is when a single RTP session 1753 is being used for both multiple media types, thus an end-point can 1754 transmit both audio and video to the peer(s). Thirdly to support 1755 multi-party cases as will be discussed below support for multiple 1756 SSRC of the same media type is needed. 1758 Thus we can introduce a couple of different notations in the below 1759 two alternate figures of a single peer connection in a point to point 1760 set-up. The first depicting a setup where the peer connection 1761 established has two different RTP sessions, one for audio and one for 1762 video. The second one using a single RTP session. In both cases A 1763 has two video streams to send and one audio stream. B has only one 1764 audio and video stream. These are used to illustrate the relation 1765 between a peerConnection, the UDP flow(s), the RTP session(s) and the 1766 SSRCs that will be used in the later cases also. In the below 1767 figures RTCP flows are not included. They will flow bi-directionally 1768 between any RTP session instances in the different nodes. 1770 +-A-------------+ +-B-------------+ 1771 | +-PeerC1------| |-PeerC1------+ | 1772 | | +-UDP1------| |-UDP1------+ | | 1773 | | | +-RTP1----| |-RTP1----+ | | | 1774 | | | | +-Audio-| |-Audio-+ | | | | 1775 | | | | | AA1|---------------->| | | | | | 1776 | | | | | |<----------------|BA1 | | | | | 1777 | | | | +-------| |-------+ | | | | 1778 | | | +---------| |---------+ | | | 1779 | | +-----------| |-----------+ | | 1780 | | | | | | 1781 | | +-UDP2------| |-UDP2------+ | | 1782 | | | +-RTP2----| |-RTP1----+ | | | 1783 | | | | +-Video-| |-Video-+ | | | | 1784 | | | | | AV1|---------------->| | | | | | 1785 | | | | | AV2|---------------->| | | | | | 1786 | | | | | |<----------------|BV1 | | | | | 1787 | | | | +-------| |-------+ | | | | 1788 | | | +---------| |---------+ | | | 1789 | | +-----------| |-----------+ | | 1790 | +-------------| |-------------+ | 1791 +---------------+ +---------------+ 1793 Figure 4: Point to Point: Multiple RTP sessions 1795 As can be seen above in the Point to Point: Multiple RTP sessions 1796 (Figure 4) the single Peer Connection contains two RTP sessions over 1797 different UDP flows UDP 1 and UDP 2, i.e. their 5-tuples will be 1798 different, normally on source and destination ports. The first RTP 1799 session (RTP1) carries audio, one stream in each direction AA1 and 1800 BA1. The second RTP session contains two video streams from A (AV1 1801 and AV2) and one from B to A (BV1). 1803 +-A-------------+ +-B-------------+ 1804 | +-PeerC1------| |-PeerC1------+ | 1805 | | +-UDP1------| |-UDP1------+ | | 1806 | | | +-RTP1----| |-RTP1----+ | | | 1807 | | | | +-Audio-| |-Audio-+ | | | | 1808 | | | | | AA1|---------------->| | | | | | 1809 | | | | | |<----------------|BA1 | | | | | 1810 | | | | +-------| |-------+ | | | | 1811 | | | | | | | | | | 1812 | | | | +-Video-| |-Video-+ | | | | 1813 | | | | | AV1|---------------->| | | | | | 1814 | | | | | AV2|---------------->| | | | | | 1815 | | | | | |<----------------|BV1 | | | | | 1816 | | | | +-------| |-------+ | | | | 1817 | | | +---------| |---------+ | | | 1818 | | +-----------| |-----------+ | | 1819 | +-------------| |-------------+ | 1820 +---------------+ +---------------+ 1822 Figure 5: Point to Point: Single RTP session. 1824 In (Figure 5) there is only a single UDP flow and RTP session (RTP1). 1825 This RTP session carries a total of five (5) RTP media streams 1826 (SSRCs). From A to B there is Audio (AA1) and two video (AV1 and 1827 AV2). From B to A there is Audio (BA1) and Video (BV1). 1829 A.2. Multi-Unicast (Mesh) 1831 For small multiparty calls, it is practical to set up a multi-unicast 1832 topology (Figure 6). In this topology, each participant sends 1833 individual unicast RTP/UDP/IP flows to each of the other participants 1834 using independent PeerConnections in a full mesh. 1836 +---+ +---+ 1837 | A |<---->| B | 1838 +---+ +---+ 1839 ^ ^ 1840 \ / 1841 \ / 1842 v v 1843 +---+ 1844 | C | 1845 +---+ 1847 Figure 6: Multi-unicast 1849 This topology has the benefit of not requiring central nodes. The 1850 downside is that it increases the used bandwidth at each sender by 1851 requiring one copy of the RTP media streams for each participant that 1852 are part of the same session beyond the sender itself. Hence, this 1853 topology is limited to scenarios with few participants unless the 1854 media is very low bandwidth. The multi-unicast topology could be 1855 implemented as a single RTP session, spanning multiple peer-to-peer 1856 transport layer connections, or as several pairwise RTP sessions, one 1857 between each pair of peers. To maintain a coherent mapping between 1858 the relation between RTP sessions and PeerConnections we recommend 1859 that one implements this as individual RTP sessions. The only 1860 downside is that end-point A will not learn of the quality of any 1861 transmission happening between B and C based on RTCP. This has not 1862 been seen as a significant downside as now one has yet seen a need 1863 for why A would need to know about the B's and C's communication. An 1864 advantage of using separate RTP sessions is that it enables using 1865 different media bit-rates to the different peers, thus not forcing B 1866 to endure the same quality reductions if there are limitations in the 1867 transport from A to C as C will. 1869 +-A------------------------+ +-B-------------+ 1870 |+---+ +-PeerC1------| |-PeerC1------+ | 1871 ||MIC| | +-UDP1------| |-UDP1------+ | | 1872 |+---+ | | +-RTP1----| |-RTP1----+ | | | 1873 | | +----+ | | | +-Audio-| |-Audio-+ | | | | 1874 | +->|ENC1|--+-+-+-+--->AA1|------------->| | | | | | 1875 | | +----+ | | | | |<-------------|BA1 | | | | | 1876 | | | | | +-------| |-------+ | | | | 1877 | | | | +---------| |---------+ | | | 1878 | | | +-----------| |-----------+ | | 1879 | | +-------------| |-------------+ | 1880 | | | |---------------+ 1881 | | | 1882 | | | +-C-------------+ 1883 | | +-PeerC2------| |-PeerC2------+ | 1884 | | | +-UDP2------| |-UDP2------+ | | 1885 | | | | +-RTP2----| |-RTP2----+ | | | 1886 | | +----+ | | | +-Audio-| |-Audio-+ | | | | 1887 | +->|ENC2|--+-+-+-+--->AA2|------------->| | | | | | 1888 | +----+ | | | | |<-------------|CA1 | | | | | 1889 | | | | +-------| |-------+ | | | | 1890 | | | +---------| |---------+ | | | 1891 | | +-----------| |-----------+ | | 1892 | +-------------| |-------------+ | 1893 +--------------------------+ +---------------+ 1895 Figure 7: Session structure for Multi-Unicast Setup 1897 Lets review how the RTP sessions looks from A's perspective by 1898 considering both how the media is a handled and what PeerConnections 1899 and RTP sessions that are set-up in Figure 7. A's microphone is 1900 captured and the digital audio can then be feed into two different 1901 encoder instances each beeing associated with two different 1902 PeerConnections (PeerC1 and PeerC2) each containing independent RTP 1903 sessions (RTP1 and RTP2). The SSRCs in each RTP session will be 1904 completely independent and the media bit-rate produced by the encoder 1905 can also be tuned to address any congestion control requirements 1906 between A and B differently then for the path A to C. 1908 For media encodings which are more resource consuming, like video, 1909 one could expect that it will be common that end-points that are 1910 resource constrained will use a different implementation strategy 1911 where the encoder is shared between the different PeerConnections as 1912 shown below Figure 8. 1913 +-A----------------------+ +-B-------------+ 1914 |+---+ | | | 1915 ||CAM| +-PeerC1------| |-PeerC1------+ | 1916 |+---+ | +-UDP1------| |-UDP1------+ | | 1917 | | | | +-RTP1----| |-RTP1----+ | | | 1918 | V | | | +-Video-| |-Video-+ | | | | 1919 |+----+ | | | | |<----------------|BV1 | | | | | 1920 ||ENC |----+-+-+-+--->AV1|---------------->| | | | | | 1921 |+----+ | | | +-------| |-------+ | | | | 1922 | | | | +---------| |---------+ | | | 1923 | | | +-----------| |-----------+ | | 1924 | | +-------------| |-------------+ | 1925 | | | |---------------+ 1926 | | | 1927 | | | +-C-------------+ 1928 | | +-PeerC2------| |-PeerC2------+ | 1929 | | | +-UDP2------| |-UDP2------+ | | 1930 | | | | +-RTP2----| |-RTP2----+ | | | 1931 | | | | | +-Video-| |-Video-+ | | | | 1932 | +-------+-+-+-+--->AV2|---------------->| | | | | | 1933 | | | | | |<----------------|CV1 | | | | | 1934 | | | | +-------| |-------+ | | | | 1935 | | | +---------| |---------+ | | | 1936 | | +-----------| |-----------+ | | 1937 | +-------------| |-------------+ | 1938 +------------------------+ +---------------+ 1940 Figure 8: Single Encoder Multi-Unicast Setup 1942 This will clearly save resources consumed by encoding but does 1943 introduce the need for the end-point A to make decisions on how it 1944 encodes the media so it suites delivery to both B and C. This is not 1945 limited to congestion control, also preferred resolution to receive 1946 based on dispaly area available is another aspect requiring 1947 consideration. The need for this type of decision logic does arise 1948 in several different topologies and implementation. 1950 A.3. Mixer Based 1952 An mixer (Figure 9) is a centralised point that selects or mixes 1953 content in a conference to optimise the RTP session so that each end- 1954 point only needs connect to one entity, the mixer. The mixer can 1955 also reduce the bit-rate needed from the mixer down to a conference 1956 participants as the media sent from the mixer to the end-point can be 1957 optimised in different ways. These optimisations include methods 1958 like only choosing media from the currently most active speaker or 1959 mixing together audio so that only one audio stream is needed instead 1960 of 3 in the depicted scenario (Figure 9). 1962 +---+ +------------+ +---+ 1963 | A |<---->| |<---->| B | 1964 +---+ | | +---+ 1965 | Mixer | 1966 +---+ | | +---+ 1967 | C |<---->| |<---->| D | 1968 +---+ +------------+ +---+ 1970 Figure 9: RTP Mixer with Only Unicast Paths 1972 Mixers have two downsides, the first is that the mixer has to be a 1973 trusted node as they either performs media operations or at least re- 1974 packetize the media. Both type of operations requires when using 1975 SRTP that the mixer verifies integrity, decrypts the content, perform 1976 its operation and form new RTP packets, encrypts and integrity 1977 protect them. This applies to all types of mixers described below. 1979 The second downside is that all these operations and optimization of 1980 the session requires processing. How much depends on the 1981 implementation as will become evident below. 1983 The implementation of an mixer can take several different forms and 1984 we will discuss the main themes available that doesn't break RTP. 1986 Please note that a Mixer could also contain translator 1987 functionalities, like a media transcoder to adjust the media bit-rate 1988 or codec used on a particular RTP media stream. 1990 A.3.1. Media Mixing 1992 This type of mixer is one which clearly can be called RTP mixer is 1993 likely the one that most thinks of when they hear the term mixer. 1994 Its basic patter of operation is that it will receive the different 1995 participants RTP media stream. Select which that are to be included 1996 in a media domain mix of the incoming RTP media streams. Then create 1997 a single outgoing stream from this mix. 1999 Audio mixing is straight forward and commonly possible to do for a 2000 number of participants. Lets assume that you want to mix N number of 2001 streams from different participants. Then the mixer need to perform 2002 decoding N times. Then it needs to produce N or N+1 mixes, the 2003 reasons that different mixes are needed are so that each contributing 2004 source get a mix which don't contain themselves, as this would result 2005 in an echo. When N is lower than the number of all participants one 2006 can produce a Mix of all N streams for the group that are curently 2007 not included in the mix, thus N+1 mixes. These audio streams are 2008 then encoded again, RTP packetized and sent out. 2010 Video can't really be "mixed" and produce something particular useful 2011 for the users, however creating an composition out of the contributed 2012 video streams can be done. In fact it can be done in a number of 2013 ways, tiling the different streams creating a chessboard, selecting 2014 someone as more important and showing them large and a number of 2015 other sources as smaller is another. Also here one commonly need to 2016 produce a number of different compositions so that the contributing 2017 part doesn't need to see themselves. Then the mixer re-encodes the 2018 created video stream, RTP packetize it and send it out 2020 The problem with media mixing is that it both consume large amount of 2021 media processing and encoding resources. The second is the quality 2022 degradation created by decoding and re-encoding the RTP media stream. 2023 Its advantage is that it is quite simplistic for the clients to 2024 handle as they don't need to handle local mixing and composition. 2026 +-A-------------+ +-MIXER--------------------------+ 2027 | +-PeerC1------| |-PeerC1--------+ | 2028 | | +-UDP1------| |-UDP1--------+ | | 2029 | | | +-RTP1----| |-RTP1------+ | | +-----+ | 2030 | | | | +-Audio-| |-Audio---+ | | | +---+ | | | 2031 | | | | | AA1|------------>|---------+-+-+-+-|DEC|->| | | 2032 | | | | | |<------------|MA1 <----+ | | | +---+ | | | 2033 | | | | | | |(BA1+CA1)|\| | | +---+ | | | 2034 | | | | +-------| |---------+ +-+-+-|ENC|<-| B+C | | 2035 | | | +---------| |-----------+ | | +---+ | | | 2036 | | +-----------| |-------------+ | | M | | 2037 | +-------------| |---------------+ | E | | 2038 +---------------+ | | D | | 2039 | | I | | 2040 +-B-------------+ | | A | | 2041 | +-PeerC2------| |-PeerC2--------+ | | | 2042 | | +-UDP2------| |-UDP2--------+ | | M | | 2043 | | | +-RTP2----| |-RTP2------+ | | | I | | 2044 | | | | +-Audio-| |-Audio---+ | | | +---+ | X | | 2045 | | | | | BA1|------------>|---------+-+-+-+-|DEC|->| E | | 2046 | | | | | |<------------|MA2 <----+ | | | +---+ | R | | 2047 | | | | +-------| |(BA1+CA1)|\| | | +---+ | | | 2048 | | | +---------| |---------+ +-+-+-|ENC|<-| A+C | | 2049 | | +-----------| |-----------+ | | +---+ | | | 2050 | +-------------| |-------------+ | | | | 2051 +---------------+ |---------------+ | | | 2052 | | | | 2053 +-C-------------+ | | | | 2054 | +-PeerC3------| |-PeerC3--------+ | | | 2055 | | +-UDP3------| |-UDP3--------+ | | | | 2056 | | | +-RTP3----| |-RTP3------+ | | | | | 2057 | | | | +-Audio-| |-Audio---+ | | | +---+ | | | 2058 | | | | | CA1|------------>|---------+-+-+-+-|DEC|->| | | 2059 | | | | | |<------------|MA3 <----+ | | | +---+ | | | 2060 | | | | +-------| |(BA1+CA1)|\| | | +---+ | | | 2061 | | | +---------| |---------+ +-+-+-|ENC|<-| A+B | | 2062 | | +-----------| |-----------+ | | +---+ | | | 2063 | +-------------| |-------------+ | +-----+ | 2064 +---------------+ |---------------+ | 2065 +--------------------------------+ 2067 Figure 10: Session and SSRC details for Media Mixer 2069 From an RTP perspective media mixing can be very straight forward as 2070 can be seen in Figure 10. The mixer present one SSRC towards the 2071 peer client, e.g. MA1 to Peer A, which is the media mix of the other 2072 participants. As each peer receives a different version produced by 2073 the mixer there are no actual relation between the different RTP 2074 sessions in the actual media or the transport level information. 2075 There is however one connection between RTP1-RTP3 in this figure. It 2076 has to do with the SSRC space and the identity information. When A 2077 receives the MA1 stream which is a combination of BA1 and CA1 streams 2078 in the other PeerConnections RTP could enable the mixer to include 2079 CSRC information in the MA1 stream to identify the contributing 2080 source BA1 and CA1. 2082 The CSRC has in its turn utility in RTP extensions, like the in 2083 Section 5.2.3 discussed Mixer to Client audio levels RTP header 2084 extension [RFC6465]. If the SSRC from one PeerConnection are used as 2085 CSRC in another PeerConnection then RTP1, RTP2 and RTP3 becomes one 2086 joint session as they have a common SSRC space. At this stage one 2087 also need to consider which RTCP information one need to expose in 2088 the different legs. For the above situation commonly nothing more 2089 than the Source Description (SDES) information and RTCP BYE for CSRC 2090 need to be exposed. The main goal would be to enable the correct 2091 binding against the application logic and other information sources. 2092 This also enables loop detection in the RTP session. 2094 A.3.1.1. RTP Session Termination 2096 There exist an possible implementation choice to have the RTP 2097 sessions being separated between the different legs in the multi- 2098 party communication session and only generate RTP media streams in 2099 each without carrying on RTP/RTCP level any identity information 2100 about the contributing sources. This removes both the functionality 2101 that CSRC can provide and the possibility to use any extensions that 2102 build on CSRC and the loop detection. It might appear a 2103 simplification if SSRC collision would occur between two different 2104 end-points as they can be avoided to be resolved and instead remapped 2105 between the independent sessions if at all exposed. However, SSRC/ 2106 CSRC remapping requires that SSRC/CSRC are never exposed to the 2107 WebRTC JavaScript client to use as reference. This as they only have 2108 local importance if they are used on a multi-party session scope the 2109 result would be mis-referencing. Also SSRC collision handling will 2110 still be needed as it can occur between the mixer and the end-point. 2112 Session termination might appear to resolve some issues, it however 2113 creates other issues that needs resolving, like loop detection, 2114 identification of contributing sources and the need to handle mapped 2115 identities and ensure that the right one is used towards the right 2116 identities and never used directly between multiple end-points. 2118 A.3.2. Media Switching 2120 An RTP Mixer based on media switching avoids the media decoding and 2121 encoding cycle in the mixer, but not the decryption and re-encryption 2122 cycle as one rewrites RTP headers. This both reduces the amount of 2123 computational resources needed in the mixer and increases the media 2124 quality per transmitted bit. This is achieve by letting the mixer 2125 have a number of SSRCs that represents conceptual or functional 2126 streams the mixer produces. These streams are created by selecting 2127 media from one of the by the mixer received RTP media streams and 2128 forward the media using the mixers own SSRCs. The mixer can then 2129 switch between available sources if that is needed by the concept for 2130 the source, like currently active speaker. 2132 To achieve a coherent RTP media stream from the mixer's SSRC the 2133 mixer is forced to rewrite the incoming RTP packet's header. First 2134 the SSRC field has to be set to the value of the Mixer's SSRC. 2135 Secondly, the sequence number is set to the next in the sequence of 2136 outgoing packets it sent. Thirdly the RTP timestamp value needs to 2137 be adjusted using an offset that changes each time one switch media 2138 source. Finally depending on the negotiation the RTP payload type 2139 value representing this particular RTP payload configuration might 2140 have to be changed if the different PeerConnections have not arrived 2141 on the same numbering for a given configuration. This also requires 2142 that the different end-points do support a common set of codecs, 2143 otherwise media transcoding for codec compatibility is still needed. 2145 Lets consider the operation of media switching mixer that supports a 2146 video conference with six participants (A-F) where the two latest 2147 speakers in the conference are shown to each participants. Thus the 2148 mixer has two SSRCs sending video to each peer. 2150 +-A-------------+ +-MIXER--------------------------+ 2151 | +-PeerC1------| |-PeerC1--------+ | 2152 | | +-UDP1------| |-UDP1--------+ | | 2153 | | | +-RTP1----| |-RTP1------+ | | +-----+ | 2154 | | | | +-Video-| |-Video---+ | | | | | | 2155 | | | | | AV1|------------>|---------+-+-+-+------->| | | 2156 | | | | | |<------------|MV1 <----+-+-+-+-BV1----| | | 2157 | | | | | |<------------|MV2 <----+-+-+-+-EV1----| | | 2158 | | | | +-------| |---------+ | | | | | | 2159 | | | +---------| |-----------+ | | | | | 2160 | | +-----------| |-------------+ | | S | | 2161 | +-------------| |---------------+ | W | | 2162 +---------------+ | | I | | 2163 | | T | | 2164 +-B-------------+ | | C | | 2165 | +-PeerC2------| |-PeerC2--------+ | H | | 2166 | | +-UDP2------| |-UDP2--------+ | | | | 2167 | | | +-RTP2----| |-RTP2------+ | | | M | | 2168 | | | | +-Video-| |-Video---+ | | | | A | | 2169 | | | | | BV1|------------>|---------+-+-+-+------->| T | | 2170 | | | | | |<------------|MV3 <----+-+-+-+-AV1----| R | | 2171 | | | | | |<------------|MV4 <----+-+-+-+-EV1----| I | | 2172 | | | | +-------| |---------+ | | | | X | | 2173 | | | +---------| |-----------+ | | | | | 2174 | | +-----------| |-------------+ | | | | 2175 | +-------------| |---------------+ | | | 2176 +---------------+ | | | | 2177 : : : : 2178 : : : : 2179 +-F-------------+ | | | | 2180 | +-PeerC6------| |-PeerC6--------+ | | | 2181 | | +-UDP6------| |-UDP6--------+ | | | | 2182 | | | +-RTP6----| |-RTP6------+ | | | | | 2183 | | | | +-Video-| |-Video---+ | | | | | | 2184 | | | | | CV1|------------>|---------+-+-+-+------->| | | 2185 | | | | | |<------------|MV11 <---+-+-+-+-AV1----| | | 2186 | | | | | |<------------|MV12 <---+-+-+-+-EV1----| | | 2187 | | | | +-------| |---------+ | | | | | | 2188 | | | +---------| |-----------+ | | | | | 2189 | | +-----------| |-------------+ | +-----+ | 2190 | +-------------| |---------------+ | 2191 +---------------+ +--------------------------------+ 2193 Figure 11: Media Switching RTP Mixer 2195 The Media Switching RTP mixer can similar to the Media Mixing one 2196 reduce the bit-rate needed towards the different peers by selecting 2197 and switching in a sub-set of RTP media streams out of the ones it 2198 receives from the conference participations. 2200 To ensure that a media receiver can correctly decode the RTP media 2201 stream after a switch, it becomes necessary to ensure for state 2202 saving codecs that they start from default state at the point of 2203 switching. Thus one common tool for video is to request that the 2204 encoding creates an intra picture, something that isn't dependent on 2205 earlier state. This can be done using Full Intra Request RTCP codec 2206 control message as discussed in Section 5.1.1. 2208 Also in this type of mixer one could consider to terminate the RTP 2209 sessions fully between the different PeerConnection. The same 2210 arguments and considerations as discussed in Appendix A.3.1.1 applies 2211 here. 2213 A.3.3. Media Projecting 2215 Another method for handling media in the RTP mixer is to project all 2216 potential sources (SSRCs) into a per end-point independent RTP 2217 session. The mixer can then select which of the potential sources 2218 that are currently actively transmitting media, despite that the 2219 mixer in another RTP session receives media from that end-point. 2220 This is similar to the media switching Mixer but have some important 2221 differences in RTP details. 2223 +-A-------------+ +-MIXER--------------------------+ 2224 | +-PeerC1------| |-PeerC1--------+ | 2225 | | +-UDP1------| |-UDP1--------+ | | 2226 | | | +-RTP1----| |-RTP1------+ | | +-----+ | 2227 | | | | +-Video-| |-Video---+ | | | | | | 2228 | | | | | AV1|------------>|---------+-+-+-+------->| | | 2229 | | | | | |<------------|BV1 <----+-+-+-+--------| | | 2230 | | | | | |<------------|CV1 <----+-+-+-+--------| | | 2231 | | | | | |<------------|DV1 <----+-+-+-+--------| | | 2232 | | | | | |<------------|EV1 <----+-+-+-+--------| | | 2233 | | | | | |<------------|FV1 <----+-+-+-+--------| | | 2234 | | | | +-------| |---------+ | | | | | | 2235 | | | +---------| |-----------+ | | | | | 2236 | | +-----------| |-------------+ | | S | | 2237 | +-------------| |---------------+ | W | | 2238 +---------------+ | | I | | 2239 | | T | | 2240 +-B-------------+ | | C | | 2241 | +-PeerC2------| |-PeerC2--------+ | H | | 2242 | | +-UDP2------| |-UDP2--------+ | | | | 2243 | | | +-RTP2----| |-RTP2------+ | | | M | | 2244 | | | | +-Video-| |-Video---+ | | | | A | | 2245 | | | | | BV1|------------>|---------+-+-+-+------->| T | | 2246 | | | | | |<------------|AV1 <----+-+-+-+--------| R | | 2247 | | | | | |<------------|CV1 <----+-+-+-+--------| I | | 2248 | | | | | | : : : |: : : : : : : : : : :| X | | 2249 | | | | | |<------------|FV1 <----+-+-+-+--------| | | 2250 | | | | +-------| |---------+ | | | | | | 2251 | | | +---------| |-----------+ | | | | | 2252 | | +-----------| |-------------+ | | | | 2253 | +-------------| |---------------+ | | | 2254 +---------------+ | | | | 2255 : : : : 2256 : : : : 2257 +-F-------------+ | | | | 2258 | +-PeerC6------| |-PeerC6--------+ | | | 2259 | | +-UDP6------| |-UDP6--------+ | | | | 2260 | | | +-RTP6----| |-RTP6------+ | | | | | 2261 | | | | +-Video-| |-Video---+ | | | | | | 2262 | | | | | CV1|------------>|---------+-+-+-+------->| | | 2263 | | | | | |<------------|AV1 <----+-+-+-+--------| | | 2264 | | | | | | : : : |: : : : : : : : : : :| | | 2265 | | | | | |<------------|EV1 <----+-+-+-+--------| | | 2266 | | | | +-------| |---------+ | | | | | | 2267 | | | +---------| |-----------+ | | | | | 2268 | | +-----------| |-------------+ | +-----+ | 2269 | +-------------| |---------------+ | 2270 +---------------+ +--------------------------------+ 2271 Figure 12: Media Projecting Mixer 2273 So in this six participant conference depicted above in (Figure 12) 2274 one can see that end-point A will in this case be aware of 5 incoming 2275 SSRCs, BV1-FV1. If this mixer intend to have the same behavior as in 2276 Appendix A.3.2 where the mixer provides the end-points with the two 2277 latest speaking end-points, then only two out of these five SSRCs 2278 will concurrently transmit media to A. As the mixer selects which 2279 source in the different RTP sessions that transmit media to the end- 2280 points each RTP media stream will require some rewriting when being 2281 projected from one session into another. The main thing is that the 2282 sequence number will need to be consecutively incremented based on 2283 the packet actually being transmitted in each RTP session. Thus the 2284 RTP sequence number offset will change each time a source is turned 2285 on in RTP session. 2287 As the RTP sessions are independent the SSRC numbers used can be 2288 handled independently also thus working around any SSRC collisions by 2289 having remapping tables between the RTP sessions. However the 2290 related WebRTC MediaStream signalling need to be correspondingly 2291 changed to ensure consistent WebRTC MediaStream to SSRC mappings 2292 between the different PeerConnections and the same comment that 2293 higher functions MUST NOT use SSRC as references to RTP media streams 2294 applies also here. 2296 The mixer will also be responsible to act on any RTCP codec control 2297 requests coming from an end-point and decide if it can act on it 2298 locally or needs to translate the request into the RTP session that 2299 contains the media source. Both end-points and the mixer will need 2300 to implement conference related codec control functionalities to 2301 provide a good experience. Full Intra Request to request from the 2302 media source to provide switching points between the sources, 2303 Temporary Maximum Media Bit-rate Request (TMMBR) to enable the mixer 2304 to aggregate congestion control response towards the media source and 2305 have it adjust its bit-rate in case the limitation is not in the 2306 source to mixer link. 2308 This version of the mixer also puts different requirements on the 2309 end-point when it comes to decoder instances and handling of the RTP 2310 media streams providing media. As each projected SSRC can at any 2311 time provide media the end-point either needs to handle having thus 2312 many allocated decoder instances or have efficient switching of 2313 decoder contexts in a more limited set of actual decoder instances to 2314 cope with the switches. The WebRTC application also gets more 2315 responsibility to update how the media provides is to be presented to 2316 the user. 2318 A.4. Translator Based 2320 There is also a variety of translators. The core commonality is that 2321 they do not need to make themselves visible in the RTP level by 2322 having an SSRC themselves. Instead they sit between one or more end- 2323 point and perform translation at some level. It can be media 2324 transcoding, protocol translation or covering missing functionality 2325 for a legacy end-point or simply relay packets between transport 2326 domains or to realize multi-party. We will go in details below. 2328 A.4.1. Transcoder 2330 A transcoder operates on media level and really used for two 2331 purposes, the first is to allow two end-points that doesn't have a 2332 common set of media codecs to communicate by translating from one 2333 codec to another. The second is to change the bit-rate to a lower 2334 one. For WebRTC end-points communicating with each other only the 2335 first one is relevant. In certain legacy deployment media transcoder 2336 will be necessary to ensure both codecs and bit-rate falls within the 2337 envelope the legacy end-point supports. 2339 As transcoding requires access to the media, the transcoder has to be 2340 within the security context and access any media encryption and 2341 integrity keys. On the RTP plane a media transcoder will in practice 2342 fork the RTP session into two different domains that are highly 2343 decoupled when it comes to media parameters and reporting, but not 2344 identities. To maintain signalling bindings to SSRCs a transcoder is 2345 likely needing to use the SSRC of one end-point to represent the 2346 transcoded RTP media stream to the other end-point(s). The 2347 congestion control loop can be terminated in the transcoder as the 2348 media bit-rate being sent by the transcoder can be adjusted 2349 independently of the incoming bit-rate. However, for optimizing 2350 performance and resource consumption the translator needs to consider 2351 what signals or bit-rate reductions it needs to send towards the 2352 source end-point. For example receiving a 2.5 Mbps video stream and 2353 then send out a 250 kbps video stream after transcoding is a waste of 2354 resources. In most cases a 500 kbps video stream from the source in 2355 the right resolution is likely to provide equal quality after 2356 transcoding as the 2.5 Mbps source stream. At the same time 2357 increasing media bit-rate further than what is needed to represent 2358 the incoming quality accurate is also wasted resources. 2360 +-A-------------+ +-Translator------------------+ 2361 | +-PeerC1------| |-PeerC1--------+ | 2362 | | +-UDP1------| |-UDP1--------+ | | 2363 | | | +-RTP1----| |-RTP1------+ | | | 2364 | | | | +-Audio-| |-Audio---+ | | | +---+ | 2365 | | | | | AA1|------------>|---------+-+-+-+-|DEC|----+ | 2366 | | | | | |<------------|BA1 <----+ | | | +---+ | | 2367 | | | | | | | |\| | | +---+ | | 2368 | | | | +-------| |---------+ +-+-+-|ENC|<-+ | | 2369 | | | +---------| |-----------+ | | +---+ | | | 2370 | | +-----------| |-------------+ | | | | 2371 | +-------------| |---------------+ | | | 2372 +---------------+ | | | | 2373 | | | | 2374 +-B-------------+ | | | | 2375 | +-PeerC2------| |-PeerC2--------+ | | | 2376 | | +-UDP2------| |-UDP2--------+ | | | | 2377 | | | +-RTP1----| |-RTP1------+ | | | | | 2378 | | | | +-Audio-| |-Audio---+ | | | +---+ | | | 2379 | | | | | BA1|------------>|---------+-+-+-+-|DEC|--+ | | 2380 | | | | | |<------------|AA1 <----+ | | | +---+ | | 2381 | | | | | | | |\| | | +---+ | | 2382 | | | | +-------| |---------+ +-+-+-|ENC|<---+ | 2383 | | | +---------| |-----------+ | | +---+ | 2384 | | +-----------| |-------------+ | | 2385 | +-------------| |---------------+ | 2386 +---------------+ +-----------------------------+ 2388 Figure 13: Media Transcoder 2390 Figure 13 exposes some important details. First of all you can see 2391 the SSRC identifiers used by the translator are the corresponding 2392 end-points. Secondly, there is a relation between the RTP sessions 2393 in the two different PeerConnections that are represented by having 2394 both parts be identified by the same level and they need to share 2395 certain contexts. Also certain type of RTCP messages will need to be 2396 bridged between the two parts. Certain RTCP feedback messages are 2397 likely needed to be sourced by the translator in response to actions 2398 by the translator and its media encoder. 2400 A.4.2. Gateway / Protocol Translator 2402 Gateways are used when some protocol feature that are needed are not 2403 supported by an end-point wants to participate in session. This RTP 2404 translator in Figure 14 takes on the role of ensuring that from the 2405 perspective of participant A, participant B appears as a fully 2406 compliant WebRTC end-point (that is, it is the combination of the 2407 Translator and participant B that looks like a WebRTC end point). 2409 +------------+ 2410 | | 2411 +---+ | Translator | +---+ 2412 | A |<---->| to legacy |<---->| B | 2413 +---+ | end-point | +---+ 2414 WebRTC | | Legacy 2415 +------------+ 2417 Figure 14: Gateway (RTP translator) towards legacy end-point 2419 For WebRTC there are a number of requirements that could force the 2420 need for a gateway if a WebRTC end-point is to communicate with a 2421 legacy end-point, such as support of ICE and DTLS-SRTP for key 2422 management. On RTP level the main functions that might be missing in 2423 a legacy implementation that otherwise support RTP are RTCP in 2424 general, SRTP implementation, congestion control and feedback 2425 messages needed to make it work. 2427 +-A-------------+ +-Translator------------------+ 2428 | +-PeerC1------| |-PeerC1------+ | 2429 | | +-UDP1------| |-UDP1------+ | | 2430 | | | +-RTP1----| |-RTP1-----------------------+| 2431 | | | | +-Audio-| |-Audio---+ || 2432 | | | | | AA1|------------>|---------+----------------+ || 2433 | | | | | |<------------|BA1 <----+--------------+ | || 2434 | | | | | |<---RTCP---->|<--------+----------+ | | || 2435 | | | | +-------| |---------+ +---+-+ | | || 2436 | | | +---------| |---------------+| T | | | || 2437 | | +-----------| |-----------+ | || R | | | || 2438 | +-------------| |-------------+ || A | | | || 2439 +---------------+ | || N | | | || 2440 | || S | | | || 2441 +-B-(Legacy)----+ | || L | | | || 2442 | | | || A | | | || 2443 | +-UDP2------| |-UDP2------+ || T | | | || 2444 | | +-RTP1----| |-RTP1----------+| E | | | || 2445 | | | +-Audio-| |-Audio---+ +---+-+ | | || 2446 | | | | |<---RTCP---->|<--------+----------+ | | || 2447 | | | | BA1|------------>|---------+--------------+ | || 2448 | | | | |<------------|AA1 <----+----------------+ || 2449 | | | +-------| |---------+ || 2450 | | +---------| |----------------------------+| 2451 | +-----------| |-----------+ | 2452 | | | | 2453 +---------------+ +-----------------------------+ 2455 Figure 15: RTP/RTCP Protocol Translator 2457 The legacy gateway can be implemented in several ways and what it 2458 need to change is highly dependent on what functions it need to proxy 2459 for the legacy end-point. One possibility is depicted in Figure 15 2460 where the RTP media streams are compatible and forward without 2461 changes. However, their RTP header values are captured to enable the 2462 RTCP translator to create RTCP reception information related to the 2463 leg between the end-point and the translator. This can then be 2464 combined with the more basic RTCP reports that the legacy endpoint 2465 (B) provides to give compatible and expected RTCP reporting to A. 2466 Thus enabling at least full congestion control on the path between A 2467 and the translator. If B has limited possibilities for congestion 2468 response for the media then the translator might need the capability 2469 to perform media transcoding to address cases where it otherwise 2470 would need to terminate media transmission. 2472 As the translator are generating RTP/RTCP traffic on behalf of B to A 2473 it will need to be able to correctly protect these packets that it 2474 translates or generates. Thus security context information are 2475 needed in this type of translator if it operates on the RTP/RTCP 2476 packet content or media. In fact one of the more likely scenario is 2477 that the translator (gateway) will need to have two different 2478 security contexts one towards A and one towards B and for each RTP/ 2479 RTCP packet do a authenticity verification, decryption followed by a 2480 encryption and integrity protection operation to resolve mismatch in 2481 security systems. 2483 A.4.3. Relay 2485 There exist a class of translators that operates on transport level 2486 below RTP and thus do not effect RTP/RTCP packets directly. They 2487 come in two distinct flavours, the one used to bridge between two 2488 different transport or address domains to more function as a gateway 2489 and the second one which is to to provide a group communication 2490 feature as depicted below in Figure 16. 2492 +---+ +------------+ +---+ 2493 | A |<---->| |<---->| B | 2494 +---+ | | +---+ 2495 | Translator | 2496 +---+ | | +---+ 2497 | C |<---->| |<---->| D | 2498 +---+ +------------+ +---+ 2500 Figure 16: RTP Translator (Relay) with Only Unicast Paths 2502 The first kind is straight forward and is likely to exist in WebRTC 2503 context when an legacy end-point is compatible with the exception for 2504 ICE, and thus needs a gateway that terminates the ICE and then 2505 forwards all the RTP/RTCP traffic and key management to the end-point 2506 only rewriting the IP/UDP to forward the packet to the legacy node. 2508 The second type is useful if one wants a less complex central node or 2509 a central node that is outside of the security context and thus do 2510 not have access to the media. This relay takes on the role of 2511 forwarding the media (RTP and RTCP) packets to the other end-points 2512 but doesn't perform any RTP or media processing. Such a device 2513 simply forwards the media from each sender to all of the other 2514 participants, and is sometimes called a transport-layer translator. 2515 In Figure 16, participant A will only need to send a media once to 2516 the relay, which will redistribute it by sending a copy of the stream 2517 to participants B, C, and D. Participant A will still receive three 2518 RTP streams with the media from B, C and D if they transmit 2519 simultaneously. This is from an RTP perspective resulting in an RTP 2520 session that behaves equivalent to one transporter over an IP Any 2521 Source Multicast (ASM). 2523 This results in one common RTP session between all participants 2524 despite that there will be independent PeerConnections created to the 2525 translator as depicted below Figure 17. 2527 +-A-------------+ +-RELAY--------------------------+ 2528 | +-PeerC1------| |-PeerC1--------+ | 2529 | | +-UDP1------| |-UDP1--------+ | | 2530 | | | +-RTP1----| |-RTP1-------------------------+ | 2531 | | | | +-Video-| |-Video---+ | | 2532 | | | | | AV1|------------>|---------------------------+ | | 2533 | | | | | |<------------|BV1 <--------------------+ | | | 2534 | | | | | |<------------|CV1 <------------------+ | | | | 2535 | | | | +-------| |---------+ | | | | | 2536 | | | +---------| |-------------------+ ^ ^ V | | 2537 | | +-----------| |-------------+ | | | | | | | 2538 | +-------------| |---------------+ | | | | | | 2539 +---------------+ | | | | | | | 2540 | | | | | | | 2541 +-B-------------+ | | | | | | | 2542 | +-PeerC2------| |-PeerC2--------+ | | | | | | 2543 | | +-UDP2------| |-UDP2--------+ | | | | | | | 2544 | | | +-RTP2----| |-RTP1--------------+ | | | | | 2545 | | | | +-Video-| |-Video---+ | | | | | 2546 | | | | | BV1|------------>|-----------------------+ | | | | 2547 | | | | | |<------------|AV1 <----------------------+ | | 2548 | | | | | |<------------|CV1 <--------------------+ | | | 2549 | | | | +-------| |---------+ | | | | | 2550 | | | +---------| |-------------------+ | | | | | 2551 | | +-----------| |-------------+ | | V ^ V | | 2552 | +-------------| |---------------+ | | | | | | 2553 +---------------+ | | | | | | | 2554 : | | | | | | 2555 : | | | | | | 2556 +-C-------------+ | | | | | | | 2557 | +-PeerC3------| |-PeerC3--------+ | | | | | | 2558 | | +-UDP3------| |-UDP3--------+ | | | | | | | 2559 | | | +-RTP3----| |-RTP1--------------+ | | | | | 2560 | | | | +-Video-| |-Video---+ | | | | | 2561 | | | | | CV1|------------>|-------------------------+ | | | 2562 | | | | | |<------------|AV1 <----------------------+ | | 2563 | | | | | |<------------|BV1 <------------------+ | | 2564 | | | | +-------| |---------+ | | 2565 | | | +---------| |------------------------------+ | 2566 | | +-----------| |-------------+ | | 2567 | +-------------| |---------------+ | 2568 +---------------+ +--------------------------------+ 2570 Figure 17: Transport Multi-party Relay 2572 As the Relay RTP and RTCP packets between the UDP flows as indicated 2573 by the arrows for the media flow a given WebRTC end-point, like A 2574 will see the remote sources BV1 and CV1. There will be also two 2575 different network paths between A, and B or C. This results in that 2576 the client A has to be capable of handling that when determining 2577 congestion state that there might exist multiple destinations on the 2578 far side of a PeerConnection and that these paths have to be treated 2579 differently. It also results in a requirement to combine the 2580 different congestion states into a decision to transmit a particular 2581 RTP media stream suitable to all participants. 2583 It is also important to note that the relay can not perform selective 2584 relaying of some sources and not others. The reason is that the RTCP 2585 reporting in that case becomes inconsistent and without explicit 2586 information about it being blocked has to be interpreted as severe 2587 congestion. 2589 In this usage it is also necessary that the session management has 2590 configured a common set of RTP configuration including RTP payload 2591 formats as when A sends a packet with pt=97 it will arrive at both B 2592 and C carrying pt=97 and having the same packetization and encoding, 2593 no entity will have manipulated the packet. 2595 When it comes to security there exist some additional requirements to 2596 ensure that the property that the relay can't read the media traffic 2597 is enforced. First of all the key to be used has to be agreed such 2598 so that the relay doesn't get it, e.g. no DTLS-SRTP handshake with 2599 the relay, instead some other method needs to be used. Secondly, the 2600 keying structure has to be capable of handling multiple end-points in 2601 the same RTP session. 2603 The second problem can basically be solved in two ways. Either a 2604 common master key from which all derive their per source key for 2605 SRTP. The second alternative which might be more practical is that 2606 each end-point has its own key used to protects all RTP/RTCP packets 2607 it sends. Each participants key are then distributed to the other 2608 participants. This second method could be implemented using DTLS- 2609 SRTP to a special key server and then use Encrypted Key Transport 2610 [I-D.ietf-avt-srtp-ekt] to distribute the actual used key to the 2611 other participants in the RTP session Figure 18. The first one could 2612 be achieved using MIKEY messages in SDP. 2614 +---+ +---+ 2615 | | +-----------+ | | 2616 | A |<------->| DTLS-SRTP |<------->| C | 2617 | |<-- -->| HOST |<-- -->| | 2618 +---+ \ / +-----------+ \ / +---+ 2619 X X 2620 +---+ / \ +-----------+ / \ +---+ 2621 | |<-- -->| RTP |<-- -->| | 2622 | B |<------->| RELAY |<------->| D | 2623 | | +-----------+ | | 2624 +---+ +---+ 2626 Figure 18: DTLS-SRTP host and RTP Relay Separated 2628 The relay can still verify that a given SSRC isn't used or spoofed by 2629 another participant within the multi-party session by binding SSRCs 2630 on their first usage to a given source address and port pair. 2631 Packets carrying that source SSRC from other addresses can be 2632 suppressed to prevent spoofing. This is possible as long as SRTP is 2633 used which leaves the SSRC of the packet originator in RTP and RTCP 2634 packets in the clear. If such packet level method for enforcing 2635 source authentication within the group, then there exist 2636 cryptographic methods such as TESLA [RFC4383] that could be used for 2637 true source authentication. 2639 A.5. End-point Forwarding 2641 An WebRTC end-point (B in Figure 19) will receive a WebRTC 2642 MediaStream (set of SSRCs) over a PeerConnection (from A). For the 2643 moment is not decided if the end-point is allowed or not to in its 2644 turn send that WebRTC MediaStream over another PeerConnection to C. 2645 This section discusses the RTP and end-point implications of allowing 2646 such functionality, which on the API level is extremely simplistic to 2647 perform. 2649 +---+ +---+ +---+ 2650 | A |--->| B |--->| C | 2651 +---+ +---+ +---+ 2653 Figure 19: MediaStream Forwarding 2655 There exist two main approaches to how B forwards the media from A to 2656 C. The first one is to simply relay the RTP media stream. The second 2657 one is for B to act as a transcoder. Lets consider both approaches. 2659 A relay approach will result in that the WebRTC end-points will have 2660 to have the same capabilities as being discussed in Relay 2661 (Appendix A.4.3). Thus A will see an RTP session that is extended 2662 beyond the PeerConnection and see two different receiving end-points 2663 with different path characteristics (B and C). Thus A's congestion 2664 control needs to be capable of handling this. The security solution 2665 can either support mechanism that allows A to inform C about the key 2666 A is using despite B and C having agreed on another set of keys. 2667 Alternatively B will decrypt and then re-encrypt using a new key. 2668 The relay based approach has the advantage that B does not need to 2669 transcode the media thus both maintaining the quality of the encoding 2670 and reducing B's complexity requirements. If the right security 2671 solutions are supported then also C will be able to verify the 2672 authenticity of the media coming from A. As downside A are forced to 2673 take both B and C into consideration when delivering content. 2675 The media transcoder approach is similar to having B act as Mixer 2676 terminating the RTP session combined with the transcoder as discussed 2677 in Appendix A.4.1. A will only see B as receiver of its media. B 2678 will responsible to produce a RTP media stream suitable for the B to 2679 C PeerConnection. This might require media transcoding for 2680 congestion control purpose to produce a suitable bit-rate. Thus 2681 loosing media quality in the transcoding and forcing B to spend the 2682 resource on the transcoding. The media transcoding does result in a 2683 separation of the two different legs removing almost all 2684 dependencies. B could choice to implement logic to optimize its 2685 media transcoding operation, by for example requesting media 2686 properties that are suitable for C also, thus trying to avoid it 2687 having to transcode the content and only forward the media payloads 2688 between the two sides. For that optimization to be practical WebRTC 2689 end-points have to support sufficiently good tools for codec control. 2691 A.6. Simulcast 2693 This section discusses simulcast in the meaning of providing a node, 2694 for example a stream switching Mixer, with multiple different encoded 2695 version of the same media source. In the WebRTC context that appears 2696 to be most easily accomplished by establishing multiple 2697 PeerConnection all being feed the same set of WebRTC MediaStreams. 2698 Each PeerConnection is then configured to deliver a particular media 2699 quality and thus media bit-rate. This will work well as long as the 2700 end-point implements media encoding according to Figure 7. Then each 2701 PeerConnection will receive an independently encoded version and the 2702 codec parameters can be agreed specifically in the context of this 2703 PeerConnection. 2705 For simulcast to work one needs to prevent that the end-point deliver 2706 content encoded as depicted in Figure 8. If a single encoder 2707 instance is feed to multiple PeerConnections the intention of 2708 performing simulcast will fail. 2710 Thus it needs to be considered to explicitly signal which of the two 2711 implementation strategies that are desired and which will be done. 2712 At least making the application and possible the central node 2713 interested in receiving simulcast of an end-points RTP media streams 2714 to be aware if it will function or not. 2716 Authors' Addresses 2718 Colin Perkins 2719 University of Glasgow 2720 School of Computing Science 2721 Glasgow G12 8QQ 2722 United Kingdom 2724 Email: csp@csperkins.org 2726 Magnus Westerlund 2727 Ericsson 2728 Farogatan 6 2729 SE-164 80 Kista 2730 Sweden 2732 Phone: +46 10 714 82 87 2733 Email: magnus.westerlund@ericsson.com 2735 Joerg Ott 2736 Aalto University 2737 School of Electrical Engineering 2738 Espoo 02150 2739 Finland 2741 Email: jorg.ott@aalto.fi