static-ffmpeg

raw JSON →
3.0 verified Fri May 01 auth: no python

Provides a static download of ffmpeg for cross-platform use, ensuring a consistent ffmpeg binary across different systems. Current version 3.0, updated irregularly.

pip install static-ffmpeg
error TypeError: 'module' object is not callable
cause Importing 'import static_ffmpeg' and then calling static_ffmpeg()
fix
Use 'from static_ffmpeg import FFmpeg' then 'ff = FFmpeg()'.
error FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
cause System ffmpeg not in PATH, but static_ffmpeg not used correctly
fix
Use static_ffmpeg.FFmpeg instead of subprocess calling 'ffmpeg'.
gotcha First invocation downloads a large ffmpeg binary (~50-100MB). Ensure internet connectivity and sufficient disk space.
fix Pre-download using static_ffmpeg.download() or set STATIC_FFMPEG_AUTO_DOWNLOAD=False to manage manually.
gotcha The execute() method expects a list of arguments, not a single string. Passing a string (e.g., '-i in.mp4 -out out.mp4') will break.
fix Always pass a list: ff.execute(['-i', 'in.mp4', 'out.mp4'])
deprecated The 'run()' method was renamed to 'execute()' in version 1.5. 'run()' still works but logs a deprecation warning.
fix Use ff.execute() instead of ff.run().

Initialize and run ffmpeg commands with automatic binary download if not cached.

from static_ffmpeg import FFmpeg
ff = FFmpeg()
ff.execute(['-version'])
# ff.execute(['-i', 'input.mp4', 'output.mp4'])