agl-frame-extractor


Nameagl-frame-extractor JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryExtracts frames from .mov files
upload_time2024-03-19 03:33:19
maintainer
docs_urlNone
authorThomas J. Lux
requires_python>=3.11,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # agl-frame-extractor
## Description

`agl_frame_extractor` is a Python package designed to extract individual frames and metadata from .MOV video files. This package is highly useful for researchers and clinicians who require frame-by-frame analysis of video data. With applications ranging from medical research to training simulations, the package aims to improve standards and classifications in gastrointestinal endoscopy by enhancing objectivity and reproducibility.

## Features

- Extracts individual frames from .MOV files and saves them as PNG images.
- Gathers video metadata including total number of frames, frames per second, and video duration.
- Offers optional multithreading support for faster frame extraction.
- Generates a log file to record the extraction process.

## Installation

To install this package, clone the repository and run the following command in the repository root:

```bash
pip install -e .
```

## Usage

### Basic Usage

```python
from video_frame_extractor.extractor import VideoFrameExtractor

input_folder = "input_videos"
output_folder = "output_frames_metadata"

extractor = VideoFrameExtractor(input_folder, output_folder)
extractor.extract_frames_and_metadata()

# If you want to extract png files instead of jpgs:
input_folder = "input_videos"
output_folder = "output_frames_metadata"

extractor = VideoFrameExtractor(input_folder, output_folder, image_format='png')
extractor.extract_frames_and_metadata()
```

### Multithreaded Usage

To enable multithreading for faster frame extraction:

```python
from video_frame_extractor.extractor import VideoFrameExtractor

input_folder = "input_videos"
output_folder = "output_frames_metadata"

extractor = VideoFrameExtractor(input_folder, output_folder, use_multithreading=True)
extractor.extract_frames_and_metadata()
```

## Dependencies

- OpenCV
- tqdm

## Logging

The package generates a log file `video_frame_extraction.log` in the directory where it is executed. This log file contains detailed information about the extraction process.

## Contributing

We welcome contributions to improve this package. Please follow the standard GitHub pull request process. Make sure to document your code thoroughly, keeping in mind that the package targets an academic audience focused on research.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "agl-frame-extractor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thomas J. Lux",
    "author_email": "lux_t1@ukw.de",
    "download_url": "https://files.pythonhosted.org/packages/64/a9/8ab46ec7d97984f1acd8009373fa52e46e0208743146118e50be323aca88/agl_frame_extractor-0.2.0.tar.gz",
    "platform": null,
    "description": "# agl-frame-extractor\n## Description\n\n`agl_frame_extractor` is a Python package designed to extract individual frames and metadata from .MOV video files. This package is highly useful for researchers and clinicians who require frame-by-frame analysis of video data. With applications ranging from medical research to training simulations, the package aims to improve standards and classifications in gastrointestinal endoscopy by enhancing objectivity and reproducibility.\n\n## Features\n\n- Extracts individual frames from .MOV files and saves them as PNG images.\n- Gathers video metadata including total number of frames, frames per second, and video duration.\n- Offers optional multithreading support for faster frame extraction.\n- Generates a log file to record the extraction process.\n\n## Installation\n\nTo install this package, clone the repository and run the following command in the repository root:\n\n```bash\npip install -e .\n```\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom video_frame_extractor.extractor import VideoFrameExtractor\n\ninput_folder = \"input_videos\"\noutput_folder = \"output_frames_metadata\"\n\nextractor = VideoFrameExtractor(input_folder, output_folder)\nextractor.extract_frames_and_metadata()\n\n# If you want to extract png files instead of jpgs:\ninput_folder = \"input_videos\"\noutput_folder = \"output_frames_metadata\"\n\nextractor = VideoFrameExtractor(input_folder, output_folder, image_format='png')\nextractor.extract_frames_and_metadata()\n```\n\n### Multithreaded Usage\n\nTo enable multithreading for faster frame extraction:\n\n```python\nfrom video_frame_extractor.extractor import VideoFrameExtractor\n\ninput_folder = \"input_videos\"\noutput_folder = \"output_frames_metadata\"\n\nextractor = VideoFrameExtractor(input_folder, output_folder, use_multithreading=True)\nextractor.extract_frames_and_metadata()\n```\n\n## Dependencies\n\n- OpenCV\n- tqdm\n\n## Logging\n\nThe package generates a log file `video_frame_extraction.log` in the directory where it is executed. This log file contains detailed information about the extraction process.\n\n## Contributing\n\nWe welcome contributions to improve this package. Please follow the standard GitHub pull request process. Make sure to document your code thoroughly, keeping in mind that the package targets an academic audience focused on research.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Extracts frames from .mov files",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3567e96524d3db676291ca2763da281cac59baf3a22ef375bc91a5096357bf48",
                "md5": "e201915a74bbd464476b5250aedaf543",
                "sha256": "794b1361392758fbae22d3192f9803f8efda44f6872a0b448872f65ba74d7f28"
            },
            "downloads": -1,
            "filename": "agl_frame_extractor-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e201915a74bbd464476b5250aedaf543",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 3695,
            "upload_time": "2024-03-19T03:33:17",
            "upload_time_iso_8601": "2024-03-19T03:33:17.430358Z",
            "url": "https://files.pythonhosted.org/packages/35/67/e96524d3db676291ca2763da281cac59baf3a22ef375bc91a5096357bf48/agl_frame_extractor-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64a98ab46ec7d97984f1acd8009373fa52e46e0208743146118e50be323aca88",
                "md5": "d869d448ef5b6aa3d70517407de87cc8",
                "sha256": "33cf120c11a02dd08d583d9e1ec1b79aef970107f319c292bb2641129d92d67a"
            },
            "downloads": -1,
            "filename": "agl_frame_extractor-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d869d448ef5b6aa3d70517407de87cc8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 2844,
            "upload_time": "2024-03-19T03:33:19",
            "upload_time_iso_8601": "2024-03-19T03:33:19.274074Z",
            "url": "https://files.pythonhosted.org/packages/64/a9/8ab46ec7d97984f1acd8009373fa52e46e0208743146118e50be323aca88/agl_frame_extractor-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-19 03:33:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "agl-frame-extractor"
}
        
Elapsed time: 0.33752s