-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
I suggest adding a verbose argument with interactive() or TRUE as default value to av_video_images and transmit it to ave_encod_video inside the function.
av_video_images <- function (video, destdir = tempfile(), format = "jpg", fps = NULL,
trim = NULL, verbose=interactive() )
{
stopifnot(length(video) == 1)
filter_fps <- if (length(fps))
paste0("fps=fps=", fps)
filter_trim <- if (length(trim))
paste0("trim=", trim)
vfilter <- paste(c(filter_trim, filter_fps), collapse = ", ")
if (vfilter == "")
vfilter <- "null"
framerate <- av_media_info(video)$video$framerate
dir.create(destdir)
codec <- switch(format, jpeg = "mjpeg", jpg = "mjpeg", format)
output <- file.path(destdir, paste0("image_%6d.", format))
av_encode_video(input = video, output = output, framerate = framerate,
codec = codec, vfilter = vfilter, verbose=verbose)
list.files(destdir, pattern = paste0("image_\\d{6}.", format),
full.names = TRUE)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels