Adds transcoding configurations for a streaming domain.

Usage notes

You must obtain the customer master key (CMK) in Key Management Service (KMS) before you call this operation to add transcoding configurations. Only standard transcoding templates and Narrowband HD™ transcoding templates are supported for this operation.

QPS limits

You can call this operation up to 30 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 AddLiveStreamTranscode

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

Domain String Yes example.com

The name of the main streaming domain.

App String Yes liveApp****

The name of the application to which the live stream belongs.

  • The transcoding template takes effect only if the value of this parameter is the same as the application name that is specified in the ingest URL. The name can be up to 256 characters in length and can contain digits, letters, hyphens (-), and underscores (_).
  • You can also set this parameter to an asterisk (*). Asterisks (*) can match any string, including an empty string.
Note If you configure a transcoding template for which App is set to an asterisk (*), the transcoding template is used only if no transcoding template for which App is set to the same value as AppName in the ingest URL exists.
Template String Yes lsd

The transcoding template. Valid values:

  • Standard transcoding template:
    • lld: low definition
    • lsd: standard definition
    • lhd: high definition
    • lud: ultra-high definition
  • Narrowband HD™ transcoding template:
    • ld: low definition
    • sd: standard definition
    • hd: high definition
    • ud: ultra-high definition
EncryptParameters String No {"EncryptType": "aliyun", "KmsKeyID":"afce5722-81d2-43c3-9930-7601da11****","KmsKeyExpireInterval":"3600"}

The encryption configuration. The value is a JSON string. The following fields are included in the syntax:

  • EncryptType: the type of the encryption. Set the value to aliyun.
  • KmsKeyID: the ID of the CMK in KMS.
  • KmsKeyExpireInterval: the validity period of the CMK. Valid values: 60 to 3600. Unit: seconds.
Lazy String No yes

Specifies whether to use the load-on-demand mechanism for transcoding. Default value: yes.

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=AddLiveStreamTranscode
&App=liveApp****
&Domain=example.com
&Template=lsd
&<Common request parameters>

Sample success responses

XML format

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

<?xml version="1.0" encoding="UTF-8" ?>
<AddLiveStreamTranscodeResponse>
	  <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</AddLiveStreamTranscodeResponse>

JSON format

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

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

Error codes

For a list of error codes, visit the API Error Center.