google-chromewebrtcstreamingvp8vp9

webrtc screen-sharing with VP9 - low fps


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


Solution

  • VP9 screensharing is apparently capped at 5fps. https://bugs.chromium.org/p/webrtc/issues/detail?id=13016 has some details.