Skip to main content

Cross platform ffmpeg to work on various systems.

Project description

Actions Status Actions Status Actions Status

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.

Updating binaries

  • Zip up folders darwin/linux/win32 into the darwin/linux/win32.zip archives prior to release. They must be < 100MB or else PYIP won't accept it. So compression matters.
    • To make archive:
      • (Win32) select darwin/linux/win32 and right click 7z -> "add to archive"
        • Assumes you've installed 7z archiver for windows
      • format: 7z
      • Compression Level: Ultra
      • Compression Method: LZMA2
      • Dictionary Size: 1024
      • Word Size 64
      • Solid Block Size 512MB

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 activate . venv/bin/activate
  • Then run tox tox

Testing work arounds

  • You may get an error like 'Interpretor not found'
  • Ubuntu: `ModuleNotFoundError: No module named 'virtualenv.seed.via_app_data'
    • Uninstall the pip on your system and reinstall:
      • pip3 uninstall virtualenv
      • pip3 install virtualenv

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

static_ffmpeg-2.0.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

static_ffmpeg-2.0.0-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file static_ffmpeg-2.0.0.tar.gz.

File metadata

  • Download URL: static_ffmpeg-2.0.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0

File hashes

Hashes for static_ffmpeg-2.0.0.tar.gz
Algorithm Hash digest
SHA256 272adee52862f970463a109662cd5be3ad8ee2aaa515f6c550311a9516bd89fc
MD5 e6585f00d6a1c50f578a1737cc597f70
BLAKE2b-256 d3fd648e7cd0356923fc674acb68b55d01e315de2fb9dc4931bd3999439fdcba

See more details on using hashes here.

File details

Details for the file static_ffmpeg-2.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: static_ffmpeg-2.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0

File hashes

Hashes for static_ffmpeg-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 42b0074dbaa9c75935cb6bcd44f6676c87a51f9cbc6245d61a233e05090802c1
MD5 110d9e46c8807d64626adf2282cb1d7b
BLAKE2b-256 9cc9d9417dad5f506a07b3866de20e0328843444e2b945b6bca4056597917507

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page