srt-validation aims to be a small and simple command-line utility that scans subtitles in SRT format and checks for various errors. This is accomplished by reading a file and checking for the following:
- Number of characters per line;
- Number of lines for each subtitle;
- Checking for overlapping subtitles;
- Checking for mismatched tags;
- Checking for missing empty lines after a subtitle.
How to install
There is no need to install srt-validation: just copy the executable somewhere, open a Command Prompt window, cd to the executable's path, and run it by typing srt-validation FILENAME You may want to add it to your system's PATH environment variable. In this case, open a PowerShell window with administrative privileges and use the command setx PATH "$env:path;PATH/TO/SRT-VALIDATION" -m then restart PowerShell and you're good to go.
srt-validation supports the following command-line arguments:
Prints an usage message and exits;
- -l number of lines per subtitle
Sets the maximum numbers of lines per subtitle. There are more lines per subtitle than this number, an error message is printed to the console.
- -c number of characters per line
Sets the maximum number of characters per line. If a line length exceeds this threshold, an error message is printed to the console.
- -t character per line tolerance
Specifies how much extra characters per line the application will tolerate.