tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Submitting Tasks

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-11-19 16:15:01

Feature Description

Submit an idle-time transcoding task.

Authorization Description

When using with a sub-account, the ci:CreateMediaJobs permission is required. For details, see Cloud Infinite actions.
When a sub-account uses an asynchronous processing interface, the cam:passrole permission is required. The asynchronous processing interface performs COS resource read and write operations through CAM's "role". The PassRole permission is used for role passing. For details, refer to Access Management - Write Operations - PassRole API.

Service Activation

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.

Fee Description

This API is a paid service. Incurred fees will be collected by Cloud Infinite. For detailed billing instructions, see Media processing.


Request

Request sample:

POST /jobs 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>Transcode</Tag>
<Input>
<Object>input/demo.mp4</Object>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON<CallBackFormat>
</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 of the Container type Request is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Tag
Request
Create task Tag: Transcode
String
Yes
Input
Request
File information to be operated
Container
Yes
Operation
Request
Operation rule
Container
Yes
CallBackFormat
Request
Job callback format, JSON or XML, default XML, priority is higher than the callback format of the queue
String
No
CallBackType
Request
Job callback type, Url or TDMQ, default Url, priority is higher than the callback type of the queue
String
No
CallBack
Request
Job callback address, priority is higher than the queue's callback address. When set to no, it indicates that the queue's callback address does not generate callbacks.
String
No
CallBackMqConfig
Request
Task callback TDMQ configuration, required when CallBackType is TDMQ. For details, see CallBackMqConfig.
Container
No
The specific data description of the Container type Input is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Object
Request.Input
File path
String
Yes
The specific data description of the Container type Operation is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
TemplateId
Request.Operation
transcoding template ID
String
No
Transcode
Request.Operation
transcoding template parameter
Container
No
RemoveWatermark
Request.Operation
Remove watermark parameter H265, AV1 encoding do not support this parameter
Container
No
Output
Request.Operation
Output configuration for results
Container
Yes
UserData
Request.Operation
Pass through user information Printable ASCII code Length not exceeding 1024
String
No
JobLevel
Request.Operation
Task priority Level limit: 0, 1, 2. Higher level means higher task priority. Default is 0.
String
No
FreeTranscode
Request.Operation
off-peak transcoding flag, true/false
String
No
Description
For transcoding parameters, preferentially use TemplateId; if no TemplateId is available, use Transcode. For watermark parameters, you can use WatermarkTemplateId or Watermark, with WatermarkTemplateId having higher priority.
The specific data description of the Container type Transcode is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Limit
Container
Request.Operation.Transcode
container format
Container
Yes
None.
Video
Request.Operation.Transcode
video information
Container
No
Not passing Video is equivalent to deleting video information.
TimeInterval
Request.Operation.Transcode
Time interval
Container
No
None.
Audio
Request.Operation.Transcode
audio content
Container
No
Not passing Audio is equivalent to deleting audio information.
TransConfig
Request.Operation.Transcode
transcoding configuration
Container
No
None.
Description
Neither Video nor Audio can be omitted simultaneously.
The specific data description of the Container type Container is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Format
Request.Operation.Transcode.Container
Encapsulation format: The values are as follows in the table below
String
Yes
Set container Supported audio/video formats are as shown in the table below:
Container
Audio Codecs
Video Codecs
mp4
aac,mp3
H.264,H.265,AV1
hls
aac,mp3
H.264,H.265
flv
aac,mp3
H.264
mp3
mp3
Not supported
flac
flac
Not supported
m4a
aac
Not supported
The specific data description of the Container type Video is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Limit
Codec
Request.Operation.Transcode.Video
Encoding/Decoding Format
String
No
H.264
H.264
H.265
AV1
Fps
Request.Operation.Transcode.Video
Frame Rate
String
No
None.
Value range: (0, 60]
Unit: fps
Bitrate
Request.Operation.Transcode.Video
Bitrate of the video output file
String
No
None.
Value range: [128, 35000]
Unit: Kbps
Width
Request.Operation.Transcode.Video
Wide
String
No
Original width of the video
Value range: [128, 4096]
Unit: px
If only Width is set, calculate Height based on the video's original aspect ratio.
Must be even
Height
Request.Operation.Transcode.Video
High
String
No
Original height of the video
Value range: [128, 4096]
Unit: px
If only Height is set, calculate Width based on the video's original aspect ratio.
Must be even
Gop
Request.Operation.Transcode.Video
Maximum frames between key frames
String
No
None.
Value range: [1, 100000]
Crf
Request.Operation.Transcode.Video
bitrate - quality control factor
String
No
None.
Value range: (0, 51]
If Crf is set, the setting of Bitrate becomes invalid.
When Bitrate is empty, it defaults to 25.
Remove
Request.Operation.Transcode.Video
Whether to remove the video stream
String
No
false
true, false, cannot be true at the same time as Audio.Remove
The specific data description of the Container type Audio is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Limit
Codec
Request.Operation.Transcode.Audio
Encoding/Decoding Format
String
No
aac
aac,mp3,flac
Bitrate
Request.Operation.Transcode.Audio
Original audio bitrate
String
No
None.
Unit: Kbps
Value range: [26, 256]
Samplerate
Request.Operation.Transcode.Audio
sampling rate
String
No
44100
44100
Channels
Request.Operation.Transcode.Audio
number of sound channels
String
No
2
1,2
Remove
Request.Operation.Transcode.Audio
Whether to delete the source audio stream
String
No
false
true, false, cannot be true at the same time as Video.Remove
The specific data description of the Container type TimeInterval is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Limit
Start
Request.Operation.Transcode.TimeInterval
Start Time
String
No
0
video duration
Unit: seconds
Support float format, with execution accuracy accurate to milliseconds
Duration
Request.Operation.Transcode.TimeInterval
Duration
String
No
original video duration
video duration
in seconds
Support float format, execution accuracy accurate to milliseconds
The specific data description of the Container type TransConfig is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Limit
AdjDarMethod
Request.Operation.Transcode.TransConfig
Resolution adjustment method
String
No
None.
scale (stretch) pad (black border fill)
When the aspect ratio of the output video differs from that of the original video, adjust the resolution according to this parameter
The specific data description of the Container type RemoveWatermark is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Dx
Request.Operation.RemoveWatermark
Offset from the top-left corner origin point in the x-direction, range [1, 4096]
string
Yes
Dy
Request.Operation.RemoveWatermark
y offset from the top-left origin point, range [1, 4096]
string
Yes
Width
Request.Operation.RemoveWatermark
Width, range [1, 4096]
string
Yes
Height
Request.Operation.RemoveWatermark
Height, range [1, 4096]
string
Yes
The specific data description of the Container type Output is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Region
Request.Operation.Output
Region of the bucket
String
Yes
Bucket
Request.Operation.Output
Bucket for storing results
String
Yes
Object
Request.Operation.Output
Output result filename
String
Yes
Wildcard characters supported by Request.Operation.Output.Object are as follows:
Wildcard
Meaning
${ext}
encapsulation format
${jobid}
task Id

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>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>j8d121820f5e411ec926ef19d53ba9c6f</JobId>
<State>Submitted</State>
<Progress>0</Progress>
<CreationTime>2022-06-27T15:23:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>Transcode</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<TemplateName>trans_993874</TemplateName>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</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
JobsDetail
Response
Task details
Container
Content of the Container node JobsDetail:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which is meaningful only when State is Failed.
String
Message
Response.JobsDetail
Error description, which is meaningful only when State is Failed.
String
JobId
Response.JobsDetail
ID of the newly created task
String
Tag
Response.JobsDetail
Tag of the newly created task: Transcode
String
State
Response.JobsDetail
Task status, one of Submitted, Running, Success, Failed, Pause, Cancel.
String
Progress
Response.JobsDetail
Task progress percentage, meaningful only when State is Submitted, Running, Success, or Pause, range [0, 100].
String
CreationTime
Response.JobsDetail
Task creation time
String
StartTime
Response.JobsDetail
Task start time
String
EndTime
Response.JobsDetail
Task end time
String
QueueId
Response.JobsDetail
Task's queue ID
String
Input
Response.JobsDetail
Input resource address of the task
Container
Operation
Response.JobsDetail
Operation rule
Container
Contents of the Container node Input:
Node Name (Keyword)
Parent Node
Description
Type
Region
Response.JobsDetail.Input
Region of the bucket
String
Bucket
Response.JobsDetail.Input
Bucket for storing results
String
Object
Response.JobsDetail.Input
Filename of the output result
String
Contents of the Container node Operation:
Node Name (Keyword)
Parent Node
Description
Type
TemplateId
Response.JobsDetail.Operation
Job template ID
String
TemplateName
Response.JobsDetail.Operation
Task template name, return when TemplateId exists
String
Transcode
Response.JobsDetail.Operation
in-progress Request's Operation.Transcode
Container
Watermark
Response.JobsDetail.Operation
Request.Operation.Watermark
Container array
RemoveWatermark
Response.JobsDetail.Operation
Remove watermark from in-progress Request
Container
WatermarkTemplateId
Response.JobsDetail.Operation
watermark template ID
String array
Output
Response.JobsDetail.Operation
In-progress Request's Operation.Output
Container
MediaInfo
Response.JobsDetail.Operation
Output file's media information, do not return if the task is incomplete
Container
MediaResult
Response.JobsDetail.Operation
Basic information of the output file, do not return if the task is incomplete
Container
DigitalWatermark
Response.JobsDetail.Operation
Request.Operation.DigitalWatermark
Container
UserData
Response.JobsDetail.Operation
Pass through user information
String
JobLevel
Response.JobsDetail.Operation
Task priority
String
Content of Container node MediaInfo:
Same as the Response.MediaInfo node in the GenerateMediaInfo API.
Content of Container node MediaResult:
For details, see MediaResult.

Error Codes

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

Examples

Request 1: Use Transcoding Template ID

POST /jobs 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-signature=**************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com
Content-Length: 166
Content-Type: application/xml

<Request>
<Tag>Transcode</Tag>
<Input>
<Object>input/demo.mp4</Object>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON<CallBackFormat>
</Request>

Responding 1

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 230
Connection: keep-alive
Date: Mon, 28 Jun 2022 15:23:12 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>j8d121820f5e411ec926ef19d53ba9c6f</JobId>
<State>Submitted</State>
<Progress>0</Progress>
<CreationTime>2022-06-27T15:23:11+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>Transcode</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<TemplateName>trans_993874</TemplateName>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe22</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe23</WatermarkTemplateId>
<WatermarkTemplateId>t1318c5f428d474afba1797f84091cbe24</WatermarkTemplateId>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>

Request 2: Use Transcoding Processing Parameters

POST /jobs 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-signature=**************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com
Content-Length: 166
Content-Type: application/xml

<Request>
<Tag>Transcode</Tag>
<Input>
<Object>input/demo.mp4</Object>
</Input>
<Operation>
<Transcode>
<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>
</Transcode>
<Watermark>
<Type>Text</Type>
<LocMode>Absolute</LocMode>
<Dx>128</Dx>
<Dy>128</Dy>
<Pos>TopRight</Pos>
<StartTime>0</StartTime>
<EndTime>100.5</EndTime>
<Text>
<Text>Watermark content</Text>
<FontSize>30</FontSize>
<FontType>simfang.ttf</FontType>
<FontColor>0xRRGGBB</FontColor>
<Transparency>30</Transparency>
</Text>
</Watermark>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
<CallBack>http://callback.demo.com</CallBack>
<CallBackFormat>JSON<CallBackFormat>
</Request>

Response 2

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 230
Connection: keep-alive
Date: Mon, 28 Jun 2022 15:23:12 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<JobsDetail>
<Code>Success</Code>
<Message/>
<JobId>j8d121820f5e411ec926ef19d53ba9c6f</JobId>
<State>Submitted</State>
<Progress>0</Progress>
<CreationTime>2022-06-27T15:23:10+0800</CreationTime>
<StartTime>-</StartTime>
<EndTime>-</EndTime>
<QueueId>p2242ab62c7c94486915508540933a2c6</QueueId>
<Tag>Transcode</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<Transcode>
<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>
</Transcode>
<Watermark>
<Type>Text</Type>
<LocMode>Absolute</LocMode>
<Dx>128</Dx>
<Dy>128</Dy>
<Pos>TopRight</Pos>
<StartTime>0</StartTime>
<EndTime>100.5</EndTime>
<Text>
<Text>Watermark content</Text>
<FontSize>30</FontSize>
<FontType></FontType>
<FontColor>0xRRGGBB</FontColor>
<Transparency>30</Transparency>
</Text>
</Watermark>
<RemoveWatermark>
<Dx>150</Dx>
<Dy>150</Dy>
<Width>75</Width>
<Height>75</Height>
</RemoveWatermark>
<DigitalWatermark>
<Type>Text</Type>
<Message>123456789ab</Message>
<Version>V1</Version>
<IgnoreError>false</IgnoreError>
<State>Running</State>
</DigitalWatermark>
<Output>
<Region>ap-chongqing</Region>
<Bucket>test-123456789</Bucket>
<Object>output/out.${ext}</Object>
</Output>
<UserData>This is my data.</UserData>
<JobLevel>0</JobLevel>
</Operation>
</JobsDetail>
</Response>


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백