Metadata-Version: 2.1
Name: viteo
Version: 0.1.0rc0
Summary: Hardware-accelerated video frame extraction for Apple Silicon
Keywords: video,frame,apple,mac,hardware-acceleration,mlx,avfoundation,videotoolbox
Author-Email: =?utf-8?b?UsOpbWkgSMOpbmVhdWx0?= <remi@heneault.fr>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: C++
Classifier: Programming Language :: Objective C
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Project-URL: Homepage, https://github.com/codeSamuraii/viteo
Project-URL: Repository, https://github.com/codeSamuraii/viteo
Project-URL: Documentation, https://github.com/codeSamuraii/viteo#readme
Project-URL: Issues, https://github.com/codeSamuraii/viteo/issues
Requires-Python: >=3.10
Requires-Dist: mlx>=0.5.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: rich>=13.0; extra == "dev"
Requires-Dist: numpy>=1.24.0; extra == "dev"
Description-Content-Type: text/markdown

<div align="center">

![logo](https://github.com/user-attachments/assets/a7e90f28-64db-4401-94de-f8b573d3eec8)

**High-performance video frame extraction for Apple Silicon**

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![PyPI](https://img.shields.io/pypi/v/viteo.svg)](https://pypi.org/project/viteo/)
[![Apple Silicon](https://img.shields.io/badge/platform-Apple%20Silicon-lightgrey.svg)](https://www.apple.com/mac/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

</div>

----

- **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

<br />

## Getting started

```python
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

```bash
pip install viteo
```

### From source

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

#### Rebuilding

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

### Requirements

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