Operation description
A custom transcoding template cannot be updated if it is being used by a job that has been submitted.The ID of the template. You can obtain the template ID from the response of the AddTemplate operation.
QPS limits
You can call this operation up to 100 times per second. If the number of 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 limit.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TemplateId | string | Yes | The name of the template. The name can be up to 128 bytes in length. | 16f01ad6175e4230ac42bb5182cd**** |
Name | string | Yes | The container format. The value is a JSON object. Default format: MP4.
For more information, see the Container parameter of the "Parameter details" topic. | MPS-example |
Container | string | No | The configurations of the video stream. The value is a JSON object. For more information, see the Video parameter of the "Parameter details" topic. | {"Format":"mp4"} |
Video | string | No | The configurations of the audio stream. The value is a JSON object. For more information, see the Audio parameter of the "Parameter details" topic. | {"Codec":"H.264","Profile":"high","Bitrate":"500","Crf":"15","Width":"256","Height":"800","Fps":"25","Gop":"10"} |
Audio | string | No | The transmuxing configurations. The value is a JSON object. For more information, see the MuxConfig parameter of the "Parameter details" topic. | {"Codec":"aac","Samplerate":"44100","Bitrate":"500","Channels":"2"} |
MuxConfig | string | No | The general transcoding configurations. The value is a JSON object. For more information, see the TransConfig parameter of the "Parameter details" topic. | {"Segment":{"Duration":"10"}} |
TransConfig | string | No | The ID of the request. | {"TransMode":"onepass"} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "5E4FB22E-B9EA-4E24-8FFC-B407EA71QW21",
"Template": {
"Video": {
"LongShortMode": "false",
"Bufsize": "6000",
"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",
"ResoPriority": "1",
"Hdr2sdr": "",
"NarrowBand": {
"Version": "",
"Abrmax": 0,
"MaxAbrRatio": 0
}
},
"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": "false",
"DitherMode": "bayer",
"Loop": "0",
"IsCustomPalette": "0"
},
"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",
"Level": "-20",
"LoudnessRangeTarget": "8",
"PeakLevel": ""
}
},
"Id": "16f01ad6175e4230ac42bb5182cd****",
"Container": {
"Format": "mp4"
}
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||
---|---|---|---|---|
2024-03-13 | The response structure of the API has changed | see changesets | ||
| ||||
2024-01-10 | The response structure of the API has changed | see changesets | ||
| ||||
2024-01-04 | The response structure of the API has changed | see changesets | ||
| ||||
2023-07-13 | The response structure of the API has changed | see changesets | ||
|