Too much stream delay


Recently we did testing and found the delay in Cloudflare streaming is more than 1 min. I understand this is due to RTMP streaming.

However, We tested Vimeo and Mux RTMP, which have less than 10 seconds of delay.

Is there anything we can do to improve the delay?



There will always be some delay when using the default output, which is HLS (the one that has the .m3u8 URL). HLS is popular because it will play on almost all devices and it’s easy for CDNs to deal with. You may be able to reduce it down to the 10s-ish level by adjusting the data you are sending in to Stream. That would depend on exactly how you are sending that (OBS, ffmpeg, other …) but software like OBS should let you specify how often you want a keyframe. For the lowest latency you generally want that to be every 1 or 2 seconds. That should in turn result in your HLS video segments being shorter in duration (around 1 or 2 seconds). And as a result, lower latency.

Alternatively, if latency is your primary concern you could look at other formats such as WebRTC: WebRTC (beta) · Cloudflare Stream docs

The problem is that we depend on third-party meeting clients (ex Zoom), SO we do not get the configuration to change any settings. And Since they only support RTMP, We can’t use the webRTC.

I understand that RTMPS → HLS adds a display. However, Mux and Vimeo use RTMPS, Output is HLS, and their delay is around ten instead of more than 1 min in the case of Cloudflare.