Skip to content

nix linux.sh

Taner Sener edited this page Jul 28, 2026 · 1 revision

FFmpegKitNext uses these Linux entrypoints:

  • Recommended Nix wrapper: ./nix-linux.sh -p PROFILE [OPTION]... [VAR=VALUE]...
  • Direct script: ./scripts/start-linux.sh [OPTION]... [VAR=VALUE]...

The build options are the same for both entrypoints. The Nix wrapper also supports -p, --profile and --list-profiles.

By default, the Linux build enables only the native architecture of the host machine: x86-64 on x86_64 hosts and arm64 on arm64 hosts. No optional external libraries are enabled by default.

Usage with Nix:

./nix-linux.sh -p <linux-profile> [OPTION]... [VAR=VALUE]...

Usage without Nix:

./scripts/start-linux.sh [OPTION]... [VAR=VALUE]...

Specify environment variables as VARIABLE=VALUE to override default build options.

General Options

Option Description
-h, --help Display help and exit
-v, --version Display version information and exit
-d, --debug Build with debug information
-s, --speed Optimize for speed instead of size
-f, --force Ignore warnings
--jobs=N Number of jobs to run, default is auto
--no-ffmpeg-kit-protocols Disable custom ffkitmem and ffkitstream protocols

Nix Wrapper Options

Option Description
-p PROFILE, --profile PROFILE Nix develop profile to use
--list-profiles List local Nix develop profiles

Licensing Options

Option Description
--enable-gpl Allow building GPL libraries. Created binaries will be licensed under GPL v3.0

Architectures

Option Description
--disable-arm64 Do not build arm64
--disable-x86-64 Do not build x86-64

Linux System Libraries

These options use system development packages found by pkg-config.

--enable-linux-alsa
--enable-linux-fontconfig
--enable-linux-freetype
--enable-linux-fribidi
--enable-linux-gmp
--enable-linux-gnutls
--enable-linux-harfbuzz
--enable-linux-lame
--enable-linux-libass
--enable-linux-libiconv
--enable-linux-libtheora
--enable-linux-libvorbis
--enable-linux-libvpx
--enable-linux-libwebp
--enable-linux-libxml2
--enable-linux-opencl
--enable-linux-opencore-amr
--enable-linux-opus
--enable-linux-sdl
--enable-linux-shine
--enable-linux-snappy
--enable-linux-soxr
--enable-linux-speex
--enable-linux-tesseract
--enable-linux-twolame
--enable-linux-vaapi
--enable-linux-v4l2
--enable-linux-vo-amrwbenc
--enable-linux-zlib

Source-Built External Libraries

These options download and build the matching external library source.

--full
--enable-chromaprint
--enable-dav1d
--enable-kvazaar
--enable-libaom
--enable-libjxl
--enable-liblc3
--enable-libsvtav1
--enable-libilbc
--enable-openh264
--enable-openssl
--enable-srt
--enable-vvenc
--enable-zimg

--full enables all non-GPL Linux and external library options. With --enable-gpl, it also enables GPL libraries.

GPL Libraries

These options require --enable-gpl.

--enable-linux-libvidstab
--enable-linux-rubberband
--enable-linux-x265
--enable-linux-xvidcore
--enable-x264

Custom Libraries

Custom library indexes start at 1 and must be consecutive.

Option Description
--enable-custom-library-[n]-name=value Name of the custom library
--enable-custom-library-[n]-repo=value Git repository of the source code
--enable-custom-library-[n]-repo-commit=value Git commit to download
--enable-custom-library-[n]-repo-tag=value Git tag to download
--enable-custom-library-[n]-package-config-file-name=value Package config file installed by the custom build script
--enable-custom-library-[n]-ffmpeg-enable-flag=value Library name used by FFmpeg configure
--enable-custom-library-[n]-license-file=value License file path relative to the library source folder

Advanced Options

Option Description
--reconf-LIBRARY Run autoreconf before building LIBRARY
--redownload-LIBRARY Download LIBRARY even if it is already downloaded
--rebuild-LIBRARY Build LIBRARY even if it is already built
--skip-LIBRARY Skip LIBRARY during the build
--disable-lib-LIBRARY Disable LIBRARY after enabled-library resolution
--version-LIBRARY=n Override default LIBRARY version
--no-output-redirection Print build output directly instead of redirecting detailed output to build.log
--no-workspace-cleanup-LIBRARY Keep LIBRARY workspace files after the build
--no-link-time-optimization Disable link-time optimization
--extra-cflags=value Append extra C compiler flags
--extra-cxxflags=value Append extra C++ compiler flags
--extra-ldflags=value Append extra linker flags

Clone this wiki locally