海康威视摄像头HTTP接口能力调研报告

上传人:jin****ng 文档编号:172976681 上传时间:2022-12-08 格式:DOCX 页数:16 大小:193.58KB
收藏 版权申诉 举报 下载
海康威视摄像头HTTP接口能力调研报告_第1页
第1页 / 共16页
海康威视摄像头HTTP接口能力调研报告_第2页
第2页 / 共16页
海康威视摄像头HTTP接口能力调研报告_第3页
第3页 / 共16页
资源描述:

《海康威视摄像头HTTP接口能力调研报告》由会员分享,可在线阅读,更多相关《海康威视摄像头HTTP接口能力调研报告(16页珍藏版)》请在装配图网上搜索。

1、目录1. 前言本次从海康租借了一台硬盘录像机、一个枪机和一个球机。由于对方HTTP告警消息模块有BUG, 调测花费时间较长。对方提供升级测试版本后已经解决。从目前的进展情况看基本完成了我们的预 期目标。主要常用功能均已验证通过,包括:视频监控(VLC插件方式)、录像回放、读取设备信 息、设备重启、图像抓拍、告警通知、云台控制。本次报告主要目的是记录相关功能具体实现和验 证的方式方法及注意事项。2. 部署情况租借的三台设备均部署在五层实验室,通过无线路由器连接到公司网络。1)账号信息设备类型设备型号IP 地址管理账号密码枪机DS-2CD2T20-I3adminNuctech123录相机DS-86

2、08N-E8adminNuctech123球机DS-2DE7184-AadminNuctech1232)设备部署&端口映射柚机砸像头CIPO192. Hi. ill. Mb a dm i n.-uct网络摄相机(NVR)111. 11L. 237a dm: n/tuct cch 123五樓实验室无线路由器 内:192. I I I. LI 1.220 夕卜=192. 16& 25.6端口映射1 PC; 8000- 10C00,554-10010, 8(b 1.0020NVR: 8000-10001,554-10011,80- 10021IPDr8000 10002,554 10012, 80

3、10022球机摄像头(TPD) mill. 111.234?admin/KuclecP1233)设备配置注意事项IPC和NVR均需要通过修改管理员密码才可以激活,然后接入网络; 录相机(NVR)标准配置都是不带硬盘,所以需要事先准备好SATA硬盘; 录相机(NVR)在接入枪机时,自动识别的设备协议为“海康协议”但实际需要根据说 明书修改为ONVIF才可以,否则会一直报“未知错误“; 枪机(IPC)须另备DC12V圆头电源;设备因为是租借来的,所以不是全新,建议配置调试之前先做出厂设置; 设备默认出厂IP均为:3. 视频监控3.1主码流与字码流主码流与子码流是海康威视提出的概念,是为了解决在网络

4、情况不好时为了满足远程预览 的流畅性,而不影响本地录像提出的双码流技术,主码流分辨率高于子码流,主码流用来录像, 子码流用来网传,默认客户端访问采用主码流,客户可以根据网络情况选择子码流访问,以达 到改善网络浏览的流畅性,而又不改变本地录像的录像效果。3.2 RTSP地址格式(1)摄像头(IPC/IPD)地址格式:username: pwd ip: por t 554/h264/ch1/码流类型/av_s tream码流类型:main表示为主码流,sub表示为子码流举例:IPC主码流:number ,1-32是模拟通道,33以后是IP通道。举例:IPCNVR: 举例:rts p:柜8 亡 rn

5、am 亡:pii 客宫wor胸盅mingZtra cXs怡阳峠育山亡 loi:剛 tu说用P地 Itl : RTSP-n耳.起止旳间: ?3tarttime=12z1701 币门 IL了举阀说明;DS-9016HF-ST购模拟通道01:rt5p;/ad e in ;12345 17.6,22.106; 554/Streami ng/traGk5/101?st3 rtti me- 2O12O8O2tO63&l 2z&en dt ime=20120802t0fr48 lfc DS-901SHFT 的 IP 通道 01:rtsp: /ad min :12145(0172.6.22.106:554/S

6、tKeaming/tracki/l 701 ?starttime-2O131013t093 B12z&e ndtime-20131013t 104816z 衣示队单擢JB式回放指定盘备的通道中的录橡文件,时间也囤是才耳rttimm到电n旳m枣,其中和endtime的格式要符合ISO S601.具律格式是YYYMMDDTHHmm筑f眦ti的“2“,是屯 M是月,0 是日,T是时间分格符H是小时,IV1是分,5是秒,疋是可选的、表示Zulu fGMT)时问“,设备信息和配置推荐使用ISAPI接口,云台控制则推荐使用CGI接口。接口入口地址:,GET表示读取当前信息、PUT表示更新配置、POST表示

7、创建数据、DELETE表 示删除配置。3.3设备信息3. 3. 1基本信息调用地址:/ISAPI/System/deviceInfo返回消息:xml version二encoding二utf-8DeviceInfo xmlns二version二deviceNameIP DOME/deviceNamedeviceIDef947ddl-f70b-nb4-83a0-c056e38ef866/deviceIDdeviceDescriptionIPDome/deviceDescriptiondeviceLocationSTD-CGI/deviceLocationsystemContactSTD-CGI/

8、systemContactmodelDS-2DE7184-A/modelserialNumberDS-2DE7184-ACCCH5/serialNumber macAddressc0:56:e3:8e:f8:66/macAddressfirmwareVersionfirmwareReleasedDatebuild 150129/firmwareReleasedDate encoderVersion/encoderVersionencoderReleasedDatebuild 141009/encoderReleasedDatebootVersionbootReleasedDate100316/

9、bootReleasedDate hardwareVersionOxO/hardwareVersiondeviceTypeIPDome/deviceTypesupportVideoLossfalse/supportVideoLoss/Deviceinfo3.3.2设备状态调用地址:/ISAPI/System/statusxml version二encoding二utf-8DeviceStatus xmlns二version二currentDeviceTime2015-07-30T14:40:27+08:00/currentDeviceTime deviceUpTime185225/device

10、UpTimeCPUListCPUcpuDescriptionARM926EJ-Sid(wb) revision 5 (ARMv5TEJ)/cpuDescription cpuUtilization58/cpuUtilization/CPUListMemoryListMemorymemoryDescriptionDDR Memory/memoryDescription memoryUsage91/memoryUsagememoryAvailable8624/memoryAvailable/MemoryList/DeviceStatus333重启设备调用地址:/ISAPI/System/reboo

11、t3.3.4恢复出厂设置调用地址:/ISAPI/System/factoryDefault调用地址:/ISAPI/Streaming/channels/ID/picture 返回消息:截图本身的二进制数据流3.5告警通知3. 5. 1设置告警开关调用地址:全部配置:/ISAPI/Event/triggersxml version二encoding=utf-8EventNotification xmlns二version二EventTriggerList version二EventTrigger version二 idVMD-l/id eventTypeVMD/eventType eventDe

12、scriptionVMD Event trigger Information/eventDescription EventTriggerNotificationList version二EventTriggerNotificationidcenter/idnotificationMethodcenter/notificationMethodnotificationRecurrencebeginning/notificationRecurrence/EventTriggerNotification/EventTriggerNotificationList /EventTriggerEventTr

13、igger version二idvideolossT/ideventTypevideoloss/eventTypeeventDescriptionVideoloss Event trigger Information/eventDescriptionvideolnputChannelIDl/videoInputChannellDdynVideolnputChannelIDl/dynVideoInputChannellDEventTriggerNotificationList version二/EventTriggerNotificationList /EventTrigger/EventTri

14、ggerList/EventNotification某项配置:/Event/triggers/ID 实际地址:/Event/triggers/VMD-1xml version二encoding=utf-8Eventlrigger xmlns=version二idVMD-1/ideventTypeVMD/eventTypeeventDescriptionVMD Event trigger Information/eventDescriptionEventTriggerNotificationList version二EventTriggerNotificationcenter/idnotific

15、ationMethodcenter/notificationMethodnotificationRecurrencebeginning/notificationRecurrence/EventTriggerNotification/EventTriggerNotificationList/EventTrigger3.5.2配置告警中心告警中心可以理解为一个HTTP服务,具体地址信息配置到设备中,当有告警发生,并告警 通知设置了为通知告警中心,则设备会根据设定间隔向指定的URL地址发送具体告警信息的 XML文。具体配置的写入则通过PUT消息来实现。调用地址:/ISAPI/Eve nt /no t

16、i fica ti on/h tt pHos ts 返回消息:xml version= encoding=utf-8HttpHostNotificationList xmlns= version=”HttpHostNotification version=”1url/ipd-warn/notify/urlprotocolTypeHTTP/protocolTypeparameterFormatTypeXML/parameterFormatTypeaddressingFormatTypeipaddress/addressingFormatType8080userName/httpAuthentic

17、ationMethodnone/httpAuthenticationMethod /HttpHostNotification353告警消息示例POST /ipd-warn/notify HTTP/Content-Type: application/xml; charset二UTF-8Hos t:Connection: Keep-AliveContent-Length: 799xml version二encoding二UTF-8ipAddressX/ipAddressprotocolTypeHTTP/protocolTypemacAddressc4:2f:90:33:f8:36/macAddre

18、sschannelIDl/channelIDdateTime2015-07-29T17:05:46+08:00/dateTimeactivePostCount51/activePostCounteventTypeVMD/eventTypeactive/eventStateeventDescriptionMotion alarm/eventDescriptionExtensions version二xmlns二urn:psialliance-orgserialNumber xmlns=urn:selfextension:psiaext-verl0-xsdDS-2CD2T20T5AACH8/ser

19、ialNumbereventPushxmlns=urn:selfextension:psiaext-verlO-xsdVMD&DS-2CD2T20-I5AACH8,2015-07-29T17:05:46+08:00 ,1,/even tPush/ExtensionsPTZPresetList xmlns= version=PTZPresettrue33 presetName自动翻转/presetName true34 回到零点/presetName true35 presetName巡航扫描 1 true39 白天模式/presetNameenabledtrue/enabledid40/idp

20、resetName黑夜模式/presetNamePTZPresetenabledtrue/enabledid41/idpresetName花样扫描 l/presetName/PTZPresetPTZPresettrue45presetName一 键巡航/presetName /PTZPresetPTZPresettrueid92/idpresetName设置手动限位/presetName /PTZPresetPTZPresetenabledtrue/enabledid93/idpresetName确认手动限位/presetName /PTZPresetPTZPresetenabledtrue/

21、enabledid94/idpresetName远程重启/presetName /PTZPresetPTZPresetenabledtrue/enabledid96/idpresetName停止扫描/presetName /PTZPresetPTZPresetenabledtrue/enabledid97/id 随机扫描/presetName enabledtrue/enabledid98/id 帧扫描/presetName enabledtrue/enabledid99/id 自动扫描/presetName enabledtrue/enabledid100/idpresetName 垂直扫描

22、/presetName/PTZPresetPTZPresetenabledtrue/enabledid101/idpresetName全景扫描/presetName/PTZPresetPTZPresettrueid102/idpresetName巡航扫描 5/PTZPresetPTZPresettrueid106/idpresetName风扇常开模式/presetName/PTZPresetPTZPresetenabledtrue/enabledid107/idpresetName风扇常闭模式/presetName/PTZPresetPTZPresetenabledtrue/enabledid

23、108/idpresetName风扇温控模式/presetName/PTZPreset/PTZPresetList362巡航指令调用地址:/PTZCtrl/channels/ID/presets/ID/goto 举例:全景扫描:value of command is:LIGHT: LightWIPER: WiperFAN: FanHEATER: Heater.AUX1: auxiliary equipment 1.AUX2: auxiliary equipment 2SET_PRESET: Set presetCLE_PRESET: Clear preset.Z00M_IN: Zoom in

24、the specified speed.Z00M_0UT: Zoom out in the specified speed.FOCUS_NEAR: focus near in the specified speed.FOCUS_FAR: focus far in the specified speed.IRIS_OPEN: IRIS is open in the specified speedIRIS_CLOSE: IRIS is cloesd in the specified speedTILT UP: PTZ is tilt up in the specified speedTILT_DO

25、WN: PTZ is tilt down in the specified speedPAN_LEFT: PTZ is pan left in the specified speedPAN_RIGHT: PTZ is pan right in the specified speed UP_LEFT: PTZ is up-left in the specified speed UP_RIGHT: PTZ is up-right in the specified speed DOWN_LEFT: PTZ is down-left in the specified speed DOWN_RIGHT:

26、 PTZ is down-right in the specified speed PAN_AUTO: PTZ scans pan with the specified speed.MEM_PATTERN: memory pattern.RUN_PATTERN: Start pattern.PATROL: patrol.GOTO_PRESET: Go to preset.mode value is start and stop. It indicates the start or stop of some actions for PTZ, or the turn on or turn off

27、of external equipment power for PTZ. The default is start.In addition to the SET_PRESET, CLE_PRESET, RUN_PATTERN and GOTO_PRESET command, all commands require the mode query parameters.speed range is 1-7.When the command is ZOOM_IN, Z00M_0UT, FOCUS_NEAR, FOCUS_FAR, IRIS_OPEN, or IRIS_CLOSE, the defa

28、ult is 1.When the command is TILT_UP, TILT_DOWN, PAN_LEFT, PAN_RIGHT, UP_LEFT, UP_RIGHT, DOWN_LEFT, DOWN_RIGHT, PAN_AUTO, the default is 3.363精确定位调用地址:PTZCtrl/channels/l/continuous 请求消息: 0tilt-80 0 PTZDaM XML BlockPTZData version=:, 1 .CT xnnlnshttpwww. ti ikvision. conrVverl O/XMLScliema !-opt: xs

29、irteger, -100.100- opt; xsirteger, -WO . WO - 4. 遗留问题4.1定位跟踪定位模块提供目标的坐标后,如何通过该位置坐标与摄像头的位置坐标计算出摄像头跟踪 显示该目标所需要调整的角度或相应云台动作的指令参数。4.2合码器NVR 没有将多路视频合并成一路视频的功能,需要单独采购合码器支持合码功能,可以将 多路视频合成一路视频输出。如果没有合码器,只能是一个插件同时只能显示一路视频。5. 附录5.1 VLC Media Player件方式在浏览器中实现视频接入,具体代码如下5.2手机端监控安装海康的手机监控软件(iVMS-4500)即可。APP下载地址:

30、具体配置及效果图由1别名1鱼匚枪机黒蟻采IP/DomainifeJt19Z168,25.6逋口10000用户呂admin|&EE1 (KHPdUEF I盘糙|perrw轉中呂柠动4GQ Q BOO G叩診下牛阴4中国辕站軀“證唱J, tifiT午4:23Q编辑還备()实时倾适Eg1!5.3 DEMO 程序设备安装配置好之后,可以通过海康提供的ClientDemo程序来测试验证。日 mFI I1.11H VFTfl CKlMfHl袒比THiMXill E.W!CilHiiirn m 3 a :r wu-i 邯 w 窕 3rsi x rsi nn sw ran nn适m1ET-E II. JBT

31、U3.E3EH17-m Li 丸 X Ci rS.STh_MDJMriKES 4曲 ISflr-CT II 31 IM TIlTL ilc+JrHDkfMt-li .blCvHri IJBHjr-m I.I .T1 JM TJULvFJ-i m 4jiW:lp!i.urcWKl廿:丰g= r IHEHZVtlTE- E ijFIc 備Mi述町卜. L【国B3 !?5 EL I讣 白.低 pg n “He.I arma T7 RvnlD I. Krrh? Js .5.4 RTSP消息示例OPTIONS RTSP/CSeq: 2User-Agent: LibVLC/ (LIVE555 Stream

32、ing Media 200 OKCSeq: 2Public: OPTIONS, DESCRIBE, PLAY, PAUSE, SETUP, TEARDOWN, SET_PARAMETER, GET_PARAMETERDate: Tue, Jul 14 2015 13:10:15 GMTDESCRIBE RTSP/CSeq: 3User-Agent: LibVLC/ (LIVE555 Streaming Media application/sdpRTSP/ 401 UnauthorizedCSeq: 3WWW-Authenticate: Digest realm=c42f9033f836, no

33、nce=05dff23367cb73d755cf0115e0266a94, stale=FALSEWWW-Authenticate: Basic realm=c42f9033f836Date: Tue, Jul 14 2015 13:10:15 GMTDESCRIBE RTSP/CSeq: 4Authorization: Digest username=admin, realm=c42f9033f836,nonce=05dff23367cb73d755cf0115e0266a94,uri=,response=08e21e4e865cd01fUser-Agent: LibVLC/ (LIVE55

34、5 Streaming Media application/sdpRTSP/ 200 OKCSeq: 4Content-Type: application/sdpContent-Base: 604v=0o=- 841 841 IN IP4s=Media Presentatione=N0NEb=AS:5050t=0 0a=control: 0 RTP/AVP 96c=IN IP4b=AS:5000a=recvonlya=x-dimensions:1920,1080a=control: H264/90000a=fmtp:96profile-level-id=420029;packetization

35、-mode=l;sprop-parameter-sets=Z00AKpWoHgCJ+WEAAAcIAAFfkAQ=,a048gA=a=Media_header:MEDIAINF0=494D4B00000000000000000000000000000000000000000000000000000;a=appversion:SETUP RTSP/CSeq: 5Authorization: Digest username=admin, realm=c42f9033f836,nonce=05dff23367cb73d755cf0115e0266a94,uri=,response=dff80e7fc

36、5585ac08e4c50162e27e872User-Agent: LibVLC/ (LIVE555 Streaming Media RTP/AVP;unicast;client_port=61748-61749RTSP/ 200 OKCSeq: 5Session:6;timeout=60Transport: RTP/AVP;unicast;client_port=61748-61749;server_port=8368-8369;ssrc=6dd2629c;mode=playDate: Tue, Jul 14 2015 13:10:15 GMTPLAY RTSP/CSeq: 6Author

37、ization: Digest username=admin, realm=c42f9033f836,nonce=05dff23367cb73d755cf0115e0266a94,uri=,response=df820265db78985f3f231cc5af9bc58dUser-Agent: LibVLC/ (LIVE555 Streaming Media 6Range: npt=RTSP/ 200 OKCSeq: 6Session:6RTP-Info: url=;seq=28417;rtptime=70Date: Tue, Jul 14 2015 13:10:15 GMTGET_PARAM

38、ETER RTSP/CSeq: 7Authorization: Digest username=admin, realm=c42f9033f836,nonce=05dff23367cb73d755cf0115e0266a94,uri=,response=bf6e13938d7ee447e52c4b342cb91078User-Agent: LibVLC/ (LIVE555 Streaming Media 6RTSP/ 200 OKCSeq: 7Date: Tue, Jul 14 2015 13:10:15 GMTTEARDOWN RTSP/CSeq: 8Authorization: Digest username=admin, realm=c42f9033f836,nonce=05dff23367cb73d755cf0115e0266a94,response=a981d92164ceefabb40ea0449f67d084User-Agent: LibVLC/ (LIVE555 Streaming Media 6RTSP/ 200 OKCSeq: 8Session:6Date: Tue, Jul 14 2015 13:10:26 GMT6参考文献资料1. 海康设备接口资料官方地址2. 播放器官网3. 插件集成

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!