Skip to main content

PyAV

pyav-rkmpp fork

This fork adds explicit Rockchip MPP decoder selection for happyme531/ffmpeg-rockchip. It is based on PyAV 18.1 and FFmpeg 8.1, pinned to 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.

pip install pyav-rkmpp

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

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:

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 for the one-time PyPI and GitHub configuration and the release procedure.

Upstream project

PyAV is a Pythonic binding for the 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 Documentation Python Package Index Conda Forge

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 for Linux, macOS, and Windows with FFmpeg bundled. You can install these wheels by running:

pip install av

Another way of installing PyAV is via conda-forge:

conda install av -c conda-forge

See the 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:

pip install av --no-binary av

Installing from source

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

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:

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, come chat with us, and good luck!

Metadata

Release files for pyav-rkmpp 18.1.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pyav-rkmpp 18.1.0.post1
File Interpreter ABI Platform Actions
pyav_rkmpp-18.1.0.post1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for pyav_rkmpp-18.1.0.post1-cp311-abi3-manylinux_2_28_aarch64.whl

Release files / pyav_rkmpp-18.1.0.post1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL pyav_rkmpp-18.1.0.post1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 52.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a261d30b978cc065821c241ed8e3e4f85870717fced0e7022746d0c202cdb558
BLAKE2b-256 checksum
How to use checksums
7e9de8386782b48e039c7fb906824d7aff84d7b7fb8f03713fe2069d3baaffe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Security for pyav-rkmpp 18.1.0.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for pyav_rkmpp-18.1.0.post1-cp311-abi3-manylinux_2_28_aarch64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page