centos編譯ffmpeg x264,centosffmpegx264

來源:互聯網
上載者:User

centos編譯ffmpeg x264,centosffmpegx264
1、安裝彙編編譯器(一般系統內建吧),如果沒有按照下面的命令安裝吧

  yum install yasm
2、使用最新x264源碼編譯(只支援編碼)
    在x264官網下載最新的代碼http://www.videolan.org/developers/x264.html 
git clone git://git.videolan.org/x264.gitcd x264 ./configure --enable-static --enable-shared makemake install
注意--enable-static --enable-shared 後面要加上,否則在編譯ffmpeg的時候會報錯。
make install 應該出現下面的畫面說明安裝成功了。


會在目前的目錄下產生靜態庫libx264.a,動態庫在/usr/local/lib,標頭檔/usr/local/include目錄下。
3、使用最新的ffmpeg源碼編譯
在ffmpeg官網下載最新的代碼https://www.ffmpeg.org/download.html
git clone git://source.ffmpeg.org/ffmpeg.git ffmpegcd ffmpeg#編譯成動態庫 ./configure  --enable-shared --disable-static --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib  --enable-pthreads   #編譯成靜態庫./configure  --enable-static --disable-shared --enable-memalign-hack --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib  --enable-pthreads   


參考資料:

1、http://www.helyar.net/2010/how-to-compile-ffmpeg-from-source/

2、https://help.ubuntu.com/community/FFmpeg#Source_Build

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.