All Products
Search
Document Center

ApsaraVideo Live:Live subtitles (in public preview)

Last Updated:Dec 16, 2025

The live subtitles feature converts speech in live streams into subtitles through speech recognition and supports real-time translation between Chinese, English, Spanish, and Russian. This topic introduces how to use the feature.

Before you begin

  • This feature is supported in a limited number of regions. For availability, see Supported regions.

  • This feature is currently in public preview and charges no fees. After the public preview concludes, standard charges will apply. We will notify you in advance of any changes.

Procedure

image

ApsaraVideo Live adds live subtitles to streams based on the subtitle template and rule:

  • Subtitle template: It only defines subtitle configurations, including the content, layout, styling, and other visual settings. You can add up to 300 subtitle templates for an account.

  • Subtitle rule: It associates a subtitle template with live streams based on the domain name and AppName. After you configure the rule, the subtitle template is automatically applied to newly ingested live streams that match the domain name and AppName defined in the rule.

A subtitle template can be associated with multiple subtitle rules.

Step 1: Add a subtitle template

In the console

  1. Log on to the ApsaraVideo Live console.

  2. In the left-side navigation pane, select Feature Management > Live Subtitles. Then, select the Subtitle Templates tab.

  3. Select a region and click Add Subtitle Template to configure the basic settings of the subtitles.image

The console provides a preview for you to check the visual effect after adjustments. The following table describes the parameters that you can configure for the subtitle template:

Parameter

Description

Creation Method

  • Create New Subtitle Template

  • Copy Existing Subtitle Template: Select an existing template and modify the settings based on it.

Subtitle Template Name

The name of the subtitle template. It can contain digits, letters, and hyphens (-), but cannot start with a hyphen. 

Template Description

The description of the subtitle template. It can be up to 128 characters in length, and can contain letters, digits, and special characters. 

Source Language

Valid values: Chinese, English, and Russian.

Translation

Valid values: Chinese, English, Spanish, Russian, No Translation.

  • When a target language is selected, you can choose whether to display the source language.

  • When No Translation is selected, the source language must be displayed.

Maximum Lines

The maximum number of lines to display. Valid values: integers from 1 to 300.

Max Characters per Line

The maximum number of characters that can be contained in each line. Valid values: integers from 10 to 320.

Font

Valid values:

  • KaiTi

  • Alibaba PuHuiTi-Regular

  • Alibaba PuHuiTi-Bold

  • Alibaba PuHuiTi-Light

  • Source Han Sans-Regular

  • Source Han Sans-Bold

  • Source Han Sans-Light

Font Size

The size of the font.

Subtitle Background

Specifies whether to display the subtitle background. When enabled, you can configure the color and opacity of the background.

Color

The color and opacity of the text.

Resolution (Width × Height)

Preview size. Valid values:

  • Landscape Low Definition 360p (640×360)

  • Portrait Low Definition 360p (360×640)

  • Landscape Standard Definition 480p (854×480)

  • Portrait Standard Definition 480p (480×854)

  • Landscape High Definition 720p (1280×720)

  • Portrait High Definition 720p (720×1280)

  • Landscape Ultra-high Definition 1080p (1920×1080)

  • Portrait Ultra-high Definition 1080p (1080×1920)

  1. Click Submit to create the subtitle template.

  2. After the subtitle template is added, a prompt will appear that reminds you to add a subtitle rule. You can click Add Now or Later.

  3. To manage created templates, on the Subtitle Templates tab, click the desired operation in the Actions column:

    • Preview: Preview the visual effect of the subtitles.

    • Modify: Adjust the subtitle template configurations.

    • Delete: When a template is not associated with any subtitle rules (Bound Subtitle Rules=0), the button is clickable. Otherwise, it is grayed out. You must first delete the associated rule. Click Bound Subtitle Rules to view associated rules.

    • Add Subtitle Rule: Add a subtitle rule for this template. For details, see Step 2: Add a subtitle rule.

Note

Changes to subtitle templates do not affect active streams. To apply modifications or deletions, re-ingest the stream.

By API

Call the AddLiveAISubtitle operation to add a subtitle template.

ApsaraVideo Live also provides the following interfaces for managing subtitle templates:

Step 2: Add a subtitle rule

In the console

  1. Log on to the ApsaraVideo Live console.

  2. In the left-side navigation pane, select Feature Management > Live Subtitles. Then, select the Subtitle Rules tab.

  3. Select the region where the target template is created. The rule can only be applied to domain name in the same region. Then, click Add Subtitle Rule.image

Parameter

Description

Rule Description

The description of the subtitle rule. It can be up to 128 characters in length and can contain letters, digits, and special characters. 

Streaming Domain

The primary streaming domain to which the rule is applied.

AppName

The name of the application to which the live streams belongs. It must be the same as the application name specified in the ingest URL.

The value can be up to 256 characters in length and can contain digits, letters, hyphens (-), and underscores (_). 

Subtitle Templates

The subtitle template to be associated with the rule.

Output Settings

We recommend that you set the output resolution the same as the resolution defined in the subtitle template. Valid values:

  • Landscape Low Definition 360p (640×360)

  • Portrait Low Definition 360p (360×640)

  • Landscape Standard Definition 480p (854×480)

  • Portrait Standard Definition 480p (480×854)

  • Landscape High Definition 720p (1280×720)

  • Portrait High Definition 720p (720×1280)

  • Landscape Ultra-high Definition 1080p (1920×1080)

  • Portrait Ultra-high Definition 1080p (1080×1920)

Triggered by Stream Pulling

Specifies whether to trigger the subtitles by stream pulling. 

  • When enabled, ApsaraVideo Live starts generating live subtitles when stream pulling starts and stops when no stream is pulled for 5 minutes. When stream pulling restarts, live subtitles are generated again. 

  • When disabled, ApsaraVideo Live generates live subtitles when stream ingest starts, regardless of whether the stream is pulled. 

image
  1. Click Submit to create the rule.

    Note

    After you configure the subtitle rule, re-ingest the stream to display the subtitles. 

  2. To manage created rules, on the Subtitle Rules tab, click the desired operation in the Actions column:

    • Preview: Preview the visual effect of the subtitles.

    • Edit: Adjust the subtitle rule configurations.

    • Delete: Delete the subtitle rule.

By API

Call the AddLiveAIProduceRules operation to add a subtitle rule.

ApsaraVideo Live also provides the following interfaces for managing subtitle rules:

Step 3: Ingest a stream

  1. Use the URL generator in the ApsaraVideo Live console or follow the concatenation rules in code to construct an ingest URL. For more information, see Generate ingest and streaming URLs.

  2. Ingest the stream to the generated URL using OBS, Push SDK provided by ApsaraVideo Live, or other tools.

Step 4: Play the subtitle stream

  1. Use the following concatenation rules to construct a streaming URL for playing the stream with live subtitles:

    Format: Protocol + Streaming domain + AppName + StreamName_Subtitle template name + {Access token}

    Examples:

    • RTMP: rtmp://example.aliyundoc.com/app/stream_{Subtitle template name}?auth_key={Access token}

    • FLV: http://example.aliyundoc.com/app/stream_{Subtitle template name}.flv?auth_key={Access token}

    • M3U8: http://example.aliyundoc.com/app/stream_{Subtitle template name}.m3u8?auth_key={Access token}

  2. Pull the stream from the generated streaming URL using the VLC media player, ApsaraVideo Player SDK, or other tools.

Note

Live subtitle streams do not support playback over the ARTC protocol.