Noticeable lag when trying to share a local video window
Describe the bug When client A shares the local screen of the programme that plays the video, client B can obviously feel the video stuttering (the screen is not smooth).
livekit-server, client A and client B are all on the same LAN segment 10.0.0.0/24, not through the public network.
So, I would like to ask you guys, how can I do the troubleshooting of the above problem in this situation?
Local livekit-server resource situation when lagging occurs 1, Process usage: CPU load 3.3, Memory 0.6 2, Network: rx: 26 kbit/s 52 p/s tx: 8 kbit/s 10 p/s
Server
- Version: 1.5.1
- Environment: raw binary, local dev, same LAN ip livekit.yaml
keys:
key1: value1xxxxxx
port: 7880
redis:
address: 127.0.0.1:6379
db: 0
username:
password:
rtc:
#batch_io:
# batch_size: 128
# max_flush_interval: 5ms
port_range_end: 51000
port_range_start: 50000
tcp_port: 7881
udp_port: 7882-7892
use_external_ip: false
turn:
cert_file: ../config/demo.pem.crt
domain: 10.0.0.64
enabled: true
external_tls: true
key_file: ../config/demo.key
tls_port: 13478
udp_port: 13478
webhook:
api_key: key1
urls:
- http://127.0.0.1:7051/webhook
room:
enabled_codecs:
- mime: audio/opus
- mime: audio/red
- mime: video/h264
Client
- SDK: React
- Version: 1.15.4
To Reproduce Steps to reproduce the behavior:
- deply a livekit server
- two clients are connected to room ( on a same LAN ip)
- A client start use chrome/edge browser shre local windows video players.
Expected behavior Videos in the shared window play smoothly.
Screenshots no screenshots
Additional context Livekit Server deploy machine, Client A and Client B are on the same internal LAN. Client A is using livekit for local video screen sharing and Client B is using edge/chrome Web Browser to view the video content shared by client A.
Is it possible that the screen resolution of the participant on the main sharing side is too high (2k/4k) which is affecting the browser's acquisition and causing the problem of other participants seeing a screen that is not smooth?
what you are describing seems like a local machine limitation in encoding. When you are running the service locally, it's only forwarding the packets locally and cannot cause stuttering/low framerate.
gotcha, thank you.