Learn R Programming

Rvision (version 0.6.0)

videoWriter: Create an object of class VideoWriter

Description

Function for creating VideoWriter objects.

Usage

videoWriter(
  outputFile,
  fourcc,
  fps,
  height,
  width,
  isColor = TRUE,
  api = "ANY"
)

Arguments

outputFile

An character string corresponding to the path to an output file.

fourcc

A 4-character string corresponding to the fourcc code of the codec to be used. A list of fourcc codes can be obtained at http://www.fourcc.org/codecs.php.

fps

A numeric value corresponding to the framerate of the output video.

height

An integer value corresponding to the height of the video in pixels.

width

An integer value corresponding to the width of the video in pixels.

isColor

A logical indicating whether the output video is a color (default: TRUE) or grayscale (FALSE) video.

api

A character string corresponding to the API to use for reading the video from the file (see Note; default: "ANY").

Value

A VideoWriter object.

Examples

Run this code
# NOT RUN {
writer <- videoWriter("test.mp4", "H264", 25, 1080, 1920)
release(writer)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab