PtzManualMotionDetect silencing videomotion.cgi/SubscribeNotify.cgi on newer cameras

Joined
Mar 24, 2019
Messages
5
Reaction score
2
Location
The Moon
Hi. I've contacted Dahua for support about this and I await their supportive response...

In the meantime I'd like to know if anyone uses the videomotion.cgi/SubscribeNotify.cgi interface for motion detection and knows how to shorten/disable the silence in the motion data stream after a ptz.start PositioABS command or a ptz.moveRelatively command is given. ptz.moveDirectly works with PtzManualMotionDetect/"Enable Manual Control Trigger", but it is too inaccurate to perform automated tours. The built-in tour function disables video motion detection so I can't use that either.

Old firmwares that don't support PtzManualMotionDetect don't silence the motion data upon PositioABS. Slightly newer firmwares have a 3-second silence (still too long for my use-case). The newest firmwares have a 10-second silence. Is there a way to compare the old and new firmwares and see what configuration causes this "feature" to be enabled?

Attached an image of the graph of the motion data of a bush swaying in the wind. The gap in the middle is the video motion data being silenced for about 10 seconds after a PositionABS command (to the same coordinates, so no actual ptz motion was performed)
 

jack7

Getting comfortable
Joined
Mar 21, 2019
Messages
323
Reaction score
250
Location
USA
Hi, just a suggestion for a workaround, even though I don't know the details of what you are doing, like tour preset durations, tour length, and tour frequency. I currently just use Amcrest cameras and software which are somewhat similar to Dahua.
I would think that a Dahua API command exists to turn on/off Regular record recording. If so, turn on/off Regular records for the duration of your tour. That should record everything in your tour in addition to the Motion records.
Or just turn Regular Records on/off for 10 seconds at the start of a PTZ command like positionABS.
 
Joined
Mar 24, 2019
Messages
5
Reaction score
2
Location
The Moon
Hi, thanks for replying! I'll explain exactly what I'm doing:

- Video is always being recorded, 24/7.
- The camera covers a FOV of about 30 degrees. In order to better utilize the camera, there are four PTZ zones, let's call them 1, 2, 3, and 4. Together they cover about 4*30=120 degrees.
- Each camera does a tour that goes (1-3-4-2-)(repeat)
- Switching zones takes about 1 second. Switching is done with the ptz.start PositionABS command. (The alternatives are too inaccurate, and turning on the built-in tour turns off motion detection)
- The camera watches a zone for 9 seconds and then switches to the next one. During those 9 seconds, video motion detection data is collected from SubscribeNotify.cgi.

All in all, the tour takes 40 seconds with about 4 seconds or 10% of "dead" time, and each zone is "blind" for 31 seconds - this is acceptable because crossing a zone takes far longer than 31 seconds. If motion is detected, the system sends an alert to my computer and my cellphone with the time, zone, and magnitude of the motion ("21:09:58 front gate 200", for example, where the magnitude is the sum of motion-detection-grid-blinks times their motion intensity. For example a hedgehog strolling might have a sum of 5, a person walking 50, a car slowly driving 100)

The main issue here is that with older firmware, after a ptz.start PositionABS command, video motion detection data is still being sent through SubscribeNotify.cgi. However, with new firmware, giving a ptz.start PositionABS command silences SubscribeNotify.cgi for about ten seconds (see image above).

That means that if a tour goes 10seconds-10seconds-10seconds-10seconds the camera will never send video motion detection data. Alternatively, if the tour is 20seconds-20seconds-20seconds-20seconds, over 50% of the time is wasted in silence, which lessens the effectiveness of the motion detection to completely unreliable levels. Moreover, each zone is "blind" for 70 seconds, which is enough time to cross it if you're lucky, and just too long to leave a zone unwatched.

The details are slightly different and simplified from my actual setup (there is more than one camera per zone and there is overlap between the zones, etc, giving tighter security and shorter "blind" periods) but this is the gist of it.

Diagram because that's a lot of words for something not very complicated:


Best case scenario: Dahua tells me how to disable the silencing that occurs when PositionABS is sent, and I get video motion detection data constantly and can have tours with the shortest effective video motion detection times.

Second-best: Dahua sends me firmware downgrades so I can keep running my current cameras with old firmware that doesn't silence video motion detection data.

Expected scenario: Dahua does nothing. I am forever at the mercy of my current setup not failing, because once it does I'll have to buy new cameras and create a completely new setup that does video motion analysis locally (instead of getting it from the camera)

Miracle scenario: someone on the forum already knows how to disable the silencing and tells me how.
 
Joined
Mar 24, 2019
Messages
5
Reaction score
2
Location
The Moon
A week later not a peep from Dahua.

Is anyone on the forum extracting the video motion data directly from the RTSP stream? The video motion data (the blinking 22x18 grid) is interleaved into the TCP stream and before I start trial-and-error trying to extract it, maybe someone can save me the trouble. Another option is extracting motion vectors from the h264 packets, but that would force me to additionally rewrite the video motion parsing code, parsing motion vectors instead of a 22x18 grid.
 
Joined
Mar 24, 2019
Messages
5
Reaction score
2
Location
The Moon
Still no word from Dahua. My next email is gonna be "dear customer service, if all new firmware is going to have this "feature" I won't be able to purchase any new Dahua network PTZ cameras..."
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,903
Reaction score
21,275
Still no word from Dahua. My next email is gonna be "dear customer service, if all new firmware is going to have this "feature" I won't be able to purchase any new Dahua network PTZ cameras..."
lol, cute, you think Dahua cares about you and your requests that none of their other users care about. Ha. Move on to another brand, wait, they wont care about you either.
 
Joined
Mar 24, 2019
Messages
5
Reaction score
2
Location
The Moon
lol, cute, you think Dahua cares about you and your requests that none of their other users care about. Ha. Move on to another brand, wait, they wont care about you either.
What a rude reply, from a staff member no less.

They clearly do care because they created the "Enable Manual Control Trigger" option in the first place, which means other customers are using it. The problem is that it's not working as intended.
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,903
Reaction score
21,275
What a rude reply, from a staff member no less.

They clearly do care because they created the "Enable Manual Control Trigger" option in the first place, which means other customers are using it. The problem is that it's not working as intended.
Awwww, you can stop using this forum as we. Like dahua, I don't care. It's cute that you think you are relevant.
 
Top