Skip to main content

Package for preparing videos for deep learning models

Project description

vid-prepper

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.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vid_prepper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa49b33ac27138e272537c97ac38e0027806c2353d75b680e8ebdd5a8a91e69
MD5 a261404ebcf36dbe806c24cede3dbd9a
BLAKE2b-256 d3f79ec65c72516035884831ae4ab4109972660838c3222cd8b8188f5cdbf79e

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