Queries custom transcoding templates in the specified state.
Usage notes
You can call this operation to query custom transcoding templates in the specified state.
Limits on QPS
You can call this operation up to 100 times per second. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SearchTemplate |
The operation that you want to perform. Set the value to SearchTemplate. |
PageSize | Long | No | 10 |
The number of entries to return on each page.
|
PageNumber | Long | No | 1 |
The number of the page to return. Default value: 1. |
State | String | No | Normal |
The status of the custom transcoding templates that you want to query.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
TotalCount | Long | 1 |
The total number of entries returned. |
TemplateList | Array of Template |
The details of the custom transcoding templates. |
|
Template | |||
Video | Object |
The video codec configuration. |
|
Bufsize | String | 6000 |
The size of the buffer.
|
LongShortMode | String | false |
Indicates whether to enable the auto-rotate screen feature.
|
Degrain | String | 10 |
The level of video quality control. |
BitrateBnd | Object |
The average bitrate range of the video. |
|
Max | String | 500 |
The upper limit of the total bitrate. Unit: Kbit/s. |
Min | String | 100 |
The lower limit of the total bitrate. Unit: Kbit/s. |
PixFmt | String | yuv420p |
The pixel format for video color encoding. Valid values: standard pixel formats such as yuv420p and yuvj420p. |
Pad | String | 1280:800:0:140 |
The black borders to be added to the video.
|
Codec | String | H.264 |
The video codec.
|
Height | String | 800 |
The height of the video.
|
Qscale | String | 1 |
The strength of the independent noise reduction algorithm. |
Crop | String | border |
The method of video cropping. Valid values:
|
Bitrate | String | 200 |
The average bitrate of the video. Unit: Kbit/s. |
Maxrate | String | 500 |
The maximum video bitrate. Unit: Kbit/s. |
MaxFps | String | 60 |
The maximum frame rate. |
Profile | String | high |
The codec profile.
|
Crf | String | 15 |
The constant rate factor.
|
Remove | String | false |
Indicates whether to delete the video stream.
|
Gop | String | 10 |
The maximum number of frames between two keyframes. Default value: 250. |
Width | String | 256 |
The width of the video.
|
Fps | String | 25 |
The frame rate of the video.
|
Preset | String | medium |
The preset video algorithm. Default value: medium. Valid values:
|
ScanMode | String | interlaced |
The scan mode. Valid values:
|
TransConfig | Object |
The general transcoding configuration. |
|
IsCheckAudioBitrate | String | false |
Indicates whether to check the audio bitrate.
|
TransMode | String | onepass |
The transcoding mode. Default value: onepass. Valid values:
|
IsCheckReso | String | false |
Indicates whether to check the resolution.
|
IsCheckVideoBitrateFail | String | false |
Indicates whether to allow video bitrate check errors.
|
AdjDarMethod | String | none |
The method of resolution adjustment. Default value: none. Valid values:
|
IsCheckVideoBitrate | String | false |
Indicates whether to check the video bitrate.
|
IsCheckResoFail | String | false |
Indicates whether to check the resolution.
|
IsCheckAudioBitrateFail | String | false |
Indicates whether to allow audio bitrate check errors.
|
State | String | Normal |
The status of the template.
|
MuxConfig | Object |
The transmuxing configuration. |
|
Gif | Object |
The transmuxing configuration for GIF. |
|
FinalDelay | String | 0 |
The duration for which the final frame is paused. Unit: centiseconds. |
DitherMode | String | sierra |
The color dithering algorithm of the palette. Valid values: sierra and bayer. |
Loop | String | 0 |
The loop count. |
IsCustomPalette | String | false |
Indicates whether the custom palette is used. |
Segment | Object |
The segment configuration. |
|
Duration | String | 10 |
The length of the segment. Unit: seconds. |
Name | String | MPS-example |
The name of the template. |
Audio | Object |
The audio codec configuration. |
|
Profile | String | aac_low |
The codec profile of the audio. Valid values when the Codec parameter is set to aac:
|
Remove | String | false |
Indicates whether to delete the audio stream.
|
Codec | String | aac |
The audio codec. Default value: aac. Valid values:
|
Samplerate | String | 44100 |
The sampling rate.
|
Qscale | String | 1 |
The strength of the independent noise reduction algorithm. Valid values: [1, 9]. |
Channels | String | 2 |
The number of sound channels. Default value: 2. |
Bitrate | String | 500 |
The audio bitrate of the output file.
|
Id | String | 16f01ad6175e4230ac42bb5182cd**** |
The ID of the transcoding template. |
Container | Object |
The container configuration. |
|
Format | String | mp4 |
The container format. Valid values:
|
PageSize | Long | 10 |
The number of entries returned per page. |
RequestId | String | BC860F04-778A-472F-AB39-E1BF329C**** |
The ID of the request. |
PageNumber | Long | 1 |
The page number of the returned page. |
Examples
Sample requests
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=SearchTemplate
&PageSize=10
&PageNumber=1
&State=Normal
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<SearchTemplateResponse>
<TotalCount>1</TotalCount>
<TemplateList>
<Video>
<Bufsize>6000</Bufsize>
<LongShortMode>false</LongShortMode>
<Degrain>10</Degrain>
<BitrateBnd>
<Max>500</Max>
<Min>100</Min>
</BitrateBnd>
<PixFmt>yuv420p</PixFmt>
<Pad>1280:800:0:140</Pad>
<Codec>H.264</Codec>
<Height>800</Height>
<Qscale>1</Qscale>
<Crop>border</Crop>
<Bitrate>200</Bitrate>
<Maxrate>500</Maxrate>
<MaxFps>60</MaxFps>
<Profile>high</Profile>
<Crf>15</Crf>
<Remove>false</Remove>
<Gop>10</Gop>
<Width>256</Width>
<Fps>25</Fps>
<Preset>medium</Preset>
<ScanMode>interlaced</ScanMode>
</Video>
<TransConfig>
<IsCheckAudioBitrate>false</IsCheckAudioBitrate>
<TransMode>onepass</TransMode>
<IsCheckReso>false</IsCheckReso>
<IsCheckVideoBitrateFail>false</IsCheckVideoBitrateFail>
<AdjDarMethod>none</AdjDarMethod>
<IsCheckVideoBitrate>false</IsCheckVideoBitrate>
<IsCheckResoFail>false</IsCheckResoFail>
<IsCheckAudioBitrateFail>false</IsCheckAudioBitrateFail>
</TransConfig>
<State>Normal</State>
<MuxConfig>
<Gif>
<FinalDelay>0</FinalDelay>
<DitherMode>sierra</DitherMode>
<Loop>0</Loop>
<IsCustomPalette>false</IsCustomPalette>
</Gif>
<Segment>
<Duration>10</Duration>
</Segment>
</MuxConfig>
<Name>MPS-example</Name>
<Audio>
<Profile>aac_low</Profile>
<Remove>false</Remove>
<Codec>aac</Codec>
<Samplerate>44100</Samplerate>
<Qscale>1</Qscale>
<Channels>2</Channels>
<Bitrate>500</Bitrate>
</Audio>
<Id>16f01ad6175e4230ac42bb5182cd****</Id>
<Container>
<Format>mp4</Format>
</Container>
</TemplateList>
<PageSize>10</PageSize>
<RequestId>BC860F04-778A-472F-AB39-E1BF329C****</RequestId>
<PageNumber>1</PageNumber>
</SearchTemplateResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"TemplateList" : [ {
"Video" : {
"Bufsize" : "6000",
"LongShortMode" : "false",
"Degrain" : "10",
"BitrateBnd" : {
"Max" : "500",
"Min" : "100"
},
"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"
},
"TransConfig" : {
"IsCheckAudioBitrate" : "false",
"TransMode" : "onepass",
"IsCheckReso" : "false",
"IsCheckVideoBitrateFail" : "false",
"AdjDarMethod" : "none",
"IsCheckVideoBitrate" : "false",
"IsCheckResoFail" : "false",
"IsCheckAudioBitrateFail" : "false"
},
"State" : "Normal",
"MuxConfig" : {
"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"
},
"Id" : "16f01ad6175e4230ac42bb5182cd****",
"Container" : {
"Format" : "mp4"
}
} ],
"PageSize" : 10,
"RequestId" : "BC860F04-778A-472F-AB39-E1BF329C****",
"PageNumber" : 1
}
Error codes
For a list of error codes, visit the API Error Center.