I’m using a self-hosted LiveKit setup with the egress service for diffusion. I’m streaming via RTMP, but there is always a big delay between the live stream and the room.
@Yassine_jdidi, Most of the “big delay” on RTMP isn’t from egress; it’s from the destination’s player buffer. RTMP itself adds 2-5s of structural latency (GOP-based encoding); downstream HLS rebroadcast on YouTube Live / Twitch / Wowza typically adds another 5 to 30s.
livekit/egress#822tracks the low-latency RTMP tune (x264zerolatency) request, closed in 2025 without merge, so the encoder-side~1sisn’t currently configurable away in OSS egress.
To narrow it:
- Where is the RTMP going? YouTube Live, Twitch, nginx-rtmp, SRS, custom? If it converts to HLS for viewers, the bulk of the delay is there.
- What’s the measured delay (room time vs viewer time)?
- If you control the destination, drop the player buffer first. Lower keyframe interval on the encoder side helps too, but won’t fix downstream buffering.
Share those and the fixable portion becomes obvious.