Updates a custom transcoding configuration.
Operation description
This operation supports the following types of custom transcoding templates:
- h264: custom H.264 standard transcoding.
- h264-nbhd: custom H.264 Narrowband HD™ transcoding.
- h265: custom H.265 standard transcoding.
- h265-nbhd: custom H.265 Narrowband HD™ transcoding.
- audio: audio-only transcoding.
QPS limit
You can call this operation up to 6,000 times per minute per account.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
live:UpdateCustomLiveStreamTranscode | create | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Domain | string | Yes | Streamer domain name, unmodifiable. | example.com |
App | string | Yes | The name of the application to which the stream belongs, and it cannot be modified. | liveApp**** |
Template | string | Yes | Custom name of the transcoding template, not modifiable. | LiveCusTranscode**** |
TemplateType | string | Yes | Custom transcoding template type, unmodifiable. | h264 |
Height | integer | No | Video transcoding height. Unit: pixels. The value must meet the following three conditions:
Note
For 265 narrowband HD templates, the maximum resolution is 1280×720.
| 720 |
Width | integer | No | Video transcoding width. Unit: pixels. The value must meet the following three conditions:
Note
For 265 narrowband HD templates, the maximum resolution is 1280×720.
| 576 |
FPS | integer | No | Transcode video frame rate. Unit: FPS, value range: 1 to 60. | 30 |
VideoBitrate | integer | No | Video transcoding bitrate. Unit: kbps, value range: 1 to 6000. Note
The actual bitrate of the transcoded video will try to be as close as possible to the one you set, but it cannot be guaranteed to be exactly the same, especially when the set bitrate is too high or too low.
| 720 |
AudioBitrate | integer | No | Audio transcoding bitrate. Unit: kbps, value range: 1 to 1000. | 512 |
Gop | string | No | Video GOP (Group of Pictures), supports units in frames or seconds. When the unit is frames, the value should be {number}; when the unit is seconds, the value should be {number}s.
| 1 |
Profile | integer | No | Encoding level. A set of specific encoding features supported by the video, generally, the higher the value, the better the picture quality, but also the higher the resources consumed for encoding and decoding. Values:
| 2 |
AudioProfile | string | No | Audio encoding. Values:
| aac_low |
AudioCodec | string | No | Audio encoding format. Values:
| aac |
AudioRate | integer | No | Audio sampling rate. Values: 22050, 32000, 44100, 48000, 96000. Unit: Hz. Note
If AudioProfile is set to aac_ld, the sampling rate must not exceed 44100.
| 96000 |
AudioChannelNum | integer | No | Number of audio channels. Values:
| 2 |
Lazy | string | No | Specifies whether to enable triggered transcoding. Valid values:
| yes |
EncryptParameters | string | No | Encryption configuration. JSON format, with the following fields:
Note
When using DRM encryption, KmsKeyID cannot be modified.
| {"EncryptType": "aliyun", "KmsKeyID":"afce5722-81d2-43c3-9930-7601da11****","KmsKeyExpireInterval":"3600"} |
ResWithSource | string | No | The source-based resolution settings. This parameter takes precedence over other resolution settings. The following fields must be included:
| {\"Type\":\"short\",\"Value\":\"1080\"} |
FpsWithSource | string | No | The source-based frame rate settings. This parameter takes precedence over other frame rate settings. The following fields must be included:
| {\"UpLimit\":60,\"LowerLimit\":1} |
BitrateWithSource | string | No | The source-based bitrate settings. This parameter takes precedence over other bitrate settings. The following fields must be included:
| {\"UpLimit\":2500,\"LowerLimit\":800,\"Factor\":1} |
ExtWithSource | string | No | Other source-based settings. The following fields are included:
| {\"KeyFrameOpen\":\"yes\",\"Copyts\":\"yes\",\"SeiMode\":1} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidParameters | %s |
400 | ConfigAlreadyExists | %s |
400 | TemplateLimit | %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2025-02-11 | API Description Update. The Error code has changed | View Change Details |