What does the MSID attribute in the SDP mean?

There is a work in progress in the IETF [1] to define a new MSID attribute to be used in the SDP. This attribute has been defined in the context of WebRTC and it is already being sent by WebRTC endpoints (Firefox and Chrome). This is a typical SDP generated by Chrome:

v=0
o=- 658899108507703479 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ
m=audio 1 RTP/SAVPF 111 103 104 0 8 106 105 13 126
...
a=ssrc:1400694016 cname:Yk4LvPXyWNZKkW6S
a=ssrc:1400694016 msid:FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ a228df45
a=ssrc:1400694016 mslabel:FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ
a=ssrc:1400694016 label:a228df45-515e-49b6-be8f-0d044b65de64
m=video 1 RTP/SAVPF 100 116 117
...
a=ssrc:1484622160 cname:Yk4LvPXyWNZKkW6S
a=ssrc:1484622160 msid:FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ 00f2f3d2
a=ssrc:1484622160 mslabel:FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ
a=ssrc:1484622160 label:00f2f3d2-974e-48a6-b8dc-0f70194949d5
 
But what is it for and why is it needed?

The purpose of the attribute is to group m lines that are related somehow. In the context of WebRTC the idea is to be able to group channels that belongs to the same MediaStream (a MediaStream is one of the WebRTC JavaScript objects) so that if the sender start sending two streams (one with the audio of the speaker and one with the video of shared screen) the recipient will know that those were 2 separate streams and not a single stream with audio and video. That way the number of streams and tracks in the sender (and the IDs of those streams and tracks) is preserved in the receiver.

So in case of webrtc this line:
a=msid-semantic: WMS FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ
means that there is a WebRTC Media Stream (WMS) group identified by that stream id.  

And the line:
a=ssrc:1400694016 msid:FmJZgkjbR2gBS25U0hP3qoUSjvfDddQl4UjJ a228df45
means that there is a media stream with id FmJZ...jJ with an audio track with id a228df45.


[1] http://tools.ietf.org/html/draft-ietf-mmusic-msid-05

Comments

  1. Very good explanation...I am able to understand quickly...thanks a lot

    ReplyDelete

Post a Comment

Popular posts from this blog

Bandwidth Estimation in WebRTC (and the new Sender Side BWE)

Improving Real Time Communications with Machine Learning

Controlling bandwidth usage in WebRTC (and how googSuspendBelowMinBitrate works)