Skip to content

sakthivelj/video2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

video2image

PyPI version Python 3.8+ License: MIT Build Status GitHub stars GitHub forks

Video2Image is a Python command-line tool that extracts frames from video files and saves them as individual images. It supports batch processing of multiple video files and provides a progress bar for tracking extraction status.

Features:

  • Extract frames from single video or batch process entire directories
  • Support for multiple video formats (MP4, MKV, AVI, MOV)
  • Output in JPG or PNG format
  • Progress bar with frame count display
  • Automatic output folder creation

Installation

pip install video2image

Usage

Extract frames from a single video

video2image -i /path/to/video.mp4 -o /path/to/output/folder

Extract frames from all videos in a directory

video2image -i /path/to/video/directory -o /path/to/output/folder

Command-line options

Option Description
-i, --input Path to input video file or directory (required)
-o, --output Path to output directory (default: same as input)
-p, --parent Include parent directory in output path
-f, --format Image format: jpg or png (default: jpg)
-H, --show-help Show help message

Examples

# Extract frames as PNG
video2image -i video.mp4 -o ./frames -f png

# Extract with parent directory structure
video2image -i /videos/project1/clip.mp4 -o /output -p

# Process all videos in current directory
video2image -i . -o ./extracted_frames

Building from Source

# Clone the repository
git clone https://github.com/sakthivelj/video2image.git
cd video2image

# Create virtual environment (optional)
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or: venv\Scripts\activate  # Windows

# Install in development mode
pip install -e .

Requirements

  • Python 3.8+
  • opencv-python
  • tqdm

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Sakthivel J - sakthivel1023@gmail.com

Links

About

Video2Images is a Python script that allows you to extract frames from a video file or multiple video files and save them as individual images. It provides a simple and convenient way to convert videos into a series of images, which can be useful for various applications such as computer vision, machine learning, data analysis, and more.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages