Metadata-Version: 2.4
Name: pyav-rkmpp
Version: 18.1.0.post2
Summary: PyAV bindings built for ffmpeg-rockchip and Rockchip MPP.
Author-email: WyattBlue <wyattblue@auto-editor.com>, Jeremy Lainé <jeremy.laine@m4x.org>
License-Expression: BSD-3-Clause
Project-URL: Bug Tracker, https://github.com/happyme531/pyav-rkmpp/issues
Project-URL: Source Code, https://github.com/happyme531/pyav-rkmpp
Project-URL: homepage, https://github.com/happyme531/pyav-rkmpp
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Cython
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: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Multimedia :: Video :: Conversion
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: AUTHORS.py
License-File: AUTHORS.rst
Dynamic: license-file

PyAV
====

pyav-rkmpp fork
----------------

This fork adds explicit Rockchip MPP decoder selection for
[`happyme531/ffmpeg-rockchip`](https://github.com/happyme531/ffmpeg-rockchip).
It is based on PyAV 18.1 and FFmpeg 8.1, pinned to ffmpeg-rockchip commit
[`de4b44643eaf55ed21cf7d02ae22a00c18579c9a`](https://github.com/happyme531/ffmpeg-rockchip/commit/de4b44643eaf55ed21cf7d02ae22a00c18579c9a).

The distribution name is `pyav-rkmpp`, while the Python import remains `av`.
It cannot be installed alongside upstream's `av` distribution in one environment.
The ARM64 wheels support CPython 3.10 and later: Python 3.10 uses a native wheel,
while one `abi3` wheel covers Python 3.11 through 3.14.

```bash
pip install pyav-rkmpp
```

On the RK3588 board, build a shared ffmpeg-rockchip runtime and a thin ARM64 wheel:

```bash
make rkmpp-wheel
make rkmpp-smoke
```

The build stays under `.rkmpp-build/` and writes the wheel plus matching shared
runtime to `dist-rkmpp/`; it does not replace the system FFmpeg. The API extension is:

```python
from av.codec.hwaccel import HWAccel

hwaccel = HWAccel("rkmpp", allow_software_fallback=False)
container = av.open(
    "input.mp4",
    video_decoder="h264_rkmpp",
    hwaccel=hwaccel,
)
```

See `examples/basics/rkmpp_decode.py` for decoding and
`examples/basics/rkmpp_rtmp.py` for video-only RTMP publishing. The RTMP example
uses a zero-copy DRM PRIME decode/encode path by default, requires an explicit
destination, and does not implement reconnect or queue policy.

Release builds run on GitHub's ARM64 runner. A separate x64 publishing job uploads
the repaired ARM64 wheel to PyPI using Trusted Publishing; no x64 wheel is built.
See [`RELEASING_RKMPP.md`](RELEASING_RKMPP.md) for the one-time PyPI and GitHub
configuration and the release procedure.

Upstream project
----------------

PyAV is a Pythonic binding for the [FFmpeg][ffmpeg] libraries. We aim to provide all the power and control of the underlying library, but manage the gritty details as much as possible.

---

[![GitHub Test Status][github-tests-badge]][github-tests] [![Documentation][docs-badge]][docs] [![Python Package Index][pypi-badge]][pypi] [![Conda Forge][conda-badge]][conda]

PyAV is for direct and precise access to your media via containers, streams, packets, codecs, and frames. It exposes a few transformations of that data, and helps you get your data to/from other packages (e.g. NumPy and Pillow).

This power does come with some responsibility as working with media is horrendously complicated and PyAV can't abstract it away or make all the best decisions for you. If the `ffmpeg` command does the job without you bending over backwards, PyAV is likely going to be more of a hindrance than a help.

But where you can't work without it, PyAV is a critical tool.


Installation
------------

PyAV requires Python 3.11 or later. Binary wheels are provided on [PyPI][pypi] for Linux, macOS, and Windows with FFmpeg bundled. You can install these wheels by running:

```bash
pip install av
```

Another way of installing PyAV is via [conda-forge][conda-forge]:

```bash
conda install av -c conda-forge
```

See the [Conda install][conda-install] docs to get started with Miniconda.


Alternative installation methods
--------------------------------

Due to the complexity of the dependencies, PyAV is not always the easiest Python package to install from source. This release supports FFmpeg 8.x. To build the source distribution against an existing FFmpeg installation on Linux or macOS, run:

> [!WARNING]
> FFmpeg's development files and `pkg-config` must be available on your system.

```bash
pip install av --no-binary av
```


Installing from source
----------------------

On Linux or macOS, build PyAV from a Git checkout with:

```bash
git clone https://github.com/PyAV-Org/PyAV.git
cd PyAV
source scripts/activate.sh

# Build ffmpeg from source. You can skip this step if ffmpeg 8.x is already installed.
./scripts/build-deps

# Build PyAV
make

# Testing
make test

# Install globally
deactivate
pip install .
```

On Windows, use a Conda environment and the FFmpeg development files maintained by the PyAV project:

```powershell
git clone https://github.com/PyAV-Org/PyAV.git
cd PyAV
conda create --name pyav-dev --channel conda-forge python=3.11 cython setuptools numpy pillow pytest
conda activate pyav-dev
$ffmpegDir = Join-Path $env:CONDA_PREFIX "Library"
python scripts\fetch-vendor.py --config-file scripts\ffmpeg-latest.json $ffmpegDir
python setup.py build_ext --inplace --ffmpeg-dir=$ffmpegDir
python -m pytest
```

---

Have fun, [read the docs][docs], [come chat with us][discuss], and good luck!



[conda-badge]: https://img.shields.io/conda/vn/conda-forge/av.svg?colorB=CCB39A
[conda]: https://anaconda.org/conda-forge/av
[docs-badge]: https://img.shields.io/badge/docs-on%20pyav.basswood.io-blue.svg
[docs]: https://pyav.basswood.io
[pypi-badge]: https://img.shields.io/pypi/v/av.svg?colorB=CCB39A
[pypi]: https://pypi.org/project/av
[discuss]: https://github.com/PyAV-Org/PyAV/discussions

[github-tests-badge]: https://github.com/PyAV-Org/PyAV/workflows/tests/badge.svg
[github-tests]: https://github.com/PyAV-Org/PyAV/actions?workflow=tests
[github]: https://github.com/PyAV-Org/PyAV

[ffmpeg]: https://ffmpeg.org/
[conda-forge]: https://conda-forge.github.io/
[conda-install]: https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html
