Skip to main content

Package for preparing videos for deep learning models

Project description

vid-prepper

Usage examples available at: https://github.com/jpetcon/vid-prepper/tree/main/examples

Package for preparing videos for deep learning models. Built on the giant shoulders of FFMPEG, NVIDIA DALI, OpenCV, Kornia, PySceneDetect, Torchvision and PyTorch.

This package attempts to bring some common video pre-processing methods together in an efficient way for both CPU and GPU.

Installation

Prerequisites

Before installing vid-prepper, you need to install the following external dependencies:

FFmpeg (Required)

FFmpeg is required for video processing operations.

Ubuntu/Debian:

sudo apt update
sudo apt install ffmpeg

macOS (with Homebrew):

brew install ffmpeg

Windows: Download from https://ffmpeg.org/download.html and add to PATH.

CUDA/NVDEC (Optional but Recommended)

For GPU acceleration, install CUDA toolkit and ensure your system supports NVDEC:

Ubuntu/Debian:

# Install CUDA toolkit
sudo apt install nvidia-cuda-toolkit

macOS: CUDA is not supported on macOS. The package will automatically fall back to CPU processing.

Windows: Download CUDA toolkit from https://developer.nvidia.com/cuda-downloads.

Package Installation

pip install vid-prepper

Usage

from vid_prepper import metadata, standardize

# Example usage
metadata_extractor = metadata.Metadata("video.mp4")
video_info = metadata_extractor.run()

standardizer = standardize.VideoStandardizer(
        size="224x224",
        fps=25,
        codec="h264",
        color="rgb",
        use_gpu=False  # Set to True if you have CUDA
    )

standardizer.standardize_video(video_input="video.mp4", output_path="video_standardized.mp4")

Features

  • Video metadata extraction and validation
  • Video standardization and preprocessing
  • Object detection and scene analysis
  • Video augmentation for deep learning
  • Efficient tensor loading with GPU acceleration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vid_prepper-0.1.1-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file vid_prepper-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vid_prepper-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for vid_prepper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a378b1a0168a42a67037f828b58716f1896489b5943fdc5505e94c44f250cf38
MD5 b77b0589cf8025e9f32f0ee41dac1117
BLAKE2b-256 fdbda762ab10a8c4e9dd3fbf5f8c7c69bb2d3f72ed18089f3e0669b7f513e68b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page