Read SBV file
Value
A data frame with one row per caption, in file order, and the columns `text`, `start` and `stop`. A caption that spans several lines keeps its line breaks.
Examples
if (yt_authorized()) {
vids <- list_my_videos()
res <- list_captions(video_id = vids$video_id[[1]])
cap <- download_caption(res$caption_id[[1]], as_raw = FALSE)
tfile <- tempfile(fileext = ".sbv")
writeLines(cap, tfile)
x <- read_sbv(tfile)
if (requireNamespace("hms", quietly = TRUE)) {
x$start <- hms::as_hms(x$start)
x$stop <- hms::as_hms(x$stop)
}
}