Skip to content

srwareham/docker-ffmpeg-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker ffmpeg Compiler

Docker ffmpeg Compiler is a zero-set-up solution to install a fully featured ffmpeg binary on your linux system. If you want to cut right to the chase and install ffmpeg and ffprobe, all at once, simply:

bash -c "$(wget https://raw.githubusercontent.com/srwareham/docker-ffmpeg-compiler/master/install.sh -O -)"

or

bash -c "$(curl -fsSL https://raw.githubusercontent.com/srwareham/docker-ffmpeg-compiler/master/install.sh)"

The above downloads and executes a script that:

  1. Downloads a Dockerfile
  2. Build a Docker image, which itself compiles all codecs and ffmpeg (warning, this takes a while)
  3. Copies static binaries for ffmpeg and ffprobe to a subfolder in the current working directory (with the uid / gid of the calling user)
  4. Deletes the ~1.2GB Docker image used to compile
  5. Leaves behind only the two static binaries mentioned above (each ~32MB)

Codecs and Features

Video

Audio

Other

Dependencies

  • Docker: installation instructions
  • The install script assumes you have set up docker to be run with non-root access. If you would rather not configure this, simply download the install.sh script and execute it as root (you'll then need to manually chown the binaries to that of your user account)

Why Use Docker ffmpeg Compiler?

ffmpeg and many of its constituent components use the GPL license. With only these features enabled, ffmpeg can be distributed in binary form. The problem becomes that many of its most desired codecs do not use a license that is compatible with the GPL, which means a "fully featured" ffmpeg cannot be distributed in binary form. If you have googled around to try to find such a binary distribution, you've almost certainly stumbled across the response: "build it yourself."

Docker ffmpeg Compiler steps in to do this for you! Rather than distribute a compiled version of ffmpeg, Docker Ffmpeg Compiler contains instructions to fetch and compile the source code for ffmpeg and the most popular codecs--no binaries distributed, all licenses respected.

Main Benefits

  1. Beginner friendly: With Docker Ffmpeg Compiler, no compilation experience is necessary, you simply run one script and you get the ffmpeg version you want!
  2. Ease of use: Even if you have experience compiling, finding the source for all the codecs, configuring their compilation with the right flags, and then compiling ffmpeg with all the right flags is a pain
  3. No clutter: The large number files downloaded and compiled for building ffmpeg are restricted to a docker namespace
  4. Significant size savings: The above files used to compile ffmpeg end up requiring ~1.2 GB. Using Docker Ffmpeg Compiler allows you to restore this space quickly and easily
  5. Portablity: You can run this code on any linux distribution with docker and it will work. If for some reason the static binary does not work on your system, you can always fire up another docker container to hold the binary and use it to do any encoding

Contributing

Contributions are welcome! If you would like to add a feature, improve this README, or improve existing code submit a pull request!

About

A docker container to compile ffmpeg and save a static linux binary to the host system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published