Subtitle Delay is a simple tool designed to add a time delay to subtitle files. It supports commonly used subtitle formats such as .srt
and .sub
, allowing users to easily adjust the timing of subtitles for synchronization with audio or video content.
You can create the subtitle_delay
executable using one of the following methods:
- Using CMake to generate the Makefile:
cmake . make
- Using the provided, Makefile:
make
- Assuming the compiler is gcc, open a terminal window in the current directory and type:
gcc -g main.c sub_delay.c sub_delay.h -o subtitle_delay.exe
Executable files for x86_64 Linux and Windows are available in their respective directories.
- Place the executable in the directory with your subtitle files.
- Run the executable. If multiple subtitle files are present in the execution directory, the program will prompt you to select the file for modification; otherwise, it will automatically modify the sole subtitle file in the current directory.
- Enter a time delay in milliseconds (1 millisecond = 0.001 seconds).
- Positive delays move subtitles forward; negative ones move them backward.
- The maximum delay is ± 5 minutes (±300000 ms).
- The selected file will be modified, while the original version will remain available with the prefix "old_" added to its name.
- Implement an alternative usage with command-line arguments (argc and argv).