一、 FFmpeg下载 1.1 windows方法一2022年7月11日
https://ffmpeg.zeranoe.com/builds/ 网站挂了
https://ffmpeg.org/download.html#build-windows
ffmpeg-4.4.1-full_build.7z 、ffmpeg-4.4.1-full_build-shared.7z 区别: 1. ffmpeg-4.4.1-full_build.7z:版本只包含了ffmpeg.exe、ffplay.exe、ffprobe.exe三个可执行程序,没有头文件和库文件。 2. ffmpeg-4.4.1-full_build-shared.7z exe:版本包含了ffmpeg.exe、ffplay.exe、ffprobe.exe三个可执行程序和相关动态库文件,包含了头文件和库文件。
zeranoe编译FFmpeg挂了 ,可以访问 FFmpeg-Builds。
ffmpeg-n4.4-latest-win64-gpl-shared-4.4.zip 目标平台:win64
-
参数说明
Available targets:
- win64 (x86_64 Windows)
- win32 (x86 Windows)
- linux64 (x86_64 Linux, glibc>=2.23, linux>=4.4)
- linuxarm64 (arm64 (aarch64) Linux, glibc>=2.27, linux>=4.15)
The linuxarm64 target will not build some dependencies due to lack of arm64 (aarch64) architecture support or cross-compiling restrictions.
- davs2 and xavs2: aarch64 support is broken.
- libmfx and libva: Library for Intel QSV, so there is no aarch64 support.
Available:
- gpl Includes all dependencies, even those that require full GPL instead of just LGPL.
- lgpl Lacking libraries that are GPL-only. Most prominently libx264 and libx265.
- nonfree Includes fdk-aac in addition to all the dependencies of the gpl variant.
- gpl-shared Same as gpl, but comes with the libav* family of shared libs instead of pure static executables.
- lgpl-shared Same again, but with the lgpl set of dependencies.
- nonfree-shared Same again, but with the nonfree set of dependencies.
All of those can be optionally combined with any combination of addins.
- 4.4 to build from the 4.4 release branch instead of master.
- 5.0 to build from the 5.0 release branch instead of master.
- debug to not strip debug symbols from the binaries. This increases the output size by about 250MB.
# 解压后将/bin 文件夹添加系统环境变量 ffmpeg -version2.2 Linux下安装 三、测试 3.1 FFmpeg安装目录
FFmpeg安装目录如下,将include和lib文件夹copy 项目文件中;
# FFmpeg 安装目录文件结构 ├─bin ├─doc ├─include │ ├─libavcodec │ ├─libavdevice │ ├─libavfilter │ ├─libavformat │ ├─libavutil │ ├─libpostproc │ ├─libswresample │ └─libswscale ├─lib └─presets3.2 新建项目测试
- QT --> Projects-->New--> 选择Plain C++ Application
- 从FFmpeg安装目录如下,将include和lib文件夹copy 项目文件中,.pro添加ffmpeg的include和lib文件夹
INCLUDEPATH += $$PWD/include
LIBS += $$PWD/lib/avformat.lib
$$PWD/lib/avcodec.lib
$$PWD/lib/avdevice.lib
$$PWD/lib/avfilter.lib
$$PWD/lib/avutil.lib
$$PWD/lib/postproc.lib
$$PWD/lib/swresample.lib
$$PWD/lib/swscale.lib
- FFmpeg测试输出版本信息
#include// 包含ffmpeg头文件 #include "libavutil/avutil.h" int main() { printf("Hello FFMPEG, av_version_info is %sn", av_version_info()); printf("avutil_configuration is n%sn", avutil_configuration()); return 0; }
- FFmpeg测试结果输出



