Updates a custom Real-Time Streaming (RTS) transcoding configuration.
Operation description
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:
- The required resource types are displayed in bold characters.
- 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:UpdateRtsLiveStreamTranscode | create | *Domain acs:cdn:*:{#accountId}:domain/{#DomainName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Domain | string | Yes | The main streaming domain, which cannot be modified. | example.com |
App | string | Yes | The name of the application to which the live stream belongs, which cannot be modified. | aliyun-test |
Template | string | Yes | The ID of the custom transcoding template, which cannot be modified. | ld |
TemplateType | string | Yes | The type of the custom transcoding template, which cannot be modified. | h264 |
Height | integer | No | The height of the output video. Unit: pixel. The value must comply with the following rules:
Note
| 1280 |
Width | integer | No | The width of the output video. Unit: pixel. The value must comply with the following rules:
Note
| 720 |
FPS | integer | No | The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60. Note
This parameter is required when the TemplateType parameter is set to h264, h264-nbhd, or h264-origin.
| 30 |
VideoBitrate | integer | No | The bitrate of the output video. Unit: Kbit/s. Valid values: 1 to 6000. Note
| 2000 |
AudioBitrate | integer | No | The bitrate of the output audio. Unit: Kbit/s. Valid values: 1 to 1000. Note
This parameter is required if you set the TemplateType parameter to audio.
| 128 |
Gop | string | No | The group of pictures (GOP) of the output video. This parameter is used to specify the keyframe interval. Unit: seconds. Valid values: 1 to 3. | 2 |
DeleteBframes | boolean | No | Specifies whether to remove B frames during transcoding. Valid values:
Note
| false |
Opus | boolean | No | Specifies whether to transcode streams to the Opus format to be compatible with native WebRTC. Valid values:
Note
If this parameter is not specified, the default value false is used.
| true |
Profile | integer | No | The video encoding profile. The profile defines a set of parameters that are used to encode a video. In most cases, a greater value indicates better image quality and higher resource consumption. Valid values:
| 2 |
AudioProfile | string | No | The audio codec profile. Valid values:
| aac_low |
AudioCodec | string | No | The audio encoder. Valid values:
Note
To use the Opus encoder, you need only to set the Opus parameter to true.
| aac |
AudioRate | integer | No | The audio sampling rate. Valid values: 22050, 32000, 44100, 48000, and 96000. 44100 is commonly used. Unit: Hz. Note
If the value of the AudioProfile parameter is aac_ld, the audio sampling rate cannot exceed 44,100.
| 44100 |
AudioChannelNum | integer | No | The number of sound channels. Valid values:
| 2 |
Lazy | string | No | Specifies whether to enable triggered transcoding. Valid values:
| no |
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.