Decreasing Video Resolution does not decrease Kbits traffic on Jitsi server

Hello All,
I am using lib-jitsi-meet and in order to decrease network bandwidth (download/upload) generated on jitsi server side, I am adding the resolution argument and decreasing it from default one (720 I believe…) to 180:

createLocalTracks({ devices: [ 'audio', 'video'], resolution: '180' })

I have been monitoring bandwidth on Jitsi server and changing the video resolution as shown previously does not decrease the network bandwidth usage for 2 and 3 participant calls.
I thought that decreasing resolution would decrease Kbits being downloaded & uploaded…
Am I missing something or doing something wrong?

Thank you
Fabrice

I have also added maxFPS option and set it up to 10:

createLocalTracks({ devices: [ 'audio', 'video' ], resolution: '180', maxFps: '10' })

but same behavior, donwload & upload traffic keeps being the same on jitsi server side.

I hope someone may have an idea why…?

Thank you
Fabrice

The resolution property is for browsers like chrome prior version 58 I think. There are new options you need to pass for the newer browsers, check : https://meet.jit.si/config.js

    resolution: 720,
    constraints: {
        video: {
            aspectRatio: 16 / 9,
            height: {
                ideal: 720,
                max: 720,
                min: 240
            }
        }
    },

You can always add breakpoint in the code on meet.jit.si and check what is passed there and use it as an example app, for example createLocalTracks is called in react/features/base/tracks/functions.js: https://github.com/jitsi/jitsi-meet/blob/69dfa301428835a20d98237e78c4de221db1aa97/react/features/base/tracks/functions.js#L58

Thanks a lot! It works much better with the constraints part!!
I can see bandwidth decreasing a lot.
I was not able to put meet.jit.si in debug mode, would you know if there is also something similar to add to get the minFps and maxFps options to work too?
Thanks a lot for your always quick and great feedback!!
Fabrice

You are already passing it. You should be able to see those in chrome://webrtc-internals/

Reagrding FPS no I dont see any value passed there in chrome://webrtc-internals/

I even put minFps and maxFps options to just 1 but I dont see any change in term of display or bitrate

Thank you
Fabrice

So this is again new and old constraints. It should be like:

    resolution: 720,
    maxFps: 10,
    constraints: {
        video: {
            aspectRatio: 16 / 9,
            frameRate: {
               max: 15
            },
            height: {
                ideal: 720,
                max: 720,
                min: 240
            }
        }
    },

Ho yes! It works much better this way. Thanks a lot. This is reducing a lot traffic!! Thank you! :slightly_smiling_face:
Based on code you pointed me to, when device = ‘Desktop’, should we have something like this below then:

    resolution: 720,
    maxFps: 10,
    constraints: {
        video: {
            aspectRatio: 16 / 9,
            frameRate: 15,
            height: {
                ideal: 720,
                max: 720,
                min: 240
            }
        }
    }

I have tried, but I can still see a peak of bandwidth when starting sharing (switching from video device to Desktop) which I should not as I put same options when device = ‘Video’.
I guess, format may be a bit different when device= desktop?

Thanks a lot again for your time and help!!
Regards,
Fabrice

Yeah, the desktop is another case, not sure whether all those constraints are applied there … there was another constraint for maxFps which was 3 and we made it 5 … but the resolution is based on the desktop/windows you are sharing and it needs more bandwidth.

Would you know who could help in finding the right format for Desktop sharing? Or how I could do that by my own by looking at code somewhere…?
Thank you :slight_smile:
Fabrice

There is not much, current frame rate is 5 and there is no option to control it:


Okay perfect then.
Thanks a lot for your quick reply!!
Have a nice day
Fabrice

Boris just corrected me, there is an option you can pass that can control frame rate.
To jitsi-meet you can pass #config.desktopSharingFrameRate.min=30&config.desktopSharingFrameRate.max=30
So for lib-jitsi-meet this will be

desktopSharingFrameRate = {
min=30,
max=30
}

Thanks a lot!! :slight_smile:

While playing with these parameters I found a bug then,
using Chrome everything is fine,
using Firefox, when adding height video constraints into createLocalTrack it start failing with following error:

Video Device not found, probably not accepted: Object { gum: {…}, name: "gum.unsupported_resolution", message: "Video resolution is not supported: ", stack: "a@http://localhost:3000/_nuxt/vendor.js:65570:116691\nvalue/</<@http://localhost:3000/_nuxt/vendor.js:65570:96069\n" }

example:
Firefox 66.0.1
createLocalTracks(
{ devices: [ ‘video’ ],
resolution: 180,
constraints: { video: {aspectRatio: 16 / 9 }}
})
—> WORKS FINE

Firefox 66.0.1
createLocalTracks(
{ devices: [ ‘video’ ],
resolution: 180,
constraints: {
video: {
aspectRatio: 16 / 9,
height: {
ideal: 180,
max: 180,
min: 180
}
}
}
})
—> FAILED with error:
Video Device not found, probably not accepted: Object { gum: {…}, name: "gum.unsupported_resolution", message: "Video resolution is not supported: ", stack: "a@http://localhost:3000/_nuxt/vendor.js:65570:116691\nvalue/</<@http://localhost:3000/_nuxt/vendor.js:65570:96069\n" }

Chrome: Both works fine

Thank you
Fabrice

Thanks for the report, we will be working on Firefox and the other browsers in the following months and we can test this scenario at some point. Any help is welcome. Thanks.

Sure, I would be happy to help.
Where could I start?
Thanks