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.
Arguments
- object
An FFmpeg pipeline (
ffm) object created byffm_files().- format
A string that names the pixel format of the output file.
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()
#> [1] "-y -i \"/home/runner/work/_temp/Library/tidymedia/extdata/sample.mp4\" -pix_fmt yuv420p \"output.mp4\""