Haikang Dahua Yushi and other network camera RTSP stream uses websecket and H5 for RTSP web page without plug-in live broadcast on demand

1. Background analysis
With the advent of the mobile Internet era, in order to adapt to the development requirements of the Internet in the field of security monitoring, domestic leading security monitoring companies (Hikvision, Dahua, Uniview) took the lead in developing EZVIZ Cloud and Lecheng Cloud Internet video cloud services, such as Internet video cloud services, provide high-quality video Internet surveillance services for the majority of individual or corporate surveillance users; in fact, whether it is established surveillance manufacturers such as Hikvision Dahua or emerging video cloud services, basically all are provided through transfer RTMP, HLS and other protocols that adapt to the development requirements of the Internet to realize the live broadcast of Internet webpages or mobile APPs. Then most of the streaming media formats output by our commonly used security devices such as network cameras (IPC) or hard disk video recorders (NVR) or GB/T28181 standard national standard security platforms are RTSP formats. The RTSP protocol is characterized by its high degree of standardization, low latency, and protocol compatibility. Strong (live and on-demand playback is supported), so that it is still the best streaming media protocol that is irreplaceable in the security industry.

2. How can RTSP live broadcast and on-demand on the browser webpage (WEB) without plug-ins
First, we can get the RTSP stream from the network camera, but this RTSP stream cannot be played directly on the webpage. Currently, it is played on the browser at the technical level There are two solutions for the RTSP protocol:

1. Install the plug-in to play the RTSP stream through the browser plug-in;
2. Play the RTSP stream through the HTML5 js engine video decoding;

at present, the first method is basically eliminated except for some security monitoring equipment manufacturers. It is because major browser manufacturers have prohibited web plug-ins one after another, and web plug-ins have various problems such as troublesome installation and poor compatibility; the
second solution cannot directly play RTSP streams directly through the H5 JS engine because H5 does not support the RTSP protocol;

3. How to play RTSP live on-demand stream through html5?
First of all, we know that the RTSP protocol is a streaming media text negotiation protocol transmitted through the TCP protocol, and RTP streaming media packets are transmitted through TCP or UDP. Therefore, we need to send the rtsp layer text protocol agent through Websocket, and pass the The Javascript engine establishes the rtsp interaction process and establishes the RTP data transmission channel;

Then send the RTP streaming media data to the WEB side through the http protocol, and then assemble the RTP data packet through the js engine and parse it, parse out the H264 and then perform soft or hardware decoding through H5, and then render and display it through the web page.

We have already implemented this process in the web page H5 plug-in-free player: liveweb player, and also supports protocols such as HTTP-FLV/WS-FLV/HLS/RTMP for live broadcast and on-demand.

Cooperating with the liveweb streaming media service, we can easily implement RTSP streaming through the Websocket protocol on the web page through H5 without plug-in live broadcast and on-demand solutions.

About liveweb streaming media
Liveweb streaming media integrated security video cloud service provides a one-stop privatized deployment video security integrated management system solution. We adhere to the concept of networking, integration, and intelligence, and adopt advanced software and hardware development technologies to solve problems such as centralized management of comprehensive security systems, multi-level networking, information sharing, interconnection, and multi-service integration.

Liveweb streaming media's original ws-rtsp streaming media live broadcast technology is compatible with traditional security streaming media and does not need to install browser plug-ins, which solves the problems of high delay in Internet access security monitoring and slow broadcasting; supports full-platform terminal H5 live broadcast On-demand (PC, Web, Android, iOS).
 

Supongo que te gusta

Origin blog.csdn.net/xiehuanbin/article/details/132495093
Recomendado
Clasificación