{"id":21818,"library":"python-ffmpeg","title":"python-ffmpeg","description":"A Python binding for FFmpeg that provides both synchronous and asynchronous APIs to transcode, process, and stream media files. Current version is 2.0.12, with active development and regular releases.","status":"active","version":"2.0.12","language":"python","source_language":"en","source_url":"https://github.com/jonghwanhyeon/python-ffmpeg","tags":["ffmpeg","media","transcoding","async","audio","video"],"install":[{"cmd":"pip install python-ffmpeg","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Binary FFmpeg executable must be installed and accessible in PATH.","package":"ffmpeg","optional":false}],"imports":[{"note":"Direct import of the main class.","wrong":"","symbol":"FFmpeg","correct":"from ffmpeg import FFmpeg"},{"note":"Progress is in the submodule ffmpeg.progress.","wrong":"from ffmpeg import Progress","symbol":"Progress","correct":"from ffmpeg.progress import Progress"}],"quickstart":{"code":"import asyncio\nfrom ffmpeg import FFmpeg\n\nasync def main():\n    ffmpeg = FFmpeg()\n    ffmpeg.input('input.mp4')\n    ffmpeg.output('output.mp4')\n    await ffmpeg.execute()\n\nasyncio.run(main())","lang":"python","description":"Basic async usage: transcode an MP4 file."},"warnings":[{"fix":"Migrate to new async/sync API. See migration guide in repo.","message":"Version 2.0 completely rewrote the API from v1.x. The old `ffmpeg-python`-style FFmpeg() is replaced with the new async-first API.","severity":"breaking","affected_versions":"2.0.0+"},{"fix":"Use 'await ffmpeg.execute()' inside an async function.","message":"Async methods must be awaited; calling execute() without await returns a coroutine object instead of running.","severity":"breaking","affected_versions":"2.0.0+"},{"fix":"Use: from ffmpeg.progress import Progress","message":"Progress callbacks require the 'Progress' class from ffmpeg.progress module, not from ffmpeg itself.","severity":"gotcha","affected_versions":"all"},{"fix":"Install FFmpeg (e.g., 'sudo apt install ffmpeg' or download from ffmpeg.org).","message":"FFmpeg binary must be installed separately and accessible via PATH, otherwise the library will raise a subprocess error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install FFmpeg (e.g., 'sudo apt install ffmpeg' or 'brew install ffmpeg') and ensure it's in PATH.","cause":"FFmpeg executable not installed or not in PATH.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'"},{"fix":"Use 'await ffmpeg.execute()' inside an async function.","cause":"Calling an async method without await, or calling a coroutine as if it were a sync function.","error":"TypeError: cannot be used with 'await'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}