ffm_pixel_format: Set the Pixel Format in an FFmpeg Pipeline

View source: R/ffm.R

ffm_pixel_formatR Documentation

Set the Pixel Format in an FFmpeg Pipeline

Description

Set the pixel format of the output with FFmpeg's -pix_fmt option. For example, use "yuv420p" for broad player compatibility. The glossary in vignette("tidymedia") explains media terms such as pixel format.

Usage

ffm_pixel_format(object, format)

Arguments

object

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

format

A string that names the pixel format of the output file.

Value

object with an added instruction to set the pixel format.

See Also

standardize_video() and format_for_web(), the task functions that use ffm_pixel_format() to set the pixel format.

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_run(), ffm_scale(), ffm_seek(), ffm_trim(), ffm_vstack(), print.tidymedia_ffm()

Examples

video <- system.file("extdata", "sample.mp4", package = "tidymedia")
ffm_files(video, "output.mp4") |>
  ffm_pixel_format("yuv420p") |>
  ffm_compile()

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