Skip to content

Latency for SRT Receiving

Latency is a SRT parameter that determines the maximum time the receiver waits for lost packets to be retransmitted. Higher latency improves reliability on unstable networks but increases stream delay.

The recommended latency value is 4 times the Round-Trip Time (RTT) between the sender and receiver.

To measure RTT, use the ping command:

ping example.com

Example output:

64 bytes from example.com: icmp_seq=1 ttl=52 time=58.5 ms
64 bytes from example.com: icmp_seq=2 ttl=52 time=57.8 ms
64 bytes from example.com: icmp_seq=3 ttl=52 time=59.1 ms

In this example, the average RTT is approximately 58ms. The optimal rounded latency value would be:

Latency = RTT * 4 = 58 * 4 = 240

For networks with variable RTT, use the maximum observed value for calculation. For example, if RTT fluctuates between 25ms and 50ms, calculate latency based on 50 ms.

In Astra set the latency parameter in the SRT input options:

srt://example.com:port#latency=240

If the latency value is too low, SRT cannot recover lost packets in time. The log will show errors like:

RCV-DROPPED 1 packet(s). Packet seqno %579915997 delayed for 0.556 ms

This message indicates that packets were dropped because they arrived too late to be delivered. To resolve this issue, increase the latency value.