All Products
Search
Document Center

ApsaraVideo VOD:AddTranscodeTemplateGroup

Last Updated:Jun 15, 2026

Use this operation to create a transcode template group or add transcode templates to an existing group.

Operation description

  • You cannot modify a transcode template group that is locked by the ApsaraVideo VOD service. To check if a group is locked, call the GetTranscodeTemplateGroup operation and check the Locked parameter in the response. To modify a locked group, you must first call the UpdateTranscodeTemplateGroup operation to unlock it.

  • You cannot add a transcode template group without a valid storage location, as transcoding requires a storage address. To obtain a usable storage address, go to the ApsaraVideo VOD console, navigate to Configuration Management > Media Asset Management > Storage Management, and activate the VOD system bucket.

  • You cannot add transcode templates to a no transcoding template group.

  • You must specify either TranscodeTemplateGroupId or Name.

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

  • You can add a maximum of 20 transcode templates to a single transcode template group.

  • To generate adaptive streaming URLs, you can add a maximum of 10 video packaging templates to a transcode template group. If you add more than 10 templates, the service generates URLs for individual streams but not an adaptive streaming URL.

QPS limit

The QPS limit for this operation is 5 per user. Calls that exceed this limit are rate-limited. 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 transcode template group.

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

  • The name must be UTF-8 encoded.

Note

You must specify either TranscodeTemplateGroupId or Name.

transcodetemplate

TranscodeTemplateList

string

No

The configurations of the transcode templates, specified as a JSON string. For more information about the parameter structure, see TranscodeTemplate.

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

  • If you do not need to set the Width or Height properties, omit them from the request. Do not set them to an empty string, such as "Height":"".

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

TranscodeTemplateGroupId

string

No

The ID of the transcode template group. If you specify this ID, you can add new transcode templates to the specified group.

Note

You must specify either TranscodeTemplateGroupId or Name.

4c71a339fe52b4fa6f4527****

AppId

string

No

The ID of the application. The default value is app-1000000. For more information, see Multi-application.

app-****

Response elements

Element

Type

Description

Example

object

The returned parameters.

TranscodeTemplateGroupId

string

The ID of the transcode template group.

34e908aa4024af7821c31f93a2a****

RequestId

string

The ID of the request.

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.