Streaming protocols that ApsaraVideo Live supports

  • Real-Time Messaging Protocol (RTMP): RTMP can be used for both stream ingest and live streaming. It splits audio and video streams into segments and transmits them in the form of data packets. You can encrypt the packets for transmission over the Internet to ensure confidentiality. However, it is complicated to split and assemble data into packets, which may lead to unstable transmission in high concurrency scenarios.

  • HTTP-FLV: HTTP-FLV is developed by Adobe to stream audio and videos. It encapsulates streams into the FLV format and adds header information to audio and video frames. Thanks to its simplified design, HTTP-FLV features high concurrency and low latency. The only disadvantage is that the support on the mobile phone browser is very limited, but it is used as a mobile phone end. The APP live protocol is extremely suitable.

  • HTTP Live Streaming (HLS): HLS is developed by Apple. It breaks a video stream into segments. Each segment is 5 to 10 seconds long. It also generates M3U8 playlists to manage the segments. The video downloaded from the client contains the complete data of 5 seconds to 10 seconds. Therefore, the fluency of the video is good, but it also introduces a large delay (HLS The average delay is about 10-30s). Compared with FLV,HLS supports iPhone and most Android mobile browsers, so it is often used in QQ and WeChat circle of friends. URL sharing

Comparison between RTMP, HLS, and HTTP-FLV

Advantage Disadvantage Latency Features Applicable client
RTMP Low latency Is unstable in high concurrency scenarios. Needs a self-developed player that supports RTMP for iOS. Uses non-standard TCP ports. 1 to 3 seconds TCP-based persistent connection PCs
HLS Supports using HTML5 to encapsulate and decapsulate packets for cross-platform playback. High latency > 10S HTTP-based short-lived connection PCs and mobile clients
HTTP-FLV Low latency. Supports using HTML5 to encapsulate and decapsulate packets for playback. Needs integrating player SDKs. 1 to 3 seconds TCP-based persistent connection PCs