av (version 0.2)

encoding: Video Encoding

Description

Encodes a set of images into a video, using custom container format, codec, fps, and video filters.

Usage

av_encode_video(input, output = "video.mp4", framerate = 24,
  vfilter = "null", codec = NULL, audio = NULL, verbose = TRUE)

Arguments

input

a vector with images such as png files. All input files should have the same width and height.

output

name of the output file. File extension must correspond to a known container format such as mp4, mkv, mov, or flv.

framerate

video framerate in frames per seconds. This is the input fps, the output fps may be different if you specify a filter that modifies speed or interpolates frames.

vfilter

a string defining an ffmpeg filter graph. This is the same parameter as the -vf argument in the ffmpeg command line utility.

codec

name of the video codec as listed in av_encoders. The default is libx264 for most formats, which usually the best choice.

audio

optional file with sounds to add to the video

verbose

emit some output and a progress meter counting processed images. Must be TRUE or FALSE or an integer with a valid log_level.

Details

The container format is determined from the file extension of the output file, for example mp4, mkv, mov, or flv. Most systems also support gif output, but the compression~quality for gif is quite bad. The gifski package is better suited for generating animated gif files.

It is recommended to use let the encoder choose the codec. Most video formats default to the libx264 video codec which has excellent compression and works out of the box on all modern browsers and operating systems.

See Also

Other av: capturing, demo, formats, info, logging