Search code examples
c++delaypacketiocp

Packet Delay Variation (PDV)


I am currently implementing video streaming application where the goal is to utilize as much as possible gigabit ethernet bandwidth

  • Application protocol is built over tcp/ip
  • Network library is using asynchronous iocp mechanism
  • Only streaming over LAN is needed
  • No need for packets to go through routers

This simplifies many things. Nevertheless, I am experiencing problems with packet delay variation.

It means that a video frame which should arrive for example every 20 ms (1280 x 720p 50Hz video signal) sometimes arrives delayed by tens of milliseconds. More:

  • Average frame rate is kept
  • Maximum video frame delay is dependent on network utilization
  • The more data on LAN, the higher the maximum video frame delay

For example, when bandwidth usage is 800mbps, PDV is about 45 - 50 ms.

To my questions:

  • What are practical boundaries in lowering that value?
  • Do you know about measurement report available on internet dealing with this?

I want to know if there is some subtle error in my application (perhaps excessive locking) or if there is no way to make numbers better with current technology.


Solution

  • For video streaming, I would recommend using UDP instead of TCP, as it has less overhead and packet confirmation is usually not needed, as the retransmited data would already be obsolete.