All Products
Search
Document Center

ApsaraVideo Live:Real-Time Streaming (RTS) Quick Start

Last Updated:Nov 27, 2025

ApsaraVideo Live provides Real-Time Streaming (RTS), which reduces standard live streaming latency from 3–6 seconds to the millisecond level. It also improves resistance to packet loss. RTS is suitable for scenarios that require low latency and a high level of interaction, such as e-commerce live streaming, online education, live sports, and live shows. This topic describes how to quickly implement RTS.

Prerequisites

  • You have an ingest domain and a streaming domain for which you have completed the required Internet Content Provider (ICP) filing. For more information, see .

    Note
    • If your live center is located outside the Chinese mainland and the acceleration region is set to Outside Chinese Mainland, you do not need to apply for an ICP filing for your domain names.

    • If the ingest domain and the streaming domain are second-level domain names under the same primary domain name, you only need to apply for an ICP filing for the primary domain name.

Basic workflow of RTS

  1. Step 1: Activate ApsaraVideo Live

  2. Step 2: Add an ingest domain and a streaming domain

  3. Step 3: Configure a CNAME record

  4. Step 4: Associate the ingest domain with the streaming domain

  5. Step 5: Enable the RTS feature

  6. Step 6: Generate ingest and streaming URLs

  7. Step 7: Start stream ingest and playback for RTS

  8. Configure an SSL certificate (Optional)

  9. Configure custom URL signing (Optional)

Step 1: Activate ApsaraVideo Live

Note

You can watch a video tutorial to learn how to activate ApsaraVideo Live. For more information, see Activate ApsaraVideo Live.

  1. Log on to the ApsaraVideo Live console.

  2. Click Activate Now to open the activation page. Select Pay-by-traffic as the billing method, and then select the ApsaraVideo Live Terms Of Service checkbox.

  3. Click Activate Now.

Step 2: Add an ingest domain and a streaming domain

Before you use the RTS service, you must add an ingest domain and a streaming domain.

Note

You can watch a video tutorial to learn how to add a domain name. For more information, see Add a domain name.

  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 3: Configure a CNAME record

To enable the ApsaraVideo Live acceleration service, you must point your domain name to the CNAME address that is assigned by ApsaraVideo Live. The following procedure uses Alibaba Cloud DNS as an example.

Note
  • The servers that Alibaba Cloud CDN uses to verify DNS records for domain names are deployed in the Chinese mainland. If you configure DNS records by region for a domain name, for example, you configure a CNAME for Alibaba Cloud CDN only for regions outside the Chinese mainland (such as Hong Kong (China), Macao (China), and Taiwan (China)), the verification servers cannot resolve the CNAME. In this case, the CNAME status of the domain name is displayed as To Be Configured in the CDN console. This does not affect the CDN acceleration service.

  • The CNAMEs for Alibaba Cloud CDN, DCDN, ApsaraVideo Live, and ApsaraVideo VOD can only be used for scheduling and resolution by Alibaba Cloud CDN. Alibaba Cloud reserves the right to suspend the domain names and accounts that use CNAMEs maliciously.

  1. Log on to Alibaba Cloud DNS for public authoritative zones.

  2. In the navigation pane on the left, choose Authoritative DNS Resolution to open the domain name resolution page.

  3. Find the domain name that you want to configure and click Resolution Settings in the Actions column.image

  4. Click Add Record and configure the parameters as described in the following table:image

    Parameter

    Description

    Record type

    Select CNAME to point a domain name to another domain name.

    Host record

    Enter the prefix of the domain name. Common prefixes and their corresponding example domain names are shown in the table below.

    Parsing request source

    Select the default value.

    Record value

    Enter the CNAME value for the record.

    TTL

    Select the default value.

    Prefix

    Example domain name

    Description

    demo

    demo.aliyundoc.com

    Parses a subdomain.

    @

    aliyundoc.com

    Parses the primary domain name.

    *

    *.aliyundoc.com

    Enables wildcard DNS.

  5. Click Confirm to complete the CNAME configuration.

Verify that the CNAME record is effective

  • Method 1: On the Add CNAME Record page, click CNAME Configuration Guide. In the CNAME Verification section, click Verify to check whether the CNAME configuration is effective.

    image

  • Method 2: Run the nslookup -type=cname yourdomain.com command. If the result matches the CNAME value for the domain in the ApsaraVideo Live console, the CNAME configuration is effective.image

Configure an SSL Certificate (optional)

If you want to play live streams in a browser, you must configure an SSL certificate for the stream ingest and playback domain names. This is required for browser security. For more information, see Configure HTTPS secure acceleration.

Step 4: Associate an ingest domain and a streaming domain

To use RTS, you must associate an ingest domain with a streaming domain.

Note

You can watch a video tutorial to learn how to associate an ingest domain with a streaming domain. For more information, see Associate an ingest domain with a streaming 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 5: Enable the RTS feature

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Live + > RTS.

  3. Select the streaming domain for which you want to enable RTS.

  4. Turn on the RTS switch and select Sub-second (End-to-End Latency: 400-800 ms) or Half-second (End-to-End Latency: 200-400 ms).

    image

Sub-second latency

  1. Features: This option provides an end-to-end latency of 400 ms to 800 ms and high compatibility. It is suitable for low-latency live streaming scenarios that require compatibility with standard live streaming and other ingest and playback protocols.

  2. Supported protocols: It supports stream ingest and playback over the Alibaba Real-Time Communication (ARTC) protocol, which is based on Web Real-Time Communication (WebRTC). This option is forward compatible with standard live streaming and supports the RTMP ingest protocol, origin fetch, and common playback protocols such as RTMP, FLV, and HLS.

  3. Ingest and playback tools: It supports common ingest and playback tools. We recommend that you use the ApsaraVideo Live Push SDK and the ApsaraVideo Player SDK.

  4. Additional information: If the ingested stream contains B-frames or the audio is not encoded in Opus, the backend automatically removes the B-frames and transcodes the audio to Opus for HTML5 playback. This process incurs live stream transcoding fees.

    When you use the Alibaba Cloud Web SDK for playback, the underlying native WebRTC does not support B-frames and requires Opus for audio encoding and decoding. To ensure a good playback experience, the system automatically triggers transcoding based on the ingested stream content:

    • If the ingested stream contains B-frames and AAC-encoded audio, the system automatically triggers video transcoding to remove B-frames and audio transcoding from AAC to Opus. You are charged standard video transcoding fees based on the tier that corresponds to the source resolution.

    • If the ingested stream does not contain B-frames but contains AAC-encoded audio, the system automatically triggers audio transcoding from AAC to Opus. You are charged for audio-only transcoding.

    • If you also configure a live stream transcoding template, the system removes B-frames and transcodes to Opus in addition to applying the template. You are charged transcoding fees based on the combined result.

    When you use the Alibaba Cloud Native SDK for playback, this SDK natively supports B-frames and AAC. Therefore, automatic transcoding is not triggered and no extra fees are incurred.

Half-second latency

  1. Features: This option provides an end-to-end latency of 200 ms to 400 ms. It is suitable for live streaming scenarios that require extremely low latency.

  2. Supported protocols: It supports stream ingest and playback over the ARTC protocol, which is based on WebRTC. This option is not compatible with standard live streaming and does not support the RTMP ingest protocol, origin fetch, or common playback protocols such as RTMP, FLV, and HLS.

  3. Ingest and playback tools: For stream ingest, you can use the WHIP protocol with OBS or the ApsaraVideo Live Push SDK. For playback, you must use the ApsaraVideo Player SDK.

  4. Other notes: This streaming domain does not support cloud features such as transcoding and recording. However, you can use the Relay Configuration to relay the live stream to another streaming domain.

    • Click Configure Stream Relay and select an ingest domain that is associated with a streaming domain and that does not have half-second RTS mode or dual-stream disaster recovery enabled. This domain receives the relayed RTMP stream. For example, if the relay receiving domain is push.example.com and its associated streaming domain is pull.example.com, you can pull the stream from pull.example.com using standard live streaming protocols to use features such as transcoding and recording after you configure the relay.

Note
  • The RTS configuration takes several minutes to be deployed across the network. We recommend that you wait a few minutes before testing.

  • To associate one ingest domain with multiple streaming domains, see Associate primary and secondary streaming domains.

  • RTS and standard live streaming can share a streaming domain. However, because RTS uses the UDP protocol and standard live streaming uses the TCP protocol, their underlying technologies differ. We recommend that you use a separate streaming domain for RTS.

Step 6: Generate ingest and streaming URLs

Method 1: Generate URLs in the console

After you enable Real-Time Streaming (RTS), navigate to the stream ingest and playback experience tool and click Generate URLs. Then, enter an AppName and a StreamName to generate ARTC protocol RTS ingest and streaming URLs.

image

Method 2: Manually construct URLs

When you manually construct ingest and streaming URLs, you must determine whether the live stream is transcoded and whether URL signing is enabled. You also need the ingest domain, streaming domain, AppName, StreamName, transcoding template ID (if applicable), and access token (if applicable). The following table describes the URL construction rules.

Address Class

Address format

Construction rule

Ingest URL

RTMP, RTS, and SRT protocols are supported. Use an RTMP URL for stream ingest. For example:

RTMP: rtmp://demo.aliyundoc.com/app/stream?auth_key={access_token}

Note

RTS supports stream pulling with addresses in the RTS format.

Ingest domain + AppName + StreamName + Access token

Streaming URL

RTMP, FLV, M3U8, and RTS protocols are supported. Use an RTS URL for playback. For example:

RTS: artc://example.aliyundoc.com/app/stream?auth_key={access_token}

Streaming domain + AppName + StreamName + Access token

Transcoded stream URL

Note

A transcoded stream URL is generated only if you configure a transcoding template. If you use a transcoded stream, you must construct the streaming URL using the transcoded stream URL format.

RTMP, FLV, M3U8, and RTS protocols are supported. Use an RTS URL for playback. For example:

RTS: artc://example.aliyundoc.com/app/stream_{transcoding_template_ID}?auth_key={access_token}

Streaming domain + AppName + StreamName_Transcoding template ID + Access token

Note
  • For associated ingest and streaming domains, you can start stream ingest and playback if the AppName and StreamName are the same for both.

  • A transcoded stream URL is generated only after you set a transcoding template. You can view the transcoding template ID in the console. For more information, see Live stream transcoding.

  • The access token (auth_key) is an encrypted string that is generated by a signing algorithm. This requires the URL signing feature to be enabled. You can use the MD5 algorithm to calculate the access token. For more information, see Components of a signed URL.

  • When you manually construct a URL, replace {transcoding_template_ID} or {access_token} with the actual data. Do not include the curly braces {}.

Step 7: Start stream ingest and playback for RTS

After you enable RTS and generate ingest and streaming URLs, you can use the Try RTS tool to quickly test stream ingest and playback. You can choose to ingest a stream from your camera or by sharing your screen.

Note

The stream ingest and playback experience tool in the console uses a proxy signaling domain name for a quick trial. If you integrate the web ingest and playback SDK, you must also configure an SSL certificate and the correct Access-Control-Allow-Origin response header for the ingest and streaming domains.

image

In addition to this quick trial method, Alibaba Cloud RTS provides mobile and web demos that you can try.

The following SDKs are also available for integration:

SDK type

References

Mobile

Native RTS stream ingest and playback

Web

Web RTS stream ingest and playback

Note

If playback issues occur, you can use the self-service troubleshooting tool to diagnose them. This tool can quickly diagnose common live playback issues and provide solutions. For more information, see Self-service troubleshooting.

Configure an SSL certificate (Optional)

To meet browser security requirements and enable Real-Time Streaming (RTS) playback, you must configure an SSL certificate for your stream ingest and playback domain names. For more information, see Configure HTTPS secure acceleration.

Note

If you use the RTS stream ingest and playback SDKs or demos, you do not need to configure an SSL certificate.

Configure custom URL signing (Optional)

The URL signing feature protects your site's content from unauthorized downloads. This feature is enabled by default when you add a domain name.

After you enable URL signing, you can use the default signing method or a custom one. The default method requires no configuration. If you do not want to use the default configuration, you can customize the Primary Key, Secondary Key, and Validity Period, and enter the original URL.

Note

You can watch a video tutorial to learn how to configure URL signing. For more information, see Configure URL signing.

  1. In the navigation pane on the left, choose Domain Names, select a streaming domain for which the RTS feature is enabled, and click Domain Settings in the Actions column.

  2. Choose Streaming Management > Access Control to open the Access Control page.

  3. Click the URL Signing tab, and then click Modify.

    Note

    If URL signing is enabled, click Modify to configure URL signing information. If you previously disabled URL signing, turn on the URL Signing switch to configure the information.

  4. Configure URL signing information. The following table describes the configuration items.

    Configuration item

    Description

    Authentication Type

    ApsaraVideo Live streaming domains support only signing method A to effectively protect origin resources.

    Note

    If a URL signing error occurs, a 403 error is returned. Recalculate the signature.

    • MD5 calculation error

      For example: X-Tengine-Error:denied by req auth: invalid md5hash=de7bfdc915ced05e17380a149bd760be

    • Timestamp error

      For example: X-Tengine-Error:denied by req auth: expired timestamp=1439469547

    Primary Key

    When you add a domain name, the console randomly generates a primary key. In the left navigation bar of the ApsaraVideo Live console, select Domains, select the domain name that you want to configure, and click Domains > Access Control > URL Signing to view the primary key on the URL Signing page. You can also change the primary key for the authentication method.

    Secondary Key

    Enter a custom secondary key for the signing method.

    Validity Period

    A signed URL can be used to start stream ingest or playback only within its validity period. Live stream ingest and playback are long-link behaviors. An active stream ingest or playback session is not interrupted if the validity period expires. However, new requests for stream ingest or playback fail after the validity period expires.

    When you add a new domain name for the first time, the default validity period is 1 day (1440 minutes). Set a custom default validity period, in minutes, for the URL signing method. The period must be at least 1 minute and has no upper limit.

Other operations: How to verify RTS latency

You can add a time calibrator URL to your stream ingest and compare the time displayed on the stream with a standard time source to verify the latency of RTS. This procedure uses OBS Studio as an example.

On the OBS main interface, in the Sources section, add a browser source and enter the time calibrator URL. Then, click Start Streaming.