Installation of FFmpeg
First, apply a patch that adds an API necessary for some packages
to build:
patch -Np1 -i ../ffmpeg-7.1.2-chromium_method-1.patch
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-7.1.2 &&
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-7.1.2 &&
install -vDm644 doc/*.txt -t /usr/share/doc/ffmpeg-7.1.2/
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.
--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.
--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.