Skip to main content

Video Frame Extraction Tool

This tool allows you to extract frames from video files, with features like deduplication and dynamic frame skipping.

Features

This Video Frame Extraction Tool is designed to optimize your workflow with powerful, customizable features for handling video frame processing. Below are the standout capabilities:

  • Versatile Video Format Support: Work with popular video formats including .mp4 and .mov.
  • Frame Deduplication: Integrates an intelligent algorithm to eliminate similar frames, ensuring each extracted frame is unique. Customize the similarity threshold to fit your needs.
  • Adaptive Frame Skipping: Dynamically skips frames to maintain efficiency without sacrificing quality. The tool automatically adjusts skipping based on the video's FPS and duration, or you can customize the settings to your preferences.
  • Custom Frame Limits: Exercise complete control over your output. Set a cap on the maximum number of frames extracted from each video or across all your video processing tasks.
  • Fast Processing: Leverages the power of multi-core CPUs to speed up frame extraction, enabling parallel processing of video files.
  • User-Friendly GUI: A graphical user interface simplifies file selection and settings adjustments, making it accessible to users of all skill levels.

Requirements

  • Python 3.6+
  • Required Python packages (listed in requirements.txt):
    • opencv-python
    • tqdm
    • loguru
    • imagededup
    • click
    • tkinter

Installation

  1. Clone the repository:

    git clone [https://github.com/yourusername/video-frame-extraction-tool.git](https://github.com/yourusername/video-frame-extraction-tool.git)
    cd video-frame-extraction-tool
    
  2. Install the required Python packages:

    pip install -r requirements.txt
    

Usage:

python extract_frames.py [OPTIONS]

CLI arguments:

Tailor the tool's operation with command-line arguments to fit your project requirements:

  • --threshold FLOAT Set the similarity threshold for deduplication (range: 0.5 to 1.0). A higher value results in stricter deduplication.
  • --no-deduplication Disables the frame deduplication feature.
  • --no-fps-skip Stops the tool from skipping frames based on FPS, extracting every frame.
  • --no-time-skip Prevents frame skipping based on video duration.
  • --max-frames INTEGER Limit the total number of frames to be generated from all processed videos.
  • --max-frames-per-video INTEGER Specify a maximum number of frames to be extracted from each individual video.

Example usage:

python extract_frames.py --threshold 0.95 --max-frames 5000 --max-frames-per-video 1000

This fine-tuned approach provides a robust and flexible solution to efficiently manage frame extraction projects with precision control over output quality and operational parameters.

How It Works

Frame Extraction & Optimization

  • Variable Frame Skipping: Based on the set parameters and video characteristics (FPS and length), the tool calculates an optimal frame skipping strategy to balance between processing speed and output quality.
  • Parallel Processing: Distributes the workload across available CPU cores, significantly reducing the time required for frame extraction.
  • Efficient Frame Saving: Extracted frames are saved as JPG images, with an option to adjust the quality and resolution to meet specific needs.

Deduplication for Quality Control:

  • Utilizes a CNN-based method to analyze and compare frames for near-duplicate detection.
  • Customizable threshold: Allows precision control over what is considered a duplicate, adjustable via the --threshold argument.
  • Organizes and relocates duplicates to a designated folder, ensuring your main output directory contains only unique frames.

Contributing

Contributions are welcome! Please open issues or submit pull requests.

Contact

For questions or feedback, please contact bussines@tadeasfort.com].

Metadata

Release files for mp4-to-jpg-click 1.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mp4-to-jpg-click 1.3.7
File Size Uploaded Provenance
mp4_to_jpg_click-1.3.7.tar.gz 18.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mp4-to-jpg-click 1.3.7
File Interpreter ABI Platform
mp4_to_jpg_click-1.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / mp4_to_jpg_click-1.3.7.tar.gz

Download URL mp4_to_jpg_click-1.3.7.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
665201afc2f006c96a4200cabbd0460b1ce700a84b6a0bc9edb131b79627b0b5
BLAKE2b-256 checksum
How to use checksums
2dc133d846c42eee43d2c55bb36da0bc999ad8944363842ec5857a6bf75e2f09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.8

Release files / mp4_to_jpg_click-1.3.7-py3-none-any.whl

Download URL mp4_to_jpg_click-1.3.7-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98e29f7bb9a7a629c77d8eafdb950825ad1b98846e10c67789fd19352e2be535
BLAKE2b-256 checksum
How to use checksums
3dab6eee5ae12f1d72968793c6e1e3934dc640d31f8d8a578b2fda71565534bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.8

Security for mp4-to-jpg-click 1.3.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page