Description Usage Arguments Details Value See Also Examples
Requires that ffmpeg be available on the system path. Note that the processing of each clip is done inside of a future_lapply call, and so you can have this part of the processing done in parallel by setting an appropriate futures plan before calling this function.
1 | dv_create_video(playlist, filename, subtitle_column = NULL)
|
playlist |
data.frame: a playlist as returned by |
filename |
string: file to write to. If not specified (or |
subtitle_column |
string: if not |
This function is experimental. In particular it is unlikely to work well with all video formats, and especially if the playlist comprises clips from different videos with different resolution/encoding/etc.
A list with the filenames of the created video and subtitle files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
my_playlist <- dv_video_playlist(..., type = "local")
video_file <- dv_create_video(my_playlist)
browseURL(video_file[[1]])
## run in parallel, with the scouted codes as subtitles
library(dplyr)
library(future.apply)
plan(multisession)
## note that the example file doesn't have a video associated with it, so
## this example won't actually work in practice
x <- read_dv(dv_example_file())
## fudge the video entry
x$meta$video <- tibble(camera = "Camera0", file = "~/my_video.mp4")
## make the playlist
my_playlist <- dv_video_playlist(
x$plays %>% dplyr::filter(skill == "Reception") %>% slice(1:10),
meta = x$meta, extra_cols = "code")
## create the video and subtitles files
video_file <- dv_create_video(my_playlist, subtitle_column = "code")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.