EasyNVR web camera without plug-H5, Google Chrome broadcast program -Onvif (b) the use Onvif RTSP protocol address acquisition device

Creative Commons License Creative Commons

Background

EasyNVR biggest advantage is compatibility, RTSP protocol access through traditional network cameras, NVR, encoders, etc., using the RTSP protocol access is compatible with the vast majority of network cameras available in the market such as source devices, hardware devices to maximize the overall program to improve compatibility, avoid the use of effective individual hardware manufacturers to customize SDK cumbersome and not common problem; the one we found Describe Onvif network device, as well as how to detect the device specific information EasyNVR-Onvif (a) using the protocol Onvif for device discovery, and device information specified probe

This article explains how to obtain important information, address of the device is streaming (RTSP address)

1. Process

To get the device RTSP address, you first need to get to Device Service Address equipment, that is, on the one mentioned above. If you need to get further information, this device also need to know the user name and password, or can not proceed.

  • The ability to obtain equipment Capabilities

The ability to obtain equipment, and can get to the Media and PTZ URL, use both URL can be streamed and PTZ operation


    _tds__GetCapabilities* capabilities = soap_new__tds__GetCapabilities(proxyDevice, -1);    
     
    tt__CapabilityCategory* category = new tt__CapabilityCategory;
    capabilities->Category = category;
    *(capabilities->Category) = tt__CapabilityCategory__All;
    _tds__GetCapabilitiesResponse* response = soap_new__tds__GetCapabilitiesResponse(proxyDevice, -1);
    if (SOAP_OK == proxyDevice->GetCapabilities(capabilities, response))
    {
	    if (response->Capabilities)
	{
		//Media URI: response->Capabilities->Media->XAddr;
		//PTZ URI: response->Capabilities->PTZ->XAddr;
	   }
    }

  • Gets Media Profile

The use of step acquired Media URI acquisition device Media Profile


    _trt__GetProfiles* getProfiles = soap_new__trt__GetProfiles(proxyMedia, -1);
    _trt__GetProfilesResponse* response = soap_new__trt__GetProfilesResponse(proxyMedia, -1);
    if (SOAP_OK == proxyMedia->GetProfiles(getProfiles, response))
    {
	    int size = response->__sizeProfiles;
	    for (int i = 0; i < size; ++i)
	    {
		  if (response->Profiles[i])
		  {
			//Media Profile Token: response->Profiles[i]->token;
			//一般设备包含多个Profile Token,包含主码流、子码流、第三码流
		 }
	   }
    }

  • 获取 Media Uri

Using the acquired Media URI and Media Profile Token acquire the corresponding Media Uri, namely RTSP address


    MediaBindingProxy* proxyMedia = new MediaBindingProxy;
    proxyMedia->soap_endpoint = mediaUrl.c_str();
    _trt__GetStreamUri* getStreamUri = soap_new__trt__GetStreamUri(proxyMedia, -1);
    tt__StreamSetup* streamSetup = soap_new_tt__StreamSetup(proxyMedia, -1);
    getStreamUri->StreamSetup = streamSetup;
    getStreamUri->StreamSetup->Stream = tt__StreamType__RTP_Unicast;
    tt__Transport* transport = soap_new_tt__Transport(proxyMedia, -1);
    getStreamUri->StreamSetup->Transport = transport;
    getStreamUri->StreamSetup->Transport->Protocol = tt__TransportProtocol__RTSP;
    _trt__GetStreamUriResponse* response = soap_new__trt__GetStreamUriResponse(proxyMedia, -1);

    if (!profile.empty())
    {
	    getStreamUri->ProfileToken = const_cast<char*>(profile.c_str());
	    if (security(proxyMedia, username, password))
	    {
		     if (proxyMedia->GetStreamUri(getStreamUri, response) == SOAP_OK)
		    {
			    //RTSP地址: response->MediaUri->Uri
		    }
	    }
    }

Address can be acquired to conduct an RTSP streaming operated

professional team

In order to ensure normal and stable operation of our servers, EasyNVR a professional operation and maintenance (pre-sales support, business consulting, and maintenance) team, ready to respond quickly to customers deal with various contingencies, to ensure the smooth progress of the Internet broadcast. We also hope to achieve "delay 0", but the ideal full, the reality skinny. A perfect live behind every need devices, networks, and other processes with the completion of concurrency, so-called "butterfly effect", a small part will have any impact on the broadcast delay, EasyNVR team to do is to constantly improve the development of Internet Broadcast System to ensure that live low-latency, stability, and high-definition video playback smooth.
professional team

EasyNVR security cameras web streaming service

EasyNVR have is a full, independent, controllable intellectual property rights, but also can have the function of security software and hardware integration of Internet streaming media server, network camera through a simple channel configuration, monitoring industry inside traditional high-definition network camera IP Camera , etc. with the NVR RTSP, Onvif protocol output device access to EasyNVR, EasyNVR these audio and video data can be video sources is a pull, is converted to RTMP / HLS, full internet terminal H5 live (Web, Android, iOS), and EasyNVR able to broadcast live video source of data to a third party CDN network, Internet-scale distributed. EasyNVR details you may visit the official website: http://www.easynvr.com
EasyNVR scenarios

Smart City

EasyNVR scenarios

Classic Case

Guess you like

Origin blog.csdn.net/EasyNVR/article/details/91948145