All Products
Search
Document Center

ApsaraVideo Live:Quick start for co-streaming

Last Updated:Nov 21, 2025

Co-streaming is a classic scenario for ApsaraVideo Real-time Communication. This topic describes how to activate and configure services to build a co-streaming scenario using the Alibaba Real-Time Communication (ARTC) software development kit (SDK) and bypass live streaming.

Activate ApsaraVideo Live

  1. Log on to the Alibaba Cloud official website and go to the ApsaraVideo Live product page. Click Activate Now.

  2. On the page that appears, click Activate.

    image

  3. On the ApsaraVideo Live buy page, select Live video traffic. For more information, see Billing of standard streaming.

  4. Read and understand Alibaba Cloud International Website Product Terms of Service and ApsaraVideo Live Service Level Agreement, then click Activate Now.

    image

Step 1: Add ingest and streaming domains

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

For example, you can use a.test.com as the ingest domain and b.test.com as the streaming domain.

Add domain names:

  1. Prepare domain names.

    • If you do not have one, register one with Alibaba Cloud Domain Names

    • To provide services in the Chinese mainland, you must apply for an Internet Content Provider (ICP) number for your domain name.

      Note
      • To try the basic features, 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 and streaming domains are subdomains, ICP filling is required only for the primary one.

  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.

    To add a subdomain, append a prefix to the domain name you have registered. The subdomain does not require separate registration. Ensure you can differentiate between the ingest and streaming subdomains.

  5. In the Add Domain Name step, configure parameters as needed.

    Important

    When you add a domain name for the first time, ApsaraVideo Live verifies its ownership.

    配置域名

    Show parameters

    Parameter

    Valid value

    Description

    Domain Type

    • Streaming Domain

    • Ingest Domain

    The type of the domain name. It cannot be modified once set.

    Note

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

    Domain Name

    N/A

    Enter the domain name that you want to accelerate. Note the following:

    • 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.

    • You can add up to 20 domain names to ApsaraVideo Live for each 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.

    • Content served from the domain name must meet the compliance requirements of ApsaraVideo Live.

    Note

    The specified subdomain must belong to the same Alibaba Cloud account. If not, an error message appears.

    Acceleration Region

    • Chinese Mainland

    • Global

    • Outside Chinese Mainland

    If the streamers or viewers are located in the Chinese mainland, select Chinese Mainland.

    If they are located around the world, select Global.

    If they are located in countries and regions outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China), select Outside Chinese Mainland.

    In the following cases, ICP filing is required:

    • Acceleration Region is set to Chinese Mainland or Global.

    • Acceleration Region is set to Outside Chinese Mainland, but the selected live center is in Chinese Mainland.

    For further guidance, see How do I select the acceleration region for a domain name?

    Live Center

    See Supported regions.

    A live center provides media processing services 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 further guidance, see How do I select a live center.

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

    image

Step 2: Add CNAME records to enable acceleration

To accelerate content delivery in ApsaraVideo Live, add the CNAME record at your DNS provider to map your domain name to the CNAME 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 is deployed in the Chinese mainland. If you configure region-specific DNS settings for your domain name, for example, you add a CNAME record 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 assigned by Alibaba Cloud CDN, DCDN, ApsaraVideo Live, and ApsaraVideo VOD can be used only for domain name resolution. If Alibaba Cloud detects 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 Authoritative DNS Resolution.

  3. Find the domain name you want to manage and click DNS Settings in the Actions column. image

  4. Click Add DNS Record and configure the following information: image

    Parameter

    Description

    Record Type

    Select CNAME from the drop-down list. 

    Hostname

    Specify a prefix for the domain name. For common prefixes, 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

    Example

    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: Click CNAME Configuration Guide. In the right-side panel, click Verify in the Verify the CNAME record section.

    image

  • Method 2: Run the nslookup -type=cname yourdomain.com command. If the returned result is consistent with the CNAME value of the domain name in the ApsaraVideo Live console, the CNAME configuration takes effect. image

(Optional) Configure SSL certificates

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

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. You are directed to Streaming Management > Basic Settings.

  2. Click the Stream Ingest Information tab.

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

Step 4. Create an ApsaraVideo Real-time Communication application

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Live + > ApsaraVideo Real-time Communication > Applications.

  3. On the Applications page, click ed34559efbe60c8073c93d6038eaaeaa.

  4. Enter a custom Instance Name, select the Terms of Service checkbox, and then click Buy Now.

  5. After a success message appears, refresh the Applications page to view the created co-streaming application.

    Note

    Creating an application is free of charge. You are charged on a pay-as-you-go basis for your actual usage. For more information, see Audio and video call pricing.

Step 5. Integration and development

To integrate the SDK, see SDK download and integration.

For native client development, see Co-streaming development guide.

Ingest and streaming URLs for relaying to acceleration nodes

To use bypass streaming to relay streams to acceleration nodes, you must provide an ingest URL. For more information about how to generate the URL, see Generate streaming URLs

Configure HTTPS and HTTP headers for domain names (Optional)

If you have viewers who use web clients for playback, you must configure HTTPS secure acceleration for the streaming domain and allow cross-origin requests. This is because of the security policies of browsers.

To allow cross-origin requests, configure the Access-Control-Allow-Origin parameter. For more information, see Configure HTTP headers.