x264

A free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format.

Latest version: 2024.02.27

Add to xmake.lua

add_requires("x264 2024.02.27")

Learn how to add and link packages with Xmake →

Information

License
GPL-2.0
Recipe updated
2026-09-09T21:35:57.000Z

Platforms

  • wasm: wasm32, wasm64
  • msys: i386, x86_64
  • mingw: i386, x86_64, arm, arm64
  • windows: x86, x64, arm, arm64, arm64ec
  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • harmony: armeabi-v7a, arm64-v8a, x86, x86_64
  • cross: i386, x86_64, arm, armv7, arm64, mips, mips64, mips64el, riscv, riscv64, loong64, s390x, ppc, ppc64, ppc64el, sh4, sparc64
  • android: armeabi, armeabi-v7a, arm64-v8a, riscv64, x86, x86_64, mips, mip64
  • macosx: x86_64, arm64

Options

asm
enable platform-specific assembly optimizations · Type: boolean · Default: true
avs
enable avisynth support · Type: boolean · Default: false
bashcompletion
enable installation of bash-completion script · Type: boolean · Default: false
bit-depth
set output bit depth · Default: all
chroma-format
output chroma format · Default: all
cli
enable cli · Type: boolean · Default: false
ffms
enable ffmpegsource support · Type: boolean · Default: false
gpac
enable gpac support · Type: boolean · Default: false
gpl
enable GPL-only features · Type: boolean · Default: false
interlaced
enable interlaced encoding support · Type: boolean · Default: true
lavf
enable libavformat support · Type: boolean · Default: false
lsmash
enable lsmash support · Type: boolean · Default: false
opencl
enable OpenCL features · Type: boolean · Default: true
swscale
enable swscale support · Type: boolean · Default: false
thread
enable multithreaded encoding · Type: boolean · Default: true
toolchains
Set package toolchains only for cross-compilation.

Versions

  • v2018.09.25
  • v2021.09.29
  • v2023.04.04
  • v2024.02.27

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "x264 2024.02.27"

show info

xrepo info "x264"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("x264 2024.02.27")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("x264")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "x264 2024.02.27" shell