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

本文介绍如何在Linux环境下使用CentOS编译适用于Windows的FFmpeg版本,并解决依赖库问题。文中详细记录了所需的步骤,包括安装必要的工具和库文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在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]:

转载于:https://www.cnblogs.com/yuandaozhe/p/6396587.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值