Python script for converting WebVTT (.vtt) files to SubRip Text (.srt) files. The script can be run on a directory and its subdirectories, converting all VTT files found within.
To use this script, you will need to have the following libraries installed:
- webvtt
You can install these libraries using pip:
pip install webvttTo use the script, simply run the following command:
python convert_vtt_to_srt.pyThis will convert all .vtt files in the current directory and its subdirectories to .srt files.
To create a batch file to run the Python script, follow these steps:
- Open a text editor (such as Notepad) and type the following commands:
@echo off
python convert_vtt_to_srt.py
-
Save the file with the
.batextension (e.g.,convert.bat). -
To run the script, double-click the batch file. This will open a command prompt window, execute the Python script.