Windows 系統下使用 MinGW + MSYS + GCC 編譯 FFMPEG

來源:互聯網
上載者:User

一定要按照順序操作,否則你很可能持續遇到很多奇怪的問題(ffmpeg對編譯系統版本要求比較高)。

 

1. www.mingw.org:

 

  下載並安裝 MinGW 5.1.4 (http://jaist.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.4.exe),安裝時選中 g++, mingw make。建議安裝到D:/MinGW。

  下載並安裝 MSYS Base System (MSYS-1.0.11, MSYS-1.0.11-rc-1.exe, http://jaist.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.11-rc-1.exe),安裝結束時會提示輸入MinGW的安裝路徑。建議安裝到D:/msys。

  下載 GCC Version 4 (gcc-4.3.0-20080502-mingw32-alpha),解壓後覆蓋到 MinGW 安裝目錄

  下載 MinGW API for MS-Windows (w32api-3.13),解壓後覆蓋到 MinGW 安裝目錄

  因為 MinGW 會自動下載安裝 mingw32-make-3.81-20080326,所以不用額外單獨更新

2. www.ffmpeg.org:

 

  下載0.5版本原始碼(或從svn提取最新源碼),解壓後複製到 MSYS 使用者目錄 (home/xxx) 下

  用文字編輯器開啟源碼目錄下的 configure 檔案,搜尋兩處 pr 全部替換為 print

  開啟MSYS,進入ffmpeg源碼目錄,建立 release 和 debug 目錄,視需求編譯 release 或 debug 版本:
  進入 release 目錄下執行: ../configure --enable-memalign-hack --extra-cflags=-fno-common --extra-cflags=-fomit-frame-pointer --disable-shared --enable-static --cpu=i586 --enable-gpl --enable-ffplay --disable-debug --disable-logging
  進入 debug   目錄下執行: ../configure --enable-memalign-hack --extra-cflags=-fno-common --extra-cflags=-fomit-frame-pointer --disable-shared --enable-static --cpu=i586 --enable-gpl --enable-ffplay --enable-debug=3 --disable-optimizations --disable-stripping
  可參考 http://blog.csdn.net/hfw_1987/archive/2009/05/14/4183178.aspx
  然後 make,然後 make install

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.