Skip to main content

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

Metadata

Release files for vid-prepper 0.1.2

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

Built distribution (wheel)

Table of built distributions (wheels) for vid-prepper 0.1.2
File Interpreter ABI Platform
vid_prepper-0.1.2-py3-none-any.whl Python 3 none any Details

Release files / vid_prepper-0.1.2-py3-none-any.whl

Download URL vid_prepper-0.1.2-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df8f9c360f807ce34687704656f8cce3d6eeabcb545e1496eb56c641588ad0f0
BLAKE2b-256 checksum
How to use checksums
7b757396d65ec65f7620d5ba4f6d7d93339ca93d4e5a99dca6911ae5087d3ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

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