Skip to contents

Leave one or more kinds of stream out of the output file. For example, leave out the video, audio, subtitles or data streams. The input file does not change. 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.

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()
#> [1] "-y -i \"/home/runner/work/_temp/Library/tidymedia/extdata/sample.mp4\" -an \"output.mp4\""