High Latency with IP PTZ Cameras

 

The first thing to check is whether the delay is actually in the PTZ control or in the video transmission. It can sometimes seem that the PTZ control is the problem when really it's the video that is being delayed. This can be tested by looking at the camera as it's being controlled to see if it moves fairly responsively as the PTZ buttons are clicked. Obviously, this is sometimes hard if the camera is a long distance away and might require a second person to help check it. Alternatively, the camera could be physically moved close to the operator so that they can see it whilst testing.

If the camera movement appears to be responsive then the delay is somewhere in the process of video transmission. This can happen for a variety of reasons such as...

  • Network congestion
  • Network latency - for example, if the video is being transmitted over wireless or some other "special" device such as a LAN extender
  • A slow client PC - decoding video is CPU-intensive so a slow PC coupled with high-resolution/high-framerate video could add some latency.
  • "Live buffering" feature being enabled in WaveView - the WaveView client has a feature called "live buffering" which deliberately adds some delay to the viewing of live video in order to make it smoother. It's disabled by default and it's recommended to keep it disabled if using PTZ cameras. The feature can be enabled/disabled in the WaveView Tools|Preferences|Playback menu.
  • Slow camera encoding - Some cameras are just slow at encoding the video, or they buffer the video. If this is the case you'll generally see similar delays when using the camera's own viewing software. It could be worth trying different settings in the camera relating to video compression.

Some of the above issues can be investigated by trying to remove network complexities. For example, take one camera and connect it to the same network switch as the Wavestore. Then try to control it directly from the WaveView client on the Wavestore, or another PC connected to the same switch. This can help to prove or disprove whether the network is the issue.

Another consideration is that sometimes when opening a new camera in WaveView, the latency can initially be as high as 2 seconds, however it will reduce over time. The technical reason for this is related to compression formats such as H.264 and the GOP (Group Of Pictures) concept. If you open the camera just as a new I-frame is output by the camera, the latency will be low. However, if you open the camera just before a new I-frame, there will be a delay before the stream is started because WaveView has to request and decode the previous I-frame and all subsequent p-frames up to the present point in time. In any case, the latency gradually decreases over a short period of time (maybe 20-60 seconds) until it reaches a low latency, usually around 0.25s on a good network.

If the problem appears to actually be a delay in the PTZ control, there are still some things to try...

Firstly the PTZ protocol used can affect the camera's performance. We generally encourage the use of ONVIF for video transmission and PTZ control, however, we also offer many manufacturer-specific PTZ protocols. We have found several cameras which work better with the manufacturer's protocol than the ONVIF protocol. Over time we'd hope that camera manufacturers will improve their ONVIF implementations as there is no real technical reason for it to be worse than their own protocols. The PTZ protocols in question have the suffix "-http" in the Wavestore PTZ menu. So for example, the "Panasonic-http" protocol is the Panasonic proprietary protocol which can be used if the ONVIF protocol appears to be performing badly.

It's also worthwhile to check that the camera firmware is up-to-date. Some camera manufacturers have had issues with IP PTZ which have been fixed in firmware updates.

If the problem still persists and appears to be a delay in PTZ control, please follow the procedure below and contact support@wavestore.com with the results:
 

  • Log in to the Wavestore server using WaveView
  • Go to Preferences and enable all the log levels except Timing.
  • Quit the WaveView client
  • Go to the Windows user's home directory (e.g. "C:\Users\Chris\") and delete "wavesdk.log" and "wavesdk-1.log" (if it exists).
  • Run WaveView again and log in to the Wavestore server.
  • Open a PTZ camera and make a note of the precise time.
  • At a noted time, move the camera, either with the PTZ buttons or a PTZ joystick and release after a few seconds. To clarify, imagine the time is just approaching 10:30:00, wait until exactly 10:30:00 and press the PTZ button at that time. The idea is that our support team can look at the timestamps in the log to see if the PTZ events occur at that time or if there's a delay.
  • Close WaveView.
  • Obtain the log files mentioned above (wavesdk.log and wavesdk-1.log if it exists) and send them to our support team along with details of what time the PTZ operation was performed.