All Products
Search
Document Center

ApsaraVideo Live:Primary/backup stream merge

Last Updated:Mar 25, 2026

ApsaraVideo Live can merge a primary stream and a backup stream into a single output stream. The system prioritizes the primary stream for playback. If an issue occurs with the primary stream, the system automatically fails over to the backup stream. This topic describes how to configure the Primary/Backup Stream Merge feature to ensure high availability for your live streams.

Limitations

The number of templates for Primary/Backup Stream Merge and fixed stream-pull configurations shares the quota for concurrent ingest streams. For more information about the quota, see Usage Limits. If the quota is exceeded, you cannot add new templates. To raise your limit, increase your ingest stream quota. For more information, see Quota Management.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. In the left navigation pane, click Domain Names. The Domain Management page appears.

  3. Find the streaming domain that you want to configure and click Domain Settings in the Actions column.

  4. Click Streaming Management > Primary/Secondary Stream Mixing Settings.

  5. Click Add to configure a primary/backup stream merge template.

    The following table describes the parameters of a primary/backup stream merge template.

    Parameter

    Subparameter

    Description

    Input Stream 1 (primary stream)

    Application Name

    The application name for the primary stream. The configuration applies only if this AppName matches the AppName in the ingest URL of the primary stream.

    Stream Name

    The stream name for the primary stream. The configuration applies only if this StreamName matches the StreamName in the ingest URL of the primary stream.

    Input Stream 2 (backup stream)

    AppName

    The application name for the backup stream. The configuration applies only if this AppName matches the AppName in the ingest URL of the backup stream.

    Stream Name

    The stream name for the backup stream. The configuration applies only if this StreamName matches the StreamName in the ingest URL of the backup stream.

    Output Stream

    Application Name

    The application name for the output stream. You must use this AppName to generate the streaming URL.

    Stream Name

    The stream name for the output stream. You must use this StreamName to generate the streaming URL.

    Start and End Time

    The active period for the Primary/Backup Stream Merge template. This period cannot exceed seven days, and the end time must be in the future.

    Note
    • Application Name and Stream Name support numbers, uppercase and lowercase letters, hyphens (-), underscores (_), and equal signs (=). The length cannot exceed 255 characters. You cannot enter asterisks (*).

    • Input Stream 1, Input Stream 2, and Output Stream must each have a unique AppName and StreamName.

  6. Click OK.

Related APIs

AddLiveStreamMerge

Adds a Primary/Backup Stream Merge configuration.

DeleteLiveStreamMerge

Deletes a Primary/Backup Stream Merge configuration.

DescribeLiveStreamMerge

Queries a Primary/Backup Stream Merge configuration.