Simulcast
Also written a=simulcast, sendEncodings, RID
Encoding one camera at several resolutions at once and sending all of them, so a forwarding server can hand each viewer a layer without transcoding.
A conference has one sender and many receivers on wildly different links. Encode once at high quality and the person on a train drops packets. Encode once at low quality and everyone else looks at mush. Transcode in the middle and you pay for a decoder and an encoder per participant.
Simulcast takes the third option off the table. The sender encodes the same source two or three times, at different resolutions and bitrates, and sends each as its own RTP stream inside one m= section. Each stream carries a RID so the receiver can tell them apart. The forwarding server then just picks which one to relay per viewer, and never touches the media.
In the browser you configure it with sendEncodings in addTransceiver(), one entry per layer, with scaleResolutionDownBy setting the ladder.
The obvious cost is upstream bandwidth and CPU on the sender, who now pays for every layer whether anyone watches it or not.
Specs
See also
Read more
- WebRTC bitrate stuck low? maxBitrate is only a ceilingYou set maxBitrate to 2.5 Mbps and WebRTC sends 700 kbps. The congestion controller picks the rate. How GCC decides, and which getStats fields show why.
- Stop munging SDP: the WebRTC APIs that replace itEditing SDP before setLocalDescription breaks the WebRTC spec and still works in every browser. The API that replaces each munge, and the one case with none.
- Why WebRTC video freezes, and how getStats tells youWebRTC video freezes come from loss, keyframe waits, jitter or dropped frames. The getStats counters that tell them apart, and the fix for each.