Find the perfect latency for SRT setup
Latency is a common factor that affects video streaming quality, although users often don’t realize it's the root cause. Instead, they report issues like poor video quality or frequent buffering, which are the symptoms of incorrect latency settings.
Let's figure out how to recognize and fix latency problems for smoother streaming.
Spot insufficient Latency
Insufficient latency means that the video stream does not have enough time to reach its destination.
There are several visual signs that can help you identify this issue just by looking at the video stream:
- Video quality issues; blocky, pixelated video frames.
- Frequent buffering or pauses.
And if you enjoy checking out statistics as much as we do, you can also see other indicators :
- Packet Drops. A high number (e.g., over 10k) indicates packet loss, a direct sign of latency issues.
- Arrived too late. A large value means packets aren’t reaching in time.
- Re-sent packets. High count means many packets had to be sent again.
In Callaba, you can check these parameters by looking at the graph in the SRT Statistics section and by unfolding stats data for each particular video stream.
Packet Drops in the SRT graph.
Packet Drops in the unfolding SRT stats section.
Determine your perfect Latency value
To determine your perfect latency, open the SRT statistics section in Callaba and locate your RTT (Round Trip Time).
RTT (Round Trip Time) measures the time it takes for a data packet to travel from the sender to the receiver and back again.
Follow these steps:
1. Find your RTT in the SRT statistics section.
2. Multiply RTT by 3 to get your “perfect” latency value. This allows enough buffer time for lost packets to be re-sent.
Latency = RTT × 3
3. Apply this latency setting on the sender side. If packet drops persist, increase the multiplier (e.g., RTT × 4).
4. Continue adjusting until the packet drops disappear.
We suggest multiplying RTT by 3 as a healthy medium. But you can try multiplying it by 2 and check if this eliminates Packet Drops. Keep adjusting your latency until the drops disappear.
💡 Note: While this approach may seem “conservative” to some, it is reliable. It accounts for potential packet loss, making sure there is enough time for lost packets to be re-sent and received in time for smooth playback.
Configure Latency on the sender side
By following these steps below, you can easily adjust latency settings in vMix or OBS and optimize your SRT stream for your specific network conditions.
OBS
If you’re using OBS to send your stream, you can define the latency (even in small amounts) in microseconds within the SRT URL itself.
srt://IP:PORT?latency=1000000
Latency is specified in microseconds (μs).
Ex: for a latency of 1 sec, set latency=1000000
You can find the SRT URL by clicking “Settings” and then navigating to “Stream” tab.
Learn more: https://obsproject.com/kb/srt-protocol-streaming-guide
vMix
In vMix, follow these steps to adjust the latency for SRT output.
Add or modify the Output stream:
- If you are setting up a new SRT stream, go to Settings > Outputs and configure your SRT stream.
- If you already have an SRT output, go to Settings and choose the existing output stream you want to modify. Click the gear icon next to it.
Set Latency:
- In the Stream Settings, you’ll see the Latency (ms) option.
- Specify the latency of the connection in milliseconds to adapt to network congestion.
Learn more: https://www.vmix.com/help27/SRT.html
This is the end of this tutorial.
If you have any questions, you can contact us at [email protected]
Happy streaming!
Learn more
- How to launch Callaba on Amazon Web Services
- How to create a playlist of videos with Pay Per View monetization
- Multilingual Web Player
- Set up SRT backup stream in case of main stream interruption
Follow us on social media
LinkedIn • Reddit • Instagram • Facebook • Youtube • X (Twitter) • Discord