Skip to main content

FFmpeg Release Build Downloader

Project description

PyPI PyPI - Status PyPI - Python Version GitHub License GitHub Workflow Status

Python ffmpeg-downloader package automatically downloads the latest FFmpeg prebuilt binaries for Windows, Linux, & MacOS. It’s cli interface mimics that of pip to install, uninstall, list, search, and download available FFmpeg versions. This package is ideal for those who:

  • Use the git snapshot version of FFmpeg

  • Are in Windows environment

Those who intend to use a release version in Linux and MacOS are encouraged to install via the OS package manager (e.g., apt-get for Ubuntu and brew for MacOS).

The FFmpeg builds will be downloaded from 3rd party hosts:

Windows

https://www.gyan.dev/ffmpeg/builds

Linux

https://johnvansickle.com/ffmpeg

MacOS

https://evermeet.cx/ffmpeg

If you appreciate their effort to build and host these builds, please consider donating on their websites.

Installation

pip install ffmpeg-downloader

Console Commands

In cli, use ffdl command after the package is installed. Alternately, you can call the module by python -m ffmpeg_downloader. For full help, run:

ffdl -h <command>

To download and install FFmpeg binaries

ffdl install

This command downloads and installs the latest FFmpeg release. You will see the progress messages similar to the following:

Collecting ffmpeg
  Using cached ffmpeg-5.1.2-essentials_build.zip (79 MB)
Installing collected FFmpeg binaries: 5.1.2@essentials
Successfully installed FFmpeg binaries: 5.1.2@essentials in
  C:\Users\User\AppData\Local\ffmpegio\ffmpeg-downloader\ffmpeg\bin

In Linux, symlinks fo the installed binaries are automatically created in ~/.local/bin or ~/bin so the FFmpeg commands are immediately available (only if one of these directories already exists).

In Windows and MacOS, the binary folder can be added to the system path by –add-path option:

ffdl install --add-path

The new system paths won’t be applied to the current console window. You may need to close and reopen or possibly log out and log back in for the change to take effect.

To install the latest git master snapshot build:

ffdl install snapshot

To list or search available release versions:

Use list and search commands.

ffdl list     # lists all available releases

ffdl search 5 # lists all v5 releases

To specify a release version:

Add version number as the last argument of the command:

ffdl install 4.4

Additionally, there are multiple options for each build for the Windows builds:

essentials

Built only with commonly used third-party libraries (default option)

full

Built with the most third-party libraries

full-shared

Same as full but separate shared libraries (DLLs) and development files (release builds only)

Visit gyan.dev for more information. To specify which flavor to install, use @

ffdl install snapshot@full   # full build of latest snapshot
ffdl install 5.2@full-shared # full build of v5.2

To update or change version if available

Like pip, use -U or --upgrade flag

ffdl install -U

To uninstall

ffdl uninstall

In Python

This package has the following useful attributes:

import ffmpeg_downloader as ffdl

ffdl.ffmpeg_dir     # FFmpeg binaries directory
ffdl.ffmpeg_version # version string of the intalled FFmpeg
ffdl.ffmpeg_path    # full path of the FFmpeg binary
ffdl.ffprobe_path   # full path of the FFprobe binary
ffdl.ffplay_path    # full path of the FFplay binary

The ffxxx_path attributes are useful to call FFxxx command with subprocess:

# To call FFmpeg via subprocess
import subprocess as sp

sp.run([ffdl.ffmpeg_path, '-i', 'input.mp4', 'output.mkv'])

Meanwhile, there are many FFmpeg wrapper packages which do not let you specify the FFmpeg path or cumbersome to do so. If installing the FFmpeg with --add-path option is not preferable, use ffmpeg_downloader.add_path() function to make the binaries available to these packages.

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

ffmpeg_downloader-0.3.0.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

ffmpeg_downloader-0.3.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file ffmpeg_downloader-0.3.0.tar.gz.

File metadata

  • Download URL: ffmpeg_downloader-0.3.0.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for ffmpeg_downloader-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b1f9d1fccfe6c492678adacd1f82d566273a751faf1427501dadd6b89a401bd1
MD5 6e634ee919c1168ab3cc4a314ebda148
BLAKE2b-256 8dd36857e5b8212244be739d78eb8459646c0ab49a83e54b2dd3259ee2abe37d

See more details on using hashes here.

File details

Details for the file ffmpeg_downloader-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ffmpeg_downloader-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4661f3cd961326c00c3425684c733e7e9b286173a5aa6986884b4e231b3b738f
MD5 8a90a16157f03b1cca0144b576e11043
BLAKE2b-256 43fb376ddcc5048b1f61867595f0fd40a207f7008cb91c2e7ffdf4553f4047aa

See more details on using hashes here.

Supported by

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