How to set stream bit-rate in KURENTO call?

3,411 views
Skip to first unread message

Valery

unread,
Jul 29, 2015, 4:48:18 AM7/29/15
to kurento
'm investigating Kurento Media Server 6 and now playing with Tutorials. I have noticed that quality of stream is very poor. I have switched to higher resolution but issue remains. I'm connected to server in network with bandwidth 100/100mbps and stream must be crystal clear.I think somethere in settings of KMS 6 default bit-rate are set.I tried to find in documentation and in tutorials some kind of method which sets bit-rate, but did not found. How and there I can change default bit-rate of stream(if it is possible)? Thanks for your time and effort!

giovanni...@gmail.com

unread,
Jul 31, 2015, 4:33:33 AM7/31/15
to kurento, uzu...@gmail.com


On Wednesday, July 29, 2015 at 10:48:18 AM UTC+2, Valery wrote:
'm investigating Kurento Media Server 6 and now playing with Tutorials. I have noticed that quality of stream is very poor. I have switched to higher resolution but issue remains. I'm connected to server in network with bandwidth 100/100mbps and stream must be crystal clear.I think somethere in settings of KMS 6 default bit-rate are set.I tried to find in documentation and in tutorials some kind of method which sets bit-rate, but did not found. How and there I can change default bit-rate of stream(if it is possible)? Thanks for your time and effort!

Hi Valery, sorry we do not have an answer for you but we are experiencing the same behavior. 
Specifically we are using the recording feature, and the resulting audio is very poor.
We would be interested as you are in suggestions, documentation etc to improve if possible

Thanks !

Luis Lopez

unread,
Jul 31, 2015, 5:23:28 AM7/31/15
to kur...@googlegroups.com, uzu...@gmail.com
Hi,

KMS, by default, restricts BW for WebRTC endpoints to 500Kbps and restricts BW on transcodings to 300Kbps. You can modify these defaults through the following settings:

On your sending WebRtcEndpoints:
WebRtcEndpoint#setMaxVideoSendBandwidth(max_bw_in_kbps)

On any media element making a transcoding:
MediaElement#setOutputBitrate(outbut_bitrate_in_bps)

Take a look to kms-core KMD for having further information on these properties and methods

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.

Valery

unread,
Sep 1, 2015, 3:22:39 PM9/1/15
to kurento, uzu...@gmail.com
Thanks for reply.

As was suggested I tried to set bandwidth in nodejs one-to-many demo server.js on presenter creation:

webRtcEndpoint.setMinVideoSendBandwidth(1000, function(error) {
        if (error) {
            stop(sessionId);
            return callback(error);
        }                   
}); 
Quality still very poor, nothing changed at all(Demo server was restarted to reflect changes in code). Am I doing it right? 

Ivan Gracia

unread,
Sep 2, 2015, 1:10:59 PM9/2/15
to Kurento Public, uzu...@gmail.com
That's correct. Have you checked what's the available BW between your client and the server? You can check chrome://webrtc-internals for that.

Ivan Gracia



--
Message has been deleted
Message has been deleted

Valery

unread,
Sep 3, 2015, 4:07:30 PM9/3/15
to kurento, uzu...@gmail.com, lu...@kurento.com
Sorry for spam. I have noticed that mediaElement.setOutputBitrate(4000000) also doesn't have effect on any demo, but if I presenterWebRtc.setMaxVideoRecvBandwidth(200) which is less than 500 limit from graphs, it is working bit-rate on graph not going higher 200 kbps, and if i sepresenterWebRtc.setMaxVideoSendBandwidth(0) viewer cant load stream(as it should be i think).
 
Kurento is installed on my virtual-box machine LinuxMint(Ubuntu14.04)and connected to interned via bridge with my laptops(Windows 10) WiFi adapter. Can it somehow limit bandwidth (checked i can download files in VM on 40mbps). I'm played around with it very long, mixed some code samples(java one2many everything was set as in one2one code) and screenshots(one2one) I have sent to you, but it is really the same till it is higher than 500.     

pipeline = kurento.createMediaPipeline();
presenterUserSession.setWebRtcEndpoint(new WebRtcEndpoint.Builder(pipeline).build());

WebRtcEndpoint presenterWebRtc = presenterUserSession.getWebRtcEndpoint();
presenterWebRtc.setMaxVideoSendBandwidth(0);       //viewer cant load stream, effect exists   
presenterWebRtc.setMinVideoSendBandwidth(200);    //send bandwidth no more than 200, effect exists  
presenterWebRtc.setMinVideoSendBandwidth(3000);  //no effect it is not rising higher than 500 kbps
                        presenterWebRtc.setOutputBitrate(4000000);             //no effect it is not rising higher than 500 kbps
 
KurentoOne2Many(java-receive).PNG
KurentoOne2Many(java-send).PNG

pradi...@gmail.com

unread,
Sep 4, 2015, 9:18:49 AM9/4/15
to kurento
Hi 


Sorry for spam. I have noticed that mediaElement.setOutputBitrate(4000000) also doesn't have effect on any demo, but if I presenterWebRtc.setMaxVideoRecvBandwidth(200) which is less than 500 limit from graphs, it is working bit-rate on graph not going higher 200 kbps, and if i sepresenterWebRtc.setMaxVideoSendBandwidth(0) viewer cant load stream(as it should be i think).
 
Kurento is installed on my virtual-box machine LinuxMint(Ubuntu14.04)and connected to interned via bridge with my laptops(Windows 10) WiFi adapter. Can it somehow limit bandwidth (checked i can download files in VM on 40mbps). I'm played around with it very long, mixed some code samples(java one2many everything was set as in one2one code) and screenshots(one2one) I have sent to you, but it is really the same till it is higher than 500.     

pipeline = kurento.createMediaPipeline();
presenterUserSession.setWebRtcEndpoint(new WebRtcEndpoint.Builder(pipeline).build());

WebRtcEndpoint presenterWebRtc = presenterUserSession.getWebRtcEndpoint();
1.presenterWebRtc.setMaxVideoSendBandwidth(0);       //viewer cant load stream, effect exists   
2.presenterWebRtc.setMinVideoSendBandwidth(200);    //send bandwidth no more than 200, effect exists  
3.presenterWebRtc.setMinVideoSendBandwidth(3000);  //no effect it is not rising higher than 500 kbps
                        4.presenterWebRtc.setOutputBitrate(4000000);             //no effect it is not rising higher than 500 kbps

For  3. Enter 0 instead of 3000 it will take maximum available bandwidth
and for setOutputBitrate you need to create MediaElement and not WebRtcEndpoint ,it only has that method


Ivan Gracia

unread,
Sep 7, 2015, 5:25:14 AM9/7/15
to Kurento Public

Have you tried with presenterWebRtc.setMaxVideoRecvBandwidth(0)? That should do. Take into account that those names are from the point of view of the endpoint in KMS, so what your client in browsers is sending, is the receiving part of the webrtc. So if you have a limitation on what you are sending, is because the receiving side is setting that limitation. In this case, on the receiving side (KMS’ webRtc endpoint) you were not changing the max value, but the min value. Since the min value is higher than the default max value (500K), it’s not achieving the expected results.

Cheers,


Ivan Gracia



Valery

unread,
Sep 7, 2015, 12:44:17 PM9/7/15
to kurento
Hello, thanks for explanation! I have figured it out already, but setting it in one2one calls doesn't change limit and it is still 500 kbps. Is in one2one call anything different? It is very confusing, which settings effect which destination or source, do you have any documentation which is explaining all this relationship in details.
Also after last update 6.1.1, I have different problem with stopping viewer in one-to-many tut. I will create another topic for this issue, if will not find the source of problem in my changes. 

Thanks for your time.

Ivan Gracia

unread,
Sep 8, 2015, 10:46:12 AM9/8/15
to Kurento Public
Well, in one2one call, both are "presenters", so to speak. So both have that limitation.

Best thing is always to draw your pipeline, and how the media should be flowing throw each endpoint. Include in that diagram the clients (i.e. browsers or otherwise) and you are all set.

Ivan Gracia



--
Reply all
Reply to author
Forward
0 new messages