srt.style {SRTtools}R Documentation

Change Style of Subtitle

Description

Change subtitle style or posistion by specific subtitle index.

Usage

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

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')


[Package SRTtools version 1.2.0 Index]