Skip to content

python script to convert all SIMPLE vtt files in a directory and all of its subdirectories to srt subtitle format

License

Notifications You must be signed in to change notification settings

uahim/vtt-to-srt.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vtt_to_srt.py

Convert vtt files to srt subtitle format

Note

For Python 3.7 you can get version for Python 2.7 here

Installation

pip install vtt_to_srt3
python -m pip install vtt_to_srt3

Usage from terminal

python -m vtt_to_srt pathname [-r]

pathname - a file or directory with files to be converted 

-r       - walk path recursively                          

Usage as a lib

Convert vtt file

from vtt_to_srt.vtt_to_srt import vtt_to_srt
path = '/path/to/file.vtt'
vtt_to_srt(path)

Recursively convert all vtt files in directory

from vtt_to_srt.vtt_to_srt import vtt_to_srt
path = '/path/to/directory'
vtt_to_srt(path, rec = True)

About

python script to convert all SIMPLE vtt files in a directory and all of its subdirectories to srt subtitle format

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%