SRT to VTT Cpations Converter #
Stream supports the VTT caption/subtitle format, but it is easy to conver SRT files. This utility can help.
SRT Input #
| File | |
|---|---|
| Sample |
Manual Input
Converted VTT Output #
Add To Your Application #
There are a few ways to use this utility on other pages.
- POST plaintext SRT to
/api/convertSRTfor one-time use. - Grab the
srtToVtt()andconvertCue()functions in the Worker that powers this demo. They can be used in frontend or backend.
Current Limitations #
- No error reporting
- Cue coordinate markers are split out
- Bold, underline, and italic markers are retains, but
<font>tags are removed
Acknowledgements #
There were a few different scripts floating around that each handled this job differently. I combined several of them: