Updates the configuration of a custom Real-time Streaming (RTS) transcoding template.
Operation description
This API operation supports only the following types of custom transcoding templates: h264, h264-nbhd, h264-origin, and audio.
QPS limit
You can call this operation up to 10 times per second per account.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
live:UpdateRtsLiveStreamTranscode | create | *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. | aliyun-test |
Template | string | Yes | The name of the custom transcoding template. This parameter cannot be modified. | ld |
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
| 1280 |
Width | integer | No | Output video width in pixels. Requirements:
Note Required if you set TemplateType to h264, h264-nbhd, or h264-origin. For h264-origin templates, the resolution can be up to 4K to retain the information of the source stream. | 720 |
FPS | integer | No | The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60. Note Required if you set TemplateType to h264, h264-nbhd, or h264-origin. | 30 |
VideoBitrate | integer | No | The output video bitrate. Unit: kbps. Valid values: 1 to 6000. Note
| 2000 |
AudioBitrate | integer | No | The output audio bitrate. Unit: kbps. Valid values: 1 to 1000. Note Required if you set TemplateType to audio. | 128 |
Gop | string | No | The Group of Pictures (GOP) size, which specifies the keyframe interval. Unit: seconds. Valid values: 1 to 3. | 2 |
DeleteBframes | boolean | No | Controls whether to remove B-frames from the transcoded output video. Valid values:
Note Required if you set TemplateType to h264, h264-nbhd, or h264-origin. | false |
Opus | boolean | No | Specifies whether to use the Opus codec for audio transcoding. This is mainly for compatibility with native WebRTC. Valid values:
| true |
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 codec profile. Valid values:
| aac_low |
AudioCodec | string | No | The audio codec. Valid values:
Note To use the Opus codec, set the Opus parameter to true. | aac |
AudioRate | integer | No | The audio sample rate. Valid values: 22050, 32000, 44100, 48000, 96000. Recommended: 44100. Unit: Hz. Note If AudioProfile is set to aac_ld, the sample rate cannot exceed 44100. | 44100 |
AudioChannelNum | integer | No | The number of audio channels. Valid values:
| 2 |
Lazy | string | No | Specifies whether to enable on-demand transcoding. Valid values:
| no |
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.