av_video_images | R Documentation |
Splits a video file in a set of image files. Default image format is
jpeg which has good speed and compression. Use format = "png"
for
losless images.
av_video_images(
video,
destdir = tempfile(),
format = "jpg",
fps = NULL,
trim = NULL
)
video |
an input video |
destdir |
directory where to save the png files |
format |
image format such as |
fps |
sample rate of images. Use |
trim |
string value for ffmpeg trim filter
for example |
For large input videos you can set fps to sample only a limited number
of images per second. This also works with fractions, for example fps = 0.2
will output one image for every 5 sec of video.
## Not run:
curl::curl_download('https://jeroen.github.io/images/blackbear.mp4', 'blackbear.mp4')
av_video_images('blackbear.mp4', fps = 1, trim = "10:20")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.