Description Usage Arguments Value See Also Examples
Uses ffmpeg through the av
package to extract images from a video.
1 2 3 4 5 6 7 8 |
vid.path |
character; path of video file to be processed. |
out.dir |
character; directory path in which to store images. |
format |
character; image format such as "png" or "jpg"; must be available from |
vfilter |
character; a string defining an ffmpeg filter, the |
overwrite |
logical; should images in path described by 'out.dir' be overwritten if they exists. |
... |
other arguments to be passed to |
Extracts all the images of the video and saves them to an "images" directory with appended number sequence.
images.to.video
, av_encode_video
av_video_images
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #access video that loads with package
v <-system.file("extdata/vid", "sunfish_BCF.avi", package = "trackter")
#create directory in which to store images
dir.create(paste0(tempdir(),"/images"))
vid.to.images(vid.path=v,out.dir= paste0(tempdir(),"/images"))
#see the images in the "images" subdirectory
list.files( paste0(tempdir(),"/images"))
#clean up
unlink(paste0(tempdir(),"/images"),recursive=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.