首先查看 FFmpeg 的编译选项
进入 FFmpeg框架包,并且带参数执行配置文件,查看帮助
图片.png
查看配置帮助
zjjf$ ./configure --help
然后出现一大堆可配置项
Usage: configure [options]
Options: [defaults in brackets after descriptions]
帮助选项
Help options:
--help print this message
--quiet Suppress showing informative output
--list-decoders show all available decoders
--list-encoders show all available encoders
--list-hwaccels show all available hardware accelerators
//分离器
--list-demuxers show all available demuxers
--list-muxers show all available muxers
//解析器
--list-parsers show all available parsers
//协议
--list-protocols show all available protocols
//比特流
--list-bsfs show all available bitstream filters
//输入设备
--list-indevs show all available input devices
//输出设备
--list-outdevs show all available output devices
//过滤器
--list-filters show all available filters
标准选项
Standard options:
//打印 log 日志(配置日志文件输出路径)
--logfile=FILE log tests and output to FILE [ffbuild/config.log]
//不打印日志
--disable-logging do not log configure debug information
//如果生成警告
--fatal-warnings fail if any configure warning is generated
//输出打包出的.a静态库的路径
--prefix=PREFIX install in PREFIX [/usr/local]
--bindir=DIR install binaries in DIR [PREFIX/bin]
//设置二进制文件的安装路径
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg]
--libdir=DIR install libs in DIR [PREFIX/lib]
--shlibdir=DIR install shared libs in DIR [LIBDIR]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]
--pkgconfigdir=DIR install pkg-config files in DIR [LIBDIR/pkgconfig]
--enable-rpath use rpath to allow installing libraries in paths
not part of the dynamic linker search path
use rpath when linking programs (USE WITH CARE)
--install-name-dir=DIR Darwin directory name for installed targets
许可选项(涉及到开源框架的侵权许可)
Licensing options:
//允许使用GPL代码,由此生成二进制文件(库)
//GPL:开源、免费、公用的许可
--enable-gpl allow use of GPL code, the resulting libs
and binaries will be under GPL [no]
//GPL的版本
--enable-version3 upgrade (L)GPL to version 3 [no]
--enable-nonfree allow use of nonfree code, the resulting libs
and binaries will be unredistributable [no]
高级选项
Advanced options (experts only):
--malloc-prefix=PREFIX prefix malloc and related names with PREFIX
--custom-allocator=NAME use a supported custom allocator
最优选项
Optimization options (experts only):
--disable-asm disable all assembly optimizations
--disable-altivec disable AltiVec optimizations
开发者选项
Developer options (useful when working on FFmpeg itself):
--disable-debug disable debugging symbols
--enable-debug=LEVEL set the debug lev
配置备选项
Configuration options:
//不允许构建(生成)静态库
--disable-static do not build static libraries [no]
//构建动态库
--enable-shared build shared libraries [no]
--enable-small optimize for size instead of speed
--disable-runtime-cpudetect disable detecting CPU capabilities at runtime (smaller binary)
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--disable-all disable building components, libraries and programs
--disable-autodetect disable automatically detected external libraries [no]
组件选项(FFmpeg核心的八个库)
Component options:
--disable-avdevice disable libavdevice build
--disable-avcodec disable libavcodec build
--disable-avformat disable libavformat build
--disable-swresample disable libswresample build
--disable-swscale disable libswscale build
--disable-postproc disable libpostproc build
--disable-avfilter disable libavfilter build
--enable-avresample enable libavresample build [no]
外部的库支持(重点)
External library support:
Using any of the following switches will allow FFmpeg to link to the
corresponding external library. All the components depending on that library
will become enabled, if all their other dependencies are met and they are not
explicitly disabled. E.g. --enable-libwavpack will enable linking to
libwavpack and allow the libwavpack encoder to be built, unless it is
specifically disabled with --disable-encoder=libwavpack.
只有系统本身的库才能被检测到,如果不是系统库,使用的是外部库,则需要配置
Note that only the system libraries are auto-detected. All the other external
libraries must be explicitly enabled.
Also note that the following help text describes the purpose of the libraries
themselves, not all their features will necessarily be usable by FFmpeg.
--disable-alsa disable ALSA support [autodetect]
--disable-appkit disable Apple AppKit framework [autodetect]
--disable-avfoundation disable Apple AVFoundation framework [autodetect]
//启用 aac 编码
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
工具链选项(重点)-->指定编译平台的架构类型,如:arm64、x86...
Toolchain options:
//选择要配置的架构类型
--arch=ARCH select architecture []
--cpu=CPU select the minimum required CPU (affects
instruction selection, may crash on older CPUs)
--cross-prefix=PREFIX use PREFIX for compilation tools []
//指定编译什么系统下的架构
--target-os=OS compiler targets OS []
后面还有一大堆......请自行实践查看
配置简介
//当前可用的解码器
--list-decoders show all available decoders
查看所有解码器
zjjf$ ./configure --list-decoders
aac atrac1 eatqi
aac_at atrac3 eightbps
aac_fixed atrac3al eightsvx_exp
aac_latm atrac3p eightsvx_fib
aasc atrac3pal escape124
后面还有一大堆......请自行实践查看
查看所有编码器
--list-encoders show all available encoders
zjjf$ ./configure --list-decoders
a64multi libgsm pcm_s32le
a64multi5 libgsm_ms pcm_s32le_planar
aac libilbc pcm_s64be
aac_at libkvazaar pcm_s64le
ac3 libmp3lame pcm_s8
后面还有一大堆......请自行实践查看
查看所有可用的硬件加速
--list-hwaccels show all available hardware accelerators
zjjf$ ./configure --list-hwaccels
h263_vaapi mjpeg_cuvid vc1_d3d11va
h263_videotoolbox mpeg1_cuvid vc1_d3d11va2
h264_cuvid mpeg1_vdpau vc1_dxva2
后面还有一大堆......请自行实践查看
网友评论