All Products
Search
Document Center

Intelligent Media Services:CreateLiveTranscodeTemplate

Last Updated:Dec 16, 2024

Creates a live stream transcoding template to submit live stream transcoding jobs.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ice:CreateLiveTranscodeTemplate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TypestringYes

The type of the template. Valid values:

  • normal
  • narrow-band
  • audio-only
  • origin
normal
NamestringYes

The name of the template.

my template
TemplateConfigobjectNo

The configuration of the template.

VideoParamsobjectNo

The video parameters.

CodecstringNo

The encoding type. Valid values:

  • H.264
  • H.265
H.264
HeightstringNo

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
WidthstringNo

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
FpsstringNo

The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60.

25
BitratestringNo

The bitrate of the output video. Unit: Kbit/s. Valid values: 1 to 6000.

2500
GopstringNo

The group of pictures (GOP) of the output video. Unit: frame. Valid values: 1 to 3000.

1000
ProfilestringNo

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
AudioParamsobjectNo

The audio parameters.

CodecstringNo

The audio codec. Valid values:

  • AAC
  • MP3
AAC
BitratestringNo

The bitrate of the output audio. Unit: Kbit/s. Valid values: 1 to 1000.

100
SampleratestringNo

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
ChannelsstringNo

The number of sound channels. Valid values: 1: mono 2: binaural

2
ProfilestringNo

The audio codec profile. Valid values when the Codec parameter is set to AAC:

  • aac_low
  • aac_he
  • aac_he_v2
  • aac_ld
aaclow

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******3B-0E1A-586A-AC29-742247******
TemplateIdstring

The ID of the template.

****20b48fb04483915d4f2cd8ac****

Examples

Sample success responses

JSONformat

{
  "RequestId": "******3B-0E1A-586A-AC29-742247******",
  "TemplateId": "****20b48fb04483915d4f2cd8ac****"
}

Error codes

HTTP status codeError codeError message
400InvalidParam.HeightInvalid Parameters: Height
400InvalidParam.WidthInvalid Parameters: Width
400InvalidParam.FpsInvalid Parameters: Fps
403OperationDeniedYour account has not enabled the ICE service.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history