Skip to main content

Video to Image frames converter

Project description

VIDEO TO IMAGE

A Python pip package for converting videos to sequential image frames


AVAILABLE ON PIP

https://pypi.org/project/videotooimage/

pip install videotooimage



PURPOSE

  • 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.


FEATURES

  • 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 manually, It will be created automatically.
  • Very useful for machine learning training purposes, the original folder structure is kept as is it.


PROCESSING

1 sec = 1 frame = 1 image file (.jpg format)


INSTALLATION

You can install videotooimage via pip:

pip install videotooimage



USAGE

Python3

import videotooimage
result = videotooimage.video_too_image("path/to/video/directory","path/to/output/directory")
print(result)



OUTPUT

Processing done, Check the folders : /output/folder


WORKING

  • 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
            ... 



AUTHOR

Name: Raghava
GitHub: https://github.com/raghavtwenty/
Email: raghavtwenty@gmail.com
Date Created: March 18, 2024 | Last Updated: May 14, 2024


LICENSE

This package is licensed under the MIT License.


CONTRIBUTIONS

Contributions and feedback are welcome!
Please submit issues or pull requests on GitHub.

GitHub: https://github.com/raghavtwenty/videotooimage/

END OF README

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

videotooimage-2024.5.14.1.0.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

videotooimage-2024.5.14.1.0.0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

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