idnits 2.17.1 draft-alvestrand-rtcweb-msid-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 29, 2012) is 4350 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 (-54) exists of draft-ietf-mmusic-sdp-bundle-negotiation-00 == Outdated reference: A later version (-03) exists of draft-westerlund-avtcore-multiplex-architecture-00 Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group H. Alvestrand 3 Internet-Draft Google 4 Intended status: Standards Track May 29, 2012 5 Expires: November 30, 2012 7 Cross Session Stream Identification in the Session Description Protocol 8 draft-alvestrand-rtcweb-msid-02 10 Abstract 12 This document specifies a grouping mechanism for RTP media streams 13 that can be used to specify relations betweeen media streams within 14 different RTP sessions. 16 This mechanism is used to signal the association between the RTP 17 concept of SSRC and the WebRTC concept of "media stream" / "media 18 stream track" using SDP signalling. 20 This document is an input document for discussion. It should be 21 discussed in the RTCWEB WG list, rtcweb@ietf.org. 23 Requirements Language 25 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 26 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 27 document are to be interpreted as described in RFC 2119 [RFC2119]. 29 Status of this Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at http://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on November 30, 2012. 46 Copyright Notice 48 Copyright (c) 2012 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 1.1. Why A New Mechanism Is Needed . . . . . . . . . . . . . . 3 65 1.2. Application to the WEBRTC MediaStream . . . . . . . . . . 3 66 2. The Msid Mechanism . . . . . . . . . . . . . . . . . . . . . . 4 67 3. The Msid-Semantic Attribute . . . . . . . . . . . . . . . . . 5 68 4. Applying Msid to WebRTC Media Streams . . . . . . . . . . . . 5 69 4.1. Handling of non-signalled tracks . . . . . . . . . . . . . 6 70 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 71 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 73 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 74 8.1. Normative References . . . . . . . . . . . . . . . . . . . 8 75 8.2. Informative References . . . . . . . . . . . . . . . . . . 8 76 Appendix A. Design considerations, open questions and and 77 alternatives . . . . . . . . . . . . . . . . . . . . 9 78 Appendix B. Change log . . . . . . . . . . . . . . . . . . . . . 10 79 B.1. Changes from -00 to -01 . . . . . . . . . . . . . . . . . 10 80 B.2. Changes from -01 to -02 . . . . . . . . . . . . . . . . . 10 81 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 10 83 1. Introduction 85 1.1. Why A New Mechanism Is Needed 87 There exist cases where an application using RTP and SDP needs to 88 signal some relationship between RTP media streams (packets carried 89 using a single SSRC) that may be carried in either the same RTP 90 session or different RTP sessions. 92 When all SSRCs are carried in a single RTP session, the "a=ssrc- 93 group" mechanism [RFC5576] can be used. 95 When each RTP session carries one and only one SSRC, the SDP grouping 96 framework [RFC5888] can be used. 98 However, there are use cases (some of which are discussed in 99 [I-D.westerlund-avtcore-multiplex-architecture] ) where neither of 100 these approaches is appropriate; for instance, there may be a need to 101 signal a relationship between a video track in one RTP session and an 102 audio track in another RTP session. In those cases, a new mechanism 103 is needed. 105 (Note: When the bundle mechanism, 106 [I-D.ietf-mmusic-sdp-bundle-negotiation], is used, the extension is 107 still needed to link SSRCs under different m= lines, even when they 108 are in the same RTP session). 110 In addition, there is sometimes the need for an application to 111 specify some application-level information about the association 112 between the SSRC and the group. This is not possible using either of 113 the frameworks above. 115 1.2. Application to the WEBRTC MediaStream 117 The W3C WebRTC API specification [W3C.WD-webrtc-20120209] specifies 118 that communication between WebRTC entities is done via MediaStreams, 119 which contain MediaStreamTracks. A MediaStreamTrack is generally 120 carried using a single SSRC in an RTP session (forming an RTP media 121 stream. The collision of terminology is unfortunate.) There might 122 possibly with additional SSRCs, possibly within additional RTP 123 sessions, in order to support functionality like forward error 124 correction or simulcast. This complication is ignored below. 126 In the RTP specification, media streams are identified using the SSRC 127 field. Streams are grouped into RTP Sessions, and also carry a 128 CNAME. Neither CNAME nor RTP session correspond to a MediaStream. 129 Therefore, the association of an RTP media stream to MediaStreams 130 need to be explicitly signalled. 132 The marking needs to be on a per-SSRC basis, since one RTP session 133 can carry media from multiple MediaStreams, and one MediaStream can 134 have media in multiple RTP sessions. This means that the [RFC4574] 135 "label" attribute, which is used to label RTP sessions, is not usable 136 for this purpose. 138 The marking needs to also carry the unique identifier of the RTP 139 media stream as a MediaStreamTrack within the media stream; this is 140 done using a single letter to identify whether it belongs in the 141 video or audio track list, and the MediaStreamTrack's position within 142 that array. 144 This usage is described in Section 4. 146 2. The Msid Mechanism 148 Grouping of SSRCs is done via an "msid" attribute attached to the 149 SSRC in the SDP description, using the "Source Specific Media 150 Attribute" mechanism [RFC5576]: 151 a=ssrc:1234 msid:examplefoo v1 153 The ID is a randomly-generated string of ASCII characters chosen from 154 0-9, a-z, A-Z and - (hyphen), consisting of between 1 and 64 155 characters. It MUST be unique among the ID values used in the same 156 SDP session. 158 The value "default" (all lower case) has special meaning, and MUST 159 NOT be generated. Values starting with "example" (all lower case) 160 are reserved for documentation, and MUST NOT be generated by an 161 implementation. 163 Application data is carried on the same line as the ID, separated 164 from the ID by a space. 166 ABNF[RFC5234] grammar: 168 msidattribute = "msid:" identifier [ " " appdata ] 169 identifier = 1*64 ("0".."9" / "a".."z" / "-") 170 appdata = 1*64 ("0".."9" / "a".."z" / "-") 172 (Note: one possible generation algorithm is to generate 6 random 173 bytes, base64 encode them (giving 8 bytes), and prefixing with a 174 letter that is neither "d" nor "e". Another possibility is using 175 some form of UUID.) 176 The ID uniquely identifies a group within the scope of an SDP 177 description. 179 There may be multiple msid attributes on a single SSRC. 181 3. The Msid-Semantic Attribute 183 In order to fully reproduce the semantics of the SDP and SSRC 184 grouping frameworks, a session-level attribute is defined for 185 signalling the semantics associated with an msid grouping. 187 This OPTIONAL attribute gives the message ID and its group semantic. 188 a=msid-semantic: examplefoo LS 190 The ABNF of msid-semantic is: 192 msid-semantic-attr = "msid-semantic:" " " msid token 193 token = 195 The semantic field may hold values from the IANA registries 196 "Semantics for the "ssrc-group" SDP Attribute" and "Semantics for the 197 "group" SDP Attribute". 199 4. Applying Msid to WebRTC Media Streams 201 The semantic for WebRTC Media Streams is "WMS". 203 The value of the msid corresponds to the "id" attribute of a 204 MediaStream. (note: as of Jan 11, 2012, this is called "label". The 205 word "label" means many other things, so the same word should not be 206 used.) 208 In a WebRTC-compatible SDP description, all SSRCs intending to be 209 sent from one peer will be identified in the SDP generated by that 210 entity. 212 The appdata for a WebRTC MediaStreamTrack consists of the track type 213 and the track number; the track type is encoded as the single letter 214 "a" (audio) or "v" (video), and the track number is encoded as a 215 decimal integer with no leading zeroes. The first track is track 216 zero, and is identified as "a0" for audio, and "v0" for video. 218 When an SDP description is updated, a specific msid continues to 219 refer to the same media stream; an msid value MUST NOT be reused for 220 another media stream within a PeerConnection's lifetime. 222 The following are the rules for handling updates of the list of SSRCs 223 and their msid values. 225 o When a new msid value occurs in the description, the recipient can 226 signal to its application that a new media stream has been added. 228 o When a description is updated to have more SSRCs with the same 229 msid value, the recipient can signal to its application that new 230 media stream tracks have been added to the media stream. 232 o When a description is updated to no longer list the msid value on 233 a specific ssrc, the recipient can signal to its application that 234 the corresponding media stream track has been closed. 236 o When a description is updated to no longer list the msid value on 237 any ssrc, the recipient can signal to its application that the 238 media stream has been closed. 240 OPEN ISSUE: Exactly when should the recipient signal that the track 241 is closed? When the msid value disappears from the description, when 242 the SSRC disappears by the rules of RFC 3550 section 6.3.4 (BYE 243 packet received) and 6.3.5 (timeout), any of the above, or some 244 combination of the above? 246 4.1. Handling of non-signalled tracks 248 Pre-WebRTC entities will not send msid. This means that there will 249 be some incoming RTP packets with SSRCs where the recipient does not 250 know about a corresponding MediaStream id. 252 Handling will depend on whether or not any SSRCs are signalled in the 253 relevant RTP session. There are two cases: 255 o No SSRC is signalled with an msid attribute. The SDP session is 256 assumed to be a backwards-compatible session. All incoming SSRCs, 257 on all RTP sessions that are part of the SDP session, are assumed 258 to belong to a single media stream. The ID of this media stream 259 is "default". 261 o Some SSRCs are signalled with an msid attribute. In this case, 262 the session is WebRTC compatible, and the newly arrived SSRCs are 263 either caused by a bug or by timing skew between the arrival of 264 the media packets and the SDP description. These packets MAY be 265 discarded, or they MAY be buffered for a while in order to allow 266 immediate startup of the media stream when the SDP description is 267 updated. The arrival of media packets MUST NOT cause a new 268 MediaStreamTrack to be created. 270 Note: This means that it is wise to include at least one a=ssrc: line 271 with an msid attribute, even when no media streams are yet attached 272 to the session. (Alternative: Mark the RTP session explicitly as "I 273 will signal the media stream tracks explicitly"). 275 It follows from the above that media stream tracks in the "default" 276 media stream cannot be closed by signalling; the application must 277 instead signal these as closed when either an RTCP BYE packet or the 278 absence of media for a defined interval indicates 279 that the stream is gone. 281 5. IANA Considerations 283 This document requests IANA to register the "msid" attribute in the 284 "att-field (source level)" registry within the SDP parameters 285 registry, according to the procedures of [RFC5576] 287 The required information is: 289 o Contact name, email: IETF, contacted via rtcweb@ietf.org, or a 290 successor address designated by IESG 292 o Attribute name: msid 294 o Long-form attribute name: Media stream group Identifier 296 o The attribute value contains only ASCII characters, and is 297 therefore not subject to the charset attribute. 299 o The attribute gives an association over a set of SSRCs, 300 potentially in different RTP sessions. It can be used to signal 301 the relationship between a WebRTC MediaStream and a set of SSRCs. 303 o The details of appropriate values are given in RFC XXXX. 305 This document requests IANA to register the "WMS" semantic within the 306 "Semantics for the "ssrc-group" SDP Attribute" registry within the 307 SDP parameters registry. 309 The required information is: 311 o Description: WebRTC Media Stream, as given in RFC XXXX. 313 o Token: WMS 315 o Standards track reference: RFC XXXX 316 IANA is requested to replace "RFC XXXX" with the RFC number of this 317 document upon publication. 319 6. Security Considerations 321 An adversary with the ability to modify SDP descriptions has the 322 ability to switch around tracks between media streams. This is a 323 special case of the general security consideration that modification 324 of SDP descriptions needs to be confined to entities trusted by the 325 application. 327 No attacks that are relevant to the browser's security have been 328 identified that depend on this mechanism. 330 7. Acknowledgements 332 This note is based on sketches from, among others, Justin Uberti and 333 Cullen Jennings. 335 8. References 337 8.1. Normative References 339 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 340 Requirement Levels", BCP 14, RFC 2119, March 1997. 342 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 343 Specifications: ABNF", STD 68, RFC 5234, January 2008. 345 [RFC5576] Lennox, J., Ott, J., and T. Schierl, "Source-Specific 346 Media Attributes in the Session Description Protocol 347 (SDP)", RFC 5576, June 2009. 349 [W3C.WD-webrtc-20120209] 350 Bergkvist, A., Burnett, D., Narayanan, A., and C. 351 Jennings, "WebRTC 1.0: Real-time Communication Between 352 Browsers", World Wide Web Consortium WD WD-webrtc- 353 20120209, February 2012, 354 . 356 8.2. Informative References 358 [I-D.ietf-mmusic-sdp-bundle-negotiation] 359 Holmberg, C. and H. Alvestrand, "Multiplexing Negotiation 360 Using Session Description Protocol (SDP) Port Numbers", 361 draft-ietf-mmusic-sdp-bundle-negotiation-00 (work in 362 progress), February 2012. 364 [I-D.westerlund-avtcore-multiplex-architecture] 365 Westerlund, M., Burman, B., and C. Perkins, "RTP 366 Multiplexing Architecture", 367 draft-westerlund-avtcore-multiplex-architecture-00 (work 368 in progress), October 2011. 370 [RFC4574] Levin, O. and G. Camarillo, "The Session Description 371 Protocol (SDP) Label Attribute", RFC 4574, August 2006. 373 [RFC5888] Camarillo, G. and H. Schulzrinne, "The Session Description 374 Protocol (SDP) Grouping Framework", RFC 5888, June 2010. 376 Appendix A. Design considerations, open questions and and alternatives 378 This appendix should be deleted before publication as an RFC. 380 One suggested mechanism has been to use CNAME instead of a new 381 attribute. This was abandoned because CNAME identifies a 382 synchronization context; one can imagine both wanting to have tracks 383 from the same synchronization context in multiple media streams and 384 wanting to have tracks from multiple synchronization contexts within 385 one media stream. 387 Another suggestion has been to put the msid value within an attribute 388 of RTCP SR (sender report) packets. This doesn't offer the ability 389 to know that you have seen all the tracks currently configured for a 390 media stream. 392 There has been a suggestion that this mechanism could be used to mute 393 tracks too. This is not done at the moment. 395 The special value "default" and the reservation of "example*" seems 396 bothersome; apart from that, it's a random string. It's uncertain 397 whether "example" has any benefit. 399 An alternative to the "default" media stream is to let each new media 400 stream track without a msid attribute create its own media stream. 401 Input on this question is sought. 403 Discarding of incoming data when the SDP description isn't updated 404 yet (section 3) may cause clipping. However, the same issue exists 405 when crypto keys aren't available. Input sought. 407 There's been a suggestion that acceptable SSRCs should be signalled 408 in a response, giving a recipient the ability to say "no" to certain 409 SSRCs. This is not supported in the current version of this 410 document. 412 This specification reuses the ssrc-group semantics registry for this 413 semantic, on the argument that the WMS purpose is more similar to an 414 SSRC grouping than a session-level grouping, and allows values from 415 both registries, on the argument that some semantics (like LS) are 416 well defined for MSID. Input sought. 418 Appendix B. Change log 420 This appendix should be deleted before publication as an RFC. 422 B.1. Changes from -00 to -01 424 Added track identifier. 426 Added inclusion-by-reference of draft-lennox-mmusic-source-selection 427 for track muting. 429 Some rewording. 431 B.2. Changes from -01 to -02 433 Split document into sections describing a generic grouping mechanism 434 and sections describing the application of this grouping mechanism to 435 the WebRTC MediaStream concept. 437 Removed the mechanism for muting tracks, since this is not central to 438 the MSID mechanism. 440 Author's Address 442 Harald Alvestrand 443 Google 444 Kungsbron 2 445 Stockholm, 11122 446 Sweden 448 Email: harald@alvestrand.no