Installation for the Linux users

First install the FFmpeg package using either Homebrew or a binary build. Then test that the software is properly installed. (The compilation from the source code is out of the scope of this tutorial.)

Installing the software with Homebrew


Install Homebrew, a package manger originally designed for macOS, that works now under Linux as well (and actually supersedes Linuxbrew). You can install Homebrew by pasting the following command at a Terminal prompt:


sh -c "$(curl -fsSL"


Then add to your configurations file for the terminal sessions (which is usually ~/.bashrc or .zshrc) the following three lines:


echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"' >> ~/.bashrc


echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >> ~/.bashrc


echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >> ~/.bashrc


After successful installation you should restart the Terminal and execute:


brew doctor


Detailed instructions for Homebrew are posted at:


Once Homebrew is installed, for our purpose, we recommend building FFmpeg with the two commands:1


brew tap varenc/ffmpeg
brew install varenc/ffmpeg/ffmpeg --with-openjpeg --with-rubberband --with-tesseract


As, sadly, the «America only» ideology becomes predominant in the open source community as well, if you need the support of more languages than just English, then you have to run an additional command:


brew install tesseract-lang

Installing the software from a build

Please follow the instructions given at:

Testing your installation

Once you followed the installation above, you should have the commands ffmpeg, ffplay and ffprobe installed.


Test ffmpeg by pasting into the Terminal the line:


ffmpeg -f lavfi -i mandelbrot -t 10 -pix_fmt yuv420p ~/Desktop/mandelbrot.mkv


This should produce on your Desktop a file of the Mandelbrot pattern.


Test ffplay by pasting into the Terminal the line:


ffplay ~/Desktop/mandelbrot.mkv


This should play the Mandelbrot file.


Test ffprobe by pasting into the Terminal the line:


ffprobe -show_format -show_streams -print_format json ~/Desktop/mandelbrot.mkv


This should display the Mandelbrot file’s technical metadata.



The recommended parameters are:

Enables JPEG 2000 encoding and decoding with the OpenJPEG library.
Enables the Rubberband audio filter, which allows time-stretching and pitch-shifting.
Enables the Tesseract video filter for optical character recognition, e.g. for extracting intertitles or subtitles.

Additional information about this formula are available on Chris Varenhorst’s GitHub repository.

To see the available options paste into the Terminal the line:


brew options varenc/ffmpeg/ffmpeg


Additional information about this formula are available on Chris Varenhorst’s GitHub repository.