Maybe a Simulcast generic question, but probably of interest anyway.
I have set the usual three Simulcast scalings: 4, 2, 1. When camera video has a resolution lower than 720p, not all three layers are being encoded in Chrome, as pointed out in simulcast - consumer is selecting invalid temporal layer, so for a 640p video I get only two layers. Problems is, when setting layer two (index: 1) with consumer.setPreferredLayer({spatialLayer: 1})
, video has a videoHeight
of 320, like scalings are [4, 2, 1]
instead of [2, 1]
.
It somewhat made sense because they are the scaling values I set, but I was expecting that since Mediasoup told me Chrome was generating only two Simulcast spatial layers, setting the number two would be the highest quality one, without doing scaling, but results say other thing. Should I calc in advance the number of spatial layers my camera will generate and take them in account when setting the simulcast config? Or does Mediasoup can tell me the number of layers it receives from the camera?