5.5.6.17 May 1 2022 - PTZ Control Feauture

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
So I just wanted to share this here in case someone else like me finds this useful. So I always loved one of the features in the Dahua Web UI of PTZ cameras where I could select a part of a screen and it would pan, tilt, and zoom in that area of selection. I requested this feature from the BlueIris team, and they were able to capture the packets they needed for it to work in BI. So now with the latest version, we have the capability of doing something similar to get a similar result. Thanks a ton to BlueIris Team for this.


1) Right Click on the PTZ Camera and click "Camera Settings."
2) Select The PTZ/Controls Tab
3) In the drop down menu, select Dahua New V4 from the Network IP Selection.
1651421577714.png
4) Click "OK" to exit the screen.

5) Now, on the image of the PTZ camera,Hold Down the Control Key and Click Anywhere on the Screen Where You Would Want the Camera to Point and Zoom.

I hope you guys find this feature interesting. Thank you to the Blueiris team again for this.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Big question from me is...will this work in UI3?
I just did try in UI3 Unforutunately at-least as of now When I hold Down Control Key and click on The Image in UI3, The Camera selection goes back to the main screen or all camera view. So does NOT work in UI3.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I gave this feature a try in Blue Iris and it kind of works, but it is really sloppy. Lots of bugs.

1) Every click causes the camera to zoom in a little bit, which is almost certainly unintentional. Maybe Ken only tested with a camera that didn't support zoom?
2) No zooming support by dragging a rectangle (this is a capability that has existed for ages in 1st-party camera interfaces).
3) The positioning is very wrong if I don't have the camera maximized, e.g. I'll click on the right edge of the frame and the camera moves left.
4) With the camera maximized, it doesn't move as far as it does if you use the relative positioning function in the camera's web interface to click on the same spot. Granted it is also incorrect if you use the relative positioning function in the camera's own web interface, but it isn't off by as much.

I seem to recall BI used to have a really janky dedicated button for relative positioning like this a long time ago ... I found this old screenshot that has it, it is that weird grid button in the lower left.



Basically you would click that button and it was sensitive to the exact spot on the button where you clicked, so e.g. if you clicked on the bottom edge of the button then the camera was supposed to move down. Except in 99% of circumstances the camera didn't have this manner of relative positioning support so the button just didn't do anything, which is probably why it disappeared a long time ago.

Anyway, there's no way to use this in UI3 currently, as there is no documented API to communicate the request to Blue Iris. I just sent a support email asking for it.

This feature is normally called "3d positioning" or "relative positioning". I've used it before on Hik and Dahua cameras, and I always found that the manufacturers don't calibrate the function very well so the camera never quite centers on the spot you clicked, most noticeable when you click further from the center because the movement is larger and the error is consequentially larger too. Same issue for zooming. In the camera web interface with this function active, you can drag a rectangle around a spot and the camera will try to zoom in to make the field of view match the rectangle you drew. I was actually able to do a lot better job of this by using the camera's "absolute positioning" API where you just give it an absolute coordinate (0-360 degrees horizontal, 0-90 degrees vertical, along with a zoom factor). The math is very basic, you just need an accurate knowledge of the camera's horizontal and vertical field of view when fully zoomed out, and this function can be implemented almost perfectly. But the camera vendors just can't be bothered I guess. Some cameras actually don't align the image sensor with the center of the lens which messes up the math a little bit too. Another thing they could correct for, but don't.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Agree, While it is no where as clean Execution as in the Dahua Web UI but still A bit useful as multiple clicks by holding control key down kind of points in the right direction for me. I made a small video of what I mean. Maybe if enough of us find this useful maybe BlueIris team can polish this more.

 

Futaba

Pulling my weight
Joined
Nov 13, 2015
Messages
220
Reaction score
153
I just installed 5.5.6.17. I have two SD49225XA-HNR cams. Both are already configured to use Dahua New V4 PTZ protocol. Neither works with Ctrl-left click to pan and zoom in the Windows app. Maybe some Dahua cams are not yet supported at the moment.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I just installed 5.5.6.17. I have two SD49225XA-HNR cams. Both are already configured to use Dahua New V4 PTZ protocol. Neither works with Ctrl-left click to pan and zoom in the Windows app. Maybe some Dahua cams are not yet supported at the moment.
Could be a compatibility problem. If Ken used packet capturing to determine how the relative PTZ function works, then he is probably using Dahua's private undocumented API. This is faster than the "public" documented API, but more likely to change and break compatibility between different firmware releases.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Could be a compatibility problem. If Ken used packet capturing to determine how the relative PTZ function works, then he is probably using Dahua's private undocumented API. This is faster than the "public" documented API, but more likely to change and break compatibility between different firmware releases.
Ken is using my SD6AL433XA-HNR and capturing packets for this feature. He is now looking into the zoom out part as well. Good point maybe this will stop working with new firmware even on same model so wanted to post here the firmware version at-least the one my SD6AL433XA-HNR model is on

1651506949984.png
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I did include technical details of how that API request works when I emailed Ken yesterday about adding support for UI3 to send the commands. He probably hasn't seen the email yet. I have used the API before in my own app so I am very familiar with how it works, and its weaknesses and bugs.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
Also it seems like it is working on my 3 other PTZs Models also for now.

DH-SD8A820WA-HNF
DH-SD8A840WA-HNF
SD6CE245U-HNI

1 of the PTZ model it is NOT working on for me is the.

SD49425XB-HNR
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
1651512657251.png
Seems like my firmware on the 4mp version is a bit newer that is why it is not possibly working for the SD49425XB-HNR for me. But it works for my other 4 PTZ fine.
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,208
Reaction score
1,472
Location
USA
It might be your PTZ version. I just upgraded mine to latest firmware so it will work in W11 Edge which it does now perfectly and the New Dahua V4 still works good as well. But it is the same PTZ version.

Screenshot 2022-05-02 131913.png
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
Ken was receptive and added the necessary API for UI3 to include 3D positioning capability, so UI3-211 will include it shortly.

There are 3 ways to use it, but currently you need to maximize a PTZ camera (not currently usable from a group view).

1) Click or drag with the mouse wheel / middle button.
2) Hold CTRL, then click or drag with the left mouse button.
3) Click the Toggle 3D Positioning button to make it turn green, then click or drag with the left mouse button / touchscreen.
1651537841379.png 1651537863199.png

Drag right to draw a red rectangle that commands the camera to zoom in. Drag left to draw a blue rectangle that zooms out.

As of UI3-211, 3D positioning will be visible for all PTZ cameras whether it is supported internally by BI or not. I'm hopeful that Ken will at least have BI return an error message if the function is used on a camera that doesn't actually do anything with it. But as of right now it just fails silently.

During development, I witnessed this fail to do anything on my SD49425XB-HNR intermittently. Did a packet capture and found the cause, and let Ken know about it. So you can expect BI 5.5.6.19 will probably fix that bug.
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
It is these little things that make the $30ish annual cost for another year of updates worth it.

I suspect withing a year period, something is added that is beneficial to almost everyone.
I'm right there with you. LOL. This 3D positioning feature is practically invisible in BI, so I'm LUCKY that I saw @tech101 post about it, otherwise who knows how long before I would have noticed.

UI3-211 is available now by the way and it works with BI 5.5.6.18 if manually installed.
 

tech101

Known around here
Joined
Mar 30, 2015
Messages
1,472
Reaction score
2,125
Location
SF BayArea, USA
I'm right there with you. LOL. This 3D positioning feature is practically invisible in BI, so I'm LUCKY that I saw @tech101 post about it, otherwise who knows how long before I would have noticed.

UI3-211 is available now by the way and it works with BI 5.5.6.18 if manually installed.
Thank you so much for getting this in UI3 :) This is going to be so helpful in many scenarios.

Question On A different topic does anyone know any http command or way to control the Laser IR Angle and intensity thru BI when the Camera IR is in Manual Mode that is ..?

1651546693423.png
 

wepee

Getting the hang of it
Joined
Jul 16, 2016
Messages
248
Reaction score
57
Off the topic a little bit, but can this make it work on the cheap DAHUA Imou ranger 2 camera? :)
I tried but no response. :confused:
I am using the older version of BI v5.4.4.8.
 

IAmATeaf

Known around here
Joined
Jan 13, 2019
Messages
3,287
Reaction score
3,252
Location
United Kingdom
Off the topic a little bit, but can this make it work on the cheap DAHUA Imou ranger 2 camera? :)
I tried but no response. :confused:
I am using the older version of BI v5.4.4.8.
This change came out with the latest .17 update so no real surprise that it doesn’t work with a much older release.
 
Top