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.

Source Distribution

videosplit-0.3.tar.gz (3.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page