element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
571 stars 89 forks source link

Latency can increase to ~10 seconds #1442

Open dbkr opened 1 year ago

dbkr commented 1 year ago

Steps to reproduce

Reports of latency on a call getting up to 5 or 10 seconds, at which point obviously the call is unusable. It apparently starts off okay and then gets worse. That's all we have currently. Perhaps we have some buffers that are way too large in livekit?

Outcome

What did you expect?

What happened instead?

Operating system

No response

Browser information

No response

URL for webapp

No response

Will you send logs?

No

wrjlewis commented 1 year ago

I have had this issue a few times, raising just in case you want someone who may be able replicate this

dbkr commented 1 year ago

I've noticed while debugging device issues that unplugging a device and falling back to a different one seems to increase latency significantly.

dbkr commented 1 year ago

Further to the above, the latency did jump up significantly when changing devices (maybe to ~500ms in some cases) but did recover again afterwards. The latency looked to be on the receiver side, looking at the graphs in WebRTC internals, I could see large spikes in the jitter buffer graphs when changing devices. This could imply the livekit server isn't quite doing timestamps correctly when a publisher stops sending packets, perhaps?

ara4n commented 1 year ago

presumably this is going to be a livekit bug? (which is ironic given rate control was the main reason to use a preexisting SFU...)

dbkr commented 9 months ago

I now keep getting this occasionally. I thought it was when I started using firefox but I'm now getting it on chrome, and the person I'm seeing delayed is on chrome too. The person who is delayed says his internet connection is bad, however that person's video is not delayed for anyone else in the call. This would suggest it's some kind of buffer edge case in Livekit perhaps?

bblacher commented 8 months ago

A friend of mine is also having this issue on chrome with a bad internet connection.