| ffm_vstack | R Documentation |
Add a complex video filter that stacks several videos vertically (one above the other). It can also resize the videos to the same width.
ffm_vstack(object, shortest = FALSE, resize = FALSE)
object |
An FFmpeg pipeline ( |
shortest |
A logical that says whether to trim the duration of all
videos to that of the shortest video. The default is |
resize |
A logical that says whether to resize the input videos to the same width. Resizing takes longer, and for now it works only with two inputs. It fits both inputs to the same aspect ratio, so it assumes the inputs share one. |
This is the vertical form of ffm_hstack. Both are pipeline
functions for several inputs. They force the -filter_complex path and
manage their own stream labels internally. The glossary in
vignette("tidymedia") explains media terms such as stream.
object with an added instruction to stack the videos
vertically.
ffm_hstack() for horizontal stacking, and compare_videos(), the
task function built on both.
Other pipeline functions:
ffm_batch(),
ffm_codec(),
ffm_compile(),
ffm_concat(),
ffm_copy(),
ffm_crop(),
ffm_drawbox(),
ffm_drop(),
ffm_files(),
ffm_fps(),
ffm_hstack(),
ffm_jobs(),
ffm_loudnorm(),
ffm_map(),
ffm_output_options(),
ffm_overlay(),
ffm_pixel_format(),
ffm_run(),
ffm_scale(),
ffm_seek(),
ffm_trim(),
print.tidymedia_ffm()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
# Stack two inputs one above the other (pass more than one input to ffm_files())
ffm_files(c(video, video), "output.mp4") |>
ffm_vstack() |>
ffm_compile()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.