In WebRTC, the MSID corresponds to the ID of a MediaStream or WebRTC MediaStream (WMS). As mentioned within our MST article a MediaStream can be composed of zero or many MediaStreamTracks, where one MediaStreamTrack corresponds to each of the media sources or channels. To better understand how MediaStreamTracks are synchronized within callstats.js you can read this blogpost.
In a WebRTC-compatible SDP description, all SSRCs intending to be sent from one peer will be identified in the SDP generated by the entity. You can read more about SSRC in this article.
The purpose of the MSID attribute in SDP is to group channels or SSRCs that belongs to the same MediaStream, so if a peer sends two streams, one for audio and one for video, the remote peer will know that 2 separate streams were sent and not a single stream with audio and video.
The number of streams and tracks in the sender is preserved in the receiver.
You can look at the following extract of an SDP message generated at one peer:
v=0 o=- 6903256947412196210 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS 00ae2839-cc99-4b32-b806-2544373c5fe1 m=audio 56921 RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126 … a=ssrc:3904081438 cname:9L+yOhOTfYBk4bhY a=ssrc:3904081438 msid:00ae2839-cc99-4b32-b806-2544373c5fe1 m=video 9 RTP/SAVPF 96 97 98 99 127 123 125 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 … a=ssrc:1024745001 cname:9L+yOhOTfYBk4bhY a=ssrc:1024745001 msid:00ae2839-cc99-4b32-b806-2544373c5fe1
Where the line a=msid-semantic: WMS 00ae2839-cc99-4b32-b806-2544373c5fe1
means that there is a WMS group identified by the stream ID 00ae2839-cc99-4b32-b806-2544373c5fe1
And the line: a=ssrc:3904081438 msid:00ae2839-cc99-4b32-b806-2544373c5fe1 means that there is a media stream with ID 00ae2839… with an audio track identified by the SSRC 3904081438.
Comments
0 comments
Please sign in to leave a comment.