We provide the capability to add captions to your uploaded video so you don't have to embed captions
How to upload captions?
The captions are uploaded per language. Meaning, you can upload different captions for each language. The values that you will have to include with your POST request to the captions endpoint are:
|videoId||String||The unique identifier for the video you want to add a caption to.|
|language||String||A valid BCP 47 language representation.|
|file||File||The video text track in VTT format only.|
Supported caption file formats
Currently, we support only VTT file format.
WebVTT file formatting
Incorrect VTT file formatting
We will not throw an error when the VTT file is incorrectly formatted. The response from the API will be
200, however, the captions will not be displayed.
The VTT file has an extension
.vtt and the format is as in the example below:
WEBVTT 00:01.000 --> 00:04.000 - Never drink liquid nitrogen. 00:05.000 --> 00:09.000 - It will perforate your stomach. - You could die.
For more information on VTT formatting: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API
You can check the formatting of the VTT with a free online tool here: https://w3c.github.io/webvtt.js/parser.html