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