splitVideo: Compress and split a video into jpeg files

Description Usage Arguments Details Value Note

View source: R/splitVideo.R


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


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



a charcter string specifying the location of the video file


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


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


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


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.


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


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.