National standard GB28181 streaming media, how to implement web live broadcast with H265 camera

Introduction
In the current security monitoring industry, basically all cameras support H264 encoding, but some cameras have begun to support H265, and more and more cameras support H265. H265 has many advantages over H264, including higher compression, smaller bandwidth consumption for network transmission, and clearer H265 video at the same bit rate. H264 can currently be decoded and played in various web browsers and clients, but H265 is not yet supported by most browsers and cannot be played directly on the web.

Achieve the goal
In order to eventually play directly on various terminals, it is best to change the encoding format from H265 to H264 directly on the camera and NVR.
If it cannot be modified for various reasons, it can only be accessed through H265. In this way, you can only convert H265 to H264 yourself to be compatible with various browsers.

The following is the logical idea:
We connect the camera, hard disk recorder or other video platform to the liveweb streaming media platform through the GB28181 protocol. When requesting to play the video, the device uses GB28181 Send the video data to the liveweb streaming media platform in the form of PS stream. After receiving the PS stream, Demux outputs the video data and obtains naked H265 or H264 and audio data. If it is a video in H265 format, the liveweb streaming media platform can choose to convert it into H264 through hard decoding and hard coding, and finally encapsulate H264 and audio data into a variety of common streaming formats for Internet live broadcasts: RTMP, HTTP-FLV, HLS, RTSP format, distributed to various playback terminals.

Guess you like

Origin blog.csdn.net/xiehuanbin/article/details/134998485
Recommended