Updates a custom transcoding configuration.
Operation description
This operation supports the following types of custom transcoding templates:
-
h264: a custom H.264 standard template.
-
h264-nbhd: a custom H.264 Narrowband HD™ template.
-
h265: a custom H.265 standard template.
-
h265-nbhd: a custom H.265 Narrowband HD template.
-
audio: an audio-only template.
QPS limit
The queries per second (QPS) limit for a single user is 6,000 queries per minute.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:UpdateCustomLiveStreamTranscode |
update |
*Domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-shanghai |
| Domain |
string |
Yes |
The streaming domain. This parameter cannot be modified. |
example.com |
| App |
string |
Yes |
The AppName of the live stream. This parameter cannot be modified. |
liveApp**** |
| Template |
string |
Yes |
The custom name of the transcoding template. This parameter cannot be modified. |
LiveCusTranscode**** |
| TemplateType |
string |
Yes |
The type of the custom transcoding template. This parameter cannot be modified. |
h264 |
| Height |
integer |
No |
Output video height in pixels. Requirements:
Note
For h265-nbhd templates, it cannot exceed 720. |
720 |
| Width |
integer |
No |
Output video width in pixels. Requirements:
Note
For h265-nbhd templates, it cannot exceed 1280. |
576 |
| FPS |
integer |
No |
The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60. |
30 |
| VideoBitrate |
integer |
No |
The output video bitrate. Unit: kbps. Valid values: 1 to 6000. Note
The system tries to transcode the video at the specified bitrate. However, the actual bitrate may not be the same as the specified value, especially when the specified value is too high or too low. |
720 |
| AudioBitrate |
integer |
No |
The output audio bitrate. Unit: kbps. Valid values: 1 to 1000. |
512 |
| Gop |
string |
No |
The Group of Pictures (GOP) size. The unit can be frame or second. Valid values:
|
1 |
| Profile |
integer |
No |
The video codec profile. A larger value indicates better video quality and higher resource consumption for encoding and decoding. Valid values:
|
2 |
| AudioProfile |
string |
No |
The audio profile. Valid values:
|
aac_low |
| AudioCodec |
string |
No |
The audio codec. Valid values:
|
aac |
| AudioRate |
integer |
No |
The audio sample rate. Valid values: 22050, 32000, 44100, 48000, and 96000. Unit: Hz. Note
If you set AudioProfile to aac_ld, the sample rate cannot exceed 44100. |
96000 |
| AudioChannelNum |
integer |
No |
The number of audio channels. Valid values:
|
2 |
| Lazy |
string |
No |
Specifies whether to enable on-demand transcoding. Valid values:
|
yes |
| EncryptParameters |
string |
No |
The encryption settings, formatted as a JSON string.
Note
When you use Digital Rights Management (DRM) encryption, you cannot modify KmsKeyID. |
{"EncryptType": "aliyun", "KmsKeyID":"afce5722-81d2-43c3-9930-7601da11****","KmsKeyExpireInterval":"3600"} |
| ResWithSource |
string |
No |
The adaptive resolution settings. If specified, it overrides the Height and Width parameters. Fieds:
|
{"Type":"short","Value":"1080"} |
| FpsWithSource |
string |
No |
Adapts the output frame rate based on the source's frame rate, while keeping it within a specified range. If specified, it overrides the FPS parameter. Fields:
|
{"UpLimit":60,"LowerLimit":1} |
| BitrateWithSource |
string |
No |
The adaptive bitrate settings. If specified, it overrides the VideoBitrate parameter. Fields:
|
{"UpLimit":2500,"LowerLimit":800,"Factor":1} |
| ExtWithSource |
string |
No |
Other adaptive settings that align the transcoded stream with the source stream. Fields:
|
{"KeyFrameOpen":"yes","Copyts":"yes","SeiMode":1} |
| DeInterlaced |
boolean |
No |
Specifies whether to automatically detect and remove interlacing during transcoding. Deinterlacing converts interlaced video into progressive video.
|
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The request ID. |
||
| RequestId |
string |
The request ID. |
16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
Examples
Success response
JSON format
{
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameters | %s Please check and try again later. | Exception parameter exists, please check and try again. |
| 400 | ConfigAlreadyExists | %s Please check and try again later. | Configuration already exists, please check and try again. |
| 400 | TemplateLimit | %s Please check and try again later. | The number of templates reached the upper limit. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.