Smooth PTZ moves

MateoMX

n3wb
Joined
Nov 7, 2020
Messages
1
Reaction score
0
Location
Mexico
Hi would like to use a SD22204UEN to create a live web stream and have the camera move gracefully between different positions.

I have saved these presets and when moving between them in a tour with the speed set to "1" the movement is pretty nice, but once the P/T position is reached the zoom then is adjusted at full speed, which is somewhat jarring. I would prefer the zoom to change during the P/T movement and for it to happen much slower.

I would like to read the latest HTTP API from Dahua but I am waiting for them to hopefully email it to me now that I have completed their NDA form...
For now I have been looking at some older documents from Amcrest and Dahua that I found elsewhere...

By using the "Continuously" code found in the Amcrest docs I can see that the camera can indeed make nice and subtle pan/tilt/zoom movements simultaneously...
This command moves the camera in all PTZ at a very slow speed for 5 seconds
http://CAM-IP/cgi-bin/ptz.cgi?action=start&channel=1&code=Continuously&arg1=1&arg2=1&arg3=1&arg4=5

Of course, trying to plan specific potions to hit using this method and just relying on a movement time duration is not going to work reliably, so I am still looking for a way to hit a particular position...

The "PositionABS" seems promising, however like the tour functionality, the P/T movement happens first and the zoom happens only once the camera reaches the correct position.
http://CAM-IP/cgi-bin/ptz.cgi?action=start&channel=1&code=PositionABS&arg1=180&arg2=20&arg3=40
The Amcrest PDF suggests a an additional "&arg4=" can be used to set a speed of movement, but I have not been able to get this to work and in fact once I set this, only the P value seems to be used by the camera.

I noticed if I trigger a brief "Continuously" zoom command moments before issuing a "PositionABS" command then this does affect the speed at which the final zoom operates, but I still can't find a way to slow down the P/T movement anyway and I would prefer for the zoom to occur during the P/T movement anyway.

Any ideas for other commands I could try? It's mostly a shame that the Arg4 isn't working for me on PositionABS because it seems like that would get me pretty close.
 

jack7

Getting comfortable
Joined
Mar 21, 2019
Messages
323
Reaction score
250
Location
USA
My Amcrest IP2M-858 (Dahua OEM ) is a bigger PTZ, and seems to have smooth Tour and Preset similar to what you described. If you have Pattern or Timed Task function in your camera, perhaps they might help. You could also try SmartPSS Tour & Task to see if it helps smoothness.
 

wrybread

Pulling my weight
Joined
Sep 12, 2018
Messages
256
Reaction score
119
Location
San Francisco
I know this is an old thread, but did you ever solve this? I'm working on the same issue.

I'm trying to smoothly pan between two points and currently breaking it up into multiple steps and panning using PositionABS but it's super jerky.

It would help if PositionABS allowed adjusting speed as it says it does in the manual, but apparently the speed parameter is ignored? In other words this:

Code:
http://192.168.5.220:80/cgi-bin/ptz.cgi?action=start&code=PositionABS&arg1=156.945&arg2=24.68&arg3=12.0&arg4=1&channel=0
Is the same as this:

Code:
http://192.168.5.220:80/cgi-bin/ptz.cgi?action=start&code=PositionABS&arg1=156.945&arg2=24.68&arg3=12.0&arg4=8&channel=0
(Arg4 is supposed to be speed, with a value of 1 through 8, but it doesn't make any difference what I use.)

1645750089940.png


I wish I could get the relative positioning working, that might help. The manual states:

1645764541750.png
But this gets a "Bad Request!" error:

Code:
http://192.168.5.220/cgi-bin/ptz.cgi?action=start&code=Relatively&arg1=100&arg2=10&arg3=0&channel=0
The "Scan" feature in the browser interface set to a speed of 1 is exactly what I'm trying to do, but the scan can apparently only scan left/right. I need to change the vertical axis too.

Has anyone figured out a way to smoothly pan between two points using the API? Ideally over quite a long time, like 1 minute and above.

Edited to add: I was able to get some relative position using the Position action (thanks to this thread), but there's a bug: it ignores any zoom value less than 2. That makes slow panning between points with different zoom levels extremely jerky.
 
Last edited:
Top