Skip to main content

Signalling Media Stream ID in the Session Description Protocol
draft-alvestrand-rtcweb-msid-01

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Replaced".
Author Harald T. Alvestrand
Last updated 2012-01-25 (Latest revision 2012-01-11)
Replaced by draft-alvestrand-mmusic-msid
RFC stream (None)
Formats
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-alvestrand-rtcweb-msid-01
Network Working Group                                      H. Alvestrand
Internet-Draft                                                    Google
Intended status: Standards Track                        January 25, 2012
Expires: July 28, 2012

     Signalling Media Stream ID in the Session Description Protocol
                    draft-alvestrand-rtcweb-msid-01

Abstract

   This document specifies how the association between the RTP concept
   of SSRC and the WebRTC concept of "media stream" / "media stream
   track" is carried using SDP signalling.

   This document is an input document for discussion.  It should be
   discussed in the RTCWEB WG list, rtcweb@ietf.org.

Requirements Language

   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].

Status of this Memo

   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 July 28, 2012.

Copyright Notice

   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

Alvestrand                Expires July 28, 2012                 [Page 1]
Internet-Draft                 MSID in SDP                  January 2012

   (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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3
   2.  Basic mechanism . . . . . . . . . . . . . . . . . . . . . . . . 3
   3.  Signalling muted and non-desired tracks . . . . . . . . . . . . 5
   4.  Handling of non-signalled tracks  . . . . . . . . . . . . . . . 5
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
   6.  Security Considerations . . . . . . . . . . . . . . . . . . . . 7
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 7
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . . . 7
     8.1.  Normative References  . . . . . . . . . . . . . . . . . . . 7
     8.2.  Informative References  . . . . . . . . . . . . . . . . . . 8
   Appendix A.  Design considerations, open questions and and
                alternatives . . . . . . . . . . . . . . . . . . . . . 8
   Appendix B.  Change log . . . . . . . . . . . . . . . . . . . . . . 8
     B.1.  Changes from -00 to -01 . . . . . . . . . . . . . . . . . . 9
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . . 9

Alvestrand                Expires July 28, 2012                 [Page 2]
Internet-Draft                 MSID in SDP                  January 2012

1.  Introduction

   The W3C WebRTC API specification [W3C.WD-webrtc-20111027] 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.  There might possibly
   with additional SSRCs, possibly within additional RTP sessions, in
   order to support functionality like forward error correction or
   simulcast.  This complication is ignored below.

   One SSRC may utilize multiple codecs, such as an audio track
   switching between audio, comfort noise and DTMF.  An SSRC MUST NOT
   switch between media types (no switching between audio and video, for
   instance)

   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.

2.  Basic mechanism

   Association of the MediaStream to the SSRC 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 msid is a string of ASCII characters chosen from 0-9, a-z, A-Z
   and - (hyphen), consisting of between 1 and 64 characters.  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.

Alvestrand                Expires July 28, 2012                 [Page 3]
Internet-Draft                 MSID in SDP                  January 2012

   After the msid, there is a track identifier, denoting the index at
   which this track appears in the respective track list.  The track
   identifier is prefixed with "a" for audio, or "v" for video.

   ABNF[RFC5234] grammar:

     msidattribute = "msid:" identifier " " trackid
     identifier = 1*64 ("0".."9" / "a".."z" / "-")
     trackid = ("v" / "a" "1".."9" *8("0".."9")

   (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 msid uniquely identifies a media stream within the scope of an
   SDP description.  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 an SDP session's lifetime.

   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 following are the rules for handling updates of the list of SSRCs
   and their msid values.

   o  When a new msid value occurs in the description, the recipient can
      signal to its application that a new media stream has been added.

   o  When a description is updated to have more SSRCs with the same
      msid value, the recipient can signal to its application that new
      media stream tracks have been added to the media stream.

   o  When a description is updated to no longer list the msid value on
      a specific ssrc, the recipient can signal to its application that
      the corresponding media stream track has been closed

   o  When a description is updated to no longer list the msid value on
      any ssrc, the recipient can signal to its application that the
      media stream track has been closed.

Alvestrand                Expires July 28, 2012                 [Page 4]
Internet-Draft                 MSID in SDP                  January 2012

   OPEN ISSUE: Exactly when should the recipient signal that the track
   is closed?  When the msid value disappears from the description, when
   a BYE packet is received, when a timeout passes with no media, any of
   the above, or some combination of the above?

3.  Signalling muted and non-desired tracks

   In addition to identifying the track, there is a need for specifying
   whether or not a track is muted by the sender (that is, the track
   still exists, but is not sending data at the moment), whether the
   track is muted by the recipient (that is, the track is OK to receive,
   but it is useless to send data on it now because the recipient is not
   listening, or rejected by the recipient (that is, for some reason the
   recipient is unwilling or unable to receive the track).

   This is accomplished using the mechanisms from
   [I-D.lennox-mmusic-sdp-source-selection], in particular these
   constructs:

   o  a=remote-ssrc:<SSRC> recv:off - recipient does not wish to receive
      data

   o  a=SSRC:<SSRC> sending:off - sender is not currently sending data

   o  If some sources are present with a=remote-ssrc:<SSRC> attributes,
      section 8 of the referenced draft states that the other SSRCs
      SHOULD be regarded as rejected by the receiver.

   An implementation compliant with this specification MUST also comply
   with all requirements of [I-D.lennox-mmusic-sdp-source-selection].

4.  Handling of non-signalled tracks

   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:

   o  No SSRC is signalled with an msid attribute.  The SDP session is
      assumed to be a backwards-compatible session.  All incoming SSRCs,
      on all RTP sessions that are part of the SDP session, are assumed
      to belong to a single media stream.  The ID of this media stream
      is "default".

Alvestrand                Expires July 28, 2012                 [Page 5]
Internet-Draft                 MSID in SDP                  January 2012

   o  Some SSRCs are signalled with an msid attribute.  In this case,
      the session is WebRTC compatible, and the newly arrived SSRCs are
      either caused by a bug or by timing skew between the arrival of
      the media packets and the SDP description.  These packets MAY be
      discarded, or they MAY be buffered for a while in order to allow
      immediate startup of the media stream when the SDP description is
      updated.  The arrival of media packets MUST NOT cause a new
      MediaStreamTrack to be created.

   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 either an RTCP BYE packet or the
   absence of media for a defined interval <what interval?> indicates
   that the stream is gone.

5.  IANA Considerations

   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:

   o  Contact name, email: IETF, contacted via rtcweb@ietf.org, or a
      successor address designated by IESG

   o  Attribute name: msid

   o  Long-form attribute name: Media Stream Identifier

   o  The attribute value contains only ASCII characters, and is
      therefore not subject to the charset attribute.

   o  The attribute gives an association between a WebRTC MediaStream
      and an SSRC.

   o  The details of appropriate values are given in RFC XXXX.

   IANA is requested to replace "RFC XXXX" with the RFC number of this
   document upon publication.

Alvestrand                Expires July 28, 2012                 [Page 6]
Internet-Draft                 MSID in SDP                  January 2012

6.  Security Considerations

   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.

7.  Acknowledgements

   This note is based on sketches from, among others, Justin Uberti and
   Cullen Jennings.

8.  References

8.1.  Normative References

   [I-D.lennox-mmusic-sdp-source-selection]
              Lennox, J. and H. Schulzrinne, "Mechanisms for Media
              Source Selection in the Session Description Protocol
              (SDP)", draft-lennox-mmusic-sdp-source-selection-02 (work
              in progress), October 2010.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC5234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", STD 68, RFC 5234, January 2008.

   [RFC5576]  Lennox, J., Ott, J., and T. Schierl, "Source-Specific
              Media Attributes in the Session Description Protocol
              (SDP)", RFC 5576, June 2009.

   [W3C.WD-webrtc-20111027]
              Burnett, D., Bergkvist, A., Jennings, C., and A.
              Narayanan, "WebRTC 1.0: Real-time Communication Between
              Browsers", World Wide Web Consortium WD WD-webrtc-
              20111027, October 2011,
              <http://www.w3.org/TR/2011/WD-webrtc-20111027>.

Alvestrand                Expires July 28, 2012                 [Page 7]
Internet-Draft                 MSID in SDP                  January 2012

8.2.  Informative References

   [RFC4574]  Levin, O. and G. Camarillo, "The Session Description
              Protocol (SDP) Label Attribute", RFC 4574, August 2006.

Appendix A.  Design considerations, open questions and and alternatives

   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.

Appendix B.  Change log

   This appendix should be deleted before publication as an RFC.

Alvestrand                Expires July 28, 2012                 [Page 8]
Internet-Draft                 MSID in SDP                  January 2012

B.1.  Changes from -00 to -01

   Added track identifier.

   Added inclusion-by-reference of draft-lennox-mmusic-source-selection
   for track muting.

   Some rewording.

Author's Address

   Harald Alvestrand
   Google
   Kungsbron 2
   Stockholm,   11122
   Sweden

   Email: harald@alvestrand.no

Alvestrand                Expires July 28, 2012                 [Page 9]