一、安裝依賴
1.1 安裝tiff、png、gif等依賴
dnf -y install automake autoconf libtool make gcc gcc-c++
dnf --enablerepo=PowerTools -y install giflib-devel
dnf --enablerepo=PowerTools -y install libexif-devel
dnf -y install bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel cairo-devel fribidi-devel
1.2 安裝yasm (原始碼編譯安裝)
cd /tmp
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install
1.3 安裝nasm(原始碼編譯安裝)
cd /tmp
wget https://www.nasm.us/pub/nasm/releasebuilds/2.15/nasm-2.15.tar.gz
tar xvf nasm-2.15.tar.gz
cd nasm-2.15
./configure
make
make install
1.4 安裝libx264(原始碼編譯安裝) H264編碼器
cd /tmp
yum install git (可選)
git clone https://code.videolan.org/videolan/x264.git
cd x264
./configure --enable-shared
make
make install
1.5 安裝 libmp3lame(原始碼編譯安裝) mp3編碼器
cd /tmp
wget https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
tar zxvf lame-3.100.tar.gz
cd lame-3.100
./configure --enable-shared
make
make install
1.6安裝圖形庫
cd /tmp
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus0-6.0.5.tar.gz
tar zxvf libgdiplus0-6.0.5.tar.gz
cd libgdiplus-6.0.5
./configure
make
make install
1.7 更新
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
二、安裝ffmpeg
cd /tmp
wget http://ffmpeg.org/releases/ffmpeg-4.3.1.tar.gz
tar zxvf ffmpeg-4.3.1.tar.gz
cd ffmpeg-4.3.1
./configure --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-openssl --enable-nonfree
make
make install
三、測試
ffmpeg
四、常見問題
[error while loading shared libraries: libx264.so.138: cannot open shared object file: No search File]
blog.csdn.net/ai2000ai/article/det...
www.cnblogs.com/blackhumour2018/p/...
本作品採用《CC 協議》,轉載必須註明作者和本文連結