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
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
mts:UpdateTemplate | update | *All Resources * |
| none |
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": "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": "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": "0.9"
}
},
"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 | View Change Details |
2024-01-10 | The response structure of the API has changed | View Change Details |
2024-01-04 | The response structure of the API has changed | View Change Details |
2023-07-13 | The response structure of the API has changed | View Change Details |