View source: R/videoToFrames.r
videoToFrames | R Documentation |
This function is a wrapper that simplifies extracting frames from a video. It processes the video file and saves the frames as PNG images in the specified directory. By default, it extracts 15 frames per second.
videoToFrames(videoPath, outputDir, fps=15)
videoPath |
Path to the video file. |
outputDir |
Path to the directory where the extracted images will be saved. |
fps |
The number of frames shown per second in the video. By default, it extracts 15 frames per second. |
A list of file paths to the generated images.
# Not run:
videoPath <- system.file('extdata/video.mp4', package='BioTrajectory')
outputDir <- system.file('extdata/frames/', package='BioTrajectory')
images <- videoToFrames(videoPath, outputDir, fps=15)
print(images) # Displays the paths to the generated images
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.