A simple Python script to break videos into frames. This package does NOT require ffmpeg.
VideoToFrames requires Python 3.4+
pip install videotoframes
VideoToFrames can be run from any command prompt or imported into a Python project.
Assuming there is a video at ./videos/example.mp4
and you want to create
frames in ./frames
:
videotoframes -i ./vidoes/example.mp4 -o ./frames
If you want to create a limited number of frames that are evenly distributed:
videotoframes -i ./videos/example.mp4 -o ./frames --max-frames=20 --even
You can also use VideoToFrames with many videos at once:
videotoframes -i ./videos -o ./frames
Using VideoToFrames in a Python project:
from videotoframes import convert
video_base_64 = '...'
frames = convert(video_base_64=video_base_64, max_frames=10, frame_rate=1)
https://github.com/brandonschabell/videotoframes
https://pypi.org/project/videotoframes/
Please feel free to email me at [email protected] with any questions or feedback.