srt icon indicating copy to clipboard operation
srt copied to clipboard

[Statistics] Introduce network jitter statistic

Open mbakholdina opened this issue 5 years ago • 1 comments

After internal discussion we've agreed to introduce two jitter related statistics:

  • RFC 3550 jitter that is based on the concept of the relative transit time between pairs of consecutive packets, the difference between packet's timestamp and the receiver's clock at the time of arrival measured in the same unit, and is defined to be the mean deviation (smoothed average) of the difference D in packet spacing at the receiver compared to the sender for a pair of packets. See RFC 3550, page 39, for the detailed definition.
  • Time-Stamped Delay Factor (TS-DF) based on the same concept of relative transit time with a slight modification in order not to remove high-frequency variations of the jitter and give a very accurate instantaneous result taking into account the sign of relative transit time.

Both metrics are VBR streams compatible. See here for detailed comparison.

It's important to note that in case of SRT:

  1. We are going to take into account original DATA packets only, retransmitted packets are not considered as they sent as soon as possible with a higher priority and my affect the metric. Probing DATA packets should be excluded from the calculation.
  2. The timestamp of the SRT packet (S_i) is the time packet has been given to the SRT by the application and scheduled for delivery, not the time packet has been actually sent via UDP socket. There might be a slight processing delay due to the logic of retransmitting packets.
  3. In case of RFC 3550 jitter, the difference in relative transit time D is calculated between two consecutively received packets, not necessarily in sequence.

The diagram below shows the main idea of both metrics. network-jitter

mbakholdina avatar Jun 24 '20 18:06 mbakholdina

  • Probing SRT data packets should be excluded from jitter calculation.

maxsharabayko avatar Jul 21 '20 15:07 maxsharabayko