Delay/Latency of around 50 seconds while streaming

There is too much delay in the stream when i stream to rtmp from my encoder and watch the stream using Cloudflare’s own given video link.
Our encoder streams to other rtmp destinations like youtube without much delay.

This is totally unacceptable. Is there a solution?

1 Like

I’m having the same issue on my end. We just starting to test out CF stream in hopes of moving from our current provider; however, we need .5-3-second latency, we run live auctions. We are using OBS via RTMP. Can someone provide me with feedback on if this is possible? From one of your articles, it was promoting 500ms of “glass to glass” latency.

Can someone please let us know if sub 3 seconds latency is possible?

Sub three-second latency is totally possible, yes. I’ve got around 2 myself.

Can I ask what your settings in OBS are? (feel free to omit the stream key for privacy)

Great to know!! I’m using the following setup.

Stream
Service “custom”
server: RTMPS rtmps://live.Cloudflare.com:443/live/
Stream Key: Private

Output:
Simple
Video Bitrate 2500
Encoder X264

How are you inputting the stream? Or is that the input config?

That is the input configuration for OBS. My assumption is the “watch” link in the Cloudflare dashboard would be sub 3 sec, but its well over 40 seconds.

Ah, that explains it. :slightly_smiling_face:

When you view the video in the Cloudflare dashboard it’s already been processed into HLS (which has a long delay).

In order to get the latency that was described, you’ll need to have both input and output running over RTMP (for example, input via OBS and output via VLC or ffplay).

@kevin61 — if you need sub 1s latency, you’ll need to use RTMPS or SRT for playback, not just for streaming video to Cloudflare Stream. If you use HLS or DASH for playback, there will be a 10+ second delay, though 50 seconds is atypically long. The delay is a limitation of the what’s possible with HLS and DASH, the streaming protocols supported on the web.

We’re working on getting this more clearly documented, know it’s currently confusing.

If you’re building a mobile app, for now we’d recommend using an ffmpeg wrapper like ffmpeg-kit for iOS or Android. If you’re building for the web, there’s unfortunately no way to directly use RTMPS or SRT in a browser for playback — but stay tuned, as we’re working on some exciting new WebRTC products, that would unlock more real-time experiences on any platform, including the web.

2 Likes

@irvinebroque thank you for the clarity on this! Looking forward to the WebRTC products.

I am usin SRT protocol and with OBS I am getting ~30 sec delay.

Alex,
Splinter Reveal