Bandwidth control

494 views
Skip to first unread message

robert.corolea...@gmail.com

unread,
Oct 29, 2015, 4:29:58 AM10/29/15
to kurento
Hello!

I have a scenario where a user sends a video stream through WebRtc to many viewers. I am trying to send the video with a high bandwidth but it seems its caped at 500-600 Kbps. I tried using the setMaxVideoSendBandwidth, setMinVideoSendBandwidth, setMaxVideoRecvBandwidth, setMaxVideoRecvBandwidth methods but they don't seem to work at all(unless I specify a value lower than 500 to minBandwith). Are these methods bugged or am I doing something wrong?
Also, is Kurento still using the "adapt to the worst receiver" method for its adaptive bandwith control or is each viewer getting its own bandwidth based on his connection?

Thank you in advance!
Corolea Robert.

Luis Lopez

unread,
Oct 29, 2015, 4:37:48 AM10/29/15
to kur...@googlegroups.com
Please,
Share with us the structure of your pipeline and the code where you set the BW constraints in the different WebRtcEndpoints so that we can evaluate where is your problem.

By default (i.e. if the BW constraints do not command other behavior) KMS shall drop incoming BW to the worst of the outgoing BW being announced by receiving browsers.

Best.

Luis Lopez
Kurento.org Project Coordinator
tel +34 914 888 713tel lu...@kurento.comtel prof.luis.lopez • twitter linkedin blog youtube

Kurento.org logo

Best WoW Factor Award at WebRTC Conference & Expo 2014 (California)
Award

Audience Choice Award at WebRTC Conference & Expo 2014 (California)
Award

Best of Show Award at WebRTC conference expo 2014 (Paris)
Award



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

robert.corolea...@gmail.com

unread,
Oct 29, 2015, 5:01:00 AM10/29/15
to kurento
Thank you for the quick answer!
My structure is something like this:
*streamer connects->create pipeline->create WebRtcEndpoint->the min/max bandwidth ->ICE and SDP.
*viewer connects->get streamer pipeline->create WebRtcEndpoint->set min/max bandwidth->connect to streamer endpoint->ICE and SDP.

My code is:
1.For the streamer:

getKurentoClient(function(error, kurentoClient) {
        if (error) {
            stop(sessionId);
            return callback(error);
        }

        kurentoClient.create('MediaPipeline', function(error, pipeline) {
            if (error) {
                return callback(error);
            }
            newStreamer.pipeline = pipeline;
            pipeline.create('WebRtcEndpoint', function(error, webRtcEndpoint) {
                if (error) {
                    return callback(error);
                }

                webRtcEndpoint.setMaxVideoSendBandwidth(5000);
                webRtcEndpoint.setMinVideoSendBandwidth(3000);


...then I proceed with the ICE and SDP part

2.For the viewer:

streamer.pipeline.create('WebRtcEndpoint', function(error, webRtcEndpoint) {
        if (error) {
            return callback(error);
        }

        webRtcEndpoint.setMaxVideoRecvBandwidth(5000);
        webRtcEndpoint.setMaxVideoRecvBandwidth(3000);

...then ICE, SDP and connecting to streamer webRtcEndpoint.

The 2 pipelines are the same.

Regarding the second issue, how will BW constraints command the
behavior of KMS.

Corolea Robert.

Luis Lopez

unread,
Oct 29, 2015, 5:17:39 AM10/29/15
to kur...@googlegroups.com
At the streamer you need to set Recv BW constraints (not Send as you are doing) because the streamer receives from the network. At the viewer, you need to set Send BW constraints.

In addition, setting min constraints to 3Mbps, as you are doing, may generate you problems because browsers do not send over 2Mbps at this moment. Hence, I would set min constraints to 400Kbps maximum and max constraints to 2Mbps.

When setting min constraints to 400Kbps, KMS shall ignore REMB feedback from the browsers when its is under 400Mbps. In this way you can avoid dropping the quality too much when a bad-behaving viewer is present.

Best.

Luis Lopez
Kurento.org Project Coordinator
tel +34 914 888 713tel lu...@kurento.comtel prof.luis.lopez • twitter linkedin blog youtube

Kurento.org logo

Best WoW Factor Award at WebRTC Conference & Expo 2014 (California)
Award

Audience Choice Award at WebRTC Conference & Expo 2014 (California)
Award

Best of Show Award at WebRTC conference expo 2014 (Paris)
Award



robert.corolea...@gmail.com

unread,
Oct 29, 2015, 6:06:45 AM10/29/15
to kurento
Oh, I understand. Now my question sounds stupid. Thank you very much!

robert.corolea...@gmail.com

unread,
Oct 29, 2015, 9:08:43 AM10/29/15
to kurento
Sorry for the double post!
Regarding the thing with the adaptive bandwidth. I did some testing and observed that it doesn't always happen. It only does when both the streamer and the one with slow internet are using Chrome or a Chronium browser. On Firefox the behavior is different. If the streamer is on Firefox and/or the slow viewer is on Firefox too, he will get the video with delay.
Reply all
Reply to author
Forward
0 new messages