srt.insert: Insert new dialog

Description Usage Arguments See Also Examples

Description

Insert new dialog to subtitles by specific index

Usage

1
srt.insert(srt, index, time, text)

Arguments

srt

vector. The srt file read by srt.read.

index

integer. The index of new dialog.

time

character. The time of new dialog, a proper format is "hr:min:sec,msec –> hr:min:sec,msec"

text

character. The content of new dialog.

See Also

srt.read

Examples

1
2
3
srt_path <- system.file("extdata", "movie.srt", package="SRTtools")
srt <- srt.read(srt_path, encoding = 'utf-8')
srt.insert(srt, index = 1, time = "00:00:00,000 --> 00:00:30,000", text = "Added by SRTtools")

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