十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
Ubuntu16.04.10版本
1)指令安裝
添加源:sudo add-apt-repository ppa:djcj/hybrid
更新源:sudo apt-get update
下載安裝:sudo apt-get -y install ffmpeg
2)源碼編譯安裝
1.下載源碼:git clone git://source.ffmpeg.org/ffmpeg.git
2.生成配置:./configure --enable-shared? --prefix=/home/dong/ffmpeg/ffmpeg/build/ --disable-x86asm
舊版本可以使用--disable-yasm禁用匯編語言,新版本支持enable-x86asm / --disable-x86asm instead.啟用/禁用匯編加速
注意:WARNING: The --disable-yasm option is only provided for compatibility and will be removed in the future. Use --enable-x86asm / --disable-x86asm instead.啟用/禁用匯編加速
3. make && make install
4 版本查詢
/home/dong/ffmpeg/ffmpeg/build/lib/pkgconfig目錄下保存每個模塊的版本號
libavcodec.pc? libavdevice.pc? libavfilter.pc? libavformat.pc? libavutil.pc? libswresample.pc? libswscale.pc
pkg-config libavdevice --modversion
查詢的是當(dāng)前系統(tǒng)目錄下libavdevice的版本號,默認是從/usr/lib/pkgconfig, /usr/local/lib/pkgconfig,/usr/share/pkgconfig/開始查詢libavdevice.pc,
如果需要優(yōu)先找到源碼編譯的版本號,需要進行如下的設(shè)置
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig;$PKG_CONFIG_PATH
5 各個版本下載網(wǎng)址
http://ffmpeg.org/releases/?
6 添加額外庫
1、yasm(libx264需要依賴yasm)
????? sudo apt-get install yasm
2、libx264
????? sudo apt-get install libx264-dev
3、libfaac
????? sudo apt-get install libfaac-dev
4、libmp3lame
????? sudo apt-get install libmp3lame-dev
5、libtheora
????? sudo apt-get install libtheora-dev
6、libvorbis
????? sudo apt-get install libvorbis-dev
7、libxvid
????? sudo apt-get install libxvidcore-dev
8、libxext
????? sudo apt-get install libxext-dev
9、libxfixes
????? sudo apt-get install libxfixes-dev
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvorbis
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。