Last chance! 50% off unlimited learning
Sale ends in
You need to have ffmpeg on your path for this to work. This function uses ffmpeg to split the video into individual frames, which are then loaded as images and recombined. Videos are memory-intensive, and load.video performs a safety check before loading a video that would be larger than maxSize in memory (default 1GB)
load.video(
fname,
maxSize = 1,
skip.to = 0,
frames = NULL,
fps = NULL,
extra.args = "",
verbose = FALSE
)
an image with the extracted frames along the "z" coordinates
file to load
max. allowed size in memory, in GB (default max 1GB).
skip to a certain point in time (in sec., or "hh:mm::ss" format)
number of frames to load (default NULL, all)
frames per second (default NULL, determined automatically)
extra arguments to be passed to ffmpeg (default "", none)
if TRUE, show ffmpeg output (default FALSE)
Simon Barthelme
save.video, make.video
cimg.limit.openmp()
fname <- system.file('extdata/tennis_sif.mpeg',package='imager')
##Not run
## load.video(fname) %>% play
## load.video(fname,fps=10) %>% play
## load.video(fname,skip=2) %>% play
Run the code above in your browser using DataLab