作者:多米音乐_34067977 | 来源:互联网 | 2023-06-18 13:24
本文主要分享【ffmpeg编译安装】,技术文章【01.FFmpeg下载以及安装】为【ch_ccc】投稿,如果你遇到音视频开发相关问题,本文相关知识或能到你。ffmpeg编译安装FFmpeg下载及安
本文主要分享【ffmpeg编译安装】,技术文章【01.FFmpeg下载以及安装】为【ch_ccc】投稿,如果你遇到音视频开发相关问题,本文相关知识或能到你。
ffmpeg编译安装
FFmpeg
下载及安装
2022年7月11日
https://ffmpeg.zeranoe.com/builds/ 网站挂了
一、
FFmpeg
下载 1.1
windows
方法一
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三个可执行程序和相关动态库文件,包含了头文件和库文件。
1.2
windows
方法二
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. 1.3
Linux
下载安装 二、
FFmpeg
安装 2.1
windows
下安装
ffmpeg -version
2.2
Linux
下安装 三、测试 3.1
FFmpeg
安装目录
FFmpeg
安装目录如下,将include
和lib
文件夹copy 项目文件中;
├─bin
├─doc
├─include
│ ├─libavcodec
│ ├─libavdevice
│ ├─libavfilter
│ ├─libavformat
│ ├─libavutil
│ ├─libpostproc
│ ├─libswresample
│ └─libswscale
├─lib
└─presets
3.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 %s\n", av_version_info()); printf("avutil_configuration is \n%s\n", avutil_configuration()); return 0; }
FFmpeg
测试结果输出
本文《01.FFmpeg下载以及安装》版权归ch_ccc所有,引用01.FFmpeg下载以及安装需遵循CC 4.0 BY-SA版权协议。