gtsiolis
gtsiolis

Reputation: 136

Calculating packet loss, jitter and delay

I am streaming an rtsp video to Android.
How could I calculate network metrics like packet loss, jitter or delay?

Upvotes: 2

Views: 3862

Answers (2)

SirKnigget
SirKnigget

Reputation: 3644

I can answer that for packet loss and jitter.

For packet loss: Just count missed sequences. Keep the sequence of the last packet, and see if you have steps of more than 1. If you have reordering in your network, you will need to keep in a memory window previous sequences and fill it up as packets arrive, then check missed sequences.

For jitter - just keep the times where your client receives packets, and calculate the average difference between the actual received time and the expected received time of packets (assuming you can predict the expected receive time of packets - for example, if you have a constant FPS).

Upvotes: 1

msw
msw

Reputation: 43507

Wireshark has RTP statistics calculation for sniffed packets.

Upvotes: 0

Related Questions