Creates a live stream transcoding template, which can be referenced when submitting a transcoding job.
Operation description
Only Shanghai region supports real-time media transcoding.
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 type of the template. Valid values:
|
normal |
| Name |
string |
Yes |
The name of the template. |
my template |
| TemplateConfig |
object |
No |
The configuration of the template. |
|
| VideoParams |
object |
No |
The video parameters. |
|
| Codec |
string |
No |
The encoding type. Valid values:
|
H.264 |
| Height |
string |
No |
The height of the output video. Valid values: Height ≥ 128 max (Height,Width) ≤ 2560 min (Height,Width) ≤ 1440 Note: The resolution of the output video that is transcoded by using the H.265 Narrowband HD transcoding template cannot exceed 1280 × 720 pixels. |
720 |
| Width |
string |
No |
The width of the output video. Valid values: Width ≥ 128 max (Height,Width) ≤ 2560 min (Height,Width) ≤ 1440 Note: The resolution of the output video that is transcoded by using the H.265 Narrowband HD transcoding template cannot exceed 1280 × 720 pixels. |
1280 |
| Fps |
string |
No |
The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60. |
25 |
| Bitrate |
string |
No |
The bitrate of the output video. Unit: Kbit/s. Valid values: 1 to 6000. |
2500 |
| Gop |
string |
No |
The group of pictures (GOP) of the output video. Unit: frame. Valid values: 1 to 3000. |
1000 |
| Profile |
string |
No |
The encoding profile. The profile determines how a video is encoded. In most cases, a greater value indicates better image quality and higher resource consumption. Valid values: 1: baseline. This value is suitable for mobile devices. 2: main. This value is suitable for standard-definition devices. 3: high. This value is suitable for high-definition devices. |
2 |
| AudioParams |
object |
No |
The audio parameters. |
|
| Codec |
string |
No |
The audio codec. Valid values:
|
AAC |
| Bitrate |
string |
No |
The bitrate of the output audio. Unit: Kbit/s. Valid values: 1 to 1000. |
100 |
| Samplerate |
string |
No |
The audio sampling rate. Valid values: 22050 to 96000. Note: If you set AudioProfile to aac_ld, the audio sampling rate cannot exceed 44,100. |
44100 |
| Channels |
string |
No |
The number of sound channels. Valid values: 1: mono 2: binaural |
2 |
| Profile |
string |
No |
The audio codec profile. Valid values when the Codec parameter is set to AAC:
|
aaclow |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
******3B-0E1A-586A-AC29-742247****** |
| TemplateId |
string |
The ID of the template. |
****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.