Domain name for API request: vod.intl.tencentcloudapi.com.
This API is used to create custom transcoding templates. Maximum quantity: 100.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateTranscodeTemplate. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| Container | Yes | String | Container format. Valid values: mp4, flv, hls, mp3, flac, ogg, m4a, and wav. Among them, mp3, flac, ogg, m4a, and wav are for audio-only files. |
| SubAppId | No | Integer | Video-on-demand (VOD) application ID. For customers who activate VOD services from December 25, 2023, if they access resources in VOD applications (whether default or newly created), this field must be filled in as the app ID. |
| Name | No | String | Transcoding template name. Length limit: 64 characters. |
| Comment | No | String | Transcoding template description. Length limit: 256 characters. |
| RemoveVideo | No | Integer | Indicates whether to remove video data. Valid values: |
| RemoveAudio | No | Integer | Indicates whether to remove audio data. Valid values: |
| VideoTemplate | No | VideoTemplateInfo | Video stream configuration parameters. This field is required when RemoveVideo is 0. |
| AudioTemplate | No | AudioTemplateInfo | Audio stream configuration parameters. This field is required when RemoveAudio is 0. |
| TEHDConfig | No | TEHDConfig | Top Speed Codec transcoding parameters. |
| EnhanceConfig | No | EnhanceConfig | Audio/video enhancement configurations. |
| SegmentType | No | String | Segment type. Valid when Container is hls. Available values: |
| StdExtInfo | No | String | Extended parameter. |
| Parameter Name | Type | Description |
|---|---|---|
| Definition | Integer | Unique identifier of the transcoding template. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Creating a Transcoding Template
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateTranscodeTemplate
<Common request parameters>
{
"RemoveVideo": 0,
"Container": "mp4",
"Name": "Transcoding Template 1",
"AudioTemplate": {
"SampleRate": 200,
"Codec": "libfdk_aac",
"Bitrate": 200
},
"VideoTemplate": {
"Codec": "libx264",
"Bitrate": 256,
"Fps": 45
},
"RemoveAudio": 0
}
{
"Response": {
"Definition": 1008,
"RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InvalidVodUser | VOD service is not enabled. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.AudioBitrate | Invalid parameter: audio stream bit rate. |
| InvalidParameterValue.AudioChannel | Parameter value error: AudioChannel. |
| InvalidParameterValue.AudioCodec | Invalid parameter: audio stream encoding format. |
| InvalidParameterValue.AudioSampleRate | Invalid parameter: audio stream sampling rate. |
| InvalidParameterValue.Bitrate | Invalid audio/video bitrate. |
| InvalidParameterValue.Codec | Invalid audio/video encoding format. |
| InvalidParameterValue.Comment | Parameter error: description of this template. |
| InvalidParameterValue.Container | Parameter error: muxing format. |
| InvalidParameterValue.FillType | Parameter error: Incorrect filling method. |
| InvalidParameterValue.Fps | Parameter error: video frame rate. |
| InvalidParameterValue.Height | Parameter error: height. |
| InvalidParameterValue.Name | Parameter value error: Name exceeds the length limit. |
| InvalidParameterValue.RemoveAudio | Parameter value error: RemoveAudio. |
| InvalidParameterValue.RemoveVideo | Parameter value error: RemoveVideo. |
| InvalidParameterValue.Resolution | Parameter error: Resolution error. |
| InvalidParameterValue.ResolutionAdaptive | Invalid ResolutionAdaptive. |
| InvalidParameterValue.TEHDType | Parameter value error: TEHD Type is invalid. |
| InvalidParameterValue.Type | Type parameter value error. |
| InvalidParameterValue.Vcrf | Parameter error: vcrf. |
| InvalidParameterValue.VideoBitrate | Invalid parameter: video stream bitrate. |
| InvalidParameterValue.VideoCodec | Invalid parameter: video stream encoding format. |
| InvalidParameterValue.Width | Parameter error: width. |
| LimitExceeded.TooMuchTemplate | Exceed the limit: The number of templates exceeds the upper limit of 100. For more, please submit a ticket (https://console.tencentcloud.com/workorder/category). |
| UnauthorizedOperation | Unauthorized operation. |
フィードバック