Subscriber switch to lower simulcast layer if not enough bandwidth or struggling

Is there a best recipe how to switch subscriber to receive a lower simulcast layer in Janus when he is struggling? I saw this PR - https://github.com/meetecho/janus-gateway/pull/3278 , but seems not merged yet.

If in that case it needs to be done on the client side, what’s the most robust way to detect subscriber is struggling and needs to receive a lower layer? Maybe tracking packet loss and decoding time for each stream?

Thanks in advance!

That PR you see is an effort I started a couple of years ago: it’s described in much greater detail in this blog post here, Bandwidth Estimation (BWE) and Janus | Meetecho Blog

I haven’t touched it since, though, mostly because I received pretty much zero feedback, and there was still a lot to do with it (especially in the VideoRoom logic, for instance).

Without that, simulcast switches need to be driven by the client side, and the triggers for those are up to you. You could proactively monitor the stats via getStats, or intercept slow-link events when they occur. There isn’t a specific recipe.

1 Like