使用MingGW-w64 Build Script 3.6.7搭建ffmpeg编译环境

在Linux下编译的Windows版本ffmpeg没有其他的依赖库 使用的是centos

1.脚本下载

wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.6.7

2.执行脚本

chmod +x mingw-w64-build-3.6.7
./mingw-w64-build-3.6.7 --build-type=win32 --disable-shared

显示makeinfo is needed to compile binutils and will need be installed. On Debian/Ubuntu it is part of the "texinfo" software package.

运行命令进行安装

yum -y install texinfo

4.继续运行

./mingw-w64-build-3.6.7 --build-type=win32 --disable-shared

Could not find the following packages: xz cvs yasm svn git flex bison
Install the missing packages before running this script.

直接安装这些缺少的库即可 

yum -y install xz cvs flex bison

yasm需要手动编译安装

tar -xf yasm-1.3.0.tar.gz
cd yasm-1.3
./configure
make
make install
cd ..
rm -rf yasm-1.3*

svn安装

yum -y install subversion

git安装

网站下载源代码,执行脚本

#!/bin/bash
yum -y install zlib-devel openssl-devel cpio expat-devel gettext-deve
tar xvzf git-2.10.0.tar.gz
cd git-2.10.0
./configure
make
make install
cd ..
rm -rf git-2.10.0*

 继续运行

./mingw-w64-build-3.6.7 --build-type=win32 --disable-shared

出现 选择n即可 Would you like to manually choose which package versions to build into MinGW-w64 yourself, and configure the build? [y/n]:

posted on 2017-02-14 10:42  弘道者  阅读(592)  评论(0编辑  收藏  举报