subtitle-delay
A program written in Python that directly edits SRT file to delay the subtitles.
Features:
- Will throw an error if delaying with negative number pushes the initial time-stamp out of bounds.
- Can delay subtitles in multiple SRT files at once.
Installation:
git clone https://github.com/CodePleaseRun/subtitle-delay.git
cd subtitle-delay
Usage:
python main.py srt_file_name delay_time
srt_file_namemust end with.srtextension- Additionally,
.and*can be used instead ofsrt_file_nameto delay the first (lexicographic) and all the SRT file(s) in the current working directory respectively.
- Additionally,
delay_timecan be an integer or float with upto 3 digit precision, further precision will be dropped.
Examples:
- Delaying subtitles in
subtitle.srtby3seconds.
python main.py subtitle.srt 3
- Delaying subtitles in the first
.srtfile in the directory ordered lexicographically by-2seconds.
python main.py . -2
- Delaying the subtitles in all
.srtfiles in current directory by1.754seconds.
python main.py * 1.754