srt.shift {SRTtools} | R Documentation |
Re-synchronize Srt File
Description
Shift a srt file with specific time.
Usage
srt.shift(srt, time_shifted)
Arguments
srt |
vector. The srt file read by |
time_shifted |
numeric. The time that srt file want to be shifted (in seconds). |
See Also
Examples
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)
[Package SRTtools version 1.2.0 Index]