Network Working Group | H. T. Alvestrand |
Internet-Draft | |
Intended status: Standards Track | September 12, 2012 |
Expires: March 14, 2013 |
Cross Session Stream Identification in the Session Description Protocol
draft-alvestrand-mmusic-msid-00
This document specifies a grouping mechanism for RTP media streams that can be used to specify relations betweeen media streams within different RTP sessions.
This mechanism is used to signal the association between the RTP concept of SSRC and the WebRTC concept of "media stream" / "media stream track" using SDP signalling.
This document is an input document for discussion. It should be discussed in the RTCWEB WG list, rtcweb@ietf.org.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http:/⁠/⁠datatracker.ietf.org/⁠drafts/⁠current/⁠.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 14, 2013.
Copyright (c) 2012 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http:/⁠/⁠trustee.ietf.org/⁠license-⁠info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
There exist cases where an application using RTP and SDP needs to signal some relationship between RTP media streams (packets carried using a single SSRC) that may be carried in either the same RTP session or different RTP sessions.
When all SSRCs are carried in a single RTP session, the "a=ssrc-group" mechanism [RFC5576] can be used.
When each RTP session carries one and only one SSRC, the SDP grouping framework [RFC5888] can be used.
However, there are use cases (some of which are discussed in [I-D.westerlund-avtcore-multiplex-architecture] ) where neither of these approaches is appropriate; for instance, there may be a need to signal a relationship between a video track in one RTP session and an audio track in another RTP session. In those cases, a new mechanism is needed.
(Note: When the bundle mechanism, [I-D.ietf-mmusic-sdp-bundle-negotiation], is used, the extension is still needed to link SSRCs under different m= lines, even when they are in the same RTP session).
In addition, there is sometimes the need for an application to specify some application-level information about the association between the SSRC and the group. This is not possible using either of the frameworks above.
The W3C WebRTC API specification [W3C.WD-webrtc-20120209] specifies that communication between WebRTC entities is done via MediaStreams, which contain MediaStreamTracks. A MediaStreamTrack is generally carried using a single SSRC in an RTP session (forming an RTP media stream. The collision of terminology is unfortunate.) There might possibly be additional SSRCs, possibly within additional RTP sessions, in order to support functionality like forward error correction or simulcast. This complication is ignored below.
In the RTP specification, media streams are identified using the SSRC field. Streams are grouped into RTP Sessions, and also carry a CNAME. Neither CNAME nor RTP session correspond to a MediaStream. Therefore, the association of an RTP media stream to MediaStreams need to be explicitly signalled.
The marking needs to be on a per-SSRC basis, since one RTP session can carry media from multiple MediaStreams, and one MediaStream can have media in multiple RTP sessions. This means that the [RFC4574] "label" attribute, which is used to label RTP sessions, is not usable for this purpose.
The marking needs to also carry the unique identifier of the RTP media stream as a MediaStreamTrack within the media stream; this is done using a single letter to identify whether it belongs in the video or audio track list, and the MediaStreamTrack's position within that array.
This usage is described in Section 4.
Grouping of SSRCs is done via an "msid" attribute attached to the SSRC in the SDP description, using the "Source Specific Media Attribute" mechanism [RFC5576]:
a=ssrc:1234 msid:examplefoo v1
The ID is a randomly-generated string of ASCII characters chosen from 0-9, a-z, A-Z and - (hyphen), consisting of between 1 and 64 characters. It MUST be unique among the ID values used in the same SDP session.
The value "default" (all lower case) has special meaning, and MUST NOT be generated. Values starting with "example" (all lower case) are reserved for documentation, and MUST NOT be generated by an implementation.
Application data is carried on the same line as the ID, separated from the ID by a space.
ABNF [RFC5234] grammar:
msidattribute = "msid:" identifier [ " " appdata ] identifier = 1*64 ("0".."9" / "a".."z" / "-") appdata = 1*64 ("0".."9" / "a".."z" / "-")
(Note: one possible generation algorithm is to generate 6 random bytes, base64 encode them (giving 8 bytes), and prefixing with a letter that is neither "d" nor "e". Another possibility is using some form of UUID.)
The ID uniquely identifies a group within the scope of an SDP description.
There may be multiple msid attributes on a single SSRC. There may also be multiple SSRCs that have the same value for identifier and appdata.
In order to fully reproduce the semantics of the SDP and SSRC grouping frameworks, a session-level attribute is defined for signalling the semantics associated with an msid grouping.
This OPTIONAL attribute gives the message ID and its group semantic.
a=msid-semantic: examplefoo LS
The ABNF of msid-semantic is:
msid-semantic-attr = "msid-semantic:" " " msid token token = <as defined in RFC 4566>
The semantic field may hold values from the IANA registries "Semantics for the "ssrc-group" SDP Attribute" and "Semantics for the "group" SDP Attribute".
The semantic for WebRTC Media Streams is "WMS".
The value of the msid corresponds to the "id" attribute of a MediaStream. (note: as of Jan 11, 2012, this is called "label". The word "label" means many other things, so the same word should not be used.)
In a WebRTC-compatible SDP description, all SSRCs intending to be sent from one peer will be identified in the SDP generated by that entity.
The appdata for a WebRTC MediaStreamTrack consists of the track type and the track number; the track type is encoded as the single letter "a" (audio) or "v" (video), and the track number is encoded as a decimal integer with no leading zeroes. The first track is track zero, and is identified as "a0" for audio, and "v0" for video.
If two different SSRCs have the same value for identifier and appdata, it means that these two SSRCs are both intended for the same MediaStreamTrack. This may occur if the sender wishes to use simulicast or forward error correction, or if the sender intends to switch between mulitple codecs on the same MediaStreamTrack.
When an SDP description is updated, a specific msid continues to refer to the same media stream; an msid value MUST NOT be reused for another media stream within a PeerConnection's lifetime.
The following are the rules for handling updates of the list of SSRCs and their msid values.
[RFC3550] section 6.3.4 (BYE packet received) and 6.3.5 (timeout), any of the above, or some combination of the above?
OPEN ISSUE: Exactly when should the recipient signal that the track is closed? When the msid value disappears from the description, when the SSRC disappears by the rules of
Pre-WebRTC entities will not send msid. This means that there will be some incoming RTP packets with SSRCs where the recipient does not know about a corresponding MediaStream id.
Handling will depend on whether or not any SSRCs are signalled in the relevant RTP session. There are two cases:
Note: This means that it is wise to include at least one a=ssrc: line with an msid attribute, even when no media streams are yet attached to the session. (Alternative: Mark the RTP session explicitly as "I will signal the media stream tracks explicitly").
It follows from the above that media stream tracks in the "default" media stream cannot be closed by signalling; the application must instead signal these as closed when the SSRC disappears according to the rules of RFC 3550 section 6.3.4 and 6.3.5.
This document requests IANA to register the "msid" attribute in the "att-field (source level)" registry within the SDP parameters registry, according to the procedures of [RFC5576]
The required information is:
This document requests IANA to register the "WMS" semantic within the "Semantics for the "ssrc-group" SDP Attribute" registry within the SDP parameters registry.
The required information is:
IANA is requested to replace "RFC XXXX" with the RFC number of this document upon publication.
An adversary with the ability to modify SDP descriptions has the ability to switch around tracks between media streams. This is a special case of the general security consideration that modification of SDP descriptions needs to be confined to entities trusted by the application.
No attacks that are relevant to the browser's security have been identified that depend on this mechanism.
This note is based on sketches from, among others, Justin Uberti and Cullen Jennings.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. |
[RFC3550] | Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003. |
[RFC5576] | Lennox, J., Ott, J. and T. Schierl, "Source-Specific Media Attributes in the Session Description Protocol (SDP)", RFC 5576, June 2009. |
[RFC5234] | Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008. |
[W3C.WD-webrtc-20120209] | Bergkvist, A., Burnett, D., Narayanan, A. and C. Jennings, "WebRTC 1.0: Real-time Communication Between Browsers", World Wide Web Consortium WD WD-webrtc-20120209, February 2012. |
[RFC4574] | Levin, O. and G. Camarillo, "The Session Description Protocol (SDP) Label Attribute", RFC 4574, August 2006. |
[RFC5888] | Camarillo, G. and H. Schulzrinne, "The Session Description Protocol (SDP) Grouping Framework", RFC 5888, June 2010. |
[I-D.westerlund-avtcore-multiplex-architecture] | Westerlund, M, Burman, B and C Perkins, "RTP Multiplexing Architecture", Internet-Draft draft-westerlund-avtcore-multiplex-architecture-00, October 2011. |
[I-D.ietf-mmusic-sdp-bundle-negotiation] | Holmberg, C and H Alvestrand, "Multiplexing Negotiation Using Session Description Protocol (SDP) Port Numbers", Internet-Draft draft-ietf-mmusic-sdp-bundle-negotiation-00, February 2012. |
This appendix should be deleted before publication as an RFC.
One suggested mechanism has been to use CNAME instead of a new attribute. This was abandoned because CNAME identifies a synchronization context; one can imagine both wanting to have tracks from the same synchronization context in multiple media streams and wanting to have tracks from multiple synchronization contexts within one media stream.
Another suggestion has been to put the msid value within an attribute of RTCP SR (sender report) packets. This doesn't offer the ability to know that you have seen all the tracks currently configured for a media stream.
There has been a suggestion that this mechanism could be used to mute tracks too. This is not done at the moment.
The special value "default" and the reservation of "example*" seems bothersome; apart from that, it's a random string. It's uncertain whether "example" has any benefit.
An alternative to the "default" media stream is to let each new media stream track without a msid attribute create its own media stream. Input on this question is sought.
Discarding of incoming data when the SDP description isn't updated yet (section 3) may cause clipping. However, the same issue exists when crypto keys aren't available. Input sought.
There's been a suggestion that acceptable SSRCs should be signalled in a response, giving a recipient the ability to say "no" to certain SSRCs. This is not supported in the current version of this document.
This specification reuses the ssrc-group semantics registry for this semantic, on the argument that the WMS purpose is more similar to an SSRC grouping than a session-level grouping, and allows values from both registries, on the argument that some semantics (like LS) are well defined for MSID. Input sought.
This appendix should be deleted before publication as an RFC.
Added track identifier.
Added inclusion-by-reference of draft-lennox-mmusic-source-selection for track muting.
Some rewording.
Split document into sections describing a generic grouping mechanism and sections describing the application of this grouping mechanism to the WebRTC MediaStream concept.
Removed the mechanism for muting tracks, since this is not central to the MSID mechanism.
Changed the draft name according to the wishes of the MMUSIC group chairs.
Added text indicting cases where it's appropriate to have the same appdata for mulitple SSRCs.
Minor textual updates.