write_srt | R Documentation |
Write subtitle data frame as SubRip text file
write_srt(x, path = NULL, wrap = TRUE, width = 40)
x |
A subtitle data frame from |
path |
File or connection to write to. |
wrap |
If |
width |
If |
The SubRip text files format subtitles with four components separated by a blank line:
A numeric counter identifying each sequential subtitle
The time that the subtitle should appear on the screen, followed by -->
and the time it should disappear
Subtitle text itself on one or more lines
A blank line containing no text, indicating the end of this subtitle
The path to the written file, invisibly.
# read and write without line breaks
x <- read_srt(srt_example(), collapse = " ")
write_srt(x, tempfile(fileext = ".srt"), wrap = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.