srt.style: Change Style of Subtitle

Description Usage Arguments See Also Examples

Description

Change subtitle style or posistion by specific subtitle index.

Usage

1
2
srt.style(srt, line = "all", pos = "None", style = "None",
  col = "None")

Arguments

srt

vector. The srt file read by srt.read.

line

numerical vector. Style will only change the subtitles of the selected subtitle index, default is 'all', means the whole subtitles will apply the style.

pos

character. The subtitles position, the valid options are 'bottom-left', 'bottom-center', 'bottom-right', 'middle-left', 'middle-center', 'middle-right', 'top-left', 'top-center', 'top-right' and 'center'.

style

character vector. The styles that subtitle applied, 'u' for bottom line, 'i' for italic, 'b' for bold, 's' for strikethrough.

col

character. The color that subtitle applied.

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.style(srt, line = c(1,3,5), pos = 'top-left', style = c('b','i'), col = 'red')

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