Home:ALL Converter>webrtc screen-sharing with VP9 - low fps

webrtc screen-sharing with VP9 - low fps

Ask Time:2021-08-11T20:19:34         Author:Nicolas Migut

Json Formatter

I'm testing browser screen-sharing in chrome using webrtc with VP9 codec. The problem is that encoding of sender's video has very low frame-rate - more or less 5fps. I'm not limiting it anywhere, here are my getDisplayMedia options:

    const stream = await navigator.mediaDevices.getDisplayMedia({
      video: {
        frameRate: { ideal: 30, max: 60 },
        width: { ideal: 1280, max: 1920 },
        height: { ideal: 720, max: 1080 }
      },
      cursor: 'always',
    });

What's interesting, there is no problem with VP8 codec - with that frame rate is quite normal (20-30fps). Moreover, when i replaced screen-share with webcam, it also has 20-30fps even with VP9. So the problem is only with screen-sharing with VP9. Is there any limitation in WebRtc for this specific case? Is any way to disable it?

Here is the code for simple test tool which I'm using (it's based on webrtc examples): https://github.com/MikolajMGT/web-rtc-test

Author:Nicolas Migut,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/68741890/webrtc-screen-sharing-with-vp9-low-fps
yy