ApsaraVideo Live provides comprehensive features for you to ingest and play live streams. This topic describes the procedure of ingesting and playing a live stream.

Basic service process of ApsaraVideo Live

  1. The caster uses a video capture device to collect the content for live streaming and uses the stream ingest SDK to ingest the stream to Alibaba Cloud CDN nodes.
  2. ApsaraVideo Live uses edge ingest to ingest the stream to a specific live center of ApsaraVideo Live. CDN nodes accelerate the ingested stream to ensure the stability of the upstream transmission.
  3. ApsaraVideo Live ingests the live steam from the live center to CDN nodes.
  4. The audience uses the ApsaraVideo Player SDK to watch the ingested stream.

Procedure

No. Objective Implementation channel Operation Related API operation Documentation
1 Make preparations Console ApsaraVideo Live console
  1. Create an Alibaba Cloud account
  2. What is Domains?
  3. Activate ApsaraVideo Live and purchase resource plans
N/A N/A
2 Add domain names Console
  1. Add a domain name
  2. Verify the ownership of a domain name
  3. Configure a CNAME record
AddLiveDomain Domain names for CDN
3 Bind the domain names
  • Console
  • API
Bind the domain names
4 Configure access control policies
  • Console
  • API
BatchSetLiveDomainConfigs
5 Generate an ingest URL and a streaming URL Console Use the URL generator N/A Ingest and streaming URLs
6 Ingest the stream Stream ingest tool
  1. Download and install Open Broadcaster Software (OBS)
  2. Specify the ingest URL and stream name

For more information, see Ingest the stream.

N/A Stream ingest, stream pulling, and streaming
7 Play the stream Media player
  1. Download and install the VLC media player
  2. Specify the streaming URL

For more information, see Play and watch the stream.

N/A Stream ingest, stream pulling, and streaming

Supported streaming protocols

ApsaraVideo Live allows you to use the Real-Time Messaging Protocol (RTMP) and the Advanced Real-Time Communication (ARTC) for stream ingest and use the following protocols for live streaming: RTMP, HTTP-FLV, HTTP Live Streaming (HLS), and ARTC.

The following table compares the preceding protocols.

Protocol Latency Benefit Drawback Characteristic Applicable client Applicable scenario
RTMP 1s to 3s Low latency
  • Requires a self-developed player that supports RTMP for iOS
  • Uses non-standard TCP ports
TCP-based persistent connection PCs Live streaming without high requirements for timeliness
FLV 1s to 3s
  • Low latency
  • Allows you to use HTML5 to encapsulate and decapsulate packets for playback
Requires integration with the ApsaraVideo Player SDK TCP-based persistent connection PCs Live streaming without high requirements for timeliness
HLS More than 10 seconds
  • Provides native support for iOS, Android, and HTML5
  • Allows you to use HTML5 to encapsulate and decapsulate packets for playback
High latency HTTP-based short-lived connection PCs and mobile clients Live streaming without high requirements for timeliness, mobile clients, and HTML5 players
ARTC 1s
  • Ultra-low latency
  • Excellent response to unstable network connections
Does not support the AAC coding format and B-frames in HTML5 players (To address this drawback, you can use the real-time transcoding feature to remove B-frames and generate audio streams in the Opus format.) UDP PCs and mobile clients Live streaming with high requirements for timeliness, such as live streaming sale in e-commerce, online education, and online social communications