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
pip install video2imagevideo2image -i /path/to/video.mp4 -o /path/to/output/foldervideo2image -i /path/to/video/directory -o /path/to/output/folder| 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 |
# 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# 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 .- Python 3.8+
- opencv-python
- tqdm
This project is licensed under the MIT License. See the LICENSE file for details.
Sakthivel J - sakthivel1023@gmail.com