Adjust bitrate

1,309 views
Skip to first unread message

apanizo

unread,
Apr 4, 2016, 6:42:14 AM4/4/16
to kurento

Hi all,

I hope you are doing well today. 

We are using Kurento in two ways (and each day we like more ;) )
  • Project forked from kurento-room for our desktop app
  • Our own implementation for using KMS on iOS 
As I said, we really like how it works. But we have noticed, in general, both projects use a lot of bandwidth. On the desktop app is not a problem, but we would like to control in some way for the mobile app.

So, the question is:

where is the best location for adjusting the bitrate? Is it possible to modify on fly?

After doing some research, we have noticed:
For the desktop app, I believe the best place is in kurento-utils.js/mediaConstraints (see here, for example). Am I right?
For the mobile app I am not sure. Is this (SdpEndpoint) a good place?  Any other idea?

Thanks in advance,

Adolfo. 

Ivan Gracia

unread,
Apr 7, 2016, 8:51:34 AM4/7/16
to Kurento Public
Hi Adolfo,

WebRTC provides adaptive bitrate. In Kurento, you can set upper and lower bounds directly for each endpoint. The default bandwidth range of the endpoint is 100kbps-500kbps, but it can be changed separately for input/output directions and for audio/video streams.
  • Input bandwidth control mechanism: Configuration interval used to inform remote peer the range of bitrates that can be pushed into this WebRtcEndpoint object. This range is announced in the SDP.
    • setMin/MaxVideoRecvBandwidth: sets Min/Max bitrate limits expected for received video stream.
    • setMin/MaxAudioRecvBandwidth: sets Min/Max bitrate limits expected for received audio stream.
  • Output bandwidth control mechanism: Configuration interval used to control bitrate of the output video stream sent to remote peer. It is important to keep in mind that pushed bitrate depends on network and remote peer capabilities. Kurento will not send at a higher bitrate as announced by the other end of the connection in the SDP.
    • setMin/MaxVideoSendBandwidth: sets Min/Max bitrate limits  for video sent to remote peer
    • setMin/MaxAudioSendBandwidth: sets Min/Max bitrate limits for audio sent to remote peer.
You can also limit the size of the video and framerate, which is done, as you pointed out, passing mediaConstraints when creating the WebRtcPeer object in the client.

Hope that helps!

Ivan Gracia



--
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.

Message has been deleted

ccae...@gmail.com

unread,
Jun 1, 2016, 1:44:10 AM6/1/16
to kurento
Hi Ivan,

I want to know if the bitrate can be adjusted after stream started in kws.I used Janus(webRTC gateway) before, and it can adjust bitrate after stream started. 
How to implement this feature in kws?

Thank you for you help

Jose Antonio Santos Cadenas

unread,
Jun 1, 2016, 3:36:25 AM6/1/16
to kurento
Please, do not hijack threads. You already asked this question in a different thread. I'd like to remind you the netiquette of this list http://www.kurento.org/blog/kurento-netiquette-guidelines

Cong Chen

unread,
Jun 2, 2016, 9:32:01 PM6/2/16
to kurento
Hi,

Sorry ,because nobody answers my question, and I have already deleted the post in the other thread. 

Ivan Gracia

unread,
Jun 3, 2016, 2:04:52 AM6/3/16
to Kurento Public
I did answer your other post.

I'm afraid you'll have to renegotiate for that, which is not supported at the moment. I guess they do that too, as some parameters are found inside the SDP.

Since some values are only advertised in the SDP, which is exchanged during the negotiation, we still don't support this, as KMS doesn't support renegotiation.

Please don't get anxious with getting answers right away. We try to answer as soon as possible, though it might take a while sometimes.

Ivan Gracia


t.vand...@sping.nl

unread,
Apr 21, 2017, 10:05:37 AM4/21/17
to kurento
Hello Ivan,

Sorry to dig up an old post but I am trying to achieve a similar thing as OP. You referenced a setMaxAudioSendBandwith call but I can't find this in the documentation. It's not available in the javascript or java client library. It is available for video. How can I achieve limiting bandwith for the audio being send by the WebRTCEndpoint?

Best regards,

Tom van der Geer

Op donderdag 7 april 2016 14:51:34 UTC+2 schreef igracia:

t.vand...@sping.nl

unread,
Apr 24, 2017, 4:50:31 AM4/24/17
to kurento
Never mind! I've found more information about the missing setMaxAudioSendBandwith method here: https://groups.google.com/d/msg/kurento/BGGgByO3Ihw/q4905jmZBwAJ
Best regards,

Tom

Op vrijdag 21 april 2017 16:05:37 UTC+2 schreef t.vand...@sping.nl:
Reply all
Reply to author
Forward
0 new messages