This message was deleted.
# helpdesk
s
This message was deleted.
f
It is usually due to congestion. It could be either upstream congestion or downstream (server -> client) congestion. Can you provide details on what kind of network does not work well? If up stream is congested, client will publish lower bitrate/lower quality video to fit in the available channel capacity. Down stream congestion means server will pick a lower layer (if the track is simulcast) to fit within the available down stream channel capacity.
h
I don’t know too much about the network. Tomorrow I’m visiting people who are in this network and I’ll be able to learn more. I just wonder how to measure all these things like congestion. Do you use any specific tool at LiveKit? Other than webrtc-internals?
f
WebRTC (the core tech which is used by LiveKit) has algorithms to do it. You can use a standard speed test like https://www.speedtest.net/ to measure available bandwidth from a client machine. But, real time audio/video has different requirements (jitter is as important as the available bandwidth). So, a high bandwidth measurement is a test like the above does not automatically guarantee great quality all the time. If you are familiar with chrome://webrtc-internals (that is the details stats available in Chrome browser), you can check how much the client/server is estimating for bandwidth.
d
@high-exabyte-20673 do you have IPv6 turned on on these servers? we've noticed that it makes a difference especially for users on mobile networks
h
@dry-elephant-14928 You mean the servers where we host livekit?
f
On behalf of David, yes, server side IPv6 support.
h
No, only IPv4 is used.
f
That's what David was referring to. There are certain mobile networks that do not allow IPv4 (or actually send IPv4 probably though some proxy which does not work well). If the problems you are seeing are with mobile networks especially, enabling IPv6 on the servers and let the connection happen purely over IPv6 might provide better quality.
h
Hmm, the problem I’m investigating occurs on windows desktops.
f
Then it could just be poor network or under powered machines.
h
Looks like one machine is under powered 😛
Okay, so in the network, I tested: 1. Some machines were regularly changing ConnectionQuality between excellent and good, 2. Some machines were good initially, but connection quality started degrading after some time (~ 30 min). The camera mostly switched between medium and low simulcast layers after that time. For the first half an hour, it used the best-quality simulcast layer. @fancy-wire-61616 @dry-elephant-14928 Is it possible to prevent LiveKit from switching to the low quality simulcast layer, when the video element is still big enough to display high or medium layer?
f
Is the switch happening in up stream or down stream? The subscribed video layer will change for two reasons 1. Down stream congestion 2. Up stream congestion - this is when browser will detect congestion and stop/resume layer to adjust to channel capacity. Server will detect this and switch the layer going to the subscriber to the best available layer coming from publisher. For case 2, browser is in control. For case 1. there is no way currently to have that level of control. You can disable congestion control completely (https://github.com/livekit/livekit/blob/3f9f3adf91a2b296a5934970ca493754c8639314/config-sample.yaml#L68). That will prevent layer switches due to down stream congestion. But, it will also stop adaptation to down stream congestion.
h
Thank you @fancy-wire-61616. That may be helpful in my case. So if I turn congestion control off, then downstream layers will only be controlled by the size and visibility of video elements in the browser?
f
yeah, if you have
adaptiveStream
enabled. Or you can explicitly subscribe to whatever layer you need from the subscriber side.
To elaborate, explicitly subscription sets the max layer. If the publisher stops some layer due to up stream congestion, server will still detect the best available layer below the subscribed max layer and forward that layer.
h
I’ll try to turn the congestion control off then.
👍🏽 1