以下是摘自FFmpeg3.0版本中的configure文件选项,可以在FFmpeg源码的分目录下使用./configure -h命令查看,此帮助可能与其他FFmpeg的版本有出入的地方,但大体一样,这里加入了个人的翻译和理解,如有错误,欢迎加群QQ445236076讨论。
//帮助选项
Help options:
//打印帮助选项
–help print this message
//打印可用的解码器
–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
//打印可用的协议(包括udp,tcp等)
–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 [config.log]
//禁用调试信息
–disable-logging do not log configure debug information
//如果有任何警告则失败
–fatal-warnings fail if any configure warning is generated
//安装目录
–prefix=PREFIX install in PREFIX []
//exe和dll的安装目录
–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]
//pkg-config安装目录
–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]
//许可选项,此处不多说
Licensing options:
–enable-gpl allow use of GPL code, the resulting libs
and binaries will be under GPL [no]
–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]
//配置选项
Configuration options:
//禁用静态库
–disable-static do not build static libraries [no]
//启用共享库
–enable-shared build shared libraries [no]
//启用最小化,如果启用,生成的库的大小会比较小,但是编译速度回比较慢
–enable-small optimize for size instead of speed
//禁用实时的cpu效率检测
–disable-runtime-cpudetect disable detecting cpu capabilities at runtime (smaller binary)
//启用灰度(颜色、空间转换)
–enable-gray enable full grayscale support (slower color)
//禁用swscale中的透明度
–disable-swscale-alpha disable alpha channel support in swscale
//禁用所有,包括组件、库、程序
–disable-all disable building components, libraries and programs
//暂时没有弄明白
–enable-incompatible-libav-abi enable incompatible Libav fork ABI [no]
//提升版本号
–enable-raise-major increase major version numbers in sonames [no]
Program options:
//禁止生成所有exe
–disable-programs do not build command line programs
//禁止生成ffmpeg.exe
–disable-ffmpeg disable ffmpeg build
//禁止生成ffplay.exe(一般情况下,这个没办法生成,需要你加入sdl依赖库才能生成)
–disable-ffplay disable ffplay build
//一下不再多说
–disable-ffprobe disable ffprobe build
–disable-ffserver disable ffserver build
//文档选项
Documentation options:
//禁止生成doc帮助文档,一下不再多说
–disable-doc do not build documentation
–disable-htmlpages do not build HTML documentation pages
–disable-manpages do not build man documentation pages
–disable-podpages do not build POD documentation pages
–disable-txtpages do not build text documentation pages
//组件选项
Component options:
//禁用avdevice组件(不会生成avdevice的静态库和动态库等文件),以下不再多说
–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
//启用avresample组件,这里特意说明以下,如果需要这个文件此处必须启用
–enable-avresample enable libavresample build [no]
//禁用多线程
–disable-pthreads disable pthreads [autodetect]
–disable-w32threads disable Win32 threads [autodetect]
–disable-os2threads disable OS/2 threads [autodetect]
//禁用网络功能
–disable-network disable network support [no]
//禁用dct(如果不知道是什么自己百度)
–disable-dct disable DCT code
–disable-dwt disable DWT code
//禁用纠错
–disable-error-resilience disable error resilience code
//禁用行同步脉冲,以下是一些算法,包括压缩算法等,有兴趣的可以详细百度以下,这里不再多说
–disable-lsp disable LSP code
//禁用LZO压缩解码(一个无损算法)
–disable-lzo disable LZO decoder code
//禁用修正离散余弦变换
–disable-mdct disable MDCT code
//禁用实数离散傅里叶变换
–disable-rdft disable RDFT code
//禁用快速傅氏变换算法
–disable-fft disable FFT code
//水平就在这里,我也不知道这是什么,好像是一种dct变换
–disable-faan disable floating point AAN (I)DCT code
//禁用avutil中的像素单元
–disable-pixelutils disable pixel utils in libavutil
//以下是硬件编解码相关选项
Hardware accelerators:
//Direct3D11
–disable-d3d11va disable D3D11VA code [autodetect]
//DirectX Video Acceleration
–disable-dxva2 disable DXVA2 code [autodetect]
//Video Acceleration API
–disable-vaapi disable VAAPI code [autodetect]
–disable-vda disable VDA code [autodetect]
//Video Decode and Presentation API for Unix
–disable-vdpau disable VDPAU code [autodetect]
//ios平台videotoolbox
–enable-videotoolbox enable VideoToolbox code [autodetect]
Individual component options:
//以下是禁用或启用指定(名字)的编解码器或过滤器,如果不知道需要禁用的名字是什么,可以用上边的list命令打印以下,然后再禁用,这里就不再多说
–disable-everything disable all components listed below
–disable-encoder=NAME disable encoder NAME
–enable-encoder=NAME enable encoder NAME
–disable-encoders disable all encoders
–disable-decoder=NAME disable decoder NAME
–enable-decoder=NAME enable decoder NAME
–disable-decoders disable all decoders
–disable-hwaccel=NAME disable hwaccel NAME
–enable-hwaccel=NAME enable hwaccel NAME
–disable-hwaccels disable all hwaccels
–disable-muxer=NAME disable muxer NAME
–enable-muxer=NAME enable muxer NAME
–disable-muxers disable all muxers
–disable-demuxer=NAME disable demuxer NAME
–enable-demuxer=NAME enable demuxer NAME
–disable-demuxers disable all demuxers
–enable-parser=NAME enable parser NAME
–disable-parser=NAME disable parser NAME
–disable-parsers disable all parsers
–enable-bsf=NAME enable bitstream filter NAME
–disable-bsf=NAME disable bitstream filter NAME
–disable-bsfs disable all bitstream filters
–enable-protocol=NAME enable protocol NAME
–disable-protocol=NAME disable protocol NAME
–disable-protocols disable all protocols
–enable-indev=NAME enable input device NAME
–disable-indev=NAME disable input device NAME
–disable-indevs disable input devices
–enable-outdev=NAME enable output device NAME
–disable-outdev=NAME disable output device NAME
–disable-outdevs disable output devices
–disable-devices disable all devices
–enable-filter=NAME enable filter NAME
–disable-filter=NAME disable filter NAME
–disable-filters disable all filters
External library support:
//给FFmpeg添加依赖库,比如说,原生的FFmpeg是不支持sdl的,你需要先下载sdl的库,编译好,然后放在指定的目录(需要自己配置,让ffmpeg找到这个目录,仔细看说明你会找到这个配置选项的),然后再编译ffmpeg,它就会支持sdl了(支持其他功能)
//关于这些依赖库,有兴趣的可以自己他搜索一下,比较常用的就是x264,libfaac等
–enable-avisynth enable reading of AviSynth script files [no]
–disable-bzlib disable bzlib [autodetect]
–enable-chromaprint enable audio fingerprinting with chromaprint [no]
–enable-fontconfig enable fontconfig, useful for drawtext filter [no]
–enable-frei0r enable frei0r video filtering [no]
–enable-gcrypt enable gcrypt, needed for rtmp(t)e support
if openssl, librtmp or gmp is not used [no]
–enable-gmp enable gmp, needed for rtmp(t)e support
if openssl or librtmp is not used [no]
–enable-gnutls enable gnutls, needed for https support
if openssl is not used [no]
–disable-iconv disable iconv [autodetect]
–enable-ladspa enable LADSPA audio filtering [no]
–enable-libass enable libass subtitles rendering,
needed for subtitles and ass filter [no]
–enable-libbluray enable BluRay reading using libbluray [no]
–enable-libbs2b enable bs2b DSP library [no]
–enable-libcaca enable textual display using libcaca [no]
–enable-libcelt enable CELT decoding via libcelt [no]
–enable-libcdio enable audio CD grabbing with libcdio [no]
–enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
–enable-libdcadec enable DCA decoding via libdcadec [no]
–enable-libfaac enable AAC encoding via libfaac [no]
–enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
–enable-libflite enable flite (voice synthesis) support via libflite [no]
–enable-libfreetype enable libfreetype, needed for drawtext filter [no]
–enable-libfribidi enable libfribidi, improves drawtext filter [no]
–enable-libgme enable Game Music Emu via libgme [no]
–enable-libgsm enable GSM de/encoding via libgsm [no]
–enable-libiec61883 enable iec61883 via libiec61883 [no]
–enable-libilbc enable iLBC de/encoding via libilbc [no]
–enable-libkvazaar enable HEVC encoding via libkvazaar [no]
–enable-libmfx enable HW acceleration through libmfx
–enable-libmodplug enable ModPlug via libmodplug [no]
–enable-libmp3lame enable MP3 encoding via libmp3lame [no]
–enable-libnut enable NUT (de)muxing via libnut,
native (de)muxer exists [no]
–enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
–enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
–enable-libopencv enable video filtering via libopencv [no]
–enable-libopenh264 enable H.264 encoding via OpenH264 [no]
–enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
–enable-libopus enable Opus de/encoding via libopus [no]
–enable-libpulse enable Pulseaudio input via libpulse [no]
–enable-librubberband enable rubberband needed for rubberband filter [no]
–enable-librtmp enable RTMP[E] support via librtmp [no]
–enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
–enable-libshine enable fixed-point MP3 encoding via libshine [no]
–enable-libsmbclient enable Samba protocol via libsmbclient [no]
–enable-libsnappy enable Snappy compression, needed for hap encoding [no]
–enable-libsoxr enable Include libsoxr resampling [no]
–enable-libspeex enable Speex de/encoding via libspeex [no]
–enable-libssh enable SFTP protocol via libssh [no]
–enable-libtesseract enable Tesseract, needed for ocr filter [no]
–enable-libtheora enable Theora encoding via libtheora [no]
–enable-libtwolame enable MP2 encoding via libtwolame [no]
–enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
–enable-libv4l2 enable libv4l2/v4l-utils [no]
–enable-libvidstab enable video stabilization using vid.stab [no]
–enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
–enable-libvorbis enable Vorbis en/decoding via libvorbis,
native implementation exists [no]
–enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
–enable-libwavpack enable wavpack encoding via libwavpack [no]
–enable-libwebp enable WebP encoding via libwebp [no]
–enable-libx264 enable H.264 encoding via x264 [no]
–enable-libx265 enable HEVC encoding via x265 [no]
–enable-libxavs enable AVS encoding via xavs [no]
–enable-libxcb enable X11 grabbing using XCB [autodetect]
–enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
–enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
–enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
–enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
–enable-libzimg enable z.lib, needed for zscale filter [no]
–enable-libzmq enable message passing via libzmq [no]
–enable-libzvbi enable teletext support via libzvbi [no]
–disable-lzma disable lzma [autodetect]
–enable-decklink enable Blackmagic DeckLink I/O support [no]
–enable-mmal enable decoding via MMAL [no]
–enable-netcdf enable NetCDF, needed for sofalizer filter [no]
–enable-nvenc enable NVIDIA NVENC support [no]
–enable-openal enable OpenAL 1.1 capture support [no]
–enable-opencl enable OpenCL code
–enable-opengl enable OpenGL rendering [no]
–enable-openssl enable openssl, needed for https support
if gnutls is not used [no]
–disable-schannel disable SChannel SSP, needed for TLS support on
Windows if openssl and gnutls are not used [autodetect]
–disable-sdl disable sdl [autodetect]
–disable-securetransport disable Secure Transport, needed for TLS support
on OSX if openssl and gnutls are not used [autodetect]
–enable-x11grab enable X11 grabbing (legacy) [no]
–disable-xlib disable xlib [autodetect]
–disable-zlib disable zlib [autodetect]
//编译工具选项(未注明的表示不知道)
Toolchain options:
//选择架构
–arch=ARCH select architecture []
//选择CPU
–cpu=CPU select the minimum required CPU (affects
instruction selection, may crash on older CPUs)
//交叉编译工具目录
–cross-prefix=PREFIX use PREFIX for compilation tools []
–progs-suffix=SUFFIX program name suffix []
//启用交叉编译
–enable-cross-compile assume a cross-compiler is used
//交叉编译根目录
–sysroot=PATH root of cross-build tree
//交叉编译的头文件目录
–sysinclude=PATH location of cross-build system headers
//交叉编译的目标系统(你所编译的ffmpeg需要在哪种系统上运行)
–target-os=OS compiler targets OS []
//交叉编译启动程序的命令
–target-exec=CMD command to run executables on target
//交叉编译的安装目录
–target-path=DIR path to view of build directory on target
//交叉编译samples存放目录
–target-samples=DIR path to samples directory on target
//交叉编译的temp目录
–tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
//编译工具,比如你在windows下用vs编译,则用–toolchain=msvc
–toolchain=NAME set tool defaults according to NAME
–nm=NM use nm tool NM [nm -g]
–ar=AR use archive tool AR [ar]
–as=AS use assembler AS []
–windres=WINDRES use windows resource compiler WINDRES [windres]
//使用yasm编译
–yasmexe=EXE use yasm-compatible assembler EXE [yasm]
//使用gcc编译
–cc=CC use C compiler CC [gcc]
//使用g++编译
–cxx=CXX use C compiler CXX [g++]
//使用object C编译工具occ编译
–objcc=OCC use ObjC compiler OCC [gcc]
–dep-cc=DEPCC use dependency generator DEPCC [gcc]
–ld=LD use linker LD []
–pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [pkg-config]
–pkg-config-flags=FLAGS pass additional flags to pkgconf []
–ranlib=RANLIB use ranlib RANLIB [ranlib]
//生成doxygen文档,是一个chm的说明文档,有兴趣的可以生成一下,文档还是不错的,只不过全部是英文的,DOXYGEN为文档生成路径
–doxygen=DOXYGEN use DOXYGEN to generate API doc [doxygen]
–host-cc=HOSTCC use host C compiler HOSTCC
–host-cflags=HCFLAGS use HCFLAGS when compiling for host
–host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
–host-ld=HOSTLD use host linker HOSTLD
–host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
–host-libs=HLIBS use libs HLIBS when linking for host
–host-os=OS compiler host OS []
–extra-cflags=ECFLAGS add ECFLAGS to CFLAGS []
–extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS []
–extra-objcflags=FLAGS add FLAGS to OBJCFLAGS []
–extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
–extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS []
–extra-ldlibflags=ELDFLAGS add ELDFLAGS to LDLIBFLAGS []
–extra-libs=ELIBS add ELIBS []
–extra-version=STRING version string suffix []
–optflags=OPTFLAGS override optimization-related compiler flags
–build-suffix=SUFFIX library name suffix []
–enable-pic build position-independent code
–enable-thumb compile for Thumb instruction set
–enable-lto use link-time optimization
–env=”ENV=override” override the environment variables
Advanced options (experts only):
–malloc-prefix=PREFIX prefix malloc and related names with PREFIX
–custom-allocator=NAME use a supported custom allocator
–disable-symver disable symbol versioning
–enable-hardcoded-tables use hardcoded tables instead of runtime generation
–disable-safe-bitstream-reader
disable buffer boundary checking in bitreaders
(faster, but may crash)
–enable-memalign-hack emulate memalign, interferes with memory debuggers
–sws-max-filter-size=N the max filter size swscale uses [256]
Optimization options (experts only):
//禁用yasm,一般在linux上编译使用,如果你没有安装yasm的话
–disable-yasm disable use of nasm/yasm assembly
//以下均没有使用过,在这里就不翻译了,以免出错对使用者造成误导,如果用过的亲可以加群一起交流
–disable-asm disable all assembly optimizations
–disable-altivec disable AltiVec optimizations
–disable-vsx disable VSX optimizations
–disable-power8 disable POWER8 optimizations
–disable-amd3dnow disable 3DNow! optimizations
–disable-amd3dnowext disable 3DNow! extended optimizations
–disable-mmx disable MMX optimizations
–disable-mmxext disable MMXEXT optimizations
–disable-sse disable SSE optimizations
–disable-sse2 disable SSE2 optimizations
–disable-sse3 disable SSE3 optimizations
–disable-ssse3 disable SSSE3 optimizations
–disable-sse4 disable SSE4 optimizations
–disable-sse42 disable SSE4.2 optimizations
–disable-avx disable AVX optimizations
–disable-xop disable XOP optimizations
–disable-fma3 disable FMA3 optimizations
–disable-fma4 disable FMA4 optimizations
–disable-avx2 disable AVX2 optimizations
–disable-aesni disable AESNI optimizations
–disable-armv5te disable armv5te optimizations
–disable-armv6 disable armv6 optimizations
–disable-armv6t2 disable armv6t2 optimizations
–disable-vfp disable VFP optimizations
–disable-neon disable NEON optimizations
–disable-inline-asm disable use of inline assembly
–disable-mipsdsp disable MIPS DSP ASE R1 optimizations
–disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
–disable-msa disable MSA optimizations
–disable-mipsfpu disable floating point MIPS optimizations
–disable-mmi disable Loongson SIMD optimizations
–disable-fast-unaligned consider unaligned accesses slow
Developer options (useful when working on FFmpeg itself):
//禁用调试信息
–disable-debug disable debugging symbols
//启用调试信息,级别为LEVEL 如–enable-debug=”3”
–enable-debug=LEVEL set the debug level []
–disable-optimizations disable compiler optimizations
–enable-extra-warnings enable more compiler warnings
–disable-stripping disable stripping of executables and shared libraries
–assert-level=level 0(default), 1 or 2, amount of assertion testing,
2 causes a slowdown at runtime.
–enable-memory-poisoning fill heap uninitialized allocated space with arbitrary data
–valgrind=VALGRIND run “make fate” tests through valgrind to detect memory
leaks and errors, using the specified valgrind binary.
Cannot be combined with –target-exec
–enable-ftrapv Trap arithmetic overflows
–samples=PATH location of test samples for FATE, if not set use
$FATE_SAMPLES at make invocation time.
–enable-neon-clobber-test check NEON registers for clobbering (should be
used only for debugging purposes)
–enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
should be used only for debugging purposes)
–enable-random randomly enable/disable components
–disable-random
–enable-random=LIST randomly enable/disable specific components or
–disable-random=LIST component groups. LIST is a comma-separated list
of NAME[:PROB] entries where NAME is a component
(group) and PROB the probability associated with
NAME (default 0.5).
–random-seed=VALUE seed value for –enable/disable-random
–disable-valgrind-backtrace do not print a backtrace under Valgrind
(only applies to –disable-optimizations builds)
如果需要在windows下编译ffmpeg的请参考这篇文章
windows下编译可以调试的ffmpeg,可生成pdb文件
http://blog.csdn.net/u010380485/article/details/54092264
以上所有信息均为自己翻译,如果错误,欢迎指正!
如果有其他亲知道上述没有涉及的地方,欢迎评论或加群讨论,QQ群445236076