Methods to predict the timing offsets for and apply subtitles to video files when the offset timings are not known.
Source efficient_subtitles.sh
to your bash or zsh shell and use sub_infer_and_create
to infer a subtitle offset and create a video with subtitles at the appropriate offset.
Provide the following positional parameters:
> sub_infer_and_create "video.mp4" "subtitles.ass" [overwrite_audio_samples=t] \
[start_minutes=6] [intro_skip_seconds=0] [n_samples_per_sec=10]
If an offset video file or subtitle file needs to be generated, the method will handle this. If none are needed, the method will simply call ffmpeg to combine the original video and audio files.
Only supports ass-type subtitle files at this time.