1、依赖模块
下载编译yasm
Download - The Yasm Modular Assembler Project
tar xf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure --prefix=/usr/local/
make
make install
下载编译nasm
Index of /pub/nasm/releasebuilds
tar xf nasm-2.14.02.tar.bz2
cd nasm-2.14.02/
./configure --prefix=/usr/local/
make
make install
下载编译x264
git clone https://code.videolan.org/videolan/x264/-/tree/stable
cd x264/
./configure --prefix=/usr/local/ --enable-shared --enable-pic
make
make install
下载编译faac
Download opencore-amr from SourceForge.net
tar xf fdk-aac-2.0.1.tar.gz
cd fdk-aac-2.0.1/
./autogen.sh
autoreconf -fiv
./configure --prefix=/usr/local/
make
make install
下载zlib(png相关)
-
./configure
-
make
-
make install
下载freetype(drawtext相关)
-
# 注意不要运行 autogen.sh
-
./configure --prefix=${BUILD_LIBS}
-
make
-
make install
2、linux下编译ffmpeg+x264+fdk-aac
1、install nasm yasm libx264 libfdk_aac libfreetype2 zlib
guider link:https://blog.csdn.net/quantum7/article/details/104460115/
2、download ffmpeg by commd:git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
3、cd ffmpeg and do the command as follows
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
./configure \
--extra-cflags="-fPIC" \
--enable-pic --enable-pthreads \
--enable-shared \
--enable-gpl --enable-nonfree \
--enable-libx264 \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-zlib \
--disable-debug \
--disable-vaapi
4、find the libs in path as /usr/local/lib(headers in /usr/local/include)