Dahua HTTP Api For Ipc&sd-V1.40
Dahua HTTP Api For Ipc&sd-V1.40
Version 1.40
Document History
No Release Notes Date Version Author
1 draft 2007-1-18 1.10 Haifeng Wang
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
• 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
• 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:
• 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:
• Camera
Camera API allows application to configure and view Dahua video product settings.
• Stream
• GetStream
<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
• 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
Content-Type:multipart/x-mixed-replace;boundary=<boundary>
Body:
--<boundary>
Content-Type:image/jpeg
Content-Length:<image size>
• PlayBack
• LoadFile
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
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
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.
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
caps[0].MainFormat[0].Audio.CompressionTypes=PCM,G.711A,G.711Mu
caps[0].MainFormat[1]…
…
• GetAudioEncodeConfig
• SetAudioEncodeConfig
• SnapEncode
• GetSnapConfigCaps
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
• SetSnapEncodeConfig
• ChannelTitle
• GetChannelTitleConfig
• SetChannelTitleConfig
• FlashLight
• GetFlashLightConfig
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
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
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
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
• SetAlarmConfig
• GetAlarmOutConfig
• SetAlarmOutConfig
• GetInSlots
• GetOutSlots
• GetInState
• GetOutState
• GetChannelInState
• GetChannelOutState
• MotionDetect
• GetMotionDetectConfig
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
6: highest sensitivity.
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
• SetBlindDetectConfig
• LossDetect
• GetLossDetectConfig
• SetLossDetectConfig
• LoginFailureAlarm
• GetLoginFailureAlarmConfig
• SetLoginFailureAlarmConfig
• StorageAbnormal
• GetStorageNotExistConfig
• SetStorageNotExistConfig
• Get StorageFailureConfig
• Set StorageFailureConfig
• SetStorageLowSpaceConfig
• NetAbnormal
• GetNetAbortConfig
• SetNetAbortConfig
• 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
• GetEventIndexes
Response channels[0]=0
channels[1]=2
channels[2]=3
…
(This response means event happened on channel 0, channel 2, and channel 3.)
• Attach
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:
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
• SetPTZConfig
Response OK or ERROR
• PTZControl
• GetProtocolList
• 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
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
• PTZStatus
• PTZ GetStatus
• Record&Snap
• Record
• GetRecordConfig
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
• Snap
• GetSnapConfig
• SetSnapConfig
• MediaGlobal
• GetMediaGlobalConfig
• SetMediaGlobalConfig
• Holiday
• GetHolidayConfig
• SetHolidayConfig
• System
• General
• GetGeneralConfig
• SetGeneralConfig
• SystemTime
• GetCurrentTime
• SetCurrentTime
• Locales
• GetLocalesConfig
• SetLocalesConfig
Example:
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
• Language
• GetLanguageCaps
• GetLanguageConfig
URL Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=Language
Comment Get current system language cofnig.
Response table.Language=SimpChinese
• SetLanguageConfig
• AccessFilter
• GetAccessFilterConfig
• SetAccessFilterConfig
• AutoMaintain
• GetAutoMaintainConfig
table.AutoMaintain. AutoShutdownHour=0
table.AutoMaintain. AutoShutdownMinute=0
table.AutoMaintain. AutoStartUpDay=1
table.AutoMaintain. AutoStartUpHour=2
table.AutoMaintain. AutoStartUpMinute=0
• SetAutoMaintainConfig
• 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
• GetGroupInfoAll
• DeleteUser
• ModifyUser
• ModifyPassword
• GetUserInfo
• GetUserInfoAll
• GetActiveUserInfoAll
• System Operation
• Reboot
• Shutdown
• GetDeviceType
• GetHardwareVersion
• GetSerialNo
• GetSystemInfo
• GetVendor
• GetSoftwareVersion
• GetOnvifVersion
• Log
• StartFind
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
items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
items[1].Type=SaveConfig
items[1].User=System
…
• 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
• UserGlobal
• GetUserGlobalConfig
• SetUserGlobalConfig
• Storage
• File Finding
• Create
• 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
• Close
• Destroy
• Storage Device
• GetStorageDeviceCollect
• Work Group
• GetWorkGroupCollect
• Work Directory
• GetWorkDirectoryCollect
• NAS
• GetNASConfig
• SetNASConfig
• Storage Point
• GetRecordStoragePointConfig
• SetRecordStoragePointConfig
• GetStorageGroupConfig
• 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
• 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
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:
Content-
Type:
Audio/G.
711A
Content-
Length:
800
<Audio data>
--<boundary>
• Get Audio
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>
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”;
Packet length means the packet total length, contains the packet header, maybe one or more extend header,
header:
Byte
0 1 2 3 4 5 6 7
Orde
r
Byte
0 1 2 3 4 5 6 7
Orde
r
Byte
8 9 10 11 12 13 14 15
Orde
r
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;
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.
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;
Byte
0 1 2 3 4 5 6 …
Orde
r
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
• AdjustFocusContinuously
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
• GetFocusStatus
• SD Camera
This chapter is only effective with SD Camera.
• VideoInWhiteBalance
• GetVideoInWhiteBalance
table.VideoInWhiteBalance[0][2].Mode=Auto
• SetVideoInWhiteBalance
• VideoInExposure
• GetVideoInExposure
• SetVideoInExposure
2:auto flash
head.RecoveryTime integer Range is {0,300,900, 3600, 7200}, Unit is second.
0:close
• VideoInDenoise
• GetVideoInDenoise
• SetVideoInDenoise
• VideoInDayNight
• GetVideoInDayNight
• SetVideoInDayNight
• VideoInFocus
• GetVideoInFocus
• SetVideoInFocus
• VideoInZoom
• GetVideoInZoom
• SetVideoInZoom
• VideoInSharpness
• GetVideoInSharpness
• SetVideoInSharpness
• VideoInColor
• GetVideoInColor
• SetVideoInColor
• VideoInRotate
• GetVideoInRotate
• SetVideoInRotate
• VideoInMode
• GetVideoInMode
• SetVideoInMode
Response OK or ERROR
• VideoAnalyse
This chapter is only effective with smart IP Camera.
• VideoAnalyseRule
• GetVideoAnalyseRule
• SetVideoAnalyseRule