tencent cloud

对象存储

动态与公告
产品动态
产品公告
产品简介
产品概述
功能概览
应用场景
产品优势
基本概念
地域和访问域名
规格与限制
产品计费
计费概述
计费方式
计费项
免费额度
计费示例
查看和下载账单
欠费说明
常见问题
快速入门
控制台快速入门
COSBrowser 快速入门
用户指南
创建请求
存储桶
对象
数据管理
批量处理
全球加速
监控与告警
运维中心
数据处理
内容审核
智能工具箱
数据工作流
应用集成
工具指南
工具概览
环境安装与配置
COSBrowser 工具
COSCLI 工具
COSCMD 工具
COS Migration 工具
FTP Server 工具
Hadoop 工具
COSDistCp 工具
HDFS TO COS 工具
GooseFS-Lite 工具
在线辅助工具
自助诊断工具
实践教程
概览
访问控制与权限管理
性能优化
使用 AWS S3 SDK 访问 COS
数据容灾备份
域名管理实践
图片处理实践
COS 音视频播放器实践
工作流实践
数据直传
内容审核实践
数据安全
数据校验
大数据实践
COS 成本优化解决方案
在第三方应用中使用 COS
迁移指南
本地数据迁移至 COS
第三方云存储数据迁移至 COS
以 URL 作为源地址的数据迁移至 COS
COS 之间数据迁移
Hadoop 文件系统与 COS 之间的数据迁移
数据湖存储
云原生数据湖
元数据加速
数据加速器 GooseFS
数据处理
数据处理概述
图片处理
媒体处理
内容审核
文件处理
文档处理
故障处理
获取 RequestId 操作指引
通过外网上传文件至 COS 缓慢
访问 COS 时返回403错误码
资源访问异常
POST Object 常见异常
API 文档
简介
公共请求头部
公共响应头部
错误码
请求签名
操作列表
Service 接口
Bucket 接口
Object 接口
批量处理接口
数据处理接口
任务与工作流
内容审核接口
云查毒接口
SDK 文档
SDK 概览
准备工作
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
小程序 SDK
错误码
鸿蒙(Harmony) SDK
终端 SDK 质量优化
安全与合规
数据容灾
数据安全
访问管理
常见问题
热门问题
一般性问题
计费计量问题
域名合规问题
存储桶配置问题
域名和 CDN 问题
文件操作问题
日志监控问题
权限管理问题
数据处理问题
数据安全问题
预签名 URL 问题
SDK 类问题
工具类问题
API 类问题
服务协议
Service Level Agreement
隐私政策
数据处理和安全协议
联系我们
词汇表

Generating a Playback List

PDF
聚焦模式
字号
最后更新时间: 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>


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈