| anonymize_video_batch | R Documentation |
Cover fixed rectangular regions of many input videos with opaque filled boxes
from a single jobs tibble. This is the batch (table-driven) form of
anonymize_video(), for when you have more than one video to
redact. Each row is one input with its own regions. The required columns name
the source (input) and the boxes to cover (regions). This is a
thin wrapper over ffm_batch. It compiles one reproducible
command per input. It shares the same box-fill pipeline (and per-region
validation) as anonymize_video(). The glossary in
vignette("tidymedia") explains media terms such as codec, pixel format
and stream copy.
anonymize_video_batch(
jobs,
color = "black",
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 and (at least) an
|
color |
A string naming the default fill color (FFmpeg color syntax)
applied to every row. A |
video_codec |
A string naming the output video codec applied to every
row, unless |
audio_codec |
A string naming the output audio codec applied to every
row, unless |
pixel_format |
A string naming the output pixel format applied to every
row, unless |
hardware |
The encoder backend applied to every row. |
fallback |
A logical applied to every row. 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.
anonymize_video() for the single-input form.
has_hardware_encoder() for the hardware argument. ffm_batch()
for the batch runner and the arguments forwarded through ....
standardize_video_batch() and segment_video_batch() for the other
table-driven functions.
Other task functions:
anonymize_video(),
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(),
standardize_video_batch(),
strip_metadata(),
strip_metadata_batch()
Other audio selection functions:
anonymize_video(),
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(),
standardize_video_batch()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
jobs <- tibble::tibble(
input = c(video, video),
output = c("a.mp4", "b.mp4"),
regions = list(
data.frame(x = 10, y = 10, width = 120, height = 90),
data.frame(x = 200, y = 150, width = 80, height = 60)
)
)
# run = FALSE compiles one command per input without calling FFmpeg
anonymize_video_batch(jobs, run = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.