0% found this document useful (0 votes)
129 views79 pages

Dahua HTTP Api For Ipc&sd-V1.40

The document outlines the Dahua HTTP API for IPC, detailing its version history, authentication methods, and various API functionalities for configuring and managing Dahua video products. It includes specifications for HTTP transactions, camera settings, stream retrieval, playback, and audio encoding configurations. The API is compatible with specific firmware versions and provides examples of request and response formats for different functionalities.

Uploaded by

alex.sytyj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views79 pages

Dahua HTTP Api For Ipc&sd-V1.40

The document outlines the Dahua HTTP API for IPC, detailing its version history, authentication methods, and various API functionalities for configuring and managing Dahua video products. It includes specifications for HTTP transactions, camera settings, stream retrieval, playback, and audio encoding configurations. The API is compatible with specific firmware versions and provides examples of request and response formats for different functionalities.

Uploaded by

alex.sytyj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 79

DAHUA HTTP API FOR IPC

Version 1.40
Document History
No Release Notes Date Version Author
1 draft 2007-1-18 1.10 Haifeng Wang

2 Add alarm push and version description 2012-8-18 1.20 Weijun Li


3 Add ptz control description 2012-9-11 1.21 Weijun Li
4 Remove 11 GUI and 12 Display 2012-9-29 1.22 Wei Chen

Add Playback,download file in rtsp description in chapter 2012-9-29 1.22 Wei Chen
5 4.1.5,4.1.6 and monitor and playback in http in chapter 4.1.7
and 4.1.8.
6 Add vendor description in chapter 9.8.8 2012-10-17 1.23 Wei Chen
Add firmware version description in chapter 1.Add motion 2012-10-29 1.24 Wei Chen
7
data description in chapter 6.9.
Add AlarmLocal description in chapter 6.9. 2012-11-12 1.25 WeiChen
8
Add BitRateControl description in 4.4.4.
9 Add adjust focus description in chapter 13. 2013-1-14 1.26 WeiChen
10 Add RTSP port description in chapter 5.10. 2013-1-18 1.27 WeiChen
11 Add VideoInOptions descrition in chapter 4.3. 2013-1-19 1.28 WeiChen
12 Modify description in chapter 13.4 2013-5-9 1.29 WeiChen
Add detail description in chapter 13.Add flash light 2013-6-20 1.30 WeiChen
13
description in chapter 4.11
14 Modify motion detect description in chapter 6.3. 2013-10-26 1.31 WeiChen
Add snap as mainformat or extra format description in 2013-10-26 1.32 WeiChen
15
chapter 8.3.
Add holiday description in chapter 8.4 and chater 8.1 and 2013-10-26 1.33 WeiChen
16
8.2.
17 Add software version description. 2013-11-10 1.34 WeiChen
18 Delete Alarm Server description. 2013-11-14 1.35 WeiChen
19 Add SD Camera descpition in chapter 14. 2013-11-15 1.36 WeiChen

Add custom title description in chapter 4.9.Modify SD 2013-12-17 1.37 WeiChen


20 camera range description in chapter 14. Add Login Failure
Alarm description in chapter 6.6 and 9.1.
21 Add ScanWlanDevieces in chapter 5.6.3 2014-2-10 1.38 FengLin
Add get onvif version description in chapter 9.8.10.Add onvif 2014-4-2 1.39 WeiChen
22
check description in chapter 9.10
23 Add video analyse description in chapter 15. 2014-5-12 1.40 WeiChen

• Preface
This document details the API of Dahua video products. Programmers can access and configure Dahua video
products follows the API. This document with version 1.10 is available with firmware version 2.0 and above. This
document with version 1.20, 1.21, 1.22, 1.23, 1.24,1,25,1,26,1,27,1,28 is available with firmware 2.210 and above.This
document with version 1. 29 , 1.30, 1.31, 1.32, 1.33, 1.34, 1.35,
1.36 is available with firmware 2.210 and above.This document with version 1.37,1.38 is available with firmware
2.212, 2.4 and above. This document with version 1.39 is available with firmware 2.42 and above.

• Catalog

• HTTP API Transaction


• Transaction
The HTTP API Transaction starts from a request from a client Application, usually a web browser. The request is
processed by the web server on the Dahua video products, then send the response back to the client application. The HTTP
request is taken in GET form. If the request is successful, the Dahua video product will return a HTTP header contains 200
OK. The HTTP Body will contain actual data or error message if an error occurs.
For describe convenience, we use some short words to instead the long expressions. The follows are several regulations:
• The italics and bold will be replaced by the value behind the symbol “=”.

• The URL must follow the standard way of writing a URL.(RFC_3986:Uniform Resource Identifiers (URI) Generic
Syntax);that is ,spaces and other reserved characters (“;”, “/”, “?”, “:”, “@”, “=”, “+”, “,” and “$”) within a
<paramName> or a <paramValue> must be replaced with %<ASCII hex>.For example ,the blank must be instead
with %20.
• To describe the range of the configuration, we use some symbols such as “[]”, “{}” and so on. For example :”[0-
100]” denotes a integer not less than 0 and not larger than 100. “{0,1,2,3}” denotes the valid value of a integer
among 0,1,2 and 3.
• In the request and response, we use “[]” to denote an array. The index is usually a integer and start form 0.

• The parameter value has several types: string, integer, bool and float.Integer is 32 bits.The range of bool
is “true” and “false”. The below is an example of a transaction:

Comment In above table, head= table.VideoColor[ChannelNo][ColorConfigNo]


ChannelNo = video channel index,
colorConfigNo = color config index.
0 = Color Config 1
1 = Color Config 2

We can also request the single config.
For example:
Request :
GET http://10.7.2.4/cgi-bin/configManager.cgi?action=getConfig HYPERLINK "http://10.7.2.4/cgi-bin/configManager.cgi?
action=getConfig&name=VideoColor"& HYPERLINK "http://10.7.2.4/cgi-bin/configManager.cgi?
action=getConfig&name=VideoColor"name=VideoColor[0][0].Brightness
Response:
HTTP/1.1 200 OK
Content-Type:text/plain
table.VideoColor[0][0].Brightness=50

• Authentication
The Dahua video product supplies two authentication ways: basic authentication and digest authentication. If the
http request does not have “Authorization” , the Dahua video product returns 401, utill the http request has a legal
authentication .
For example:
• When basic authentication, the Dahua video product response:
401 Unauthorized
WWW-Authenticate: Basic realm=”XXXXXX”
Then the client encode the username and password with base64, send the following request:
Authorization: Basic VXZVXZ.
• 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"

• Camera
Camera API allows application to configure and view Dahua video product settings.

• Stream
• GetStream

URL Syntax rtsp://<username>:<password>@<ip>:<port>/cam/realmonitor?channel=<channelNo>&subtype=<typeNo>


Comment <username>: a valid user’s username.
<password> :user’s password.
<ip> :the IP address of the Dahua video product.
<port >:the default port is 554. It can be omitted. It can be obtained in 5.10.1 GetRTSPConfig.
<channelNo> :the channel number. It starts from 1.

<typeNo> :the stream type. The <typeNo> of main stream is 0, extra stream 1 is 1, extra stream 2 is 2.The extra stream
counts can be obtained in 4.1.2 GetMaxStreamCounts. The stream must be enabled by setting head.VideoEnable to true
in 4.4.4 SetVideoEncodeConfig.
For example, we request the extra stream 1 of channel 1, the URL is:
rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1.
The IP Camera supports both TCP and UDP transmission forms.
It also supplies basic authentication and digest authentication ways. The authentication process is similar with 3.2
Authentication.

• GetMaxExtraStreamCounts

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream


Response table.MaxExtraStream=1
Comment In above table, the range of table.MaxExtraStream is {1,2,3}

• GetSnapshot
URL Syntax http://<ip>/cgi-bin/snapshot.cgi? [channel=<channelNo>]
Response A picture encoded by jpg
Comment The channel number is default 0 if the request is not carried the param.

• GetVideo

URL Syntax http://<ip>/cgi-bin/mjpg/video.cgi?[channel=<channelNo>]


Response video stream encoded by mjpg
Return:
HTTP Code:200 OK

Content-Type:multipart/x-mixed-replace;boundary=<boundary>
Body:
--<boundary>

Content-Type:image/jpeg
Content-Length:<image size>

<JPEG image data>


--<boundary>
Comment The channel number is default 0 if the request is not carried the param.

• PlayBack

URL Syntax rtsp://<username>:<password>@<ip>:<port>/<filename>


Response It’s similar with 4.1.1 GetStream.
For example:
rtsp://admin:[email protected]:554//mnt/sd/2012-07-13/001/dav/09/09.30.37-09.30.47[R][0@0][0].dav

• LoadFile

URL Syntax http://<ip>/cgi-bin/RPC_Loadfile/<filename>


Response HTTP Code: 200 OK

Content-Type: Application/octet-stream
Content-Length:<fileLength>
Body:
<data>
<data>
For example:
http://10.61.5.117/cgi-bin/RPC_Loadfile/mnt/sd/2012-07-13/001/dav/09/09.30.37-09.30.47[R][0@0][0].dav

• GetStream By Http

URL Syntax http://<ip>/cgi-bin/realmonitor.cgi?action=getStream&channel=<channelNo>&subtype=<typeNo>


Response HTTP Code: 200 OK

Content-Type: Application/octet-stream
Body:
<data>
<data>

Comment Compared to 4.1.1 GetStream using RTSP, it is another way of get stream. This is a way to use http
protocol to get realmonitor stream. The data format is shown in appendix.

• Playback By Http

URL Syntax http://<ip>/cgi-bin/playBack.cgi?action=getStream&channel=<channelNo>&subtype=<typeNo>&startTime=<startTime>&

endTime=<endTime>
Response HTTP Code: 200 OK

Content-Type: Application/octet-stream
Body:
streamId=<streamId>\r\n
<data>
<data>

Comment Compared to 4.1.5 Playback using RTSP, it is another way of get playback stream. This is a way to use
http protocol to get playback stream. The data format is shown in appendix.

URL Syntax http://<ip>/cgi-bin/playBack.cgi?action=control&streamId=<streamId>&cmd=<cmd>&<paramName>=<paramValue>[&<


paramName>=<paramValue>...]
Response OK or ERROR
Comment Control the playback stream
Cmd=play
Speed=<speed> optional, default speed=1,if speed > 0, play back forward, else if speed < 0, playback
backward(param iframe is ignored, only support iframe playback backward);
Iframe=<iframe> optional, default iframe=0, if iframe=1, playback I frame only;
seekTime=<seekTime> seek time, optional, default playback from the stream current point;

cmd=pause
pause the playback stream;

cmd=cancel
cancel the playback stream, and destroy the streamed;
This is the cgi to control playback stream, used to control the stream which built by “action=getStream”.

• AudioEncode
• GetAudioConfigCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getConfigCaps


Comment The angle brackets below denotes a array
Response caps[0].ExtraFormat[0].Audio.CompressionTypes=PCM,G.711A,G.711Mu
caps[0].ExtraFormat[1]….

caps[0].MainFormat[0].Audio.CompressionTypes=PCM,G.711A,G.711Mu
caps[0].MainFormat[1]…

Field in respons Value range Description


CompressionTypes It contains all supported audio compression types, separated by comma.
string
Range is {PCM, ADPCM, G.711A, G.711Mu, G.726, G.729, MPEG2, AMR}

• GetAudioEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Encode


Response headMain.Audio.Bitrate=64
headMain.Audio.Compression=G.711A
headMain.Audio.Depth=16
headMain.Audio.Frequency=44000
headMain.Audio.Mode=0
headMain.AudioEnable=false
headExtra.Audio.Bitrate=64
headExtra.Audio.Compression=G.711A
headExtra.Audio.Depth=16
headExtra.Audio.Frequency=44000
headExtra.Audio.Mode=0
headExtra.AudioEnable=false
Comment Channel: video channel index
RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3

Abbreviations in above table:


headMain=table.Encode[Channel].MainFormat[RecordType]
headExtra=table.Encode[Channel].ExtraFormat[ExtraStream]

• SetAudioEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]

Comment Channel: video channel index


RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
Abbreviations in below table:
head=Encode[Channel].MainFormat[RecordType] (or)
Encode[Channel].ExtraFormat[ExtraStream]
Response OK or ERROR

ParamName ParamValue type Description


head.Audio.Bitrate integer Unit is kbps
Range depends on capacity in 4.5.1 GetAudioConfigCaps
head.Audio.Compression string Range depends on capacity in 4.5.1 GetAudioConfigCaps

head.Audio.Depth integer Audio sampling depth


head.Audio.Frequency integer Audio sampling frequency
head.Audio.Mode integer Range is {0,1,2,3,4,5,6,7}

Audio encode mode.


0: 4.75kbps,
1: 5.15 kbps,
2: 5.9 kbps,
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
head.AudioEnable bool Enable/Disable audio

• SnapEncode
• GetSnapConfigCaps

URL Syntax http://<ip>/cgi-bin/encode.cgi?action=getConfigCaps


Comment Channel: video channel index
SnapType:

0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

Response caps[Channel].SnapFormat[SnapType].Video.CompressionTypes=H.264,MJPG
caps[Channel].SnapFormat[SnapType].Video.ResolutionTypes=3M,1080,SXGA,1_3M,720,D1,CIF
Field in respons Value range Description
CompressionTypes It contains all supported video compression types separated by comma.
string
Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263, H.264}
ResolutionTypes It contains all supported video resolutions, separated by comma.
string Range is {D1, HD1, BCIF, CIF, QCIF, VGA, QVGA, SVGA, XVGA, WXGA, SXGA, WSXGA, UXGA,
WUXGA, ND1,720, 1080, 1_3M, 2_5M, 3M, 5M}.

• GetSnapEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Encode [Channel].SnapFormat


Response headSnap.Video.BitRate=384
headSnap.Video.BitRateControl=VBR
headSnap.Video.Compression=H.264
headSnap.Video.FPS=1
headSnap.Video.GOP=50
headSnap.Video.Height=576
headSnap.Video.Quality=4
headSnap.Video.Width=704
headSnap.VideoEnable=true
Comment Channel: video channel index
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

Abbreviations in above table:


headSnap = table.Encode[Channel].SnapFormat[SnapType]

• SetSnapEncodeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Channel: video channel index
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot

Abbreviation in below table:


head= Encode[Channel].SnapFormat[SnapType]
Response OK or ERROR

ParamName ParamValue type Description


head.Video.BitRate integer Unit is Kbps
Range depends on capability in 4.3.1 GetVideoInputCaps
head.Video.BitRateControl string Range is {CBR,VBR}
CBR: constant bitrate
VBR: variable bitrate
head.Video.Compression String Range is {MPEG4,MPEG2, MPEG1,MJPG,H.263,H.264}
Depends on capacity in 4.3.1 GetVideoInputCaps
head.Video.FPS float Range is [0.2-30]. The lower limit can be reached 0.00002 with firmware 2.4 and
above.
Frames per second.
< 1.0: several seconds/frame, FPS=0.3333: 3 seconds per frame.
>1.0: several frames/second. FPS=3: 3 frames per second.
head.Video.GOP integer Range is [1-100].
Group of picture, it’s the interval of I Frame,
Example: GOP=50, means there is one I frame every 49 P or B frames
head.Video.Height integer Video height
head.Video.Width integer Video Width
head.Video.Quality integer Range is [1-6].

Image Quality, available when Video.BitRateControl=VBR


1: worst quality
6: best quality
head.VideoEnable bool True: enable video

• ChannelTitle
• GetChannelTitleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle


Comment Get the title of the channel.
In below table, Channel = video channel index
Response table.ChannelTitle[Channel].Name=CAM1

• SetChannelTitleConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>


Comment Set the title of the channel.

If VideoWidget[Channel].ChannelTitle.EncodeBlend is true, this title is blended to the video frames.


Please refer to 4.8.2 SetVideoWidget

In below table, Channel : video channel index


Response OK or ERROR

ParamName ParamValue type Description


ChannelTitle[Channel].Name String Channel Name

• FlashLight
• GetFlashLightConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=FlashLight


Description
Response head .Brightness=50
head.Enable=false

head.TimeSection[0][0]=1 00:00:00-23:59:59
head.TimeSection[0][1]=0 00:00:00-23:59:59

head.TimeSection[6][5]=0 00:00:00-23:59:59
Comment head = table.FlashLight

• SetFlashLightConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR
ParamName ParamValue type Description
FlashLight.Enable bool Enable
FlashLight.Brightness integer Brightness
FlashLight.TimeSection[wd][ts] string It’s table contains effective time period for flash light everyday.
wd (week day) range is [0-6] (Sunday-Staurday)
ts (time section) range is [0-23], it’s index of timesection table.

Format: mask hh:mm:ss-hh:mm:ss


Mask: {0,1}, hh: [0-24], mm: [00-59], ss: [00-59]

Mask 0: this time section is not used.


Mask 1: this time section is used.

Example:
TimeSection[1][0]=1 12:00:00-18:00:00
Means flash light is effective between 12:00:00 and 18:00:00 at
Monday.

• Events
• EventHandler
EventHandler is used in alarm and event config in following sections. It contains settings for actions linked with alarm
and events. Actions include record, snapshot, PTZ action, log, mail, alarm out and so on.When alarm or event happen,
actions defined in alarm EventHandler and event EventHandler are executed.

• GetEventHandler

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=<handlerName>


Comment < handlerName> can be one of below four formats
Alarm[alarm channel].EventHandler
MotionDetect[video channel]. EventHandler
BlindDetect[video channel]. EventHandler
LossDetect[video channel]. EventHandler
LoginFailureAlarm.EventHandler

Example URL:
http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].EventHandler
can get EventHandler settings of alarm channel 0.
Response

handlerName.EventHandler.AlarmOutChannels[0]=1
handlerName.EventHandler.AlarmOutChannels[1]=1

handlerName.EventHandler.AlarmOutEnable=false
handlerName.EventHandler.AlarmOutLatch=10
handlerName.EventHandler.BeepEnable=true
handlerName.EventHandler.Dejitter=0
handlerName.EventHandler.Delay=30

handlerName.EventHandler.LogEnable=true
handlerName.EventHandler.MailEnable=true
handlerName.EventHandler.PtzLink[0][0]=None
handlerName.EventHandler.PtzLink[0][1]=0
handlerName.EventHandler.PtzLink[1][0]=None
handlerName.EventHandler.PtzLink[1][1]=0

handlerName.EventHandler.PtzLinkEnable=false

handlerName.EventHandler.RecordChannels[0]=1
handlerName.EventHandler.RecordChannels[1]=1

handlerName.EventHandler.RecordEnable=true
handlerName.EventHandler.RecordLatch=10

handlerName.EventHandler.SnapshotChannels[0]=1
handlerName.EventHandler.SnapshotChannels[1]=1

handlerName.EventHandler.SnapshotEnable=false
handlerName.EventHandler.SnapshotPeriod=3
handlerName.EventHandler.SnapshotTimes=0
handlerName.EventHandler.TimeSection[0][0]=1 01:00:00-24:00:00
handlerName.EventHandler.TimeSection[0][1]=1 01:00:00-24:00:00


handlerName.EventHandler.TimeSection[6][5]=1 01:00:00-24:00:00
handlerName.EventHandler.TipEnable=true
handlerName.EventHandler. ExAlarmOutEnable=true
handlerName. ExAlarmOutChannels[0] =2
handlerName.ExAlarmOutChannels[1]=3

• SetEventHandler

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Meaning of handlerName is the same with 6.1.1 GetEventHandler
Response OK or ERROR

paramName paramValue Description


type
handlerName.EventHandler.AlarmOutChannels[ch] integer Range is {0, 1}, ch is alarm out channel index.

0 – do not output alarm at alarm out channel ch


1 – output alarm at alarm out channel ch
handlerName.EventHandler.AlarmOutEnable bool Enable/Disable alarm out function.
handlerName.EventHandler.AlarmOutLatch Integer Range is [10-300].
Unit is seconds, indicates the time to output alarm after input alarm is
cleared.
handlerName.EventHandler.BeepEnable bool Enable/Disable beep.
handlerName.EventHandler.Dejitter integer Range is [0-255].
Alarm signal dejitter seconds. Alarm signal change during this period is
ignored.
handlerName.EventHandler.Delay integer Range is [0-300].
Delay seconds before setting take effect.
handlerName.EventHandler.LogEnable bool Enable/Disable log for alarm.
handlerName.EventHandler.MailEnable bool Enable/Disable mail send for alarm.
handlerName.EventHandler.PtzLink[ch][0] string Range is {None, Preset, Tour, Pattern}
This is PTZ action linked with events. ch is PTZ channel index.
handlerName.EventHandler.PtzLink[ch][1] integer This is the parameter of PtzLink[ch][0],
If PtzLink[ch]][0] is
Preset: this is preset point.
Tour: this is tour path number.
Pattern: this is pattern number.
handlerName.EventHandler.PtzLinkEnable Bool Enable/Disable PTZ link.
handlerName.EventHandler.RecordChannels[ch] Integer Range is {0, 1}
0 – do not record on video channel ch
1 – record. on video channel ch
handlerName.EventHandler.RecordEnable bool Enable/Disable record function.
handlerName.EventHandler.RecordLatch integer Range is [10-300].
Unit is seconds, indicates the time to record after input alarm is cleared..
handlerName.EventHandler.SnapshotChannels[ch] integer Range is {0, 1}
0 – do not snapshot on video channel ch
1 – snapshot on video channel ch
handlerName.EventHandler.SnapshotEnable bool Enable/Disable snapshot function.
handlerName.EventHandler.SnapshotPeriod integer Range is [0-255].
Frames between snapshot.
0 means continuously snapshot for every frame.
handlerName.EventHandler.SnapshotTimes integer Range is [0-65535]
Snapshot times before stop, 0 means don’t stop snapshot.
handlerName.EventHandler.TimeSection[wd][ts] String It’s table contains effective time period for eventHanlder everyday.
wd (week day) range is [0-6] (Sunday-Staurday)
ts (time section) range is [0-23], it’s index of timesection table.

Format: mask hh:mm:ss-hh:mm:ss


Mask: {0,1}, hh: [0-24], mm: [00-59], ss: [00-59]
Mask 0: this time section is not used.
Mask 1: this time section is used.

Example:
TimeSection[1][0]=1 12:00:00-18:00:00
Means EventHandler is effective between 12:00:00 and 18:00:00 at
Monday.
handlerName.EventHandler.TipEnable bool Enable/Disable local message box tip.
handlerName.EventHandler. ExAlarmOutEnable bool
handlerName. ExAlarmOutChannels[channels] integer

• Alarm
• GetAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm


Comment
Response table.Alarm[0].Enable=false

table.Alarm[0].EventHandler….(output of EventHandler is described in 6.1.1 GetEventHandler)


table.Alarm[0].Name=Door1
table.Alarm[0].SensorType=NC
table.Alarm[1]….

• SetAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, input is external alarm input channel, ch is channel number, wd is weekday index, ts is timesection index.
EventHandler defines parameter of relevant actions when alarm or event happens. It’s also used in following sections about
events.
Response OK or ERROR

ParamName ParamValue type Description


Alarm[input].Enable bool Enable/Disable alarm from a input channel
Alarm[input].EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler
Alarm[input].Name string Name of alarm input channel.
Alarm[input].SensorType string Range is {NC, NO].
NC: normal close
NO: normal open

• GetAlarmOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut


Comment alarmOutChannel below is the alarm out channel index.
Response table.AlarmOut[alarmOutChannel].Mode=0
table.AlarmOut[alarmOutChannel].Name=Beep

• SetAlarmOutConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Port in below table is alarm out port index, start form 0.
Response OK or ERROR

ParamName ParamValue type Description


AlarmOut[port].Mode integer Range is {0, 1, 2}
0: automatically alarm
1: force alarm
2: close alarm
AlarmOut[port].Name string Alarm out port name.

• GetInSlots

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInSlots


Comment Get alarm input channel number.
Below response means there are 2 alarm input channels.
Response result=2

• GetOutSlots

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutSlots


Comment Get alarm output channel number.
Response result=1

• GetInState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInStates


Comment Get alarm input state for all channels.
A bit in the response result indicates a channel alarm states, below result 3 means alarm channel 1 and channel 2 have
alarm now.
Response result=3

• GetOutState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutStates


Comment Get alarm output state for all channels.
A bit in the response result indicates a channel. 1 means alarm is present.
Response result=0

• GetChannelInState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getInStates&channel=<channelNo>


Comment Get alarm input state for channelNo. channelNo starts from 0, and must be less than alarm input channels obtained from
6.2.5 GetInSlots.
Result 1 means alarm is present. Result 0 means alarm is not present.
Response result=1

• GetChannelOutState

URL Syntax http://<ip>/cgi-bin/alarm.cgi?action=getOutStates&channel=<channelNo>


Comment Get alarm output state for channelNo. channelNo starts from 0, and must be less than alarm output channels obtained
from 6.2.6 GetOutSlots .
Result 1 means alarm is present. Result 0 means alarm is not present.
Response result=0

• MotionDetect
• GetMotionDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect

Comment MotionDetect config of a video channel contains Enable, Level, Region and EventHandler.
Response table.MotionDetect[0].Enable=false
table.MotionDetect[0].EventHandler… (output of EventHandler is described in 6.1.1 GetEventHandler)
table.MotionDetect[0].Level=3
table.MotionDetect[0].Region[0]=3932160
table.MotionDetect[0].Region[1]=3932160
table.MotionDetect[0].MotionDetectWindow[0].Id=0
table.MotionDetect[0].MotionDetectWindow[0].Name=Region0
table.MotionDetect[0].MotionDetectWindow[0].Sensitive=58
table.MotionDetect[0].MotionDetectWindow[0].Threshold=4
table.MotionDetect[0].MotionDetectWindow[0].Region[0]=3932160
table.MotionDetect[0].MotionDetectWindow[0].Region[1]=3932160


table.MotionDetect[1]…

• SetMotionDetectConfig
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Comment Channel: video channel index
LineNum

Index of region, region is divided into lines and each line has several blocks, a line is described by a 32 bit integer, a bit for
a block..
0=Line 1
1=Line 2


WinNum

Index of detect window, there are 4 detect windows at present. Each window is divided into 18 lines and 22 blocks/line.
MotionDetectWindow is available with firmware 2.212 and above.
RegionIndex
It is similar with LineNum,but is beyond to a detect window.
Head = MotionDetect[Channel]
The italics below will be replaced by the above abbreviations.
Response OK or ERROR

ParamName ParamValue type Description


head.Enable bool Enable/Disable motion detect feature in a channel.

head.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler


head.Level integer Range is [1-6].
Sensitivity of motion detection.
1: lowest sensitivity.

6: highest sensitivity.

head.Region[LineNum] integer Currently, region is divided into 18 lines and 22 blocks/line.


A bit describes a block in the line.
Bit = 1: motion in this block is monitored..
This filed is used to compatible with the previous firmware. It can be instead by

head. MotionDetectWindow[WinNum].
Example:
MotionDetect[0].Region[0] = 4194303 (0x3FFFFF):: motion in channel 0 line 0’s
22 blocks is monitored.
MotionDetect[0].Region[1] =0: motion in line 1’s 22 blocks is not monitored.
MotionDetect[0].Region[17] = 3: in the last line of channel 0, motion in the left
two blocks is monitored.
head.MotionDetectWindow integer It is the Id of a detect window.
[WinNum].Id
head.MotionDetectWindow string It is the name of a detect window.
[WinNum].Name
head.MotionDetectWindow integer Range is [0-100].
[WinNum].Sensitive It presents more sensitive if the value is larger.
head.MotionDetectWindow integer Range is [0-100].
[WinNum]. Threshold It presents the threshold value when trigger motion detect.
head.MotionDetectWindow integer It is similar with head.Region[LineNum].
[WinNum]. Region[RegionIndex]

• BlindDetect
• GetBlindDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect


Comment Channel: video channel number
head= table.BlindDetect[Channel]
Response head.Enable=false
head.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)
head.Level=3

• SetBlindDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Channel: video channel number
head=BlindDetect[Channel]
Response OK or ERROR

ParamName ParamValue type Description


head.Enable bool Enable/Disable blind detect feature.

head.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler


head.Level integer Range is [1-6].

Sensitivity of blind detection.


1: lowest sensitivity.
6: highest sensitivity.

• LossDetect
• GetLossDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect


Comment Channel: video channel number
head=table.BlindDetect[Channel]
Response head.Enable=false
head.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetLossDetectConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Channel: video channel number
Head = BlindDetect[Channel]
Response OK or ERROR

ParamName ParamValue type Description


head.Enable bool Enable/Disable loss detect feature.

head.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• LoginFailureAlarm
• GetLoginFailureAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureAlarm


Comment Channel: video channel number
head=table.LoginFailureAlarm
Response head.Enable=false
head.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetLoginFailureAlarmConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Head=LoginFailureAlarm
Response OK or ERROR

ParamName ParamValue type Description


head.Enable bool Enable/Disable notify LoginFailure event.Now this event can be linked
with send email and alarm out.The max try login times can be configured
in chapter 9.1.2 SetGeneralConfig.
head.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• StorageAbnormal
• GetStorageNotExistConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist


Comment
Response StorageNotExist.Enable=false
StorageNotExist.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetStorageNotExistConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


StorageNotExist.Enable bool Enable/Disable loss detect feature.

StorageNotExist.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• Get StorageFailureConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= StorageFailure


Comment
Response StorageFailure.Enable=false
StorageFailure.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• Set StorageFailureConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


StorageFailure.Enable bool Enable/Disable loss detect feature.

StorageFailure.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler


• GetStorageLowSpaceConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= StorageLowSpace


Comment
Response StorageLowSpace.Enable=false
StorageLowSpace.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetStorageLowSpaceConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


StorageLowSpace.Enable bool Enable/Disable loss detect feature.

StorageLowSpace.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• NetAbnormal
• GetNetAbortConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= NetAbort


Comment
Response NetAbort.Enable=false
NetAbort.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetNetAbortConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


NetAbort.Enable bool Enable/Disable loss detect feature.

NetAbort.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• GetIPConflictConfig
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= IPConflict
Comment
Response IPConflict.Enable=false
IPConflict.EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetIPConflictConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


IPConflict.Enable bool Enable/Disable loss detect feature.

IPConflict.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

• GetEventIndexes

URL Syntax http://<ip>/cgi-bin/eventManager.cgi?action=getEventIndexes&code=<eventCode>


Comment Get channels indexes that event of code eventCode happens.
eventCode includes:
VideoMotion: motion detection event
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.

Response channels[0]=0
channels[1]=2
channels[2]=3

(This response means event happened on channel 0, channel 2, and channel 3.)

• Attach

URL Syntax http://<ip>/cgi-bin/eventManager.cgi?action=attach&codes=[<eventCode>,<eventCode> ,…]


Comment Get channels indexes that event of code eventCode happens.
eventCode includes:

VideoMotion: motion detection event


VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.
MDResult: motion detection data reporting event. The motion detect window contains 18 rows and 22 columns. The
event info contains motion detect data with mask of every row.
Response HTTP Code: 200 OK\r\n
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 16:00:00 GMT\r\n
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=<bondary>\r\n
Body:
--<bondary>\r\n

Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
<eventInfo>\r\n\r\n
--<bondary>\r\n

Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
<eventInfo>\r\n\r\n

For example:

HTTP Code: 200 OK\r\n


Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 16:00:00 GMT\r\n
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=myboundary\r\n\r\n
Body:
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 39\r\n
Code=VideoMotion;action=Start;index=0\r\n\r\n
-- myboundary \r\n

Content-Type: text/plain\r\n
Content-Length: 38\r\n
Code=VideoBlind;action=Start;index=0\r\n\r\n
-- myboundary \r\n

Content-Type: text/plain\r\n
Content-Length: 38\r\n
Code= AlarmLocal;action=Start;index=0\r\n\r\n
-- myboundary \r\n

Content-Type: text/plain\r\n
Content-Length: 38\r\n
Code= MDResult;action=Pulse;index=0;data=61708863,61708863…\r\n\r\n
-- myboundary \r\n

• PTZ
• PTZConfig
• GetPTZConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Ptz


Comment Port in below table is PTZ port index, start form 0.
Response table.Ptz[port].Address=8
table.Ptz[port].Attribute[0]=115200
table.Ptz[port].Attribute[1]=8
table.Ptz[port].Attribute[2]=Even
table.Ptz[port].Attribute[3]=1
table.Ptz[port].Homing[0]=0
table.Ptz[port].Homing[1]=30
table.Ptz[port].NumberInMatrixs=0
table.Ptz[port].ProtocolName=NONE

• SetPTZConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Port in below table is PTZ port index, start form 0.

Response OK or ERROR

ParamName ParamValue type Description


Ptz[port].Address integer Range is [0-255].
Device address, if there are more than one device connected to
this port, distinguish them by this address.
Ptz[port].Attribute[0] integer Range is {1200, 2400 ,4800, 9600, 19200, 38400, 57600,
115200}.
Baudrate
Ptz[port].Attribute[1] integer Range is {4, 5, 6, 7, 8}.
Data bit.
Ptz[port].Attribute[2] string Range is {Even, Mark, None, Odd, Space}.
Parity verification mode.
Ptz[port].Attribute[3] float Range is {1, 1.5, 2}.
Stop bit.
Ptz[port].Homing[0] integer Range is {-1,0-255}
-1: homing is disabled.
[0-255]: preset point number
Ptz[port].Homing[1] integer Range is [0-65535].
No operation timeout, unit is seconds.
After no operation timeout, PTZ go to preset point set in
Ptz[port].Homing[0].
Ptz[port].ProtocolName string PTZ protocol name, depends on PTZ capability,
refer to 7.2.1 GetProtocolList to get the protocol list.

• PTZControl
• GetProtocolList

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getProtocolList


Comment Get PTZ protocol list.
Response contains all support PTZ protocols separated by comma.
Response result=NONE,AD1641M,ADMATRIX,BANKNOTE,DH-CC440,DH-MATRIX,DH-SD1,DH-SD2,HAIYU,HY,LILIN,PANASONIC

• GetCurrentProtocolCaps
URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=<channelNo>
Comment Get PTZ protocol list, channelNo is PTZ channel index.

Response caps.AlarmLen=0
caps.AuxMax=8
caps.AuxMin=1
caps.CamAddrMax=255
caps.CamAddrMin=1
caps.Interval=200
caps.Menu=false
caps.MonAddrMax=255
caps.MonAddrMin=0
caps.Name=DH-SD1
caps.PanSpeedMax=255
caps.PanSpeedMin=1
caps.PatternMax=5
caps.PatternMin=1
caps.PresetMax=80
caps.PresetMin=1
caps.TileSpeedMax=255
caps.TileSpeedMin=1
caps.TourMax=7
caps.TourMin=0
caps.Type=1

Field in response Description


AlarmLen Alarm length in protocol
AuxMax Maximum/Minimum number for auxiliary functions
AuxMin
CamAddrMax Maximum/Minimum channel address
CamAddrMin
Menu True or false, support internal menu of the PTZ or not,
MonAddrMax Maximum/Minimum monitor address
MonAddrMin
Name Name of the operation protocol
PanSpeedMax Maximum/Minimum pan speed.
PanSpeedMin
PatternMax Maximum/Minimum pattern path number.
PatternMin
PresetMax Maximum/Minimum preset point number.
PresetMin
TileSpeedMax Maximum/Minimum tile speed.
TileSpeedMin
TourMax Maximum/Minimum tour path number.
TourMin
Type Type of PTZ protocol.

• PTZ control commands

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=[action]&channel=[ch]&code=[code]&arg1=[argstr]& arg2=[argstr]&arg3=[argstr]


Comment This URL is used to start/stop PTZ control command.
action is PTZ control command, it can be start or stop.
ch is PTZ channel range is [0 - n-1], code is PTZ operation, and arg1, arg2, arg3 is the arguments of operation.
Code and argstr values are listed in below table.
Response OK or ERROR

Code Code description arg1 arg2 arg3 arg4


Up Tile up 0 Vertical speed, 0 0
range is [1-8]
Down Tile down 0 Vertical speed, 0 0
range is [1-8]
Left Pan left 0 Vertical speed, 0 0
range is [1-8]
Right Pan right 0 Vertical speed, 0 0
range is [1-8]
ZoomWide Zoom out 0 multiple 0 0
ZoomTele Zoom in 0 multiple 0 0
FocusNear Focus near 0 multiple 0 0
FocusFar Focus far 0 multiple 0 0
IrisLarge Aperture larger 0 multiple 0 0
IrisSmall Aperture smaller 0 multiple 0 0
GotoPreset Go to PTZ preset point 0 Preset point 0 0
number
SetPreset Set PTZ preset point 0 Preset point 0 0
number
ClearPreset Clear PTZ preset point 0 Preset point 0 0
number
LampWaterClear 1: open 0 0 0
2: close
StartTour Start PTZ tour Tour path 0 1: start 0

number 2: automatically
3: stop
LeftUp Pan left and tile up Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
RightUp Pan right and tile up Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
LeftDown Pan left and tile down Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]
RightDown Pan right and tile down Vertical speed, Horizontal speed, 0 0
range is [1-8] range is [1-8]

AddTour Add preset point to tour path Tour path Preset point 0 0
number number
DelTour Delete preset point from tour Tour path Preset point 0 0
path number number
ClearTour Clear tour path Tour path 0 0 0
number
AutoPanOn Start pan rotate 0 0 0 0
AutoPanOff Stop pan rotate 0 0 0 0
SetLeftLimit Set left limit. 0 0 0 0
SetRightLimit Set right limit. 0 0 0 0
AutoScanOn Start auto scan. 0 0 0 0
AutoScanOff Stop auto scan. 0 0 0 0
SetPatternBegin Begin pattern path set. Pattern number 0 0 0
SetPatternEnd End pattern path set. Pattern number 0 0 0
StartPattern Run pattern path Pattern number 0 0 0
StopPattern Stop pattern path Pattern number 0 0 0
ClearPattern Clear pattern path Pattern number 0 0 0
AlarmSearch Search alarm. 0 0 0 0
Position Go to position Horizontal Vertical position Zoom change 0
position
AuxOn Auxiliary function on, auxiliary 0 0 0 0

function is defined in product


definition document.
AuxOff Auxiliary function off 0 0 0 0
Menu 0 0 0 0
Exit 0 0 0 0
Enter 0 0 0 0
Esc 0 0 0 0
MenuUp 0 0 0 0
MenuDown 0 0 0 0
MenuLeft 0 0 0 0
MenuRight 0 0 0 0
Reset Restore default configuration. 0 0 0 0
SetPresetName Preset point Preset point title. 0 0
number (1 byte)
AlarmPtz Alarm linked PTZ. External alarm Link type: 1: Argument of link 0

input channel. go to preset type:


point Link type = 1,
2: auto scan this is preset point
3: tour
number
Link type = 2,
this is auto scan
path
Link type = 3,

this is tour path


LightController Control the light on/off. Address of light Light number switch 0
controller
PositionABS Go to ABS position Horizontal angle: Vertical Zoom in mutiple Speed[1-8], not
0°-360° angle :0°-90° must
PositionReset Use current direction as 0 0 0 0
reference.
UpTele up + TELE Speed [1-8] 0 0 0
DownTele down + TELE Speed [1-8] 0 0 0
LeftTele left + TELE Speed [1-8] 0 0 0
RightTele right + TELE Speed [1-8] 0 0 0
LeftUpTele leftup + TELE Speed [1-8] 0 0 0
LeftDownTele leftdown + TELE Speed [1-8] 0 0 0
RigjtUpTele rightup + TELE Speed [1-8] 0 0 0
RightDownTele rightdown + TELE Speed [1-8] 0 0 0
UpWide up + WIDE Speed [1-8] 0 0 0
DownWide down + WIDE Speed [1-8] 0 0 0
LeftWide left + WIDE Speed [1-8] 0 0 0
RightWide right + WIDE Speed [1-8] 0 0 0
LeftUpWide leftup + WIDE Speed [1-8] 0 0 0
LeftDownWide leftdown + WIDE Speed [1-8] 0 0 0
RightUpWide rightup + WIDE Speed [1-8] 0 0 0
RightDownWide rightdown + WIDE Speed [1-8] 0 0 0
Continuously Horizontal Speed Vertical Speed Zoom Speed [-8-8] Timeout
Move Continuously
[-8-8] [-8-8]
Relatively Relatively angle: Relatively Relatively Zoom
Move Relatively
0°-360° angle :0°-90°

• PTZStatus
• PTZ GetStatus

URL Syntax http://<ip>/cgi-bin/ptz.cgi?action=getStatus


Comment This URL is used to get PTZStatus.
Response status.UTC=6538920
status.MoveStatus=Idle
status.ZoomStatus=Idle
status.PresetID=10
status.Position=120,12,2

• Record&Snap
• Record
• GetRecordConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Record


Comment Channel in below table is video channel number, weekday range is [0-6] (Sunday - Saturday).
Record config contains pre record time and record time sections of every day.
Response table.Record[channel].PreRecord=6
table.Record[channel].HolidayEnable=true
table.Record[channel].TimeSection[weekday][0]=1 00:00:00-24:00:00
table.Record[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
table.Record[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
table.Record[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
table.Record[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
table.Record[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
• SetRecordConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table: ch = channel index, wd = week day index, ts = time section index
Response OK or ERROR

ParamName ParamValue type Description


Record[ch].PreRecord integer Range is [0-300].
Prerecord seconds, 0 means no prerecord.
ch (Channel number) starts form 0
Record[ch]. HolidayEnable bool Record or not when a day is a holiday setted is chapter 8.4 Holiday.
Record[ch].TimeSection[wd][ts] string wd (week day) range is [0-6] (Sunday - Staurday)
ts (time section) range is [0-23], timesection table index.

Format: mask hh:mm:ss-hh:mm:ss


Mask: [0-65535], hh: [0-24], mm: [0-59], ss: [0-59]

Mask indicates record type by bits:


Bit0: regular record
Bit1: motion detection record
Bit2: alarm record

Bit3: card record


Example:

Set record time to every Sunday all day. Record type is motion
detection and alarm. URL should be:
http://<ip>/cgi-bin/configManager.cgi?action=setConfig&name=Record[0].TimeSection[0][0]&table=6 00:00:00-24:00:00
In this example, “6 00:00:00-24:00:00” means motion detection and alarm record all day (6 = 4 & 2, alarm is 4, motion
detection is 2.).

• GetRecordModeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode


Comment Get record mode for video channels. channel in below table is video channel number.
Response table.RecordMode[channel].Mode=0
• SetRecordModeConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment channel in below table is video channel index, start form 0.
Response OK or ERROR

ParamName ParamValue type Description


RecordMode[channel].Mode integer Range is {0, 1, 2}.
0: automatically record
1: manually record
2: stop record.

• Snap
• GetSnapConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Snap


Comment Channel in below table is video channel number, weekday range is [0-6] (Sunday - Saturday).
Response table.Snap [channel].HolidayEnable=true table.Snap[channel].TimeSection[weekday]
[0]=1 00:00:00-24:00:00
table.Snap[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
table.Snap[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
table.Snap[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
table.Snap[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
table.Snap[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00

• SetSnapConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table: ch = channel index, wd = week day index, ts = time section index
Response OK or ERROR

ParamName ParamValue type Description


Snap [ch].HolidayEnable bool Snap or not when a day is a holiday setted is chapter 8.4 Holiday.
Snap[ch].TimeSection[wd][ts] string wd (week day) range is [0-6] (Sunday- Staurday)
ts (time section) range is [0-23], it’s timesection table index.

Format: mask hh:mm:ss-hh:mm:ss


Mask: [0-65535], 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
:

• MediaGlobal
• GetMediaGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal


Description
Response table.MediaGlobal.SnapFormatAs=MainFormat

• SetMediaGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment It presents obtaining snap stream from Main stream or extra stream.
Response OK or ERROR

ParamName ParamValue type Description

MediaGlobal.SnapFormatAs string The range is {“MainFormat”, “ExtraFormat”}

• Holiday
• GetHolidayConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Holiday


Description Get holiday config for record or snap.
Response table.Holiday.MonthMask[0]=3
table.Holiday.MonthMask[1]=0
table.Holiday.MonthMask[2]=0
table.Holiday.MonthMask[3]=0
table.Holiday.MonthMask[4]=0
table.Holiday.MonthMask[5]=0
table.Holiday.MonthMask[6]=0
table.Holiday.MonthMask[7]=0
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]= 1610612739
table.Holiday.MonthMask[10]=0
table.Holiday.MonthMask[11]=0

• SetHolidayConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment monthIndex presents the index of a month. 0 presents January, 1 presents February, 11 presents December.
Response OK or ERROR

ParamName ParamValue type Description


Holiday.MonthMask[monthIndex] integer It is the mask of a month.Every bit present a day. For example, 0x0001
presents the first day of a month is holiday.0x0002 presents the second
day of a month is holiday, 0x0003 presents the first day and second day
of a month is holiday.

• System
• General
• GetGeneralConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=General


Comment
Response table.General.MachineName=Dahua001
table.General. LocalNo=8
table.General. MachineAddress=”binjiangqv jiangnandadao weiyelu”
table.General. MachineGroup=”jiaojing yidui
table.General.LockLoginEnable=true
table.General.LockLoginTimes=3
table.General.LoginFailLockTime=1800

• SetGeneralConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue type Description


General.MachineName string Device name or serial number.
General. LocalNo integer
General. MachineAddress string
General. MachineGroup string
General. LockLoginEnable bool Whether support lock login times setting.
General. LockLoginTimes integer Max try times of login failed, when exceeding the
times the device will be locked and alarm.
General. LoginFailLockTime integer Lock login seconds.

• SystemTime
• GetCurrentTime

URL Syntax http://<ip>/cgi-bin/global.cgi?action=getCurrentTime


Comment The time format is "Y-M-D H-m-S". It’s not be effected by Locales.TimeFormat in 9.3.2 SetLocalesConfig.
Response result = 2011-7-3 21:02:32

• SetCurrentTime

URL Syntax http://<ip>/cgi-bin/global.cgi?action=setCurrentTime&time=2011-7-3%2021:02:32


Comment The time format is "Y-M-D H-m-S". It’s not be effected by Locales.TimeFormat in 9.3.2 SetLocalesConfig.
Response OK or ERROR

• Locales
• GetLocalesConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Locales


Comment
Response table.Locales.DSTEnable=false
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
table.Locales.DSTEnd.Month=1
table.Locales.DSTEnd.Week=2
table.Locales.DSTEnd.Year=2011
table.Locales.DSTStart.Day=0
table.Locales.DSTStart.Hour=0
table.Locales.DSTStart.Minute=0
table.Locales.DSTStart.Month=1
table.Locales.DSTStart.Week=1
table.Locales.DSTStart.Year=2011
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss

• SetLocalesConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue Description


type
Locales.DSTEnable bool Enable/Disable DST (daylight saving time)
Locales.DSTEnd.Day integer Range is [0-6] or [1-31]
[0-6]: week day, 0 = Sunday, 6 = Saturday
[1-31]: month day
If Locales.DSTEnd.Week is 0, use month day, otherwise, use week day.
Locales.DSTEnd.Hour integer Range is [0-23]
Locales.DSTEnd.Minute integer Range is [0-59]
Locales.DSTEnd.Month integer Range is [1-12]
Locales.DSTEnd.Week Integer Range is {1,2,3,4,-1,0}.

0 = Use month day


[1,2,3,4,-1]: use week day.
1 = first week, 2 = second, 3 = third, 4 = fourth, -1 = last.
Locales.DSTEnd.Year Integer Range is [2000-2038]
Locales.DSTStart.Day Range is the same with items in Locales.DSTEnd
Locales.DSTStart.Hour
Locales.DSTStart table and Locales.DSTEnd table together defines the
Locales.DSTStart.Minute
time range of DST.
Locales.DSTStart.Month
Locales.DSTStart.Week
Locales.DSTStart.Year
Locales.TimeFormat string Defines time format displayed in video time title.
String form is: year-month-day hour:mm:ss.
Position of year, month and day can be exchanged.

Range of year is {yy, yyyy}

yy = year without century, yyyy = year with century.


Range of month is {M, MM, MMMM}
M = 1 for January, MM = 01 for January, MMMM = Jan for January
Range of day is {d, dd}
d = 1 for first day, dd = 01 for first day
Range of hour is {H, HH, h, hh}
H = 1 for 1:00, HH = 01 for 1:00, range is 0-23
h = 1 for 1:00, hh = 01 for 1:00, time range is 1-12

Example:
yyyy-MM-dd HH:mm:ss or

MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss

• Language
• GetLanguageCaps

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getLanguageCaps


Comment Get the list of supported languages, response is a string contains languages with comma separated.
Languages include
{English, SimpChinese, TradChinese, Italian, Spanish, Japanese, Russian, French, German]
Response Languages=SimpChinese,English,French

• GetLanguageConfig
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Language
Comment Get current system language cofnig.
Response table.Language=SimpChinese

• SetLanguageConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment NOTE: After changing language setting, system will automatically reboot!
Response OK or ERROR

ParamName ParamValue type Description


Language string The language range is get from interface in 9.3.1 GetLanguageCaps

• AccessFilter
• GetAccessFilterConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter


Comment bannedIndex below is the banned IP list index,
trustIndex below is the trust IP list index.
Response table.AccessFilter.BannedList[bannedIndex]=10.6.10.1
table.AccessFilter. TrustList[trustIndex]=1.2.3.4
table.AccessFilter.Enable=false
table.AccessFilter.Type=BannedList

• SetAccessFilterConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment Range of index in below table is [0-255]
Response OK or ERROR

ParamName ParamValue type Description


AccessFilter.BannedList[index] string Banned IP address list
AccessFilter.TrustList[index] string Trusted IP address list
AccessFilter.Enable bool Enable/Disable access filter function
AccessFilter.Type string Range is {TrustList, BannedList},
TrustList: Turst list is used, banned list is not used.
BannedList: Banned list is used, turst list is not used.

• AutoMaintain
• GetAutoMaintainConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain


Comment
Response table.AutoMaintain. AutoRebootDay=3
table.AutoMaintain. AutoRebootHour=0
table.AutoMaintain. AutoRebootMinute=0
table.AutoMaintain. AutoShutdownDay=1

table.AutoMaintain. AutoShutdownHour=0
table.AutoMaintain. AutoShutdownMinute=0
table.AutoMaintain. AutoStartUpDay=1
table.AutoMaintain. AutoStartUpHour=2
table.AutoMaintain. AutoStartUpMinute=0

• SetAutoMaintainConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment
Response OK or ERROR

ParamName ParamValue Description


type
AutoMaintain. AutoRebootDay integer Range is [-1-7].
Auto restart day.
-1 = never auto restart
0- 6 = Sunday-Saturday
7 = restart every day
AutoMaintain. AutoRebootHour integer Range is [0-23].
Auto restart hour
AutoMaintain. AutoRebootMinute integer Range is [0-59].
Auto restart minute
AutoMaintain. AutoShutdownDay integer Auto reboot time.
AutoMaintain. AutoShutdownHour Range is same with AutoOpenDay, AutoOpenHour, AutoOpenMinute.
AutoMaintain. AutoShutdownMinute
AutoMaintain. AutoStartUpDay integer Auto shutdown time.
AutoMaintain. AutoStartUpHour Range is same with AutoOpenDay, AutoOpenHour, AutoOpenMinute.
AutoMaintain. AutoStartUpMinute

• UserManager
• Group
There are two user groups: “admin” and “user”. The “admin” group has all the authorities of operating the IP
Camera. The “user” group only has monitor and replay authorities.

• GetGroupInfo

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getGroupInfo&name=<groupName>


Comment Get group setting with name groupName.
The range of groupName is: “admin” and “user”.
Response group.Name=admin
group.Memo=administrator group
goup. AuthorityList=<authList>

• GetGroupInfoAll

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getGroupInfoAll


Comment Get information of all groups.
Response group[0].Name=admin
group[0].Memo=administrator group
group[0]. AuthorityList=<authList>
group[1].Name=user
group[1].Memo=user group
group[1]. AuthorityList=<authList>
group[2]….
• AddUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=addUser&


user.Name=<userName>&
user.Password=<userPassword>&
user.Memo=<userMemo>&
user.Group=<userGroup>&
user.Reserved=<userReserved>&
user.Sharable=<userSharable>
user.AuthList=<authList>
Comment user.Group: string, the range is “admin” and “user”. In different group, the user has different authorities.
user.Sharable: bool, true means allow multi-point login.
User.Reserved: bool, true means this user can’t be deleted.
User.AuthList;.
For example:
Add a user of name operator, password 123456, belongs to group user, and allow multi-point login.
http://<ip>/cgi-bin/userManager.cgi?action=addUser&user.Name=operator&user.Password=123456&user.Group=user&us
er.Sharable=true&user.Reserved=false&user.AuthList= CtrlPanel,ShutDown, Record,Backup
Response OK or ERROR

• DeleteUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=deleteUser&name=<userName>


Comment Delete user with name username.
Response OK or ERROR

• ModifyUser

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=modifyUser&


name=<oldUserName>&
user.Name=<userName>&
user.Password=<userPassword>&
user.Memo=<userMemo>&
user.Group=<userGroup>&
user.Reserved=<userReserved>&
user.Sharable=<userSharable>
user.AuthList=<authList>
Comment Value range of parameters in <> is the same with 9.7.4 AddUser
Response OK or ERROR

• ModifyPassword

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=modifyPassword&name=<username>&pwd=<newPwd>&pwdOld=<oldPwd>


Comment Modify user password, old password oldPwd should be supplied, new password is newPwd.
Response OK or ERROR

• GetUserInfo

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getUserInfo&name=<userName>


Comment Get use information with name userName
Response user.Name=admin
user.Memo=admin 's account
user.Group=admin
user.Reserved=true
user.Sharable=true
user. AuthList=<authList>

• GetUserInfoAll

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getUserInfoAll


Comment Get information of all users.
Response users[0].Group=admin
users[0].Id=1
users[0].Memo=admin 's account
users[0].Name=admin
users[0].Reserved=true
users[0].Sharable=true
users[0]. AuthList=<authList>
users[1].Group=admin

• GetActiveUserInfoAll

URL Syntax http://<ip>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll


Comment Get active users.
Response users[0].name=admin
users[0].ip=10.43.2.16
users[0].group=admin
users[0].clienttype=web3.0
users[0].logintime=2011-11-08 09:51:03

• System Operation
• Reboot

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=reboot


Comment Reboot the device. If successful, response OK. If fail, response ERROR.
Response OK or ERROR

• Shutdown

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=shutdown


Comment Shutdown the device. If successful, response OK. If fail, response ERROR.
Response OK or ERROR

• GetDeviceType

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getDeviceType


Comment Get the device type.
Response type=IPC-HF3300

• GetHardwareVersion

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getHardwareVersion


Comment Get the device hardware version
Response version=1.00

• GetSerialNo

URL Syntax http://<ip> /cgi-bin/magicBox.cgi?action=getSerialNo


Comment Get the device serial number
Response sn=YZC0GZ05100020
• GetMachineName

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getMachineName


Comment Get the device machine name.
Response name=YZC0GZ05100020

• GetSystemInfo

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getSystemInfo


Comment Get the system information.
Response serialNumber=YZC0GZ05100020
deviceType=IPC-HF3300
hardwareVersion=1.00

• GetVendor

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getVendor


Comment Get the vendor information.
Response vendor=Dahua

• GetSoftwareVersion

URL Syntax http://<ip>/cgi-bin/magicBox.cgi?action=getSoftwareVersion


Comment Get software information.
Response version=2.212.0000.0.R,build:2013-11-14

• GetOnvifVersion

URL Syntax http://<ip>/cgi-bin/intervideoManager.cgi?action=getOnvifVersion


Comment Get onvif version information.
Response version=2.4.1

• Log
• StartFind

URL Syntax http://<ip>/cgi-bin/log.cgi?action=startFind&condition.StartTime=<start>&condition.EndTime=<end>


Comment Start to find log, in response, there is a token for further log finding process.
start/end: the start/end time of log. Format is: yyyy-mm-dd hh:mm:ss.

Example:
Find log between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, URL is:
http://<ip>/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1 12:00:00
&condition.EndTime=2011-1-10 12:00:00
Response token=1

• DoFind

URL Syntax http://<ip>/cgi-bin/log.cgi?action=doFind&token=<tokenValue>&count=<logCount>


Comment Find log with token tokenValue and count logCount
tokenValue is get by startFind in above section, logCount is the count of logs for this query.
The maximum value of logCount is 100.
Response found=2
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
items[0].User=admin
items[1].Detail.Compression=H.264->MJPG
items[1].Detail.Data=Encode

items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
items[1].Type=SaveConfig
items[1].User=System

Field in Response Description


found Count of found log, found is 0 if no log is found.
User User name
Type Log type
Time Time of this log
RecNo Log number.
Detail Log details.

• StopFind
URL Syntax http://<ip>/cgi-bin/log.cgi?action=stopFind&token=<tokenValue>
Comment Stop query log by token tokenValue
Response OK or ERROR

• Clear

URL Syntax http://<ip>/cgi-bin/log.cgi?action=clear


Comment Clear all the logs.
Response OK or ERROR

• UserGlobal
• GetUserGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal


Comment
Response table.UserGlobal.OnvifLoginCheck=false

• SetUserGlobalConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=<flag>


Comment Enable Onvif login check or not, <flag> range is {true, false}
Response OK or ERROR

• Storage
• File Finding
• Create

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=factory.create


Comment Create a media file finder
Response result=08137

• StartFind
URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=findFile&object=<objectId>&condition.Channel=<channel>&condition.StartTime=
<start>&condition.EndTime=<end>&condition.Dirs[0]=<dir>&condition.Types[0]=<type>&condition.Flag[0]=<flag>&condition.E
vents[0]=<event>
Comment Start to find file wth the above condition. If start successfully, return true, else return false.
object : The object Id is got from interface in 10.1.1 Create
condition.Channel: in which channel you want to find the file .
condition.StartTime/condition.EndTime: the start/end time when recording.
condition.Dirs: in which directories you want to find the file. It is an array. The index starts from 0. The range of dir is
{“/mnt/dvr/sda0”, “/mnt/dvr/sda1”}. This condition can be omitted. If omitted, find files in all the directories.

condition.Types: which types of the file you want to find. It is an array. The index starts from 0. The range of type is {“dav”,
“jpg”, “mp4”}. If omitted, find files with all the types.
condition.Flags: which flags of the file you want to find. It is an array. The index starts from 0. The range of flag is {“Timing”,
“Manual”, “Marker”, “Event”, “Mosaic”, “Cutout”}. If omitted, find files with all the flags.
condition.Event: by which event the record file is triggered. It is an array. The index starts from 0. The range of event is

{“AlarmLocal”, “VideoMotion”, “VideoLoss”, “VideoBlind”, “Traffic*”}. This condition can be omitted. If omitted, find files of all the
events.
Example:

Find file in channel 1, in directory “/mnt/dvr/sda0",event type is "AlarmLocal" or "VideoMotion", file type is “dav”, and time
between 2011-1-1 12:00:00 and 2011-1-10 12:00:00 , URL is:
http://<ip>/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&conditon.Dir[0]=”/mnt/dvr/sda0”&
conditon.Event[0]=AlarmLocal&conditon.Event[1]=VideoMotion&condition.StartTime=2011-1-1%2012:00:00&condition.EndTi
me=2011-1-10%2012:00:00
Response OK or Error

• FindNextFile

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=<objectId>&count=<fileCount>

Comment Find the next fileCount files.


The maximum value of fileCount is 100.
Response found=1
items[0]. Channel =1
items[0]. StartTime =2011-1-1 12:00:00

items[0]. EndTime =2011-1-1 13:00:00


items[0]. Type =dav
items[0]. Events[0]=AlarmLocal

items[0]. FilePath =/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg


items[0]. Length =790
items[0]. Duration = 3600
items[0].SummaryOffset=2354
tems[0].Repeat=0
items[0].WorkDir=”/mnt/dvr/sda0”
items[0]. Overwrites=5
items[0]. WorkDirSN=0

Field in Response Description


found Count of found file, found is 0 if no file is found.
Channel Channel
StartTime Start Time
EndTime End time
Type File type
Events Event type.
FilePath filepath.
Length File length
Duration Duration time
SummaryOffset Summary offset
Repeat Repeat file number
WorkDir The file’s directory
Overwrites Overwrite times of the work directory
WorkDirSN Workdir No

• Close

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=close&object=<objectId>


Comment Stop find.
Response OK or ERROR

• Destroy

URL Syntax http://<ip>/cgi-bin/mediaFileFind.cgi?action=destroy&object=<objectId>

Comment Destroy the media file finder.


Response OK or ERROR

• Storage Device
• GetStorageDeviceCollect

URL Syntax http://<ip>/cgi-bin/storageDevice.cgi?action=factory.getCollect


Comment Get all the storage device names
Response A list of all device names
list[0]=”/dev/sda0”
list[1]=”/dev/sda1”
list[2]=”/dev/sg1”

• Work Group
• GetWorkGroupCollect

URL Syntax http://<ip>/cgi-bin/workGroup.cgi?action=factory.getCollect


Comment Get all the work group names
Response A list of all device names
list [0]=”group1”
list [1]=”group2”
list [2]=”group3”

• Work Directory
• GetWorkDirectoryCollect

URL Syntax http://<ip>/cgi-bin/workDirectory.cgi?action=factory.getCollect


Comment Get the all work derictory names
Response A list of all work directory names
list [0]=”dir1”
list [1]=”dir2”
list [2]=”dir3”

• NAS
• GetNASConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=NAS


Comment Return all the directories on the NAS server.
Response table.NAS[0].Name=” FTP1”
table.NAS[0].Enable = true
table.NAS[0].Protocol =”FTP”
table.NAS[0].Address =”www.dahuatech.com”
table.NAS[0].Port =21
table.NAS[0].UserName =”anonymity”
table.NAS[0].Password =”none”
table.NAS[0].Directory =”share”

• SetNASConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table:
Head =NAS[index]
Index: The index of the NAS Server
Response OK or ERROR

ParamName ParamValue type Description


Head.Name string NAS name.
Head .Enable bool Enable/Disable the NAS.
Head. Protocol string The range is {“FTP”, “SMB”}
Head. Address string The IP address or host name.
Head .Port integer NAS port.
Head.UserName string NAS username.
Head .Password string NAS password.
Head .Directory string Directory name.

• Storage Point
• GetRecordStoragePointConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoint


Comment
Response table.RecordStoragePoint [0].TimingRecord.Local =”local”
table.RecordStoragePoint [0].TimingRecord. Redundant =” Redundant”
table.RecordStoragePoint [0].TimingRecord. Remote =” FTP”
table.RecordStoragePoint [0].TimingRecord. AutoSync = false
table.RecordStoragePoint [0].TimingRecord. AutoSyncRange =0
table.RecordStoragePoint [0].TimingRecord. LocalForEmergency =false
table.RecordStoragePoint [0].TimingRecord. CompressBefore =15

• SetRecordStoragePointConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table:
ch = channel index,
recType :The range is {“TimingRecord”,” VideoDetectRecord”,” AlarmRecord”,” EventRecord”,” TimingSnapShot”,”
VideoDetectSnapShot”,” AlarmSnapShot”,” EventSnapShot”}
Response OK or Error

ParamName ParamValue type Description


RecordStoragePoint [ch].[recType].Local string Local directory name.
RecordStoragePoint [ch].[recType]. Redundant string Redundant directory name.
RecordStoragePoint [ch].[recType]. Remote string Remote directory name.
RecordStoragePoint [ch].[recType]. AutoSync bool When remote directory recovers, auto synchronize local
directory to remote directory or not.
RecordStoragePoint [ch].[recType]. AutoSyncRange integer From the remote directory recovering time, how long the
data needs to be synchronized. The unit is hour. If it is 0, all
the data needs to be synchronized.
RecordStoragePoint [ch].[recType]. LocalForEmergency bool When the remote directory is unusable, save the data the
local directory or not.
RecordStoragePoint [ch].[recType]. CompressBefore integer How many days data will be compressed.

• GetStorageGroupConfig

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup


Comment

Response table.StorageGroup[0]. Name=”ReadWrite”


table.StorageGroup[0]. Memo =” For Reading & Writing Files”
table.StorageGroup[0]. FileHoldTime =0
table.StorageGroup[0]. OverWrite =true
table.StorageGroup[0]. Channels[0]. MaxPictures =1000
table.StorageGroup[0]. Channels[0]. Path =”/mnt/dvr/sda0”

• SetStorageGroupConfig
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&&<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Comment In below table:
Index = StorageGroup index
ch = channel index
Response OK or Error

ParamName ParamValue type Description


StorageGroup[Index]. Name string Storage group name.
StorageGroup[Index]. Memo string Storage group memo.
StorageGroup[Index]. FileHoldTime integer How many days the file will be hold.
StorageGroup[Index]. OverWrite bool Over write or not when there is not enough storage.
StorageGroup[Index]. Channels[ch]. MaxPictures Integer The max pictures beyond which the old pictures will be over
written. If it is 0, the old pictures will be not over written.
StorageGroup[Index]. Channels[ch]. Path string The channel path.

• Audio
• Audio MIME type

MIME Description
Audio/PCM
Audio/ADPCM
Audio/G.711A
Audio/G.711Mu
Audio/G.726
Audio/G.729
Audio/MPEG2
Audio/AMR
Audio/AAC

• Post Audio

URL Syntax http://<ip>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment paramValue as below table.
Response OK or ERROR

ParamName ParamValue type Description


httptype string singlepart:HTTP content is a continuous flow of audio
packets
multipart:HTTP content type is
multipart/x-mixed-replace,and each audio packet ends
with a boundary string
channel integer The audio channel

• Example for singlepart


The RUL of transmit a singlepart、channel 1 audio stream(encoded with
G.711 A-law) is: http: //<ip>/cgi-bin/audio.cgi?
action=postAudio&httptype=singlepart&channel=1

example:

POST /cgi-bin/audio.cgi?
action=postAudio&httptype=singlepart&channel=1 HTTP/1.1
Content-Type: Audio/G.711A
Content-Length:9999999

<Audio data>
<Audio data>

• Example for multipart


The RUL of transmit a multipart、channel 1 audio stream(encoded with
G.711 A-law) is: http: //<ip>/cgi-bin/audio.cgi?
action=postAudio&httptype= multipart &channel=1

example:

POST /cgi-bin/audio.cgi?action=postAudio&httptype= multipart


&channel=1 HTTP/1.1 Content-Type: multipart/x-mixed-replace;
boundary=<boundary>
--<boundary>

Content-
Type:
Audio/G.
711A
Content-
Length:
800

<Audio data>
--<boundary>
• Get Audio

URL Syntax http://<ip>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment paramValue as below table.
Response OK or ERROR

ParamName ParamValue type Description


httptype string singlepart:HTTP content is a continuous flow of audio
packets
multipart:HTTP content type is
multipart/x-mixed-replace,and each audio packet ends
with a boundary string
channel integer The audio channel

• Example for singlepart


The RUL of Request a singlepart、channel 1 audio stream(encoded with G.711 A-law) is:
http: //<ip>/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1

If the request was successful, the server returns a continuous flow of audio packets.The content type is only set at the
beginning of the connection.
Return:
HTTP Code: 200 OK

Content-
Type:
Audio/G.
711A
Body:
<Audio data>
<Audio data>

• Example for multipart


The RUL of Request a multipart、channel 1 audio stream(encoded with G.711 A-law) is:
http: //<ip>/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1

If the request was successful, the server returns a continuous flow of audio packets. The content type is “multipart/x-mixed-
replace” and each audio packet ends with a boundary string.
Return:
HTTP Code: 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>

Content-
Type:
Audio/G.
711A
Content-
Length:
800

<Audio data>
--<boundary>

• Appendix
• Stream Format
The Stream format is used by 4.1.7 GetStream By Http and 4.1.8 Playback By Http, describes the format of the data
stream.
Stream Header:

Byte 0 1 2 3 4 5 6 7
Orde
r
Key Flag Type reserved packet length

Byte 8 9 10 11 12 13 14 15
Orde
r
Extend header
Key channel Sequence
length

Byte 16 17 18 19 20 21 22 23
Orde
r
Check
Key utc utcms reserved
sum
Flag=”DH”;

Type=0x10 means the


audio packet; Type=0x20
means the video packet;

Packet length means the packet total length, contains the packet header, maybe one or more extend header,

and the media data; Extend Header Format

Extend header length must be

multiple of 4 bytes; Audio extend

header:

Byte
0 1 2 3 4 5 6 7
Orde
r

Key Audio Sample


0x11 8 reserved Tracks reserved
Type Freq
A audio packet must contain the audio extend header;

Audio Type:1 - PCM8;2 - G729;3 - IMA_ADPCM;4 - G711U;5 - G721;6 - PCM8_VWIS;7 - MS_ADPCM;8 -


G711A;9 - AMR-NB;10 - PCM16;11- G723.1;12 – AAC;13 - G726_40;14 - G726_32;15 - G726_24;16 - G726_16
Tracks: Tracks number, support 1 and 2;
Sample Freq: audio sample frequence,1 - 4000;2 - 8000;3 - 11025;4 - 16000;5 - 20000;6 - 22050;7 - 32000;8 - 44100;9 -
48000;
Video Extend Header:

Byte
0 1 2 3 4 5 6 7
Orde
r

Key Video Frame


0x21 16 reserved Width
Type Type

Byte
8 9 10 11 12 13 14 15
Orde
r

Key Height I Frame Frame reserved


Interval Rate

A video packet must contain the video extend header; Video Type means the video codec type, 1-MPEG4; 2-H.264;
Frame Type: 1-I frame; 2-P frame;3-B frame; Width and Height describe the frame width and height by pixel;

Channel Title Extend Header:

Byte
0 1 2 3 4 5 6 …
Orde
r
Key 0x22 len reserved Title …

When a stream begin, or the device channel title changes, the video packet must contain the channel title extend
header; If the channel title is Chinese, it only support utf8 format.

TimeZone Extend Header:

Byte
0 1 2 3 4 5 6 7
Orde
r
Daylight
Key 0x31 8 reserved Time Zone saving reserved
time

When a stream begin, or the TimeZone changes, the video packet must contain the TimeZone extend
header; Time Zone[0]: [-12,12](west time zone 12 to east time zone 12), Time Zone[1] modify the time by minutes;
Daylight saving time: 1/0, yes or not in daylight saving time;

Event Flag Extend Header:

Byte
0 1 2 3 4 5 6 …
Orde
r

Key 0x23 len reserved Event Flag

If the video frame contain one or more event flags, the video packet should contain the Event Flag Extend Header. The
event flag means what event had happened by set the bit as 1;
Event Flag: bit0-exterior alarm; bit1-move detect; bit2-video lost.

• VedioInput
• AdjustFocus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action= adjustFocus&focus=<focus>&zoom=<zoom>


Comment focus: float, the range is between 0 and 1; -1 means reset to position 0.
zoom: float, the range is between 0 and 1; -1 means reset to position 0.
Response OK or ERROR

• AdjustFocusContinuously

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action= adjustFocusContinuously&focus=<focus>&zoom=<zoom>


Comment focus: float, the range is -1 < focus < 1; 0 means stop.
zoom: float, the range is -1 < zoom< 1; 0 means stop.
The value means the moving speed of motor lens, positive value means move forwards, negative value means move
backwards. This command is used to drive the lens move continuously, until it reaches end. When motor is moving, and you
send this command again with focus or zoom parameter as 0, the motor will stop immediately. In this command when you
adjust the focus parameter, the zoom parameter should be -1, and the focus parameter should be -1 when adjust the zoom
parameter.
Example If we want to adjust focus, the API like this:

http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0.02&zoom=-1"&
HYPERLINK "http://172.30.1.100/cgi-bin/devVideoInput.cgi?
action=adjustFocusContinuously&focus=0.02&zoom=-1"focus=0.02 HYPERLINK "http://172.30.1.100/cgi-
bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0.02&zoom=-1"& HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0.02&zoom=-
1"zoom=-1 and when the motor is moving, we send below command to let it stop:
http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1"& HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1"focus=0 HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1"& HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1"zoom=- HYPERLINK
"http://172.30.1.100/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1"1
Response OK or ERROR

• AutoFocus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action= autoFocus


Comment
Response OK or ERROR

• GetFocusStatus

URL Syntax http://<ip>/cgi-bin/devVideoInput.cgi?action= getFocusStatus


Comment The range of status.Status is “Normal” and “Autofocus”. This command must be continual executed until status.Status is
“Normal”.
Response status.Focus=0.5
status.Zoom=0.5
status.Status=Normal

• SD Camera
This chapter is only effective with SD Camera.

• VideoInWhiteBalance
• GetVideoInWhiteBalance

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInWhiteBalance


Description Get VideoInWhiteBalance capabilities, channelNo is video in channel index.
Response table.VideoInWhiteBalance[0][0].ColorTemperatureLevel=50
table.VideoInWhiteBalance[0][0].GainBlue=50
table.VideoInWhiteBalance[0][0].GainGreen=50
table.VideoInWhiteBalance[0][0].GainRed=50
table.VideoInWhiteBalance[0][0].Mode=ATW
table.VideoInWhiteBalance[0][1].ColorTemperatureLevel=50
table.VideoInWhiteBalance[0][1].GainBlue=50
table.VideoInWhiteBalance[0][1].GainGreen=50
table.VideoInWhiteBalance[0][1].GainRed=50
table.VideoInWhiteBalance[0][1].Mode=Auto
table.VideoInWhiteBalance[0][2].ColorTemperatureLevel=50
table.VideoInWhiteBalance[0][2].GainBlue=50
table.VideoInWhiteBalance[0][2].GainGreen=50
table.VideoInWhiteBalance[0][2].GainRed=50

table.VideoInWhiteBalance[0][2].Mode=Auto

• SetVideoInWhiteBalance

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head =VideoInOptions[ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Mode integer “Auto”,“Indoor", "Outdoor", "ATW", "Manual", "AutoOutdoor"
head. GainRed integer Range is 0-100

head. GainBlue integer Range is 0-100

• VideoInExposure
• GetVideoInExposure

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name= VideoInExposure


Description
Response table.VideoInExposure[0][0].AutoGainMax=2
table.VideoInExposure[0][0].Backlight=0
table.VideoInExposure[0][0].Compensation=7
table.VideoInExposure[0][0].DoubleExposure=0
table.VideoInExposure[0][0].Gain=1 table.VideoInExposure[0]
[0].GlareInhibition=0 table.VideoInExposure[0][0].Iris=10
table.VideoInExposure[0][0].Mode=0 table.VideoInExposure[0]
[0].RecoveryTime=900 table.VideoInExposure[0][0].Rect[0]=0
table.VideoInExposure[0][0].Rect[1]=0 table.VideoInExposure[0]
[0].Rect[2]=0 table.VideoInExposure[0][0].Rect[3]=0
table.VideoInExposure[0][0].SlowAutoExposure=0
table.VideoInExposure[0][0].SlowShutter=true
table.VideoInExposure[0][0].SlowSpeed=25
table.VideoInExposure[0][0].Speed=50 table.VideoInExposure[0]
[0].Value1=0.100000 table.VideoInExposure[0][0].Value2=80
table.VideoInExposure[0][0].WideDynamicRange=0
table.VideoInExposure[0][0].WideDynamicRangeMode=0
table.VideoInExposure[0][1].AutoGainMax=2
table.VideoInExposure[0][1].Backlight=0
table.VideoInExposure[0][1].Compensation=14
table.VideoInExposure[0][1].DoubleExposure=0
table.VideoInExposure[0][1].Gain=1 table.VideoInExposure[0]
[1].GlareInhibition=0 table.VideoInExposure[0][1].Iris=10
table.VideoInExposure[0][1].Mode=2 table.VideoInExposure[0]
[1].RecoveryTime=900 table.VideoInExposure[0][1].Rect[0]=0
table.VideoInExposure[0][1].Rect[1]=0 table.VideoInExposure[0]
[1].Rect[2]=0 table.VideoInExposure[0][1].Rect[3]=0
table.VideoInExposure[0][1].SlowAutoExposure=14
table.VideoInExposure[0][1].SlowShutter=true
table.VideoInExposure[0][1].SlowSpeed=25
table.VideoInExposure[0][1].Speed=50 table.VideoInExposure[0]
[1].Value1=0.100000 table.VideoInExposure[0][1].Value2=80
table.VideoInExposure[0][1].WideDynamicRange=0
table.VideoInExposure[0][1].WideDynamicRangeMode=0
table.VideoInExposure[0][2].AutoGainMax=2
table.VideoInExposure[0][2].Backlight=0
table.VideoInExposure[0][2].Compensation=7
table.VideoInExposure[0][2].DoubleExposure=0
table.VideoInExposure[0][2].Gain=1 table.VideoInExposure[0]
[2].GlareInhibition=0 table.VideoInExposure[0][2].Iris=10
table.VideoInExposure[0][2].Mode=0 table.VideoInExposure[0]
[2].RecoveryTime=900 table.VideoInExposure[0][2].Rect[0]=0
table.VideoInExposure[0][2].Rect[1]=0 table.VideoInExposure[0]
[2].Rect[2]=0 table.VideoInExposure[0][2].Rect[3]=0
table.VideoInExposure[0][2].SlowAutoExposure=0
table.VideoInExposure[0][2].SlowShutter=true
table.VideoInExposure[0][2].SlowSpeed=25
table.VideoInExposure[0][2].Speed=50
table.VideoInExposure[0][2].Value1=0.100000
table.VideoInExposure[0][2].Value2=80 table.VideoInExposure[0]
[2].WideDynamicRange=0 table.VideoInExposure[0]
[2].WideDynamicRangeMode=0

Comment In above table, head = table.VideoInOptions[ChannelNo]


ChannelNo = video channel index.

• SetVideoInExposure

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInExposure[ChannelNo][ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head.Mode integer Range is {0,2,3, 4}
0: AutoExposure
2: Gain first
3: Exposure first
4:Manual.
head.Gain integer Range is 0-15

Head.Iris integer Range is 0-17

head.Speed integer Range is [3,…,3000]

head.Compensation float Range is [0-14],

head.SlowAutoExposure float Range is [0-15]

head.AutoGainMax integer Range is {0,1,2}


0: low
1: middle
2: high
head.SlowShutter integer true: Enable SlowShutter
false: Disable SlowShutter

head.SlowSpeed integer Range is {1,2,3,6,12,25}


0:forbid flash
1:always flash

2:auto flash
head.RecoveryTime integer Range is {0,300,900, 3600, 7200}, Unit is second.
0:close

head.WideDynamicRangeMode=1 integer Range is [0,1]


• –disable,
• –enable
head.GlareInhibition integer Range is [0,1,2,3]
0:disable 1:low
2:middle
3:high

head.Backlight bool 0: enable Backlight


1: disable Backlight

• VideoInDenoise
• GetVideoInDenoise

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDenoise


Description
Response table.VideoInDenoise[0][0].2DEnable=true
table.VideoInDenoise[0][0].2DLevel=8 table.VideoInDenoise[0]
[0].3DAutoType.AutoLevel=2 table.VideoInDenoise[0]
[0].3DAutoType.Mod=8 table.VideoInDenoise[0]
[0].3DManulType.SnfLevel=0 table.VideoInDenoise[0]
[0].3DManulType.TnfLevel=0 table.VideoInDenoise[0]
[0].3DType=Auto table.VideoInDenoise[0][1].2DEnable=true
table.VideoInDenoise[0][1].2DLevel=8 table.VideoInDenoise[0]
[1].3DAutoType.AutoLevel=2 table.VideoInDenoise[0]
[1].3DAutoType.Mod=8 table.VideoInDenoise[0]
[1].3DManulType.SnfLevel=0 table.VideoInDenoise[0]
[1].3DManulType.TnfLevel=0 table.VideoInDenoise[0]
[1].3DType=Auto table.VideoInDenoise[0][2].2DEnable=true
table.VideoInDenoise[0][2].2DLevel=8 table.VideoInDenoise[0]
[2].3DAutoType.AutoLevel=2 table.VideoInDenoise[0]
[2].3DAutoType.Mod=8 table.VideoInDenoise[0]
[2].3DManulType.SnfLevel=0 table.VideoInDenoise[0]
[2].3DManulType.TnfLevel=0 table.VideoInDenoise[0]
[2].3DType=Auto

• SetVideoInDenoise

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInDenoise [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head.2DEnable integer true: Enable 2D Denoise
false: Disable 2D Denoise

head.2DLevel integer Range is 1-5


head.3DType String “Off”
“Auto”
head .3DAutoType.Mode integer Range is 0-1

• VideoInDayNight
• GetVideoInDayNight

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight


Description
Response table.VideoInDayNight[0][0].BCRDelay=10
table.VideoInDayNight[0][0].ICRDelay=10
table.VideoInDayNight[0][0].Mode=Brightness
table.VideoInDayNight[0][0].Sensitivity=4
table.VideoInDayNight[0][0].Type=Electron
table.VideoInDayNight[0][1].BCRDelay=10
table.VideoInDayNight[0][1].ICRDelay=10
table.VideoInDayNight[0][1].Mode=BlackWhite
table.VideoInDayNight[0][1].Sensitivity=4
table.VideoInDayNight[0][1].Type=Electron
table.VideoInDayNight[0][2].BCRDelay=10
table.VideoInDayNight[0][2].ICRDelay=10
table.VideoInDayNight[0][2].Mode=BlackWhite
table.VideoInDayNight[0][2].Sensitivity=4
table.VideoInDayNight[0][2].Type=Electron

• SetVideoInDayNight

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInDayNight [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Type integer Electron:
Mechanism:

head. Mode integer Auto、Color、BlackWhite


head. Sensitivity integer Range is 0-7

• VideoInFocus
• GetVideoInFocus

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight


Description
Response table.VideoInFocus[0][0].FocusLimit=100 table.VideoInFocus[0]
[0].FocusLimitSelectMode=Manual table.VideoInFocus[0]
[0].IRCorrection=0 table.VideoInFocus[0][0].Mode=3
table.VideoInFocus[0][0].Sensitivity=1 table.VideoInFocus[0]
[1].FocusLimit=100 table.VideoInFocus[0]
[1].FocusLimitSelectMode=Manual table.VideoInFocus[0]
[1].IRCorrection=0 table.VideoInFocus[0][1].Mode=3
table.VideoInFocus[0][1].Sensitivity=1 table.VideoInFocus[0]
[2].FocusLimit=100 table.VideoInFocus[0]
[2].FocusLimitSelectMode=Manual table.VideoInFocus[0]
[2].IRCorrection=0 table.VideoInFocus[0][2].Mode=3
table.VideoInFocus[0][2].Sensitivity=1

• SetVideoInFocus

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInDayNight [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Mode integer 2-Auto focus,3-Half auto focus,4-Manual focus
head. FocusLimit integer 100、1000、2000、3000、5000、
head. Sensitivity integer Range is 0,1,2
0-high,1-default,2-low
head. IRCorrection integer 0 :No correcetion; 1:Correction; 2:Auto correction

• VideoInZoom
• GetVideoInZoom

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom


Description
Response table.VideoInZoom[0][0].DigitalZoom=true
table.VideoInZoom[0][0].Speed=7 table.VideoInZoom[0]
[0].ZoomLimit=4 table.VideoInZoom[0][1].DigitalZoom=true
table.VideoInZoom[0][1].Speed=0 table.VideoInZoom[0]
[1].ZoomLimit=4 table.VideoInZoom[0][2].DigitalZoom=false
table.VideoInZoom[0][2].Speed=7 table.VideoInZoom[0]
[2].ZoomLimit=4

• SetVideoInZoom

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInZoom [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. DigitalZoom integer true: Enable DigitalZoom
false: Disable DigitalZoom

head. Speed integer Range is 0-7

• VideoInSharpness
• GetVideoInSharpness

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness


Description
Response table.VideoInSharpness[0][0].Level=4 table.VideoInSharpness[0]
[0].Mode=1 table.VideoInSharpness[0][0].Sharpness=8
table.VideoInSharpness[0][1].Level=4 table.VideoInSharpness[0]
[1].Mode=1 table.VideoInSharpness[0][1].Sharpness=8
table.VideoInSharpness[0][2].Level=4 table.VideoInSharpness[0]
[2].Mode=1 table.VideoInSharpness[0][2].Sharpness=8

• SetVideoInSharpness

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInSharpness [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Sharpness integer Range is 0-15

head. Level integer Range is 0-15

• VideoInColor
• GetVideoInColor

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInColor


Description
Response table.VideoInColor[0][0].Brightness=50 table.VideoInColor[0]
[0].ChromaSuppress=1 table.VideoInColor[0][0].Contrast=50
table.VideoInColor[0][0].Gamma=0 table.VideoInColor[0]
[0].Hue=50 table.VideoInColor[0][0].Saturation=50
table.VideoInColor[0][0].Style=Standard table.VideoInColor[0]
[1].Brightness=50 table.VideoInColor[0][1].ChromaSuppress=1
table.VideoInColor[0][1].Contrast=50 table.VideoInColor[0]
[1].Gamma=0 table.VideoInColor[0][1].Hue=50
table.VideoInColor[0][1].Saturation=50 table.VideoInColor[0]
[1].Style=Standard table.VideoInColor[0][2].Brightness=50
table.VideoInColor[0][2].ChromaSuppress=1
table.VideoInColor[0][2].Contrast=50 table.VideoInColor[0]
[2].Gamma=0 table.VideoInColor[0][2].Hue=50
table.VideoInColor[0][2].Saturation=50 table.VideoInColor[0]
[2].Style=Flamboyant

• SetVideoInColor

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInColor [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Style integer Gentle
Standard
Flamboyant
head. Hue integer Range is 0-100

head. Brightness integer Range is 0-100

head. Saturation Range is 0-100

head. ChromaSuppress Range is 0-3

head. Gamma Range is 0-15

• VideoInRotate
• GetVideoInRotate

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInRotate


Description
Response table.VideoInRotate[0][0].Flip=false table.VideoInRotate[0]
[0].Freeze=false table.VideoInRotate[0][0].Mirror=false
table.VideoInRotate[0][0].Rotate90=0 table.VideoInRotate[0]
[0].Stable=false table.VideoInRotate[0][1].Flip=false
table.VideoInRotate[0][1].Freeze=false table.VideoInRotate[0]
[1].Mirror=false table.VideoInRotate[0][1].Rotate90=0
table.VideoInRotate[0][1].Stable=false table.VideoInRotate[0]
[2].Flip=false table.VideoInRotate[0][2].Freeze=false
table.VideoInRotate[0][2].Mirror=false table.VideoInRotate[0]
[2].Rotate90=0 table.VideoInRotate[0][2].Stable=false

• SetVideoInRotate

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInRotate [ChannelNo] [ConfigNo]
ChannelNo = video channel index.
ConfigNo=0,1,2; normal,day,night
Response OK or ERROR

ParamName ParamValue Description


type
head. Flip integer true: Enable flip function
false: Disable flip function

• VideoInMode
• GetVideoInMode

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode


Description
Response table.VideoInMode[0].Config[0]=1
table.VideoInMode[0].Mode=0
table.VideoInMode[0].TimeSection[0][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][5]=0 00:00:00-23:59:59

• SetVideoInMode

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head = VideoInMode [ChannelNo]
ChannelNo = video channel index.

Response OK or ERROR

ParamName ParamValue Description


type
head. Mode integer Range is {0,1}
0: NoSwitch;
1: Switch depends on head.TimeSection.

head. Config integer Mode=0 Config[0]={0、1/2}


Mode=1 Config[1]={ 1 }
Config[2]={ 2 }
head.TimeSection[0][0] integer The time format is "0 H:m: H:m:S "
For example: 0 00:00:00-10:59:59

• VideoAnalyse
This chapter is only effective with smart IP Camera.
• VideoAnalyseRule
• GetVideoAnalyseRule

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule


Description Get VideoAnalyseRule.
In below table, head =table.VideoAnalyseRule[ChannelNo] [RuleNo]
ChannelNo = video channel index.
RuleNo =rule index.
Response head.Name= line1
head.Type=CrossLineDetection
head.VideoAnalyseRule[0][0].Enable =true
head.VideoAnalyseRule[0][0].EventHandler= (output of EventHandler is described in 6.1.1 GetEventHandler)

• SetVideoAnalyseRule

URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<paramName>=<paramValue>...]


Comment In below table, head =VideoAnalyseRule[ChannelNo] [RuleNo]
ChannelNo = video channel index.
RuleNo =rule index.
ParamName starts with head.Config is only effective with {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,
“TakenAwayDetection”}
Response OK or ERROR

ParamName ParamValue Description


type
head.Name string Rule name, it must be unique.
head.Type string The range is {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,”
“TakenAwayDetection” ,”VideoAbnormalDetection”, “FaceDetection”}
head.Enable bool Enable/Disable this rule
head.EventHandler Setting of EventHandler is described in 6.1.2 SetEventHandler

head.Config.DetectLine[0][0] integer The start point of DetectLine 0;


head.Config.DetectLine[0][1] integer The end point of DetectLine 0;
head.Config.DetectLine[1][0] integer The start point of DetectLine 1;
head.Config.DetectLine[1][1] integer The end point of DetectLine 1;
head.Config.Direction string The range is {“LeftToRight”, “RightToLeft”, “Both”}
head.Config .SizeFilter.MaxSize[0] integer Maximum width. The width of the object must not be beyond maximum width.
head.Config .SizeFilter.MaxSize[1] integer Maximum height. The height of the object must not be beyond maximum height.
head.Config .SizeFilter.MinSize[0] integer Minimum width. The width of the object must not be less than minimum width.
head.Config .SizeFilter.MinSize[1] integer Minimum height. The height of the object must not be beyond minimum height.

You might also like