tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Generating a Playback List

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-12 21:11:51

Feature Overview

Generate a playlist for real-time playback, which can analyze video files to produce m3u8 files. After generating the playlist, enable real-time playback and implement live transcoding based on playback progress. Compared with offline transcoding, this significantly reduces transcoding waiting time and greatly lowers transcoding and storage overhead.

Authorization Guide

When submitting a Live Transcoding task via a sub-account, you need to add ci:CreateMediaJobs in the action of the authorization policy. For all operation APIs supported by Cloud Infinite, please refer to action.
Also, you need to grant the cam:PassRole permission for role passing, making it easy for the asynchronous processing API to perform read and write operations on COS resources through CAM's "role".

Service Activation

Using this feature requires enabling Cloud Infinite in advance and binding a bucket.
Using this feature requires enabling Media Processing Service in advance through the Console or API.

Use Limits

When using this API, you need to enable allowlist. You can submit a ticket to contact us for enabling it.

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>
Note:
Authorization: Auth String. For details, see Request Signature documentation.
When used with a sub-account, required permissions must be granted. For details, see Authorization Granularity Detail documentation.

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>GeneratePlayList</Tag>
<Input>
<Object>input/demo.mp4</Object>
</Input>
<Operation>
<Transcode>
<Container>
<Format>hls</Format>
<ClipConfig>
<Duration>5</Duration>
</ClipConfig>
</Container>
<Video>
<Codec>H.264</Codec>
<Width>1080</Width>
<Height>1920</Height>
<Bitrate>192</Bitrate>
</Video>
</Transcode>
<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
Request
None
Container for saving requests
Container
Yes
The data description of container Request is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Tag
Request
Tag for creating task: GeneratePlayList
String
Yes
Input
Request
File information to be operated
Container
Yes
Operation
Request
Operation rule
Container
Yes
CallBack
Request
Task callback address, which has a higher priority than the callback address of the queue. When set to "no", the callback address will not trigger a callback.
String
No
CallBackFormat
Request
Task callback format, JSON or XML, default XML, which has a higher priority than the callback format of the queue
String
No
QueueType
Request
Queue type of the task, limited to SpeedTranscoding, indicates that accelerated transcoding is enabled
String
No
CallBackType
Request
Task callback type, URL or TDMQ, default URL, which has a higher priority than the callback type of the queue
String
No
CallBackMqConfig
Request
Task callback TDMQ configuration, required when CallBackType is TDMQ. For details, see CallBackMqConfig.
Container
No
The data description of container Input is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Object
Request.Input
File path
String
No
The data description of container Operation is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Transcode
Request.Operation
Transcoding parameter, to configure parameter information during the video transcoding
Container
Yes
Output
Request.Operation
Output configuration
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 indicate higher task priority, default is 0.
String
No
Note:
For transcoding parameters, prioritize using TemplateId; if TemplateId is unavailable, use Transcode. For watermark parameters, you can use WatermarkTemplateId or Watermark, with WatermarkTemplateId having higher priority.
The data description of container
Transcode
is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Container
Request.Operation.Transcode
Container format
Container
Yes
Video
Request.Operation.Transcode
Video information
Container
Yes
TransConfig
Request.Operation.Transcode
Transcoding configuration
Container
No
The data description of container Container is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Format
Request.Operation.Transcode.Container
Muxing format, parameter value range HLS, default HLS
String
No
ClipConfig
Request.Operation.Transcode.Container
Segmentation configuration
Container
No
The data description of container ClipConfig is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Duration
Request.Operation.Transcode.Container.ClipConfig
Segment duration, in seconds, default 5s, in the range of [3, 8]
String
No
The data description of container Video is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Codec
Request.Operation.Transcode.Video
Encoding format, default H.264, currently only support H.264
String
No
Width
Request.Operation.Transcode.Video
Video width, in px, range [256, 4096]. If only Width is set, Height will be calculated based on the original video aspect ratio, must be a multiple of 8, default is the original video width.
String
No
Height
Request.Operation.Transcode.Video
Video height, in px, range [256, 4096]. If only Height is set, Width will be calculated based on the original video aspect ratio, must be a multiple of 8, default is the original video height.
String
No
Bitrate
Request.Operation.Transcode.Video
Video output bitrate, in Kbps, range [128, 10000], "auto" means adaptive bitrate, default is original video bitrate
String
No
Fps
Request.Operation.Transcode.Video
Frame rate, in fps, range (0, 60], default 30
String
No
Gop
Request.Operation.Transcode.Video
Maximum frames between key frames, range [1, 100000], default 2
String
No
Maxrate
Request.Operation.Transcode.Video
Peak video bitrate, in Kbps, range [10, 50000]
String
No
Crf
Request.Operation.Transcode.Video
Bitrate - Quality control factor
Value range: (15, 38]
If Crf is set, the setting of Bitrate becomes invalid.
When Bitrate is empty, it defaults to 25.
String
No
The data description of container TransConfig is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
InitialClipNum
Request.Operation.Transcode.TransConfig
Initial transcoding segment count, default 0
String
No
CosTag
Request.Operation.Transcode.TransConfig
A collection of tags for the output m3u8 file object, with a maximum of 10 tags (for example, Key1 = Value1 & Key2 = Value2). The Key and Value is the tag collection must be URL-encoded first.
String
No
HlsEncrypt
Request.TransConfig
HLS encryption configuration
Container
No
The data description of container HlsEncrypt is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Limit
IsHlsEncrypt
Request.TransConfig.HlsEncrypt
Whether to enable HLS encryption, parameter value true/false, default false
String
No
Encryption is supported when Container.Format is HLS
The data description of container type
Output
is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
Region
Request.Operation.Output
Region of the storage bucket
String
Yes
Bucket
Request.Operation.Output
Bucket for storing results
String
Yes
Object
Request.Operation.Output
Filename of the output result
String
Yes
Wildcard characters supported by Request.Operation.Output.Object are as follows:
Wildcard
Meaning
${ext}
Encapsulation format
${jobid}
Task ID

Response

Response Header

This API only returns common response headers. 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>GenratePlayList</Tag>
<Input>
<BucketId>test-123456789</BucketId>
<Object>input/demo.mp4</Object>
<Region>ap-chongqing</Region>
</Input>
<Operation>
<Transcode>
<Container>
<Format>hls</Format>
<ClipConfig>
<Duration>5</Duration>
</ClipConfig>
</Container>
<Video>
<Codec>H.264</Codec>
<Width>1080</Width>
<Height>1920</Height>
<Bitrate>192</Bitrate>
</Video>
</Transocde
<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 content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None
Container for saving results
Container
The content of container node Response:
Node Name (Keyword)
Parent Node
Description
Type
JobsDetail
Response
Task detailed information
Container
The content of container node JobsDetail:
Node Name (Keyword)
Parent Node
Description
Type
Code
Response.JobsDetail
Error code, which takes effect when State is Failed
String
Message
Response.JobsDetail
Error description, which takes effect when State is Failed
String
JobId
Response.JobsDetail
ID of the newly created task
String
State
Response.JobsDetail
Task status, which can be one of the following: Submitted, Running, Success, Failed, Pause, or Cancel
String
Progress
Response.JobsDetail
Task progress percentage, takes effect only when State is Submitted, Running, Success, 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
Queue ID of the task
String
Tag
Response.JobsDetail
Tag for newly created task: Transcode
String
Input
Response.JobsDetail
Input resource address of the task
Container
Operation
Response.JobsDetail
Operation rule
Container
The content of container node Input:
Node Name (Keyword)
Parent Node
Description
Type
BucketId
Response.JobsDetail.Input
Bucket for storing results
String
Object
Response.JobsDetail.Input
Filename of the output result
String
Region
Response.JobsDetail.Input
Region of the storage bucket
String
The content of container node Operation:
Node Name (Keyword)
Parent Node
Description
Type
Transcode
Response.JobsDetail.Operation
Same as Request.Operation.Transcode in the Request body
Container
Output
Response.JobsDetail.Operation
Same as Request.Operation.Output in the Request body
Container
UserData
Response.JobsDetail.Operation
Pass through user information
String
JobLevel
Response.JobsDetail.Operation
Task priority
String
TemplateName
Response.JobsDetail.Operation
Task template name, return when TemplateId exists
String
MediaInfo
Response.JobsDetail.Operation
Media information of the output file, not returned when the task is not completed
Container
MediaResult
Response.JobsDetail.Operation
Basic information of the output file, not returned when the task is not completed
Container
The content of container node MediaInfo: Same as Response.MediaInfo node in the GenerateMediaInfo API.
The 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.

Actual Case: Using Transcoding to Process Parameters

Request

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>GeneratePlayList</Tag>
<Input>
<Object>input/demo.mp4</Object>
</Input>
<Operation>
<Transcode>
<Container>
<Format>hls</Format>
</Container>
<Video>
<Codec>H.264</Codec>
<Bitrate>1000</Bitrate>
<Width>1280</Width>
<Fps>30</Fps>
</Video>
</Transcode>
<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

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>hls</Format>
</Container>
<Video>
<Codec>H.264</Codec>
<Bitrate>1000</Bitrate>
<Width>1280</Width>
<Fps>30</Fps>
</Video>
</Transcode>
<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>


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan