溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

FFmpeg Linux源碼編譯安裝

發(fā)布時間:2020-07-05 15:41:21 來源:網(wǎng)絡 閱讀:766 作者:fengyuzaitu 欄目:軟件技術(shù)

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

查詢的是當前系統(tǒng)目錄下libavdevice的版本號,默認是從/usr/lib/pkgconfig, /usr/local/lib/pkgconfig,/usr/share/pkgconfig/開始查詢libavdevice.pc,

如果需要優(yōu)先找到源碼編譯的版本號,需要進行如下的設置

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

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI