ONVIF协议基础概念

ONVIF基础概念

百度百科摘要

百度百科链接:https://baike.baidu.com/item/onvif/4412949
ONVIF(开放式网络视频接口论坛)是一个全球性的开放式行业论坛,其目标是促进开发和使用基于物理IP的安全产品接口的全球开放标准。ONVIF创建了一个视频监控和其他物理安全领域的IP产品如何进行相互通信的标准。ONVIF是由Axis Communications,博世安防系统和索尼于2008年创立的

百度百科上没有什么技术信息,废柴。

其他摘要

ONVIF(Open Network Video Interface Forum,开放型网络视频接口论坛)
ONVIF规范涵盖了完全的XML及WSDL的定义。
服务端与客户端的数据交互采用SOAP协议。
ONVIF中的其他部分比如音视频流则通过RTP/RTSP进行 。

WSDL是Web services 描述语言(Web Service Description Language)的缩写。是一个用来描述Web服务和说明如何与Web服务通信的XML语言,为用户提供详细的接口说明书

SOAP是Simple Object Access Protocol的缩写。是基于XML的一种协议。

组播(Multicast)

Probe,discovery(设备搜索,设备发现)

Onvif使用了 IP:239.255.255.250 / Port:3702 的组播地址。
客户端在网段内发送Probe,网段内的Onvif服务端设备在收到这个Probe之后会生成一个ProbeMatch来回复给客户端,其中包含了这个服务端设备的基本信息。

组播发送的报文:

<?xml version="1.0" encoding="utf-8"?>
<Envelope
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns="http://www.w3.org/2003/05/soap-envelope">
    <Header>
        <wsa:MessageID
            xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:abedbd54-cb37-4994-83be-bfb0d6168bc9
        </wsa:MessageID>
        <wsa:To
            xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:schemas-xmlsoap-org:ws:2005:04:discovery
        </wsa:To>
        <wsa:Action
            xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/04/discovery/Probe
        </wsa:Action>
    </Header>
    <Body>
        <Probe
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://schemas.xmlsoap.org/ws/2005/04/discovery">
            <Types>tds:Device</Types>
            <Scopes />
        </Probe>
    </Body>
</Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
    xmlns:vfdis="http://www.onvif.org/ver10/network/wsdl/RemoteDiscoveryBinding"
    xmlns:vfdis2="http://www.onvif.org/ver10/network/wsdl/DiscoveryLookupBinding"
    xmlns:tdn="http://www.onvif.org/ver10/network/wsdl">
    <SOAP-ENV:Header>
        <wsa:MessageID>uuid:2419d68a-2dd2-21b2-a205-X2017020802931</wsa:MessageID>
        <wsa:RelatesTo>uuid:abedbd54-cb37-4994-83be-bfb0d6168bc9</wsa:RelatesTo>
        <wsa:To SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsa:Action SOAP-ENV:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2005/04/discovery/ProbeMatches</wsa:Action>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <wsdd:ProbeMatches>
            <wsdd:ProbeMatch
                xmlns:_0="http://www.onvif.org/ver10/device/wsdl">
                <wsa:EndpointReference>
                    <wsa:Address>urn:uuid:2419d68a-2dd2-21b2-a205-X2017020802931</wsa:Address>
                    <wsa:ReferenceProperties></wsa:ReferenceProperties>
                    <wsa:ReferenceParameters></wsa:ReferenceParameters>
                    <wsa:PortType>ttl</wsa:PortType>
                </wsa:EndpointReference>
                <wsdd:Types>_0:Device</wsdd:Types>
                <wsdd:Scopes>onvif://www.onvif.org/Profile/Streaming onvif://www.onvif.org/Model/631GA onvif://www.onvif.org/Name/IPCAM onvif://www.onvif.org/location/country/china</wsdd:Scopes>
                <wsdd:XAddrs>http://192.168.3.2:80/onvif/device_service</wsdd:XAddrs>
                <wsdd:MetadataVersion>1</wsdd:MetadataVersion>
            </wsdd:ProbeMatch>
        </wsdd:ProbeMatches>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

这里我们可以获取到onvif的服务地址:http://192.168.3.2:80/onvif/device_service

单播(Unicast)

http头

REQ:

POST /onvif/device_service HTTP/1.1
Host: 192.168.3.12
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 299

RES(200):

HTTP/1.1 200 OK
Cache-Control: public,max-age=0
Server: gSOAP/2.8
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 3072
Connection: close
Date: Thu, 09 Aug 2018 10:20:52 GMT

RES(400):

HTTP/1.1 400 Bad Request
Cache-Control: public,max-age=0
Server: gSOAP/2.8
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 3033
Connection: close
Date: Fri, 10 Aug 2018 02:55:42 GMT

授权 Authorized

部分请求是需要授权的,没有权限会回复错误

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <SOAP-ENV:Code>
                <SOAP-ENV:Value>ter:Unauthorized</SOAP-ENV:Value>
                <SOAP-ENV:Subcode>
                    <SOAP-ENV:Value>ter:Unauthorized</SOAP-ENV:Value>
                </SOAP-ENV:Subcode>
            </SOAP-ENV:Code>
            <SOAP-ENV:Reason>
                <SOAP-ENV:Text xml:lang="en">Sender not Authorized</SOAP-ENV:Text>
            </SOAP-ENV:Reason>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

这个时候,我们需要在请求的<Header>标签中增加认证信息,使用摘要认证计算密码的哈希。

<wsse:Security
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">+F7rmPj1lTqH8zuD2HkuWIBOk2g=</wsse:Password>
                <wsse:Nonce>IOywHuXJHaJDS3DIIb1EEw==</wsse:Nonce>
                <wsu:Created>2018-08-10T04:34:25Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>

GetDeviceInformation

获取设备信息

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
    xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Body
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <GetDeviceInformation
            xmlns="http://www.onvif.org/ver10/device/wsdl"/>
    </s:Body>
</s:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header></SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tds:GetDeviceInformationResponse>
            <tds:Manufacturer>oem</tds:Manufacturer>
            <tds:Model>xseries</tds:Model>
            <tds:FirmwareVersion>00.10.01.0043P1&#xA;</tds:FirmwareVersion>
            <tds:SerialNumber>X2017020802931</tds:SerialNumber>
            <tds:HardwareId>78-A5-DD-15-85-87</tds:HardwareId>
        </tds:GetDeviceInformationResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetCapabilities

获取设备能力信息

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
    xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Body
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <GetCapabilities
            xmlns="http://www.onvif.org/ver10/device/wsdl">
            <Category>All</Category>
        </GetCapabilities>
    </s:Body>
</s:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header></SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tds:GetCapabilitiesResponse>
            <tds:Capabilities>
                <tt:Analytics>
                    <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                    <tt:RuleSupport>false</tt:RuleSupport>
                    <tt:AnalyticsModuleSupport>false</tt:AnalyticsModuleSupport>
                </tt:Analytics>
                <tt:Device>
                    <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                    <tt:Network>
                        <tt:IPFilter>false</tt:IPFilter>
                        <tt:ZeroConfiguration>false</tt:ZeroConfiguration>
                        <tt:IPVersion6>false</tt:IPVersion6>
                        <tt:DynDNS>false</tt:DynDNS>
                        <tt:Extension>
                            <tt:Dot11Configuration>false</tt:Dot11Configuration>
                        </tt:Extension>
                    </tt:Network>
                    <tt:System>
                        <tt:DiscoveryResolve>false</tt:DiscoveryResolve>
                        <tt:DiscoveryBye>false</tt:DiscoveryBye>
                        <tt:RemoteDiscovery>false</tt:RemoteDiscovery>
                        <tt:SystemBackup>false</tt:SystemBackup>
                        <tt:SystemLogging>false</tt:SystemLogging>
                        <tt:FirmwareUpgrade>false</tt:FirmwareUpgrade>
                        <tt:SupportedVersions>
                            <tt:Major>2</tt:Major>
                            <tt:Minor>50</tt:Minor>
                        </tt:SupportedVersions>
                        <tt:Extension>
                            <tt:HttpFirmwareUpgrade>false</tt:HttpFirmwareUpgrade>
                            <tt:HttpSystemBackup>false</tt:HttpSystemBackup>
                            <tt:HttpSystemLogging>false</tt:HttpSystemLogging>
                            <tt:HttpSupportInformation>false</tt:HttpSupportInformation>
                        </tt:Extension>
                    </tt:System>
                    <tt:IO>
                        <tt:InputConnectors>0</tt:InputConnectors>
                        <tt:RelayOutputs>1</tt:RelayOutputs>
                    </tt:IO>
                    <tt:Security>
                        <tt:TLS1.1>false</tt:TLS1.1>
                        <tt:TLS1.2>false</tt:TLS1.2>
                        <tt:OnboardKeyGeneration>false</tt:OnboardKeyGeneration>
                        <tt:AccessPolicyConfig>false</tt:AccessPolicyConfig>
                        <tt:X.509Token>false</tt:X.509Token>
                        <tt:SAMLToken>false</tt:SAMLToken>
                        <tt:KerberosToken>false</tt:KerberosToken>
                        <tt:RELToken>false</tt:RELToken>
                    </tt:Security>
                </tt:Device>
                <tt:Imaging>
                    <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                </tt:Imaging>
                <tt:Media>
                    <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                    <tt:StreamingCapabilities>
                        <tt:RTPMulticast>false</tt:RTPMulticast>
                        <tt:RTP_TCP>true</tt:RTP_TCP>
                        <tt:RTP_RTSP_TCP>true</tt:RTP_RTSP_TCP>
                    </tt:StreamingCapabilities>
                </tt:Media>
                <tt:PTZ>
                    <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                </tt:PTZ>
                <tt:Extension>
                    <tt:DeviceIO>
                        <tt:XAddr>http://192.168.3.2:80/onvif/device_service</tt:XAddr>
                        <tt:VideoSources>1</tt:VideoSources>
                        <tt:VideoOutputs>1</tt:VideoOutputs>
                        <tt:AudioSources>1</tt:AudioSources>
                        <tt:AudioOutputs>1</tt:AudioOutputs>
                        <tt:RelayOutputs>1</tt:RelayOutputs>
                    </tt:DeviceIO>
                </tt:Extension>
            </tds:Capabilities>
        </tds:GetCapabilitiesResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetSystemDateAndTime

获取时间信息

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
    xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <s:Body
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <GetSystemDateAndTime
            xmlns="http://www.onvif.org/ver10/device/wsdl"/>
    </s:Body>
</s:Envelope>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <tds:GetSystemDateAndTimeResponse>
            <tds:SystemDateAndTime>
                <tt:DateTimeType>NTP</tt:DateTimeType>
                <tt:DaylightSavings>false</tt:DaylightSavings>
                <tt:TimeZone>
                    <tt:TZ/>
                </tt:TimeZone>
                <tt:UTCDateTime>
                    <tt:Time>
                        <tt:Hour>2</tt:Hour>
                        <tt:Minute>40</tt:Minute>
                        <tt:Second>3</tt:Second>
                    </tt:Time>
                    <tt:Date>
                        <tt:Year>2018</tt:Year>
                        <tt:Month>8</tt:Month>
                        <tt:Day>13</tt:Day>
                    </tt:Date>
                </tt:UTCDateTime>
                <tt:LocalDateTime>
                    <tt:Time>
                        <tt:Hour>2</tt:Hour>
                        <tt:Minute>40</tt:Minute>
                        <tt:Second>3</tt:Second>
                    </tt:Time>
                    <tt:Date>
                        <tt:Year>2018</tt:Year>
                        <tt:Month>8</tt:Month>
                        <tt:Day>13</tt:Day>
                    </tt:Date>
                </tt:LocalDateTime>
            </tds:SystemDateAndTime>
        </tds:GetSystemDateAndTimeResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetProfiles

获取设备的配置信息

<?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">
    <s:Header
        xmlns:s="http://www.w3.org/2003/05/soap-envelope">
        <wsse:Security
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">+F7rmPj1lTqH8zuD2HkuWIBOk2g=</wsse:Password>
                <wsse:Nonce>IOywHuXJHaJDS3DIIb1EEw==</wsse:Nonce>
                <wsu:Created>2018-08-10T04:34:25Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </s:Header>
    <soap:Body>
        <trt:GetProfiles />
    </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header></SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <trt:GetProfilesResponse>
            <trt:Profiles fixed="true" token="Profile_token1">
                <tt:Name>Profile1</tt:Name>
                <tt:VideoSourceConfiguration token="VideoSource_cfg_token1">
                    <tt:Name>VideoSource_cfg1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>VideoSource_token1</tt:SourceToken>
                    <tt:Bounds height="720" width="1280" y="1" x="1"></tt:Bounds>
                </tt:VideoSourceConfiguration>
                <tt:AudioSourceConfiguration token="AudioSource_cfg_token1">
                    <tt:Name>AudioSource_cfg1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>AudioSource_token1</tt:SourceToken>
                </tt:AudioSourceConfiguration>
                <tt:VideoEncoderConfiguration token="H264Video_cfg_token1">
                    <tt:Name>H264Video_cfg1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>H264</tt:Encoding>
                    <tt:Resolution>
                        <tt:Width>1280</tt:Width>
                        <tt:Height>720</tt:Height>
                    </tt:Resolution>
                    <tt:Quality>6</tt:Quality>
                    <tt:RateControl>
                        <tt:FrameRateLimit>25</tt:FrameRateLimit>
                        <tt:EncodingInterval>50</tt:EncodingInterval>
                        <tt:BitrateLimit>2048</tt:BitrateLimit>
                    </tt:RateControl>
                    <tt:H264>
                        <tt:GovLength>0</tt:GovLength>
                        <tt:H264Profile>High</tt:H264Profile>
                    </tt:H264>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:VideoEncoderConfiguration>
                <tt:AudioEncoderConfiguration token="AACAudio_cfg_token1">
                    <tt:Name>AACAudio_cfg</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>AAC</tt:Encoding>
                    <tt:Bitrate>16</tt:Bitrate>
                    <tt:SampleRate>16000</tt:SampleRate>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:AudioEncoderConfiguration>
                <tt:PTZConfiguration token="PTZConf1">
                    <tt:Name>user0</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:NodeToken>PTZ1</tt:NodeToken>
                    <tt:DefaultAbsolutePantTiltPositionSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:DefaultAbsolutePantTiltPositionSpace>
                    <tt:DefaultAbsoluteZoomPositionSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:DefaultAbsoluteZoomPositionSpace>
                    <tt:DefaultRelativePanTiltTranslationSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:DefaultRelativePanTiltTranslationSpace>
                    <tt:DefaultRelativeZoomTranslationSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:DefaultRelativeZoomTranslationSpace>
                    <tt:DefaultContinuousPanTiltVelocitySpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:DefaultContinuousPanTiltVelocitySpace>
                    <tt:DefaultContinuousZoomVelocitySpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:DefaultContinuousZoomVelocitySpace>
                    <tt:DefaultPTZSpeed>
                        <tt:PanTilt space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace" y="50" x="50"></tt:PanTilt>
                        <tt:Zoom space="http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace" x="0"></tt:Zoom>
                    </tt:DefaultPTZSpeed>
                    <tt:DefaultPTZTimeout>PT0H1M0S</tt:DefaultPTZTimeout>
                    <tt:PanTiltLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                            <tt:YRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:YRange>
                        </tt:Range>
                    </tt:PanTiltLimits>
                    <tt:ZoomLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                        </tt:Range>
                    </tt:ZoomLimits>
                </tt:PTZConfiguration>
                <tt:MetadataConfiguration token="MetaDataConf1">
                    <tt:Name>MetaDataConf1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:PTZStatus>
                        <tt:Status>true</tt:Status>
                        <tt:Position>true</tt:Position>
                    </tt:PTZStatus>
                    <tt:Events></tt:Events>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H1M0S</tt:SessionTimeout>
                </tt:MetadataConfiguration>
            </trt:Profiles>
            <trt:Profiles fixed="true" token="Profile_token2">
                <tt:Name>Profile2</tt:Name>
                <tt:VideoSourceConfiguration token="VideoSource_cfg_token2">
                    <tt:Name>VideoSource_cfg2</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>VideoSource_token2</tt:SourceToken>
                    <tt:Bounds height="360" width="640" y="1" x="1"></tt:Bounds>
                </tt:VideoSourceConfiguration>
                <tt:AudioSourceConfiguration token="AudioSource_cfg_token2">
                    <tt:Name>AudioSource_cfg2</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>AudioSource_token2</tt:SourceToken>
                </tt:AudioSourceConfiguration>
                <tt:VideoEncoderConfiguration token="H264Video_cfg_token2">
                    <tt:Name>H264Video_cfg2</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>H264</tt:Encoding>
                    <tt:Resolution>
                        <tt:Width>640</tt:Width>
                        <tt:Height>360</tt:Height>
                    </tt:Resolution>
                    <tt:Quality>6</tt:Quality>
                    <tt:RateControl>
                        <tt:FrameRateLimit>25</tt:FrameRateLimit>
                        <tt:EncodingInterval>50</tt:EncodingInterval>
                        <tt:BitrateLimit>512</tt:BitrateLimit>
                    </tt:RateControl>
                    <tt:H264>
                        <tt:GovLength>0</tt:GovLength>
                        <tt:H264Profile>High</tt:H264Profile>
                    </tt:H264>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:VideoEncoderConfiguration>
                <tt:AudioEncoderConfiguration token="AACAudio_cfg_token2">
                    <tt:Name>AACAudio_cfg</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>AAC</tt:Encoding>
                    <tt:Bitrate>16</tt:Bitrate>
                    <tt:SampleRate>16000</tt:SampleRate>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:AudioEncoderConfiguration>
                <tt:PTZConfiguration token="PTZConf1">
                    <tt:Name>user0</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:NodeToken>PTZ1</tt:NodeToken>
                    <tt:DefaultAbsolutePantTiltPositionSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:DefaultAbsolutePantTiltPositionSpace>
                    <tt:DefaultAbsoluteZoomPositionSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:DefaultAbsoluteZoomPositionSpace>
                    <tt:DefaultRelativePanTiltTranslationSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:DefaultRelativePanTiltTranslationSpace>
                    <tt:DefaultRelativeZoomTranslationSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:DefaultRelativeZoomTranslationSpace>
                    <tt:DefaultContinuousPanTiltVelocitySpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:DefaultContinuousPanTiltVelocitySpace>
                    <tt:DefaultContinuousZoomVelocitySpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:DefaultContinuousZoomVelocitySpace>
                    <tt:DefaultPTZSpeed>
                        <tt:PanTilt space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace" y="50" x="50"></tt:PanTilt>
                        <tt:Zoom space="http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace" x="0"></tt:Zoom>
                    </tt:DefaultPTZSpeed>
                    <tt:DefaultPTZTimeout>PT0H1M0S</tt:DefaultPTZTimeout>
                    <tt:PanTiltLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                            <tt:YRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:YRange>
                        </tt:Range>
                    </tt:PanTiltLimits>
                    <tt:ZoomLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                        </tt:Range>
                    </tt:ZoomLimits>
                </tt:PTZConfiguration>
                <tt:MetadataConfiguration token="MetaDataConf1">
                    <tt:Name>MetaDataConf1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:PTZStatus>
                        <tt:Status>true</tt:Status>
                        <tt:Position>true</tt:Position>
                    </tt:PTZStatus>
                    <tt:Events></tt:Events>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H1M0S</tt:SessionTimeout>
                </tt:MetadataConfiguration>
            </trt:Profiles>
            <trt:Profiles fixed="true" token="Profile_token3">
                <tt:Name>Profile3</tt:Name>
                <tt:VideoSourceConfiguration token="VideoSource_cfg_token3">
                    <tt:Name>VideoSource_cfg3</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>VideoSource_token3</tt:SourceToken>
                    <tt:Bounds height="180" width="320" y="1" x="1"></tt:Bounds>
                </tt:VideoSourceConfiguration>
                <tt:AudioSourceConfiguration token="AudioSource_cfg_token3">
                    <tt:Name>AudioSource_cfg3</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:SourceToken>AudioSource_token3</tt:SourceToken>
                </tt:AudioSourceConfiguration>
                <tt:VideoEncoderConfiguration token="H264Video_cfg_token3">
                    <tt:Name>H264Video_cfg3</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>H264</tt:Encoding>
                    <tt:Resolution>
                        <tt:Width>320</tt:Width>
                        <tt:Height>180</tt:Height>
                    </tt:Resolution>
                    <tt:Quality>6</tt:Quality>
                    <tt:RateControl>
                        <tt:FrameRateLimit>25</tt:FrameRateLimit>
                        <tt:EncodingInterval>50</tt:EncodingInterval>
                        <tt:BitrateLimit>256</tt:BitrateLimit>
                    </tt:RateControl>
                    <tt:H264>
                        <tt:GovLength>0</tt:GovLength>
                        <tt:H264Profile>High</tt:H264Profile>
                    </tt:H264>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:VideoEncoderConfiguration>
                <tt:AudioEncoderConfiguration token="AACAudio_cfg_token3">
                    <tt:Name>AACAudio_cfg</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:Encoding>AAC</tt:Encoding>
                    <tt:Bitrate>16</tt:Bitrate>
                    <tt:SampleRate>16000</tt:SampleRate>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H10M0S</tt:SessionTimeout>
                </tt:AudioEncoderConfiguration>
                <tt:PTZConfiguration token="PTZConf1">
                    <tt:Name>user0</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:NodeToken>PTZ1</tt:NodeToken>
                    <tt:DefaultAbsolutePantTiltPositionSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:DefaultAbsolutePantTiltPositionSpace>
                    <tt:DefaultAbsoluteZoomPositionSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:DefaultAbsoluteZoomPositionSpace>
                    <tt:DefaultRelativePanTiltTranslationSpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/TranslationGenericSpace</tt:DefaultRelativePanTiltTranslationSpace>
                    <tt:DefaultRelativeZoomTranslationSpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/TranslationGenericSpace</tt:DefaultRelativeZoomTranslationSpace>
                    <tt:DefaultContinuousPanTiltVelocitySpace>http://www.onvif.org/ver10/tptz/PanTiltSpaces/VelocityGenericSpace</tt:DefaultContinuousPanTiltVelocitySpace>
                    <tt:DefaultContinuousZoomVelocitySpace>http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace</tt:DefaultContinuousZoomVelocitySpace>
                    <tt:DefaultPTZSpeed>
                        <tt:PanTilt space="http://www.onvif.org/ver10/tptz/PanTiltSpaces/GenericSpeedSpace" y="50" x="50"></tt:PanTilt>
                        <tt:Zoom space="http://www.onvif.org/ver10/tptz/ZoomSpaces/ZoomGenericSpeedSpace" x="0"></tt:Zoom>
                    </tt:DefaultPTZSpeed>
                    <tt:DefaultPTZTimeout>PT0H1M0S</tt:DefaultPTZTimeout>
                    <tt:PanTiltLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                            <tt:YRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:YRange>
                        </tt:Range>
                    </tt:PanTiltLimits>
                    <tt:ZoomLimits>
                        <tt:Range>
                            <tt:URI>http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace</tt:URI>
                            <tt:XRange>
                                <tt:Min>-1</tt:Min>
                                <tt:Max>1</tt:Max>
                            </tt:XRange>
                        </tt:Range>
                    </tt:ZoomLimits>
                </tt:PTZConfiguration>
                <tt:MetadataConfiguration token="MetaDataConf1">
                    <tt:Name>MetaDataConf1</tt:Name>
                    <tt:UseCount>4</tt:UseCount>
                    <tt:PTZStatus>
                        <tt:Status>true</tt:Status>
                        <tt:Position>true</tt:Position>
                    </tt:PTZStatus>
                    <tt:Events></tt:Events>
                    <tt:Multicast/>
                    <tt:SessionTimeout>PT0H1M0S</tt:SessionTimeout>
                </tt:MetadataConfiguration>
            </trt:Profiles>
        </trt:GetProfilesResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetStreamUri

获取拉流地址

<?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">
  <s:Header xmlns:s="http://www.w3.org/2003/05/soap-envelope">
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsse:UsernameToken>
        <wsse:Username>admin</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">dgwFkcGfufAFGzqrtNQbSxqbCOs=</wsse:Password>
        <wsse:Nonce>WJYGxrFpp0ijRzogiS/www==</wsse:Nonce>
        <wsu:Created>2018-08-10T06:04:42Z</wsu:Created>
      </wsse:UsernameToken>
    </wsse:Security>
  </s:Header>
  <soap:Body>
    <GetStreamUri xmlns="http://www.onvif.org/ver10/media/wsdl">
      <StreamSetup>
        <!-- Attribute Wild card could not be matched. Generated XML may not be valid. -->
        <Stream xmlns="http://www.onvif.org/ver10/schema">RTP-Unicast</Stream>
        <Transport xmlns="http://www.onvif.org/ver10/schema">
          <Protocol>UDP</Protocol>
        </Transport>
      </StreamSetup>
      <ProfileToken>Profile_token1</ProfileToken>
    </GetStreamUri>
  </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header></SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <trt:GetStreamUriResponse>
            <trt:MediaUri>
                <tt:Uri>rtsp://192.168.3.2:554/live/ch0</tt:Uri>
                <tt:InvalidAfterConnect>false</tt:InvalidAfterConnect>
                <tt:InvalidAfterReboot>false</tt:InvalidAfterReboot>
                <tt:Timeout>PT0H50M0S</tt:Timeout>
            </trt:MediaUri>
        </trt:GetStreamUriResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

GetSnapshotUri

获取抓图地址

<?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">
    <s:Header
        xmlns:s="http://www.w3.org/2003/05/soap-envelope">
        <wsse:Security
            xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">sKN8tSsOotec/K2q6u4yIxbya9Y=</wsse:Password>
                <wsse:Nonce>ko3GMe7e8yvUzT3dWTNQGA==</wsse:Nonce>
                <wsu:Created>2018-08-10T06:11:04Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </s:Header>
    <soap:Body>
        <trt:GetSnapshotUri>
            <trt:ProfileToken>Profile_token1</trt:ProfileToken>
        </trt:GetSnapshotUri>
    </soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
    xmlns:wsa5="http://www.w3.org/2005/08/addressing"
    xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
    xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:ns2="http://www.onvif.org/ver10/pacs"
    xmlns:xmime="http://tempuri.org/xmime.xsd"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:tt="http://www.onvif.org/ver10/schema"
    xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
    xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
    xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
    xmlns:ns1="http://www.onvif.org/ver10/accesscontrol/wsdl"
    xmlns:ns3="http://www.onvif.org/ver10/actionengine/wsdl"
    xmlns:tad="http://www.onvif.org/ver10/analyticsdevice/wsdl"
    xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
    xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
    xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
    xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
    xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
    xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
    xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
    xmlns:vifsvr="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
    xmlns:vifsvr10="http://www.onvif.org/ver20/analytics/wsdl/AnalyticsEngineBinding"
    xmlns:vifsvr2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
    xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
    xmlns:vifsvr3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
    xmlns:vifsvr4="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
    xmlns:vifsvr5="http://www.onvif.org/ver10/events/wsdl/NotificationConsumerBinding"
    xmlns:vifsvr6="http://www.onvif.org/ver10/events/wsdl/PullPointBinding"
    xmlns:vifsvr7="http://www.onvif.org/ver10/events/wsdl/CreatePullPointBinding"
    xmlns:vifsvr8="http://www.onvif.org/ver10/events/wsdl/PausableSubscriptionManagerBinding"
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:vifsvr9="http://www.onvif.org/ver20/analytics/wsdl/RuleEngineBinding"
    xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
    xmlns:ter="http://www.onvif.org/ver10/error"
    xmlns:tns1="http://www.onvif.org/ver10/topics">
    <SOAP-ENV:Header></SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <trt:GetSnapshotUriResponse>
            <trt:MediaUri>
                <tt:Uri>http://192.168.3.2:80/mjpeg/snap.cgi?chn=0</tt:Uri>
                <tt:InvalidAfterConnect>false</tt:InvalidAfterConnect>
                <tt:InvalidAfterReboot>false</tt:InvalidAfterReboot>
                <tt:Timeout>PT0H50M0S</tt:Timeout>
            </trt:MediaUri>
        </trt:GetSnapshotUriResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

测试工具

ONVIF Device Test Tool

ONVIF Device Manager

微信号:yjkhtddx

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值