IPC-HDBW4431R-ZS slow zoom in BI, no presets?, cgi-bin...

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
1) So, I bought this cam, in BI I'm trying to use the Zoom/Focus commands and they work, but in some res/Mbit config they are so sloooow: it can wait upto 20s to update the pic! In the browser instead all is fast.
I.e. @max Res 2592x @20fps 10240Mbit

instead if I put down the res and the Mbit, it's ok
i.e @res 1080 @25fps 8192Mbit

Why this in BI? Is there a way to make it work fast also at max res/Mbit?

2) I'd like to use the presets to use at least 2 zoom levels, has this cam no presets?

3) maybe should I go with cgi-bin, I found this command here:
Dedicated License Plate Cam project

is there a complete list of commands? I found some Dahua http API pdf, but I found no commands like that... They have only FocusNear, FocusFar and similar.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
A Varifocal Camera is not a PTZ; they dont have to be fast or have presets.. they supposed to be set it and forget it.

AutoFocus is triggered from any zoom API Commands you give it, even if you specify a focus value; so there is no guarantee that any external API call will properly focus the camera.. I tried this and far too often the camera would end up out of focus so I gave it up.
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
A Varifocal Camera is not a PTZ; they dont have to be fast or have presets.. they supposed to be set it and forget it.
I know it's not a PTZ, I only want to change the zoom some rare times and then put it back. Not a lot of (fast) movements at all.
Ok, so they hasn't presets, is it possible to change the zoom with http in BI?
Or should I rely only on that cgi code?

AutoFocus is triggered from any zoom API Commands you give it, even if you specify a focus value; so there is no guarantee that any external API call will properly focus the camera.. I tried this and far too often the camera would end up out of focus so I gave it up.
As I said I'm not a lot interested in manual focus, more on the zoom position, so if I set the zoom and it makes an autofocus, I'm fine.

Anyway, how did you get that cgi-bin code? I have not found in DAHUA_HTTP_API_FOR_DVR_V1.29.pdf
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
Thank you, my version was old and lacks that...

Ah, ok, so autofocus fails and you can't do manual focus: good!! ;)

I tried a bit: it seems it's better to give a command for zoom (and it makes AF) and a second one for precise manual focus. At the moment it seems to work but I see it's not that consistent... I will try more.

Now I'm trying to write the code in autoit with winhttp.au3 ... at the moment it's not working with that cgi-bin code, I made another script to drive BI and that worked.
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
Well, I'm messing with http commands...

In the header answer after I opened a connection to 192.168.1.222, and sent the cgi-bin line above, I get:
HTTP/1.1 401 Unauthorized
Connection: close
Content-Length: 0
WWW-Authenticate: Digest realm="Login to 2L00D68PAA00300",qop="auth",nonce="912973344",opaque="f2beeb0280382b94610e6a573c221165eb43f755"
while in the API pdf they say:
If the http request does not
have “Authorization” , the Dahua video product returns 401, utill the http request has a legal authentication .
When digest authentication, the Dahua video product response:
WWW-Authenticate: Digest realm="DH_00408CA5EA04", nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",
stale=FALSE, qop="auth";
The client calculates the digest using username, password, nonce, realm and URI with MD5, then send the following request:
Authorization: Digest username="admin", realm="DH_00408CA5EA04", nc=00000001,cnonce="0a4f113b",qop="auth"
nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",uri="cgi-bin/global.login?userName=admin",
response="65002de02df697e946b750590b44f8bf"
So, I got different length nonce and opaque (they also use cnonce different from nonce?) ??
More, how should I calcolate the MD5, using which string? And should I put it into "response"? I see also no password field...

Any tips?
 

TVT73

Pulling my weight
Joined
Aug 29, 2016
Messages
406
Reaction score
108
Location
Germany
1) So, I bought this cam, in BI I'm trying to use the Zoom/Focus commands and they work, but in some res/Mbit config they are so sloooow: it can wait upto 20s to update the pic! In the browser instead all is fast.
I.e. @max Res 2592x @20fps 10240Mbit

instead if I put down the res and the Mbit, it's ok
i.e @res 1080 @25fps 8192Mbit

Why this in BI? Is there a way to make it work fast also at max res/Mbit?

2) I'd like to use the presets to use at least 2 zoom levels, has this cam no presets?

3) maybe should I go with cgi-bin, I found this command here:
Dedicated License Plate Cam project

is there a complete list of commands? I found some Dahua http API pdf, but I found no commands like that... They have only FocusNear, FocusFar and similar.
Did i understood it right, if you lower down the resolution it runs nearly as fast as with browser plugin? I don´t use blue iris or its app, but it sound similar as I have with my h265 cams with gdmss or tinyipcammonitor.
Do you use h265 codec? and/or smart codec?

My explanation for this behaviour:
- mobile devices are mostly not powerful enough to use high bitrates @ 4mp and h265. I have a OnePlus 3T, it´s one of the fastest smart phones actually available, it´s able to show with gdmss a smoot h265 stream @ 4mp / 8Mbit
Tinyipcammonitor is not able to show it with full frames, but with around 10 frames/s in softwaredecode mode. HW+ mode works at full frame rate, but has a bug and runs at 1280*720p only...
Compared to any other devices all of them are only able to take the same cams with 3-4 Frames/s.
gdmss seems to have a better hardware codec compatibility.

- in the moment you zoom the frame rate (@vbr) is going down because of much more data your Android device needs to handle. On my slower devices it also last much longer to get a stable picture again.
- If the internet speed is fully used, all zooming and ptz actions last much longer. My Foscam FI9826W has the problem with tinyipcam, that i need to wait several seconds for sending the next ptz command, when i use it from external access. In my home lan its working fine.

Did you try to use the cam with gdmss light? You can try the cam with smart codec, it reduces the network traffic by much and the apps can easier handle it, but at the zooming moment you have also very high traffic, so it maybe does not help.
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
@nayr, thank you! Didn't know it was a protocol. So I found out a already written method on the library: perfect,it works well!

@TVT73
Sorry, I didn't mentioned I'm using classic h.264 or h.264h, not h.265.
More, all tests are made in lan, so it's not a bandwidth problem.

Anyway the thing is huge, because you must wait upto 20 seconds (!!) to see the pic updated. Incredible.
Reducing Mbits seem to make it work, even at higher res (but anyway a bit less responsive compared to 1080p). When I'll have time I'll test more.
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
I confirm the prob in BI (4499) (in the browser all is ok):
The problem is not related with zoom, but it was a delayed and jerky video.

It was 2 problems: BI buffer and HW acc.
The jerky and delay was due to HW acceleration (Yes+VPP, Yes doesn't work): it seems it makes worse CPU usage and jerky/delay video than No acceleration...

I use W7/64bit/Intel i3-2100T/8Gb Ram

Is this CPU capable of HW acc? It should...
Intel® Core™ i3-2100T Processor (3M Cache, 2.50 GHz) Product Specifications
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
Ok, HW acceleration works with 1080p, so it's a problem of Res: GPU can't elaborate too much res... also 2304 gives problems.
 

frank10

Getting the hang of it
Joined
Sep 13, 2015
Messages
178
Reaction score
11
A Varifocal Camera is not a PTZ; they dont have to be fast or have presets.. they supposed to be set it and forget it.

AutoFocus is triggered from any zoom API Commands you give it, even if you specify a focus value; so there is no guarantee that any external API call will properly focus the camera.. I tried this and far too often the camera would end up out of focus so I gave it up.
I tried to make first a call to the desired zoom with a wrong focus, then wait about 4s (it makes its autofocus), then send another API command with the same zoom, but the correct focus: I tried dozen times and it seems to always work.
Did you tried this 2x trick settings?
 
Top