PTZ Camera not smooth when moving

itsteve

New Member
Hi, we have a Prisuals TEM-20V PTZ Camera, which is a knock off of the PTZ Camera. We have been unsuccessful in finding a way to control the camera without it moving too fast and jerking between each movement. We have been using the PTZ plug-in and it works with presets and clicking the virtual direction and zoom pad in OBS. but we have not been able to adjust the speed the camera moves. If we click the right arrow 2 times the video jerks to the right twice. If we press and hold it ramps up and usually swings way too far to the right. We have tried adjusting the camera settings in the camera and the plugin settings in obs-ptz but haven't found the secret recipe. Any ideas are appreciated. Thanks.
 

Lawrence_SoCal

Active Member
The joy of cheap knock-off cameras.
Apologies in advance, but this is likely going to get technical, and I don't know a realistic way around that
- first, you need to determine which control protocol(s) the camera supports? VISCA of IP, ONVIF, etc
if you are lucky, the camera will support one of the better known IP camera control protocols.
- Then, there are various software control systems (some stand alone, others plugins to OBS, etc) and there are hardware joystick controls. The better hardware control interfaces have toggles/controls for Pan, Tilt, and Zoom speeds (each separately controlled, though I've seen Pan&Tilt speed often combined). You'd need to test a control system that corresponds to your camera's control interface

So, the simple browser interface, on name brand cameras I've worked with, have many orders of magnitude more control options than are exposed in the simplistic (intentionally) device web GUI.
My Panasonic NDI PTZ camera has a 1,300+ pg manual documenting ALL of the command line control settings available. It is possible to write your own script that sends camera control commands to the camera... or some folks simply figure out (camera dependent) the syntax, and put the command line into a browser. I doubt a knock-off mfg did the same, or even tested a decent portion of the command interfaces (so good luck if you come across bugs). But once you determine which command language/interface/protocol the camera uses, there will be documentation out there on the settings options.

if you get lucky, your camera will support one of the major IP camera control protocols, and will be decently implemented (the cheaper the camera, the lower the probability of success). The there is the PTZ-controls plugin here, as well as PTZOptics.com has a free OBS plugin that supports VISCA (iirc).
you may get lucky, or you may have to be diligent.. you could use some software that supports the control protocol your camera uses, and it still not work...

https://prisual.us/products/sdi-ptz-camera-20x mentions ONVIF and further down visca Too bad you didn't get the 20N (NDI camera instead) though web page indicates PoE and IP video out? anyway....
 

AaronD

Active Member
My church has a set of cheap knock-off PTZOptics cameras as well, but they're close enough that the zoo of PTZOptics-compatible apps still works for them. As Lawrence said, YMMV.

I ended up writing my own app for a Raspberry Pi 4 with a touchscreen, using C++ and wxWidgets. It controls any number of VISCA-over-TCP cameras, as well as an audio mix using OSC-over-UDP, which our Behringer X32 supports. Just yesterday, I copied and pared down that app into a scripting utility to send OSC commands the same way as the full app does, but triggered by the Run action in the Advanced Scene Switcher plugin. That works in testing, then once I'm satisfied that it works in production, my next target is the cameras.

When I click/touch a preset button, my app doesn't just blindly read a file and send it out. There's some logic and timing in there to account for the camera's time to finish moving, before it sets focus. And it's a TCP connection, which keeps a persistent handshake long-term, unlike UDP that just sends a message and hopes it gets there. (pretty safe bet when both devices are wired to the same switch and they're not saturated, but no technical guarantee) So that'll be interesting too.

By the way, VISCA includes not only the target position, but also the speed to get there. Our cameras interpret it as a motor speed, not a total time, so large moves still take longer than short ones for the same speed setting. But if your controls expose that setting, it might be all you need.
Also, VISCA has both a position command and a jog command. Both take speeds, but only one takes a target. You might look into that too.
 

itsteve

New Member
@Lawrence_SoCal - thank you for the suggestions - I think that is enough for a foothold to start investigating solutions. We have spent many hours tweaking other settings, dealing with audio issues, training operators. Each time we solve a major issue we raise the priority on the smaller ones, and this is at the top of the list now. I have gotten quite the education over the past 2 years - we started streaming with an iPhone and a wireless mic. Now we have OBS, PTZ Camera, boundary mic, output from sound board, video input for the slide deck, mac mini, audio and video hardware. It was pretty easy to make everything work at first, but making it work better may take a lifetime!

@AaronD - Your app sounds nice. I have limited experience programming, but we have a couple of programmers in the church I can call on if it gets to that point.

I may try to take a look at the settings this week - I usually work on it early Sunday mornings before church. And we don't have remote access to it, so it may be a bit before I can give an update. I did remember that the camera's IR remote reacts similar to the OBS/PTZ plugin controls, so maybe we can just find the speed settings on the camera that will smooth things out.

Thanks for the tips.
 

AaronD

Active Member
Sounds like you're coming along pretty well! Keep tweaking and keep learning!

I usually work on it early Sunday mornings before church.
That's a big red flag to me. You're changing things with practically zero time to troubleshoot before it absolutely MUST work.

Far better, if you can, to do it immediately after the last service (if you have multiple), or early in the week, and of course test it immediately. Then you have the entire week (assuming it's only used on weekends) to figure out what went wrong, call for help if you need it, and in the worst case, wipe and reinstall everything just to have it back the way it was...like I actually did a few weeks ago when what was supposed to be a simple update went completely wrong. By the next Sunday, I had it back up and running, and nobody noticed except for the people I told about it.

I kept the now-freshly installed old system until I had solved the upgrading problem on a testing rig at home, then tried again on the production machine, after service. That time it worked!
 

Lawrence_SoCal

Active Member
+++++ to @AaronD 's comments. my background is IT infrastructure and security, vs programming, so my approach is before making major tweaks, to ensure a good backup of settings (of just playing with limited aspects). If I start mucking at OS layer, I'm of the work smart vs hard, so I do a quick full system backup to a local drive... so a restore is quick/easy, and EXACTLY what we had before (I have a bootable USB stick with backup s/w on it) and desktop tower has multiple physical drives... so easy-peasy backup.

During lockdown, I brought streaming computer home and worked on it during week. Doing so enabled quick progress on maturing OBS stream and overall presentation aesthetics. Now, absolutely concur... pre-service for us is the time to adjust PPT slide deck for OBS (as elderly person who compiles it is NOT the type to pay attention to details)... so we confirm audio levels, camera PTZ operations, etc, then 'clean' up slides, align, etc. Assuming plenty of spare time, i then do basic maintenance like I schedule following week's service, moving last week stream Recording to archive drive, etc.
Totally Agree with Arron .. Sum AM before service is NOT the time to be making system/settings changes (when possible)... tech being what it is.. yea, we make tweak things before service at least once a month (recently, after almost 2 years, camera changed IP address?? go figure, then a month later changed back... so I made changes to make sure that doesn't happen again.. the joy of MS OS updates means one can't count on things not unexpectedly changing)

@itsteve - assuming all you actually need is some finer PTZ speed control, some of the OBS PTZ plugins (PTZOptics or glikely's?) would be where I'd start. Just be prepared to spend some time figuring out the nuances of getting some existing, supported software to work with your camera. I've read of people getting to level of doing network packet captures to figure things out... but that is on the extreme end. Hopefully yours will be much simpler/easier to get some control s/w working with yoru camera. *IF* PTZ Optics free PTZ control software works, then you could also consider (if budget allows) something like the PTZOptics' latest SuperJoy joystick controller

For us, we have a single PTZ camera. I was quickly admonished to keep camera movement to a minimum. So we have the pan/tilt speed down around 10%(??).. from pulpit, 40ft over to lecturn, takes between 5+ seconds. So as cantor is finishing a hymn, we'll start camera move to next position. We have 9 camera aiming presets, and 99% of the time, simply moving between them works just fine for us, and our service type. I'd love to slow the Zoom speed down, but the vendor's GUI doesn't provide that option and camera movement has been 'good enough'.. slowing down zoom speed is high on my to-do list at this point).
 
Last edited:

AaronD

Active Member
+++++ to @AaronD 's comments. my background is IT infrastructure and security, vs programming, so my approach is before making major tweaks, to ensure a good backup of settings (of just playing with limited aspects). If I start mucking at OS layer, I'm of the work smart vs hard, so I do a quick full system backup to a local drive... so a restore is quick/easy, and EXACTLY what we had before (I have a bootable USB stick with backup s/w on it) and desktop tower has multiple physical drives... so easy-peasy backup.
One thing I didn't mention above, is that I bought a new hard drive specifically to replace the old one that still worked just fine. So I could have the old drive sitting outside, disconnected, as a zero-time backup. I installed the new rig from scratch on the new drive, it didn't go as planned, so I swapped back. IT REFUSED TO BOOT FROM THE OLD DRIVE!!!

Best I can figure is some undocumented "security" thing that locks itself to the last installation. Anything different, and it thinks it's been hacked and refuses to run. I saw nothing at all about that in the manual or the BIOS/UEFI settings.

So that's why I ended up reinstalling the old system from scratch, and why you always leave time for this sort of thing. I thought I had a quick "undo all". Turns out, NOPE!

For us, we have a single PTZ camera. I was quickly admonished to keep camera movement to a minimum. So we have the pan/tilt speed down around 10%(??).. from pulpit, 40ft over to lecturn, takes between 5+ seconds. So as cantor is finishing a hymn, we'll start camera move to next position. We have 9 camera aiming presets, and 99% of the time, simply moving between them works just fine for us, and our service type. I'd love to slow the Zoom speed down, but the vendor's GUI doesn't provide that option and camera movement has been 'good enough'.. slowing down zoom speed is high on my to-do list at this point).
I really like having multiple cameras! The one that's not live can snap to a new shot and be ready in just a second or two, depending on how different it is.
 

Lawrence_SoCal

Active Member
Best I can figure is some undocumented "security" thing that locks itself to the last installation. Anything different, and it thinks it's been hacked and refuses to run. I saw nothing at all about that in the manual or the BIOS/UEFI settings.
Yea.. modern boot sequence is FAR more complicated than the old days. As a result, that bootable USB drive has some tools on it to fix stuff like that boot issue
 
Top