All Products
Search
Document Center

ApsaraVideo VOD:AddTranscodeTemplateGroup

Last Updated:Jul 21, 2026

Adds transcoding configurations. You can create a transcoding template group or add transcoding templates to a specified template group.

Operation description

  • Transcoding template groups that are locked by the ApsaraVideo VOD backend do not support custom operations. You can call the GetTranscodeTemplateGroup operation to query the template configuration and check whether the template group is locked based on the Locked response parameter. You can call the UpdateTranscodeTemplateGroup operation to unlock the template before you modify it.

  • Because transcoding involves storage addresses of files, you cannot add a transcoding template group if no storage address is available. You can activate a VOD system bucket in the ApsaraVideo VOD console > Configuration Management > Media Asset Management Configuration > Storage Management to obtain an available storage address.

  • You cannot add transcoding template configurations to a No Transcoding template group.

  • You must specify either TranscodeTemplateGroupId or Name.

  • You can create a maximum of 20 transcoding template groups.

  • You can add a maximum of 20 transcoding template configurations to a transcoding template group.

  • To generate adaptive bitrate streaming addresses through transcoding, you can add a maximum of 10 video packaging templates to a transcoding template group. If more than 10 templates are added, only individual stream addresses are generated instead of adaptive bitrate streaming addresses.

QPS limit

The maximum number of queries per second (QPS) per user for this operation is 5. If the number of calls per second exceeds the limit, throttling is triggered. This may affect your business. Manage your calls appropriately. For more information, see QPS limit.

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

vod:AddTranscodeTemplateGroup

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

The name of the transcoding template group.

  • The name can be up to 128 bytes in length.

  • The value is encoded in UTF-8.

Note

You must specify either TranscodeTemplateGroupId or Name.

transcodetemplate

TranscodeTemplateList

string

No

The transcoding template configurations in the JSON format. For more information about the parameter structure, see TranscodeTemplate.

Note
  • If you do not specify this parameter, the transcoding process is not created and video uploads do not trigger transcoding.

  • If you do not need to set the Width or Height property, do not specify the corresponding property. Do not set it to an empty string, such as "Height":"".

[{"Video":{"Bitrate":"400","Codec":"H.264","Fps":"30","Height":360,"Width":640},"Definition":"SD","Container":{"Format":"mp4"},"TemplateName":"testName","MuxConfig":{},"Audio":{"Codec":"AAC","Bitrate":"64","Samplerate":"44100"}}]

TranscodeTemplateGroupId

string

No

The ID of the transcoding template group. If you specify the ID of a transcoding template group, new transcoding templates are added to the specified template group.

Note

You must specify either TranscodeTemplateGroupId or Name.

4c71a339fe52b4fa6f4527****

AppId

string

No

The application ID. Default value: app-1000000. For more information, see Multi-application.

app-****

Response elements

Element

Type

Description

Example

object

The response parameters.

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.