1、依賴子產品
下載下傳編譯yasm
http://yasm.tortall.net/Download.html
tar xf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure --prefix=/usr/local/
make
make install
下載下傳編譯nasm
https://www.nasm.us/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
https://downloads.sourceforge.net/opencore-amr/fdk-aac-2.0.1.tar.gz
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
2、linux下編譯ffmpeg+x264+fdk-aac
1、 install nasm yasm libx264 libfdk_aac
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 \
--disable-debug \
--disable-vaapi
4、find the libs in path as /usr/local/lib ,include in path as /usr/local/include