一 概述
1.设置代码编译结果保存路径要求使用绝对地址
–prefix=/home/zhuzilong/ffmpeg
2.设置编译平台
–host=arm-linux --target=arm-linux
3.设置交叉编译器前缀
–cc=arm-linux-gnueabihf-gcc
–cxx=arm-linux-gnueabihf-g++
–cross-prefix=arm-linux-gnueabihf-
–enable-cross-compile //暂不知用途,交叉编译加上
–strip= arm-linux-gnueabihf-strip
4.显示帮助选项
–help
–quiet
使用list显示指定的编解码器
–list-decoders
–list-encoders
–list-hwaccels
–list-demuxers
–list-muxers
–list-parsers
–list-protocols
–list-bsfs
–list-indevs
–list-outdevs
–list-filters
5.文档选项
根据需要决定是否生成对应的帮助文档
–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
二 可执行程序编译选项
下列disable替换为enable 即为使能对应编译(后文相同)
–disable-programs do not build command line programs 禁止生成所有的可执行文件
–disable-ffmpeg disable ffmpeg build
–disable-ffplay disable ffplay build
–disable-ffprobe disable ffprobe build
三 优化选项
此部分需要根据实际情况,及目标主机巨顶,关闭不必要的选项,可提高效率
方括号内代表默认值,不设置时采用此值
static 和shared 分别代表编译动态库或静态库
–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]
四 组成选项
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 //启用 GPLed 后加工支持
–disable-avfilter disable libavfilter build
–enable-avresample enable libavresample build (deprecated) [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]
–disable-dct disable DCT code
–disable-dwt disable DWT code
–disable-error-resilience disable error resilience code
–disable-lsp disable LSP code
–disable-lzo disable LZO decoder code
–disable-mdct disable MDCT code
–disable-rdft disable RDFT code
–disable-fft disable FFT code
–disable-faan disable floating point AAN (I)DCT code
–disable-pixelutils disable pixel utils in libavutil
五 编解码器选项
通常情况下,嵌入式系统需要根据具体情况留下少数使用的,剩下全部disable,用以节约空间
–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 //启用 GPLed 后加工支持
–disable-avfilter disable libavfilter build
–enable-avresample enable libavresample build (deprecated) [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]
–disable-dct disable DCT code
–disable-dwt disable DWT code
–disable-error-resilience disable error resilience code
–disable-lsp disable LSP code
–disable-lzo disable LZO decoder code
–disable-mdct disable MDCT code
–disable-rdft disable RDFT code
–disable-fft disable FFT code
–disable-faan disable floating point AAN (I)DCT code
–disable-pixelutils disable pixel utils in libavutil
六 其他
–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
–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