wget https://jaist.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.5.tar.gz
wget https://sourceforge.mirrorservice.org/o/op/opencore-amr/opencore-amr/opencore-amr-0.1.5.tar.gz
wget https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz
wget https://code.videolan.org/videolan/x264/-/archive/stable/x264-stable.tar.gz
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz
cd /data/source/ && git clone https://git.ffmpeg.org/ffmpeg.git
1.安裝相關(guān)依賴(lài)包
tar -zxvf fdk-aac-0.1.5.tar.gz
cd fdk-aac-0.1.5 && ./configure && make install
tar -zxvf opencore-amr-0.1.5.tar.gz
cd opencore-amr-0.1.5 && ./configure && make install
tar -zxvf lame-3.100.tar.gz
cd lame-3.100 && ./configure && make install
tar -zxvf x264-stable.tar.gz
cd x264-stable ./configure && make install
tar -xvf libvorbis-1.3.5.tar.xz
cd libvorbis-1.3.5 && ./configure && make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
tar -xvf libogg-1.3.2.tar.xz
cd libogg-1.3.2 && ./configure && make install
tar -xvf libtheora-1.1.1.tar.xz
cd libtheora-1.1.1 && ./configure && make install
yum install mediainfo
vi /etc/ld.so.conf.d/ffmpeg.conf
加入下面兩個(gè)路徑,然后執(zhí)行l(wèi)dconfig,引用類(lèi)庫(kù)
/usr/local/lib
/data/software/ffmpeg/lib
2.安裝ffmpeg
cd /data/source/ffmpeg
./configure --enable-version3 --enable-libfdk-aac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared --disable-x86asm --prefix=/data/software/ffmpeg
(不同系統(tǒng)需要將參數(shù)改為--disable-asm 根據(jù)報(bào)錯(cuò)提示修改參數(shù))
make && make instll
3.配置環(huán)境變量:
vim /etc/profile
PATH=$PATH:/data/software/ffmpeg/bin
export PATH
source /etc/profile #重新加載生效
創(chuàng)建軟連接
ln -s /data/software/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
ln -s /data/software/ffmpeg/bin/ffprobe /usr/bin/ffprobe
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。