Latency

So based on my tests (1080p70 @ 12000kbps), using SRT input and HLS out has a delay of 45 seconds. Using SRT input with dash gets a delay of 22 seconds. But the problem with webrtc is the input needs to be webrtc too which tools like OBS can't
8 Replies
Brendan Irvine-Broque
Thanks for sharing what you're seeing, especially the difference between HLS and DASH. We're doing a bunch of work right now on latency and this is helpful. - If you're looking to reduce latency a bit further using RTMP or SRT, try changing the GOP duration in OBS to 2 seconds - For sub-second latency, yep, you'll need to use WebRTC for both broadcasting and playback. There's active discussion on adding WHIP support to OBS here: https://github.com/obsproject/obs-studio/pull/7192
GitHub
obs-webrtc: prototype / playground by DDRBoxman · Pull Request #719...
Description This draft PR shows off some work on how we could structure a webrtc plugin without needing to pull in the large monster that is libwebrtc. It provides the webrtc output in such a way...
Brendan Irvine-Broque
Curious — what are you trying to build?
Victor
VictorOP3y ago
For GOP, you are referring to keyframe interval right? These are the settings (obs side) that I'm using for the test. Using the exact same settings on twitch (except bitrate lowered to their max of 6000 and fps lowered to their max of 60) gets a 3 second delay
No description
Victor
VictorOP3y ago
Basically I'm trying to build a decentralized streaming service that's completely FaaS with D1/DO as storage
Brendan Irvine-Broque
Yep — keyframe interval. One thing to note — when you stream to Twitch, unless you're a Twitch partner, Twitch does not re-encode your live stream to make it available at multiple quality levels. Stream does this, to ensure that the stream can be viewed even if the viewer doesn't have enough bandwidth for, say, a high bitrate 1080p stream. We also do a few things behind the scenes to ensure that as more people watch a live stream, latency is reduced. What you're seeing as the first and only viewer for the live stream has a bit higher latency than subsequent viewers. All that said, still higher latency than is typical, and higher than we're aiming for. Expect more updates soon on cutting this down further. I'll shoot you a note.
Victor
VictorOP3y ago
I wonder if there is a possibility where you could add an "original" quality settings (like above the 1080p option for example in your own player) where you (if the end viewer has the bandwidth) can view it without re-encoding.
Isaac McFadyen
The main thing with this is that the re-encode to HLS takes time, not necessarily only the re-encode to multiple quality levels. (although they both take time)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server