Recording Variables (Anti-Dither, Pre-Record, Pack Duration etc) - Providing A Rundown of What They & Others Do & How They Work

Wildcat_1

Known around here
Joined
Dec 9, 2018
Messages
2,047
Reaction score
5,867
Location
US
All, i’ve been asked by many recently to help explain the various recording related verbiage / variables featured in cams and specifically the Dahua NVRs. I’ve also received and seen a lot of questions / posts about Motion Detection, specifically ‘why is Motion Detection performance poor, why am I missing start/end of motion, how do I improve it, how does it work ?’ along with being asked why do I and many others here recommend AGAINST using it.

So as a number of these variables also relate to Motion Detection, I thought I would attempt to tackle these areas and more with this post in efforts to assist. I saw ANR mentioned in cliff notes but believe the others I didn’t see there so if this helps people maybe elements from this post could be added.

I’ve setup some mock configs and captured screen grabs to illustrate these menu items and settings for the variables I list below. Please note, some of these variables are industry standard and others are specific to certain manufacturers (Dahua, Hik etc). Posting in the Dahua forum for now.

Ok, large post incoming, let’s go:


  • ANR - Automatic Network Recovery - Ability to have a cam write to local SD card (if installed) if network connect is interrupted to NVR. Once NVR connection is resumed the NVR will re-poll the cam for video and pull back to the NVR.

    Pic 5 - Dahua NVR Storage Menu Showing Schedule Screen With Pre Record & ANR Options.jpg

  • Anti Dither (Tied to Motion Detection) - This is the amount of time allowed between 1 motion event and another. Defaults to 5 seconds which means that 1 motion event is ‘allowed’ every 5 seconds and is wrapped in 1 clip. Important to remember that Record Delay factors into this. I’ll explain more in an example below. However, on top of this remember that you also have Sensitivity & Threshold settings within the Motion Detection Area selection options. All of this plays into how and when MD activates and when it will detect a target on scene. MD is now also augmented by SMD (Smart Motion Detection) which while very cool, adds a layer of object filtering to MD but also another Sensitivity layer setting that should be dialed in if using this.

    Pic 1 - Dahua Cam Web GUI Motion Detection Main Menu.jpg Pic 2 - Dahua Cam Web GUI Motion Detection Area Selection Sub Menu.jpg Pic 3 - Dahua Cam Web GUI Motion Smart Motion Detection Menu.jpg

  • Pre Record / PR - Amount of buffer that is recorded before an event IF a target is detected. NVR and cams are separate here so if you use an SD card in cam, the settings from the connected NVR (Dahua in this example) will NOT propagate the camera Pre Record. In Dahua cams you will find this in the web GUI within Storage, Record Control Menu. In Dahua NVRs (running 4.0) you’ll find this in Storage, Schedule, Record menu and can set for all channels or individual ones.

    Pic 5 - Dahua NVR Storage Menu Showing Schedule Screen With Pre Record & ANR Options.jpg

  • Pre Event Record - same as pre record on NVR this is just for local (SD card) storage options on a Dahua cam. Again found in Storage, Record Control menu of the camera web GUI

    Pic 4 - Dahua Cam - Record Control Menu With Pre Record & Pack Duration.jpg

  • Post Record buffer. This is the amount of ‘extra’ time (in seconds) that you want to continue recording after an event. Generally not used as much due to events recording until a target (defined when using IVS, Object filtering etc) has left the rule / area. However if you are using MD and do want to set this you can do so in Dahua NVRs (running 4.0) in the Alarm, Video Detection menus. TIP: This is called Record Delay in cam. See below

    Pic 6 - Dahua NVR Alarm Video Detection Menu Showing Post Record Options.jpg

  • Record Delay - In camera web GUI. This is the amount of time between ending recording of an alarm or event before the cam / NVR will record the next one. IMPORTANT NOTE 1: When using this feature in cam and writing to SD card, the Record Delay time (10s default) is added onto the end of the recording similar to Post Record buffers above.

  • Pack Duration - the largest amount of time (or file size*) that events can occupy 1 file before a new one is written / file is split. This is found in Storage, Record Control menu of Dahua cams. This is the equivalent of Create Video Files = Time Length / File Size on the NVRs running 4.0 located in the Storage, Basic menu. * File systems limits observed of course

    Pic 7 - Dahua NVR Pack Duration or Create Video File Time Length Options.jpg



Motion Detection - Example of How It Works & How The Variables Above Factor In

Remember that the variables above work in conjunction with each other and can trip you up if you don’t use correctly. Let’s go through a Motion Detection example. For the record I do NOT advocate Motion Detection at all and instead would ALWAYS recommend a combination of Continuous Recording + IVS rules.

First, if you are using super tight or worse yet, restricted FOV’s (those with small sections of an image reserved for MD) and/or have high speed of target in the FOV, never use MD, as you’ll most likely miss the majority of targets. If you are able to capture motion with super tight FOV’s using MD then likely your threshold and sensitivities are so low & high (respectively) that you are capturing every little movement which is not good and if you want that……….USE CONTINUOUS :)

However, lets now assume for a second that the cam does detect motion, then you have to factor the application of the variables above. Lets walk through it. MD is seen so starts for a minimum of 5 seconds (anti dither default) then if no further motion is detected (i.e. motion stops within the default time), applies any post record and record delay before the camera is ‘ready’ to wrap up the clip and look for any new events. IMPORTANT NOTE 2: As I noted above remember that when using in-cam recording, Record Delay is built into the recording in a similar way to Post Record on an NVR. So lets breakdown what this sample event would look like:

In-Camera Recording
Motion Detected so the following kicks in:​
+5s (Pre Record)​
+5s (Anti Dither) - Leads to minimum recorded time for any motion 5s or under​
+10s (Record Delay)​
=20 seconds total recording​

If just using MD then this would result in 1 clip and the cam would not be ready for the next event until the end of this time.

IMPORTANT NOTE 3: If you set your NVR for Continuous + MD or Continuous + MD + IVS, although you may feel that the trifecta of these ensures a capture, the problem in reality is spill over of events into record types, this can lead to MD clips with a cutoff start or end etc and in some cases leads to a mis-cap altogether. Again, I (like others) always recommend Continuous + IVS (no anti dither & no post record delay settings) as this ensures cleaner caps in separated files. IF you must use Motion Detection then try to avoid using it with any other form of recording or you run the risk I mentioned above.


What About AI - How Does It Detect & Process Objects

This is an area that generates a lot of misconceptions on what it should and should not capture therefore its important to understand how AI works in cam. Lets look at ANPR for example. In ANPR supported NVRs or cameras (supported, not dedicated traffic cams), the camera has to detect a target (using SOC based AI algorithms), identify it as a vehicle before it will then process for a plate.

A lot of times people may ask ‘why did I not get a plate hit on an ANPR cam when I see the car/plate on screen ?’. Well, depending on angle, distance to target, height, speed of target etc, IF the cam cannot detect a vehicle it will never process for a plate. Good example of this is night shots for ANPR, black screen, 2 seconds of bright plate flying by = not enough for processing. Think of ANPR as applying 2 stage AI, 1) Object Filtering of Vehicle first (has to detect a target as a vehicle) then 2) applying AI processing for plate within the real-time cap, which is why its important to configure an ANPR environment correctly. In this example with regular (non automated license plate processing) you may be lucky and depending on fps be able to grab a manual usable plate frame but again for ANPR the cam would never have detected a vehicle so would not start looking to process a plate.

Same goes for Object Filtering in general. Great addition to a lot of Dahua cams in the Pro AI range but remember the cam has to detect the object you've selected (Vehicle, Non-Vehicle, People) first and do that in the FOV you’ve created. So cut it some slack when you’re FOV is the size of a postage stamp due to extreme zoom ;)

This is why it’s so important to get install locations right, understand time on screen for a target, within that, overlay FPS to truly give you an idea of how many frames your cam might actually grab and finally dialing your image within FOV specifically for the target capture zone and the desired end result. These are critical steps and if you take these into account along with the recording functions, variables above (where applicable), understand your equipment, special features such as AI and how those work, you should see higher success in caps and installs.

As always, please reach out with any questions etc and always review the great Cliff Notes

Hope this helps
 
Joined
Apr 7, 2020
Messages
10
Reaction score
7
Location
us
Thanks @Wildcat_1. I'm a newbie and one of those who have (indirectly) asked, specifically about Pre-Record. I would appreciate a bit further clarification of "IF a target is detected".

I have a Dahua 5216 NVR running version 4.0 and a Dahua 5442 test camera. The camera does NOT have an SD card (yet). The NVR is configured to do Pre-Record 10s and Motion Detection. It detects "motion" (which is of course scene difference, really), but no Pre-Record ever occurs. I have not yet "graduated" to IVS.

In this Motion Detection setup, what exactly constitutes "a target"? If "motion" is not "a target", then what is, and where do I set up "a target" in the NVR's Motion Detection?

I would have thought Pre-Record was just that - if an Event happens, record <n> seconds before for context - no other criteria needed, or wanted for that matter, to cause non-recording...

Of course, if all this is documented somewhere please feel free to refer me to RTFM! :)

Thanks!
 

zape

Getting the hang of it
Joined
Sep 21, 2017
Messages
221
Reaction score
69
events recording until a target (defined when using IVS, Object filtering etc) has left the rule / area
This does not work in my case, do I miss any setting in configuration?
I set up my IVS rule as attached and it stop recording after 10 seconds after the event fired (target enters zone), not until a target has left the rule / area .
For example: when I mow this yard it starts recording once I enter the zone, then I make it up to the sidewalk (without leaving the zone), then I turn around and go down and it stops recording on my way back while I'm still in the zone!
 

Attachments

Last edited:

Shockwave199

Known around here
Joined
Mar 13, 2014
Messages
1,016
Reaction score
550
Location
New York
I record continuous. I record motion detection as well to help me zero in on events. I have spent the better part of my day off trying to get IVS trip wire set right and it has completely fried me- I GIVE UP- at least for today. I saw this great post but in the end it just doesn't seem to work out for me. The absolute biggest deal breaker is simply being able to search for the IVS footage. DMSS doesn't show it. I know, looking at playback in an app? Well, for us it is 90% of what we want a quick look at during the day. Almost never do I say huh, what was that out there- let me go to my computer and dick around for it. You grab the phone or tablet for a quick look, almost always. Plus the web interface doesn't show it on the timeline reliably- sporadically at best. PSS- again, too much trouble for anything more than something serious to find. And the nvr is the same. I would LOVE to record full time and IVS only- love to so I can avoid all night motion detection from fog like last night. But NO WAY can IVS be counted on. And how the heck do you properly adjust the target max/min sizes??? What exactly does that do and how best to size them- even basically?

I'm venting I know. But man, this is frustrating. :banghead:
 

Wildcat_1

Known around here
Joined
Dec 9, 2018
Messages
2,047
Reaction score
5,867
Location
US
DM me and will help where I can. Ping me your cam and NVR config as what you are wanting to do (record IVS and zero in on events that matched the IVS criteria) is absolutely possible and expected. Will help where I can. Also let me know if you have remote access setup and can always try to arrange a time I can hop on your system and take a look.

HTH

I record continuous. I record motion detection as well to help me zero in on events. I have spent the better part of my day off trying to get IVS trip wire set right and it has completely fried me- I GIVE UP- at least for today. I saw this great post but in the end it just doesn't seem to work out for me. The absolute biggest deal breaker is simply being able to search for the IVS footage. DMSS doesn't show it. I know, looking at playback in an app? Well, for us it is 90% of what we want a quick look at during the day. Almost never do I say huh, what was that out there- let me go to my computer and dick around for it. You grab the phone or tablet for a quick look, almost always. Plus the web interface doesn't show it on the timeline reliably- sporadically at best. PSS- again, too much trouble for anything more than something serious to find. And the nvr is the same. I would LOVE to record full time and IVS only- love to so I can avoid all night motion detection from fog like last night. But NO WAY can IVS be counted on. And how the heck do you properly adjust the target max/min sizes??? What exactly does that do and how best to size them- even basically?

I'm venting I know. But man, this is frustrating. :banghead:
 

Shockwave199

Known around here
Joined
Mar 13, 2014
Messages
1,016
Reaction score
550
Location
New York
DM me and will help where I can. Ping me your cam and NVR config as what you are wanting to do (record IVS and zero in on events that matched the IVS criteria) is absolutely possible and expected. Will help where I can. Also let me know if you have remote access setup and can always try to arrange a time I can hop on your system and take a look.

HTH
You are first rate. I will reach out sometime soon. My brain is just to fried to continue for now lol.

NVR system- 4.1.5 12/18 2019/ 4208-8p 4ks
Cams- 2431TAS x 8

I think I really got it twisted because I was working it from three ends- the cameras gui, the nvr webservice gui and the nvr itself. TG I only messed around with one camera lol. I just wiped out the IVS and left it at continuous/motion.

So question- if you want continuous/IVS do you need to disable motion detection in the camera to stop that or does that need to be on always even when only doing IVS? I'm certain I had period schedules worked out right, smart plan enabled- all that stuff that I know to do as a matter of course. One big thing is the target max/min/pixel size settings. I didn't even bother with the pixel size settings. But max/min I was reshaping the two boxes having no clue what that really does and even still, IVS would trigger from a tree when I clearly didn't have it set that large. SMH, lol. But really- it's relying on finding that playback. I do not get a comfy feeling at all about rely on that over motion detection. I don't even fully rely on that which is why I record continuous.
 

Wildcat_1

Known around here
Joined
Dec 9, 2018
Messages
2,047
Reaction score
5,867
Location
US
Both IVS & MD can co-exist, the question being do you really need both. With the exception of cameras that support SMD (therefore giving an improved experience over standard MD due to object filtering), IVS is generally the way to go but does take some crafting to get what you want out of a given FOV. You would set continuous recording period and then overlay / interweave IVS rule capture on top. HTH and can chat further over DM when you're ready

You are first rate. I will reach out sometime soon. My brain is just to fried to continue for now lol.

NVR system- 4.1.5 12/18 2019/ 4208-8p 4ks
Cams- 2431TAS x 8

I think I really got it twisted because I was working it from three ends- the cameras gui, the nvr webservice gui and the nvr itself. TG I only messed around with one camera lol. I just wiped out the IVS and left it at continuous/motion.

So question- if you want continuous/IVS do you need to disable motion detection in the camera to stop that or does that need to be on always even when only doing IVS? I'm certain I had period schedules worked out right, smart plan enabled- all that stuff that I know to do as a matter of course. One big thing is the target max/min/pixel size settings. I didn't even bother with the pixel size settings. But max/min I was reshaping the two boxes having no clue what that really does and even still, IVS would trigger from a tree when I clearly didn't have it set that large. SMH, lol. But really- it's relying on finding that playback. I do not get a comfy feeling at all about rely on that over motion detection. I don't even fully rely on that which is why I record continuous.
 

Shockwave199

Known around here
Joined
Mar 13, 2014
Messages
1,016
Reaction score
550
Location
New York
So can it be confirmed that searching by ivs cannot be done in dmss? I've looked in the older app and the new app and I don't see it. So without motion detection set you you see nothing. I know it should show in pss and all but without motion detection armed as well, the app doesn't show ivs events. Is that correct?
 

spenser911

Getting comfortable
Joined
Jan 25, 2019
Messages
40
Reaction score
21
Location
USA
So can it be confirmed that searching by ivs cannot be done in dmss? I've looked in the older app and the new app and I don't see it. So without motion detection set you you see nothing. I know it should show in pss and all but without motion detection armed as well, the app doesn't show ivs events. Is that correct?
Yes I use it almost daily - when doing a record search in DMSS make sure you select "Smart"
 

Shockwave199

Known around here
Joined
Mar 13, 2014
Messages
1,016
Reaction score
550
Location
New York
So I have been having very good success now using intrusion zones, plus when appropriate adding trip wires in the scene. I'm able to turn off motion detection now and just go with continuous/smart. Working great. Now as night falls..lots more testing to see if this holds up per camera scene at night. Should be close to good! Thanks for this thread!
 
Top