CreateLiveTranscodeTemplate

Updated at:

Creates a real-time transcoding template for submitting real-time transcoding jobs.

Operation description

Real-time media transcoding is supported only in the Shanghai region.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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: Normal template.

  • narrow-band: Narrowband HD template.

  • audio-only: Audio-only template.

  • origin: Original quality template.

Valid values:

  • normal :

    Normal template.

  • narrow-band :

    Narrowband HD template.

  • audio-only :

    Audio-only template.

  • origin :

    Original quality template.

normal

Name

string

Yes

The template name.

my template

TemplateConfig

object

No

The template configuration.

Note

The parameter requirements vary based on the template type (Type). If the Type parameter is set to normal, you must specify at least one of the width and height parameters, and the frame rate and bitrate parameters are required. For other template types, specify parameters as needed.

VideoParams

object

No

The video parameters.

Codec

string

No

The video codec. Valid values:

  • H.264

  • H.265

Valid values:

  • H.264 :

    H.264 video codec.

  • H.265 :

    H.265 video codec.

H.264

Height

string

No

The height of the transcoded video. Valid values:

  • Height ≥ 128

  • max(Height, Width) ≤ 2560

  • min(Height, Width) ≤ 1440

Important The resolution of an H.265 Narrowband HD template cannot exceed 1280×720.

720

Width

string

No

The width of the transcoded video. Valid values:

  • Width ≥ 128

  • max(Height, Width) ≤ 2560

  • min(Height, Width) ≤ 1440

Important The resolution of an H.265 Narrowband HD template cannot 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 group of pictures (GOP) size of the video. Unit: frames. Valid values: 1 to 3000.

1000

Profile

string

No

The encoding profile. A set of specific encoding features supported by the video. Generally, a larger value indicates better video quality but higher resource consumption for encoding and decoding. Valid values:

  • 1: Baseline profile, suitable for mobile devices.

  • 2: Main profile, suitable for standard-resolution devices.

  • 3: High profile, suitable for high-resolution devices.

Valid values:

  • 1 :

    Baseline profile (suitable for mobile devices)

  • 2 :

    Main profile (suitable for standard-resolution devices)

  • 3 :

    High profile (suitable for high-resolution devices)

2

AudioParams

object

No

The audio parameters.

Codec

string

No

The audio codec. Valid values:

  • AAC

  • MP3

Valid values:

  • MP3 :

    MP3 audio codec.

  • AAC :

    AAC audio codec.

AAC

Bitrate

string

No

The bitrate of the transcoded audio. Unit: kbps. Valid values: 1 to 1000.

100

Samplerate

string

No

The audio sampling rate. Valid values: 22050 to 96000.

Important If the AudioProfile parameter is set to aac_ld, the sampling rate cannot exceed 44100.

44100

Channels

string

No

The number of audio channels. Valid values:

  • 1: Mono.

  • 2: Stereo.

2

Profile

string

No

The audio encoding profile. If the Codec parameter is set to AAC, valid values:

  • aac_low

  • aac_he

  • aac_he_v2

  • aac_ld

Valid values:

  • aac_he :

    High-Efficiency AAC (HE-AAC)

  • aac_low :

    Low-Complexity AAC (LC)

  • aac_he_v2 :

    High-Efficiency AAC version 2 (HE-AACv2)

  • aac_ld :

    Low-Delay AAC (LD)

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.