Skip to content

Building Linux

Taner Sener edited this page Jul 28, 2026 · 2 revisions

FFmpegKitNext for Linux can be built with the recommended Nix wrapper or by calling the direct Linux build script.

Before building, review Linux Prerequisites. For the full Linux option reference, see nix-linux.sh.

Build With Nix

Use the Nix wrapper for normal builds, CI builds and reproducible host environments.

./nix-linux.sh --list-profiles
./nix-linux.sh -p <linux-profile>

The Linux profile name is generated from the host glibc version and is printed by --list-profiles. The wrapper enters the selected Nix profile and then calls scripts/start-linux.sh inside that environment.

Build Without Nix

If you maintain the compiler toolchain and host tools yourself, call the direct script from the project root:

./scripts/start-linux.sh

The direct script uses the environment described in Linux Prerequisites.

Build Options

The same Linux build options can be passed to both commands. For example:

./nix-linux.sh -p <linux-profile> --enable-libjxl --enable-linux-fontconfig
./scripts/start-linux.sh --enable-libjxl --enable-linux-fontconfig

Use --enable-gpl when enabling GPL-licensed libraries such as x264, linux-x265, linux-xvidcore, linux-libvidstab or linux-rubberband.

The complete option list is documented in nix-linux.sh.

Build Flow

The Linux build has three phases:

  1. Download FFmpeg, RapidJSON and enabled external-library sources when they are not already available locally.
  2. Build FFmpeg, FFmpegKitNext and enabled source-built external libraries for the native Linux host architecture, either x86_64 or arm64.
  3. Create a Linux bundle containing headers, shared libraries and pkg-config files.

Build Output

Build outputs are written under prebuilt.

The Linux bundle is created under:

prebuilt/bundle-linux/ffmpeg-kit-next/
  include/
  lib/
  pkgconfig/

Use the generated headers, shared libraries and pkg-config files from this folder in your Linux application or package build.

Clone this wiki locally