Dahua HTTP API For Ipc v1.67
Dahua HTTP API For Ipc v1.67
Version 1.67
1
Document History
No Release Notes Date Version Author
1 draft 2007-1-18 1.10 Haifeng Wang
2
29 Add condition. ResponseLevel for getParkingSpaceStatus 2014-11-13 1.46 Xiaojie Fang
30 Add video detection capabilitity 2014-12-6 1.47 Wang Shu
31 Add get/set interface to Telnet 2014-12-12 1.48 Wang Shu
32 Add VideoWidgetNumberStat and VideoEncodeROI 2014-12-15 1.49 Wang Shu
33 Add snapManager.attachFileProc 2014-12-22 1.50 Wang Shu
34 Add getAllParkingSpaceStatus 2015-01-07 1.51 Xiaojie Fang
35 Add operation to PtzAutoMovement 2015-01-15 1.52 Wang Shu
36 Modify the response of snapManager.attachFileProc 2015-01-26 1.53 Xiaojie Fang
37 Abolish getOnvifVersion,use getVersion instead 2015-01-30 1.54 Xiaojie Fang
38 Correct spell mistake of GetInState/GetOutState 2015-02-04 1.55 Wang Shu
39 Modify the response of getAllParkingSpaceStatus 2015-02-04 1.56 Xiaojie Fang
40 Add chapter RadiometryManager 2015-04-20 1.57 Xiaojie Fang
41 Add Chapter 3.2 format and Chapter 3.4 Response 2015-04-21 1.58 Xiaojie Fang
42 Modify the getDDNSConfig and SetDDNSConfig chapters 2015-05-18 1.59 Xiaojie Fang
43 Add config restore and restoreExcept 2015-05-26 1.60 Wang Shu
44 Add getUUID 2015-06-30 1.61 Xiaojie Fang
45 Add chapter VideoStatServer 2015-07-08 1.62 Xiaojie Fang
SD Camera VideoInColor,VideoInDenoise, VideoInExposure, 2015-07-08 1.63 Wang Shu
46
VideoInDayNight is not public
47 Add chapter ThermographyManager 2015-7-10 1.64 Xiaojie Fang
48 Add chapter HeatMap 2015-7-25 1.65 Xiaojie Fang
Revise chapter RadiometryManager and 2015-8-28 1.66 Xiaojie Fang
49
ThermographyManager
50 Revise getCaps method in chapter ThermographyManager 2015-9-16 1.67 Xiaojie Fang
3
1.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.
2.Catalog
Document History ...................................................................................................................................................................................................... 2
1.Preface ....................................................................................................................................................................................................................4
2.Catalog ....................................................................................................................................................................................................................4
3.HTTP API Transaction ............................................................................................................................................................................................ 11
3.1 Transaction.................................................................................................................................................................................................11
3.2 Format .......................................................................................................................................................................................................12
3.3 Authentication ........................................................................................................................................................................................... 12
3.4 Response .................................................................................................................................................................................................... 13
4.Camera.................................................................................................................................................................................................................. 13
4.1Stream ........................................................................................................................................................................................................13
4.1.1 GetStream ....................................................................................................................................................................................... 13
4.1.2 GetMaxExtraStreamCounts ............................................................................................................................................................. 14
4.1.3 GetSnapshot ...................................................................................................................................................................................14
4.1.4 GetVideo .........................................................................................................................................................................................14
4.1.5 PlayBack .......................................................................................................................................................................................... 15
4.1.6 LoadFile........................................................................................................................................................................................... 15
4.1.7 GetStream By Http .......................................................................................................................................................................... 15
4.1.8 Playback By Http .............................................................................................................................................................................15
4.2VideoColor ..................................................................................................................................................................................................16
4.2.1 GetVideoColorConfig ...................................................................................................................................................................... 16
4.2.2 SetVideoColorConfig ....................................................................................................................................................................... 17
4.3VideoInOptions ........................................................................................................................................................................................... 17
4.3.1 GetVideoInputCaps ......................................................................................................................................................................... 17
4.3.2 GetVideoInOptionsConfig ...............................................................................................................................................................19
4.3.3 SetVideoInOptionsConfig ................................................................................................................................................................ 22
4.4VideoEncode...............................................................................................................................................................................................26
4.4.1 GetVideoConfigCaps .......................................................................................................................................................................26
4.4.2 Resolution ....................................................................................................................................................................................... 27
4.4.3 GetVideoEncodeConfig ................................................................................................................................................................... 28
4.4.4 SetVideoEncodeConfig ................................................................................................................................................................... 29
4
4.5AudioEncode ...............................................................................................................................................................................................30
4.5.1 GetAudioConfigCaps .......................................................................................................................................................................30
4.5.2 GetAudioEncodeConfig ................................................................................................................................................................... 30
4.5.3 SetAudioEncodeConfig.................................................................................................................................................................... 31
4.6 SnapEncode ...............................................................................................................................................................................................32
4.6.1 GetSnapConfigCaps ......................................................................................................................................................................... 32
4.6.2 GetSnapEncodeConfig .................................................................................................................................................................... 32
4.6.3 SetSnapEncodeConfig ..................................................................................................................................................................... 33
4.7ChannelTitle ...............................................................................................................................................................................................34
4.7.1 GetChannelTitleConfig .................................................................................................................................................................... 34
4.7.2 SetChannelTitleConfig .................................................................................................................................................................... 34
4.8VideoStandard ............................................................................................................................................................................................ 34
4.8.1 GetVideoStandardConfig ................................................................................................................................................................ 34
4.8.2 SetVideoStandardConfig .................................................................................................................................................................34
4.9VideoWidget...............................................................................................................................................................................................35
4.9.1 GetVideoWidgetConfig ................................................................................................................................................................... 35
4.9.2 SetVideoWidgetConfig ................................................................................................................................................................... 36
4.10VideoIn ..................................................................................................................................................................................................... 38
4.10.1 getCollect ...................................................................................................................................................................................... 38
4.11VideoOut ..................................................................................................................................................................................................38
4.11.1 GetVideoOutConfig.......................................................................................................................................................................38
4.11.2 SetVideoOutConfig .......................................................................................................................................................................38
4.12FlashLight ..................................................................................................................................................................................................39
4.12.1 GetFlashLightConfig ...................................................................................................................................................................... 39
4.12.2 SetFlashLightConfig .......................................................................................................................................................................39
5.NetWork ............................................................................................................................................................................................................... 40
5.1NetInterfaces .............................................................................................................................................................................................. 40
5.1.1 GetInterfaces...................................................................................................................................................................................40
5.2BasicConfig..................................................................................................................................................................................................41
5.2.1 GetBasicConfig ................................................................................................................................................................................ 41
5.2.2 SetBasicConfig ................................................................................................................................................................................. 41
5.3PPPoE .......................................................................................................................................................................................................... 42
5.3.1 GetPPPoEConfig .............................................................................................................................................................................. 42
5.3.2 SetPPPoEConfig ............................................................................................................................................................................... 42
5.4DDNS ........................................................................................................................................................................................................... 42
5.4.1 GetDDNSConfig ............................................................................................................................................................................... 42
5.4.2 SetDDNSConfig................................................................................................................................................................................ 43
5.5Email ........................................................................................................................................................................................................... 44
5.5.1 GetEmailConfig ............................................................................................................................................................................... 44
5.5.2 SetEmailConfig ................................................................................................................................................................................ 44
5.6Wlan ........................................................................................................................................................................................................... 45
5.6.1 GetWlanConfig ................................................................................................................................................................................ 45
5.6.2 SetWlanConfig ................................................................................................................................................................................ 45
5.6.3 ScanWlanDevices ............................................................................................................................................................................ 46
5.7UPnP ........................................................................................................................................................................................................... 47
5
5.7.1 GetUPnPConfig ............................................................................................................................................................................... 47
5.7.2 SetUPnPConfig ................................................................................................................................................................................ 47
5.7.3 GetUPnPStatus ................................................................................................................................................................................ 47
5.8NTP .............................................................................................................................................................................................................48
5.8.1 GetNTPConfig.................................................................................................................................................................................. 48
5.8.2 SetNTPConfig .................................................................................................................................................................................. 48
5.9RTSP ............................................................................................................................................................................................................ 49
5.9.1 GetRTSPConfig ................................................................................................................................................................................ 49
5.9.2 SetRTSPConfig ................................................................................................................................................................................. 49
5.10Telnet ........................................................................................................................................................................................................50
5.10.1 GetTelnetConfig ............................................................................................................................................................................ 50
5.10.2 SetTelnetConfig .............................................................................................................................................................................50
6.Events ...................................................................................................................................................................................................................50
6.1EventHandler .............................................................................................................................................................................................. 50
6.1.1 GetEventHandler.............................................................................................................................................................................50
6.1.2 SetEventHandler ............................................................................................................................................................................. 52
6.2Alarm .......................................................................................................................................................................................................... 53
6.2.1 GetAlarmConfig .............................................................................................................................................................................. 53
6.2.2 SetAlarmConfig ............................................................................................................................................................................... 54
6.2.3 GetAlarmOutConfig......................................................................................................................................................................... 54
6.2.4 SetAlarmOutConfig ......................................................................................................................................................................... 54
6.2.5 GetInSlots ........................................................................................................................................................................................ 55
6.2.6 GetOutSlots ..................................................................................................................................................................................... 55
6.2.7 GetInState ....................................................................................................................................................................................... 55
6.2.8 GetOutState .................................................................................................................................................................................... 55
6.2.9 GetChannelInState .......................................................................................................................................................................... 55
6.2.10 GetChannelOutState ..................................................................................................................................................................... 56
6.3MotionDetect ............................................................................................................................................................................................. 56
6.3.1 GetMotionDetectConfig ..................................................................................................................................................................56
6.3.2 SetMotionDetectConfig ..................................................................................................................................................................56
6.4BlindDetect .................................................................................................................................................................................................58
6.4.1 GetBlindDetectConfig ..................................................................................................................................................................... 58
6.4.2 SetBlindDetectConfig ...................................................................................................................................................................... 58
6.5LossDetect ..................................................................................................................................................................................................58
6.5.1 GetLossDetectConfig .......................................................................................................................................................................58
6.5.2 SetLossDetectConfig .......................................................................................................................................................................58
6.6LoginFailureAlarm ....................................................................................................................................................................................... 59
6.6.1 GetLoginFailureAlarmConfig ........................................................................................................................................................... 59
6.6.2 SetLoginFailureAlarmConfig ............................................................................................................................................................ 59
6.7 StorageAbnormal ....................................................................................................................................................................................... 59
6.7.1 GetStorageNotExistConfig ...............................................................................................................................................................59
6.7.2 SetStorageNotExistConfig ...............................................................................................................................................................60
6.7.3 Get StorageFailureConfig ................................................................................................................................................................ 60
6.7.4 Set StorageFailureConfig .................................................................................................................................................................60
6.7.5 GetStorageLowSpaceConfig ............................................................................................................................................................ 60
6
6.7.6 SetStorageLowSpaceConfig ............................................................................................................................................................. 60
6.8 NetAbnormal ............................................................................................................................................................................................. 61
6.8.1 GetNetAbortConfig ......................................................................................................................................................................... 61
6.8.2 SetNetAbortConfig .......................................................................................................................................................................... 61
6.8.3 GetIPConflictConfig ......................................................................................................................................................................... 61
6.8.4 SetIPConflictConfig ......................................................................................................................................................................... 61
6.9 GetEventIndexes ........................................................................................................................................................................................ 62
6.10 Attach....................................................................................................................................................................................................... 62
7.PTZ ........................................................................................................................................................................................................................ 64
7.1PTZConfig .................................................................................................................................................................................................... 64
7.1.1 GetPTZConfig .................................................................................................................................................................................. 64
7.1.2 SetPTZConfig ...................................................................................................................................................................................64
7.1.3 GetPtzAutoMovementConfig .......................................................................................................................................................... 65
7.1.4 SetPtzAutoMovementConfig .......................................................................................................................................................... 65
7.2PTZControl ..................................................................................................................................................................................................66
7.2.1 GetProtocolList................................................................................................................................................................................ 66
7.2.2 GetCurrentProtocolCaps .................................................................................................................................................................66
7.2.3 PTZ control commands ................................................................................................................................................................... 67
7.3PTZStatus .................................................................................................................................................................................................... 70
7.3.1 PTZ GetStatus .................................................................................................................................................................................. 70
8.RecordSnap ...........................................................................................................................................................................................................71
8.1Record .........................................................................................................................................................................................................71
8.1.1 GetRecordConfig .............................................................................................................................................................................71
8.1.2 SetRecordConfig..............................................................................................................................................................................71
8.1.3 GetRecordModeConfig ................................................................................................................................................................... 72
8.1.4 SetRecordModeConfig .................................................................................................................................................................... 72
8.2Snap ............................................................................................................................................................................................................ 72
8.2.1 GetSnapConfig ................................................................................................................................................................................ 72
8.2.2 SetSnapConfig ................................................................................................................................................................................. 73
8.2.3 attachFileProc ................................................................................................................................................................................. 73
8.3MediaGlobal ............................................................................................................................................................................................... 74
8.3.1 GetMediaGlobalConfig.................................................................................................................................................................... 74
8.3.2 SetMediaGlobalConfig .................................................................................................................................................................... 74
8.4Holiday ........................................................................................................................................................................................................ 74
8.4.1 GetHolidayConfig ............................................................................................................................................................................ 74
8.4.2 SetHolidayConfig .............................................................................................................................................................................75
9.System .................................................................................................................................................................................................................. 75
9.1General .......................................................................................................................................................................................................75
9.1.1 GetGeneralConfig............................................................................................................................................................................ 75
9.1.2 SetGeneralConfig ............................................................................................................................................................................ 76
9.2SystemTime ................................................................................................................................................................................................ 76
9.2.1 GetCurrentTime .............................................................................................................................................................................. 76
9.2.2 SetCurrentTime............................................................................................................................................................................... 76
9.3Locales ........................................................................................................................................................................................................ 76
9.3.1 GetLocalesConfig ............................................................................................................................................................................ 76
7
9.3.2 SetLocalesConfig .............................................................................................................................................................................77
9.4Language ..................................................................................................................................................................................................... 78
9.4.1 GetLanguageCaps ........................................................................................................................................................................... 78
9.4.2 GetLanguageConfig ......................................................................................................................................................................... 78
9.4.3 SetLanguageConfig.......................................................................................................................................................................... 79
9.5AccessFilter .................................................................................................................................................................................................79
9.5.1 GetAccessFilterConfig ..................................................................................................................................................................... 79
9.5.2 SetAccessFilterConfig ...................................................................................................................................................................... 79
9.6AutoMaintain .............................................................................................................................................................................................. 80
9.6.1 GetAutoMaintainConfig ..................................................................................................................................................................80
9.6.2 SetAutoMaintainConfig ................................................................................................................................................................... 80
9.7UserManager .............................................................................................................................................................................................. 81
9.7.1 Group .............................................................................................................................................................................................. 81
9.7.2 GetGroupInfo .................................................................................................................................................................................. 81
9.7.3 GetGroupInfoAll .............................................................................................................................................................................. 81
9.7.4 AddUser .......................................................................................................................................................................................... 81
9.7.5 DeleteUser ...................................................................................................................................................................................... 82
9.7.6 ModifyUser ..................................................................................................................................................................................... 82
9.7.7 ModifyPassword .............................................................................................................................................................................82
9.7.8 GetUserInfo ..................................................................................................................................................................................... 83
9.7.9 GetUserInfoAll ................................................................................................................................................................................. 83
9.7.10 GetActiveUserInfoAll ..................................................................................................................................................................... 83
9.8System Operation ....................................................................................................................................................................................... 84
9.8.1 Reboot ............................................................................................................................................................................................ 84
9.8.2 Shutdown ........................................................................................................................................................................................ 84
9.8.3 GetDeviceType ................................................................................................................................................................................ 84
9.8.4 GetHardwareVersion .......................................................................................................................................................................84
9.8.5 GetSerialNo ..................................................................................................................................................................................... 84
9.8.6 GetMachineName ........................................................................................................................................................................... 84
9.8.7 GetSystemInfo ................................................................................................................................................................................. 85
9.8.8 GetVendor ....................................................................................................................................................................................... 85
9.8.9 GetSoftwareVersion ........................................................................................................................................................................85
9.8.10 GetOnvifVersion ............................................................................................................................................................................ 85
9.8.11 getUUID ........................................................................................................................................................................................ 85
9.9 Log .............................................................................................................................................................................................................86
9.9.1 StartFind .........................................................................................................................................................................................86
9.9.2 DoFind............................................................................................................................................................................................. 86
9.9.3 StopFind .......................................................................................................................................................................................... 87
9.9.4 Clear ................................................................................................................................................................................................ 87
9.10 UserGlobal ............................................................................................................................................................................................... 87
9.10.1 GetUserGlobalConfig .................................................................................................................................................................... 87
9.10.2 SetUserGlobalConfig ..................................................................................................................................................................... 87
9.11 IntervideoManager .................................................................................................................................................................................. 87
9.11.1 GetCGIVersion ............................................................................................................................................................................... 87
9.12 ConfigRestore........................................................................................................................................................................................... 88
8
9.12.1 Restore .......................................................................................................................................................................................... 88
9.12.1 RestoreExcept ............................................................................................................................................................................... 88
10.Storage................................................................................................................................................................................................................ 88
10.1 File Finding .............................................................................................................................................................................................. 88
10.1.1 Create............................................................................................................................................................................................ 88
10.1.2 StartFind ....................................................................................................................................................................................... 88
10.1.3 FindNextFile .................................................................................................................................................................................. 89
10.1.4 Close ............................................................................................................................................................................................. 90
10.1.5 Destroy .......................................................................................................................................................................................... 90
10.2 Storage Device .........................................................................................................................................................................................90
10.2.1 GetStorageDeviceCollect .............................................................................................................................................................. 90
10.2.2 getDeviceAllInfo ............................................................................................................................................................................ 90
10.2.3 setStorageDevice .......................................................................................................................................................................... 91
10.2.4 getCaps .........................................................................................................................................................................................91
10.3 Work Group ............................................................................................................................................................................................. 91
10.3.1 GetWorkGroupCollect ................................................................................................................................................................... 91
10.4 Work Directory ......................................................................................................................................................................................... 92
10.4.1 GetWorkDirectoryCollect .............................................................................................................................................................. 92
10.5 NAS .......................................................................................................................................................................................................... 92
10.5.1 GetNASConfig ............................................................................................................................................................................... 92
10.5.2 SetNASConfig ................................................................................................................................................................................ 92
10.6 Storage Point............................................................................................................................................................................................ 93
10.6.1 GetRecordStoragePointConfig ...................................................................................................................................................... 93
10.6.2 SetRecordStoragePointConfig ....................................................................................................................................................... 93
10.6.3 GetStorageGroupConfig ................................................................................................................................................................ 94
10.6.4 SetStorageGroupConfig.................................................................................................................................................................94
11.Audio .................................................................................................................................................................................................................. 94
11.1 Audio MIME type ..................................................................................................................................................................................... 94
11.2 Post Audio ................................................................................................................................................................................................ 95
11.2.1 Example for singlepart ..................................................................................................................................................................95
11.2.2 Example for multipart ................................................................................................................................................................... 95
11.3 Get Audio .................................................................................................................................................................................................96
11.3.1 Example for singlepart ..................................................................................................................................................................96
11.3.2 Example for multipart ................................................................................................................................................................... 96
11.4 Audio Input .............................................................................................................................................................................................. 97
11.4.1 getCollect ...................................................................................................................................................................................... 97
11.5 Audio Output ........................................................................................................................................................................................... 97
11.5.1 getCollect ...................................................................................................................................................................................... 97
12.Appendix............................................................................................................................................................................................................. 97
12.1 Stream Format ......................................................................................................................................................................................... 97
13.VedioInput ........................................................................................................................................................................................................100
13.1 AdjustFocus ............................................................................................................................................................................................ 100
13.2 AdjustFocusContinuously .......................................................................................................................................................................100
13.3 AutoFocus ..............................................................................................................................................................................................100
13.4 GetFocusStatus ...................................................................................................................................................................................... 100
9
14. SD Camera .......................................................................................................................................................................................................101
14.1 VideoInWhiteBalance ............................................................................................................................................................................101
14.1.1 GetVideoInWhiteBalance ...........................................................................................................................................................101
14.2.2 SetVideoInWhiteBalance ............................................................................................................................................................ 101
14.2 VideoInFocus ........................................................................................................................................................................................ 102
14.2.1 GetVideoInFocus......................................................................................................................................................................... 102
14.2.2 SetVideoInFocus ......................................................................................................................................................................... 102
14.3 VideoInZoom ........................................................................................................................................................................................103
14.3.1 GetVideoInZoom.........................................................................................................................................................................103
14.3.2 SetVideoInZoom .........................................................................................................................................................................103
14.4 VideoInSharpness ..............................................................................................................................................................................104
14.4.1 GetVideoInSharpness .................................................................................................................................................................104
14.4.2 SetVideoInSharpness ..................................................................................................................................................................104
14.5 VideoInRotate ....................................................................................................................................................................................... 104
14.5.1 GetVideoInRotate .......................................................................................................................................................................104
14.5.2 SetVideoInRotate ........................................................................................................................................................................105
14.6 VideoInMode ........................................................................................................................................................................................105
14.6.1 GetVideoInMode ........................................................................................................................................................................105
14.6.2 SetVideoInMode .........................................................................................................................................................................106
15. VideoAnalyse ................................................................................................................................................................................................... 107
15.1 VideoAnalyseRule .................................................................................................................................................................................. 107
15.1.1 GetVideoAnalyseRule ................................................................................................................................................................. 107
15.1.2 SetVideoAnalyseRule .................................................................................................................................................................. 107
15.2 VideoWidgetNumberStat ...................................................................................................................................................................... 109
15.2.1 GetVideoWidgetNumberStat...................................................................................................................................................... 109
15.2.2 SetVideoWidgetNumberStat ...................................................................................................................................................... 109
15.3 VideoEncodeROI ....................................................................................................................................................................................109
15.3.1 GetVideoEncodeROI ...................................................................................................................................................................109
15.3.2 SetVideoEncodeROI .................................................................................................................................................................... 110
15.4 VideoStatServer .....................................................................................................................................................................................110
15.4.1 GetSummary ...............................................................................................................................................................................110
15.4.2 StartFind .....................................................................................................................................................................................110
15.4.3 DoFind.........................................................................................................................................................................................111
15.4.4 StopFind ...................................................................................................................................................................................... 111
16 TrafficSnap ........................................................................................................................................................................................................113
16.1 getParkingSpaceStatus ........................................................................................................................................................................... 113
17 TrafficParking .................................................................................................................................................................................................... 113
17.1 getAllParkingSpaceStatus .......................................................................................................................................................................113
18 VideoDetect ...................................................................................................................................................................................................... 114
18.1 getCaps ..................................................................................................................................................................................................114
19 RadiometryManager .........................................................................................................................................................................................115
19.1 RadioMetry Config ................................................................................................................................................................................. 115
19.1.1 GetHeatImagingThermometryConfig.......................................................................................................................................... 115
19.1.2 SetHeatImagingThermometryConfig .......................................................................................................................................... 115
19.1.3 GetThermometryRuleConfig ....................................................................................................................................................... 116
10
19.1.4 SetThermometryRuleConfig........................................................................................................................................................ 117
19.1.5 GetHeatImagingTemperConfig....................................................................................................................................................118
19.1.6 SetHeatImagingTemperConfig ....................................................................................................................................................118
19.2 getCaps ..................................................................................................................................................................................................119
19.3 getRandomPointTemper ........................................................................................................................................................................120
19.4 getTemper ..............................................................................................................................................................................................120
20 ThermographyManager ....................................................................................................................................................................................121
20.1 ThermographyManager Config ..................................................................................................................................................121
20.1.1 getThermographyOptionsConfig ................................................................................................................................................. 121
20.1.2 setThermographyOptionsConfig ................................................................................................................................................. 122
20.2 getExternSystemInfo ..................................................................................................................................................................123
20.3 getPresetParam .......................................................................................................................................................................... 123
20.4 getCaps ...................................................................................................................................................................................... 124
20.5 getOptimizedRegion ...................................................................................................................................................................125
20.6 enableShutter ............................................................................................................................................................................125
3.1 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:
1. The italics and bold will be replaced by the value behind the symbol “=”.
2. 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.
3. 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.
4. In the request and response, we use “[]” to denote an array. The index is usually a integer and start form 0.
5. 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:
Request GET http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Description Get VideoColor configuration.
Response HTTP/1.1 200 OK
Content-Type:text/plain
head.Brightness=50
head.Contrast=50
head.Hue=50
head.Saturation=50
11
head.TimeSection=1 00:00:00-24:00:00
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&name=VideoColor[0][0].Brightness
Response:
HTTP/1.1 200 OK
Content-Type:text/plain
table.VideoColor[0][0].Brightness=50
3.2 Format
URL Syntax: the format of CGI, the Necessary param is between "<" and ">", unnecessary param is between "[" and "]".
Description: the description of this CGI.
Comment : the comment to params, including range of param , example for this cgi and so on.
Response: example for response of this CGI.
3.3 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:
1. 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.
2. When digest authentication, the Dahua video product response:
12
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"
3.4 Response
4.Camera
Camera API allows application to configure and view Dahua video product settings.
4.1Stream
4.1.1 GetStream
13
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.
4.1.2 GetMaxExtraStreamCounts
4.1.3 GetSnapshot
4.1.4 GetVideo
4.1.6 LoadFile
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.
Content-Type: Application/octet-stream
Body:
streamId=<streamId>\r\n
<data>
15
<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”.
4.2VideoColor
4.2.1 GetVideoColorConfig
16
4.2.2 SetVideoColorConfig
Example:
0 01:00:00-02:00:00, means this config is not effective.
1 01:00:00-02:00:00, means this config is effective between 01:00:00 and 02:00:00
4.3VideoInOptions
4.3.1 GetVideoInputCaps
4.3.2 GetVideoInOptionsConfig
19
head.FlashControl.Mode=0
head.FlashControl.Pole=0
head.FlashControl.Value=0
head.FlashControl.PreValue=0
head.Flip=false
head.Gain=50
head.GainAuto=true
head.IrisAuto=false
head.Mirror=false
head.NightOptions.AntiFlicker=0
head.NightOptions.Backlight=0
head.NightOptions.BacklightRegion[0]=3096
head.NightOptions.BacklightRegion[1]=3096
head.NightOptions.BacklightRegion[2]=5096
head.NightOptions.BacklightRegion[3]=5096
head.NightOptions.BrightnessThreshold=50
head.NightOptions.DayNightColor=2
head.NightOptions.ExposureMode=0
head.NightOptions.ExposureSpeed=0
head.NightOptions.ExposureValue1=0
head.NightOptions.ExposureValue2=40
head.NightOptions.ExternalSyncPhase=125
head.NightOptions.Flip=false
head.NightOptions.Gain=50
head.NightOptions.GainAuto=true
head.NightOptions.GainBlue=50
head.NightOptions.GainGreen=50
head.NightOptions.GainMax=50
head.NightOptions.GainMin=0
head.NightOptions.GainRed=50
head.NightOptions.GlareInhibition=0
head.NightOptions.IrisAuto=true
head.NightOptions.Mirror=false
head.NightOptions.Profile=3
head.NightOptions.ReferenceLevel=50
head.NightOptions.Rotate90=0
head.NightOptions.SunriseHour=0
head.NightOptions.SunriseMinute=0
head.NightOptions.SunriseSecond=0
head.NightOptions.SunsetHour=23
head.NightOptions.SunsetMinute=59
head.NightOptions.SunsetSecond=59
head.NightOptions.SwitchMode=4
head.NightOptions.WhiteBalance=Auto
head.NightOptions.WideDynamicRange=0
20
head.NightOptions.WideDynamicRangeMode=0
head.NormalOptions.AntiFlicker=0
head.NormalOptions.Backlight=0
head.NormalOptions.BacklightRegion[0]=3096
head.NormalOptions.BacklightRegion[1]=3096
head.NormalOptions.BacklightRegion[2]=5096
head.NormalOptions.BacklightRegion[3]=5096
head.NormalOptions.BrightnessThreshold=50
head.NormalOptions.DayNightColor=1
head.NormalOptions.ExposureMode=0
head.NormalOptions.ExposureSpeed=0
head.NormalOptions.ExposureValue1=0
head.NormalOptions.ExposureValue2=40
head.NormalOptions.ExternalSyncPhase=125
head.NormalOptions.Flip=false
head.NormalOptions.Gain=50
head.NormalOptions.GainAuto=true
head.NormalOptions.GainBlue=50
head.NormalOptions.GainGreen=50
head.NormalOptions.GainMax=50
head.NormalOptions.GainMin=0
head.NormalOptions.GainRed=50
head.NormalOptions.GlareInhibition=0
head.NormalOptions.IrisAuto=true
head.NormalOptions.Mirror=false
head.NormalOptions.Profile=0
head.NormalOptions.ReferenceLevel=50
head.NormalOptions.Rotate90=0
head.NormalOptions.SunriseHour=0
head.NormalOptions.SunriseMinute=0
head.NormalOptions.SunriseSecond=0
head.NormalOptions.SunsetHour=23
head.NormalOptions.SunsetMinute=59
head.NormalOptions.SunsetSecond=59
head.NormalOptions.SwitchMode=0
head.ReferenceLevel=50
head.ReferenceLevelEnable=false
head.Rotate90=0
head.SignalFormat=BT656
head.WhiteBalance=Disable
Comment In above table, head = table.VideoInOptions[ChannelNo]
ChannelNo = video channel index.
21
4.3.3 SetVideoInOptionsConfig
22
0: AutoExposure
1-n-1: manual Exposure grade
n: AutoExposure with time limit.
n+1:manualExposure with user-defined time
(n is supported maximum exposure grade )
head.ExposureValue1 float Range is [0.1-80], unit is millisecond
If ExposureSpeed is 0(AutoExposure enable), it’s lower limit of AutoExposure
time, otherwise it’s time of manualExposure
head.ExposureValue2 float Range is [0.1-80], unit is millisecond
Upper limit of AutoExposure time, should be bigger than ExposureValue1
head.ExternalSync integer Range is {0,1}
External Synchronous
0: Internal Synchronization
1: External Synchronous
head.ExternalSyncPhase integer Range is [0°-360°]
External Synchronous Signal Phase
head.FlashControl.Mode integer Range is {0,1,2}
0:forbid flash
1:always flash
2:auto flash
head.FlashControl.Pole integer Range is {0,1, 2, 3}
Trigger mode:
0:low level
1:high level
2: rising-edge
3:falling-edge
head.FlashControl.Value integer Range is [0-15]
Flashlight time-unit:
0 - 0us,
1 - 64us,
2 - 128us,
3 – 192us
...
15 - 960us
head.FlashControl.PreValue integer Range is [0-100]
It’s threshold of brightness value, if brightness is less than this value, flash light
begin to work.
head.Flip bool true: enable video flip function
false: disable video flip function
head.Gain integer Range is [0-100]
If GainAuto is true, it’s upper limit of auto gain, else it’s the fixed gain adjust
value.
head.GainBlue integer Range is [0-100]
Gain for blue value, Value is effective when WhiteBalance is “Custom.”
head.GainRed integer Range is [0-100]
23
Gain for red value, Value is effective when WhiteBalance is “Custom.”
head.GainGreen integer Range is [0-100]
Gain for green value, Value is effective when WhiteBalance is “Custom.”
head.GainAuto bool true: GainAuto
false: No GainAuto
head.IrisAuto bool true: IrisAuto
false: No IrisAuto
head.Mirror bool true: enable video mirror function
false: disable video mirror function
head.WhiteBalance String Range is {Disable, Auto, Custom, Sunny, Cloudy, Home, Office, Night}
White balance Mode
head.ReferenceLevel integer Range is [0-100]
The expected average brightness level of video frames.
head.Rotate90 integer Range is {0,1,2}
Video rotation:
0: No rotate
1: clockwise rotate 90°
2: anticlockwise rotate 90°
head.SignalFormat String Range is {Inside, BT656, 720p, 1080p, 1080i, 1080sF}
Input Signal Mode
head.AntiFlicker integer Range is {0,1,2}
AntiFlicker mode:
0: Outdoor
1: 50 Hz AntiFlicker
2: 60 Hz AntiFlicker
head.GlareInhibition integer Range is [0-100]
GlareInhibition:
0: Close GlareInhibition.
head.NightOptions.BrightnessThreshold integer NightOptions contain a set of parameters used when brightness is not enough.
Range is [0-100]
when brightness is less than the BrightnessThreshold, parameters change to
Nightoptions.
head.NightOptions.IrisAuto bool true: IrisAuto
false: No IrisAuto
head.NightOptions.SunriseHour integer Range is [00-23]
Sunrise hour.
head.NightOptions.SunriseMinute integer Range is [00-59]
Sunrise minute
head.NightOptions.SunriseSecond integer Range is [00-59]
Sunrise second
head.NightOptions.SunsetHour integer Sunset time. Its range is same with sunrise time, and it should be after sunrise
head.NightOptions.SunsetMinute integer time.
head.NightOptions.SunsetSecond integer NightOptions are used if time is after sunset time and before sunrise time.
head.NightOptions.SwitchMode integer Range is {0,1,2}
0: NoSwitch,always use day options;
24
1: Switch depends on brightness;
2: Switch depends on time, switch to NightOptions when time is after sunset
time and before sunrise.
3: NoSwitch,always use NightOptions;
4:No switch,always use NormalOptions.
head.NightOptions.Profile integer Range is {0,1,2,3}
0: use temporary day options;
1: use temporary NightOptions;
2: use temporary NormalOptions;
3:depends on head.NightOptions.SwitchMode.
head.NightOptions.ExposureSpeed integer Range is the same as relevant items of day options in this table.
head.NightOptions.ExposureValue1 float Example:
head.NightOptions.ExposureValue2 float Value range of head.NightOptions.ExposureSpeed is the same with
head.NightOptions.Gain integer head. ExposureSpeed
head.NightOptions.GainAuto bool
head.NightOptions.GainBlue integer
head.NightOptions.GainGreen integer
head.NightOptions.GainRed integer
head.NightOptions.WhiteBalance String
head.NightOptions.ReferenceLevel integer
head.NightOptions.ExternalSyncPhase integer
head.NightOptions.AntiFlicker integer
head.NightOptions.Backlight integer
head.NightOptions.DayNightColor integer
head.NightOptions.ExposureMode integer
head.NightOptions.GlareInhibition integer
head.NightOptions.Mirror integer
head.NightOptions.Flip integer
head.NightOptions.Rotate90 integer
head.NomalOptions.BrightnessThreshold integer NomalOptions contain a set of parameters similar with NightOptions.
head.NormalOptions.IrisAuto bool Range is the same as relevant items of NightOptions in this table.
head.NormalOptions.SunriseHour integer
head.NormalOptions.SunriseMinute integer
head.NormalOptions.SunriseSecond integer
head.NormalOptions.SunsetHour integer
head.NormalOptions.SunsetMinute integer
head.NormalOptions.SunsetSecond integer
head.NormalOptions.ExposureSpeed integer
Head.NormalOptions.ExposureValue1 float
head.NormalOptions.ExposureValue2 float
head.NormalOptions.Gain integer
head.NormalOptions.GainAuto bool
head.NormalOptions.GainBlue integer
head.NormalOptions.GainGreen integer
25
head.NormalOptions.GainRed integer
head.NormalOptions.WhiteBalance String
head.NormalOptions.ReferenceLevel integer
head.NormalOptions.ExternalSyncPhase integer
head.NormalOptions.AntiFlicker integer
head.NormalOptions.Backlight integer
head.NormalOptions.DayNightColor integer
head.NormalOptions.ExposureMode integer
head.NormalOptions.GlareInhibition integer
head.NormalOptions.Mirror integer
head.NormalOptions.Flip integer
head.NormalOptions.Rotate90 integer
4.4VideoEncode
4.4.1 GetVideoConfigCaps
26
SnapType:
0 = regular snapshot
1 = motion detection snapshot
2 = alarm snapshot
4.4.2 Resolution
4.4.3 GetVideoEncodeConfig
28
2 = extra stream 3
4.4.4 SetVideoEncodeConfig
29
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
4.5AudioEncode
4.5.1 GetAudioConfigCaps
4.5.2 GetAudioEncodeConfig
4.5.3 SetAudioEncodeConfig
31
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
head.AudioEnable bool Enable/Disable audio
4.6 SnapEncode
4.6.1 GetSnapConfigCaps
4.6.2 GetSnapEncodeConfig
4.6.3 SetSnapEncodeConfig
33
6: best quality
head.VideoEnable bool True: enable video
4.7ChannelTitle
4.7.1 GetChannelTitleConfig
4.7.2 SetChannelTitleConfig
4.8VideoStandard
4.8.1 GetVideoStandardConfig
4.8.2 SetVideoStandardConfig
34
Comment
Response OK or ERROR
4.9VideoWidget
4.9.1 GetVideoWidgetConfig
35
4.9.2 SetVideoWidgetConfig
VideoWidgetConfig contains cover region settings, channel title settings and time title settings.
The italics below will be replaced by the above abbreviations.
Response OK or ERROR
36
headChannelTitle.FrontColor[3]
headChannelTitle.Rect[0] integer Only use the value of (left,top),the value of (right,bottom) is the same
headChannelTitle.Rect[1] as (left,top)
headChannelTitle.Rect[2] Rect[0], Rect[1] are used, and Rect[2] must be same with Rect[0],
headChannelTitle.Rect[3] Rect[3] must be same with Rect[1].
headTimeTitle.BackColor[0] integer Range is the same with headChannelTitle
headTimeTitle.BackColor[1] These are configs about time title.
headTimeTitle.BackColor[2]
headTimeTitle.BackColor[3]
headTimeTitle.EncodeBlend bool
headTimeTitle.FrontColor[0] integer
headTimeTitle.FrontColor[1]
headTimeTitle.FrontColor[2]
headTimeTitle.FrontColor[3]
headTimeTitle.Rect[0] integer
headTimeTitle.Rect[1]
headTimeTitle.Rect[2]
headTimeTitle.Rect[3]
headTimeTitle.ShowWeek bool True: Display week within the time title.
headCustomTitle.BackColor[0] integer Range is the same with headCover
headCustomTitle.BackColor[1]
headCustomTitle.BackColor[2]
headCustomTitle.BackColor[3]
headCustomTitle.EncodeBlend bool
headCustomTitle.FrontColor[0] integer
headCustomTitle.FrontColor[1]
headCustomTitle.FrontColor[2]
headCustomTitle.FrontColor[3]
headCustomTitle.Rect[0] integer Range is [0-8191].
headCustomTitle.Rect[1] Rect[0]:top left corner x coordinate (left)
headCustomTitle.Rect[2] Rect[1]:top left corner y coordinate (top)
headCustomTitle.Rect[3] Rect[2]:bottom right x coordinate (right)
Rect[3]:bottom right y coordinate (bottom).
PTZPreset.BackColor[0] integer Range is the same with headCover
PTZPreset.BackColor[1]
PTZPreset.BackColor[2]
PTZPreset.BackColor[3]
PTZPreset.EncodeBlend bool
PTZPreset.FrontColor[0] integer
PTZPreset.FrontColor[1]
PTZPreset.FrontColor[2]
PTZPreset.FrontColor[3]
PTZPreset.Rect[0] integer Range is [0-8191].
PTZPreset.Rect[1] Rect[0]:top left corner x coordinate (left)
PTZPreset.Rect[2] Rect[1]:top left corner y coordinate (top)
37
PTZPreset.Rect[3] Rect[2]:bottom right x coordinate (right)
Rect[3]:bottom right y coordinate (bottom).
4.10VideoIn
4.10.1 getCollect
4.11VideoOut
4.11.1 GetVideoOutConfig
4.11.2 SetVideoOutConfig
38
ParamName ParamValue type Description
head.Margin[0] integer Margin
head.Margin[1]
head.Margin[2]
head.Margin[3]
head.Color.Brightness integer Brightness
head.Color.Contrast =50 integer Contrast
head.Color.Satuation =50 integer Satuation
head.Color.Hue =50 integer Hue
head.Mode.Width =800 integer Resolution
head.Mode.Height=600
head.Mode.BPP =16 integer
head.Mode.Format =”Auto” string The range is {“Auto”, “TV”, “VGA”, “DVI”}
head.Mode.RefreshRate =60 integer Refresh rate.
4.12FlashLight
4.12.1 GetFlashLightConfig
4.12.2 SetFlashLightConfig
39
ts (time section) range is [0-23], it’s index of timesection table.
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.
5.NetWork
5.1NetInterfaces
5.1.1 GetInterfaces
40
5.2BasicConfig
5.2.1 GetBasicConfig
5.2.2 SetBasicConfig
41
Example:
00:10:5c:f2:1c:b4
00:10:5C:F2:1C:B5
Network.interface.SubnetMask string Network mask string:
In the form of x.x.x.x, range of x is [0-255]
Example:
255.255.255.0
5.3PPPoE
5.3.1 GetPPPoEConfig
5.3.2 SetPPPoEConfig
5.4DDNS
5.4.1 GetDDNSConfig
42
Response table.DDNS[index].Address=www.dahuatech.com
table.DDNS[index].Enable=true
table.DDNS[index].HostName=www.dahuatech.com
table.DDNS[index].KeepAlive=10
table.DDNS[index].Password=none
table.DDNS[index].Port=5050
table.DDNS[index].Protocol= Quick DDNS
table.DDNS[index].UserName=user1
table.DDNS[index].DefaultHostName.Enable=false
table.DDNS[index].DefaultHostName.HostName=9002A9D77133.quickddns.com
5.4.2 SetDDNSConfig
43
5.5Email
5.5.1 GetEmailConfig
5.5.2 SetEmailConfig
44
Email.Port integer Range is [1-65535]
Email.Receivers[0] string Email addresses of 3 receivers.
Email.Receivers[1] string
Email.Receivers[2] string
Email.SendAddress string Sender email address.
Email.SslEnable bool True: enable SSL email.
Email.Title string Title of email.
Email.UserName string User name of email account.
5.6Wlan
5.6.1 GetWlanConfig
5.6.2 SetWlanConfig
45
WPA-PSK-TKIP, WPA-PSK-CCMP}
Encryption mode.
WLan.interface.KeyFlag bool true: key is configured.
WLan.interface.KeyID integer Range is [0-3]
Indicates which key is used.
0 : WLan.interface.Keys[0] is used.
WLan.interface.KeyType string Range is {Hex, ASCII]
WLan.interface.Keys[0] string For ASCII key type: 64bits encryption key length is 5,
WLan.interface.Keys[1] string 128bits encryption key length is 13, consists of [0-9,
WLan.interface.Keys[2] string a-z, A-Z]
WLan.interface.Keys[3] string
For HEX key type: 64bits encryption key length is 10,
128bits encryption key length is 26, consists of [0-9,
a-z, A-Z]
WLan.interface.LinkMode string Range is {Auto, Ad-hoc, Infrastructure}.
Auto – select suitable mode automatically.
Ad-hoc – Device with wireless network adapter can
connect to each other without Access Point.
Infrastructure – Integrate wire and wireless LAN
together to share network resource, access point is
need in this mode.
WLan.interface.SSID string
5.6.3 ScanWlanDevices
46
5.7UPnP
5.7.1 GetUPnPConfig
5.7.2 SetUPnPConfig
5.7.3 GetUPnPStatus
47
Response rsult=1
5.8NTP
5.8.1 GetNTPConfig
5.8.2 SetNTPConfig
5.9RTSP
5.9.1 GetRTSPConfig
5.9.2 SetRTSPConfig
49
ParamName ParamValue type Description
RTSP.Enable bool Enable/Disable RTSP.
RTSP.Port integer RTSP port.
RTSP.RTP.StartPort integer RTP start port.
RTSP.RTP.EndPort integer RTP end port.
5.10Telnet
5.10.1 GetTelnetConfig
5.10.2 SetTelnetConfig
6.Events
6.1EventHandler
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.
6.1.1 GetEventHandler
50
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
51
handlerName.EventHandler. ExAlarmOutEnable=true
handlerName. ExAlarmOutChannels[0] =2
handlerName.ExAlarmOutChannels[1]=3
…
6.1.2 SetEventHandler
52
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.
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
6.2Alarm
6.2.1 GetAlarmConfig
53
6.2.2 SetAlarmConfig
6.2.3 GetAlarmOutConfig
6.2.4 SetAlarmOutConfig
54
6.2.5 GetInSlots
6.2.6 GetOutSlots
6.2.7 GetInState
6.2.8 GetOutState
6.2.9 GetChannelInState
55
Response result=1
6.2.10 GetChannelOutState
6.3MotionDetect
6.3.1 GetMotionDetectConfig
6.3.2 SetMotionDetectConfig
56
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
57
6.4BlindDetect
6.4.1 GetBlindDetectConfig
6.4.2 SetBlindDetectConfig
6.5LossDetect
6.5.1 GetLossDetectConfig
6.5.2 SetLossDetectConfig
58
Comment Channel: video channel number
Head = BlindDetect[Channel]
Response OK or ERROR
6.6LoginFailureAlarm
6.6.1 GetLoginFailureAlarmConfig
6.6.2 SetLoginFailureAlarmConfig
6.7 StorageAbnormal
6.7.1 GetStorageNotExistConfig
59
6.7.2 SetStorageNotExistConfig
6.7.5 GetStorageLowSpaceConfig
6.7.6 SetStorageLowSpaceConfig
6.8 NetAbnormal
6.8.1 GetNetAbortConfig
6.8.2 SetNetAbortConfig
6.8.3 GetIPConflictConfig
6.8.4 SetIPConflictConfig
61
ParamName ParamValue type Description
IPConflict.Enable bool Enable/Disable loss detect feature.
6.9 GetEventIndexes
(This response means event happened on channel 0, channel 2, and channel 3.)
6.10 Attach
62
ParkingDetection: parking detection event
MoveDetection: fast moving 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.
HeatImagingTemper: temperature alarm event
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
63
-- myboundary \r\n
…
7.PTZ
7.1PTZConfig
7.1.1 GetPTZConfig
7.1.2 SetPTZConfig
64
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.
7.1.3 GetPtzAutoMovementConfig
7.1.4 SetPtzAutoMovementConfig
65
Response OK or ERROR
7.2PTZControl
7.2.1 GetProtocolList
7.2.2 GetCurrentProtocolCaps
66
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
67
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
68
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: Argument of link 0
input channel. 1: 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
69
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°
7.3PTZStatus
70
8.RecordSnap
8.1Record
8.1.1 GetRecordConfig
8.1.2 SetRecordConfig
71
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.).
8.1.3 GetRecordModeConfig
8.1.4 SetRecordModeConfig
8.2Snap
8.2.1 GetSnapConfig
72
8.2.2 SetSnapConfig
8.2.3 attachFileProc
73
Events[0].TrafficCar.PlateNumber=浙 A12345
Events[0].TrafficCar. DeviceAddress=杭州
……
Events[1].Code=TrafficJunction
……
--<boundary>
Content-Type:image/jpeg
Content-Length:<image size>
<JPEG image data>
--<boundary>
8.3MediaGlobal
8.3.1 GetMediaGlobalConfig
8.3.2 SetMediaGlobalConfig
8.4Holiday
8.4.1 GetHolidayConfig
74
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
8.4.2 SetHolidayConfig
9.System
9.1General
9.1.1 GetGeneralConfig
75
9.1.2 SetGeneralConfig
9.2SystemTime
9.2.1 GetCurrentTime
9.2.2 SetCurrentTime
9.3Locales
9.3.1 GetLocalesConfig
76
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
9.3.2 SetLocalesConfig
77
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.
Example:
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
9.4Language
9.4.1 GetLanguageCaps
9.4.2 GetLanguageConfig
78
9.4.3 SetLanguageConfig
9.5AccessFilter
9.5.1 GetAccessFilterConfig
9.5.2 SetAccessFilterConfig
79
9.6AutoMaintain
9.6.1 GetAutoMaintainConfig
9.6.2 SetAutoMaintainConfig
80
9.7UserManager
9.7.1 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.
9.7.2 GetGroupInfo
9.7.3 GetGroupInfoAll
9.7.4 AddUser
9.7.5 DeleteUser
9.7.6 ModifyUser
9.7.7 ModifyPassword
82
9.7.8 GetUserInfo
9.7.9 GetUserInfoAll
9.7.10 GetActiveUserInfoAll
83
9.8System Operation
9.8.1 Reboot
9.8.2 Shutdown
9.8.3 GetDeviceType
9.8.4 GetHardwareVersion
9.8.5 GetSerialNo
9.8.6 GetMachineName
84
9.8.7 GetSystemInfo
9.8.8 GetVendor
9.8.9 GetSoftwareVersion
9.8.10 GetOnvifVersion
9.8.11 getUUID
85
9.9 Log
9.9.1 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
9.9.2 DoFind
86
9.9.3 StopFind
9.9.4 Clear
9.10 UserGlobal
9.10.1 GetUserGlobalConfig
9.10.2 SetUserGlobalConfig
9.11 IntervideoManager
9.11.1 GetCGIVersion
87
9.12 ConfigRestore
9.12.1 Restore
9.12.1 RestoreExcept
10.Storage
10.1.1 Create
10.1.2 StartFind
10.1.3 FindNextFile
89
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
10.1.4 Close
10.1.5 Destroy
10.2.1 GetStorageDeviceCollect
10.2.2 getDeviceAllInfo
90
list[0].Pointer=22347602
list[0].State=Success
10.2.3 setStorageDevice
10.2.4 getCaps
10.3.1 GetWorkGroupCollect
91
10.4 Work Directory
10.4.1 GetWorkDirectoryCollect
10.5 NAS
10.5.1 GetNASConfig
10.5.2 SetNASConfig
92
Head .Port integer NAS port.
Head.UserName string NAS username.
Head .Password string NAS password.
Head .Directory string Directory name.
10.6.1 GetRecordStoragePointConfig
10.6.2 SetRecordStoragePointConfig
93
local directory or not.
RecordStoragePoint [ch].[recType]. CompressBefore integer How many days data will be compressed.
10.6.3 GetStorageGroupConfig
10.6.4 SetStorageGroupConfig
11.Audio
MIME Description
Audio/PCM
Audio/ADPCM
Audio/G.711A
Audio/G.711Mu
94
Audio/G.726
Audio/G.729
Audio/MPEG2
Audio/AMR
Audio/AAC
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>
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
95
Content-Length: 800
<Audio data>
--<boundary>
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>
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:
96
HTTP Code: 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800
<Audio data>
--<boundary>
11.4.1 getCollect
11.5.1 getCollect
12.Appendix
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
Order
97
Key Flag Type reserved packet length
Byte
8 9 10 11 12 13 14 15
Order
Extend header
Key channel Sequence
length
Byte
16 17 18 19 20 21 22 23
Order
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;
Byte
0 1 2 3 4 5 6 …
Order
Byte
0 1 2 3 4 5 6 7
Order
Audio Sample
Key 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;
Byte
0 1 2 3 4 5 6 7
Order
98
Video Frame
Key 0x21 16 reserved Width
Type Type
Byte
8 9 10 11 12 13 14 15
Order
I Frame Frame
Key Height 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;
Byte
0 1 2 3 4 5 6 …
Order
Byte
0 1 2 3 4 5 6 7
Order
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 …
Order
99
13.VedioInput
13.1 AdjustFocus
13.2 AdjustFocusContinuously
13.3 AutoFocus
13.4 GetFocusStatus
100
Response status.Focus=0.5
status.Zoom=0.5
status.Status=Normal
14. SD Camera
This chapter is only effective with SD Camera.
14.1 VideoInWhiteBalance
14.1.1 GetVideoInWhiteBalance
14.2.2 SetVideoInWhiteBalance
101
ParamName ParamValue Description
type
head. Mode integer “Auto”,“Indoor", "Outdoor", "ATW", "Manual", "AutoOutdoor"
head. GainRed integer Range is 0-100
14.2 VideoInFocus
14.2.1 GetVideoInFocus
14.2.2 SetVideoInFocus
102
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
14.3 VideoInZoom
14.3.1 GetVideoInZoom
14.3.2 SetVideoInZoom
103
14.4 VideoInSharpness
14.4.1 GetVideoInSharpness
14.4.2 SetVideoInSharpness
14.5 VideoInRotate
14.5.1 GetVideoInRotate
104
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
14.5.2 SetVideoInRotate
14.6 VideoInMode
14.6.1 GetVideoInMode
14.6.2 SetVideoInMode
Response OK or ERROR
15. VideoAnalyse
This chapter is only effective with smart IP Camera.
15.1 VideoAnalyseRule
15.1.1 GetVideoAnalyseRule
15.1.2 SetVideoAnalyseRule
107
RuleNo =rule index.
ParamName starts with head.Config is only effective with {“CrossLineDetection”, “CrossRegionDetection”, “LeftDetection”,
“TakenAwayDetection”}
Response OK or ERROR
108
15.2 VideoWidgetNumberStat
15.2.1 GetVideoWidgetNumberStat
15.2.2 SetVideoWidgetNumberStat
15.3 VideoEncodeROI
15.3.1 GetVideoEncodeROI
109
15.3.2 SetVideoEncodeROI
15.4 VideoStatServer
15.4.1 GetSummary
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=0
15.4.2 StartFind
110
Example:
Find VideoStat info between 2011-1-1 12:00:00 and 2011-1-10 12:00:00,information granularity is hour URL is:
http://<ip>/cgi-bin/videoStatServer.cgi?action=startFind&channel=0&condition.StartTime=2011-1-1 12:00:00
&condition.EndTime=2011-1-10 12:00:00&condition.Granularity=Hour
Response token=1
totalCount=14
15.4.3 DoFind
15.4.4 StopFind
111
112
16 TrafficSnap
16.1 getParkingSpaceStatus
URL http://<ip>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&channel=<channelNo>&<paramName>=<paramValue>[&<pa
Syntax ramName>=<paramValue>...]
Descripti Get specific parking space(s) status
on For example If want to get all parking space status, the url is
http://<ip>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus& condition.Lane[0]=0 & condition.Lane[1]=255
Response A list of parking space status
status[0].Lane=0
status[0].PictureId=5
status[0].TrafficCar.CountInGroup=1
…
status[1].Lane=1
status[1].PictureId=4
status[1].TrafficCar.CountInGroup=1
…
Comment Param :
channelNo :the index of trafficSnap channel
index : The index of type array,start from 0
TrafficCar : the members refer to TrafficCar
17 TrafficParking
17.1 getAllParkingSpaceStatus
113
Response A list of parking space status
status[0].Lane=0
status[0]. CustomParkNo = A2701
status[0].Status = Park
…
status[1].Lane=1
status[1]. Status = NoPark
…
Comment Param :
Status: Park or NoPark
18 VideoDetect
18.1 getCaps
114
19 RadiometryManager
19.1.1 GetHeatImagingThermometryConfig
Response table.RelativeHumidity = 50
table.AtmosphericTemperature =20
table.ObjectEmissivity =1
table.ObjectDistance =100
table.ReflectedTemperature=20
table.TemperatureUnit= Centigrade
table.Isotherm.Enable=true
table.Isotherm.MaxValue=50
table.Isotherm.MinValue=0
table.Isotherm.ColorBarDisplay=true
table.HotSpotFollow=true
table.TemperEnable=true
19.1.2 SetHeatImagingThermometryConfig
Response OK or ERROR
115
HeatImagingThermometry.AtmosphericTemperature float The AtmosphericTemperature range and step
interface in getCaps
Unit is meter.
HeatImagingThermometry.ReflectedTemperature float The ReflectedTemperature range and step are
19.1.3 GetThermometryRuleConfig
116
head.T=3
head.Alarm. Id=0
head.Alarm. Enable=true
head.Alarm. Result =Max
head.Alarm. AlarmCondition=Below
head.Alarm. Threshold=20.0
head.Alarm. Hysteresis=0.1
head.Alarm. Duration=30
head.LocalParameters.Enable=true
head.LocalParameters. ObjectEmissivity=0.95
head.LocalParameters. ObjectDistance=0.95
head.LocalParameters. RefalectedTemp=0
19.1.4 SetThermometryRuleConfig
117
head.Alarm.Id integer Ranger[0- 65535],unique alarm id
head.Alarm.Enable bool Enable/Disable
head.Alarm.Result string Depend on the vaule of Type
Spot : {Vaule}
Line:{ Max,Min,Aver}
Area:{Max,Min,Aver,Std,Mid,ISO}
head.Alarm. AlarmCondition string Ranger is {Below, Match , Above }
head.Alarm. Threshold float Alarm threshold
head.Alarm. Hysteresis float Alarm hysteresis
head.Alarm. Duration integer The duration time of alarm.
Unit is second
head.LocalParameters.Enable bool Enable/Disable
Head. LocalParameters. ObjectEmissivity float Ranger[0 -1]
Accuracy is 0.01
head.LocalParameters. ObjectDistance float Object distance
The range get from interface in getCaps
Head. LocalParameters. ReflectedTemp float Object Reflected Temperature
The range get from interface in getCaps
19.1.5 GetHeatImagingTemperConfig
19.1.6 SetHeatImagingTemperConfig
118
Response OK or ERROR
19.2 getCaps
119
caps.MeterInfo. AtmosphericTemperature.Step=1
caps.Statistics. MinPeriod=60
caps.Isotherm.MaxTemp=327.0
caps.Isotherm.MinTemp=-20.0
19.3 getRandomPointTemper
Response TempInfo.Type=Spot
TempInfo.TemperAver=27.5
19.4 getTemper
Response TempInfo.Type=Spot
TempInfo.TemperAver=27.5
120
condition.Type string Range is {Spot, Line,Area}
condition.Name string Name is get from interface in
GetThermometryRuleConfig
20 ThermographyManager
20.1.1 getThermographyOptionsConfig
Response head.EZoom=0
head.Colorization=White Hot
head.SmartOptimizer=10
head.OptimizedRegion. Type=Custom
head.OptimizedRegion. Enable= true
head.OptimizedRegion. Regions[i][0u]=0
head.OptimizedRegion. Regions[i][1u]=0
head.OptimizedRegion. Regions[i][2u]=0
head.OptimizedRegion. Regions[i][3u]=0
head.Agc=10
head.AgcMaxGain=10
head.AgcPlateau=10
head.Mode=”HighTemperature”
head.Auto.LowToHigh=13
head.Auto.LHROI=15
head.Auto.HighToLow=12
head.Auto.HLROI=95
121
20.1.2 setThermographyOptionsConfig
122
20.2 getExternSystemInfo
Param out:
SerialNumber : string
SoftwareVersion: string
FirmwareVersion: string
LibVersion : string
For example:
http://<ip>/cgi-bin/ ThermographyManager.cgi?action=getExternSystemInfo &channel=1
Response sysInfo. SerialNumber = 11111111123
20.3 getPresetParam
For example:
http://<ip>/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=1&mode=”Default”
Response presetInfo.Brightness = 50
presetInfo.Sharpness= 50
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
presetInfo.SmartOptimizer= 10
presetInfo.OptimizedRegion. Regions[i][0u]=0
presetInfo.OptimizedRegion. Regions[i][1u]=0
presetInfo.OptimizedRegion. Regions[i][2u]=0
presetInfo.OptimizedRegion. Regions[i][3u]=0
123
presetInfo.Agc= 10
presetInfo.AgcMaxGain=10
presetInfo.AgcPlateau = 10
20.4 getCaps
Param out:
PresetModes : the preset mode. Range is { "Low Contrast", "High Contrast", "Default" }
"Ironbow1","Ironbow2","Sepia","Color1","Color2","Icefire","Rain","RedHot","GreenHot"}.
PresetROIModes : Preset ROI mode。Range is {"Full Screen","Sky", "Ground", "Horizontal",
caps.Brightness.Max = 100
caps.Brightness.Min = 0
caps.Brightness.Step = 1
caps.Sharpness.Max= 100
caps.Sharpness.Min = 0
caps.Sharpness.Step = 5
caps.EZoom.Max= 24
caps.EZoom.Min = 0
caps.EZoom.Step = 1
caps. ThermographyGamma.Max= 8
caps. ThermographyGamma.Min = -8
caps. ThermographyGamma.Step = 1
caps. SmartOptimizer.Min = 0
caps. SmartOptimizer.Step = 5
caps. Agc.Min = 0
caps. Agc.Step = 5
caps. AgcMaxGain.Min = 0
124
caps. AgcMaxGain.Step = 5
caps. AgcPlateau.Min = 0
caps. AgcPlateau.Step = 5
caps.PresetColorization[i]= Ironbow2
20.5 getOptimizedRegion
For example:
http://<ip>/cgi-bin/ThermographyManager.cgi?action= getOptimizedRegion &channel=1
Response optimizedRegion.Type= Full Screen
optimizedRegion.Enable= true
optimizedRegion.Regions[i][0u]=0
optimizedRegion.Regions[i][1u]=0
optimizedRegion.Regions[i][2u]=0
optimizedRegion.Regions[i][3u]=0
20.6 enableShutter
125
21 HeatMap
21.1 getPicByTime
126