srt.shift {SRTtools} | R Documentation |
Shift a srt file with specific time.
srt.shift(srt, time_shifted)
srt |
vector. The srt file read by |
time_shifted |
numeric. The time that srt file want to be shifted (in seconds). |
srt_path <- system.file("extdata", "movie.srt", package="SRTtools")
srt <- srt.read(srt_path, encoding = 'utf-8')
# Postpone subtitles 3 seconds later
srt <- srt.shift(srt, time_shifted = 3)
# Expedite subtitles 5 seconds earlier
srt <- srt.shift(srt, time_shifted = -5)