Domain name for API request: vod.intl.tencentcloudapi.com.
This API is used to create an adaptive bitrate streaming template. Up to 100 templates can be created.
A maximum of 20 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: CreateAdaptiveDynamicStreamingTemplate. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| Format | Yes | String | Adaptive Transcoding Format. Value ranges from: |
| StreamInfos.N | Yes | Array of AdaptiveStreamTemplate | Adaptive Transcoding Output Substream Parameter Information. Up to 10 substreams. |
| SubAppId | No | Integer | Video-on-demand (VOD) application ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID to access resources in on-demand applications (whether default or newly created application). |
| Name | No | String | Template name. The length cannot exceed 64 characters. |
| DrmType | No | String | DRM solution type. Value ranges from: |
| DrmKeyProvider | No | String | DRM key provider. Permissible range: SDMC service will be gradually phased out subsequently. Please use VOD DRM encryption service. |
| DrmEncryptType | No | String | Encryption method. Available values: If left blank: |
| DisableHigherVideoBitrate | No | Integer | Whether to prohibit video low bitrate to high bitrate conversion. Value ranges from: |
| DisableHigherVideoResolution | No | Integer | Whether to prohibit video resolution to high resolution conversion. Value ranges from: |
| Comment | No | String | Template description, with a length limit of 256 characters. |
| SegmentType | No | String | Segment type, valid when Format is HLS. Available values: |
| Parameter Name | Type | Description |
|---|---|---|
| Definition | Integer | Unique identifier of the adaptive 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. |
Create an adaptive bitrate streaming template.
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAdaptiveDynamicStreamingTemplate
<Common request parameters>
{
"StreamInfos": [
{
"Audio": {
"SampleRate": 44100,
"Codec": "flac",
"Bitrate": 1024
},
"Video": {
"Codec": "libx264",
"Bitrate": 2000,
"Fps": 25
}
}
],
"Name": "Adaptive Bitrate Streaming Template 1"
"Format": "HLS"
}
{
"Response": {
"Definition": 30018,
"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 | The VOD service is not activated. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.Bitrate | Invalid audio/video bitrate. |
| InvalidParameterValue.Codec | Invalid audio/video codec. |
| InvalidParameterValue.Comment | Invalid parameter: template description. |
| InvalidParameterValue.DisableHigherVideoBitrate | Invalid value of the switch for prohibiting transcoding from low bitrate to high bitrate. |
| InvalidParameterValue.DisableHigherVideoResolution | Invalid value of the switch for prohibiting transcoding from low resolution to high resolution. |
| InvalidParameterValue.DrmType | Invalid DRM type. |
| InvalidParameterValue.FillType | Invalid parameter: incorrect fill type. |
| InvalidParameterValue.Format | Incorrect parameter value: Format. |
| InvalidParameterValue.Fps | Invalid parameter: video frame rate. |
| InvalidParameterValue.Height | Invalid parameter: height. |
| InvalidParameterValue.Name | Incorrect parameter value: Name exceeds the length limit. |
| InvalidParameterValue.RemoveAudio | Incorrect parameter value: RemoveAudio. |
| InvalidParameterValue.SampleRate | Invalid audio sample rate. |
| InvalidParameterValue.SoundSystem | Incorrect parameter: audio channel system. |
| InvalidParameterValue.Width | Invalid parameter: width. |
| LimitExceeded.TooMuchTemplate | Limit exceeded: The number of templates exceeds the upper limit of 100. If you need more, pleaseSubmit a ticket. |
文档反馈