Login
升级VIP 登录 注册 安全退出
当前位置: 首页 > word文档 > 其他文档 > 海康威视摄像头HTTP接口能力调研报告

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

收藏

本作品内容为海康威视摄像头HTTP接口能力调研报告,格式为 doc ,大小 1071144 KB ,页数为 16页

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


('视频监控平台调研报告【海康】V1.0目录目录.............................................................................................................................................................21.前言......................................................................................................................................................32.部署情况..............................................................................................................................................31)账号信息................................................................................................................................32)设备部署&端口映射..............................................................................................................33)设备配置注意事项.................................................................................................................33.视频监控..............................................................................................................................................33.1主码流与字码流........................................................................................................................43.2RTSP地址格式...........................................................................................................................43.3录像回放....................................................................................................................................44.HTTP接口.............................................................................................................................................44.1设备信息....................................................................................................................................44.1.1基本信息.........................................................................................................................44.1.2设备状态.........................................................................................................................54.1.3重启设备.........................................................................................................................54.1.4恢复出厂设置..................................................................................................................54.2图像抓拍....................................................................................................................................64.3告警通知....................................................................................................................................64.3.1设置告警开关..................................................................................................................64.3.2配置告警中心..................................................................................................................74.3.3告警消息示例..................................................................................................................74.3.4告警消息格式说明..........................................................................................................84.4云台控制....................................................................................................................................84.4.1云台设置.........................................................................................................................84.4.2巡航指令.......................................................................................................................104.4.3控制台指令...................................................................................................................114.4.4精确定位.......................................................................................................................115.遗留问题............................................................................................................................................125.1定位跟踪..................................................................................................................................125.2合码器......................................................................................................................................126.附录....................................................................................................................................................126.1VLCMediaPlayer......................................................................................................................126.2手机端监控..............................................................................................................................136.3DEMO程序..............................................................................................................................136.4RTSP消息示例.........................................................................................................................131.前言本次从海康租借了一台硬盘录像机、一个枪机和一个球机。由于对方HTTP告警消息模块有BUG,调测花费时间较长。对方提供升级测试版本后已经解决。从目前的进展情况看基本完成了我们的预期目标。主要常用功能均已验证通过,包括:视频监控(VLC插件方式)、录像回放、读取设备信息、设备重启、图像抓拍、告警通知、云台控制。本次报告主要目的是记录相关功能具体实现和验证的方式方法及注意事项。2.部署情况租借的三台设备均部署在五层实验室,通过无线路由器连接到公司网络。1)账号信息设备类型设备型号IP地址管理账号密码枪机DS-2CD2T20-I3192.111.111.235adminNuctech123录相机DS-8608N-E8192.111.111.237adminNuctech123球机DS-2DE7184-A192.111.111.238adminNuctech1232)设备部署&端口映射3)设备配置注意事项\uf0d8IPC和NVR均需要通过修改管理员密码才可以激活,然后接入网络;\uf0d8录相机(NVR)标准配置都是不带硬盘,所以需要事先准备好SATA硬盘;\uf0d8录相机(NVR)在接入枪机时,自动识别的设备协议为“海康协议”但实际需要根据说明书修改为ONVIF才可以,否则会一直报“未知错误“;\uf0d8枪机(IPC)须另备DC12VΦ5.5mm圆头电源;\uf0d8设备因为是租借来的,所以不是全新,建议配置调试之前先做出厂设置;\uf0d8设备默认出厂IP均为:192.0.0.643.视频监控3.1主码流与字码流主码流与子码流是海康威视提出的概念,是为了解决在网络情况不好时为了满足远程预览的流畅性,而不影响本地录像提出的双码流技术,主码流分辨率高于子码流,主码流用来录像,子码流用来网传,默认客户端访问采用主码流,客户可以根据网络情况选择子码流访问,以达到改善网络浏览的流畅性,而又不改变本地录像的录像效果。3.2RTSP地址格式(1)摄像头(IPC/IPD)地址格式:rtsp://username:pwd@ip:port[554]/h264/ch1/码流类型/av_stream码流类型:main表示为主码流,sub表示为子码流举例:IPC主码流:rtsp://admin:Nuctech123@192.168.25.6:10010/h264/ch1/main/av_streamIPC子码流:rtsp://admin:Nuctech123@192.168.25.6:10010/h264/ch1/sub/av_stream(2)NVR地址格式:rtsp://username:pwd@ip:port/h264/ch/码流类型/av_stream其中:ch,1-32是模拟通道,33以后是IP通道。举例:IPC@NVR:rtsp://admin:abc123@192.168.25.6:10011/h264/ch33/main/av_streamIPD@NVR:rtsp://admin:abc123@192.168.25.6:10011/h264/ch34/main/av_stream3.3录像回放RTSP地址格式:rtsp://username:pwd@ip:port/Streaming/tracks/101?starttime=yyyymmddtHHMMSSz&endtime=yyyymmddtHHMMSSz举例:rtsp://admin:abc123@192.168.25.6:10011/Streaming/tracks/101?starttime=20150710t102012z&endtime=20150710t113016z4.HTTP接口海康设备对外提供CGI和ISAPI两种接口,设备信息和配置推荐使用ISAPI接口,云台控制则推荐使用CGI接口。接口入口地址:http://ip:port[80]/接口协议:HTTP消息格式:XML接口形式:采用REST风格模式,GET表示读取当前信息、PUT表示更新配置、POST表示创建数据、DELETE表示删除配置。4.1设备信息4.1.1基本信息调用地址:/ISAPI/System/deviceInfo返回消息:IPDOMEef947dd1-f70b-11b4-83a0-c056e38ef866IPDomeSTD-CGISTD-CGIDS-2DE7184-ADS-2DE7184-A20140928CCCH482033105c0:56:e3:8e:f8:66V5.2.7build150129V5.0build141009V1.3.41003160x0IPDome88falsefalse4.1.2设备状态调用地址:/ISAPI/System/status2015-07-30T14:40:27+08:00185225ARM926EJ-Sid(wb)[41069265]revision5(ARMv5TEJ)58DDRMemory9186244.1.3重启设备调用地址:/ISAPI/System/reboot4.1.4恢复出厂设置调用地址:/ISAPI/System/factoryDefault4.2图像抓拍调用地址:/ISAPI/Streaming/channels/ID/picture返回消息:截图本身的二进制数据流4.3告警通知4.3.1设置告警开关调用地址:全部配置:/ISAPI/Event/triggersVMD-1VMDVMDEventtriggerInformation11centercenterbeginningvideoloss-1videolossVideolossEventtriggerInformation11……某项配置:/Event/triggers/ID实际地址:/Event/triggers/VMD-1VMD-1VMDVMDEventtriggerInformation11centercenterbeginning4.3.2配置告警中心告警中心可以理解为一个HTTP服务,具体地址信息配置到设备中,当有告警发生,并告警通知设置了为通知告警中心,则设备会根据设定间隔向指定的URL地址发送具体告警信息的XML文。具体配置的写入则通过PUT消息来实现。调用地址:/ISAPI/Event/notification/httpHosts返回消息:1/ipd-warn/notifyHTTPXMLipaddress192.111.111.2248080none4.3.3告警消息示例POST/ipd-warn/notifyHTTP/1.1Content-Type:application/xml;charset="UTF-8"Host:192.111.111.235Connection:Keep-AliveContent-Length:799192.111.111.235HTTPc4:2f:90:33:f8:3612015-07-29T17:05:46+08:0051VMDactiveMotionalarmDS-2CD2T20-I320150605AACH520982018VMD&&DS-2CD2T20-I320150605AACH520982018,2015-07-29T17:05:46+08:00,1,1.04.3.4告警消息格式说明(1)XML节点\uf0d8ipAddress:设备的IP地址\uf0d8protocolType:协议类型,只支持HTTP\uf0d8macAddress:设备的MAC地址\uf0d8channelID:通道号\uf0d8dateTime:发生报警的时间\uf0d8activePostCount:该类型报警发生的次数\uf0d8eventType:事件类型:\uf0d8eventState:事件状态\uf0d8eventDescription:时间描述\uf0d8Extensions:私有信息,内部用序列号、事件类型、时间等(2)事件类型(eventType)的含义\uf0d8IO:报警输入报警\uf0d8VMD:移动侦测\uf0d8videoloss:视频丢失\uf0d8shelteralarm:遮挡报警\uf0d8facedetection:人脸侦测\uf0d8defocus:虚焦侦测\uf0d8audioexception:音频异常\uf0d8scenechangedetection:场景变更\uf0d8fielddetection:区域入侵\uf0d8linedetection:越界侦测\uf0d8regionEntrance:进入区域\uf0d8regionExiting:离开区域\uf0d8loitering:徘徊侦测\uf0d8group:人员聚集\uf0d8rapidMove:快速移动\uf0d8parking:停车侦测\uf0d8unattendedBaggage:物品遗留\uf0d8attendedBaggage:物品拿去\uf0d8PIR:人体检测4.4云台控制4.4.1云台设置调用地址:/PTZCtrl/channels/1/presets返回消息:true33自动翻转true34回到零点true35巡航扫描1……true39白天模式true40黑夜模式true41花样扫描1……true45一键巡航true92设置手动限位true93确认手动限位true94远程重启true96停止扫描true97随机扫描true98帧扫描true99自动扫描true100垂直扫描true101全景扫描true102巡航扫描5……true106风扇常开模式true107风扇常闭模式true108风扇温控模式4.4.2巡航指令调用地址:/PTZCtrl/channels//presets//goto举例:全景扫描:http://192.168.25.6:10022/PTZCtrl/channels/1/presets/101/goto停止扫描:http://192.168.25.6:10022/PTZCtrl/channels/1/presets/96/goto回到零点:http://192.168.25.6:10022/PTZCtrl/channels/1/presets/34/goto4.4.3控制台指令调用地址:/PTZ/channels/ID/PTZControl参数说明:command、mode、speed、presetNo、patrolNoThevalueofcommandis:LIGHT:LightWIPER:WiperFAN:FanHEATER:Heater.AUX1:auxiliaryequipment1.AUX2:auxiliaryequipment2SET_PRESET:SetpresetCLE_PRESET:Clearpreset.ZOOM_IN:Zoominthespecifiedspeed.ZOOM_OUT:Zoomoutinthespecifiedspeed.FOCUS_NEAR:focusnearinthespecifiedspeed.FOCUS_FAR:focusfarinthespecifiedspeed.IRIS_OPEN:IRISisopeninthespecifiedspeedIRIS_CLOSE:IRISiscloesdinthespecifiedspeedTILT_UP:PTZistiltupinthespecifiedspeedTILT_DOWN:PTZistiltdowninthespecifiedspeedPAN_LEFT:PTZispanleftinthespecifiedspeedPAN_RIGHT:PTZispanrightinthespecifiedspeedUP_LEFT:PTZisup-leftinthespecifiedspeedUP_RIGHT:PTZisup-rightinthespecifiedspeedDOWN_LEFT:PTZisdown-leftinthespecifiedspeedDOWN_RIGHT:PTZisdown-rightinthespecifiedspeedPAN_AUTO:PTZscanspanwiththespecifiedspeed.MEM_PATTERN:memorypattern.RUN_PATTERN:Startpattern.PATROL:patrol.GOTO_PRESET:Gotopreset."mode"valueis"start"and"stop".Itindicatesthe"start"or"stop"ofsomeactionsforPTZ,orthe"turnon"or"turnoff"ofexternalequipmentpowerforPTZ.Thedefaultis"start".Inadditiontothe"SET_PRESET","CLE_PRESET","RUN_PATTERN"and"GOTO_PRESET"command,allcommandsrequirethe"mode"queryparameters."speed"rangeis1-7.Whenthecommandis"ZOOM_IN","ZOOM_OUT","FOCUS_NEAR","FOCUS_FAR","IRIS_OPEN",or"IRIS_CLOSE",thedefaultis1.Whenthecommandis"TILT_UP","TILT_DOWN","PAN_LEFT","PAN_RIGHT","UP_LEFT","UP_RIGHT","DOWN_LEFT","DOWN_RIGHT","PAN_AUTO",thedefaultis3.4.4.4精确定位调用地址:PTZCtrl/channels/1/continuous请求消息:0-8005.遗留问题5.1定位跟踪定位模块提供目标的坐标后,如何通过该位置坐标与摄像头的位置坐标计算出摄像头跟踪显示该目标所需要调整的角度或相应云台动作的指令参数。5.2合码器NVR没有将多路视频合并成一路视频的功能,需要单独采购合码器支持合码功能,可以将多路视频合成一路视频输出。如果没有合码器,只能是一个插件同时只能显示一路视频。6.附录6.1VLCMediaPlayer\uf0d8下载地址列表:http://downloads.videolan.org/pub/videolan/vlc/\uf0d8最新版本:http://downloads.videolan.org/pub/videolan/vlc/2.2.1/win64/也可以通过VLC的插件方式在浏览器中实现视频接入,具体代码如下 6.2手机端监控安装海康的手机监控软件(iVMS-4500)即可。APP下载地址:http://www.hikvision.com/cn/download_more_391.html#prettyPhoto具体配置及效果图6.3DEMO程序设备安装配置好之后,可以通过海康提供的ClientDemo程序来测试验证。6.4RTSP消息示例OPTIONSrtsp://192.168.25.6:10010/h264/ch1/main/av_streamRTSP/1.0CSeq:2User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)RTSP/1.0200OKCSeq:2Public:OPTIONS,DESCRIBE,PLAY,PAUSE,SETUP,TEARDOWN,SET_PARAMETER,GET_PARAMETERDate:Tue,Jul14201513:10:15GMTDESCRIBErtsp://192.168.25.6:10010/h264/ch1/main/av_streamRTSP/1.0CSeq:3User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Accept:application/sdpRTSP/1.0401UnauthorizedCSeq:3WWW-Authenticate:Digestrealm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",stale="FALSE"WWW-Authenticate:Basicrealm="c42f9033f836"Date:Tue,Jul14201513:10:15GMTDESCRIBErtsp://192.168.25.6:10010/h264/ch1/main/av_streamRTSP/1.0CSeq:4Authorization:Digestusername="admin",realm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",uri="rtsp://192.168.25.6:10010/h264/ch1/main/av_stream",response="08e21e4e77440148865cd4864184001f"User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Accept:application/sdpRTSP/1.0200OKCSeq:4Content-Type:application/sdpContent-Base:rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/Content-Length:604v=0o=-14368794151488411436879415148841INIP4192.111.111.235s=MediaPresentatione=NONEb=AS:5050t=00a=control:rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/m=video0RTP/AVP96c=INIP40.0.0.0b=AS:5000a=recvonlya=x-dimensions:1920,1080a=control:rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/trackID=1a=rtpmap:96H264/90000a=fmtp:96profile-level-id=420029;packetization-mode=1;sprop-parameter-sets=Z00AKpWoHgCJ+WEAAAcIAAFfkAQ=,aO48gA==a=Media_header:MEDIAINFO=494D4B48010100000400010000000000000000000000000000000000000000000000000000000000;a=appversion:1.0SETUPrtsp://192.168.25.6:10010/h264/ch1/main/av_stream/trackID=1RTSP/1.0CSeq:5Authorization:Digestusername="admin",realm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",uri="rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/",response="dff80e7fc5585ac08e4c50162e27e872"User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Transport:RTP/AVP;unicast;client_port=61748-61749RTSP/1.0200OKCSeq:5Session:901031416;timeout=60Transport:RTP/AVP;unicast;client_port=61748-61749;server_port=8368-8369;ssrc=6dd2629c;mode="play"Date:Tue,Jul14201513:10:15GMTPLAYrtsp://192.168.25.6:10010/h264/ch1/main/av_stream/RTSP/1.0CSeq:6Authorization:Digestusername="admin",realm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",uri="rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/",response="df820265db78985f3f231cc5af9bc58d"User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Session:901031416Range:npt=0.000-RTSP/1.0200OKCSeq:6Session:901031416RTP-Info:url=rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/trackID=1;seq=28417;rtptime=1324571670Date:Tue,Jul14201513:10:15GMTGET_PARAMETERrtsp://192.168.25.6:10010/h264/ch1/main/av_stream/RTSP/1.0CSeq:7Authorization:Digestusername="admin",realm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",uri="rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/",response="bf6e13938d7ee447e52c4b342cb91078"User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Session:901031416RTSP/1.0200OKCSeq:7Date:Tue,Jul14201513:10:15GMTTEARDOWNrtsp://192.168.25.6:10010/h264/ch1/main/av_stream/RTSP/1.0CSeq:8Authorization:Digestusername="admin",realm="c42f9033f836",nonce="05dff23367cb73d755cf0115e0266a94",uri="rtsp://192.168.25.6:10010/h264/ch1/main/av_stream/",response="a981d92164ceefabb40ea0449f67d084"User-Agent:LibVLC/2.2.1(LIVE555StreamingMediav2014.07.25)Session:901031416RTSP/1.0200OKCSeq:8Session:901031416Date:Tue,Jul14201513:10:26GMT7.参考文献资料1.海康设备接口资料官方地址http://www.hikvision.com/cn/download_more_969.html2.VLC播放器官网http://www.videolan.org/vlc/3.VLC插件集成https://wiki.videolan.org/HowTo_Integrate_VLC_plugin_in_your_webpage/',)


  • 编号:1700773638
  • 分类:其他文档
  • 软件: wps,office word
  • 大小:16页
  • 格式:docx
  • 风格:商务
  • PPT页数:1071144 KB
  • 标签:

广告位推荐

相关其他文档更多>