| standardize_video_batch | R Documentation |
Re-encode many files to a reproducible format, using one jobs table. This is
the batch form of standardize_video(), for when you have more than one
video to standardize. Each row is one input, and the only required column
names its source. The function is a thin wrapper over
ffm_batch. It builds one reproducible command for each input.
The glossary in vignette("tidymedia") explains media terms such as
codec, pixel format and frame rate.
standardize_video_batch(
jobs,
width = NULL,
height = NULL,
fps = NULL,
video_codec = "libx264",
audio_codec = "copy",
pixel_format = "yuv420p",
hardware = c("none", "nvenc", "videotoolbox"),
fallback = FALSE,
quality = NULL,
audio_stream = NULL,
run = TRUE,
parallel = FALSE,
...
)
jobs |
A data frame with one row per input. It needs at least an
|
width, height |
Optional target dimensions for every row, unless
|
fps |
Optional target frame rate applied to every row, unless
|
video_codec |
A string naming the video codec for every row, unless
|
audio_codec |
A string naming the audio codec for every row, unless
|
pixel_format |
A string naming the pixel format applied to every row,
unless |
hardware |
The encoder backend for every row. |
fallback |
A logical. When a |
quality |
A number, or |
audio_stream |
The audio track to carry into each output, as a number that counts from |
run |
A logical: run each input's command through FFmpeg ( |
parallel |
A logical passed to |
... |
Additional arguments forwarded to |
The tibble returned by ffm_batch: jobs with an added command column. When output was derived, it also has the resolved output column. When run = TRUE, it has a success column, plus any columns the forwarded arguments add, such as verified.
standardize_video() for the single-input form; ffm_batch() for
the batch runner and the arguments forwarded through ...;
segment_video_batch() and extract_frame_batch() for the other batch
task functions.
Other task functions:
anonymize_video(),
anonymize_video_batch(),
compare_videos(),
compare_videos_batch(),
concatenate_videos(),
concatenate_videos_batch(),
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(),
strip_metadata(),
strip_metadata_batch()
Other audio selection functions:
anonymize_video(),
anonymize_video_batch(),
audio_stream,
compare_videos(),
compare_videos_batch(),
convert_audio(),
convert_audio_batch(),
crop_video(),
crop_video_batch(),
extract_audio(),
extract_audio_batch(),
format_for_web(),
format_for_web_batch(),
normalize_audio(),
normalize_audio_batch(),
picture_in_picture(),
picture_in_picture_batch(),
segment_video(),
segment_video_batch(),
separate_audio_video(),
separate_audio_video_batch(),
standardize_video()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
jobs <- tibble::tibble(
input = c(video, video),
output = c("a.mp4", "b.mp4"),
width = c(640, 320)
)
# run = FALSE compiles one command per input without calling FFmpeg
standardize_video_batch(jobs, run = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.