Cross platform ffmpeg to work on various systems.
Project description
static_ffmpeg
Version
FFMPEG Version: 5.0
Install
python -m pip install static-ffmpeg
About
This tool installs binaries for ffmpeg and ffprobe binary into the system on the first usage of this library. This libary itself is very
lightweight. Binaries will be installed for win32
(Windows) / darwin
(MacOS) / ubuntu
(Linux)
There is both a python api and a command line api. After installing this package the command line aliases will be available:
static_ffmpeg
operates just likeffmpeg
static_ffprobe
operates just likeffprobe
.static_ffmpeg_paths
prints out the paths of the ffmpeg binaries.
> static_ffmpeg_paths
FFMPEG=c:\users\niteris\dev\static_ffmpeg\static_ffmpeg\bin\win32\ffmpeg.exe
FFPROBE=c:\users\niteris\dev\static_ffmpeg\static_ffmpeg\bin\win32\ffprobe.exe
Api
Here's how to get the binaries and execute them.
import os
from static_ffmpeg import run
ffmpeg, ffprobe = run.get_or_fetch_platform_executables_else_raise()
# ffmpeg, ffprobe will be paths to ffmpeg and ffprobe.
os.system(f"{ffmpeg} -version")
os.system(f"{ffprobe} -version")
Testing
Just simply run tox
Virtual Environment (optional)
To test it in a virtual environment, use this easy helper:
To easily setup a virtual environment, please see this installation script: https://raw.githubusercontent.com/zackees/static_ffmpeg/main/setupvirtualenv.py
Then activate . venv/bin/activate
Binary source
Testing
- Clone this project
git clone https://github.com/zackees/static_ffmpeg
- Then setup the virtual env using the script
python virtualenvsetup.py
- Then run tox
tox
Release History
- 2.0:
- ffmpeg upgraded to 5.0
- added ffprobe (static_ffprobe or get run.get_platform_executables_or_raise() to get the binary location)
- Now downloads platform specific binary to reduce install size (reduced 2/3rds of the install size vs 1.0)
- 1.0:
- ffmpeg 4.4 released + tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for static_ffmpeg-2.0.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19295bbe61fe5375af1767787c3bbd525aa1338f2e153e08b6cf7bfe90225a56 |
|
MD5 | 2155ee08b8251953336d0b0fcaac9932 |
|
BLAKE2b-256 | 652be37d43f146a61d5feab6f42812b019b79d59d33821083529e1427885a8b2 |