ffmpeg安裝步驟(windows)

來源:互聯網
上載者:User

一、源碼修改

1. 從http://d.download.csdn.net/down/2104626/yalexiaoqiang 下載FFMPEG-0.5

2. 在源碼中搜尋如下關鍵字: abort()

 

檔案libavcodec/bitstream.c

函數
static int alloc_table(VLC *vlc, int size, int use_static)

if(use_static>1)
  {
   int* pInt = NULL;
   *pInt = 5;
   return -1;
            abort();

//cant do anything, init_vlc() is used with too little memory
  }

檔案libavcodec/bitstream.c

函數
int init_vlc_sparse
else if(vlc->table_size){
   int* pInt = NULL;
   *pInt = 5;
   return 0;
            abort(); // fatal error, we are called on a partially initialized table
        }

檔案libavcodec/mpegvideo.c

函數
int ff_find_unused_picture
    int* pInt = NULL;
   *pInt = 5;
   return -1;
    abort();

檔案libavcodec/shorten.c

函數
static
void init_offset(ShortenContext *s)
  int* pInt = NULL;
   *pInt = 5;
   return -1;
            abort();

3. 由於abort()導致系統提示"執行階段錯誤",所以需要在abort調用之前返回,不允許調用此函數。

 

二、源碼編譯
1. 配置交叉編譯環境MinGW + msys
 可以從http://sourceforge.net/下下載整合安裝包,或在csdn下下,在安裝的時候肉絡串連情況一定要好,不然裝的會很不順利

2. 運行msys 控制台程式.

3. 切換到FFMEPG原始碼目錄(命令同LINUX)

4. 運行./configure,參數如下:

./configure --enable-memalign-hack --extra-cflags=-fno-common --disable-decoders

--disable-encoders --disable-muxers --disable-demuxers --disable-parsers --disable-protocols

--disable-bsfs --disable-devices --disable-filters --disable-network --disable-ipv6

--disable-mpegaudio-hp --enable-decoder=h264 --enable-decoder=mjpeg

--enable-decoder=aac --enable-w32threads --disable-debug

5. 然後在運行make即可.

 

6. 拷貝目標檔案
 libavcodec.a
 libavutil.a
    上述兩個檔案為靜態庫檔案,拷貝到SDK的原始碼目錄ffmpeg0.5/lib。

 

//ffmpeg/ffplay vc6 源碼剖析

http://www.cnblogs.com/mcodec/articles/1933754.html

聯繫我們

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