Centos7 0下編譯安裝FFmpeg4 0 2

2021-09-02 21:51:48 字數 4049 閱讀 4537

編譯環境:

centos 7.0

廢話不多少,下面是具體的編譯步驟

先安裝yasm-1.2.0.tar.gz

tar zxvf yasm-1.2.0.tar.gz

cd yasm-1.2.0

./configure --prefix=/usr/local/bin/yasm path=$path:/usr/local/bin/yasm/bin

make && make install

--------------------------------------

sdl2-2.0.8.tar.gz

tar -zxvf sdl2-2.0.8.tar.gz

./configure --prefix=/usr/local --enable-shared

make && make install

--------------------------------------

安裝解碼器

lame-3.99.5.tar.gz

tar zxvf lame-3.99.5.tar.gz

cd lame-3.99.5

./configure --enable-shared --prefix=/usr/local

make && make install

--------------------------------------

libogg-1.1.3.tar.gz

tar zxvf libogg-1.1.3.tar.gz

cd libogg-1.1.3

./configure --prefix=/usr/local

make && make install

--------------------------------------

libvorbis-1.3.6.tar.xz

tar -xvjf libvorbis-1.3.6.tar.xz

cd libvorbis-1.3.6

./configure --prefix=/usr/local

make && make install

--------------------------------------

xvidcore-1.1.3.tar.gz

tar zxvf xvidcore-1.1.3.tar.gz

cd xvidcore-1.1.3/build/generic

./configure --prefix=/usr/local

make && make install

--------------------------------------

last_x264.tar.bz2

tar jxvf last_x264.tar.bz2

cd x264-snapshot-20141105-2245

./configure --prefix=/usr/local --enable-shared --disable-asm

make && make install

--------------------------------------

libdca-0.0.2.tar.gz

tar zxvf libdca-0.0.2.tar.gz

cd libdts-0.0.2

./configure --prefix=/usr/local

make && make install

--------------------------------------

a52dec-0.7.4.tar.gz

tar zxvf a52dec-0.7.4.tar.gz

cd a52dec-0.7.4

./configure --prefix=/usr/local

make && make install

--------------------------------------

faad2-2.7.tar.gz

tar zxvf faad2-2.7.tar.gz

cd faad2-2.7

autoreconf -vif

./configure --prefix=/usr/local --with-mp4v2 --enable-shared

make && make install

--------------------------------------

faac-1.28.tar.gz

tar zxvf faac-1.28.tar.gz

cd faac-1.28

./bootstrap

./configure --prefix=/usr/local

make && make install

--------------------------------------

amrnb-11.0.0.0.tar.bz2

tar jxvf amrnb-11.0.0.0.tar.bz2

cd amrnb-11.0.0.0

./configure --prefix=/usr/local --enable-shared

make && make install

--------------------------------------

amrwb-11.0.0.0.tar.bz2

tar jxvf amrwb-11.0.0.0.tar.bz2

cd amrwb-11.0.0.0

./configure --prefix=/usr/local

make && make install

--------------------------------------

opencore-amr-0.1.3.tar.gz

tar zxvf opencore-amr-0.1.3.tar.gz

cd opencore-amr-0.1.3

./configure --prefix=/usr/local

make && make install

--------------------------------------

ffmpeg-4.0.2.tar.gz

tar -jxvf ffmpeg-4.0.2.tar.bz2

cd ffmpeg-4.0.2

export pkg_config_path=/usr/local/lib/pkgconfig

./configure --prefix=/usr/local/ffmpeg-4.0.2 --enable-ffplay --enable-ffmpeg --enable-ffprobe --enable-gpl --enable-shared --enable-lib***lame --enable-libvorbis --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-yasm --enable-version3 --enable-nonfree --enable-libx264 --extra-ldflags=-ldl

make

make install

編譯完畢後,可以看看編譯資訊的最上面,是否有 ffmpeg, ffplay, ffprobe這三個檔案,如果少某乙個,可能是依賴包有問題,請自行查詢,一般如果缺少ffplay的話,是缺少sdl2導致的,因此configure執行前,要先安裝sdl2。

最後make時,可能會有很多的警告資訊,只要不是錯誤資訊,其他的忽略即可。

good luck !!!

centos7 0 下安裝git(ssh方式)

1 安裝依賴的庫 root localhost yum install curl devel expat devel gettext devel openssl devel zlib devel perl devel 2 刪除原本的安裝的git 4 編譯安裝 root localhost src t...

centos7 0 下安裝git(ssh方式)

安裝依賴的庫 root localhost yum install curl devel expat devel gettext devel openssl devel zlib devel perl devel 2 刪除原本的安裝的git 4 編譯安裝 root localhost src tar...

centos7 0 下安裝git(http方式)

之前弄了個ssh方式訪問的git伺服器,但是那種方式不太方便,而且網頁也訪問不了,所以這裡又弄個http方式訪問的git伺服器。安裝過程還和之前一樣,這裡我再複製一遍,省的再去找了。1 安裝依賴的庫 root localhost yum install curl devel expat devel ...