Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

avformat_new_stream(AVFormatContext *s, const AVCodec *c) does not use its
second parameter [1], so the codec type for the stream is not populated until
avcodec_parameters_from_context() [2] is called.


Co-authored-by: Jeremy Lainé <>

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
October 17, 2022 22:02
November 25, 2012 11:23
November 14, 2019 16:20
March 8, 2022 08:25
February 25, 2022 15:14


GitHub Test Status
Gitter Chat Documentation
Python Package Index Conda Forge

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

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.


Due to the complexity of the dependencies, PyAV is not always the easiest Python package to install from source. Since release 8.0.0 binary wheels are provided on PyPI for Linux, Mac and Windows linked against a modern FFmpeg. You can install these wheels by running:

pip install av

If you want to use your existing FFmpeg, the source version of PyAV is on PyPI too:

pip install av --no-binary av

Alternative installation methods

Another way of installing PyAV is via conda-forge:

conda install av -c conda-forge

See the Conda install docs to get started with (mini)Conda.

And if you want to build from the absolute source (for development or testing):

git clone
cd PyAV
source scripts/

# Either install the testing dependencies:
pip install --upgrade -r tests/requirements.txt
# or have it all, including FFmpeg, built/installed for you:

# Build PyAV.

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