Deep in Debian Linux install ffmpeg

Keywords: C++ sudo cmake git vim

Installing CMake and CCMake

sudo apt install cmake
sudo apt install cmake-curses-gui

Install X265 development library

sudo apt-get install libx265-dev

Install Yasm

Download address:
tar -xvf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
make && make install

Install OpenCoreAMR

Download address:
tar -xvf fdk-aac-2.0.0.tar.gz
cd fdk-aac-2.0.0/
make && make install

Install speex

Download address:
cd speex-1.2.0/
make && make install

Install lame

Download address:
tar -xvf lame-3.99.5.tar.gz
cd lame-3.99.5/
make && make install

Install nasm

sudo apt install nasm

Installing the X264 development library

Download address:
tar -xvf last_x264.tar.bz2 
cd x264-snapshot-20190120-2245/
./configure --enable-shared
make && make install

Install X265 development library

Download address:
tar -xvf x265_2.9.tar.gz
cd x265_2.9/build/linux/
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make && make install

Install X11 development library

sudo apt-get install libx11-dev
sudo apt-get install xorg-dev

Install audio library

sudo apt-get install libasound2-dev

Refresh Library

sudo ldconfig

Install SDL development library

Download address:
~$ tar -xvf SDL-2.0.9-12569.tar.gz
~$ cd SDL-2.0.9-12569/
~$ ./configure
~$ make && make install

Refresh Library

sudo ldconfig

Download ffmpeg

git clone

To configure

./configure \
--prefix=/home/niko/Applications/ffmpeg \
--enable-gpl \
--enable-nonfree \
--enable-libfdk-aac \
--enable-libx264 \
--enable-libx265 \
--enable-filter=delogo \
--enable-debug \
--disable-optimizations \
--enable-libspeex \
--enable-shared \
--enable-pthreads \
--enable-version3 \
--enable-hardcoded-tables \
--cc=gcc \
--host-cflags= \
--host-ldflags= \

Confirm ffbuild/config.mak file

~$ vim ffbuild/config.mak
Command mode input: ` ` CONFIG_FFPLAY ` ` to search
 If 'CONFIG_FFPLAY=yes', ffplay player will be installed along with compilation and installation

Compilation and installation

make -j 4  # Use 4 threads to compile at the same time to speed up compilation

After completion, the following words were found:

STRIP   ffprobe
STRIP   ffplay
STRIP   ffmpeg

It means that ffprobe, ffplay and ffmpeg will be installed

make  install

Modify Library Directory

sudo vim /etc/
//Add: / home/niko/Applications/ffmpeg/lib
sudo ldconfig

Add to environment variable

cd ~
vim .bashrc
//Add to:
export FFMPEG_HOME=/home/Applications/ffmpeg
source .bashrc

Refresh Library

sudo ldconfig


 ffmpeg -version
 ffplay -version

Posted by dlgilbert on Mon, 02 Dec 2019 14:23:04 -0800