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 |
Media | STRING | Yes | The information about the media object. Valid values:
| oss://examplebucket/path/to/subtitle****.vtt |
Sample template
{
"CharEnc": "auto",
"Format": "srt"
}FAQ
Can the subtitle background color rotate together with the text?
No. The subtitle background does not support rotation. As a workaround, you can use an animated image (GIF), place it on a video track, set rotation parameters for it, and position it at the same location as the subtitle to simulate a rotating background effect.
What can I do if the subtitles generated by ASR-based intelligent subtitling are missing punctuation marks?
This issue occurs because semantic sentence detection is not enabled when you call the SubmitASRJob operation. To fix this issue, set EnableSemanticSentenceDetection to true in the EditingConfig field. This enables semantic sentence detection, which automatically adds punctuation marks.
Can I use partial subtitle styles together with AdaptMode: AutoScale?
No. In Intelligent Cloud Editor (ICE), using partial subtitle style parameters together with AdaptMode: AutoScale (auto scaling mode) is not supported and causes the font to display abnormally small. If you need to use a partial font or color style, remove the AdaptMode: AutoScale parameter.
How do I troubleshoot a video that fails to play after subtitles are mounted?
This issue is usually caused by abnormal video stream information or missing metadata, such as a missing moov box or a duration mismatch. Use ffprobe to check whether the video stream information and metadata are normal. If needed, adjust the synthesis parameters or fix the source file.