- Hardware-accelerated extraction using AVFoundation/VideoToolbox
- MLX native with direct BGRA frame copy to
mx.array
- Lightweight bindings using
nanobind
and GIL release - Pythonic interface with simple iterators and context managers
import viteo
# Simple iteration with context manager
with viteo.open("video.mp4") as frames:
for frame in frames:
# frame is MLX array (height, width, 4) BGRA format
process(frame)
# Direct extraction
extractor = viteo.FrameExtractor("video.mp4")
for frame in extractor:
process(frame)
pip install viteo
git clone https://github.com/codeSamuraii/viteo
cd viteo
pip install -v -e .
rm -rf dist/
pip install -e . --force-reinstall --no-deps
- macOS with Apple Silicon (M1/M2/M3/M4)
- Python 3.8+
- MLX framework