Join clips end to end for many outputs from a single jobs tibble. This is the
batch (table-driven) form of concatenate_videos(), for when you have
more than one concatenation to produce. Unlike the single-input batch
functions, each row's inputs are many. So jobs carries an
inputs list-column (each cell a character vector of source paths)
plus an output column. This is a thin wrapper over
ffm_batch: one reproducible concat-demuxer command per row,
sharing the copy + map-0 pipeline with concatenate_videos().
Arguments
- jobs
A data frame with one row per output and (at least) an
inputslist-column and anoutputcolumn (destination path). Eachinputscell is a character vector of the source paths to join, in order. Anoutputcolumn is required; this function derives no destination. Two rows given the sameoutputpath are refused before any row runs. Any other columns are ignored.- run
A logical: run each command through FFmpeg (
TRUE, default) or only compile them for inspection (FALSE).- parallel
A logical: process the jobs in parallel with furrr (
TRUE) or one at a time (FALSE, default). Seeffm_batchfor the future plan requirement.- ...
Additional arguments forwarded to
ffm_batch(e.g.verify,manifest,progress).
Value
The jobs tibble with an added command column. When run = TRUE, it also has a success column, plus verified or a provenance manifest, each when requested through .... See ffm_batch.
See also
concatenate_videos(), the one-output function it wraps; ffm_batch(),
the batch runner; compare_videos_batch() and
picture_in_picture_batch(), the other batch functions that take several
inputs per row.
Other task functions:
anonymize_video(),
anonymize_video_batch(),
compare_videos(),
compare_videos_batch(),
concatenate_videos(),
convert_audio(),
convert_audio_batch(),
crop_video(),
crop_video_batch(),
extract_audio(),
extract_audio_batch(),
extract_frame(),
extract_frame_batch(),
format_for_web(),
format_for_web_batch(),
normalize_audio(),
normalize_audio_batch(),
picture_in_picture(),
picture_in_picture_batch(),
sample_frames(),
sample_frames_batch(),
segment_video(),
segment_video_batch(),
separate_audio_video(),
separate_audio_video_batch(),
standardize_video(),
standardize_video_batch(),
strip_metadata(),
strip_metadata_batch()
Examples
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
jobs <- tibble::tibble(inputs = list(c(video, video)), output = "joined.mp4")
concatenate_videos_batch(jobs, run = FALSE)
#> # A tibble: 1 × 3
#> inputs output command
#> <list> <chr> <chr>
#> 1 <chr [2]> joined.mp4 "-y -f concat -safe 0 -i \"/tmp/RtmpTo1HDT/ffm-concat1ee…