Skip to content

ToolsHive/Forensi-Frame

Repository files navigation

Video Frame Extractor 🎥

A high-performance Python tool for extracting frames from video files with multi-threading support and rich visualization features.

📑 Table of Contents

🚀 Features

  • Multi-threaded frame extraction for optimal performance
  • Real-time progress tracking with Rich console
  • Detailed video metadata display
  • Cross-platform compatibility
  • Configurable thread count
  • Robust error handling
  • Jupyter Notebook integration support

🔄 Process Flow

Flowchart

📋 Prerequisites

  • Python 3.6 or higher
  • Required packages for CLI:
    pip install opencv-python rich
  • Additional packages for Jupyter Notebook:
    pip install numpy matplotlib jupyter ipython

🔮 Virtual Environment Setup

  1. Create a virtual environment:

    python -m venv venv
  2. Activate the virtual environment:

    Windows:

    .\venv\Scripts\activate

    Linux/Mac:

    source venv/bin/activate
  3. Verify activation (you should see (venv) in your terminal):

    python --version

💻 Installation

  1. Clone or download this repository

    git clone https://github.com/ToolsHive/Forensi-Frame.git
  2. Install all dependencies:

    pip install -r requirements.txt

🔧 Usage

Command Line Interface

python script.py <video_path> <output_directory> [--threads N]

Example:

python script.py sample.mp4 frames --threads 8

Arguments

  • video_path: Path to the input video file
  • output_directory: Directory where extracted frames will be saved
  • --threads: Number of threads to use (default: 4)

Jupyter Notebook

You can also use the provided Jupyter notebook Video_Frame_Extractor.ipynb for an interactive experience with additional visualization features.

📊 Output

  • Frames are saved as sequential JPEG images
  • Naming format: frame_XXXX.jpg
  • Video metadata is displayed in a formatted table
  • Progress bar shows extraction status

👥 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/name)
  3. Commit changes (git commit -am 'Add feature')
  4. Push branch (git push origin feature/name)
  5. Create Pull Request

📜 License

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

🙏 Acknowledgments

  • OpenCV for video processing capabilities
  • Rich library for terminal visualization
  • Python's concurrent.futures for multi-threading support

About

Video Frame Extraction Too

Resources

License

Stars

Watchers

Forks