ov_images_to_video: Encode a set of images into a video

View source: R/ffmpeg_utils.R

ov_images_to_videoR Documentation

Encode a set of images into a video

Description

Requires that ffmpeg is available on your system path. Input files can either be specified as a list of image files, or alternatively as a directory name and image file mask. For the latter, the images must be numbered in sequential order.

Usage

ov_images_to_video(
  input_dir,
  image_file_mask = "image_%06d.jpg",
  image_files,
  outfile,
  fps = 30,
  extra = NULL,
  debug = FALSE
)

Arguments

input_dir

string: path to the input directory

image_file_mask

string: the mask that specifies the image files, e.g. "image_%06d.jpg" for images named "image_000001.jpg", "image_000002.jpg" etc

image_files

character: vector of input image files, in order that they should appear in the video. Used if input_dir is missing

outfile

string: the output file. If missing, a temporary file (with extension .mp4) will be used

fps

numeric: frames per second

extra

: additional parameters passed to ffmpeg, in the form c("param", "value", "param2", "value2"). For example, c("-vb", "4096k") could be used to control the output video bitrate

debug

logical: if TRUE, echo the ffmpeg output to the console

Value

The path to the video file

See Also

av::av_encode_video() as an alternative


openvolley/ovideo documentation built on March 19, 2024, 9:52 p.m.