jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.83k stars 6.68k forks source link

Cannot limit screen sharing resolution #15033

Closed DamirDautov closed 1 week ago

DamirDautov commented 3 weeks ago

What happened?

While using self-hosted Jitsi we happened to notice that we cannot limit max resolution of screen sharing by environment variables. The common scenario is when user has 4k monitor and tries to share their screen to several users (so not p2p) which leads to high traffic consumption and reduce of video resolution (from camera and etc). We tried to limit it by setting variables such as config.resolution and config.constraints:

config.resolution = 1080;
config.constraints = {
    video: {
        height: { ideal: 1080, max: 1080, min: 720 },
        width: { ideal: 1920, max: 1920, min: 1024},
    }
};

but that didn't take any affect on screensharing, only for camera video. Also we've tried to set desktopSharingFrameRate to high numbers so that users get lower resolution, but also no luck:

config.desktopSharingFrameRate = { min: 30, max: 60 };

Do we have any opportunity to lower or limit screen sharing resolution? Maybe I'm just blind and could not find something obvious. Any help appreciated. Thanks in advance!

Platform

Browser / app / sdk version

127.0.6533.120

Relevant log output

No response

Reproducibility

More details?

No response

saghul commented 3 weeks ago

I'm not sure that's possible. @jallamsetty1 ?

jallamsetty1 commented 1 week ago

Yes, it is not possible. The video constraints has no affect on screenshare capture resolution. The WebRTC spec doesn't let you control the capture resolution only the type of display surface. You will have to use applyContraints on the captured stream to change the resolution. I am closing this issue for this reason.