有人用java开发onvif过吗?

pride_men 2016-08-15 11:05:55
公司想让我用java开发onvif,实现对摄像头进行控制,如:暂停的功能
这个该如何做?github上有个onvif项目,可以实现根据ip地址,对摄像头进行发现
现在我需要做的是实现对摄像头暂停的模块。
自己想看官网上的wsd生成的代码是什么样的,以便于找到思路,好进行开发,onvif官网上的wsdl,用java生成客服端代码时,没有service节点,这个自己要怎么添加?约束规则是什么样的
...全文
1419 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanxi_liang 2019-08-29
  • 打赏
  • 举报
回复
用java开发onvif 你做好了么?求教
yanxi_liang 2019-08-29
  • 打赏
  • 举报
回复
用java开发onvif 你做好了么?
奇葩nice 2019-04-23
  • 打赏
  • 举报
回复
楼主 跪求demo啊 java怎么使用onvif协议发现局域网设备啊
柳鲲鹏 2018-08-07
  • 打赏
  • 举报
回复
我网上找到了一个ONVIF JAVA代码,只有视频。后来发现音频要单独进行一次建立。
现在又在研究如何把声音发到IP头上。
qq_38118925 2018-02-28
  • 打赏
  • 举报
回复
楼主,onvif怎么兼容设备
qq_35107848 2017-08-28
  • 打赏
  • 举报
回复
我现在也遇到相同的问题,求楼主解答!
qq_35107848 2017-08-25
  • 打赏
  • 举报
回复
用java开发onvif 你做好了么?
光记Jagger 2016-11-01
  • 打赏
  • 举报
回复
这个可能有点用 http://blog.csdn.net/yanjiee/article/details/18809107
pride_men 2016-08-23
  • 打赏
  • 举报
回复
这是我从google找到的 If you have a ONVIF compatible security camera the following may help: - 1. Create file named getProfiles.xml with the following: - --- Code: ---<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl"> <soap:Body> <trt:GetProfiles/> </soap:Body> </soap:Envelope> --- End code --- 2. Run the following curl command: - --- Code: ---curl http://<INSERTIPADDRESSHERE>/onvif/device_service --data @getProfiles.xml |xmllint --pretty 1 - --- End code --- This should list all the profiles on that camera. Choose the profile that you are interested in, for me it is MainStream: - --- Code: ---<trt:Profiles fixed="false" token="MainStream"> --- End code --- 3. Create file named getSnapshotUri.xml with the following: - --- Code: ---<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema"> <soap:Body> <trt:GetSnapshotUri> <trt:ProfileToken>MainStream</trt:ProfileToken> </trt:GetSnapshotUri> </soap:Body> </soap:Envelope> --- End code --- Where ProfileToken = token from previous response. 4. Run the following curl command: - --- Code: ---curl http://<INSERTIPADDRESSHERE>/onvif/device_service --data @getSnapshotUri.xml |xmllint --pretty 1 - --- End code --- Hopefully you will get something like this: - --- Code: --- <SOAP-ENV:Body> <trt:GetSnapshotUriResponse> <trt:MediaUri> <tt:Uri>http://192.168.0.205:80/cgi-bin/snapshot.cgi?stream=0</tt:Uri> <tt:InvalidAfterConnect>false</tt:InvalidAfterConnect> <tt:InvalidAfterReboot>false</tt:InvalidAfterReboot> <tt:Timeout>PT0H12M0S</tt:Timeout> </trt:MediaUri> </trt:GetSnapshotUriResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> --- End code --- If you want to file the RTSP stream: - Create file named getStreamURI.xml with the following, using same token or token from another profile: - --- Code: ---<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema"> <soap:Body> <trt:GetStreamUri> <trt:StreamSetup> <tt:Stream>RTP-Unicast</tt:Stream> <tt:Transport> <tt:Protocol>UDP</tt:Protocol> </Transport> </trt:StreamSetup> <trt:ProfileToken>MainStream</trt:ProfileToken> </trt:GetStreamUri> </soap:Body> </soap:Envelope> --- End code --- Then run the following curl command:- --- Code: ---curl http://<INSERTIPADDRESSHERE>/onvif/device_service --data @getStreamURI.xml |xmllint --pretty 1 - --- End code --- This was done under linux so not sure if the same will work under windows. Hopefully this helps somebody.
qq_35667540 2016-08-23
  • 打赏
  • 举报
回复
帮你踩踩~~
pride_men 2016-08-23
  • 打赏
  • 举报
回复
通过80端口发送流 首先要判断消息是onvif消息还是请求流消息, 通过MSG_PEEK来区分 如果是onvif消息就走onvif信令,否则走播流通道 Onvif已经实现功能 设备发送hello消息 设备接收hello消息 设备发现匹配相应 获取设备信息 设置系统时间 获取系统时间 软件出厂默认值恢复 系统重新启动 获取wsdlurl 获取所有能力集 获取设备能力集 获取事件能力集 获取图象能力集 获取媒体能力集 获取主机名字 设置主机名 获取网络接口信息 设置网络接口信息 获取网络协议 获取网关 设置网关
pride_men 2016-08-19
  • 打赏
  • 举报
回复
我自己顶顶 onvif开发,设备发现,用户账号密码登陆认证,以及RTSP流暂停

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧