All Products
Search
Document Center

Intelligent Media Services:Subtitle template parameters

Last Updated:Nov 28, 2024

This topic describes a sample Intelligent Media Services (IMS) subtitle template and the template parameters.

Parameter

Data type

Required

Description

Example

Format

STRING

Yes

The format of the subtitle file. Valid values: ASS, SRT, VTT, TTML, and STL.

VTT

CharEnc

STRING

No

The encoding format of the file. Valid values: auto, UTF-8, GBK, and BIG5.

UTF-8

File

JSON

No

The subtitle file. For more information, see File.

{"Type":"OSS","Media":"oss://examplebucket/path/to/subtitle****.vtt"}

File

Parameter

Data type

Required

Description

Example

Type

STRING

Yes

The type of the media object. Valid values:

  • OSS: Object Storage Service (OSS) objects.

  • Media: media assets.

OSS

Media

STRING

Yes

The information about the media object. Valid values:

  • If the Type parameter is set to OSS, the value of this parameter is a URL. OSS and HTTP protocols are supported.

  • If the Type parameter is set to Media, the value of this parameter is the ID of a media asset.

oss://examplebucket/path/to/subtitle****.vtt

Sample template

{
  "CharEnc": "auto",
  "Format": "srt"
}