A simple python module to convert vtt files to srt files with colours!
Some streaming platforms use vtt subtitles with colours. (ie. Auvio)
-
upstream doesn't convert vtt to srt subtitles when there are colours.
see issue #2 -
other tools like
ffmpeg
don't work either
ffmpeg -i captions.vtt captions.srt
see ticket subtitles: vtt conversion to srt creates an empty output -
the library used is
webvtt-py
it can't convert vtt files with colours to srt files
see pull request #39
pip3 install .
usage: vtt_to_srt [-h] [-s] [file [file ...]]
vtt_to_srt is a command line tool to convert vtt subtitles to srt files
positional arguments:
file a file. The command accepts zero, one or more files as arguments. For each .vtt, a .srt will be
generated in the same folder. Any other extension is ignored.
optional arguments:
-h, --help show this help message and exit
-s strip all tags in output srt
The command accepts zero, one or more files as arguments.
For each .vtt, a .srt will be generated in the same folder.
Any other extension is ignored.
If you specify no file, it will convert all .vtt files in the directory.
vtt_to_srt
is used in a docker image for youtube-dl with vtt to srt conversion
https://github.com/darodi/docker-youtube-dl-vtt-to-srt