Filename : README
Title : Videos to images
Author : Raghav | Github : @raghavtwenty
Date Created : March 18, 2024 | Last Updated : March 19, 2024
Language : Python | Version : 3.10.13
https://pypi.org/project/videotooimage/
pip install videotooimage
videotooimage is a Python package that provides functionality to convert video files into sequences of images.
It utilizes the OpenCV library (cv2) to process video files and extract frames.
This package is useful for tasks such as video analysis, object detection, and machine learning model training using video data.
Convert video files (e.g., .mp4, .avi, .mov) into sequences of images.
Works with various video codecs and formats supported by OpenCV.
No need to create sub folders for directories, Created automatically.
Very useful for machine learning training purposes, the original folder structure is kept as is it.
1 sec = 1 frame = 1 image file (.jpg format)
You can install videotooimage via pip:
pip install videotooimage
Python3
from videotooimage.videotooimage import videoTooImage
result = videoTooImage("/path/to/videos/folder", "/path/to/output/folder")
print(result)
Processing done, Check the folders : /output/folder
Folder structure of videos directory (Input)
/project /videos /happy person1.mp4 person2.mp4 person3.mp4 /sad person1.mp4 person2.mp4 person3.mp4
After conversion
Folder structure of output directory
/output/folder/ /v2i_images /happy person1(frame_number_1).jpg person1(frame_number_2).jpg person2.mp4 person3.mp4 ... /sad person1(frame_number_1).jpg person1(frame_number_2).jpg person2.jpg person3.jpg ...
- Name: Raghav
- GitHub: @raghavtwenty
- Email: raghavtwenty@gmail.com
This package is licensed under the MIT License.
Contributions and feedback are welcome!
Please submit issues or pull requests on GitHub.