All Products
Search
Document Center

ApsaraVideo Media Processing:QueryTemplateList

Last Updated:Aug 28, 2026

Queries the details of up to 10 transcoding templates at a time.

Operation description

The IDs of the transcoding templates to query. You can specify up to 10 IDs, separated by commas (,).

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

mts:QueryTemplateList

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateIds

string

Yes

The response parameters.

16f01ad6175e4230ac42bb5182cd****,88c6ca184c0e424d5w5b665e2a12****

Response elements

Element

Type

Description

Example

object

The response parameters.

NonExistTids

object

String

array

The IDs of templates that do not exist. This parameter is not returned if all specified transcoding templates are found.

string

The details of transcoding templates.

88c6ca184c0e424d5w5b665e2a12****

TemplateList

object

Template

array<object>

The transcoding templates.

array<object>

The video codec configurations.

Video

object

The video codec configurations.

Bufsize

string

The buffer size.

  • Unit: KB.

  • Default value: 6000.

6000

LongShortMode

string

Indicates whether the auto-rotate screen feature is enabled.

  • If this feature is enabled, the width of the output video corresponds to the long side of the input video, which is the height of the input video in portrait mode. The height of the output video corresponds to the short side of the input video, which is the width of the input video in portrait mode. Valid values:

  • true

  • false

  • Default value: false.

false

Degrain

string

The level of video quality control.

10

BitrateBnd

object

The average bitrate range of the video.

Max

string

The upper limit of the total bitrate. Unit: Kbit/s.

100

Min

string

The lower limit of the total bitrate. Unit: Kbit/s.

500

PixFmt

string

The pixel format of the video. Valid values: standard pixel formats such as yuv420p and yuvj420p.

yuv420p

Pad

string

The black bars that are added to the video. Format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

Codec

string

The codec. Default value: H.264.

H.264

Height

string

The height of the video.

  • Unit: pixel.

  • Default value: the height of the input video.

800

Qscale

string

The strength of the independent denoising algorithm.

1

Crop

string

The method of video cropping. Valid values:

  • border: automatically detects and removes black bars.

  • Value in the width:height:left:top format: crops the video based on custom settings. Format: width:height:left:top. Example: 1280:800:0:140.

border

Bitrate

string

The average bitrate of the video. Unit: Kbit/s.

200

Maxrate

string

The maximum bitrate of the video. Unit: Kbit/s.

500

MaxFps

string

The maximum frame rate.

60

Profile

string

The encoding profile. Valid values:

  • baseline: applicable to mobile devices.

  • main: applicable to standard-definition devices.

  • high: applicable to high-definition devices.

  • Default value: high.

high

Crf

string

The constant rate factor.

  • Default value when the encoding format is H.264: 23. Default value when the encoding format is H.265: 26.

  • If this parameter is set, the value of Bitrate becomes invalid.

15

Remove

string

Indicates whether the video stream is deleted. Valid values:

  • true

  • false

  • Default value: false.

false

Gop

string

The maximum number of frames between two keyframes. Default value: 250.

10

Width

string

The width of the video.

  • Unit: pixel.

  • Default value: the width of the input video.

256

Fps

string

The frame rate.

  • The value is 60 if the frame rate of the input file exceeds 60.

  • Default value: the frame rate of the input file.

25

Preset

string

The preset video algorithm. Valid values: veryfast, fast, medium, slow, and slower. Default value: medium.

medium

ScanMode

string

The scan mode. Valid values:

  • interlaced

  • progressive

interlaced

ResoPriority

string

The policy of resolution adjustment. Valid values: cropFirst, widthFirst, and heightFirst.

heightFirst

Hdr2sdr

string

Indicates whether the HDR2SDR conversion feature is enabled. If enabled, high dynamic range (HDR) videos are transcoded to standard dynamic range (SDR) videos.

true

NarrowBand

object

The Narrowband HD settings.

Version

string

The Narrowband HD version. Only 1.0 may be returned.

1.0

Abrmax

number

The upper limit of the dynamic bitrate. Valid values: (0, 1000000].

3000

MaxAbrRatio

number

The maximum ratio of the dynamic bitrate upper limit relative to the source video bitrate. The value of Abrmax does not exceed this ratio multiplied by the source video bitrate. Valid values: (0,1.0].

1.0

TransConfig

object

The general transcoding configurations.

IsCheckAudioBitrate

string

Indicates whether the audio bitrate is checked. If the output audio bitrate exceeds the input audio bitrate, the input bitrate is retained and the specified audio bitrate does not take effect. This parameter has a lower priority than IsCheckAudioBitrateFail. Valid values:

  • true

  • false

  • Default value:

    • If this parameter is not specified and the codec of the output audio is different from that of the input audio, the default value is false.

    • If this parameter is not specified and the codec of the output audio is the same as that of the input audio, the default value is true.

false

TransMode

string

The transcoding mode. Default value: onepass. Valid values:

  • onepass

  • twopass

  • CBR

onepass

IsCheckReso

string

Indicates whether the resolution is checked. If the output resolution exceeds the input resolution based on width or height, the input resolution is retained. Valid values:

  • true

  • false

  • Default value: false.

false

IsCheckVideoBitrateFail

string

Indicates whether video bitrate check errors are allowed. This parameter has a higher priority than IsCheckVideoBitrate. Valid values:

  • true: If the video bitrate check fails, the input file is not transcoded.

  • false: The video bitrate is not checked.

  • Default value: false.

false

AdjDarMethod

string

The method of resolution adjustment. Default value: none. Valid values:

  • rescale

  • crop

  • none

none

IsCheckVideoBitrate

string

Indicates whether the video bitrate is checked. If the output video bitrate exceeds the input video bitrate, the input bitrate is retained. Valid values:

  • true

  • false

  • Default value: false.

false

IsCheckResoFail

string

Indicates whether the resolution is checked. If the output resolution exceeds the input resolution based on width or height, a transcoding failure is returned. Valid values:

  • true

  • false

  • Default value: false.

false

IsCheckAudioBitrateFail

string

Indicates whether audio bitrate check errors are allowed. This parameter has a higher priority than IsCheckAudioBitrate. Valid values:

  • true: If the audio bitrate check fails, the input file is not transcoded.

  • false: The audio bitrate is not checked.

  • Default value: false.

false

State

string

The status of the template. Valid values:

  • Normal

  • Deleted

Normal

MuxConfig

object

The transmuxing configurations.

Webp

object

The transmuxing configurations for WebP.

Loop

string

The loop count.

0

Gif

object

The transmuxing configurations for GIF.

FinalDelay

string

The duration for which the final frame is paused.

0

DitherMode

string

The color dithering algorithm of the palette. Valid values: sierra and bayer.

sierra

Loop

string

The loop count.

0

IsCustomPalette

string

Indicates whether a custom palette is used.

false

Segment

object

The segment configurations.

Duration

string

The length of the segment. Unit: seconds.

10

Name

string

The name of the template.

MPS-example

Audio

object

The audio codec configurations.

Profile

string

The codec profile of the audio. Valid values when the value of Codec is aac:

  • aac_low

  • aac_he

  • aac_he_v2

  • aac_ld

  • aac_eld

aac_low

Remove

string

Indicates whether the audio stream is deleted. Valid values:

  • true

  • false

  • Default value: false.

false

Codec

string

The audio codec format. Default value: aac. Valid values:

  • aac

  • mp3

  • vorbis

  • flac

aac

Samplerate

string

The sampling rate.

  • Unit: Hz

  • Default value: 44100.

44100

Qscale

string

The strength of the independent denoising algorithm.

1

Channels

string

The number of sound channels. Default value: 2.

2

Bitrate

string

The audio bitrate of the output file.

  • Valid values: [8,1000].

  • Unit: Kbit/s.

  • Default value: 128.

500

Volume

object

The volume control configurations.

Method

string

The method used to adjust the volume. Valid values:

  • auto

  • dynamic

  • linear

  • Default value: dynamic.

auto

TruePeak

string

The peak volume.

  • This parameter takes effect only if the value of Method is dynamic.

  • Unit: dB.

  • Valid values: [-9,0].

  • Default value: -1.

-1

IntegratedLoudnessTarget

string

The output volume.

  • This parameter takes effect only if the value of Method is dynamic.

  • Unit: dB.

  • Valid values: [-70,-5].

  • Default value: -6.

-6

LoudnessRangeTarget

string

The range of the volume relative to the output volume.

  • This parameter takes effect only if the value of Method is dynamic.

  • Unit: dB.

  • Valid values: [1,20].

  • Default value: 8.

8

Level

string

The increased volume relative to the volume of the input audio.

  • This parameter takes effect only if the value of Method is linear.

  • Unit: dB.

  • Valid values: less than or equal to 20.

  • Default value: -20.

-20

PeakLevel

string

The volume adjustment coefficient.

This parameter takes effect only if the value of Method is adaptive.

Valid values: [0,1].

Default value: 0.9.

0.9

Id

string

The transcoding template ID.

16f01ad6175e4230ac42bb5182cd****

Container

object

The container format configurations.

Format

string

The format of the container. Valid values: flv, mp4, ts, m3u8, gif, mp3, ogg, and flac.

flv

CreationTime

string

The time when the template was created.

2021-03-04T06:44:43Z

RequestId

string

The request ID.

BC860F04-778A-472F-AB39-E1BF329C1EA8

Examples

Success response

JSON format

{
  "NonExistTids": {
    "String": [
      "88c6ca184c0e424d5w5b665e2a12****"
    ]
  },
  "TemplateList": {
    "Template": [
      {
        "Video": {
          "Bufsize": "6000",
          "LongShortMode": "false",
          "Degrain": "10",
          "BitrateBnd": {
            "Max": "100",
            "Min": "500"
          },
          "PixFmt": "yuv420p",
          "Pad": "1280:800:0:140",
          "Codec": "H.264",
          "Height": "800",
          "Qscale": "1",
          "Crop": "border",
          "Bitrate": "200",
          "Maxrate": "500",
          "MaxFps": "60",
          "Profile": "high",
          "Crf": "15",
          "Remove": "false",
          "Gop": "10",
          "Width": "256",
          "Fps": "25",
          "Preset": "medium",
          "ScanMode": "interlaced",
          "ResoPriority": "heightFirst",
          "Hdr2sdr": "true",
          "NarrowBand": {
            "Version": "1.0",
            "Abrmax": 3000,
            "MaxAbrRatio": 1
          }
        },
        "TransConfig": {
          "IsCheckAudioBitrate": "false",
          "TransMode": "onepass",
          "IsCheckReso": "false",
          "IsCheckVideoBitrateFail": "false",
          "AdjDarMethod": "none",
          "IsCheckVideoBitrate": "false",
          "IsCheckResoFail": "false",
          "IsCheckAudioBitrateFail": "false"
        },
        "State": "Normal",
        "MuxConfig": {
          "Webp": {
            "Loop": "0"
          },
          "Gif": {
            "FinalDelay": "0",
            "DitherMode": "sierra",
            "Loop": "0",
            "IsCustomPalette": "false"
          },
          "Segment": {
            "Duration": "10"
          }
        },
        "Name": "MPS-example",
        "Audio": {
          "Profile": "aac_low",
          "Remove": "false",
          "Codec": "aac",
          "Samplerate": "44100",
          "Qscale": "1",
          "Channels": "2",
          "Bitrate": "500",
          "Volume": {
            "Method": "auto",
            "TruePeak": "-1",
            "IntegratedLoudnessTarget": "-6",
            "LoudnessRangeTarget": "8",
            "Level": "-20",
            "PeakLevel": "0.9"
          }
        },
        "Id": "16f01ad6175e4230ac42bb5182cd****",
        "Container": {
          "Format": "flv"
        },
        "CreationTime": "2021-03-04T06:44:43Z"
      }
    ]
  },
  "RequestId": "BC860F04-778A-472F-AB39-E1BF329C1EA8"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.