Article directory
1. Download the source code
Download the source code from the official website https://ffmpeg.org/download.html
2. Option Description
--disable-static
: Disable building static libraries, closed by default (that is, static libraries are built by default)--enable-shared
:Build dynamic library, closed by default (that is, dynamic library will not be built by default).--disable-x86asm
--enable-gpl
--enable-frei0r
--enable-ladspa
--enable-libbs2b
--enable-libcaca
--enable-libplacebo
--enable-librtmp
--enable-libv4l2
--enable-libwebp
--enable-libx264
--enable-libx265
--enable-libxavs
--enable-libxavs2
3. Dependency libraries
Dependent libraries that need to be installed to compile ffmpeg:
apt install libaacs0 libass9 libavcodec57 libavdevice57 libavfilter6 libavformat57 libavresample3 libavutil55
apt install libbdplus0 libbluray2 libbs2b0 libcdio-cdda2 libcdio-paranoia2 libchromaprint1 libcrystalhd3 libdc1394-22 libflite1 libgme0 libgsm1 libmysofa0 libnorm1
apt install libopenal-data libopenal1 libopenjp2-7 libopenmpt0 libpgm-5.2-0 libpostproc54 librubberband2 libshine3 libsnappy1v5 libsodium23 libsoxr0 libssh-gcrypt-4 libswresample2 libswscale4
apt install libvdpau1 libx265-146 libxvidcore4 libzmq5 libzvbi-common libzvbi0 mesa-vdpau-drivers vdpau-driver-all
4. Compile and install
After unzipping, enter the source code directory ffmpeg-6.0
and execute:
./configure \
--disable-static \
--enable-shared \
--disable-x86asm \
--enable-gpl \
--enable-frei0r \
--enable-ladspa \
--enable-libbs2b \
--enable-libcaca \
--enable-libplacebo \
--enable-librtmp \
--enable-libv4l2 \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
--enable-libxavs \
--enable-libxavs2 \
--prefix=/opt/ffmpeg-6.0-ubuntu-x64
Finally compile and install
sudo make
sudo make install