调用AddTranscodeTemplateGroup添加转码配置信息,可创建新的转码模板组,或者向指定模板组中添加新的转码模板。
- 被点播后台锁定的转码模板组不支持自定义操作,请提工单联系阿里云处理。
- 由于转码涉及到文件的存储地址,因此如果没有存储地址数据,暂不支持添加转码模板组(储地址数据在存储管理里面激活)。
- 不转码即分发转码模板组,不允许追加转码模板配置信息。
- 支持最多创建20个转码模板组。
- 单个转码模板组支持最多追加20个转码模板配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AddTranscodeTemplateGroup |
系统规定参数。取值:AddTranscodeTemplateGroup。 |
Name | String | 否 | transcodetemplate |
转码模板组名称。
|
TranscodeTemplateList | String | 否 | [{"Video":{"Bitrate":"400","Codec":"H.264","Fps":"30"},"Audio":{"Codec":"AAC","Bitrate":"64","Definition":"SD","EncryptType":"Private","Container":{"Format":"m3u8"},"PackageType":"HLSPackage"}}] |
转码模板配置信息(JSON字符串)。参数结构详情,请参见TranscodeTemplate。 |
TranscodeTemplateGroupId | String | 否 | 4c71a339fe*****52b4fa6f4527 |
转码模板组ID。 |
AppId | String | 否 | app-**** |
应用ID。默认取值: app-1000000。使用说明,请参见多应用。 |
- TranscodeTemplateList该参数不传递,则不会构建转码处理流程,视频上传不会触发转码。
- TranscodeTemplateGroupId和Name必须传递一个。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
TranscodeTemplateGroupId | String | 34e908aa4024a*****f7821c31f93a2a |
转码模板组ID。 |
RequestId | String | 25818875-5F78-4A*****F6-D7393642CA58 |
请求ID。 |
示例
请求示例
https://vod.{ApiRegion}.aliyuncs.com/?Action=AddTranscodeTemplateGroup
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<AddTranscodeTemplateGroupResponse>
<RequestId>25818875-5F78-4A*****F6-D7393642CA58</RequestId>
<TranscodeTemplateGroupId>34e908aa4024a*****f7821c31f93a2a</TranscodeTemplateGroupId>
</AddTranscodeTemplateGroupResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "25818875-5F78-4A*****F6-D7393642CA58",
"TranscodeTemplateGroupId" : "34e908aa4024a*****f7821c31f93a2a"
}
错误码
访问错误中心查看更多错误码。
接口错误码
下表列举了本接口特有的错误码。
错误代码 |
错误信息 |
HTTP 状态码 |
说明 |
---|---|---|---|
InvalidStorage.NotFound |
The storage info dose not exist. |
404 |
不存在存储地址数据。 |
InvalidTranscodeTemplateGroup.NotFound |
The transcode template group does not exist. |
404 |
指定的转码模板组不存在。 |
Forbidden.LockedTemplateGroup |
The transcode template group has been locked. |
403 |
指定的模板组被锁定,不可操作,请联系点播后台。 |
Forbidden.SpecialTemplateGroup |
The transcode template group is using for special purpose. |
403 |
特殊用途转码模板组,不允许追加转码模板配置,例如:不转码即分发模板组、仅存储模板组。 |
TrasncodeTemplateGroupExceededMax |
The transcode template group size exceeded maximum. |
400 |
转码模板组数据达到上限,转码模板组最大支持创建20个。 |
TranscodeTemplateExceededMax |
The template transcode template config size exceeded maximum. |
400 |
转码模板组关联的转码模板配置数据达到上限,最大支持关联20个转码模板配置。 |
WatermarkExceededMax |
The watermark size exceeded maximum. |
400 |
转码模板组下单个转码模板能关联的水印ID数达到上限,最大支持关联4个水印ID。 |
SDK示例
建议使用服务端SDK来调用API,此API各语言调用的示例代码,请参见: