Skip to main content

🎬 Local-FFmpeg

Python 3.6+ Platform: Windows | Linux | macOS FFmpeg

🚀 Overview

local-ffmpeg is a Python utility that automatically downloads and installs FFmpeg, FFplay, and FFprobe binaries for your operating system. It handles platform-specific installations and configurations so you can easily use FFmpeg in your projects.

This library is installed as a local dependency of your project, not as a system-wide installation.

✨ Features

  • 🔄 Automatic detection of your operating system and architecture
  • 📥 Download FFmpeg binaries optimized for environment
  • 🛠️ Installs FFmpeg, FFplay, and FFprobe locally
  • ✅ Verifies successful installation
  • 🧹 Cleans up unnecessary files after installation

📋 Requirements

  • Python 3.6+
  • Internet connection (for downloading FFmpeg)

🔧 Installation

# Using pip
pip install local-ffmpeg
# Or clone the repository
git clone https://github.com/atsuiyo/local-ffmpeg
cd local-ffmpeg
pip install -e .

💻 Usage

🐍 Python API

from local_ffmpeg import is_installed, install

# Check if FFmpeg is already installed
if not is_installed(path="./custom/path"):
    # Install FFmpeg if not found
    success, message = install(path="./custom/path")
    if success:
        print(message)  # FFmpeg installed successfully
    else:
        print(f"Error: {message}")
else:
    print("FFmpeg is already installed")

🖥️ Command Line Interface

🚀 Install FFmpeg (default path: ./ffmpeg)

python -m local_ffmpeg install

📁 Install FFmpeg to a custom path

python -m local_ffmpeg install --path /custom/path

🔍 Check if FFmpeg is installed (default path: ./ffmpeg)

python -m local_ffmpeg is_installed

🔎 Check if FFmpeg is installed at a custom path

python -m local_ffmpeg is_installed --path /custom/path

ℹ️ Show help information

python -m local_ffmpeg --help

🔍 How It Works

The installer:

  1. 🔍 Detects your operating system and architecture
  2. 📥 Downloads the appropriate FFmpeg build:
    • Windows/Linux: BtbN's GitHub repository (version latest)
    • macOS (Intel & Apple Silicon): osxexperts.net builds (version 7.1)
  3. 📦 Extracts the files to a temporary directory
  4. 📋 Copies the executables to a local directory
  5. 🔒 Makes the executables executable (chmod)
  6. 🧹 Cleans up temporary files

📦 Supported Platforms

  • Windows: 64-bit (win64)
  • Linux:
    • x86_64/amd64
    • aarch64/arm64
  • macOS:
    • x86_64 (Intel) - via osxexperts.net
    • arm64 (Apple Silicon M1/M2) - via osxexperts.net

🗺️ Roadmap

📋 TODO

[ ] Add functionality to install a specified version

✅ Completed

✅ 🍏 Add macOS (OS X) support for direct installation without requiring Homebrew

📢 Important Notes

  • On macOS:
    • Both Intel Macs (x86_64) and Apple Silicon Macs (arm64) use builds from osxexperts.net
    • macOS builds are based on FFmpeg version 7.1
    • The ffmpeg, ffplay, and ffprobe files provided by osxexperts.net are for educational purposes only.
    • If you encounter issues, you can still use brew install ffmpeg as an alternative
    • The installer uses GPL-licensed FFmpeg builds
    • The default installation path is a directory "ffmpeg" in the same location as the script

🔗 Links

Metadata

Release files for local-ffmpeg 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for local-ffmpeg 0.1.4
File Size Uploaded Provenance Actions
local_ffmpeg-0.1.4.tar.gz 31.5 kB Without provenance Details for local_ffmpeg-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for local-ffmpeg 0.1.4
File Interpreter ABI Platform Actions
local_ffmpeg-0.1.4-py3-none-any.whl Python 3 none any Details for local_ffmpeg-0.1.4-py3-none-any.whl

Total release size: 44.1 kB

Release files / local_ffmpeg-0.1.4.tar.gz

Download URL local_ffmpeg-0.1.4.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0404f748142475389aebbc5054b0cfa65ef147edb9b7ff1f2910f1afc4a92cb7
BLAKE2b-256 checksum
How to use checksums
69d777e0e1c14fc1d5249b213ca8985debc5f322f861195e46d6fc406d9b814d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.6

Release files / local_ffmpeg-0.1.4-py3-none-any.whl

Download URL local_ffmpeg-0.1.4-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c18a0f90a4419a79d08910816e1b851605169818e99792f4f5ece7a99ac8957f
BLAKE2b-256 checksum
How to use checksums
8ee2e4098322284dafdf882134f46aed238b158dad5ce2502827bece014ff498
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.6

Security for local-ffmpeg 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page