H.265 Network Camera

TCP vs UDP, Why use UDP for IP Camera's Connection?

Network protocol is the base for the data exchanging among network devices. TCP/IP and UDP are two primary network protocols, we are quite familiar with the TCP/IP because if we encounter any network problems on our computers, we tend to tweak the settings of TCP/IP protocol. Usually, we can solve the most network problems by doing this.

Network cameras are prevailing in today's video surveillance market. They become part of home appliances and they are useful tools can secure our home, monitor our kids or pets. Although the suppliers declare their network cameras are easy to use because the adoption of new technologies such as WPS, P2P, some people still encounter many problems to use them. Video is jerky/choppy or even video loss is one of the most common problems.

In most cases, if we encounter this problem, we can fix it by changing network protocol. No matter we connect the cameras to the computer or NVR, we should use the UDP protocol, rather than using TCP/IP. Unfortunately, based on my experience, most video management software/clients and NVRs use the TCP/IP to communicate with network cameras by default.

1. Why UDP protocol is better than TCP/IP for IP cameras?

To explain this, we need to know what are differences between them. TCP/IP is a two-layer program, one layer (referred as higher layer) manages the assembling of a message or file into smaller packets that are transmitted over the network/Internet, the other layer (also referred as lower layer) handles the address part of each packet so that it gets to the correct destination. TCP is connection-oriented in the sense that prior to transmission end points need to establish a connection first. Before sending the data, TCP will break down a stream of bytes into segments and reconnecting them at the other end, retransmitting lost packets and also organizing the segments in the correct order.

UDP protocol on the other hand is a connectionless protocol. It consists of fewer fields compared to TCP. UDP protocol keeps sending the real-time data ignore the data confirmation or packet loss. All it cares about is fast transmission.

TCP should be used for information that needs reliability sequence transmission and data integrity. UDP is the right choice for data that require real-time transmission with low overhead and less processing. For real-time video streaming, we should use the UDP protocol because it can deliver smooth video and require less processing.

TCP vs UDP for IP Cameras
TCP Vs UDP

When connecting security cameras to the NVR via ONVIF protocol, the NVR will use the default TCP/IP protocol, which therefore causes video lag, video choppy/jerky and video loss problems. These problems also occur when we connect network cameras to the video management software (e.g. ISpy, BlueIris) by using the default TCP (or Auto) settings.

UDP on iSpy VMS
UPD on iSpy VMS Software

Encountering any video streaming problems when setup the IP video surveillance system? you may check if the connection uses UDP protocol. If you think this article is useful, please don't hesitate to share it, this helps other people can find this simple tip to fix the similar video streaming problems.

Get My Latest Posts

Subscribe to get the latest updates.

Your email address will never be shared with any 3rd parties.