| ffm_hstack | R Documentation |
Add a complex video filter that stacks several videos horizontally (side by side). It can also resize the videos to the same height.
ffm_hstack(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 height. 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. |
object with an added instruction to stack the videos
horizontally.
ffm_vstack() for vertical 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_jobs(),
ffm_loudnorm(),
ffm_map(),
ffm_output_options(),
ffm_overlay(),
ffm_pixel_format(),
ffm_run(),
ffm_scale(),
ffm_seek(),
ffm_trim(),
ffm_vstack(),
print.tidymedia_ffm()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
# Stack two inputs side-by-side (pass more than one input to ffm_files())
ffm_files(c(video, video), "output.mp4") |>
ffm_hstack() |>
ffm_compile()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.