x264-20250815

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 22. GS

- Prev

  libvpx-1.16.0

- Next

  x265-4.1

- Up
- Home

# x264-20250815

## Introduction to x264

x264 package provides a library for encoding video streams into the H.264/MPEG-4 AVC format.

- Download: https://anduin.linuxfromscratch.org/BLFS/x264/x264-20250815.tar.xz

### x264 Dependencies

Recommended
NASM-3.01
Optional
ffms2, gpac or liblsmash

## Installation of x264

Install x264 by running the following commands:

    ./configure --prefix=/usr \
                --enable-shared \
                --disable-cli &&

    make

Now, as the `root` user:

    make install

## lib32 Installation of x264

Install lib32-x264 by running the following commands:

    make distclean &&
    CC="gcc -m32" CXX="g++ -m32"         \
    PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
    ./configure --prefix=/usr            \
                --libdir=/usr/lib32      \
                --host=i686-pc-linux-gnu \
                --enable-shared          \
                --disable-cli &&

    make

Now, as the `root` user:

    make DESTDIR=$PWD/DESTDIR install     &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Run ./configure --help for a full list of options.

`--disable-cli`: This switch disables building the command-line encoder which is redundant since it requires FFmpeg for most of the input formats.

`--disable-asm`: Use this switch if you didn't install NASM.

## Contents

Installed Programs: None
Installed Library: libx264
Installed Directory: None

### Short Descriptions

`libx264` | provides the functions used to encode video streams into the H.264/MPEG-4 AVC format

- Prev

  libvpx-1.16.0

- Next

  x265-4.1

- Up
- Home