Installing dependencies on Alpine

The following instructions are for Alpine 3.24.

Basic requirements to run commands:

Dependencies:

Additional dependencies not available in the base repository:

Dolby Vision dependencies (optional):

Intel Quick Sync Video and VAAPI dependencies (optional):

Nvidia NVENC/NVDEC dependencies (optional):

Graphical interface dependencies:

Install dependencies.

sudo apk add autoconf automake build-base busybox cmake freetype-dev fribidi-dev git harfbuzz-dev jansson-dev lame-dev libass-dev libjpeg-turbo-dev libogg-dev libtheora-dev libtool libunwind-static libvorbis-dev libxml2-dev m4 meson nasm ninja numactl-dev opus-dev pkgconf python3 speex-dev tar x264-dev

Enable the Alpine community repository and install related additional dependencies.

sudo setup-apkrepos -c
sudo apk add libass-dev libvpx-dev x264-dev

To build with Dolby Vision support, install the Rust dependencies.

sudo apk add openssl-libs-static rustup zlib-static
rustup-init -y && source "${HOME}/.cargo/env"
rustup toolchain install "stable-$(uname -m)-unknown-linux-musl"
rustup default "stable-$(uname -m)-unknown-linux-musl"
cargo install cargo-c

To build with Intel Quick Sync Video and VAAPI support, install the VAAPI dependencies.

sudo apk add libva-dev libdrm-dev

To build with Nvidia NVENC/NVDEC support, install the CUDA LLVM toolchain dependencies.

sudo apt-get install clang22 llvm22

To build the GTK GUI, install the graphical interface dependencies.

sudo apk add desktop-file-utils gst-libav gst-plugins-base-dev gst-plugins-good gtk4.0-dev

Alpine is now prepared to build HandBrake. See Building HandBrake for Linux for further instructions.