Http url to change Snapshot Interval on Dahua Cameras

Feb 13, 2019
5
3
Vila Velha - ES
Dear friends.

Im looking for the HTTP url to change the snapshot interval on Dahua Cameras programmaticaly

Cant find anything, even on Dahua API documents.

Does anyone faced this?

Tks in advance.
 
Set Snapshot Config


Syntax


Code:
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

Code:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Snap[0].TimeSection[0][0]=1%2012:00:00-18:00:00

ch: integer, array index starts from 0, which means video channel (equals to video channel index -1, and so 0 means channel 1).
wd: week day index, range is [0—6] (Sunday — Saturday).
ts: time section index, starts from 0.

ParamName
Snap[ch].TimeSection[wd][ts]

Description
wd (week day) range is [0 — 7] (Sunday — Saturday, Holiday)
ts (time section) range is [0 — 23], it's time section table index.
Format: mask hh:mm:ss-hh:mm:ss
Mask: [0—4294967295], hh: [0—24], mm: [0—59], ss: [0—59]
Mask indicates record type by bits:
Bit0: regular snapshot
Bit1: motion detection snapshot
Bit2: alarm snapshot
Bit3: card snapshot
Bit6- POS record
Bit4,Bit4,Bit7~Bit31-reserved

May not work for your application. Have not tested.

Let us know if you are successful.
 
  • Like
Reactions: Flintstone61
Hello Friend.

Realy... Thanks a lot for you help, but this command did not let me change interval between each snapshots...

I´ve already read all the API document and still could not find anything to change this interval...:(:(


1650024439824.png
 
Syntax

Code:
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

Example

Code:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].EventHandler.AlarmOutChannels[0]=1&Alarm[0].EventHandler.AlarmOutEnable=true

handlerName.EventHandler.SnapshotChannels
Snapshot channel list.

handlerName.EventHandler.SnapshotEnable
Enable/Disable snapshot function.

handlerName.EventHandler.SnapshotPeriod
Range is [0—255].
Frames between snapshots.
0 means continuously snapshot for every frame.

handlerName.EventHandler.SnapshotTimes
Range is [0—65535]
Snapshot times before stop, 0 means don't stop snapshot.
 
Hello friend... still not working.

Did you test with your camera? Does it works for you to change the snapshot interval?


Syntax

Code:
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

Example

Code:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].EventHandler.AlarmOutChannels[0]=1&Alarm[0].EventHandler.AlarmOutEnable=true

handlerName.EventHandler.SnapshotChannels
Snapshot channel list.

handlerName.EventHandler.SnapshotEnable
Enable/Disable snapshot function.

handlerName.EventHandler.SnapshotPeriod
Range is [0—255].
Frames between snapshots.
0 means continuously snapshot for every frame.

handlerName.EventHandler.SnapshotTimes
Range is [0—65535]
Snapshot times before stop, 0 means don't stop snapshot.
 
It is a function that I have no use for, thus did not test to see if it would work.

Did not locate any other references to snap, snapshot or interval. One would think that would be a published function, but perhaps not.
 
  • Like
Reactions: Leonardo Silva
Get statement for displaying the Motion Detect data for RJ-45 port 1 (Camera 0). The below code only retrieves camera information.

Code:
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect[0]

Below is a selection from the GET output for camera 0.

table.MotionDetect[0].EventHandler.SnapshotEnable=true
table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
table.MotionDetect[0].EventHandler.SnapshotPeriod=1
table.MotionDetect[0].EventHandler.SnapshotTimes=5

Change [0], in the code, to the camera of interest. On a 16 port NVR cameras are numbered 0 through 15. (N-1)

There is also this for the alarm channel.

Code:
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].EventHandler

table.Alarm[0].EventHandler.SnapshotEnable=true
table.Alarm[0].EventHandler.SnapshotChannels[0]=0
table.Alarm[0].EventHandler.SnapshotPeriod=1
table.Alarm[0].EventHandler.SnapshotTimes=5

Not sure if any of the above addresses the issue of snapshot interval. Please provide any code that works for setting snapshot interval if something is found that is operational.
 
Hello Friend.

Realy... Thanks a lot for you help, but this command did not let me change interval between each snapshots...

I´ve already read all the API document and still could not find anything to change this interval...:(:(


View attachment 125278

Code:
/cgi-bin/configManager.cgi?action=setConfig&Encode[0].SnapFormat[0].Video.FPS=0.00166666667
1 / 600 (interval) = 0.00166666667
 
You are 100% correct in that the code will only display what is in the camera and will not change any attributes.

In my line of thinking, it is nice to know what is presently in the system. Then when changes are made, using the SET statement, one can see if any change did or did not occur.

Looks like this one will remain a mystery!