All Products
Search
Document Center

Object Storage Service:PostVodPlaylist

Last Updated:Apr 28, 2024

Generates a VOD playlist for the specified LiveChannel. Object Storage Service (OSS) queries the ts files that are generated by the streams ingested to the specified LiveChannel within the specified time period and converges the files into an m3u8 playlist.

Request syntax

POST /ChannelName/PlaylistName?vod&endTime=EndTime&startTime=StartTime HTTP/1.1
Date: GMT date
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: SignatureValue

Request parameters

Parameter

Type

Required

Example

Description

ChannelName

String

Yes

test-channel

The name of an existing LiveChannel.

PlaylistName

String

Yes

vod.m3u8

The name of the generated VOD playlist, which must end with ".m3u8".

StartTime

Integer

Yes

1472020031

Specifies the start time of the time range during which the ts files that you want to query are generated in the Unix timestamp format. Unit: seconds.

Important

The generated playlist contains the ts files only when the start time (the returned timestamps of the ts files by calling GetVodPlaylist) of the ts files is within the time range specified by StartTime and EndTime.

EndTime

Integer

Yes

1472020226

Specifies the end time of the time range during which the ts files that you want to query are generated in the Unix timestamp format. Unit: seconds.

Note

The value of EndTime must be greater than the value of StartTime. The duration between EndTime and StartTime must be less than one day.

For more information about the common request headers included in PostVodPlaylist requests such as Host and Date, see Common request headers.

Examples

Sample requests

POST /test-channel/vod.m3u8?vod&endTime=1543895706266&startTime=1543895706263 HTTP/1.1
Date: Thu, 25 Aug 2016 07:13:26 GMT
Host: examplebucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************

Sample responses

HTTP/1.1 200
content-length: 0
server: AliyunOSS
connection: close
etag: "9C6104DD9CF1A0C4D0CFD21F4390****"
x-oss-request-id: 57BE9A96B92475920B002359
date: Thu, 25 Aug 2016 07:13:26 GMT