开发者

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?


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).


Wireshark has RTP statistics calculation for sniffed packets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜