Domain name for API request: teo.intl.tencentcloudapi.com.
JIT transcoding already provides preset transcoding templates to meet most needs. For personalized transcoding requirements, you can create custom transcoding templates through this API, with up to 100 custom templates.
To ensure consistency of JIT transcoding effects and avoid video output exceptions caused by template changes during EO cache or M3U8 sharding, the template cannot be modified after creation.
To learn about JIT transcoding capacity, see EdgeOne Video Instant Processing Function Introduction (https://www.tencentcloud.com/document/product/1552/111927?from_cn_redirect=1).
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: CreateJustInTimeTranscodeTemplate. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Site ID. |
| TemplateName | Yes | String | Just in time transcoding template name. Length limit: 64 characters. |
| Comment | No | String | Template description information. The length cannot exceed 256 characters. Empty by default. |
| VideoStreamSwitch | No | String | Video stream switch. Valid values:on: Enable; |
| AudioStreamSwitch | No | String | Enable audio stream switch. Value:on: Enable; |
| VideoTemplate | No | VideoTemplateInfo | Video stream configuration parameters. This field is required when VideoStreamSwitch is on. |
| AudioTemplate | No | AudioTemplateInfo | Audio stream configuration parameters. This field is required when AudioStreamSwitch is on. |
| Parameter Name | Type | Description |
|---|---|---|
| TemplateId | String | Unique identifier of the JIT transcoding template, used for JIT transcoding URL concatenation. |
| 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 a just in time transcoding template.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateJustInTimeTranscodeTemplate
<Common request parameters>
{
"ZoneId": "zone-djuqmq",
"TemplateName": "myTemplate",
"Comment": "This is my template.",
"VideoStreamSwitch": "on",
"AudioStreamSwitch": "on",
"VideoTemplate": {
"Codec": "H.264",
"Bitrate": 2048,
"Fps": 25
},
"AudioTemplate": {
"Codec": "libfdk_aac",
"AudioChannel": 2
}
}
{
"Response": {
"TemplateId": "C1LZ7982VgTpYhJ7M",
"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.ProductDiscontinued | The product will already be discontinued. Operation denied. |
| FailedOperation.ProductNotActivated | No. Enable this product and try again. |
| FailedOperation.TemplateOverLimit | The number of templates under this site exceeds the maximum quantity limit. |
| InternalError | Internal error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.ZoneNotFound | No corresponding site. Please ensure the site information is filled correctly. |
| InvalidParameterValue.ZonePaused | Site disabled. Check the current site status. |
| MissingParameter | Parameters are missing. |
| UnauthorizedOperation | Unauthorized operation. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários