Learn R Programming

videoplayR (version 0.3.1)

readVid: Load video file in memory

Description

This function reads a video file and return a vpVideo object that can be manipulated using the videoplayR image and video manipulation toolbox. This function should support most video formats and codecs listed at http://www.fourcc.org/codecs.php.

Usage

readVid(filename)

Arguments

filename
A character string of the path to the video file.

Value

This function returns a vpVideo object.

Details

The vpVideo object created by the readVid function is not a persistent object, but a pointer to a C++ object that cannot be saved for reuse in a different session.

See Also

readImg, readStream, getFrame, vpVideo

Examples

Run this code
filename <- system.file("sample_vid/SampleVideo_1080x720_5mb.mp4", package = "videoplayR")
vid <- readVid(filename)
frame <- getFrame(vid, 1)
imshow(frame)

Run the code above in your browser using DataLab