一 下载Qt-mingw版本 5.15.2,安装在 d:\Qt_mingw
git-bash 环境变量:
PATH=$PATH:/d/Qt_mingw/Tools/mingw810_64/bin/
二 下载ffmpeg源码
git clone
https://github.com/FFmpeg/FFmpeg# 切换到指定日期版本
git checkout `git rev-list -n 1 --first-parent --before="2017-06-21 00:00" master`
QtAV页面显示,最后一次Release: 2017-6-21。找到当时的匹配版本。
./configure --disable-yasm --enable-shared --prefix=./xue_out
../mingw810_64/bin/mingw32-make.exe V=1
../mingw810_64/bin/mingw32-make.exe V=1 install
--enable-shared是为了生成 dll
V=1,是解决路径长度限制错误:
https://www.mail-archive.com/ffmpeg-user@ffmpeg.org/msg19804.html
LD libavcodec/avcodec-57.dll
gcc.exe: error: libavco: No such file or directory
mingw32-make: *** [ffbuild/library.mak:102: libavcodec/avcodec-57.dll] Error 1
三 下载QtAV
git clone
https://github.com/wang-bin/QtAV.gitQtCreator打开 QtAV.pro,
项目--build--设置
设置 CPATH 到 d:\Qt_mingw\Tools\FFmpeg\xue_out\include
设置 LD_LIBRARY_PATH 到 d:\Qt_mingw\Tools\FFmpeg\xue_out\lib\;d:\Qt_mingw\Tools\FFmpeg\xue_out\bin\
设置 LIBRARY_PATH 到
d:\Qt_mingw\Tools\FFmpeg\xue_out\lib\;d:\Qt_mingw\Tools\FFmpeg\xue_out\bin\
点击构建-构建项目,编译完成功。
--
修改:DoorWay FROM 1.86.32.*
FROM 124.114.151.*