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.
Arguments
- object
An FFmpeg pipeline (
ffm) object created byffm_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.
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()
#> [1] "-y -i \"/home/runner/work/_temp/Library/tidymedia/extdata/sample.mp4\" -frames:v 1 \"frame.png\""