{"id":30431248,"url":"https://github.com/rahaaatul/pixtract","last_synced_at":"2025-08-22T19:27:37.443Z","repository":{"id":310471083,"uuid":"1039981484","full_name":"rahaaatul/Pixtract","owner":"rahaaatul","description":"An efficient command-line tool designed to extract high-quality pictures from videos","archived":false,"fork":false,"pushed_at":"2025-08-18T11:12:46.000Z","size":1586,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T11:23:03.772Z","etag":null,"topics":["extract","extract-images","frame","frames","image-manipulation","image-processing","photo","video","video-processing","video-to-photo-converter"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pixtract/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rahaaatul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T09:25:31.000Z","updated_at":"2025-08-18T11:18:22.000Z","dependencies_parsed_at":"2025-08-18T11:34:19.415Z","dependency_job_id":null,"html_url":"https://github.com/rahaaatul/Pixtract","commit_stats":null,"previous_names":["rahaaatul/pixtract"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rahaaatul/Pixtract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahaaatul%2FPixtract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahaaatul%2FPixtract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahaaatul%2FPixtract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahaaatul%2FPixtract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rahaaatul","download_url":"https://codeload.github.com/rahaaatul/Pixtract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rahaaatul%2FPixtract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271688366,"owners_count":24803502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extract","extract-images","frame","frames","image-manipulation","image-processing","photo","video","video-processing","video-to-photo-converter"],"created_at":"2025-08-22T19:27:32.425Z","updated_at":"2025-08-22T19:27:37.430Z","avatar_url":"https://github.com/rahaaatul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pixtract 🎬\n\nPixtract is a powerful and intelligent command-line tool designed to extract high-quality, non-blurry, and non-duplicate frames from your videos. Whether you're building a computer vision dataset, analyzing video content, or simply curating the best visual moments, Pixtract streamlines the process, saving you time and disk space.\n\n## ✨ Features\n\n*   **Intelligent Frame Filtering:** 🧠 Automatically analyzes and discards blurry frames and efficiently removes duplicate or near-duplicate images, ensuring you only get sharp, unique, and relevant visuals.\n*   **High-Performance Parallel Processing:** ⚡️ Leverages multiple CPU cores to process videos concurrently, significantly reducing processing times for large collections.\n*   **Granular Frame Extraction Control:** 🎯 Extract frames at a specified interval (e.g., every 5th frame), giving you precise control over the density of your output.\n*   **Wide Video Format Support:** 🎥 Extracts frames from a variety of popular video formats, including MP4, MOV, AVI, and MKV.\n*   **Image Rotation:** 🔄 Corrects the orientation of frames with adjustable rotation (0, 90, 180, or 270 degrees).\n*   **Batch Processing:** 📦 Process multiple videos from a given directory in a single run.\n*   **Robust Error Handling:** ✅ Implemented robust error handling for individual video processing, ensuring the application continues even if some videos fail.\n*   **Dry Run Mode:** 🧪 Simulate the entire process without creating or deleting any files, perfect for testing parameters.\n*   **Verbose Output:** 📊 Get detailed logging information for debugging or deeper insights into the processing.\n\n## ⬇️ Installation\n\nYou can install Pixtract directly from GitHub using `Git`:\n\n```bash\npip install git+https://github.com/rahaaatul/Pixtract.git\n```\n\nOr from PyPI using `pip`:\n\n```bash\npip install pixtract\n```\n\nFor an isolated installation, use `pipx`:\n\n```bash\npipx install pixtract\n```\n\n## 🚀 Usage\n\nTo use Pixtract, simply run the `pixtract` command with the path to your video file or a directory containing videos.\n\n### Quick Start\n\nProcess a single video and save frames to a default output folder (e.g., `video_frames` next to your video):\n\n```bash\npixtract \"path/to/your/video.mp4\"\n```\n\nProcess all videos in a directory and save frames to a specified output folder:\n\n```bash\npixtract \"path/to/your/videos_directory\" -o \"path/to/your/output_folder\"\n```\n\n### Examples\n\nExtract frames from `my_movie.mp4`, remove blurry frames (sharpness threshold 50), and remove duplicates (threshold 0.98):\n\n```bash\npixtract my_movie.mp4 -s 50 -d 0.98\n```\n\nProcess videos in `my_videos/`, rotate frames by 90 degrees, and enable verbose output:\n\n```bash\npixtract my_videos/ -r 90 -v\n```\n\nExtract every 10th frame from `my_video.mp4`:\n\n```bash\npixtract my_video.mp4 -i 10\n```\n\nSimulate processing `holiday_clip.mp4` without actually saving or deleting files:\n\n```bash\npixtract holiday_clip.mp4 --dry-run\n```\n\n## ⚙️ Command-Line Options\n\n| Option              | Short | Type    | Default        | Description                                                                                             |\n| :------------------ | :---- | :------ | :------------- | :------------------------------------------------------------------------------------------------------ |\n| `--input-path`      |       | `str`   | Current Dir    | Path to a video file or a directory containing videos. If a directory, all supported video files within it will be processed. Defaults to the current working directory. |\n| `--output`          | `-o`  | `str`   | `Processed_Frames` | Path to the output directory where extracted frames will be saved. Defaults vary based on input type.    |\n| `--interval`        | `-i`  | `int`   | `1`            | Interval at which to extract frames (e.g., `5` for every 5th frame).                                    |\n| `--sharpness`       | `-s`  | `int`   | `100`          | Set the sharpness threshold for blur detection. Lower values are more permissive (allow more blur).     |\n| `--duplicate`       | `-d`  | `float` | `1.0`          | Set the threshold for duplicate detection. Higher values (closer to `1.0`) are more strict.             |\n| `--rotate`          | `-r`  | `int`   | `0`            | Rotate frames by 0, 90, 180, or 270 degrees.                                                            |\n| `--dry-run`         |       | `flag`  | `False`        | Simulate the process without creating or deleting files.                                                |\n| `--limit`           | `-l`  | `int`   | `None`         | Limit the number of videos to process when an input directory is provided.                              |\n| `--verbose`         | `-v`  | `flag`  | `False`        | Enable verbose (debug) output, showing more detailed processing information.                            |\n| `--workers`         | `-w`  | `int`   | `CPU Cores`    | Number of parallel processes to use for video processing. Defaults to the number of CPU cores available. |\n\n## 🧑‍💻 Development\n\nTo set up the project for development, clone the repository and install the development dependencies:\n\n```bash\ngit clone https://github.com/rahaaatul/pixtract.git\ncd pixtract\npip install -e .[dev]\n```\n\n### Running Tests\n\nTo run the test suite, ensure you have installed the development dependencies and then execute `pytest`:\n\n```bash\npip install -e .[dev]\npytest\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to open an issue or submit a pull request. For bug reports, please use the [Bug Report template](https://github.com/rahaaatul/pixtract/issues/new?assignees=\u0026labels=bug\u0026projects=\u0026template=bug_report.md\u0026title=). For new features, use the [Feature Request template](https://github.com/rahaaatul/pixtract/issues/new?assignees=\u0026labels=enhancement\u0026projects=\u0026template=feature_request.md\u0026title=).\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahaaatul%2Fpixtract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frahaaatul%2Fpixtract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frahaaatul%2Fpixtract/lists"}