Skip to main content

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:

pip install -e .

Usage

Basic Usage

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:

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.

Metadata

Release files for agl-frame-extractor 0.2.1

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

Source distribution (sdist)

Source distribution for agl-frame-extractor 0.2.1
File Size Uploaded Provenance
agl_frame_extractor-0.2.1.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agl-frame-extractor 0.2.1
File Interpreter ABI Platform
agl_frame_extractor-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / agl_frame_extractor-0.2.1.tar.gz

Download URL agl_frame_extractor-0.2.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ccf16b0fa23cd5181bce53f2703b133d0cdeeab1d2318bd108424aa5b6cff0ca
BLAKE2b-256 checksum
How to use checksums
3e66c14c0f31ab5c969e6ce154b2cad8f8be0d3a2b129773b6fda76dce8aafb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Linux/6.10.13

Release files / agl_frame_extractor-0.2.1-py3-none-any.whl

Download URL agl_frame_extractor-0.2.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b5a6c54dca916c30dc52ffd4c72c5e07866fc081cdc5daf9e95455d98f47914
BLAKE2b-256 checksum
How to use checksums
538dc847b1ec14aaa34e4e991a5b67fd826a30d58d9941638175d1ccd7c27256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Linux/6.10.13

Security for agl-frame-extractor 0.2.1

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