Help on Simulcast

Dear all,
According to the post of @gpolitis as the following
"The way “basic” simulcast works in jitsi-meet/jitsi-videobridge is based on the following two rules:

  • an endpoint sends 1 low quality stream and, if it has enough outgoing bandwidth, 1 high quality stream.
  • an endpoint receives low quality video except for the selected endpoint for which it receives high quality IF the selected endpoint is actually streaming high quality, otherwise it will receive low quality for that endpoint too.
    With adaptive simulcast the 2nd rule is enhanced like this:
  • an endpoint receives low quality video except for the selected endpoint for which it receives high quality IF the selected endpoint is actually streaming high quality AND if the receiver has enough incoming bandwidth, otherwise it will receive low quality for that endpoint too."

I can understand that the sender will always transmit TWO streams simultaneously with low and high bandwidth if it has enough bandwidth. So it doesnot work in the same manner as in OTT with adaptive stream: sender will send only ONE stream with the bitrate requested (and better fit to current bandwidth of the receiver) by the receiver ?
Then can I know which low and high bandwidth will be transmitted? The structure kSimulcastFormats in file simulcass.ss has several resolution, I wonder which ones are the selected two.
@gpolitis also mentioned the selected endpoint to get the high quality. How can I specify that endpoint? And again which resolution the endpoint will choose to send out.

Also concerning the bandwidth adjustment, jitsi no longer sends out video signal if the bandwidth is too low. Where can we set that threshold please?And the threshold is calculated based on the BW of the transmitter or the receiver
Many thanks in advance for your guide

Hi,

I’m not sure I understand the questions. Here’s a short description of how the system works, I hope this may help.

Senders calculate an estimated available bandwidth (“bwe”), and encoder’s target bitrate is configured accordingly. With simulcast encoders produces multiple streams (in the case of a 720p input they will produce a 720p, 360p and 180p stream) with different bitrates. With enough bandwidth they send all streams, and as the bwe decreases the highest bitrate streams will be dropped first (i.e. 720p will be dropped).

The bridge also does bandwidth estimation towards receivers. The “ideal” set of received streams consists of the highest available quality for the selected endpoint and a lower quality for other endpoints. This set is ordered by speaker activity, and what is actually sent to the sender is based on which streams “fit” in the available bandwidth.

Endpoint selection is driven by the receiving client. In the case of the default interface in jitsi-meet, the client selects the “main” participant. In the case of the tileview the client selects all endpoints, but sets a limit for the resolution of all streams depending on the size of the video element being rendered. This affects the “ideal” set described above.

I hope this clears some things up. Let us know if you have any further questions.

Regards,

Boris

Dear @Boris_Grozev thank you for you explanation.
I still have 3 more following questions:
-Is there any explicit relation between the resolution and the bandwidth. For instance with the resolution 720p, what bitrate will the encoder produce ?
-Can you give me the position where the sender estimate the bandwidth then remove the exceeded resolution ?
-I also want to see the code where the bridge makes the decision on which stream to be sent to receiver.
Many thanks for you help

Dear @Boris_Grozev,
Would you please give me some hint on the followings:
-The explicit relation between resolution and bitrate, for instance the 720p will generate the bitrate (constant bitrate or variable bitrate) of N bps for example.
-The source code where the sender estimate the bandwidth then remove the exceeded resolution
-The source code where the videobridge makes the decision on which stream to be sent to given client
Many thanks

Hi,

  1. See here https://cs.chromium.org/chromium/src/third_party/webrtc/media/engine/webrtc_video_engine.cc?sq=package:chromium&dr=CSs&g=0&l=244
  2. https://github.com/jitsi/jitsi-videobridge/blob/master/src/main/java/org/jitsi/videobridge/cc/BitrateController.java
  3. I don’t have a reference for this one

Boris

Thank you very much @Boris_Grozev. Very precious information.
Just for your first answer, because it is the chrome code, so we cannot change the max_bitrate, can we ? As for my experience on OTT DTV the preset discrete levels of bitrate 600, 1700, 2k and 2.5k are not so optimized.
Concerning your third answer, can you just give me some hints to search by myself, please?
Many thanks for your helps

I don’t think the max bitrates in the Chrome are configurable. In my previous email I got “2” and “3” in the wrong order. The decision in the bridge happens in BitrateController, I don’t know where it happens in Chrome.

Boris