skillfed

python-ffmpeg

A python binding for FFmpeg which provides sync and async APIs

python-ffmpeg v2.0.12 239.4K downloads/30d#8,922 on PyPI384
Permissive license MIT DORMANT released

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-ffmpeg

uv

uv add python-ffmpeg

poetry

poetry add python-ffmpeg

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

ffmpeg python bindingvideo transcoding libraryasync ffmpeg wrapperaudio video encodingffmpeg command buildermedia processing python
media-processingasync-capable

More Utilities packages