LINUX FFMPEG編譯詳細過程記錄(最全)


前言
  凡是用到視頻音頻的地方,都用到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
————————————————
版權聲明:本文為CSDN博主「柳鯤鵬」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/quantum7/article/details/104460115/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM