You're not alone with this challenge!
What I have seen with others is optimizations on the IP camera and VMS side to process / speed up / prioritize the PTZ commands. You can imagine that (fixed) video might be queued or delayed a few hundred milliseconds with no notice but do the same thing with PTZ commands and you get a very unpleasant experience. So some IP cameras and VMSes work hard to make sure PTZ commands are sent and received as quickly as possible and not slowed by anything else.
I would take to OnSSI first, than Vivotek, to see if they have any recommendations or special settings.
Otherwise, people sometimes try to switch to MJPEG (thinking they will reduce compression latency) or check network load or CPU use, but sometimes it's simply on the IP camera and VMS, with not much more that can be done.
Btw, one thing that might help is to use a direct driver integration rather than ONVIF. ONVIF's use of the SOAP might contribute to issues.
Sympathize with you. The ip PTZ experience is nothing like the analog. Having said that though there are some options out there.
First off in the future you may want to consider a CVI (or TVI) analog HD PTZ. If you want a high performance PTZ workstation, buy CVI dvr/encoder as well and have the operators monitor run off of the HDMI port. Feed the VMS from the encoder/DVR. It will be downstream and out of your path that way.
For your current circumstance, I have a few suggestions.
- Check your PTZ to see if it has rs-485 capability, many have both. If it does you can either setup ONSSI to use an encoder w/driver and emulate Pelco-D, or buy a Rs-485 joystick and go direct (though the rs-485 control will only work for one operator).
- Buy an ONVIF (or Vivotek compatible) IP (not USB) controller. These are dedicated controllers that will not be slowed down by the VMS. It may help, though it's not going to help the video latency part.
- Use a dedicated PC running Vivotek's client and plug your USB joystick into that. The video may be faster as well as the PTZ commands. Make sure there are no unwanted interactions between the client and ONSSI.
Related: Request To Hikvision For a 4K PTZ With Analog HD Output
Are CVI PTZ'S Better Than IP PTZ'S?
I feel your pain, the PTZ control lag on IP is something that I have not been fond of myself.
If you just need to actively follow someone/something then you could possible get away with setting a bunch of presets. That will allow you to give the customer an easy way to zoom in and out on specific predetermined focus points.
There are a few things that could be going on here.
In short, you need to get a signal from the joystick into the PC, across the network, and to the camera.
I'm not sure how OnSSI is architected. I *think* the client sends PTZ commands to the camera through the server, but you should confirm with OnSSI.
Do a ping test between the PC and server and between the server and the camera. You should get a response time in ms. The sum of these is going to be your minimum lag, if it takes (as an extreme example) 4 seconds for a packet to get from the server to the PTZ there is no practical way to expect the PTZ to respond faster than 4 seconds. I'm *guessing* that your overall network lag will be pretty low, but it's worth verifying up front that you're not fighting a network issue.
There are some settings you can adjust on the client PC to help reduce lag from HID (human input device) components. See this link for some good examples: Reducing USB lag
I also think OnSSI offers a soft joystick - onscreen buttons. If you use that instead of the USB joystick, do you get faster response? If so, your issue may be more on the client side, the Joystick, USB bus, or other software stack items. From what you described it also sounds like you need to adjust joystick sensitivity and/or PTZ sensitivity (some let you specify a degrees per seconds movement rate).
If the PTZ has a web interface, try loading that up from the client PC. Clicking the PTZ movement buttons there *should* be executing code directly on the PTZ, that is another test that will likely show you the fastest possible response time as a baseline.
You'll probably never get the exact same response and feel as an RS-485 PTZ, there's just too much other stuff going on with IP. But you can typically get a responsive enough system that the operators can achieve a feel for it and use it effectively.