All Products
Search
Document Center

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

Last Updated:Oct 30, 2025

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

Prerequisites

  • You have an ingest domain and a streaming domain, and 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 The Chinese Mainland, Hong Kong (China), Macao (China), And Taiwan (China), 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 the Live Streaming Service. For more information, see Activate Live Streaming Service.

  1. Log on to the , and in the top menu bar, select Products > ApsaraVideo Live to navigate to the ApsaraVideo Live product homepage.

  2. Click Activate Now to navigate to the activation page.

  3. On the ApsaraVideo Live Activation Page, select Pay-by-traffic as the billing method, and select the ApsaraVideo Live Service Agreement checkbox.

  4. Click Enable Now.

Step 2: Add an ingest domain and a streaming domain

Before you can 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

Before you can use the RTS service, you must point your ingest and streaming domains to the CNAME address that is assigned by ApsaraVideo Live. The following procedure uses Alibaba Cloud DNS as an example. For instructions on how to configure a CNAME record with other DNS providers, see Configure CNAME resolution for a domain name.

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

CNAME verification takes effect

  • Method 1: On the CNAME Configuration page, click Open CNAME Configuration Wizard. In the CNAME Verification section, click Verify CNAME Status to check whether the CNAME configuration has taken effect.

    image

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

Step 4: Associate the ingest domain with the streaming domain

To use RTS, you need to associate an ingest domain and 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, select Live+ > RTS.

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

  4. Turn on the RTS switch, and select either Sub-second Latency (400 Ms To 800 Ms End-to-end Latency) or Half-second latency (200 ms to 400 ms end-to-end latency).

    image

Sub-second latency

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

  2. Supported protocols: Supports stream ingest and playback over the Alibaba Real-Time Communication (ARTC) protocol, which is based on Web Real-Time Communication (WebRTC). It 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/playback tools: Supports common ingest and playback tools on the market. We recommend that you use the ApsaraVideo Live Push SDK and the ApsaraVideo Player SDK.

  4. Additional information: If the stream ingest contains B-frames or the audio is not encoded in Opus, the backend automatically removes the B-frames and transcodes the audio into 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 uses 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 corresponding 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 have also configured a live stream transcoding template, the system removes B-frames and transcodes to Opus in addition to this 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: End-to-end latency of 200 ms to 400 ms. This option is suitable for live streaming scenarios that require extremely low latency.

  2. Supported protocols: Supports stream ingest and playback over the ARTC protocol, which is based on WebRTC. It 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/playback tools: For stream ingest, you can use OBS to ingest streams over the WHIP protocol or use the ApsaraVideo Live Push SDK. For playback, you must use the ApsaraVideo Player SDK.

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

    • Click Relay Configuration and select an ingest domain that is associated with a streaming domain and for which neither half-second RTS mode nor dual-stream disaster recovery is enabled. This domain will receive the relayed RTMP stream. For example, if the relay receiving domain is push.example.com, and its associated streaming domain is pull.example.com. After the relay is configured, you can pull the stream from pull.example.com using standard live streaming protocols and use features such as transcoding and recording.

Note
  • It takes several minutes for the RTS configuration to be deployed across the entire network. Please wait a few minutes before you start 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 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 RTS, you can navigate to the stream ingest and playback experience tool and click Quickly Generate Ingest/Streaming URL. Enter an AppName and a StreamName to generate RTS ingest and streaming URLs.

image

Method 2: Manually construct URLs

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

Address Class

Address Format

Construction rule

Ingest URL

RTMP, RTS, and SRT formats are supported. We recommend that you use an RTMP URL for stream ingest. Example:

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

Note

RTS supports stream pulling using RTS format addresses.

Ingest Domain + AppName + StreamName + Access Token

Streaming URL

RTMP, FLV, M3U8, and RTS formats are supported. We recommend that you use an RTS URL for playback. 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, the streaming URL must be constructed using the transcoded stream URL format.

RTMP, FLV, M3U8, and RTS formats are supported. We recommend that you use an RTS URL for playback. 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 as long as 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 derived from a signing algorithm. This requires you to enable the URL signing feature. You can generate the access token using the MD5 algorithm. 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 RTS Stream Ingest And Playback Experience 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 to provide a quick experience. If you integrate the web push and playback SDKs, you also need to 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 experience 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 the security requirements of browsers and enable RTS playback, you need to configure an SSL Certificate for your ingest and streaming domains. For more information, see Configure HTTPS secure acceleration.

Note

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

Configure custom URL signing (Optional)

The URL signing feature is designed to protect your content resources from being illegally downloaded. This feature is enabled by default when you first 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 choose not 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, select Ingest/Streaming Domain Management, find a streaming domain for which the RTS feature is enabled, and in the Actions column, click Domain Settings.

  2. Select Live Management > Access Control to navigate to the Access Control page.

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

    Note

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

  4. Configure URL signing information. The following table describes the parameters.

    Configuration item

    Description

    Authentication Type

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

    Note

    If a URL signing error occurs, a 403 error is returned. Please recalculate.

    • 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 navigation pane on the left of the ApsaraVideo Live console, choose Domain Names, select the domain name you want to configure, and click Domain Settings > Access Control > URL Signing to view the primary key on the URL Signing page. You can also re-enter a custom primary key for the signing method.

    Secondary KEY

    Enter a custom secondary key for the signing method.

    Validity Period

    The validity period indicates that the signed URL can only be used to start stream ingest or playback within this period. Live stream ingest and playback are long-link behaviors. A live stream ingest or playback that has already started within the validity period will not be interrupted when the period expires. However, new ingest and playback requests will fail if the validity period has expired.

    When you add a new domain name for the first time, the default validity period is 1 day (1440 minutes). You can customize the default validity period for the signing method. The minimum value is 1 minute, with no upper limit. The unit is minutes.

Other operations: How to verify RTS latency

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

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