All Products
Search
Document Center

ApsaraVideo Live:Get started with ApsaraVideo Live

Last Updated:Nov 07, 2024

This topic describes how to use ApsaraVideo Live to stream live content.

Before you start

You can read the following topics to learn about the basic knowledge of ApsaraVideo Live:

Procedure

image

Step 1: Add an ingest domain and a streaming domain

To use ApsaraVideo Live, you must add an ingest domain and a streaming domain. The two domains cannot be the same, but can be different subdomains of a primary domain.

  1. Prepare domain names.

    • If you do not have a domain name, you can register one with Alibaba Cloud Domain Names. For more information, see Register a generic domain name.

    • If you want to provide services in the Chinese mainland, you must apply for an Internet Content Provider (ICP) number for your domain name. For more information, see ICP filing process.

      Note
      • If you want to try the basic features of ApsaraVideo Live, we recommend that you select a live center in a region outside the Chinese mainland and set the acceleration region to Outside Chinese Mainland. This eliminates the need for ICP filing.

      • If the ingest domain and streaming domain are subdomains of a primary domain, ICP filling is required only for the primary domain.

  2. Log on to the ApsaraVideo Live console.

  3. In the left-side navigation pane, click Domain Names. The Domain Management page appears.

  4. Click Add Domain.

  5. In the Add Domain Name step, configure parameters based on your business requirements.

    Important

    When you add a domain name to ApsaraVideo Live for the first time, ApsaraVideo Live verifies the ownership of the domain name. For more information, see Verify the ownership of a domain name.

    配置域名

    Show parameters

    Parameter

    Value

    Description

    Domain Type

    • Streaming Domain

    • Ingest Domain

    The type of the domain name. You can add an ingest domain or a streaming domain. This parameter cannot be modified once it is set.

    Note
    • To add an ingest domain, select Ingest Domain for the Domain Type parameter. To add a streaming domain, select Streaming Domain for the Domain Type parameter.

    • You cannot add a domain name as both an ingest domain and a streaming domain.

    Domain Name

    None

    Enter the domain name that you want to accelerate. Take note of the following items:

    • In most cases, use a subdomain as an accelerated domain name. Example: demo.aliyundoc.com.

    • ApsaraVideo Live does not support wildcard domain names, such as *.aliyundoc.com.

    • Duplicate accelerated domain names are not allowed. If the error message The specified domain already exists is displayed, check whether the domain name is added to other cloud services such as ApsaraVideo VOD, Dynamic Route for CDN (DCDN), Secure CDN (SCDN), or Video Surveillance System.

    • After you activate ApsaraVideo Live, you can add up to 20 domain names to ApsaraVideo Live for each Alibaba Cloud account. If the average daily peak bandwidth of your domain names exceeds 50 Mbit/s, you can submit a ticket to increase the quota of domain names. Make sure that the quota increase does not incur business risks. For more information about how to submit a ticket, see Contact us.

    • Content that is served from the domain name must comply with the limits of ApsaraVideo Live. For more information, see Verify a domain name.

    Note

    The specified subdomain must belong to the same Alibaba Cloud account. When you add a domain name, ApsaraVideo Live verifies the ownership of the domain name. If the specified subdomain name belongs to a different account, an error message appears.

    Acceleration Region

    Chinese Mainland

    • For an ingest domain, if the streamers are located in the Chinese mainland, select Chinese Mainland.

    • For a streaming domain, if the viewers are located in the Chinese mainland, select Chinese Mainland.

    Apply for an ICP filing from the Ministry of Industry and Information Technology of China (MIIT) for the domain name. We recommend that you use the Alibaba Cloud ICP Filing system.

    Global

    • For an ingest domain, if the streamers are located in the Chinese mainland, Hong Kong (China), Macao (China), Taiwan (China), and other countries and regions, select Global.

    • For a streaming domain, if the viewers are located in the Chinese mainland, Hong Kong (China), Macao (China), Taiwan (China), and other countries and regions, select Global.

    Apply for an ICP filing from the MIIT for the domain name. We recommend that you use the Alibaba Cloud ICP Filing system.

    Outside Chinese Mainland

    • For an ingest domain, if the streamers are located in countries and regions outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China), select Outside Chinese Mainland.

    • For a streaming domain, if the viewers are located in countries and regions outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China), select Outside Chinese Mainland.

    • If you select Outside Chinese Mainland and the live center is located outside the Chinese mainland, you do not need to apply for an ICP filing for the domain name.

    • If you select Outside Chinese Mainland and the live center is located in the Chinese mainland, you must apply for an ICP filing for the domain name. We recommend that you apply for an ICP filing by using the Alibaba Cloud ICP Filing system.

    Note

    For more information about how to select the acceleration region, see the "How do I select the acceleration region for a domain name?" section of the FAQ topic.

    Live Center

    None

    A live center provides media processing features for live streams in the cloud, such as snapshot capture, recording, transcoding, and production studio.

    The live center of an ingest domain must be located in the same region as that of the associated streaming domain. This parameter cannot be modified once it is set.

    For more information about how to select a live center, see the "How do I select a live center?" section of the FAQ topic.

  6. Note down the generated CNAME for use in the next step.

    image

Step 2: Add CNAME records to enable acceleration

To enable acceleration for ApsaraVideo Live, you must add CNAME records at your DNS provider to map your ingest domain and streaming domain to the CNAME that is assigned by ApsaraVideo Live. The following example shows how to add a CNAME record when your DNS provider is Alibaba Cloud.

Note
  • The server that Alibaba Cloud CDN uses to resolve the CNAME of a domain name is deployed in the Chinese mainland. If you configure region-specific DNS settings for your domain name, for example, you add a CNAME record for your domain name in regions outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China), the domain name cannot be mapped to the CNAME. The status of the CNAME is Pending Configuration in the Alibaba Cloud CDN console. However, CDN acceleration for the domain name is not affected.

  • CNAMEs that are assigned by Alibaba Cloud CDN, Dynamic Content Delivery Network (DCDN), ApsaraVideo Live, and ApsaraVideo VOD can be used only for domain name resolution. If Alibaba Cloud discovers that your CNAME is used for unauthorized or malicious activities, Alibaba Cloud reserves the right to close your Alibaba Cloud account and remove the domain names.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Domain Name Resolution. The Domain Name Resolution page appears.

  3. Find the domain name for which you want to add a CNAME record and click DNS Settings in the Actions column.

  4. Click Add DNS Record and configure the parameters that are described in the following table.001

    Parameter

    Description

    Record Type

    Select CNAME from the drop-down list.

    Hostname

    Specify a prefix for the domain name. For more information about regular prefixes of domain names and sample domain names, see the following table.

    DNS Request Source

    Use the default value.

    Record Value

    Enter the CNAME that you obtained.

    TTL Period

    Use the default value.

    Prefix

    Sample domain name

    Description

    demo

    demo.aliyundoc.com

    The subdomain name.

    @

    aliyundoc.com

    The root domain name.

    *

    *.aliyundoc.com

    The wildcard domain name.

  5. Click OK.

Check whether a CNAME record takes effect

  • Method 1: On the Domain Management page of the ApsaraVideo Live console, click Open Configuration Guide in the CNAME Status column of the domain name. In the CNAME Configuration Guide panel, click Verify in the Verify the CNAME record section. You can know whether the CNAME record takes effect from the verification result that is displayed.

    image

  • Method 2: Run the nslookup -type=cname yourdomain.com command. If the CNAME that is returned is the same as the CNAME that is assigned to the domain name in the ApsaraVideo Live console, the CNAME record takes effect.image

Step 3: Associate the streaming domain with the ingest domain

ApsaraVideo Live uses the edge ingest method. To ingest and play streams, you must associate the streaming domain with the ingest domain.

  1. In the left-side navigation pane, click Domain Names. On the page that appears, find the streaming domain that you added and click Domain Settings in the Actions column. The Streaming Management > Basic Settings page appears.

  2. On the Basic Settings page, click the Basic Information tab.

    On the Basic Information tab, you can view the CNAME record, the time when the domain name was created, the type of the domain name, the live center, the acceleration region, and the quota limits.基础信息

    Note
    • You can manage quotas of ApsaraVideo Live only in the China (Beijing), China (Shanghai), China (Shenzhen), and Singapore regions. To increase quotas for other live centers, submit a ticket. For more information, see Contact us.

    • For more information about how to manage quotas of ApsaraVideo Live, see Quota management.

    • For more information about how to modify the acceleration region, see the Modify the acceleration region section of this topic.

  3. Click the Stream Ingest Information tab.

  4. Click Add Stream Ingest Information or the Edit icon next to Ingest Domain and select the ingest domain that you want to associate.

(Optional) Configure SSL certificates

For security reasons, if you want to implement RTS in a native browser, you must configure Secure Sockets Layer (SSL) certificates for the ingest domain and the streaming domain. For more information, see Configure HTTPS secure acceleration.

Note

If you use RTS SDK or the RTS demo, SSL certificates are not required.

Step 4: Generate ingest and streaming URLs

Ingest and streaming URLs are used to ingest and play streams. You can use the live URL generator in the ApsaraVideo Live console to generate the URLs. For more information, see Live URL generator.

Step 5: Perform stream ingest and playback

Live stream ingest

Live stream ingest is the process of delivering the collected audio and video streams to a live center of ApsaraVideo Live. The following steps provide an example on how to ingest a stream by using OBS Studio.

  1. Download and install OBS Studio. Download link: OBS Studio.

  2. Run OBS Studio.

  3. In the menu bar, choose File > Settings.

  4. On the Settings page, click Stream and configure the following parameters.

    001

    Parameter

    Description

    Service

    Select Custom....

    Server

    Enter the generated ingest URL that is signed. Example: rtmp://demo.aliyundoc.com/app/stream?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0************.

    Stream Key

    Leave this parameter empty.

  5. Go to the homepage of OBS Studio. Find the Sources section, add a source, and then click Start Streaming.

    002

  6. (Optional) Install the Queen SDK plug-in for OBS to debug retouching effects. For more information, see User guide to the Queen SDK plug-in for OBS.

  7. In the ApsaraVideo Live console, go to the Stream Management page. On the Active Streams tab, you can view and manage the ingested audio or video stream.

Note

If you encounter issues such as stream ingest exceptions during stream ingest, you can use the troubleshooting tool to troubleshoot the issues. The tool allows you to diagnose common stream ingest issues and provides suggestions for you to resolve specific exceptions. For more information, see Troubleshooting.

Live stream playback

Live stream playback is the process of delivering a live stream from a live center of ApsaraVideo Live to a player for playback. The following steps provide an example on how to play a stream by using VLC media player.

  1. Download and install VLC media player. Download link: VLC media player.

  2. Run VLC media player.

  3. In the menu bar, choose Media > Open Network Stream....

  4. On the Network tab, enter a network URL, which is a streaming URL. Example: rtmp://example.aliyundoc.com/app/stream?auth_key=1543300311-0-0-d47ce016332bf280cf275********.

  5. Click Play.

Note

If you encounter issues such as playback exceptions during streaming, you can use the troubleshooting tool to troubleshoot the issues. The tool allows you to diagnose common stream playback issues and provides suggestions for you to resolve specific exceptions. For more information, see Troubleshooting.

References