完整版安装ffmpeg
一、安装choco
1.Set-ExecutionPolicy AllSigned
2.Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))
二、安装pkconfig-tool
1.choco install pkgconfiglite
三、下载ffmpeg
ffmpeg:https://http://www.ffmpeg.org/releases/
四、下载mingw
最好默认安装到 c:\mingw
设置环境变量 path:c:\mingw\bin
安装最基本的几个库即可
五、下载yasm-1.2.0-win32.exe,并修改为yasm.exe,放在c:\mingw\bin 目录下
六、修改msys.bat文件
call “D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat”
七、启动msys.bat
进入到ffmpeg文件目录
./configure --prefix="./build" --enable-shared --disable-static
./configure --enable-libx264 --enable-gpl --toolchain=msvc --enable-shared
NOTICE:== ffmpeg-5.1\libavformat\os_support.h **#include “winerror.h”**防止编译报错
编译时长,大概20分钟