All Products
Search
Document Center

ApsaraVideo Live:Live subtitles (public preview)

Last Updated:Mar 26, 2026

ApsaraVideo Live provides a live subtitles feature that uses real-time speech recognition to convert audio from a live stream into subtitles. This feature also supports translation between Chinese, English, Spanish, and Russian. This topic describes how to use the live subtitles feature, including its workflow and trigger methods.

Usage notes

  • For information about the regions that support the live subtitles feature, see Regions.

  • The live subtitles feature is in public preview. A single user can add up to 300 subtitle templates. A subtitle template can be associated with multiple subtitle rules.

  • A subtitle template defines subtitle properties, such as content and layout, but not its association with a streaming domain or AppName.

  • After configuring a subtitle template, you must create a subtitle rule that uses it. In the rule, specify a streaming domain and an AppName. The AppName must match the AppName in the ingest URL. Subtitles appear in the stream only after you restart the stream ingest.

  • The live subtitles feature is a paid service that is free of charge during the public preview. Standard billing will apply after the public preview ends. You will be notified of the specific date in advance.

Procedure

image

Step 1: Add a subtitle template

Console

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Management > Real-time Subtitles. On the Real-time Subtitles page, select the Subtitle Templates tab.

  3. Select the region where you want to configure the subtitle template, and then click Add Subtitle Template to configure the subtitle template.image

You can view the subtitle effect in the preview area. Adjust settings such as the preview video resolution, subtitle size, and position to preview the effect in real time. The following table describes the parameters for a subtitle template.

Parameter

Description

Creation method

  • Create New Subtitle Template: Create a custom subtitle template from scratch.

  • Copy Existing Subtitle Template: Select an existing subtitle template to copy its parameters and quickly create a new template.

Subtitle template name

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

Template description

A description of the subtitle template. The description can contain up to 128 characters, including Chinese characters, English letters, digits, and symbols.

Source language

Supported languages: Chinese, English, and Russian.

Translation

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

  • If you select Chinese, English, Spanish, or Russian as the target language, you can choose whether to display the source language.

  • If you select No Translation, the source language must be displayed.

Maximum lines

The maximum number of lines to display. The value must be an integer from 1 to 300.

Max characters per line

The maximum number of characters per line. The value must be an integer from 10 to 320.

Font

The font for the subtitles. 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

If enabled, you can set the background color and opacity. If disabled, the background is hidden.

Color settings

Set the color and opacity of the subtitles and their background.

Resolution (width × height)

The resolution of the preview video. Valid values:

  • Landscape LD (360p) 640×360

  • Portrait LD (360p) 360×640

  • Landscape SD (480p) 854×480

  • Portrait SD (480p) 480×854

  • Landscape HD (720p) 1280×720

  • Portrait HD (720p) 720×1280

  • Landscape FHD (1080p) 1920×1080

  • Portrait FHD (1080p) 1080×1920

  1. Click Submit to complete the configuration.

  2. After the subtitle template is added, a dialog box prompts you to add a subtitle rule. You can click Add to add a subtitle rule for this template. If you do not need to add a subtitle rule at this time, you can click Later.

  3. On the Subtitle Templates tab, find the template that you want to manage. In the Actions column, you can click Preview, Modify, or Delete.

    Actions

    Description

    Preview

    Preview the actual effect of the subtitles.

    Modify

    Modify the parameters of the subtitle template.

    Delete

    • On the subtitle template list page, if the value in the Bound Subtitle Rules column is 0, the template is not bound to any subtitle rules. You can click Delete to delete the template.

    • If a template is bound to one or more subtitle rules (the value in the Bound Subtitle Rules column is not 0), the Delete button is disabled. You must first delete the subtitle rules bound to this template before you can delete the template. You can click the number in the Bound Subtitle Rules column to view the bound subtitle rules.

    Add Subtitle Rule

    Add a subtitle rule for this template and configure its parameters. For more information, see Step 2: Add a subtitle rule.

    Note

    Changes to a subtitle template do not affect active live streams. To apply the changes, you must restart the stream ingest.

API

You can use the following API operations to configure subtitle templates.

API

Reference

AddLiveAISubtitle

Add a live subtitle template

DeleteLiveAISubtitle

Delete a subtitle template

UpdateLiveAISubtitle

Update a subtitle template

DescribeLiveAISubtitle

Query subtitle templates

Step 2: Add a subtitle rule

Console

  1. Log on to the ApsaraVideo Live console.

  2. In the navigation pane on the left, choose Feature Management > Real-time Subtitles. On the Real-time Subtitles page, select the Subtitle Rules tab.

  3. Select the region where you want to configure the subtitle rule. After you select a region, you can configure only the domains and subtitle templates within that region. Then, click Add Subtitle Rule.image

The following table describes the parameters for a subtitle rule.

Parameter

Description

Rule description

A description of the subtitle rule, up to 128 characters long. It can contain Chinese characters, English letters, digits, and symbols.

Streaming domain

Select the primary streaming domain to which you want to apply the rule.

AppName

The name of the application for the stream. For the subtitle template to take effect, the AppName must be the same as the AppName in the ingest URL. The name can be up to 256 characters long and can contain digits, letters, hyphens (-), and underscores (_).

Subtitle template

Select a configured subtitle template. If no template is available, add one first. For more information, see Step 1: Add a subtitle template.

Output settings

For best results, align the output resolution in the subtitle rule with the resolution set in the subtitle template. The following output resolutions are supported for the subtitled stream:

  • Landscape LD (360p) 640×360

  • Portrait LD (360p) 360×640

  • Landscape SD (480p) 854×480

  • Portrait SD (480p) 480×854

  • Landscape HD (720p) 1280×720

  • Portrait HD (720p) 720×1280

  • Landscape Full HD 1080p 1920x1080

  • Portrait FHD (1080p) 1080×1920

Triggered by stream pulling

Defines when the subtitled stream is generated.

  • Enabled: Subtitles are generated only when the live stream is being pulled for playback. If there is no stream pulling for 5 minutes, subtitle generation stops. It restarts when stream pulling resumes.

  • Disabled: Subtitles are generated as long as stream ingest is active, regardless of viewer activity.

image
  1. Click Submit to complete the rule configuration.

    Note

    After a subtitle rule is configured, you must restart the stream ingest for subtitles to appear in the stream.

  2. On the Subtitle Rules tab, find the rule you want to manage. In the Actions column, click Preview, Edit, or Delete.

    • Preview: Preview the actual effect of the subtitles.

    • Edit: Modify the parameters of the subtitle rule.

    • Delete: Delete the subtitle rule.

API

You can use the following API operations to configure subtitle rules.

API

Reference

AddLiveAIProduceRules

Add a live subtitle rule

UpdateLiveAIProduceRules

Update a live subtitle rule

DescribeLiveAIProduceRules

Query subtitle rules

DeleteLiveAIProduceRules

Delete a subtitle rule

Step 3: Ingest a live stream

Generate an ingest URL by using the URL generator in the console or by manually constructing it. For more information, see Generate ingest and streaming URLs.

Step 4: Play the subtitled stream

To play the subtitled stream, use its specific URL. Append _{subtitle_template_name} to the StreamName.

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

Note

Subtitled streams cannot be played over the ARTC protocol.