ffm_compile: Compile the tidymedia pipeline into an FFmpeg command

View source: R/ffm.R

ffm_compileR Documentation

Compile the tidymedia pipeline into an FFmpeg command

Description

Compile all the instructions into one string, the FFmpeg command that runs them.

Usage

ffm_compile(object)

Arguments

object

An FFmpeg pipeline (ffm) object created by ffm_files().

Value

A string with the FFmpeg command that carries out all the instructions in the tidymedia pipeline.

See Also

ffm_run() to compile and run in one step, and ffm_batch() to compile over many files.

Other pipeline functions: ffm_batch(), ffm_codec(), 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(), ffm_vstack(), print.tidymedia_ffm()

Examples

video <- system.file("extdata", "sample.mp4", package = "tidymedia")
# ffm_compile() returns the reproducible FFmpeg command as a string
ffm_files(video, "output.mp4") |>
  ffm_trim(start = 1, end = 5) |>
  ffm_crop(width = 160, height = 120) |>
  ffm_codec(video = "libx264") |>
  ffm_compile()

tidymedia documentation built on Oct. 11, 2026, 5:08 p.m.