MinGW编译FFMPEG windows8

来源:互联网 发布:淘宝怎么签署图片协议 编辑:程序博客网 时间:2024/04/29 18:38

1、在http://www.mingw.org/ 下载最新的MinGW Installation Manager,配置如图所示

确保GCC编译器也安装进来



2、安装完成后,把MinGW目录下的两个bin路径加入系统PATH:yourpath\MinGW\msys\1.0\bin  和 yourpath\MinGW\bin

3、在http://git-scm.com/download/win 下载GIT for windows,安装,并把bin路径加入系统PATH

4、http://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows 参考此网页,配置pkg-config

5、运行developer command prompt for windows,进入yourpath\MinGW\msys\1.0,执行msys.bat

6、cd 到home目录下,git所有的第三方库,例如x264

git clone git://git.videolan.org/x264

cd x264

./configure -enable-static

make

make install

例如,fdk-aac

git clone git://github.com/mstorsjo/fdk-aac.git fdk-aac

cd fdk-aac

./autogen.sh

./configure --enable-static

make

make install

其它第三方支持库可按照这样的办法下载编译

7、下载编译ffmpeg

下载最新的ffmpeg snap shot代码。在此之前需要设置PKG_CONFIG_PATH,一般是/local/lib/pkgconfig

cd ffmpeg

./configure --enable-gpl --eanble-nonfree --enable-libx264 --enable-libfdk_aac --enable-shared --extra-cflags=-I/local/include --extra-ldflags=-L/local/lib

make

make install

注意:make在linux加-j n可以使用多核来编译,在这里使用会有问题,目前我不知道是什么原因,无法编译

 8、编译完成后,lib,dll在/local/bin目录中,至此收工。

0 0