FFmpeg Configure configuration Options _ffmpeg

Source: Internet
Author: User
Tags doxygen drawtext error handling gmp openssl valgrind git clone apple video

Help Options standard Options license option licensing options configuration Options Program options Document Options Documentation Options component option Component options individual component option individual component Options Extension Library support external library support Hardware acceleration features hardware acceleration features tool chain options toolchain options Advanced options advanced options optimization option Developer Option Developer Options

Help Options

Ability options for viewing FFmpeg the –help print this message–list-decoders displays all available decoders (h264/mjpeg, and so on) –list-encoders display all available encoders (h264/ MJPEG, etc.) –list-hwaccels display all supported hard codecs (H264_VIDEOTOOLBOX/H264_MEDIACODEC, etc.) –list-demuxers Show all supported containers (mp4/h264, etc.) List-muxers displays all supported reusable containers (mp4/h264, etc.) –list-parsers Show all available parsers–list-protocols display all supported transport protocols (RTMP/RTP, etc.) – LIST-BSFS displays all available format conversions (H264_MP4TOANNEXB/AAC_ADTSTOASC, etc.) –list-indevs display all supported input devices (ALSA/V4L2, etc.) –list-outdevs Show all supported output devices (ALSA/OPENGL, etc.) –list-filters display all supported filters (SCALE/VOLUME/FPS/ALLYUV, etc.) standard options (Standard options)

The

Compile configuration options describe the log output file in the –logfile=file configuration process, and the default output to the Ffbuild/config.log file –disable-logging the current location does not output logs during the configuration process –fatal-warnings Configure any warnings in the configuration process as fatal error handling –prefix=prefix set up the directory to install, if you do not specify the default is/usr–bindir=dir set the location of the executable program installation, the default is [Prefix/bin]–datadir=dir Set up the test program and the installation location of the data, by default [Prefix/share/ffmpeg]–docdir=dir set up the document's installation directory, by default [Prefix/share/doc/ffmpeg]–libdir=dir set the static library installation location , the default is [Prefix/lib]–shlibdir=dir sets the installation location of the dynamic library, by default, the installation location of the Libdir]–incdir=dir settings header file, which is the default [Prefix/include] Generally used to rely on this header file to develop it's enough. –mandir=dir set up the installation directory for the man file, the default is [Prefix/share/man]–pkgconfigdir=dir set Pkgconfig installation directory, default is [libdir/ Pkgconfig] This option is valid only when--enable-shared is enabled –enable-rpath use Rpath to allow installing libraries in paths not part of the DY NAMIC linker Search Path use rpath then linking programs [use with Care]–install-name-dir=dir Darwin directory name for I Nstalled targets license options (Licensing options)

Select a license, ffmpeg default license LGPL 2.1, if the need for a GPL library requires a GPL license, for example, libx264 is the GPL, if you need to join libx264 you need--ENABLE-GPL. Option description –ENABLE-GPL allow use of GPL code, the resulting libs and binaries would 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 would be unredistributab Le [No] configuration options (Configuration options)

Configuration options for compilation options Description –disable-static does not produce a static library, the default build static library –enable-shared generate dynamic libraries, default does not generate dynamic library –enable-small optimize for size instead of Spee D, the default open –disable-runtime-cpudetect disable detecting CPU capabilities at runtime (smaller binary), the default open –enable-gray enable Full grayscale support (slower color) –disable-swscale-alpha Disable alpha channel support in Swscale–disable-all prohibit compiling all Library and executable program –enable-raise-major add major version program options

Executable Open option, the default compilation of all executable programs in FFmpeg, including FFmpeg, Ffplay, Ffprobe, Ffserver, but the Mac platform by default does not generate Ffplay, currently do not know why. Option Description –disable-programs do don't build command line programs–disable-ffmpeg disable ffmpeg build–disable-ffplay disable FF Play Build–disable-ffprobe disable Ffprobe build–disable-ffserver disable Ffserver Build document Options (documentation options)

Offline Document selection Options Description –disable-doc do don't build documentation–disable-htmlpages don't build HTML documentation Pages–disable-man Pages do don't build man documentation pages–disable-podpages does not build POD documentation Pages–disable-txtpages does not Build Text documentation pages component options (Component options)

All modules are compiled by default except for the Avresample module. Generally used to lightweight the size of the FFmpeg library, you can simply turn on certain features that specify certain components. Option Description –disable-avdevice Disable Libavdevice build–disable-avcodec disable libavcodec build–disable-avformat disable Vformat build–disable-swresample Disable libswresample build–disable-swscale disable Libswscale build– Disable-postproc Disable Libpostproc build–disable-avfilter disable libavfilter Enable Libavresample Build [no]–disable-pthreads disable pthreads [autodetect]–disable-w32threads disable Win32 threads [autod etect]–disable-os2threads Disable OS/2 threads [autodetect]–disable-network Disable network support [NO]–DISABLE-DCT di Sable 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-ff T disable FFT code–disable-faan disable floating point AAN (I) DCT code–disable-pixelutils Disable pixels in libavutil individual component options (individual component options)

Can be used to set up the specified function, such as prohibit all encoders, where you can open a specific encoders (x264, AAC, etc.) option description –disable-everything Disable all components listed Below–disable-encoder=name Disable encoder name–enable-encoder=name Enable encoder name–disable-encoders all en Coders–disable-decoder=name Disable decoder name–enable-decoder=name Enable decoder name–disable-decoders Disable all D Ecoders–disable-hwaccel=name Disable Hwaccel name–enable-hwaccel=name enable Hwaccel name–disable-hwaccels 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–ena Ble-bsf=name Enable bitstream Filter name–disable-bsf=name disable bitstream filter NAME–DISABLE-BSFS Disable all Bitstr EAM Filters–enable-protocol=nameEnable 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 Devi ces–disable-devices Disable all Devices–enable-filter=name Enable filter name–disable-filter=name disable Filter name– Disable-filters Disable all Filters extension library support (External library support)

Some of the features provided by FFMPEG are supported by other extensions, and if you need to use them explicitly, it's good to be sure that the target schema of the compiled Third-party libraries--arch the same. When compiling the ffmpeg, you need to add the header and library search path of the third party library (specified by Extra-cflags and Extra-ldflags), and the rest is done for you ffmpeg. libx264 Example
FFMPEG Integrated libx264 official documentation

$ git clone http://source.ffmpeg.org/git/ffmpeg.git
$ cd x264
$/configure--prefix= $FFMPEG _prefix- Enable-static--enable-shared
$ make-j8 && make install
Option Description –enable-avisynth enable reading of avisynth script files [no]–disable-bzlib disable Bzlib [AUTODETECT]–ENABLE-CHR Omaprint enable audio fingerprinting with Chromaprint [no]–enable-frei0r enable frei0r video filtering [NO]–ENABLE-GCRYP T enable Gcrypt, needed for rtmp (t) e support if OpenSSL, librtmp or GMP are not used [NO]–ENABLE-GMP enable GMP, needed fo R rtmp (t) e support if OpenSSL or librtmp is not used [no]–enable-gnutls enable GNUTLS, needed for HTTPS support if OPENSS L is not used [no]–disable-iconv disable iconv [autodetect]–enable-jni enable JNI support [No]–enable-ladspa enable LAD SPA audio filtering [No]–enable-libass enable libass subtitles rendering, needed for subtitles and ass filter [no]–enabl E-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-libebur128 enable libebur128 fo R EBU R128 measurement, needed for loudnorm filter [NO]–ENABLE-LIBFDK-AAC enable AAC de/encoding via LIBFDK-AAC [No]–ena Ble-libflite Enable Flite (voice synthesis) support via Libflite [no]–enable-libfontconfig enable libfontconfig, useful f or DrawText filter [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 D E/encoding via libgsm [no]–enable-libiec61883 enable iec61883 via libiec61883 [NO]–ENABLE-LIBILBC enable ILBC De/encodin G via LIBILBC [No]–enable-libkvazaar enable HEVC encoding via Libkvazaar [No]–enable-libmodplug enable ModPlug via LIBMO Dplug [No]–enable-libmp3lame Enable MP3 encoding via Libmp3lame [no]–enable-libnut enable NUT (DE) muxing via Libnut, Nat Ive (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 de/encoding via openjpeg [no]–enable-libopenmpt en Able decoding tracked files via libopenmpt [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]–enabl E-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 LIBSMB Client [No]–enable-libsnappy enable Snappy compression, needed for HAP encoding [NO]–ENABLE-LIBSOXR enable Include LIBSO XR resampling [no]–enablE-libspeex enable Speex de/encoding via Libspeex [no]–enable-libssh enable SFTP protocol via LIBSSH [No]–enable-libtesse Ract enable tesseract, needed for OCR filter [No]–enable-libtheora Enable Theora encoding via Libtheora [NO]–ENABLE-LIBT Wolame enable MP2 encoding via Libtwolame [no]–enable-libv4l2 enable libv4l2/v4l-utils [No]–enable-libvidstab enable vid EO stabilization using Vid.stab [No]–enable-libvo-amrwbenc enable AMR-WB encoding via Libvo-amrwbenc [No]–enable-libvorb is enable Vorbis en/decoding via Libvorbis, native implementation exists [NO]–ENABLE-LIBVPX enable VP8 and VP9 De/encodin G 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]–ENABL E-libxavs enable AVS encoding via Xavs [NO]–ENABLE-LIBXCB enable X11 grabbing using XCB [Autodetect]–enable-libxcb-shm E Nable 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 enc oder exists [no]–enable-libzimg enable z.lib, needed for Zscale filter [NO]–ENABLE-LIBZMQ enable message passing via Lib ZMQ [NO]–ENABLE-LIBZVBI enable teletext support via LIBZVBI [No]–disable-lzma disable Lzma [autodetect]–enable-decklink Enable Blackmagic DeckLink I/O support [No]–enable-mediacodec enable Android mediacodec support [NO]–ENABLE-NETCDF Enab Le NETCDF, needed for sofalizer filter [no]–enable-openal Enable OpenAL 1.1 capture support [NO]–ENABLE-OPENCL enable Op Encl Code–enable-opengl enable OpenGL rendering [No]–enable-openssl enable OpenSSL, needed for HTTPS support if GnuTLS I s not used [no]–disable-schannel disable Schannel SSP, needed to TLS support on Windows if OpenSSL and GnuTLS not us Ed [autodetect]–disable-sdl2 Disable SDL2 [autodetect]–disable-securetransport disable Secure Transport, needed for TLS support on OS X if OpenSSL an D GnuTLS are not used [Autodetect]–enable-x11grab enable X11 grabbing (Legacy) [no]–disable-xlib disable Xlib] [Autodetec t]–disable-zlib disable zlib [AutoDetect] hardware acceleration (hardware acceleration)

FFmpeg default implementation of the mobile end (Android and iOS) of the hard codec, you can choose Disable are opened by default, you can turn off, you can choose to enable the need to solve their own dependence. Option Description –disable-audiotoolbox Disable Apple audiotoolbox code [Autodetect]–enable-cuda enable dynamically linked Nvidia CUD A code [no]–enable-cuvid enable Nvidia cuvid support [autodetect]–disable-d3d11va disable Microsoft Direct3D video AC Celeration code [autodetect]–disable-dxva2 Disable Microsoft DirectX 9 video Acceleration Code [AUTODETECT]–ENABLE-LIBMF x Enable Intel mediasdk (AKA Quick Sync Video) code via LIBMFX [NO]–ENABLE-LIBNPP enable Nvidia performance Primitives-ba SED code [no]–enable-mmal enable Broadcom multi-media abstraction Layer (Raspberry Pi) via mmal [No]–disable-nvenc Disab Le Nvidia video encoding code [AUTODETECT]–ENABLE-OMX enable OpenMAX IL code [no]–enable-omx-rpi enable OpenMAX IL code For Raspberry Pi [no]–disable-vaapi Disable video Acceleration API (mainly Unix/intel) code [AUTODETECT]–DISABLE-VDA Dis Able Apple Video Decode acceleration code [autodetect]–disable-Vdpau disable Nvidia video Decode and presentation APIs for Unix code [autodetect]–disable-videotoolbox Disable Videotoolb Ox code [AutoDetect] tool chain option (toolchain options)

The FFmpeg code itself supports Cross-platform, and to compile different platforms requires the deployment of a different platform's cross compilation tool chain. FFmpeg are all C code, so there is no need to configure C + + Sysroot. A few arch,cpu,cross-prefix,enable-cross-compile,sysroot,target-os,extra-cflags,extra-ldflags,enable-pic are commonly used. Android and iOS now have almost no armv5 devices, so it would be nice to compile these two platforms with ARMv7 and ARMV8. Option Description –arch=arch Select target Schema [armv7a/aarch64/x86/x86_64 etc]–cpu=cpu Select target cpu[armv7-a/armv8-a/x86/x86_64]–cross-prefix= PREFIX sets the prefix of the Cross compilation tool chain, not the Gcc/nm/as command, such as the Android 32-bit cross-compilation chain $ndk_dir/toolchains/arm-linux-androideabi-$toolchain _ version/prebuilt/linux-$host _arch/bin/arm-linux-androideabi-–progs-suffix=suffix program name suffix []– Enable-cross-compile if the target platform differs from the compilation platform, you need to enable it to –sysroot=path the header files and locations of the cross tool chain, such as the Android 32-bit location $ndk_dir/platforms/android-14/ Arch-arm–sysinclude=path location of cross-build system Headers–target-os=os set Target system –target-exec=cmd command to run exec Utables on Target–target-path=dir path to view "build directory" Target–target-samples=dir path to samples directory On Target–tempprefix=path force fixed dir/prefix instead of mktemp for Checks–toolChain=name Set tool defaults according to NAME–NM=NM with NM tool NM [nm-g]–ar=ar Use archive tool AR [ar]–as=as use as Sembler as []–ln_s=ln_s use symbolic link tool ln_s [ln-s-f]–strip=strip the Use strip tool strip [Strip]–windres=windres Use Windows Resource Compiler windres [windres]–yasmexe=exe use yasm-compatible assembler EXE [yasm]–cc=cc use C Compil ER CC [gcc]–cxx=cxx use C compiler cxx [g++]–objcc=occ use OBJC compiler OCC] [GCC]–DEP-CC=DEPCC use dependency Generato R DEPCC [GCC]–LD=LD use linker ld []–PKG-CONFIG=PKGCONFIG use Pkg-config tool] pkgconfig [pkg-config]–pkg-config-flags=f LAGS Pass additional flags to pkgconf []–ranlib=ranlib with Ranlib ranlib [Ranlib]–doxygen=doxygen use Doxygen to Generat e API doc [DOXYGEN]–HOST-CC=HOSTCC use host C compiler hostcc–host-cflags=hcflags with Hcflags when compiling for host–h Ost-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 the Libs hlibs when linking for Host–host-os=os compiler host OS []–extra-cflags=ecflags settings Cflags, if the Android platform can be based on NDK settings, ARM-LINUX-ANDROIDEABI-4.6/SETUP.MK, recommend reference to your current setup to configure –extra-cxxflags=ecflags add Ecflags to Cxxflags []–extra-objcflags=flags add FLAGS to Objcflags []–extra-ldflags=eldflags reference Cflags–extra-ldexeflags =eldflags add Eldflags to Ldexeflags []–extra-ldlibflags=eldflags add Eldflags to Ldlibflags []–extra-libs=elibs add ELI BS []–extra-version=string version STRING suffix []–optflags=optflags override optimization-related Compiler D-suffix=suffix library name suffix []–enable-pic build position-independent code–enable-thumb compile for thumb tion Set–enable-lto use link-time optimization–env= "env=override" Override the Environment variables advanced options (Advanced optio NS) option description –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-hac K emulate Memalign, interferes with memory debuggers–sws-max-filter-size=n the max filter size Swscale uses [256] optimization options (Op Timization options)

The default is to open the assembly optimization of each platform, some embedded platform may not be able to fully support the architecture of all assembly instructions, so need to shut down. (Own understanding, no combat) option Description –disable-asm Disable all assembly Optimizations–disable-altivec disable AltiVec -VSX Disable VSX optimizations–disable-power8 disable POWER8 optimizations–disable-amd3dnow disable 3dnow! optimization S–disable-amd3dnowext Disable 3dnow! Extended optimizations–disable-mmx disable MMX optimizations–disable-mmxext Disab Le mmxext optimizations–disable-sse disable SSE optimizations–disable-sse2 disable SSE2 optimizations–disable-sse3 DISA ble 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-aes NI disable Aesni optimizations–disable-armv5te disable ARMv5TE optimizations–disable-armv6 aRmv6 optimizations–disable-armv6t2 Disable armv6t2 optimizations–disable-vfp disable VFP optimizations–disable-neon di Sable NEON optimizations–disable-inline-asm Disable use of inline assembly–disable-yasm disable use of Nasm/yasm ASSEMBL Y–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 SI MD optimizations–disable-fast-unaligned Consider unaligned accesses slow developer options (Developer options)

Some switch options for debugging explain –disable-debug disable debugging Symbols–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 Slowdo WN at runtime. –enable-memory-poisoning fill heap uninitialized allocated spaces with arbitrary data–valgrind=valgrind run ' make Fate ' Te STS through Valgrind to detect memory leaks and errors, using the specified valgrind. Cannot to combined WITH–TARGET-EXEC–ENABLE-FTRAPV Trap arithmetic overflows–samples=path location of test samples for F ATE, if not set with $FATE _samples at make invocation time. –enable-neon-clobber-test Check neon registers for clobbering (should is used only for debugging purposes) Bber-test Check XMM registers for clobbering (win64-only; Should is used only for debugging purposes)–enable-random randomly enable/disable components–disable-random–enable-random=list randomly enable/disable Components Or–disable-random=list component groups. The list is a comma-separated list of name[:P Rob] entries where NAME is a component (group) and PROB the probability associate D with–random-seed=value seed VALUE For–enable/disable-random–disable-valgrind-backtrace does not print a backtrace under Valgrind (only applies to–disable-optimizations builds)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.