1.1 依赖环境
第一种方法:
下载编译好的ffmpeg-3.4.2-win64-dev和ffmpeg-3.4.2-win64-shared,解压得到
D:\qt-workspace\ffmpeg-3.4.2-win64-dev
D:\qt-workspace\ffmpeg-3.4.2-win64-shared
第二种方法:
QtAV官方有提供编译好的依赖库 QtAV-depends-windows-x86%2Bx64.7z,解压得到
D:\qt-workspace\QtAV-depends-windows-x86+x64
1.2 QtAV编译
下载QtAV-1.12.0,解压得到QtAV-1.12.0,在Qt Creator中导入QtAV项目
然后在Qt Creator设置编译时候的环境变量,换成自己ffmpeg解压的路径
GCC设置一下变量名
变量 值
CPATH D:\qt-workspace\ffmpeg-3.4.2-win64-dev\include
LD_LIBRARY_PATH D:\qt-workspace\ffmpeg-3.4.2-win64-dev\lib
LIBRARY_PATH D:\qt-workspace\ffmpeg-3.4.2-win64-dev\lib
MSVC设置以下变量名
INCLUDE D:\qt-workspace\ffmpeg-3.4.2-win64-dev\include
LIB D:\qt-workspace\ffmpeg-3.4.2-win64-dev\lib
LIBPAHT D:\qt-workspace\ffmpeg-3.4.2-win64-dev\lib