- 前言
凡是用到视频音频的地方,都用到ffmpeg。根据用到的CODEC不同,编译有很大差异。吾有两个初等、中午编译的博文,这个是全编译博文。
全编译有什么好处?把库打包之后,可以直接在别的机器上使用。
备份建议:编译后把整个编译目录打包备份;使用虚拟机编译,然后备份。
- 准备工作
apt update apt install gcc make cmake apt install autoconf subversion git wget g++ pkg-config # libtool libtool libogg-devel nasm apt install autopoint
- 下载编译libtool
https://blog.csdn.net/quantum7/article/details/104086313
- 下载编译OpenAL
https://blog.csdn.net/quantum7/article/details/104136755
- 下载编译openh264
https://blog.csdn.net/quantum7/article/details/104087760
- 下载编译x264
https://blog.csdn.net/quantum7/article/details/104087603
- 下载编译x265
https://blog.csdn.net/quantum7/article/details/104040399
- 下载编译iLBC
https://blog.csdn.net/quantum7/article/details/104087424
- 下载编译g729
https://blog.csdn.net/quantum7/article/details/104087356
- 下载编译libgsm
https://blog.csdn.net/quantum7/article/details/104087285
- 下载编译opencore-amr
https://blog.csdn.net/quantum7/article/details/104087232
- 下载编译vo-amrwbenc
https://blog.csdn.net/quantum7/article/details/104087266
- 下载编译libopus
https://blog.csdn.net/quantum7/article/details/104087104
- 下载编译libyuv
https://blog.csdn.net/quantum7/article/details/104086985
- 下载编译libvpx
https://blog.csdn.net/quantum7/article/details/104086885
- 载编译Which
https://blog.csdn.net/quantum7/article/details/104086868
- 下载编译YASM
https://blog.csdn.net/quantum7/article/details/104086713
- (字体相关)下载编译libfreetype
https://blog.csdn.net/quantum7/article/details/102716352
- (字体相关)下载编译FriBidi
https://blog.csdn.net/quantum7/article/details/104136580
- (字体相关)下载编译libxml2
https://blog.csdn.net/quantum7/article/details/104484634
- (字体相关)下载编译gperf
https://blog.csdn.net/quantum7/article/details/104485237
- (字体相关)下载编译fontconfig
https://blog.csdn.net/quantum7/article/details/104484257
- (字体相关)下载libass
https://blog.csdn.net/quantum7/article/details/104136630
- 下载编译faac
https://blog.csdn.net/quantum7/article/details/104136411
- 下载编译zlib
https://blog.csdn.net/quantum7/article/details/104486417
- 下载编译libpng
https://blog.csdn.net/quantum7/article/details/104173294
- 下载编译jpeglib
https://blog.csdn.net/quantum7/article/details/82459960
- 下载编译SDL2
https://blog.csdn.net/quantum7/article/details/104173159
- 下载编译vorbis
https://blog.csdn.net/quantum7/article/details/104135601
- 下载编译libogg
https://blog.csdn.net/quantum7/article/details/104086366
- 下载编译theora
https://blog.csdn.net/quantum7/article/details/104135650
- 下载编译libspeex/libspeexdsp
https://blog.csdn.net/quantum7/article/details/104086849
- 下载编译nasm
https://blog.csdn.net/quantum7/article/details/104086464
- 下载编译lame
https://blog.csdn.net/quantum7/article/details/104178587
- 下载编译ffmpeg
http://ffmpeg.org/download.html
BUILD_LIBS=${HOME}/build_libs ./configure \ --prefix=${BUILD_LIBS} \ --extra-cflags="-fPIC" \ --extra-cflags="-I${BUILD_LIBS}/include" \ --extra-ldflags="-L${BUILD_LIBS}/lib" \ --bindir="${BUILD_LIBS}/bin" \ --enable-pic --enable-pthreads \ --enable-shared --disable-static \ --disable-network --enable-pthreads \ --disable-ffmpeg --disable-ffplay --disable-ffprobe \ --enable-gpl --enable-nonfree \ --enable-libx264 --enable-encoder=libx264 --enable-decoder=h264 \ --disable-debug # ./configure --pkg-config-flags="--static" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree # --enable-memalign-hack # --disable-ffserver make make install cp libavfilter/motion_estimation.h ${BUILD_LIBS}/include/libavfilter