srt.write {SRTtools} | R Documentation |
Write the srt file to the system.
srt.write(srt, filename)
srt |
vector. The srt file read by |
filename |
Either a character string naming a file or a connection open for writing. |
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)
# Save and cover original "movie.srt" file
srt.write(srt, filename = file.path(tempdir(), "movie.srt"))