mikolajkosmal / python-video-thumbnail

Python package for capturing frames from video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Video Thumbnail

https://app.travis-ci.com/mikolajkosmal/python-video-thumbnail.svg?token=UHo6vxmHpzShZwMdRr5d&branch=main

Python package for capturing frames from video. Written as replacement of https://github.com/radek-senfeld/ffvideo package, and to help with transition of Python 2.7 projects that relay on FFVideo, to Python 3.

Features

  • Supports file paths and urls
  • Supports image resizing

Usage

from python_video_thumbnail import VideoFrames

vf = VideoFrames(
        source="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
        frame_numbers=[6000],
        img_options={"width": 128},
        format=".png"
)

captured_frames = vf.capture()

with open("captured_frame.png", "wb") as f:
        f.write(captured_frames[0].getvalue())

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Python package for capturing frames from video.

License:MIT License


Languages

Language:Python 75.6%Language:Makefile 24.4%