Metadata-Version: 2.4
Name: jva-capture
Version: 0.1.0
Summary: Screen recording interface for JVA01-Capture device using ffmpeg
Project-URL: Homepage, https://github.com/mh-salari/jva-capture
Project-URL: Repository, https://github.com/mh-salari/jva-capture
Project-URL: Issues, https://github.com/mh-salari/jva-capture/issues
Author-email: Mohammadhossein Salari <mohammadhossein.salari@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: avfoundation,ffmpeg,jva01,screen-capture
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video :: Capture
Requires-Python: >=3.11
Requires-Dist: ffmpeg-python>=0.2.0
Description-Content-Type: text/markdown

# jva-capture

[![PyPI](https://img.shields.io/pypi/v/jva-capture.svg)](https://pypi.org/project/jva-capture/)
![PyPI - Downloads](https://img.shields.io/pypi/dd/jva-capture)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jva-capture)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Screen recording interface for the JVA01-Capture device using ffmpeg on macOS.

## Installation

```bash
pip install jva-capture
```

Or with uv:

```bash
uv add jva-capture
```

ffmpeg must be installed separately:

```bash
brew install ffmpeg
```

## Usage

```python
from jva_capture import JVACapture

# Basic usage
capture = JVACapture("output.mkv")
capture.start()
# ... run your experiment ...
capture.stop()

# As context manager
with JVACapture("output.mkv") as capture:
    # ... run your experiment ...
    pass
```

### Parameters

| Parameter | Default | Description |
|---|---|---|
| `output_path` | *(required)* | Path where video file will be saved |
| `device_name` | `"JVA01-Capture"` | Name of the AVFoundation capture device |
| `framerate` | `60` | Recording framerate (fps) |
| `preset` | `"medium"` | ffmpeg encoding preset (`ultrafast`, `fast`, `medium`, `slow`) |

## Requirements

- macOS (uses AVFoundation)
- Python >= 3.11
- ffmpeg installed and available in PATH
- JVA01-Capture device connected

## License

[MIT](LICENSE)
