All Products
Search
Document Center

ApsaraVideo Media Processing:QueryTemplateList

Last Updated:Oct 27, 2026

Queries the details of transcoding templates.

Operation description

You can query the information of up to 10 templates in a single request.

QPS limit

The QPS limit for a single user is 100 requests per second. If the limit is exceeded, API calls are throttled, which may affect your services. Make API calls at a reasonable rate. For more information, see QPS limits.

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 IDs of the templates to query. You can specify up to 10 template IDs at a time. Separate multiple IDs with commas (,).

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

Response elements

Element

Type

Description

Example

object

The response parameters.

NonExistTids

object

String

array

The list of non-existent templates.

string

The list of non-existent templates. This parameter is not returned if no data exists.

88c6ca184c0e424d5w5b665e2a12****

TemplateList

object

Template

array<object>

The list of transcoding templates.

array<object>

The transcoding template.

Video

object

The video codec configurations.

Bufsize

string

The buffer size.

  • Unit: Kb.

  • Default value: 6000.

6000

LongShortMode

string

Specifies whether to enable the adaptive landscape and portrait mode (long and short side mode).

  • The width of the transcoded output corresponds to the long side of the input video (the height for portrait videos), and the height corresponds to the short side of the input video (the width for portrait videos).

  • true: Enabled.

  • false: Disabled.

  • Default value: false.

false

Degrain

string

The video quality control level.

10

BitrateBnd

object

The average video bitrate range.

Max

string

The maximum total bitrate. Unit: Kbps.

100

Min

string

The minimum total bitrate. Unit: Kbps.

500

PixFmt

string

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

yuv420p

Pad

string

The video padding configuration. Parameter format: width:height:left:top. Example: 1280:800:0:140.

1280:800:0:140

Codec

string

The codec format. Default value: H.264.

H.264

Height

string

The video height.

  • Unit: px.

  • Default value: Original video height.

800

Qscale

string

The strength of the independent denoising algorithm.

1

Crop

string

The video cropping configuration.

  • Automatic black bar detection and cropping: Set the value to border.

  • Custom cropping: Specify custom parameters for cropping. Parameter format: width:height:left:top. Example: 1280:800:0:140.

border

Bitrate

string

The average video bitrate. Unit: Kbps.

200

Maxrate

string

The peak video bitrate. Unit: Kbps.

500

MaxFps

string

The maximum frame rate.

60

Profile

string

The encoding profile.

  • baseline: For mobile devices.

  • main: For standard resolution devices.

  • high: For high resolution devices.

  • Default value: high.

high

Crf

string

The bitrate-quality control factor.

  • Default value: When the encoding format is H.264, the default value is 23. When the encoding format is H.265, the default value is 26.

  • If Crf is specified, the Bitrate setting becomes invalid.

15

Remove

string

Specifies whether to remove the video stream.

  • true: Remove the video stream.

  • false: Retain the video stream.

  • Default value: false.

false

Gop

string

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

10

Width

string

The video width.

  • Unit: px.

  • Default value: Original video width.

256

Fps

string

The frame rate.

  • If the frame rate of the input file exceeds 60, the value is set to 60.

  • Default value: Frame rate of the input file.

25

Preset

string

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

medium

ScanMode

string

The scan mode. Valid values:

  • interlaced: Interlaced scan.

  • progressive: Progressive scan.

interlaced

ResoPriority

string

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

heightFirst

Hdr2sdr

string

Specifies whether to enable the HDR to SDR conversion feature. When enabled, HDR videos are converted to SDR.

true

NarrowBand

object

The Narrowband HD settings.

Version

string

The Narrowband HD version. Valid value: 1.0.

1.0

Abrmax

number

The upper limit of the dynamic bitrate. After you set this parameter, the average bitrate falls within the range of (0, 1000000].

3000

MaxAbrRatio

number

The maximum multiplier for the upper bitrate limit. After you set this parameter, the value of Abrmax does not exceed the source video bitrate multiplied by this value. Valid values: (0, 1.0].

1.0

TransConfig

object

The general transcoding configurations.

IsCheckAudioBitrate

string

Specifies whether to check the audio bitrate. If the output audio bitrate is greater than the source audio bitrate, the output audio bitrate is considered equal to the source audio bitrate, and the specified audio bitrate parameter does not take effect. The priority of this parameter is lower than that of IsCheckAudioBitrateFail.

  • true: Check the audio bitrate.

  • false: Do not check the audio bitrate.

  • Default value:
    • false if this parameter is empty and the codec is different from that of the input source.

    • true if this parameter is empty and the codec is the same as that of the input source.

false

TransMode

string

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

  • onepass

  • twopass

  • CBR

onepass

IsCheckReso

string

Specifies whether to check the resolution. If the output resolution is greater than the input resolution in width or height, the output resolution is set to the input resolution.

  • true: Check the resolution.

  • false: Do not check the resolution.

  • Default value: false.

false

IsCheckVideoBitrateFail

string

Specifies whether to allow video bitrate check failures. The priority of this parameter is higher than that of IsCheckVideoBitrate.

  • true: Do not transcode the video if a check failure occurs.

  • false: Do not check.

  • Default value: false.

false

AdjDarMethod

string

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

  • rescale: Stretch the resolution.

  • crop: Crop the resolution.

  • none: Do not change the resolution.

none

IsCheckVideoBitrate

string

Specifies whether to check the video bitrate. If the output video bitrate is greater than the input video bitrate, the output video bitrate is set to the input video bitrate.

  • true: Check the video bitrate.

  • false: Do not check the video bitrate.

  • Default value: false.

false

IsCheckResoFail

string

Specifies whether to check the resolution. If the output resolution is greater than the input resolution in width or height, a transcoding failure is returned.

  • true: Check the resolution.

  • false: Do not check the resolution.

  • Default value: false.

false

IsCheckAudioBitrateFail

string

Specifies whether to allow audio bitrate check failures. The priority of this parameter is higher than that of IsCheckAudioBitrate.

  • true: Do not transcode the audio if a check failure occurs.

  • false: Do not check.

  • Default value: false.

false

State

string

The status of the template.

  • Normal: Normal.

  • Deleted: Deleted.

Normal

MuxConfig

object

The transcoding muxing configurations.

Webp

object

The muxing configurations for WebP.

Loop

string

The number of loops.

0

Gif

object

The muxing configurations for GIF.

FinalDelay

string

The pause duration of the last frame.

0

DitherMode

string

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

sierra

Loop

string

The number of loops.

0

IsCustomPalette

string

Specifies whether to enable the custom palette feature.

false

Segment

object

The segment configurations.

Duration

string

The segment duration. Unit: seconds.

10

Name

string

The name of the template.

MPS-example

Audio

object

The audio codec configurations.

Profile

string

The audio encoding profile. Valid values when Codec is set to aac:

  • aac_low

  • aac_he

  • aac_he_v2

  • aac_ld

  • aac_eld

aac_low

Remove

string

Specifies whether to remove the audio stream.

  • true: Remove the audio stream.

  • false: Retain the audio stream.

  • 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: Kbps.

  • Default value: 128.

500

Volume

object

The volume control settings.

Method

string

The volume adjustment method. Valid values:

  • auto: Automatic adjustment.

  • dynamic: Dynamic adjustment.

  • linear: Linear adjustment.

  • Default value: dynamic.

auto

TruePeak

string

The peak volume.

  • This parameter takes effect only when Method is set to dynamic.

  • Unit: dB.

  • Valid values: [-9,0].

  • Default value: -1.

-1

IntegratedLoudnessTarget

string

The target volume.

  • This parameter takes effect only when Method is set to dynamic.

  • Unit: dB.

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

  • Default value: -6.

-6

LoudnessRangeTarget

string

The fluctuation range relative to the target volume.

  • This parameter takes effect only when Method is set to dynamic.

  • Unit: dB.

  • Valid values: [1,20].

  • Default value: 8.

8

Level

string

The volume increase level relative to the input audio.

  • This parameter takes effect only when Method is set to linear.

  • Unit: dB.

  • Valid values: a maximum of 20 dB.

  • Default value: -20 dB.

-20

PeakLevel

string

The volume adjustment coefficient.

This parameter takes effect only when Method is set to adaptive.

Valid values: [0,1].

Default value: 0.9.

0.9

Id

string

The ID of the transcoding template.

16f01ad6175e4230ac42bb5182cd****

Container

object

The container.

Format

string

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

flv

CreationTime

string

The time when the template was created. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format.

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.