| still_clip | R Documentation |
Turns one image into a video of duration seconds, optionally
animated by a deterministic Ken Burns pan/zoom described by motion.
Both the static and the animated case go through ffmpeg's zoompan,
so the outputs are byte-compatible for concat and
crossfade_concat regardless of motion.
still_clip(image, output, duration, fps = 30, size = NULL, motion = NULL,
overwrite = TRUE, dry_run = FALSE)
image |
Path to the input image (png, jpg, ...). |
output |
Path for the output video file. |
duration |
Clip length in seconds. |
fps |
Output frame rate (default 30). |
size |
Output dimensions as |
motion |
NULL (default) for a static clip, or a Ken Burns spec: a list
with any of |
overwrite |
If TRUE (default), overwrite the output file. |
dry_run |
If TRUE, return the FFmpeg command without executing. |
zoompan stretches its crop to size without preserving the
source aspect ratio, so size should match the source's aspect (or a
deliberate crop of it). Renderers letterbox afterwards; see
pad.
Invisibly returns the output path. If dry_run, returns the command string.
## Not run:
still_clip("slide01.png", "slide01.mp4", duration = 4.2)
still_clip("slide01.png", "slide01.mp4", duration = 4.2,
motion = list(zoom_from = 1, zoom_to = 1.15,
from = c(0.5, 0.5), to = c(0.5, 0.4)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.