3

I'm wondering if the WebRTC api changes the bandwidth automatically to increase the experience. As much as I know, WebRTC has a feature to change and limit the max. bandwidth as we wish. The question that I seek answer to is should we be doing this manually or does WebRTC do it on the background anyways?

I'm now working on a project and the main subject that my supervisor is concerned about is the bandwidt; I generally think that WebRTC api does the job automatically and we don't need to change it manually but then again I couldn't find much information about the topic since it is not commonly used. (I'm also using EasyRTC (opensource webrtc api) to give myself some relief from the harcoding by the way.)

Thanks in advance people.

oividiosCaeremos
  • 608
  • 1
  • 10
  • 30

2 Answers2

5

1) You don't need need to manage bandwidht manually. WebRTC does most of common bandwith mangement task and quality of service for you.

2) WebRTC dosen't restrict connection bandwidth but your network instrument and device does.

Here is example based on observation -

1) I made video conference web based app with help of WebRTC.

2) My laptop was used as host device. (i.e for initial connection)

3) Asked 2-3 collegues to mine to join in conference room (All of them were on same network). Video was streaming in good quality.

4) Again, asked some more collegues to join me in room. Now some of video steams start shuttering.

5) Your connection bandwith does effect quality. If many users are using same access point(AP) then bandwidth gets divided and this will result in very crappy streaming.

6) Suppose one 1080p video take 15mbps down bandwidth connection. Then 8 connection will take 8 * 15 = 120mbps total bandwidth. This exceeds my laptop 100mbps lan port down speed. This will result in shuttering in some of videos.

8 Mbps = 1 MB/s

Check out this link - WebRTC bandwidth requirements

:)

DevesH
  • 486
  • 4
  • 18
  • 1
    Thank you for the answer Dave. It is quite hard to get answers about WebRTC or EasyRTC around here. Their Google Discussion Group also seems to be dead. Really cool api with an awful support. It takes me ages to convert their code into my own app, documentation is not thorough. – oividiosCaeremos Sep 25 '19 at 19:31
  • 1
    Me to. Had a same experience while working with WebRTC as its is not standarized yet. – DevesH Sep 26 '19 at 05:56
  • hi buddy, can we make dynamic bitrate base on device/ current network? – famfamfam Feb 26 '21 at 08:46
1

Don't know if this will help someone, but at least in version GoogleWebRTC (1.1.31999) for iOS and org.webrtc:google-webrtc:1.0.22672 for android there is method in PeerConnection instance.

For iOS:

let updateBitrateSuccessful = pc.setBweMinBitrateBps(300000, currentBitrateBps: 1000000, maxBitrateBps: 3000000)
print("Update rtc connection bitrate " + (updateBitrateSuccessful ? "successful" : "failed"))

Respectively, for Android:

boolean updateBitrateSuccessful = pc.setBitrate(300000, 1000000, 3000000);
Log.d("AppLog", "Update rtc connection bitrate " + (updateBitrateSuccessful ? "successful" : "failed"));
Den
  • 1,456
  • 16
  • 17