Building HandBrake for Linux
If you have installed a HandBrake package from your distribution or other third-party package repository, please remove it before proceeding. See the section, Warning about broken third-party builds on Where to get HandBrake for more information.
Installing dependencies
Dependency installation instructions are available for the following distributions.
Building HandBrake
Clone the HandBrake repository.
git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake
You can enable or disable various HandBrake features via additional configure parameters. The following is a short list of common parameters; see ./configure --help for a complete list.
| Parameter | Description |
|---|---|
| –enable-fdk-aac | Enable FDK-AAC audio encoder1 |
| –enable-nvenc | Enable Nvidia NVENC video encoder |
| –enable-nvdec | Enable Nvidia NVDEC video decoder |
| –enable-vaapi | Enable VAAPI video encoder/decoder |
| –enable-qsv | Enable Intel Quick Sync Video encoder/decoder |
| –enable-vce | Enable AMD VCN video encoder |
| –enable-amfdec | Enable AMD VCN video decoder |
| –enable-libdovi | Enable libdovi for Dolby Vision HDR support |
| –disable-gtk | Disable the GTK graphical interface; only build HandBrakeCLI |
Build HandBrake. Append any desired configure parameters to this command.
./configure --launch-jobs=$(nproc) --launch
When building completes successfully, these important artifacts are produced:
HandBrakeCLIin thebuilddirectory, which is the HandBrake command line interface.ghbin thebuild/gtk/srcdirectory, which is the HandBrake GUI for Linux. It will not exist if you disabled the graphical interface by configuring with--disable-gtk.
Install HandBrake (optional). When installing the graphical interface, icon and desktop files for the Applications menu are also installed.
sudo make --directory=build install
To uninstall HandBrake, run the following.
sudo make --directory=build uninstall
Troubleshooting
If building HandBrake fails, continue building as much as possible, then build serially (only one job at a time) and investigate any errors printed at the end.
make --directory=build --jobs=$(nproc) --keep-going || make --directory=build --jobs=1
Build failures are often due to missing dependencies. Ensure you have followed all of the above instructions for installing dependencies.
To start over, simply remove the build directory.
rm -rf build
If you still have issues, someone may be able to help via HandBrake’s Community support channels.
- The FDK AAC encoder is only provided in source code form and is not fully compatible with the GNU General Public License Version 2 used by HandBrake. Builds including FDK AAC must be for personal use only and may not be distributed. Do not share the build product with others.↩