srt.shift: Re-synchronize Srt File

Description Usage Arguments See Also Examples

View source: R/main.R

Description

Shift a srt file with specific time.

Usage

1
srt.shift(srt, time_shifted)

Arguments

srt

vector. The srt file read by srt.read.

time_shifted

numeric. The time that srt file want to be shifted (in seconds).

See Also

srt.read

Examples

1
2
3
4
5
6
7
8
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)

ChiHangChen/SRTtools documentation built on July 20, 2019, 3:50 p.m.