Adds a configuration of primary/secondary stream mixing.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddLiveStreamMerge

The operation that you want to perform. Set the value to AddLiveStreamMerge.

DomainName String Yes example.com

The streaming domain.

AppName String Yes app

The name of the application that generates the output stream.

StreamName String Yes StreamName

The name of the output stream.

InAppName1 String Yes app1

The name of the application that generates the input primary stream. The value 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.

InStreamName1 String Yes InStream1

The name of the input primary stream. The value 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.

InAppName2 String Yes app2

The name of the application that generates the input secondary stream. The value 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.

InStreamName2 String Yes stream2

The name of the input secondary stream. The value 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.

StartTime String Yes 2020-05-29T00:00:00Z

The start time of the stream mixing.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EndTime String Yes 2020-05-29T01:00:00Z

The end time of the stream mixing.

Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note The interval between the start time and the end time must be within 7 days.
Protocol String No rtmp

The streaming protocol. Valid values:

  • rtmp: This is the default value.
  • rtc
Note Any two of the AppName, InAppName1, and InAppName2 parameters cannot have the same values. Any two of the StreamName, InStreamName1, and InStreamName2 parameters cannot have the same values.

Response parameters

Parameter Type Example Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=AddLiveStreamMerge
&DomainName=example.com
&AppName=app
&StreamName=StreamName
&InAppName1=app1
&InStreamName1=InStream1
&InAppName2=app2
&InStreamName2=stream2
&StartTime=2020-05-29T00:00:00Z
&EndTime=2020-05-29T01:00:00Z
&Protocol=rtmp
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddLiveStreamMergeResponse>
    <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</AddLiveStreamMergeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

HttpCode Error code Error message Description
400 InvalidStartTime.Malformed Specified parameter StartTime is not valid. The error message returned because the format of the start time is invalid. Check whether the value of the StartTime parameter is valid.
400 InvalidEndTime.Malformed Specified parameter EndTime is not valid. The error message returned because the format of the end time is invalid. Check whether the value of the EndTime parameter is valid.
400 ConfigAlreadyExists Config has already exist. The error message returned because the configuration already exists.

For a list of error codes, see Service error codes.