AddMediaConvertTemplateGroup
Creates a MediaConvert transcoding template group, or appends transcoding template configurations to an existing MediaConvert transcoding template group.
Operation description
Specify Name to create a new transcoding template group. Specify TranscodeTemplateGroupId to append transcoding template configurations to the specified transcoding template group. The total number of existing and new templates cannot exceed 20.
GroupConfig is not supported in append mode. To modify group-level configurations, call the UpdateMediaConvertTemplateGroup operation.
Creating a transcoding template group requires a valid and available storage address. If no available storage address exists, template creation fails. You can activate the VOD system bucket to obtain an available storage address by navigating to ApsaraVideo VOD console > Configuration Management > Media Asset Management Settings > Storage Management.
The queries per second (QPS) limit per user is 5. If this limit is exceeded, API calls are throttled, which may affect your services. Call this operation at a reasonable frequency.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vod:AddMediaConvertTemplateGroup |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
No |
The name of the transcoding template group.
|
mcTemplateGroup |
| TranscodeTemplateGroupId |
string |
No |
The ID of the transcoding template group. If you specify this parameter, transcoding template configurations are appended to the specified transcoding template group. If you do not specify this parameter, a new transcoding template group is created. Note
You can only append configurations to transcoding template groups created by using this operation (MediaConvert pipeline). |
4c71a339fe52b4fa6f4527**** |
| TranscodeTemplateList |
string |
No |
The transcoding template configurations in JSON string format. You must specify this parameter when you invoke the operation. A transcoding template group supports up to 20 transcoding template configurations, which is the sum of existing and new templates in append mode. Each transcoding template supports the following fields:
Note
If you do not need to set a property, omit the property instead of passing an empty string. |
[{"Definition":"HD","TemplateName":"hd-720p","Type":"Normal","Video":{"Codec":"H.264","Bitrate":"2000","Width":"1280","Height":"720","Fps":"30"},"Audio":{"Codec":"AAC","Bitrate":"128","Samplerate":"44100","Channels":"2"},"Container":{"Format":"m3u8"},"MuxConfig":{"Segment":{"Duration":"10"}}}] |
| GroupConfig |
string |
No |
The group-level configurations in JSON string format. Currently, AutoStreamName is supported. You can use it to customize the file name of the master playlist generated by adaptive bitrate streaming packaging. You can use the {RunId} placeholder in the value. Note
This parameter is supported only when creating a new transcoding template group. To modify group-level configurations, call the UpdateMediaConvertTemplateGroup operation. |
{"AutoStreamName":"{RunId}_master"} |
| AppId |
string |
No |
The application ID. Default value: app-1000000. For more information, see Multi-application. |
app-**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TranscodeTemplateGroupId |
string |
The ID of the transcoding template group. |
34e908aa4024af7821c31f93a2a**** |
| RequestId |
string |
The request ID. |
25818875-5F78-4AF6-D7393642CA58**** |
Examples
Success response
JSON format
{
"TranscodeTemplateGroupId": "34e908aa4024af7821c31f93a2a****",
"RequestId": "25818875-5F78-4AF6-D7393642CA58****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.