Solution 1: H5 + WebSocket_rtSP_proxy implements live video streaming

Streamedian provides a technical solution of “HTML5_RtSP_Player + websock_rtSP_proxy”, which can play RTSP video streams directly through the HTML5 video tag.

The whole architecture is shown in the figure below, which is divided into two parts: server side and browser side:

Scheme 2: Transfer RTSP to RTMP server, transfer HTTP-FLV, and the player uses FLv.js to play

Flv.js will reuse the FLV file transfer code into ISO BMFF (MP4 fragment) fragments after obtaining the AUDIO and Video data in FLV format, and then pass the FLV file transfer code to the native HTML5 Video tag for playback through Media Source Extensions API.

Flv.js is written using ECMAScript 6 and then compiled into ECMAScript 5 with the Babel Compiler, packaged using Browserify.

The reasons why FLV.js obtains FLV from the server and then decapsulates it and forwards it to the Video label are as follows:

  • Compatible with current live broadcast schemes: Most of the audio and video services of current live broadcast schemes use FLV container format to transmit audio and video data.
  • FLV format is simple, compared with MP4 format conversion and packaging is simple, performance is also advantageous, parsing faster and more convenient.

Scheme 3: Transfer RTSP to RTMP and then to HLS. The player uses video.js to play

Video.js is a web Video player that supports HTML5 and Flash. There are also custom skins, plug-ins, components, languages and a wealth of options to configure.

Solution 4: Play the third-party plug-in of VLC or SmartPlayer

VLC no more to say, almost do streaming media developers know that SmartPlayer is daniu live SDK (Github) playback plug-in, delay and function experience better.

The advantage of plug-in mode is that it does not need secondary conversion and is played directly in the form of ActiveX control. The delay is very low. The disadvantage is that only Internet Explorer is supported.

Scheme 5: Transfer from RTSP to WebRTC

Browser support for WEbrTC is good, especially for H264 encoding, which is already supported by several major browsers. Webrtc uses SRTP for media data transmission, so we only need to send the load data in RTP to the browser through the WEBRTC channel, and the browser only needs to play through the video tag. At present, RTSP to WEBRTC is better adapted to the browser, and the delay is relatively low.