Search code examples
video-streamingwebrtcopentoktokbox

Opentok publisher bitrate is dependent on subscribers' bitrate


Below is my pre-call test results: Expected Call Quality 1.7 / 5.0 Supported Resolution: 1280x720 @ 30 fps. 0% video packet loss. Video Bitrate: 655kbps.

I am streaming a 200kbps video. And this should be able to stream without any problem. The problem is when I join as subscribers to this channel the publisher's bit rate seems to drop (match the mean of the viewers' bitrate). Naturally, bringing down the video quality for everyone on the call. The session is ROUTED and according to my understanding publishers' bitrate should be constant and opentok server should stream video with the appropriate bitrate to viewers (subscribers), instead it decreases the quality of the entire session. Below is a screenshot of opentok's session inspector.

enter image description here


Solution

  • Unless you are using VP8 Simulcast streaming, which implies RTCP-Termination on SFU servers like Opentok's one, rate-control happens end-to-end from publisher to subscriber. Hence, without simulcast enabled and thus without RTCP-Termination, Publishers stream video with bitrate adapted to the worst of the subscribers' connections. Hence, it is correct, publisher bitrate being dependent on subscribers' bitrate is normal without simulcast.

    At the same time, I don't recommend you to use 720p resolutions if in any of the cases you cannot get beyond 1mbps...