ov_video_frames | R Documentation |
Requires that ffmpeg is available on your system path.
ov_video_frames(
video_file,
start_time,
duration,
end_time,
outdir,
fps,
format = "jpg",
jpg_quality = 1,
extra = NULL,
debug = FALSE,
exec_fun
)
video_file |
string: path to the video file |
start_time |
numeric: start time in seconds |
duration |
numeric: duration in seconds. If missing, will be calculated from start_time and end_time |
end_time |
numeric: end time in seconds. If missing, will be calculated from start_time and duration |
outdir |
string: path to the output directory, which must exist. If missing, a temporary directory will be used |
fps |
numeric: frames per second, default is to extract all frames |
format |
string: "jpg" or "png" |
jpg_quality |
numeric: jpg quality from 1-31, lower is better (this is passed to ffmpeg as the |
extra |
: additional parameters passed to ffmpeg, in the form c("param", "value", "param2", "value2") |
debug |
logical: if |
exec_fun |
string or function: the function (or function name as a string) to use to execute the ffmpeg command. Defaults to |
If exec_fun
has not been specified, the function will wait for the ffmpeg call to complete and then return a character vector of file names, one per frame. If exec_fun
has been specified, the result of that function call will be returned immediately (because it might be a call to a background process)
ov_video_frame()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.