Currently, it includes the basics for reading/writing audio and video. We aim to provide all of the power and control of the underlying library, but manage the gritty details for you as much as possible.
import av container = av.open('/path/to/video.mp4') for packet in container.demux(): for frame in packet.decode(): if frame.type == 'video': frame.to_image().save('/path/to/frame-%04d.jpg' % frame.index)
$ pip install av
$ git clone firstname.lastname@example.org:mikeboers/PyAV.git $ cd PyAV $ virtualenv venv $ . venv/bin/activate $ pip install cython pil $ make $ python setup.py build_ext --inplace
We are attempting to write this wrapper to work with either FFmpeg or Libav. We are using ctypes to detect the differences that we have discerned exist as this wrapper is being developed. This is a fairly trial-and-error process, so please let us know if there are any odd compiler errors or something won’t link due to missing functions.
Additionally, we are far from wrapping the full extents of the libraries. Notable omissions include device and filter support, but there are many C struct members which are currently unexposed.