FFmpeg-8.0.1

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

### Chapter 22. GS

- Prev

  x265-4.1

- Next

  GStreamer Suite 1.28.1

- Up
- Home

# FFmpeg-8.0.1

## Introduction to FFmpeg

FFmpeg is a solution to record, convert and stream audio and video. It is a very fast video and audio converter and it can also acquire from a live audio/video source. Designed to be intuitive, the command-line interface (ffmpeg) tries to figure out all the parameters, when possible. FFmpeg can also convert from any sample rate to any other, and resize video on the fly with a high quality polyphase filter. FFmpeg can use a Video4Linux compatible video source and any Open Sound System audio source.

- Download: https://ffmpeg.org/releases/ffmpeg-8.0.1.tar.xz

### Additional Downloads

- Required patch: https://www.linuxfromscratch.org/glfs/view/13.0/download/ffmpeg/ffmpeg-8.0.1-chromium_method-1.patch

### FFmpeg Dependencies

Recommended
A complete list of recommended dependencies are in the BLFS FFmpeg page.

For codecs, indevs/outdevs, and connections

- dav1d-1.5.3, fdk-aac-2.0.3, FreeType-2.14.1, LAME-3.100, libaom-3.13.1, libvorbis-1.3.7, libvpx-1.16.0, Opus-1.6.1, SVT-AV1-4.0.1, x264-20250815, x265-4.1, and NASM-3.01

For desktop use

- alsa-lib-1.2.15.3, libva-2.23.0, and sdl2-compat-2.32.64

Optional
A complete list of optional dependencies are in the BLFS FFmpeg page.

For systems with NVIDIA graphics cards

- CUDA (CUDA-13.1.1 or CUDA-13.0.2) and nv-codec-headers-13.0.19.0 (ffnvcodec)

For systems with Intel graphics cards

- Intel-MediaSDK, intel-onevpl, and libvpl

## Installation of FFmpeg

First, apply a patch that adds an API necessary for some packages to build:

    patch -Np1 -i ../ffmpeg-8.0.1-chromium_method-1.patch

Ensure FFmpeg can build against SVT-AV1-4.x or later:

    sed -e '/adaptive/c\ param->aq_mode = 0;' \
      -i libavcodec/libsvtav1.c

Install FFmpeg by running the following commands:

    ./configure --prefix=/usr        \
                --enable-gpl         \
                --enable-version3    \
                --enable-nonfree     \
                --disable-static     \
                --enable-shared      \
                --disable-debug      \
                --enable-libaom      \
                --enable-libdav1d    \
                --enable-libfdk-aac  \
                --enable-libfreetype \
                --enable-libmp3lame  \
                --enable-libopus     \
                --enable-libsvtav1   \
                --enable-libvorbis   \
                --enable-libvpx      \
                --enable-libx264     \
                --enable-libx265     \
                --enable-openssl     \
                --docdir=/usr/share/doc/ffmpeg-8.0.1 &&

    make &&

    gcc tools/qt-faststart.c -o tools/qt-faststart

Now, as the `root` user:

    make install &&

    install -vDm755 tools/qt-faststart -t /usr/bin/ &&
    install -vdm755              /usr/share/doc/ffmpeg-8.0.1 &&
    install -vDm644 doc/*.txt -t /usr/share/doc/ffmpeg-8.0.1/

## lib32 Installation of FFmpeg

Install lib32-FFmpeg by running the following commands:

    make distclean &&
    ./configure --prefix=/usr                             \
                --libdir=/usr/lib32                       \
                --shlibdir=/usr/lib32                     \
                --cc="gcc -m32"                           \
                --pkg-config=i686-pc-linux-gnu-pkg-config \
                --enable-gpl                              \
                --enable-version3                         \
                --enable-nonfree                          \
                --disable-static                          \
                --enable-shared                           \
                --disable-debug                           \
                --enable-libaom                           \
                --enable-libdav1d                         \
                --enable-libfdk-aac                       \
                --enable-libfreetype                      \
                --enable-libmp3lame                       \
                --enable-libopus                          \
                --enable-libsvtav1                        \
                --enable-libvorbis                        \
                --enable-libvpx                           \
                --enable-libx264                          \
                --enable-libx265                          \
                --enable-openssl &&

    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.

`--enable-libfreetype`: Enables Freetype support.

`--enable-gpl`: Enables the use of GPL code and permits support for postprocessing, swscale and many other features.

`--enable-version3`: Enables the use of (L)GPL version 3 code.

`--enable-nonfree`: Enables the use of nonfree code. Note that the resulting libraries and binaries will be unredistributable.

`--disable-static`: This switch prevents installation of static versions of the libraries.

`--enable-shared`: Enables building shared libraries, otherwise only static libraries are built and installed.

`--disable-debug`: Disables building debugging symbols into the programs and libraries.

`--enable-nvenc --enable-nvdec`: These options enable hardware acceleration for NVIDIA GPUs, and depend on the optional dependencies for systems with NVIDIA graphics cards.

`--enable-libmfx`: This option enables hardware acceleration for Intel GPUs from Broadwell to Tiger Lake, and it depends on the optional dependencies for systems with Intel graphics cards. Cannot be used with `--enable-libvpl`.

`--enable-libvpl`: This option enables hardware acceleration for Intel GPUs from Tiger Lake onwards, including the discrete graphics cards. It depends on the optional dependencies for systems with Intel graphics cards. Cannot be used with `--enable-libmfx`.

`--enable-gnutls`: Use this option instead of `--enable-openssl`, if you want to use GnuTLS instead of OpenSSL for HTTPS protocol.

`--disable-doc`: Disables building html documentation. This is only needed if doxygen is installed and you do not want to build the html documentation.

gcc tools/qt-faststart.c -o tools/qt-faststart: This builds the qt-faststart program which can modify QuickTime formatted movies (`.mov` or `.mp4`) so that the header information is located at the beginning of the file instead of the end. This allows the movie file to begin playing before the entire file has been downloaded.

### Note

Support for some of the dependency packages requires using options passed to the configure script. View the output from ./configure --help for complete information about enabling dependency packages.

## Contents

Installed Programs: ffmpeg, ffplay, ffprobe, and qt-faststart
Installed Libraries: libavcodec, libavdevice, libavfilter, libavformat, libavutil, libpostproc, libswresample, and libswscale
Installed Directories: /usr/include/libav{codec,device,filter,format,util}, /usr/include/libpostproc, /usr/include/libsw{resample,scale}, /usr/share/doc/ffmpeg-8.0.1, and /usr/share/ffmpeg

### Short Descriptions

ffmpeg | is a command-line tool to convert video files, network streams and input from a TV card to several video formats
ffplay | is a very simple and portable media player using the `ffmpeg` libraries and the SDL library
ffprobe | gathers information from multimedia streams and prints it in a human and machine-readable fashion
qt-faststart | moves the index file to the front of quicktime (mov/mp4) videos
`libavcodec` | is a library containing the FFmpeg codecs (both encoding and decoding)
`libavdevice` | is the FFmpeg device handling library
`libavfilter` | is a library of filters that can alter video or audio between the decoder and the encoder (or output)
`libavformat` | is a library containing the file formats handling (mux and demux code for several formats) used by ffplay as well as allowing the generation of audio or video streams
`libavresample` | is a library containing functions for resampling audio and video.
`libavutil` | is the FFmpeg utility library
`libpostproc` | is the FFmpeg post processing library
`libswresample` | is the FFmpeg audio rescaling library, it contains functions for converting audio sample formats
`libswscale` | is the FFmpeg image rescaling library

- Prev

  x265-4.1

- Next

  GStreamer Suite 1.28.1

- Up
- Home