python-ffmpeg
A python binding for FFmpeg which provides sync and async APIs
What it is and what it does
python-ffmpeg is a Python wrapper around the FFmpeg command-line tool that lets you build and execute media encoding operations (transcoding, recording, format conversion) using a fluent, chainable API. It supports both blocking synchronous calls via `execute()` and non-blocking async operations via `asyncio`, making it suitable for both simple scripts and concurrent media processing workflows.
The package abstracts away FFmpeg's complex command-line syntax by providing methods like `input()`, `output()`, and `option()` to construct operations programmatically. You can attach event handlers (e.g., progress callbacks) to monitor execution. It depends only on pyee for event handling and typing-extensions for type hints, keeping the installation footprint small. However, the project is dormant—last updated in April 2024 with no recent commits—so it receives no active maintenance.
Use it for:
- Batch transcoding video files to a target codec and resolution in a Python application.
- Recording streams from RTSP sources with progress monitoring and early termination.
- Building concurrent media processing pipelines using async/await in asyncio-based services.
- Programmatically generating FFmpeg commands without shell escaping or string concatenation.
- Integrating video encoding into web services or data processing workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python binding for FFmpeg with both synchronous and asynchronous APIs to encode, transcode, and process audio and video files.
Yes, if you need a clean Python API for FFmpeg operations and can tolerate dormant maintenance. The low install friction, permissive license, and dual sync/async support make it practical for most media encoding tasks. However, if you require active bug fixes or ongoing feature development, consider whether the dormant status (last release April 2024, no recent commits) is acceptable for your use case. No known security vulnerabilities.
Install
python-ffmpeg on PyPI
pip
pip install python-ffmpeguv
uv add python-ffmpegpoetry
poetry add python-ffmpegInstalling python-ffmpeg
Before you install
Low friction installation with only two lightweight runtime dependencies (pyee and typing-extensions). Maintenance is dormant—last release was 2024-04-15 and no commits since 2024-07-31—so expect no active bug fixes or feature updates, though the repository remains public and unarchived.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install python-ffmpeg
from ffmpeg import FFmpeg
ffmpeg = FFmpeg().input("input.mp4").output("output.mp4", {"codec:v": "libx264"})
ffmpeg.execute()
FFmpeg must be installed and available on your system PATH; the package is a Python wrapper around the FFmpeg binary, not a standalone implementation.
Verify before relying
- Whether FFmpeg version compatibility constraints exist beyond general availability on PATH.
- Performance characteristics and overhead of the async implementation compared to direct FFmpeg subprocess calls.
- Whether dormant status means critical bugs are unlikely to be fixed if discovered.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pyee, typing-extensions |
| Maintenance | dormant — 851 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 239,400/month — #8,922 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_ffmpeg-2.0.12-py3-none-any.whl
Keywords: ffmpeg, asyncio
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
ffmpeg-pythonffmpeg-python provides a Python interface to…
permissive · top 5,000 on PyPI
ffmpyffmpy is a Python wrapper around FFmpeg that…
permissive · top 5,000 on PyPI
typed-ffmpegA Python wrapper around FFmpeg with full type…
permissive · top 15,000 on PyPI
imageio-ffmpegProvides a simple Python wrapper around ffmpeg…
permissive · top 5,000 on PyPI
opuslib-nextProvides Python bindings to libopus, the IETF…
permissive · top 15,000 on PyPI
ha-ffmpegProvides an asyncio-based Python interface to…
permissive · top 15,000 on PyPI
static-ffmpegInstalls ffmpeg v8 and ffprobe binaries for…
permissive · top 15,000 on PyPI
torchcodecTorchCodec decodes and encodes videos, audio,…
unclear · top 5,000 on PyPI
pynvvideocodecPyNvVideoCodec provides hardware-accelerated…
permissive · top 15,000 on PyPI
aiortspProvides asyncio-based RTSP client…
copyleft · top 15,000 on PyPI