ffm_output_options: Add Raw Output Options to an FFmpeg Pipeline

View source: R/ffm.R

ffm_output_optionsR Documentation

Add Raw Output Options to an FFmpeg Pipeline

Description

Add one or more raw FFmpeg output options to the pipeline, after any added before. Output options are the flags after the input and before the output file. Use this function for an option that has no pipeline function of its own. ffm_compile() still decides where the options go and how the rest of the command is quoted. So this is not the same as writing the command string yourself.

Usage

ffm_output_options(object, ...)

Arguments

object

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

...

One or more strings. Each string is a group of options separated by white space, for example "-q:v 1" or "-frames:v 1". They are added in the order given. When the command runs, each word between white space becomes one FFmpeg argument. So an option value must not contain spaces.

Value

object with the added output options.

See Also

ffmpeg(), the direct command that takes any FFmpeg arguments, and ffm_compile(), which places these options.

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_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")
# Extract a single frame by adding a raw output option
ffm_files(video, "frame.png") |>
  ffm_output_options("-frames:v 1") |>
  ffm_compile()

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