tencent cloud

Creating Template for Transcoding pro (Broadcast Media Format)
Last updated: 2025-09-09 11:42:42
Creating Template for Transcoding pro (Broadcast Media Format)
Last updated: 2025-09-09 11:42:42

Feature Description

Create an audio and video transcoding pro template.
Note:
This feature is for broadcast media format transcoding and can process formats such as Apple Prores and Sony XAVC.

Authorization Description

When used by a sub-account, the ci:CreateMediaTemplate permission is required. For details, see Cloud Infinite action.

Activating a Service

Using this feature requires enabling Cloud Infinite in advance and binding a bucket. For details, see Bind Bucket.
Use this feature requires enabling Media Processing Service in advance via console or API. For details, see Enable Media Processing Service.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Usage Limits.


Request

Request sample:

POST /template HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Description
Authorization: Auth String. For details, see Request Signature document.

Request header.

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body.

The implementation of this request operation requires the following request body.
<Request>
<Tag>TranscodePro</Tag>
<Name>TemplateName</Name>
<Container>
<Format>mxf</Format>
</Container>
<Video>
<Codec>xavc</Codec>
<Profile>XAVC-HD_422_10bit</Profile>
<Width>1920</Width>
<Height>1080</Height>
<Interlaced>true</Interlaced>
<Fps>30000/1001</Fps>
<Bitrate>50000</Bitrate>
</Video>
<Audio>
<Codec>pcm_s24le</Codec>
</Audio>
<TransConfig>
<AdjDarMethod>scale</AdjDarMethod>
<IsCheckReso>false</IsCheckReso>
<ResoAdjMethod>1</ResoAdjMethod>
</TransConfig>
<TimeInterval>
<Start>0</Start>
<Duration>60</Duration>
</TimeInterval>
</Request>
The data are described as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
Container for saving requests
Container
Yes
The specific data description for the
Request
Container type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Tag
Request
Template type: TranscodePro
String
Yes
Name
Request
Template name only supports Chinese, English, digits, _, -, and *, with length not exceeding 64.
String
Yes
Container
Request
container format
Container
Yes
Video
Request
video information
Container
Yes
TimeInterval
Request
time interval
Container
No
Audio
Request
audio content, not passing Audio is equivalent to deleting audio content
Container
No
TransConfig
Request
transcoding configuration
Container
No
The specific data description for the
Container
type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Format
Request.Container
Encapsulation format: Valid values are mxf, mov, mkv.
String
Yes
Set container. The supported audio/video encoding/decoding formats are as shown in the table below:
Container
Audio Codecs
Video Codecs
mxf
pcm_s24le
xavc
mov,mkv
aac,mp3
apple_prores
The specific data description for the
Video
Container type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Codec
Request.Video
Encoding/decoding format, supports xavc, apple_prores.
String
Yes
None.
Profile
Request.Video
Preset video algorithm Parameter value range is shown in the table below
String
Yes
None.
Width
Request.Video
Width, refer to the table below for the value range.
String
Yes
None.
Height
Request.Video
High, refer to the table below for the value range
String
Yes
None.
Interlaced
Request.Video
Field mode, parameter value range is shown in the table below.
String
Yes
None.
Fps
Request.Video
Frame rate, refer to the table below for the value range
String
Yes
None.
Bitrate
Request.Video
Bitrate of the video output file, parameter value range is shown in the table below.
String
No
None.
Rotate
Request.Video
Rotation angle
Value range: [0, 360)
Unit: degree
String
No
None.
Note:
1. '-' indicates leaving empty.
2. The available values of bitrate correspond to the serial numbers of the available values of frame rate.
When Video.Codec is xavc:
Profile
Width
Height
Interlaced
Fps
Bitrate (Unit: kbps)
XAVC-HD_intra_420_10bit_class50
1440
1080
true
1,25
2,30000/1001
-
XAVC-HD_intra_420_10bit_class50
1440
1080
false
1,25
2,24000/1001
3,30000/1001
-
XAVC-HD_intra_422_10bit_class100
1280
720
false
1,50
2,60000/1001
-
XAVC-HD_intra_422_10bit_class100
1920
1080
true
1,25
2,30000/1001
-
XAVC-HD_intra_422_10bit_class100
1920
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-HD_intra_422_10bit_class200
1920
1080
true
1,25
2,30000/1001
-
XAVC-HD_intra_422_10bit_class200
1920
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit_class100
2048
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit_class300
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit_class300
4096
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit_class480
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit_class480
4096
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
-
XAVC-4K_intra_422_10bit
2048
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1,93000
2,185000
3,89000
4,111000
5,222000
XAVC-4K_intra_422_10bit
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1, 250,000 or 400,000
2,500000 or 800000
3,240000 or 384000
4, 300,000 or 480,000
5,600000 or 960000
XAVC-4K_intra_422_10bit
4096
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1. 250,000 or 400,000
2,500000 or 800000
3,240000 or 384000
4,300000 or 480000
5,600000 or 960000
XAVC-HD_422_10bit
1280
720
false
1,50
2,60000/1001
1,50000
2,50000
XAVC-HD_422_10bit
1920
1080
true
1,25
2,30000/1001
1. 25,000 or 35,000 or 50,000
2,25000 or 35000 or 50000
XAVC-HD_422_10bit
1920
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1,25000 or 35000 or 50000
2,35000 or 50000
3,25000 or 35000 or 50000
4,25000 or 35000 or 50000
5,35000 or 50000
XAVC-4K_422_10bit
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1,100000 or 140000 or 200000
2,140000 or 200000
3,100000 or 140000 or 200000
4,100000 or 140000 or 200000
5,140000 or 200000
XAVC-4K_420_8bit
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
1,188000
2,300000
3,188000
4,188000
5,300000
When Video.Codec is apple_prores:
Profile
1.ProRes_422_Proxy
2.ProRes_422_LT
3.ProRes_422
4.ProRes_422_HQ
5.ProRes_4444
6.ProRes_4444_XQ
7.ProRes_4444_alpha
8.ProRes_4444_XQ_alpha
Width
Height
Interlaced
Fps
Bitrate (Unit: kbps)
720
486
false
1,24000/1001
2,30000/1001
Value range: [2000, 3000000]
720
486
true
1,60000/1001
Value range: [2000, 3000000]
720
576
false
1,25
Value range: [2000, 3000000]
720
576
true
1,50
Value range: [2000, 3000000]
960
720
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
1280
720
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
1280
1080
false
1,24000/1001
2,30000/1001
Value range: [2000, 3000000]
1280
1080
true
1,60000/1001
Value range: [2000, 3000000]
1440
1080
false
1,24000/1001
2,25
3,30000/1001
Value range: [2000, 3000000]
1440
1080
true
1,50
2,60000/1001
Value range: [2000, 3000000]
1920
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
1920
1080
true
1,50
2,60000/1001
Value range: [2000, 3000000]
2048
1080
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
2048
1556
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
3840
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
4096
2160
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
5120
2700
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
6144
3240
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001
Value range: [2000, 3000000]
8192
4320
false
1,25
2,50
3,24000/1001
4,30000/1001
5,60000/1001

Value range: [2000, 3000000]

The specific data description for the
TimeInterval
Container type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Default Value
Required or Not
Start
Request.TimeInterval
Start Time
[0, video duration]
Unit: second
Support float format, execution accuracy accurate to milliseconds
String
0
No
Duration
Request.TimeInterval
Duration
[0, video duration]
Unit: seconds
Support float format, with execution accuracy accurate to milliseconds
String
Original video duration
No
The specific data description for the
Audio
Container type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Default Value
Required or Not
Codec
Request.Audio
encoding/decoding format, pcm_s24le, aac, mp3
String
None.
Yes
Remove
Request.Audio
Delete source audio stream or not Parameter value: true, false
String
false
No
The specific data description for the
TransConfig
Container type is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Default Value
Required or Not
AdjDarMethod
Request.TransConfig
Resolution adjustment method
scale crop pad none
When the aspect ratio of the output video differs from that of the original video, adjust the resolution according to this parameter.
String
none
No
IsCheckReso
Request.TransConfig
Check resolution or not Parameter value: true, false
When set to false, transcode according to the configuration parameters.
String
false
No
ResoAdjMethod
Request.TransConfig
Resolution adjustment method
When IsCheckReso is true, this parameter is valid only when taking value 0, 1;
0 indicates using the original video resolution;
1 indicates a transcoding failure.
String
0
No
IsCheckVideoBitrate
Request.TransConfig
Check video bitrate or not Parameter value: true, false
When set to false, transcode according to the configuration parameters.
String
false
No
VideoBitrateAdjMethod
Request.TransConfig
Video bitrate adjustment method
This parameter is valid only when IsCheckVideoBitrate is true; parameter values are 0, 1.
When the output video bitrate is greater than the original video bitrate, 0 indicates using the original video bitrate; 1 indicates returning a transcoding failure
String
0
No
IsCheckAudioBitrate
Request.TransConfig
Check audio bitrate, parameter true, false
When set to false, transcode according to the configuration parameters.
String
false
No
AudioBitrateAdjMethod
Request.TransConfig
Audio bitrate adjustment method
When IsCheckAudioBitrate is true, this parameter is valid only when taking value 0, 1;
When the output audio bitrate is greater than the original audio bitrate, 0 indicates using the original audio bitrate; 1 indicates returning a transcoding failure.
String
0
No
IsCheckVideoFps
Request.TransConfig
Check video frame rate or not Parameter value: true, false
When it is false, transcode according to the configuration parameters.
String
false
No
VideoFpsAdjMethod
Request.TransConfig
Video frame rate adjustment method
This parameter is valid only when IsCheckVideoFps is true; parameter values are 0, 1.
When the output video frame rate is greater than the original video frame rate, 0 indicates using the original video frame rate; 1 indicates returning a transcoding failure.
String
0
No
DeleteMetadata
Request.TransConfig
Delete the MetaData information in the file, value: true, false
String
false
No
IsHdr2Sdr
Request.TransConfig
Enable HDR to SDR conversion or not Parameter value: true, false
String
false
No
Parameter diagram for AdjDarMethod:




Response

Response Headers

This API only returns the public response header. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<Template>
<Tag>TranscodePro</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<BucketId>test-1234567890</BucketId>
<Category>Custom</Category>
<TransProTpl>
<Container>
<Format>mxf</Format>
</Container>
<Video>
<Codec>xavc</Codec>
<Profile>XAVC-HD_422_10bit</Profile>
<Width>1920</Width>
<Height>1080</Height>
<Interlaced>true</Interlaced>
<Fps>30000/1001</Fps>
<Bitrate>50000</Bitrate>
</Video>
<Audio>
<Codec>pcm_s24le</Codec>
</Audio>
<TransConfig>
<AdjDarMethod>scale</AdjDarMethod>
<IsCheckReso>false</IsCheckReso>
<ResoAdjMethod>1</ResoAdjMethod>
</TransConfig>
<TimeInterval>
<Start>0</Start>
<Duration>60</Duration>
</TimeInterval>
</TransProTpl>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Container node
Response
content:
Node Name (Keyword)
Parent Node
Description
Type
TemplateId
Response.Template
Template ID
String
Name
Response.Template
Template Name
String
BucketId
Response.Template
Template's bucket
String
Category
Response.Template
Template Property, Custom or Official
String
Tag
Response.Template
Template type: TranscodePro
String
UpdateTime
Response.Template
Update time
String
CreateTime
Response.Template
Creation time
String
TransProTpl
Response.Template
Detailed template parameters
Container
Container node
TransProTpl
content:
Node Name (Keyword)
Parent Node
Description
Type
TimeInterval
Response.Template.TransProTpl
Same as Request.TimeInterval in the request body
Container
Container
Response.Template.TransProTpl
Same as Request.Container in the request body
Container
Video
Response.Template.TransProTpl
Request.Video in the request body
Container
Audio
Response.Template.TransProTpl
Same as Request.Audio in the request body
Container
TransConfig
Response.Template.TransProTpl
Same as Request.TransConfig in the request body
Container

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Examples

Request

POST /template HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signatrue=**************************************
Host: test-1234567890.ci.ap-beijing.myqcloud.com
Content-Length: 1666
Content-Type: application/xml

<Request>
<Tag>TranscodePro</Tag>
<Name>TemplateName</Name>
<Container>
<Format>mxf</Format>
</Container>
<Video>
<Codec>xavc</Codec>
<Profile>XAVC-HD_422_10bit</Profile>
<Width>1920</Width>
<Height>1080</Height>
<Interlaced>true</Interlaced>
<Fps>30000/1001</Fps>
<Bitrate>50000</Bitrate>
</Video>
<Audio>
<Codec>pcm_s24le</Codec>
</Audio>
<TransConfig>
<AdjDarMethod>scale</AdjDarMethod>
<IsCheckReso>false</IsCheckReso>
<ResoAdjMethod>1</ResoAdjMethod>
</TransConfig>
<TimeInterval>
<Start>0</Start>
<Duration>60</Duration>
</TimeInterval>
</Request>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 100
Connection: keep-alive
Date: Thu, 14 Jul 2022 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<Template>
<Tag>TranscodePro</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<BucketId>test-1234567890</BucketId>
<Category>Custom</Category>
<TransProTpl>
<Container>
<Format>mxf</Format>
</Container>
<Video>
<Codec>xavc</Codec>
<Profile>XAVC-HD_422_10bit</Profile>
<Width>1920</Width>
<Height>1080</Height>
<Interlaced>true</Interlaced>
<Fps>30000/1001</Fps>
<Bitrate>50000</Bitrate>
</Video>
<Audio>
<Codec>pcm_s24le</Codec>
</Audio>
<TransConfig>
<AdjDarMethod>scale</AdjDarMethod>
<IsCheckReso>false</IsCheckReso>
<ResoAdjMethod>1</ResoAdjMethod>
</TransConfig>
<TimeInterval>
<Start>0</Start>
<Duration>60</Duration>
</TimeInterval>
</TransProTpl>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback