idnits 2.17.1 draft-alvestrand-mmusic-msid-00.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 (September 12, 2012) is 4242 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-01 == Outdated reference: A later version (-03) exists of draft-westerlund-avtcore-multiplex-architecture-02 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 September 12, 2012 5 Expires: March 16, 2013 7 Cross Session Stream Identification in the Session Description Protocol 8 draft-alvestrand-mmusic-msid-00 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 March 16, 2013. 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 . . . . . . . . . . . . . . . . . . 9 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 B.3. Changes from rtcweb-msid-02 to mmusic-msid-00 . . . . . . 11 82 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 11 84 1. Introduction 86 1.1. Why A New Mechanism Is Needed 88 There exist cases where an application using RTP and SDP needs to 89 signal some relationship between RTP media streams (packets carried 90 using a single SSRC) that may be carried in either the same RTP 91 session or different RTP sessions. 93 When all SSRCs are carried in a single RTP session, the "a=ssrc- 94 group" mechanism [RFC5576] can be used. 96 When each RTP session carries one and only one SSRC, the SDP grouping 97 framework [RFC5888] can be used. 99 However, there are use cases (some of which are discussed in 100 [I-D.westerlund-avtcore-multiplex-architecture] ) where neither of 101 these approaches is appropriate; for instance, there may be a need to 102 signal a relationship between a video track in one RTP session and an 103 audio track in another RTP session. In those cases, a new mechanism 104 is needed. 106 (Note: When the bundle mechanism, 107 [I-D.ietf-mmusic-sdp-bundle-negotiation], is used, the extension is 108 still needed to link SSRCs under different m= lines, even when they 109 are in the same RTP session). 111 In addition, there is sometimes the need for an application to 112 specify some application-level information about the association 113 between the SSRC and the group. This is not possible using either of 114 the frameworks above. 116 1.2. Application to the WEBRTC MediaStream 118 The W3C WebRTC API specification [W3C.WD-webrtc-20120209] specifies 119 that communication between WebRTC entities is done via MediaStreams, 120 which contain MediaStreamTracks. A MediaStreamTrack is generally 121 carried using a single SSRC in an RTP session (forming an RTP media 122 stream. The collision of terminology is unfortunate.) There might 123 possibly be additional SSRCs, possibly within additional RTP 124 sessions, in order to support functionality like forward error 125 correction or simulcast. This complication is ignored below. 127 In the RTP specification, media streams are identified using the SSRC 128 field. Streams are grouped into RTP Sessions, and also carry a 129 CNAME. Neither CNAME nor RTP session correspond to a MediaStream. 130 Therefore, the association of an RTP media stream to MediaStreams 131 need to be explicitly signalled. 133 The marking needs to be on a per-SSRC basis, since one RTP session 134 can carry media from multiple MediaStreams, and one MediaStream can 135 have media in multiple RTP sessions. This means that the [RFC4574] 136 "label" attribute, which is used to label RTP sessions, is not usable 137 for this purpose. 139 The marking needs to also carry the unique identifier of the RTP 140 media stream as a MediaStreamTrack within the media stream; this is 141 done using a single letter to identify whether it belongs in the 142 video or audio track list, and the MediaStreamTrack's position within 143 that array. 145 This usage is described in Section 4. 147 2. The Msid Mechanism 149 Grouping of SSRCs is done via an "msid" attribute attached to the 150 SSRC in the SDP description, using the "Source Specific Media 151 Attribute" mechanism [RFC5576]: 152 a=ssrc:1234 msid:examplefoo v1 154 The ID is a randomly-generated string of ASCII characters chosen from 155 0-9, a-z, A-Z and - (hyphen), consisting of between 1 and 64 156 characters. It MUST be unique among the ID values used in the same 157 SDP session. 159 The value "default" (all lower case) has special meaning, and MUST 160 NOT be generated. Values starting with "example" (all lower case) 161 are reserved for documentation, and MUST NOT be generated by an 162 implementation. 164 Application data is carried on the same line as the ID, separated 165 from the ID by a space. 167 ABNF [RFC5234] grammar: 169 msidattribute = "msid:" identifier [ " " appdata ] 170 identifier = 1*64 ("0".."9" / "a".."z" / "-") 171 appdata = 1*64 ("0".."9" / "a".."z" / "-") 173 (Note: one possible generation algorithm is to generate 6 random 174 bytes, base64 encode them (giving 8 bytes), and prefixing with a 175 letter that is neither "d" nor "e". Another possibility is using 176 some form of UUID.) 177 The ID uniquely identifies a group within the scope of an SDP 178 description. 180 There may be multiple msid attributes on a single SSRC. There may 181 also be multiple SSRCs that have the same value for identifier and 182 appdata. 184 3. The Msid-Semantic Attribute 186 In order to fully reproduce the semantics of the SDP and SSRC 187 grouping frameworks, a session-level attribute is defined for 188 signalling the semantics associated with an msid grouping. 190 This OPTIONAL attribute gives the message ID and its group semantic. 191 a=msid-semantic: examplefoo LS 193 The ABNF of msid-semantic is: 195 msid-semantic-attr = "msid-semantic:" " " msid token 196 token = 198 The semantic field may hold values from the IANA registries 199 "Semantics for the "ssrc-group" SDP Attribute" and "Semantics for the 200 "group" SDP Attribute". 202 4. Applying Msid to WebRTC Media Streams 204 The semantic for WebRTC Media Streams is "WMS". 206 The value of the msid corresponds to the "id" attribute of a 207 MediaStream. (note: as of Jan 11, 2012, this is called "label". The 208 word "label" means many other things, so the same word should not be 209 used.) 211 In a WebRTC-compatible SDP description, all SSRCs intending to be 212 sent from one peer will be identified in the SDP generated by that 213 entity. 215 The appdata for a WebRTC MediaStreamTrack consists of the track type 216 and the track number; the track type is encoded as the single letter 217 "a" (audio) or "v" (video), and the track number is encoded as a 218 decimal integer with no leading zeroes. The first track is track 219 zero, and is identified as "a0" for audio, and "v0" for video. 221 If two different SSRCs have the same value for identifier and 222 appdata, it means that these two SSRCs are both intended for the same 223 MediaStreamTrack. This may occur if the sender wishes to use 224 simulicast or forward error correction, or if the sender intends to 225 switch between mulitple codecs on the same MediaStreamTrack. 227 When an SDP description is updated, a specific msid continues to 228 refer to the same media stream; an msid value MUST NOT be reused for 229 another media stream within a PeerConnection's lifetime. 231 The following are the rules for handling updates of the list of SSRCs 232 and their msid values. 234 o When a new msid value occurs in the description, the recipient can 235 signal to its application that a new media stream has been added. 237 o When a description is updated to have more SSRCs with the same 238 msid value, the recipient can signal to its application that new 239 media stream tracks have been added to the media stream. 241 o When a description is updated to no longer list the msid value on 242 a specific ssrc, the recipient can signal to its application that 243 the corresponding media stream track has been closed. 245 o When a description is updated to no longer list the msid value on 246 any ssrc, the recipient can signal to its application that the 247 media stream has been closed. 249 OPEN ISSUE: Exactly when should the recipient signal that the track 250 is closed? When the msid value disappears from the description, when 251 the SSRC disappears by the rules of [RFC3550] section 6.3.4 (BYE 252 packet received) and 6.3.5 (timeout), any of the above, or some 253 combination of the above? 255 4.1. Handling of non-signalled tracks 257 Pre-WebRTC entities will not send msid. This means that there will 258 be some incoming RTP packets with SSRCs where the recipient does not 259 know about a corresponding MediaStream id. 261 Handling will depend on whether or not any SSRCs are signalled in the 262 relevant RTP session. There are two cases: 264 o No SSRC is signalled with an msid attribute. The SDP session is 265 assumed to be a backwards-compatible session. All incoming SSRCs, 266 on all RTP sessions that are part of the SDP session, are assumed 267 to belong to a single media stream. The ID of this media stream 268 is "default". 270 o Some SSRCs are signalled with an msid attribute. In this case, 271 the session is WebRTC compatible, and the newly arrived SSRCs are 272 either caused by a bug or by timing skew between the arrival of 273 the media packets and the SDP description. These packets MAY be 274 discarded, or they MAY be buffered for a while in order to allow 275 immediate startup of the media stream when the SDP description is 276 updated. The arrival of media packets MUST NOT cause a new 277 MediaStreamTrack to be signalled. 279 Note: This means that it is wise to include at least one a=ssrc: line 280 with an msid attribute, even when no media streams are yet attached 281 to the session. (Alternative: Mark the RTP session explicitly as "I 282 will signal the media stream tracks explicitly"). 284 It follows from the above that media stream tracks in the "default" 285 media stream cannot be closed by signalling; the application must 286 instead signal these as closed when the SSRC disappears according to 287 the rules of RFC 3550 section 6.3.4 and 6.3.5. 289 5. IANA Considerations 291 This document requests IANA to register the "msid" attribute in the 292 "att-field (source level)" registry within the SDP parameters 293 registry, according to the procedures of [RFC5576] 295 The required information is: 297 o Contact name, email: IETF, contacted via rtcweb@ietf.org, or a 298 successor address designated by IESG 300 o Attribute name: msid 302 o Long-form attribute name: Media stream group Identifier 304 o The attribute value contains only ASCII characters, and is 305 therefore not subject to the charset attribute. 307 o The attribute gives an association over a set of SSRCs, 308 potentially in different RTP sessions. It can be used to signal 309 the relationship between a WebRTC MediaStream and a set of SSRCs. 311 o The details of appropriate values are given in RFC XXXX. 313 This document requests IANA to register the "WMS" semantic within the 314 "Semantics for the "ssrc-group" SDP Attribute" registry within the 315 SDP parameters registry. 317 The required information is: 319 o Description: WebRTC Media Stream, as given in RFC XXXX. 321 o Token: WMS 323 o Standards track reference: RFC XXXX 325 IANA is requested to replace "RFC XXXX" with the RFC number of this 326 document upon publication. 328 6. Security Considerations 330 An adversary with the ability to modify SDP descriptions has the 331 ability to switch around tracks between media streams. This is a 332 special case of the general security consideration that modification 333 of SDP descriptions needs to be confined to entities trusted by the 334 application. 336 No attacks that are relevant to the browser's security have been 337 identified that depend on this mechanism. 339 7. Acknowledgements 341 This note is based on sketches from, among others, Justin Uberti and 342 Cullen Jennings. 344 8. References 346 8.1. Normative References 348 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 349 Requirement Levels", BCP 14, RFC 2119, March 1997. 351 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 352 Jacobson, "RTP: A Transport Protocol for Real-Time 353 Applications", STD 64, RFC 3550, July 2003. 355 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 356 Specifications: ABNF", STD 68, RFC 5234, January 2008. 358 [RFC5576] Lennox, J., Ott, J., and T. Schierl, "Source-Specific 359 Media Attributes in the Session Description Protocol 360 (SDP)", RFC 5576, June 2009. 362 [W3C.WD-webrtc-20120209] 363 Bergkvist, A., Burnett, D., Narayanan, A., and C. 364 Jennings, "WebRTC 1.0: Real-time Communication Between 365 Browsers", World Wide Web Consortium WD WD-webrtc- 366 20120209, February 2012, 367 . 369 8.2. Informative References 371 [I-D.ietf-mmusic-sdp-bundle-negotiation] 372 Holmberg, C. and H. Alvestrand, "Multiplexing Negotiation 373 Using Session Description Protocol (SDP) Port Numbers", 374 draft-ietf-mmusic-sdp-bundle-negotiation-01 (work in 375 progress), August 2012. 377 [I-D.westerlund-avtcore-multiplex-architecture] 378 Westerlund, M., Burman, B., Perkins, C., and H. 379 Alvestrand, "Guidelines for using the Multiplexing 380 Features of RTP", 381 draft-westerlund-avtcore-multiplex-architecture-02 (work 382 in progress), July 2012. 384 [RFC4574] Levin, O. and G. Camarillo, "The Session Description 385 Protocol (SDP) Label Attribute", RFC 4574, August 2006. 387 [RFC5888] Camarillo, G. and H. Schulzrinne, "The Session Description 388 Protocol (SDP) Grouping Framework", RFC 5888, June 2010. 390 Appendix A. Design considerations, open questions and and alternatives 392 This appendix should be deleted before publication as an RFC. 394 One suggested mechanism has been to use CNAME instead of a new 395 attribute. This was abandoned because CNAME identifies a 396 synchronization context; one can imagine both wanting to have tracks 397 from the same synchronization context in multiple media streams and 398 wanting to have tracks from multiple synchronization contexts within 399 one media stream. 401 Another suggestion has been to put the msid value within an attribute 402 of RTCP SR (sender report) packets. This doesn't offer the ability 403 to know that you have seen all the tracks currently configured for a 404 media stream. 406 There has been a suggestion that this mechanism could be used to mute 407 tracks too. This is not done at the moment. 409 The special value "default" and the reservation of "example*" seems 410 bothersome; apart from that, it's a random string. It's uncertain 411 whether "example" has any benefit. 413 An alternative to the "default" media stream is to let each new media 414 stream track without a msid attribute create its own media stream. 415 Input on this question is sought. 417 Discarding of incoming data when the SDP description isn't updated 418 yet (section 3) may cause clipping. However, the same issue exists 419 when crypto keys aren't available. Input sought. 421 There's been a suggestion that acceptable SSRCs should be signalled 422 in a response, giving a recipient the ability to say "no" to certain 423 SSRCs. This is not supported in the current version of this 424 document. 426 This specification reuses the ssrc-group semantics registry for this 427 semantic, on the argument that the WMS purpose is more similar to an 428 SSRC grouping than a session-level grouping, and allows values from 429 both registries, on the argument that some semantics (like LS) are 430 well defined for MSID. Input sought. 432 Appendix B. Change log 434 This appendix should be deleted before publication as an RFC. 436 B.1. Changes from -00 to -01 438 Added track identifier. 440 Added inclusion-by-reference of draft-lennox-mmusic-source-selection 441 for track muting. 443 Some rewording. 445 B.2. Changes from -01 to -02 447 Split document into sections describing a generic grouping mechanism 448 and sections describing the application of this grouping mechanism to 449 the WebRTC MediaStream concept. 451 Removed the mechanism for muting tracks, since this is not central to 452 the MSID mechanism. 454 B.3. Changes from rtcweb-msid-02 to mmusic-msid-00 456 Changed the draft name according to the wishes of the MMUSIC group 457 chairs. 459 Added text indicting cases where it's appropriate to have the same 460 appdata for mulitple SSRCs. 462 Minor textual updates. 464 Author's Address 466 Harald Alvestrand 467 Google 468 Kungsbron 2 469 Stockholm, 11122 470 Sweden 472 Email: harald@alvestrand.no