Creates a real-time transcoding template for submitting real-time transcoding tasks.
Operation description
Real-time media transcoding is supported only in the Shanghai region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:CreateLiveTranscodeTemplate |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Type |
string |
Yes |
The template type. Valid values:
|
normal |
| Name |
string |
Yes |
The template name. |
my template |
| TemplateConfig |
object |
No |
The template configuration. Note
The pass parameter requirements vary based on the templatetype (Type). When Type is set to normal, at least one of the width and height parameters must be specified, and the frame rate and bitrate parameters are required. For other template types, specify the parameters based on your requirements. |
|
| VideoParams |
object |
No |
The video parameters. |
|
| Codec |
string |
No |
The encoding type. Valid values:
|
H.264 |
| Height |
string |
No |
The height of the transcoded video. Valid values:
Important For H.265 narrowband HD templates, the resolution must not exceed 1280 × 720. |
720 |
| Width |
string |
No |
The width of the transcoded video. Valid values:
Important For H.265 narrowband HD templates, the resolution must not exceed 1280 × 720. |
1280 |
| Fps |
string |
No |
The frame rate of the transcoded video. Unit: FPS. Valid values: 1 to 60. |
25 |
| Bitrate |
string |
No |
The bitrate of the transcoded video. Unit: kbps. Valid values: 1 to 6000. |
2500 |
| Gop |
string |
No |
The video GOP (Group of Pictures). Unit: frames. Valid values: 1 to 3000. |
1000 |
| Profile |
string |
No |
The encoding profile. A set of specific encoding features supported by the video. A higher value generally produces better image quality but consumes more encoding and decoding resources. Valid values:
|
2 |
| AudioParams |
object |
No |
The audio parameters. |
|
| Codec |
string |
No |
The audio encoding format. Valid values:
|
AAC |
| Bitrate |
string |
No |
The bitrate of the transcoded audio. Unit: kbps. Valid values: 1 to 1000. |
100 |
| Samplerate |
string |
No |
The audio sample rate. Valid values: 22050 to 96000. Important If AudioProfile is set to aac_ld, the sample rate must not exceed 44100. |
44100 |
| Channels |
string |
No |
The number of audio channels. Valid values:
|
2 |
| Profile |
string |
No |
The audio encoding preset. When Codec is set to AAC, valid values:
|
aaclow |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******3B-0E1A-586A-AC29-742247****** |
| TemplateId |
string |
The template ID. |
****20b48fb04483915d4f2cd8ac**** |
Examples
Success response
JSON format
{
"RequestId": "******3B-0E1A-586A-AC29-742247******",
"TemplateId": "****20b48fb04483915d4f2cd8ac****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.Height | Invalid Parameters: Height | |
| 400 | InvalidParam.Width | Invalid Parameters: Width | |
| 400 | InvalidParam.Fps | Invalid Parameters: Fps | |
| 403 | OperationDenied | Your account has not enabled the ICE service. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.