Curated list of common Audio/Video filters.
This library wraps the relatively complex PyAV bindings to provide easy to use audio and video manipulation filters, such as files concatenation, video reversing or video to GIF.
FFMPEG is a powerful tool for media files manipulation. Many
Python libraries already wrap the ffmpeg
executable to
easily perform audio and video processing in Python.
However, most of those libraries call ffmpeg
through subprocesses. While this is fine in many
use cases, this has two major drawbacks:
- you must have
ffmpeg
installed on your computer, and know the executable path; - and repeatedly calling subprocesses in a hot loop can be quite slow.
For performances reasons, a solution is to use
bindings to the FFMPEG C libraries, e.g.,
PyAV. Moreover,
PyAV ships (by default) with pre-built binary wheels
linking against FFMPEG C libraries, so you do not need
to rely on a possible local installation of ffmpeg
.
Unfortunately, using PyAV can be quite complex,
especially as ffmpeg
usually does a lot of
auto-corrections that PyAV does not automatically
perform.
This library aims at providing a straighforward
ffmpeg
-like API for some very common use cases.
If you feel like a feature is missing, please use the GitHub issues and detail your feature request.
First, add avfilters
to you project's dependencies.
from avfilters import reverse
reverse("original.mp4", "expected.mp4")
For more examples, take a look at the documentation.
You have a question or want to report a bug?
Please use the GitHub issues.