Linux編譯FFMPEG+X264
阿新 • • 發佈:2018-11-14
注意
以下每一步都安裝後都需要配置bash_profile裡面
PATH=$PATH:$HOME/bin PATH=$PATH:/usr/local/lib/xxx/bin
xvid可以略過 犧牲效能
yasm:
git clone git://github.com/yasm/yasm.gitcd yasm ./autogen.sh ./configure --perfix=/home/video/usr/loca/yasm make make install
xvid:
wget http://downloads.xvid.org/downloads/xvidcore-1.1.0.tar.gztar zvxf xvidcore-1.1.0.tar.gz cd xvidcore-1.1.0/build/generic ./configure --prefix=/home/video/usr/loca/xvid make make install
x264
http://download.videolan.org/x264/snapshots/ 下載
x264-snapshot-20151208-2245.tar.bz2
tar -xjf x264-snapshot-20151208-2245.tar.bz2 ./configure --prefix=/home/video/usr/local/x264 --enable-shared --enable-static --enable-yasm make make install
ffmpeg
http://www.ffmpeg.org/download.html
xz -d ffmpeg.tar.sz tar -xvf ***.tar ./configure --prefix=/home/video/usr/local/ffmpeg --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay --enable-shared --extra-cflags=-I/home/video/usr/local/x264/include --extra-ldflags=-L/home/video/usr/local/x264/lib --extra-cflags=-I/home/video/usr/local/lame/include --extra-ldflags=-L/home/video/usr/local/lame/lib --extra-cflags=-I/home/video/usr/local/xvid/include --extra-ldflags=-L/home/video/usr/local/xvid/lib make make install