Skip to main content

Video Representations Extractor (VRE) Video reader

Project description

FFmpeg Video

A python video reader that can read video frames using ffmpeg behind the scenes.

Install (pip):

pip install vre-video

Install (dev):

git clone https://gitlab.com/meehai/ffmpeg-video/
echo "$(pwd)/ffmpeg-video" >> ~/.bashrc
source ~/.bashrc
pip install -r ffmpeg-video/requirements.txt

Handle venv/conda/uv stuff on your own!

Usage:

from vre_video import VREVideo
video = VREVideo("video.mp4")
frame = video[ix] # returns a numpy array

Supports 3 backends for both reading and writing: numpy, Pillow and ffmpeg. It will auto-detect based on input: if a directory is provided it'll try to guess (png/jpg/npz/npy etc.) assuming it's a dir of frames (1.npz, ..., N.npz). If it's a path with suffix (i.e. .mp4, .mkv etc.) it will use the ffmpeg-based variant. Same for writing.

Support for youtube videos

Requires youtube-dl python package.

Usage:

from vre_video import VREVideo
video = VREVideo("https://www.youtube.com/...")
frame = video[ix] # returns a numpy array

Project details


Download files

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

Source Distribution

vre_video-0.2.1.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file vre_video-0.2.1.tar.gz.

File metadata

  • Download URL: vre_video-0.2.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vre_video-0.2.1.tar.gz
Algorithm Hash digest
SHA256 48de763a761b5ca747bceb65d5de3db57d97a11d9fb8aef00761a3db579c89a8
MD5 6b82dc24101955c0b20b5d65a6c5a6e2
BLAKE2b-256 d8a4df485ab1a40196fdd8734b0b9e6e29c3a9950adcabe34cd200129bd3ca68

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