Skip to main content

Utility to extract frames out of a video

Project description

Videosplit is a utility to extract frames from a given video.
It can extract:
- n number of frames (equally spaced throughout the video)
- relevant* frames
- frames separated by t seconds

Example usage:

from videosplit import VideoSplit
videosplit = VideoSplit()
frames = videosplit.get_relevant('input.mp4') # frames = [input01.jpg, input02.jpg, ...]
frames = videsplit.get_n_frames('input.mp4', 10) # frames = [input01.jpg,..., input10.jpg]
frames = videosplit.get_interval('input.mp4', 10) # one frame every 10 seconds
The filenames of the jpg files are based on the name of the video file. Therefore, if you call more than one call on the same file, the jpg files may be overwritten. To solve this, specify an output name:

frames = videosplit.get_relevant("input.mp4", "tmp") # frames = [tmp01.jpg,...]
*Currently, relevant frames are ex``tracted by finding the I-frames of the video ( Frames could be extracted based on "scene-changes" but testing showed that it did not return relevant results (one frame out of a 9 minute video for example).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for videosplit, version 0.4.1
Filename, size File type Python version Upload date Hashes
Filename, size videosplit-0.4.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View
Filename, size videosplit-0.4.1-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page