Are we talking about the latency of a camera or (as we susually do) the end-to-end latency in a system? Latency when outputting a compressed or an uncompressed signal? Should the latency be expressed in frame or milliseconds? etc. As evoked below, there are moreover so different factors (hardware, software, signal type, protocol, system design,..) that will make the latency be UNIQUE for each system. But let's try to start from the beginning:
What is latency?
It is the amount of time (delay) that needs a single frame of video to be transferred. A system with less than 1 second of latency from end to end would be considered as low latency, and ultra-low latency if much below than 1 second (under 300 milliseconds?). But the same latency can be critical for one type of application (live video/events..) whereas not for another (conferencing, recording, streaming..), all will finally depend on the requirements of each application. (Beside of that, it is sometimes worth asking when best to prioritize latency over quality and vice versa)
Every video processing device has its own latency.
Starting from the camera itself, there are different stages (sensor, image processing on chipset..) where some latency will be added, let's say between 2 and 3 frames in total (some cameras can be below than that but then prepare yourself to spend a lot of money!)
Then, a device like TV screen can add between 1 and 2 frames of latency but this will not only depend on the TV screen model but also on its configuration! (for instance the game mode usually creates less input lag) Opposite to that we have PC screens which have much less latency, mostly between 2 and 8ms as they usually do not do any image processing like TV screens do.
Every millisecond counts, choose video processing devices that have low latency and minimize their number.
In general, the fewer devices and video processing (video mixer, encoder/decoder, production..) from end to end, the less latency your signal should get. But there are still many other numerous variables that can handicap the latency like processors, cabling, and signal types (encoded/compressed IP streaming signals have traditionally more latency compared to uncompressed HDMI/SDI signals) which depends also on the protocol used and how well it is implemented. Even when it comes to display the same signal, softwares can show noticeable different performances! VLC itself adds a lot of latency as a decoder, by default 1 second, but this can be reduced to about 250ms with some adjustments, however, VLC is finally not the perfect decoder. This was at least a good example to prove that in some cases you can tune your devices/softwares to minimize the latency. Even online platforms like Youtube will add its own latency to your stream, etc. etc.
Frame or milliseconds?
Please note that before we were mainly expressing latency in frames which is NOT the right option unless you would specifically state the applied framerate and its corresponding time as detailed in that table below. Therefore you should always look for the latency numbers in ms (milliseconds) and never trust a latency expressed in framerate!
|Amount of frames per second ||Time per frame in milliseconds|
Some choices like the codec (H.264, H.265, MJPEG), transport/streaming protocol (RTSP, RTMP, SRT, NDI, Multicast..) and especially the network infrastructure will definitely help to improve overall performances, but also some camera settings such as the full RTP packet size (limiting the amount of packages needed for each frame) and the amount of time between I-frames (by limiting it) can slightly help.
But everything stands or falls with the use of the right decoder. a well-written decoder (software) that uses the right hardware (graphics cards) can decode almost without latency (+/-20-40ms) Add to that the latency of the camera and the HDMI input lag of screens (good screens +/- 5-8ms, TVs can go up to 30-50ms). Please note that H.264/265 are NOT slow codecs if implemented in the right way, example of it is the IP viewing in the same room with our NATO meeting case study.
Our CM70-IP, CM71-IP and CM73-IP cameras can get as low as 50 - 70ms (3-4 frames) on HDMI/SDI and 80-100ms (5-7 frames) on IP outputs. Supporting low latency IP Streaming (with a bitrate up to 40Mbit!) can be perfect for instance for large conferencing applications (with our partners like Bosch, Arbor media,...). These cameras can also support SRT (Secure Reliable Transport) with better latency than RTMP (SRT latency buffer can be configured from 200ms to 8000ms depending on network conditions and distance, to allow for packet retransmission). An even more efficient option would be NDI that optimises latency between the camera and third party devices such as videomixers..
But it is not always all about latency, for instance in applications like lecture capture latency is not an issue but the storage optimization should be met! To be continued...