Bandwidth usage in Desktop Capture or Screen Sharing

3,538 views
Skip to first unread message

Qiusheng Jiang

unread,
Oct 17, 2013, 3:04:50 PM10/17/13
to discuss...@googlegroups.com
I can read stats data from chrome://webrtc-internals/ during screen sharing.

One thing I noticed is that even when there is no change on the sharing screen (still image), it's still using about 200Kb/s bandwidth. See the center part of below graph.













For screen sharing scenarios, like you are doing a presentation, most of the time the screen stays the same and it doesn't make sense to consume so much resources all the time.

Is there any investigation on this and do you plan to add any improvements to reduce the usage of bandwidth, at least during idle time?

Thanks!

Vikas

unread,
Oct 17, 2013, 6:52:28 PM10/17/13
to discuss...@googlegroups.com
Thanks for the feedback, i tried to recreate with this demo, for me when there was no change (still image) then in webrtc-internals graph i noticed about a 100Kb/s. You can try with the same demo. I tested on chrome Version 31.0.1650.26 beta-m.  Incase you still see the problem you file an issue in the webrtc tracker.

/Vikas

Qiusheng Jiang

unread,
Oct 17, 2013, 7:33:19 PM10/17/13
to discuss...@googlegroups.com
Vikas, thanks for the quick response!
Yes depending on the screen size (resolution) you have, the bandwidth usage varies from 100Kb/s to 500Kb/s. In your demo the res=640*480.

I am actually not complaining about 100Kb/s or 200Kb/s. I would expect 0Kb/s bindwidth usage (or at least less than 1Kb/s) for still images.
Even 100Kb/s is a lot of data for remote/mobile users.

I am curious what data is being transmitted over the 100Kb/s bandwidth since there is no update in the video.
Is this something that can be optimized by Chrome? I am planning to fire an issue once you acked.

Thanks again!

Alexandre GOUAILLARD

unread,
Oct 17, 2013, 10:11:40 PM10/17/13
to discuss...@googlegroups.com
out of curiosity, have you tried to reduce the temporal resolution (fps) to in turn reduce the bandwidth? it seems that the bandwidth usage is related to resolution and not to content (in the absence of external constraint, like limited available bandwidth).


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

Qiusheng Jiang

unread,
Oct 18, 2013, 11:00:07 AM10/18/13
to discuss...@googlegroups.com
Yes, the bandwidth usage is related to the resolution as well as the frame rate. Even with very low resolution (640*480) and frame rate (5fps), it's still consuming about 60Kb/s bandwidth in idle state (still image).

Again, no matter what resolution and frame rate user is using, it should not consume so much bandwidth.

bryand...@gmail.com

unread,
Oct 18, 2013, 12:17:22 PM10/18/13
to discuss...@googlegroups.com, webm-d...@webmproject.org
I think it is a problem with the vp8 realtime encoder and not specific to webrtc.

I brought this issue up on the webm-discuss list over 2 years ago.  Then Jon Koleszar said that they needed to look into it, but maybe that never happened.  Maybe you can file a bug against vp8/webm ?

Qiusheng Jiang

unread,
Oct 18, 2013, 3:18:56 PM10/18/13
to discuss...@googlegroups.com, webm-d...@webmproject.org
Thanks for the information. You are right, the problem is not only related to screen sharing.
In a normal video call using camera, it's consuming high bandwidth as well even though the shot content is static.

I've filed an issue against WebRTC here: https://code.google.com/p/webrtc/issues/detail?id=2536

Justin Uberti

unread,
Oct 18, 2013, 9:54:46 PM10/18/13
to discuss-webrtc, WebM Discussion
This is working as intended. We send padding data to ensure we have enough bandwidth to quickly send the needed video data when the input does change.

Göran AP Eriksson

unread,
Oct 20, 2013, 2:22:47 AM10/20/13
to discuss...@googlegroups.com
Could You explain the reasons behind the padding in more detail? I can imagine situations that padding behavior is not desirable.

Eric Davies

unread,
Oct 20, 2013, 1:54:37 PM10/20/13
to discuss...@googlegroups.com, WebM Discussion
Interesting. Is there anyway we can turn control this feature off from javascript?

The local university pays for it's internet connection on a bandwidth basis, so they use a packet shaper to throttle down steady high volume traffic. Your padding would probably trigger that. I imagine there are many other institutions doing the same.

Eric.

Qiusheng Jiang

unread,
Oct 21, 2013, 9:39:39 AM10/21/13
to discuss...@googlegroups.com, WebM Discussion
You may have a good reason to maintain the bandwidth for real time video, but for screen sharing, I believe that's another story.
To me, it is perfectly fine to have a short time lagging during screen sharing, and the recipients don't have to get every single frame of the changes. Low bandwidth usage is much more important in this case.
 
So I have the same question as Eric, do we have a parameter in the media constraints that we can pass in to turn off the padding data?

Justin Uberti

unread,
Oct 21, 2013, 2:32:30 PM10/21/13
to discuss-webrtc
We looked into this and it turns out that this particular case is not a padding issue. We are still trying to determine the actual problem.


On Sat, Oct 19, 2013 at 11:22 PM, Göran AP Eriksson <gap...@gmail.com> wrote:
Could You explain the reasons behind the padding in more detail? I can imagine situations that padding behavior is not desirable.

Qiusheng Jiang

unread,
Oct 23, 2013, 1:09:18 PM10/23/13
to discuss...@googlegroups.com
Justin, just let you know that I opened an issue against WebRTC here: https://code.google.com/p/webrtc/issues/detail?id=2536

Dennis E. Dowhy

unread,
Oct 23, 2013, 2:09:42 PM10/23/13
to discuss...@googlegroups.com
IMO the problem here is a codec one.  VP8 should not be used for screen sharing.  VP8 is a lossy motion codec. Using a lossy motion prediction encoder isn't really optimal, especially when not much on a screen changes over time.  Text isn't as clear when decoded and displayed due to the nature of those kinds of codecs.  It's much more bandwidth efficient, and much higher quality if a lossless screen capture codec was used instead such as ScreenPressor http://www.infognition.com/ScreenPressor/ , as every pixel is restored to it's original value and data is only transmitted when pixels change and on it's configurable full picture refresh interval.  

So there's not really a 'bug' with the current implementation of using VP8, it's just really inefficient both in quality and bandwidth as it was not meant to be used in this context.  The real issue is a lack of a lossless video codec in Webrtc.

Qiusheng Jiang

unread,
Oct 23, 2013, 4:31:13 PM10/23/13
to discuss...@googlegroups.com
Hi Dennis,

I understand that VP8 is a lossy codec, but actually in my testings, the result is not bad.

I tried to share a PowerPoint Presentation in resolution 1920*1080 and I scrolled up/down the slides very quickly. It's using about 2.5Mb/s bandwidth with frame rate 30fps. The recipient side can see the slides as if watch it locally.
Then I used a tool (NetLimiter) to limit the bandwidth usage for Chrome to 10KB/s or even 5KB/s and to my surprise, the resolution didn't drop at all - which means the text is as clear as before - this is what we expect for screen sharing.
But of cause the frame rate decreased a lot to adapt to the low bandwidth, which means the video on the recipient side is not continuous and you may get last steady screen after several seconds.

So I believe they have optimized the VP8 for screen sharing.

Justin maybe you can confirm.

Mike K

unread,
Oct 25, 2013, 10:21:25 AM10/25/13
to discuss...@googlegroups.com
That's strange same quality with 2.5 Mb/s and 5KB/s. Using the whole available bandwidth is not good. There should be some way of standardized bandwidth control from Java script.

Dne sreda, 23. oktober 2013 22:31:13 UTC+2 je oseba Qiusheng Jiang napisala:

Mike Vitale

unread,
Nov 12, 2013, 3:47:03 PM11/12/13
to discuss...@googlegroups.com
Any updates on this?  I've experienced spikes in bandwidth as well.  Despite the increased bandwidth the screenshare is still blurry at times.  Are there any plans to add a screen codec to the browser?

Leighton Carr

unread,
Nov 12, 2013, 7:12:27 PM11/12/13
to discuss...@googlegroups.com
Modern video codecs handle the case of "non changing" pixels as well, so there should be no instance where a lossless codec uses *less* bandwidth than a lossy one.  

Michael Graves

unread,
Mar 12, 2014, 5:32:28 PM3/12/14
to discuss...@googlegroups.com
I doubt that VP8 has any specific optimizations for screen sharing. Codecs like it are based around a group-of-frames (GOP) where within the group there are I-frames, B-frames and P-frames. An I-frame is a reference frame that contains an entire image. P-frames and B-frames contain only deltas relative to the nearby I frames. The GOP length is fixed.

When transmitting a static image the I frames will still contain a full image, whereas the B/P frames may contain very little data. Thus the bandwidth requirement for such a stream is reduced, but never to zero.

Codecs designed specifically for screen sharing tend to focus more on retaining image quality/detail through the use of simpler, lossless compression techniques.

Michael

Serge Lachapelle

unread,
Mar 13, 2014, 5:55:26 AM3/13/14
to discuss...@googlegroups.com
On Wed, Mar 12, 2014 at 10:32 PM, Michael Graves <mr.micha...@gmail.com> wrote:
I doubt that VP8 has any specific optimizations for screen sharing. 

IRC there are optimizations and arguments that can be passed in the encoder. I think the folks on webm discuss list can help you get a better understanding of this matter.

/Serge

Philipp Hancke

unread,
Mar 13, 2014, 6:48:57 AM3/13/14
to discuss...@googlegroups.com


--

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

Justin Uberti

unread,
Mar 13, 2014, 12:56:51 PM3/13/14
to discuss-webrtc
Note also that webrtc doesn't use a GOP for encoding. Is are bad for rate control, and Bs make no sense at all in realtime scenarios.

Overall you will find many applications using VP8 successfully for screen sharing.

Piyush Ranjan

unread,
Mar 14, 2014, 3:38:47 AM3/14/14
to discuss...@googlegroups.com
Would VP9 be better with loseless mode ? Are we going to have an option of to use VP9 or VP8 when that happens ? Any timelines for VP9 to land ?

Serge Lachapelle

unread,
Mar 14, 2014, 4:18:27 AM3/14/14
to discuss...@googlegroups.com
The VP9 team is hard at work to adapt the encoder for realtime use. Once that work is done, my guess is that we will start experimenting with it. Hopefully you will too!

/Serge

Piyush Ranjan

unread,
Mar 14, 2014, 6:16:59 AM3/14/14
to discuss...@googlegroups.com
Awesome!! That would great as I have read somewhere that VP9 has loseless mode. I am working on a screen sharing app. Not very happy with the quality I get on current webrtc. The text looks smudged. 

Also, will this be a switch or an automatic detection (between vp8 and vp9) ? Or that is not decided as of yet. Sorry if this is a dumb question as I do not know if there is codec detection built into webrtc.


Rob Retter

unread,
Mar 29, 2017, 2:13:47 PM3/29/17
to discuss-webrtc
Three years later, even using VP9 in Chrome 57, screen shares still look like crap on the receiving end.  This seems to be due to something drastically reducing resolution in order to achieve "efficiency" of transport.

Googling leads to numerous complaints about this phenomenon, but a consistent absence of actual solutions.

Anyone know what's going on, or at least where to look? 


radioman . lt

unread,
Apr 11, 2017, 6:41:06 PM4/11/17
to discuss-webrtc
lossless video codec is the key http://www.infognition.com/ScreenPressor/

Anantha Subramaniam

unread,
May 30, 2017, 3:04:43 AM5/30/17
to discuss-webrtc
The webrtc spec has an option for choosing over resolution or frame rate to be maintained. But it is yet to be implemented in chrome.

Colin Moock

unread,
Jun 12, 2021, 5:37:06 AM6/12/21
to discuss-webrtc
Four more years later, we are also seeing terrible results with screenshare over WebRTC in our application. In our case, we're seeing a severe drop in bitrate when the user switches from their web cam to a screenshare. The web cam happily transmits at 3.5Mbps. But on the same machine, the screenshare bitrate instantly drops to ~100Kbps. When we switch back to the camera, bitrate returns to 3.5Mbps. This behaviour is 100% reproducible across multiple WebRTC providers for us. See attached for samples of the poor screenshare quality we're seeing. Google Meet also has poor quality screenshare for us. Better than our own attempts in our own application, but still much much worse than Skype or Zoom.

Please note that we are JavaScript web-application developers, and can, therefore, only implement changes available via the browser's JavaScript API. Any insight would be most welcome.

emerson_screenshare_streamclick.pnggooglemeet_screenshare.png

Eric Davies

unread,
Jun 12, 2021, 11:51:37 AM6/12/21
to discuss...@googlegroups.com
What are the dimensions of that screen you are trying to share?
Do you see the same problem when using Firefox?

On Sat, Jun 12, 2021 at 2:37 AM Colin Moock <co...@moock.org> wrote:
Four more years later, we are also seeing terrible results with screenshare over WebRTC in our application. In our case, we're seeing a severe drop in bitrate when the user switches from their web cam to a screenshare. The web cam happily transmits at 3.5Mbps. But on the same machine, the screenshare bitrate instantly drops to ~100Kbps. When we switch back to the camera, bitrate returns to 3.5Mbps. This behaviour is 100% reproducible across multiple WebRTC providers for us. See attached for samples of the poor screenshare quality we're seeing. Google Meet also has poor quality screenshare for us. Better than our own attempts in our own application, but still much much worse than Skype or Zoom.

Please note that we are JavaScript web-application developers, and can, therefore, only implement changes available via the browser's JavaScript API. Any insight would be most welcome.

emerson_screenshare_streamclick.png
On Tuesday, May 30, 2017 at 3:04:43 AM UTC-4 pinga...@gmail.com wrote:
The webrtc spec has an option for choosing over resolution or frame rate to be maintained. But it is yet to be implemented in chrome.



On Wednesday, 29 March 2017 23:43:47 UTC+5:30, Rob Retter wrote:
Three years later, even using VP9 in Chrome 57, screen shares still look like crap on the receiving end.  This seems to be due to something drastically reducing resolution in order to achieve "efficiency" of transport.

Googling leads to numerous complaints about this phenomenon, but a consistent absence of actual solutions.

Anyone know what's going on, or at least where to look? 


--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/xnC6sJ9o2Yc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/7d15abea-8b39-406b-851d-313236ea6219n%40googlegroups.com.


--
Eric Davies

Colin Moock

unread,
Jun 13, 2021, 3:36:54 PM6/13/21
to discuss-webrtc
We did extensive testing this week and have more conclusions to share:
1) The issue does NOT occur in Chrome/Edge/Opera when sharing a screen with the resolution set to anything BELOW 1280x720. I.e., at 800x600 and 1024x786, text looks fine. In Chrome/Edge/Opera, the problem starts at 1280x720. The screenshot shown in my previous message was taken when sharing at 4k.

2) The issue does NOT occur in Firefox. In Firefox, the text is legible even at 4k. At 4k, Windows Firefox has legible text and good framerate, but Mac Firefox has legible text and poor framerate.

3) Setting contentHint to "motion" definitely helps improve the framerate for video content, but does not improve the legibility for text.

4) None of the following WebRTC code tweaks had any effect on text legibility:
a) Setting the x-google-flag:conference flag
b) Setting FPS to an explicit value (e.g., 30)
c) Setting the Codec to VP9 instead of VP8 (though for the record, H264 was worse)
d) Setting maxBitrate to 4000Kbps
e) Setting networkPriority to "high"
f) Setting scaleResolutionDownBy() to lower the resolution 

Colin Moock

unread,
Jun 27, 2021, 4:44:54 PM6/27/21
to discuss-webrtc
For anyone else facing this issue:
In Chrome, we were able to workaround the problem by specifying an explicit height and width in the constraints (in our case, 1920x1080 worked fine). Without the constraints, Chrome produces the illegible results shown in my earlier screenshot. With the constraints, the text is legible.

Philipp Hancke

unread,
Jun 28, 2021, 3:07:50 AM6/28/21
to discuss...@googlegroups.com
without these constraints, what are the resulting videoWidth and videoHeight properties when you attach the video to a track?
There used to a default width/height of 640x480 which is... low compared to common desktop resolutions.

You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/5bb1810f-6449-4f24-a037-7ea641c0e17dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages