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