| vstack | R Documentation |
Stack two videos vertically (top over bottom) using FFmpeg's vstack filter. Useful for YouTube Shorts layout (e.g. SadTalker top + slideshow bottom).
vstack(top, bottom, output, height_top = NULL, height_bottom = NULL,
width = 1080, overwrite = TRUE, dry_run = FALSE)
top |
Path to top video. |
bottom |
Path to bottom video. |
output |
Path for output video file. |
height_top |
Height in pixels for top video (default: auto from width). |
height_bottom |
Height in pixels for bottom video (default: auto from width). |
width |
Output width in pixels (default 1080). |
overwrite |
If TRUE (default), overwrite output file. |
dry_run |
If TRUE, return the FFmpeg command without executing. |
Both inputs are scaled to the target width. Heights can be specified individually; by default each gets half the frame.
Invisibly returns the output path. If dry_run, returns command string.
## Not run:
vstack("talking_head.mp4", "slideshow.mp4", "shorts.mp4")
vstack("top.mp4", "bottom.mp4", "out.mp4", height_top = 960, height_bottom = 960)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.