Cross platform ffmpeg to work on various systems.
Project description
static_ffmpeg
Version
FFMPEG Version: 5.0
About
Problem: You develop on Windows/MacOS/Linux. You want an ffmpeg that works on all the platforms but now you have to go and special case your program installation to handle each platforms ability to get the ffmpeg download. For example:
- Win32:
choco install ffmpeg
- MacOS:
brew install ffmpeg
- Linux:
sudo apt-get install ffmpeg
If you want to be able to quitely (re)install a python package silently and automatically using ffmpeg, well you are out of luck... until now.
Pre-installation (optional)
To easily setup a virtual environment, please see this installation script: https://raw.githubusercontent.com/zackees/static_ffmpeg/main/setupvirtualenv.py
Installation
To use simply do pip install static-ffmpeg
and then after this is done you
can try running static_ffmpeg -version
and/or static_ffprobe -version
to test out
that the version has been installed.
Once this package is installed, the static_ffmpeg
and static_ffprobe
command
will be available. This command simply passes all arguments to
a real ffmpeg/ffprobe. Call static_ffmpeg like you would call ffmpeg in your project
and it should just work, or bypass the stub and use the ffmpeg/ffprobe directly by getting
the path via run.get_platform_executables_or_raise()
Warning - Big
- All three binaries for Win32/darwin/linux ffmpeg are included. Though if you need ffmpeg then you probably have a large disk anyway.
Binary source
https://github.com/zackees/ffmpeg_bins
Testing
- Clone this project
git clone https://github.com/zackees/static_ffmpeg
- Then setup the virtual env using the script
python virtualenvsetup.py
- Then activate
. venv/bin/activate
- Then run tox
tox
Testing work arounds
- You may get an error like 'Interpretor not found'
- The solution it install the python interpretor of this type, like so
- Ubuntu: `ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
- Uninstall the pip on your system and reinstall:
pip3 uninstall virtualenv
pip3 install virtualenv
- Uninstall the pip on your system and reinstall:
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 and memory footprint to 1/3
- 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.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f4e03fbc9253d1af0bf651dd5d15616ca42c9429c1ba4a9b11e36f8afea0d1 |
|
MD5 | ede36c7d634be25f9b6dbedf84fa44c0 |
|
BLAKE2b-256 | ba07ed4aef3701cccdba5fd2b83096b7b132268bc4909b33dfba4ddfbcb15643 |