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
- 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.
- 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.
- ApsaraVideo Live ingests the live steam from the live center to CDN nodes.
- 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 | N/A | N/A |
2 | Add domain names | Console | AddLiveDomain | Domain names for CDN | |
3 | Bind the domain names |
|
Bind the domain names | ||
4 | Configure access control policies |
|
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 |
For more information, see Ingest the stream. |
N/A | Stream ingest, stream pulling, and streaming |
7 | Play the stream | Media player |
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 |
|
TCP-based persistent connection | PCs | Live streaming without high requirements for timeliness |
FLV | 1s to 3s |
|
Requires integration with the ApsaraVideo Player SDK | TCP-based persistent connection | PCs | Live streaming without high requirements for timeliness |
HLS | More than 10 seconds |
|
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 |
|
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 |