Skip to content

codeSamuraii/viteo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

High-performance video frame extraction for Apple Silicon

Python 3.8+ PyPI Apple Silicon License: MIT


  • 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

Getting started

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)

Installation

pip install viteo

From source

git clone https://github.com/codeSamuraii/viteo
cd viteo
pip install -v -e .

Rebuilding

rm -rf dist/
pip install -e . --force-reinstall --no-deps

Requirements

  • macOS with Apple Silicon (M1/M2/M3/M4)
  • Python 3.8+
  • MLX framework