ci:CreateMediaTemplate permission is required. For details, see Cloud Infinite actions.POST /template HTTP/1.1Host: <BucketName-APPID>.ci.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>Content-Type: application/xml<body>
<Request><Tag>Transcode</Tag><Name>TemplateName</Name><Container><Format>mp4</Format></Container><Video><Codec>H.264</Codec><Profile>high</Profile><Bitrate>1000</Bitrate><Width>1280</Width><Fps>30</Fps><Preset>medium</Preset></Video><Audio><Codec>aac</Codec><Samplerate>44100</Samplerate><Bitrate>128</Bitrate><Channels>4</Channels></Audio><TransConfig><AdjDarMethod>scale</AdjDarMethod><IsCheckReso>false</IsCheckReso><ResoAdjMethod>1</ResoAdjMethod></TransConfig><TimeInterval><Start>0</Start><Duration>60</Duration></TimeInterval><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix1.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix2.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray></Request>
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Request | None. | Container for saving requests | Container | Yes |
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Tag | Request | Template type: Transcode | 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 | No |
Audio | Request | audio content | Container | No |
TransConfig | Request | transcoding configuration | Container | No |
TimeInterval | Request | time interval | Container | No |
AudioMix | Request | Container | No | |
AudioMixArray | Request | Audio mix parameter, up to 2 can be transmitted simultaneously. | Container array | No |
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Format | Request.Container | Encapsulation format. For values, refer to the audio/video supported formats table below. | String | Yes |
ClipConfig | Request.Container | Sharding configuration, valid when format is hls or dash. | Container | No |
Node Name (Keyword) | Parent Node | Description | Type | Required or Not |
Duration | Request.Container.ClipConfig | Segment duration. The default value is 5 seconds. | String | No |
Container | Audio Codecs | Video Codecs |
mp4/hls/mkv | aac,mp3 | H.264,H.265,AV1 |
ts/flv/avi/mov | aac,mp3 | H.264 |
dash | aac | H.264 |
WebM | Vorbis,opus | VP8,VP9,AV1 |
aac | aac | Not supported |
mp3 | mp3 | Not supported |
flac | flac | Not supported |
amr | amr | Not supported |
adts | aac | Not supported |
m4a | aac | Not supported |
wav | pcm_s16le | Not supported |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Codec | Request.Video | encoding/decoding format H.264 H.265 VP8 VP9 AV1 | String | H.264 When Format is WebM, it is VP8. | No |
Profile | Request.Video | Encoding level support this parameter only for H.264 support baseline, main, high, auto When Pixfmt is auto, the parameter value will be set as auto. baseline: suitable for mobile devices, no limit on I-frames and P-frames, does not support interlaced scanning, no slice data partitioning, some encoding levels are limited under this profile. main: suitable for standard resolution devices high: suitable for high-resolution devices, supports 8*8 blocks auto: consistent with the source video, may be baseline, main, high, high10, high422, high444 | String | high | No |
Bitrate | Request.Video | Bitrate of the video output file Value range: [10, 50000], unit: Kbps Set to auto means adaptive bitrate | String | None. | No |
Width | Request.Video | Width Value range: [128, 4096] unit: px If only Width is set, calculate Height based on the original aspect ratio of the video. Must be even | String | Original width of the video | No |
Fps | Request.Video | Frame Rate Value range: (0, 60] Unit: fps | String | None. | No |
Preset | Request.Video | Preset video algorithm H.264 supports this parameter, with values veryfast, fast, medium, slow, slower VP8 supports this parameter, with values good, realtime. AV1 supports this parameter, with values universal, medium. H.265 and VP9 do not support this parameter | String | When Codec is H.264, it is medium When Codec is VP8, it is good | No |
Height | Request.Video | High Value range: [128, 4096] unit: px If only Height is set, calculate Width based on the original aspect ratio of the video. Must be even | String | Original height of the video | No |
Remove | Request.Video | Remove video stream, value true or false. | String | false | No |
Crf | Request.Video | bitrate - quality control factor Value range: (0, 51] If Crf is set, the setting of Bitrate becomes invalid. When Bitrate is empty, it defaults to 25. | String | None. | No |
Gop | Request.Video | Maximum frames between key frames, value range: [1, 100000] | String | None. | No |
Bufsize | Request.Video | buffer size Value range: [1000, 128000] Unit: Kb Codec is VP8/VP9 does not support this parameter | String | None. | No |
Maxrate | Request.Video | Video bitrate peak value Value range: [10, 50000] unit: Kbps Codec is VP8/VP9 does not support this parameter | String | None. | No |
Pixfmt | Request.Video | video color format H.264 supports: yuv420p, yuv422p, yuv444p, yuvj420p, yuvj422p, yuvj444p, auto H.265 supports: yuv420p, yuv420p10le, auto Codec is VP8/VP9/AV1 does not support this parameter | String | None. | No |
LongShortMode | Request.Video | Long Short Mode true or false. Codec is VP8/VP9/AV1 does not support this parameter. | String | false | No |
Rotate | Request.Video | Rotation angle Value range: [0, 360) unit: degree | String | None. | No |
Roi | Request.Video | Roi intensity value is none, low, medium, high Codec is VP8/VP9 does not support this parameter | String | none | No |
Crop | Request.Video | Free cropping Custom crop: width:height:left:top. Example: 1280:800:0:140 The value of width and height must be greater than 0, and the value of left and top must be greater than or equal to 0 Codec is H.265/AV1 does not support this parameter. Support for this parameter is disabled when adaptive encoding is enabled. Support for this parameter is disabled when roi is enabled. | String | None. | No |
Interlaced | Request.Video | Enable interlaced scanning false/true Codec is H.265/AV1 does not support this parameter. Support for this parameter is disabled when adaptive bitrate is enabled. Support for this parameter is disabled when roi is enabled. | String | false | No |
ColorParam | Request.Video | Color parameters Codec is H.265/AV1 does not support this parameter. Support for this parameter is disabled when adaptive bitrate is enabled. Support for this parameter is disabled when roi is enabled. | container | None. | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Codec | Request.Audio | encoding/decoding format, parameter values: aac, mp3, flac, amr, Vorbis, opus, pcm_s16le | String | aac When format is WebM, it is Vorbis. When format is wav, it is pcm_s16le. | No |
Samplerate | Request.Audio | sampling rate unit: Hz Option 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000 Different encapsulations. MP3 supports different sampling rates, as shown in the table below. When Codec is set to amr, only 8000 is supported. When Codec is set to opus, it supports 8000, 16000, 24000, 48000. | String | 44100 When Codec is opus, the default value is 48000. | No |
Bitrate | Request.Audio | Raw audio bitrate unit: Kbps Value range: [8, 1000] | String | None. | No |
Channels | Request.Audio | Number of sound channels When Codec is set to aac/flac, 1, 2, 4, 5, 6, and 8 are supported. When Codec is set to mp3/opus, 1 and 2 are supported. When Codec is set to Vorbis, only 2 is supported. When Codec is set to amr, only 1 is supported. When Codec is set to pcm_s16le, only 1 and 2 are supported. When the encapsulation format is dash, 8 is not supported. | String | None. | No |
Remove | Request.Audio | Remove source audio stream, value true or false. | String | false | No |
SampleFormat | Request.Audio | sampling bit width When Codec is set to aac, it supports fltp When Codec is set to mp3, fltp, s16p, and s32p are supported. When Codec is set to flac, s16, s32, s16p, and s32p are supported. When Codec is set to amr, s16 and s16p are supported. When Codec is set to opus, s16 is supported. When Codec is set to pcm_s16le, it supports s16 When Codec is set to Vorbis, supports fltp When Video.Codec is H.265, this parameter is invalid. | String | None. | No |
KeepAllTracks | Request.Audio | reserve all audio channels | String | No | false |
Audio.Codec | aac | amr | flac | opus | Vorbis | pcm_s16le | mp3 |
8000 | Y | Y | Y | Y | Y | Y | Encapsulation differs, support varies |
| 11025 | Y | N | Y | N | Y | Y |
| 12000 | Y | N | Y | N | Y | Y |
| 16000 | Y | N | Y | Y | Y | Y |
| 22050 | Y | N | Y | N | Y | Y |
| 24000 | Y | N | Y | Y | Y | Y |
| 32000 | Y | N | Y | N | Y | Y |
| 44100 | Y | N | Y | N | Y | Y |
| 48000 | Y | N | Y | Y | Y | Y |
| 88200 | Y | N | Y | N | Y | Y |
| 96000 | Y | N | Y | N | Y | Y |
Muxing Format / Audio Sample Rate | 8000 | 11025 | 12000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000 | 88200 | 96000 |
flv | N | N | N | N | Y | N | N | Y | N | N | N |
mp4 | N | N | N | Y | Y | Y | Y | Y | Y | N | N |
hls/ts/mp3/mkv/avi/mov | Y | Y | Y | Y | Y | Y | Y | Y | Y | N | N |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
AdjDarMethod | Request.TransConfig | Resolution adjustment method value is 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, value true or false. When it is false, transcode according to the configuration parameters. | String | false | No |
ResoAdjMethod | Request.TransConfig | Resolution adjustment method This parameter takes effect when IsCheckReso is true; value 0 or 1. 0 indicates using the original video resolution; 1 indicates a transcoding failure. | String | 0 | No |
IsCheckVideoBitrate | Request.TransConfig | Check video bitrate, value true or false. When it is false, transcode according to the configuration parameters. | String | false | No |
VideoBitrateAdjMethod | Request.TransConfig | Video bitrate adjustment method This parameter takes effect when IsCheckVideoBitrate is true; value 0 or 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, value true or false. When it is false, transcode according to the configuration parameters. | String | false | No |
AudioBitrateAdjMethod | Request.TransConfig | Audio bitrate adjustment method This parameter takes effect when IsCheckAudioBitrate is true; value 0 or 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, value true or false. When it is false, transcode according to the configuration parameters. | String | false | No |
VideoFpsAdjMethod | Request.TransConfig | Video frame rate adjustment method This parameter takes effect when IsCheckVideoFps is true; value 0 or 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 | Remove MetaData information from the file, value true or false. | String | false | No |
IsHdr2Sdr | Request.TransConfig | Enable HDR to SDR conversion, value true or false. | String | false | No |
TranscodeIndex | Request.TransConfig | Specify the stream number for processing, corresponding to Response.MediaInfo.Stream.Video.Index and Response.MediaInfo.Stream.Audio.Index in the media information. For details, refer to Retrieve Media Information Synchronization Request. | String | None. | No |
HlsEncrypt | Request.TransConfig | hls encryption configuration | Container | None. | No |
DashEncrypt | Request.TransConfig | dash encryption configuration | Container | None. | No |

Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
IsHlsEncrypt | Request.TransConfig.HlsEncrypt | Enable HLS encryption, value true or false. Supports encryption when Container.Format is hls | String | false | No |
UriKey | Request.TransConfig.HlsEncrypt | HLS encryption key When IsHlsEncrypt is true, this parameter is meaningful. | String | None. | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
IsEncrypt | Request.TransConfig.DashEncrypt | Enable DASH encryption, value true or false. Supports encryption when Container.Format is dash. | String | false | No |
UriKey | Request.TransConfig.DashEncrypt | Encryption key for DASH When IsEncrypt is true, this parameter is meaningful. | String | None. | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
Start | Request.TimeInterval | Start Time video duration Unit: second Support float format, execution accuracy accurate to milliseconds | String | 0 | No |
Duration | Request.TimeInterval | Duration video duration Unit: seconds Support float format, execution accuracy accurate to milliseconds | String | original video duration | No |
Node Name (Keyword) | Parent Node | Description | Type | Default Value | Required or Not |
ColorRange | Request.Video.ColorParam | Color range Example: tv Available values: tv, mpeg, pc, jpeg | String | None. | No |
ColorSpace | Request.Video.ColorParam | Colorspace bt709, available values: rgb,bt709,fcc,bt470bg,smpte170m,smpte240m,ycgco,bt2020nc,bt2020c,smpte2085,chroma-derived-nc,chroma-derived-c,ictcp,ycocg,bt2020_ncl,bt2020_cl | String | None. | No |
ColorTrc | Request.Video.ColorParam | Color trace Example: bt709, available values: bt709, gamma22, gamma28, smpte170m, smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67, log, log_sqrt, iec61966_2_4, bt1361, iec61966_2_1, bt2020_10bit, bt2020_12bit, smpte428_1 | String | None. | No |
ColorPrimaries | Request.Video.ColorParam | Color primary Example: bt709, available values: bt709, bt470m, bt470bg, smpte170m, smpte240m, film, bt2020, smpte428, smpte428_1, smpte431, smpte432, jedec-p22, ebu3213 | String | None. | No |
<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><Template><Tag>Transcode</Tag><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Name>TemplateName</Name><BucketId>test-1234567890</BucketId><Category>Custom</Category><Container><Format>mp4</Format></Container><Video><Codec>H.264</Codec><Profile>high</Profile><Bitrate>1000</Bitrate><Width>1280</Width><Fps>30</Fps><Preset>medium</Preset></Video><Audio><Codec>aac</Codec><Samplerate>44100</Samplerate><Bitrate>128</Bitrate><Channels>4</Channels></Audio><TransConfig><AdjDarMethod>scale</AdjDarMethod><IsCheckReso>false</IsCheckReso><ResoAdjMethod>1</ResoAdjMethod></TransConfig><TimeInterval><Start>0</Start><Duration>60</Duration></TimeInterval><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix1.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix2.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
Node Name (Keyword) | Parent Node | Description | Type |
Response | None. | Container for saving results | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Template | Response | Container for saving template details | Container |
RequestId | Response | unique request ID | String |
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 Properties, Custom or Official | String |
Tag | Response.Template | Template type: Transcode | String |
UpdateTime | Response.Template | Update time | String |
CreateTime | Response.Template | Creation time | String |
TransTpl | Response.Template | Detailed template parameters | Container |
Node Name (Keyword) | Parent Node | Description | Type |
TimeInterval | Response.Template.TransTpl | Request.TimeInterval in the request body | Container |
Container | Response.Template.TransTpl | Same as Request.Container in the request body | Container |
Video | Response.Template.TransTpl | Request.Video in the request body | Container |
Audio | Response.Template.TransTpl | Same as Request.Audio in the request body | Container |
TransConfig | Response.Template.TransTpl | Same as Request.TransConfig in the request body | Container |
AudioMix | Response.Template.TransTpl | Same as Request.AudioMix in the request body | Container |
AudioMixArray | Response.Template.TransTpl | Same as Request.AudioMixArray in the request body | Container array |
POST /template HTTP/1.1Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************Host: test-1234567890.ci.ap-beijing.myqcloud.comContent-Length: 1666Content-Type: application/xml<Request><Tag>Transcode</Tag><Name>TemplateName</Name><Container><Format>mp4</Format></Container><Video><Codec>H.264</Codec><Profile>high</Profile><Bitrate>1000</Bitrate><Width>1280</Width><Fps>30</Fps><Preset>medium</Preset></Video><Audio><Codec>aac</Codec><Samplerate>44100</Samplerate><Bitrate>128</Bitrate><Channels>4</Channels></Audio><TransConfig><AdjDarMethod>scale</AdjDarMethod><IsCheckReso>false</IsCheckReso><ResoAdjMethod>1</ResoAdjMethod></TransConfig><TimeInterval><Start>0</Start><Duration>60</Duration></TimeInterval><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix1.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix2.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray></Request>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 100Connection: keep-aliveDate: Thu, 14 Jul 2022 12:37:29 GMTServer: tencent-cix-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****<Response><RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId><Template><Tag>Transcode</Tag><TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId><Name>TemplateName</Name><BucketId>test-1234567890</BucketId><Category>Custom</Category><Container><Format>mp4</Format></Container><Video><Codec>H.264</Codec><Profile>high</Profile><Bitrate>1000</Bitrate><Width>1280</Width><Fps>30</Fps><Preset>medium</Preset></Video><Audio><Codec>aac</Codec><Samplerate>44100</Samplerate><Bitrate>128</Bitrate><Channels>4</Channels></Audio><TransConfig><AdjDarMethod>scale</AdjDarMethod><IsCheckReso>false</IsCheckReso><ResoAdjMethod>1</ResoAdjMethod></TransConfig><TimeInterval><Start>0</Start><Duration>60</Duration></TimeInterval><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix1.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><AudioMixArray><AudioSource>https://test-xxx.cos.ap-chongqing.myqcloud.com/mix2.mp3</AudioSource><MixMode>Once</MixMode><Replace>true</Replace><EffectConfig><EnableStartFadein>true</EnableStartFadein><StartFadeinTime>3</StartFadeinTime><EnableEndFadeout>false</EnableEndFadeout><EndFadeoutTime>0</EndFadeoutTime><EnableBgmFade>true</EnableBgmFade><BgmFadeTime>1.7</BgmFadeTime></EffectConfig></AudioMixArray><CreateTime>2020-08-05T11:35:24+0800</CreateTime><UpdateTime>2020-08-31T16:15:20+0800</UpdateTime></Template></Response>
Feedback