Description Usage Arguments Details Value Examples
View source: R/read_subtitles.R
Reads subtitles from a file.
1 2 | read_subtitles(file, format = "auto", clean.tags = TRUE,
metadata = data.frame(), frame.rate = NA, encoding = "auto")
|
file |
the name of the file which the subtitles are to be read from. If it does not contain an absolute path, the file name is relative to the current working directory. |
format |
a character string specifying the format of the subtitles.
Four formats can be read: |
clean.tags |
logical. If |
metadata |
a one-row dataframe or tibble, or any object that can be coerced
into a one-row tibble by |
frame.rate |
a numeric value giving the frame rate in frames per second. Only relevant for MicroDVD format.
If |
encoding |
the name of the encoding to be used. Default is " |
The support of WebVTT is basic and experimental.
An object of class subtitles
(see subtitles
).
1 2 3 4 | # read a SubRip file
f <- system.file("extdata", "ex_subrip.srt", package = "subtools")
f <- system.file("extdata", "ex_webvtt.vtt", package = "subtools")
read_subtitles(f)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.