A live center of ApsaraVideo Live supports the automatic mixing of two live streams. This feature prioritizes the playback of the content of the primary stream. If the primary stream encounters an issue, ApsaraVideo Live automatically plays the content of the secondary stream. This topic describes how to configure the primary/secondary stream mixing feature to ensure the stability of live streaming.
Limits
Primary/secondary stream mixing templates and regular stream pulling templates share the quota of source streams that can be concurrently ingested. For more information, see Limits. If the quota is reached, you cannot add templates. For information about how to increase the quota, see Quota management.
Procedure
- Log on to the ApsaraVideo Live console.
In the left-side navigation pane, click Domain Names. The Domain Management page appears.
Find the streaming domain that you want to configure and click Domain Settings in the Actions column.
Choose .
Click Add to configure a primary/secondary stream mixing template.
The following table describes the parameters of a primary/secondary stream mixing template.
Item
Parameter
Description
Input Stream 1 (primary stream)
AppName
The name of the application that generates the primary stream. The value of this parameter must be the same as the application name that is specified in the ingest URL of the primary stream. Otherwise, the configuration does not take effect.
StreamName
The name of the primary stream. The value of this parameter must be the same as the stream name that is specified in the ingest URL of the primary stream. Otherwise, the configuration does not take effect.
Input Stream 2 (secondary stream)
AppName
The name of the application that generates the secondary stream. The value of this parameter must be the same as the application name that is specified in the ingest URL of the secondary stream. Otherwise, the configuration does not take effect.
StreamName
The name of the secondary stream. The value of this parameter must be the same as the stream name that is specified in the ingest URL of the secondary stream. Otherwise, the configuration does not take effect.
Output Stream
AppName
The name of the application that generates the output stream. This parameter is used to generate a streaming URL for playback.
StreamName
The name of the output stream. This parameter is used to generate a streaming URL for playback.
Start Time/End Time
The period of time during which the primary/secondary stream mixing template is valid. The interval between the start time and the end time must be less than 7 days. The end time must be later than the current time.
NoteThe value of the AppName or StreamName parameter can be up to 255 characters in length and can contain digits, letters, hyphens (-), underscores (_), and equal signs (=). You cannot specify an asterisk (*) as the value.
Any two of Input Stream 1, Input Stream 2, and Output Stream cannot have the same application names and the same stream names.
Click OK.
Related API operations
Adds a configuration of primary/secondary stream mixing. | |
Deletes a configuration of primary/secondary stream mixing. | |
Queries the configurations of primary/secondary stream mixing. |