ffm_drop: Drop Streams from an FFmpeg Pipeline

View source: R/ffm.R

ffm_dropR Documentation

Drop Streams from an FFmpeg Pipeline

Description

Remove one or more streams from the media file. For example, remove the video, audio, subtitles or data stream from a media file. The glossary in vignette("tidymedia") explains media terms such as stream.

Usage

ffm_drop(object, streams = c("video", "audio", "subtitles", "data"))

Arguments

object

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

streams

A character vector with one or more of these strings: "video", "audio", "subtitles" and "data".

Value

object with an added instruction to drop these streams from the output file when the pipeline runs.

See Also

extract_audio(), the task function that uses ffm_drop() to drop the video stream.

Other pipeline functions: ffm_batch(), ffm_codec(), ffm_compile(), ffm_concat(), ffm_copy(), ffm_crop(), ffm_drawbox(), 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")
# Drop the audio stream (keep video only)
ffm_files(video, "output.mp4") |>
  ffm_drop(streams = "audio") |>
  ffm_compile()

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