问题标签 [onvif]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - 如何在 PHP 中删除将 SOAP 解析为 XML 的命名空间快捷方式?
例如我有一个这样的字符串:
而且我需要将其转换为array
以便我使用simplexml_load_string
,但主要问题是结果可能会有所不同......在一种情况下,它可能是<d:Types>
,在其他<Types xmlns=".*">
或其他一些快捷方式中,它完全出现在键中,我需要获取地址作为['ProbeMatches']['ProbeMatch']['XAddrs']
php - 如何在python中对onvif进行密码加密?
使用onvif
密码必须以某种方式加密。ONVIF Appicaltion Programmer's Guide on page 35中描述的方法。我还找到了如何在 PHP 中执行此操作,它看起来像这样:
主要问题是我不知道所有字节操作是如何工作的,所以我需要一些帮助才能将这个 PHP 代码传输到 python 中......
c# - 解析 WCF ProtocolException 时的 System.ServiceModel.CommunicationException
我正在尝试使用此页面中推荐的代码http://blogs.msdn.com/b/nathana/archive/2011/03/31/deciphering-a-soap-fault-with-a-400-status-code .aspx如下:
我正在使用 VS 2012 和使用 WCF 的 .NET 4.5。当应用程序收到 400 Bad Request 并将 ProtocolException 传递给 ParseProtocolException 时,它会在此行引发异常:
与 System.ServiceModel.CommunicationException:“缓冲 XML 内容所需的大小超出了缓冲区配额。”
stream.Length = 2,704 字节,不是很大。我尝试了此站点http://blogs.msdn.com/b/drnick/archive/2007/08/07/increasing-the-maximum-fault-size.aspx上建议的解决方案。但是,即使 MaxFaultSize = 1 Mb,也会出现相同的错误。
而不是这一行:
我试过这个:
它将所有配额设置为其最大值(Int32.MaxValue);但是,我在 CreateMessage 调用中仍然遇到同样的错误。
System.Net.WebException 的示例响应流如下:
使用我在 F# Interactive 中编写的异步网络爬虫,我发现某些命名空间 url 无法解析。我纠正了错误的错误,然后再次运行爬虫来计算命名空间页面的长度。总共是 715,965 字节,远小于 XmlDictionaryReaderQuotas 中所有配额的 Int32.MaxValue。也许 XmlDictionaryReader 有错误,或者它返回的错误不是真正的问题?
我最终通过删除 SOAP-ENV:Body 中实际未使用的命名空间定义(即,仅保留 Subcode 元素中使用的 xmlns:ter)使 Message 创建工作。但是,当然,这并不能真正解决问题,因为服务正在生成 SOAP 错误;而且我无法更改服务实现(它是第 3 方设备 - Onvif 相机)。
而且,我不能再增加配额了。那么,如何处理这个异常呢?
c# - 获取 ONVIF FaultException 的详细信息
这个答案解释了如何获取 SOAP 的文本FaultException
,但它仅在内容是序列化字符串时才有效,导致<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">details</string>
.
然而,此 ONVIF 设备使用 SOAP<env:Text>
元素,该元素无法反序列化为字符串。
如何阅读以下内容的详细信息FaultException
?
此代码来自上面的链接答案:
失败了:
System.Runtime.Serialization.dll 中出现“System.Runtime.Serialization.SerializationException”类型的异常,但未在用户代码中处理
附加信息:来自命名空间“ http://schemas.microsoft.com/2003/10/Serialization/ ”的预期元素“字符串”。遇到名称为“文本”、命名空间“ http://www.w3”的“元素”。 org/2003/05/soap-信封'。
必须有一个内置的反序列化器,因为<env:Reason>
元素使用相同的节点。
onvif - ONVIF #PasswordDigest 的公式是什么
我正在处理发送“GetDeviceInformation”的 ONVIF。这是必需的 wsse:UsernameToken。搜索权威数据后,有两个公式:
(1) by "ONVIF-Core-Specification-v241.pdf", "5.12.2.1 密码推导"
(2)通过WEB协议的soap
我很困惑!!哪一个是正确的?
此外,当我通过wireshark测试ONVIF测试工具时
我得到的XML:
好的,那我试着通过这些数据找出公式。
a> 用户名:“管理员”
b> 密码:“pass”(非熵)
c> 随机数:“TgBYFHxSc3Oo8yPzwnQn8A==”
d> 创建:“2014-06-20T04:41:45Z”
以某种方式获得最终密码:“ lu9ywjDwSt8oW7M4tMjCb50/xRg= ”
“nonce”可以由 Base64 转换,所以原始应该是“4E0058147C527373A8F323F3C27427F0”
我试过用
或者
但我仍然无法获得测试工具发送的密码为“lu9ywjDwSt8oW7M4tMjCb50/xRg=”
任何人都可以帮助我弄清楚 ONVIF 测试工具使用的确切公式是什么?
需要你的帮助!!!谢谢!!
python - 如何在 SUDS 中调用 GetDeviceInformation 方法?
实际上遇到了这样一个问题:当我尝试执行该方法时GetDeviceInformation
,我client.service.GetDeviceInformation()
收到以下错误:Type not found: '(IPAddressFilter, http://www.onvif.org/ver10/schema/onvif.xsd, )'
. 我是否有可能以某种方式解决此问题,因为它发生在请求生成步骤中。
rtsp - onvif vs rtsp - 区别
我刚刚开始研究流媒体库和底层协议。我了解 rtsp/rtp 流媒体以及这两种协议的用途。但是,如果我们需要 IP 地址、编解码器和 rtsp/rtp 协议来流式传输来自任何摄像机的视频和音频,那么我们为什么要有 onvif 标准,它本质上也旨在标准化 IP 网络设备之间的通信。我已经看到了 onvif 的定义,所以这不是我想要的。我想知道当我们已经拥有 rtsp/rtp 时为什么还需要 onvif 以及它可以提供哪些额外的好处。
python - 当 SUDS 中的“TypeNotFound”异常引发时,是否可以添加类型?
当我尝试加载http://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl
异常Type not found: '(IPAddressFilter, http://www.onvif.org/ver10/schema/onvif.xsd, )'
引发。有可能修复吗?
PS WSDL 文件由我更改,只是http://www.onvif.org/ver10/schema/onvif.xsd
在文件开头添加了直接链接。
聚苯乙烯
android - RTSP 1080p live-streaming android client gets error (100,0)
My new surveillance camera just arrived, so I'm trying to write an app to live stream the video from it.
Since it came with basically no documentation, I installed the 'onvifer' android app which allows you to browse the camera's capabilities. This app works fine - gets the video and allows PTZ controls, etc. It reports the streaming url as:
I tested the stream in the VLC windows client, and it's able to stream video from that URL as well. This makes me comfortable that the network is working OK.
The camera states the feed will be 1920x1080; VLC confirms this.
The basic code in my activity:
I've also given the app INTERNET permissions in AndroidManifest.xml, disabled authentication on the camera, and am running on a real device (not the emulator).
When I run the app, LogCat shows this immediately:
About 15 seconds later, the app shows a "Can't play this video" modal dialog box and this is added to LogCat:
I've googled everything I can think of, but haven't found anything useful.
Any thoughts?
c# - Onvif 设备管理器中的事件
我正在开发一个需要使用 ONVIF 协议从摄像机接收事件(例如运动检测)的应用程序。
我已经从链接下载了最新的 ONVIF 设备管理版本,并且能够编译和运行它。
我想使用提供的库在我自己的源代码中创建类似于 Onvif 设备管理器的 DeviceEventsView.xaml 的东西,但是我很难弄清楚代码的哪一部分来自库本身。
有人可以向我解释如何做到这一点吗?
这是我到目前为止所做的(这段代码可能完全错误):