splitVideo: Compress and split a video into jpeg files

Description Usage Arguments Details Value Note

View source: R/splitVideo.R

Description

splitVideo uses FFmpeg via a system call to compress a video file and split it into separate jpeg files in a new directory.

Usage

1
splitVideo(filepath, fps, xpix = 320, ypix = -1)

Arguments

filepath

a charcter string specifying the location of the video file

fps

an integer: the number of frames per second of video to keep; if fps is the as the frame rate of the video, all frames will be saved

xpix

an integer: the width of saved jpegs in pixels; the default is 320

ypix

an integer: the height of saved jpegs in pixels; the default is -1, which will preserve the aspect ratio

Details

The tracking functions within the pathtrackr package do not require high resolution imagery. It is is recommened that videos are compressed using the xpix and ypix variables to improve processing time. If FFmpeg is not available, video frames can be extracted using other video editing software.

Value

Returns a new directory (in the same directory as the video file) containing each video frame as a jpeg file.

Note

splitVideo requires FFmpeg to be installed on your machine. FFmpeg is a cross-platform, open-source video editing tool. It can be downloaded from https://ffmpeg.org.


gunpowder78/pathtrackr documentation built on Nov. 18, 2017, 1:56 p.m.