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
```
Note:
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 (https://www.webopedia.com/TERM/I/I_frame.html). 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-py3-none-any.whl (5.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size videosplit-0.4.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page