FFmpeg compilation details

Source: Internet
Author: User
FFmpeg compilation details

There are many problems with FFMPEG compilation in both Windows and Linux. Therefore, the compilation option is set up here to build a standardized compilation process, so that beginners can quickly eliminate the fear of using FFMPEG, as for the problems encountered, put them in the following option FAQ

Directory

[Hide]

  • 1
    Linux

    • 1.1
      View configure help
    • 1.2
      Option List
    • 1.3
      Precautions

      • 1.3.1
        Make will generate the following files

[Edit]
Linux

[Edit]
View configure help
  • CD FFMPEG
  • ./Configure -- help or generate a text file./configure -- help> ffmpegcfg.txt

[Edit]
Option List

Usage: Configure [Options] Options: [defaults in brackets after descriptions]

Standard options:

 --help                   print this message --log[=FILE|yes|no]      log tests and output to FILE [config.err] --prefix=PREFIX          install in PREFIX [/usr/local] --libdir=DIR             install libs in DIR [PREFIX/lib] --shlibdir=DIR           install shared libs in DIR [PREFIX/lib] --incdir=DIR             install includes in DIR [PREFIX/include/ffmpeg] --mandir=DIR             install man page in DIR [PREFIX/man] --enable-static          build static libraries [default=yes] --disable-static         do not build static libraries [default=no] --enable-shared          build shared libraries [default=no] --disable-shared         do not build shared libraries [default=yes] --enable-gpl             allow use of GPL code, the resulting libav*                          and ffmpeg will be under GPL [default=no] --enable-pp              enable GPLed postprocessing support [default=no] --enable-swscaler        software scaler support [default=no] --enable-beosthreads     use BeOS threads [default=no] --enable-pthreads        use pthreads [default=no] --enable-w32threads      use Win32 threads [default=no] --enable-x11grab         enable X11 grabbing [default=no]

External library support:

 --enable-sunmlib         use Sun medialib [default=no] --enable-dc1394          enable IIDC-1394 grabbing using libdc1394                          and libraw1394 [default=no] --enable-liba52          enable GPLed liba52 support [default=no] --enable-liba52bin       open liba52.so.0 at runtime [default=no] --enable-avisynth        allow reading AVISynth script files [default=no] --enable-libamr-nb       enable libamr-nb floating point audio codec --enable-libamr-wb       enable libamr-wb floating point audio codec --enable-libfaac         enable FAAC support via libfaac [default=no] --enable-libfaad         enable FAAD support via libfaad [default=no] --enable-libfaadbin      open libfaad.so.0 at runtime [default=no] --enable-libgsm          enable GSM support via libgsm [default=no] --enable-libmp3lame      enable MP3 encoding via libmp3lame [default=no] --enable-libnut          enable NUT (de)muxing via libnut,                          native demuxer exists [default=no] --enable-libogg          enable Ogg muxing via libogg [default=no] --enable-libtheora       enable Theora encoding via libtheora [default=no] --enable-libvorbis       enable Vorbis en/decoding via libvorbis,                          native implementations exist [default=no] --enable-libx264         enable H.264 encoding via x264 [default=no] --enable-libxvid         enable Xvid encoding via xvidcore,                          native MPEG-4/Xvid encoder exists [default=no]

Advanced options (experts only ):

 --source-path=PATH       path to source code [/root/ffmpeg] --cross-prefix=PREFIX    use PREFIX for compilation tools [] --cross-compile          assume a cross-compiler is used --target-os=OS           compiler targets OS [linux] --cc=CC                  use C compiler CC [gcc] --make=MAKE              use specified make [make] --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [] --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [] --extra-libs=ELIBS       add ELIBS [] --build-suffix=SUFFIX    suffix for application specific build [] --arch=ARCH              select architecture  [i686] --cpu=CPU                selects the minimum cpu required (affects                          instruction selection, may crash on older CPUs) --enable-powerpc-perf    enable performance report on PPC                          (requires enabling PMC) --disable-mmx            disable MMX usage --disable-armv5te        disable armv5te usage --disable-armv6          disable armv6 usage --disable-iwmmxt         disable iwmmxt usage --disable-altivec        disable AltiVec usage --disable-audio-oss      disable OSS audio support [default=no] --disable-audio-beos     disable BeOS audio support [default=no] --disable-v4l            disable video4linux grabbing [default=no] --disable-v4l2           disable video4linux2 grabbing [default=no] --disable-bktr           disable bktr video grabbing [default=no] --disable-dv1394         disable DV1394 grabbing [default=no] --disable-network        disable network support [default=no] --disable-ipv6           disable ipv6 support [default=no] --disable-zlib           disable zlib [default=no] --disable-vhook          disable video hooking support --disable-debug          disable debugging symbols --disable-mpegaudio-hp   faster (but less accurate)                          MPEG audio decoding [default=no] --disable-ffmpeg         disable ffmpeg build --disable-ffserver       disable ffserver build --disable-ffplay         disable ffplay build --enable-small           optimize for size instead of speed --enable-memalign-hack   emulate memalign, interferes with memory debuggers --disable-encoder=NAME   disables encoder NAME --enable-encoder=NAME    enables encoder NAME --disable-decoder=NAME   disables decoder NAME --enable-decoder=NAME    enables decoder NAME --disable-encoders       disables all encoders --disable-decoders       disables all decoders --disable-muxer=NAME     disables muxer NAME --enable-muxer=NAME      enables muxer NAME --disable-muxers         disables all muxers --disable-demuxer=NAME   disables demuxer NAME --enable-demuxer=NAME    enables demuxer NAME --disable-demuxers       disables all demuxers --enable-parser=NAME     enables parser NAME --disable-parser=NAME    disables parser NAME --disable-parsers        disables all parsers --enable-bsf=NAME        enables bitstream filter NAME --disable-bsf=NAME       disables bitstream filter NAME --disable-bsfs           disables all bitstream filters --enable-protocol=NAME   enables protocol NAME --disable-protocol=NAME  disables protocol NAME --disable-protocols      disables all protocols --list-decoders          show all available decoders --list-encoders          show all available encoders --list-muxers            show all available muxers --list-demuxers          show all available demuxers --list-parsers           show all available parsers --list-protocols         show all available protocols --list-bsfs              show all available bitstream filters

Developer options (useful when working on FFMPEG itself ):

 --enable-gprof           enable profiling with gprof [] --disable-opts           disable compiler optimizations --enable-extra-warnings  enable more compiler warnings --disable-strip          disable stripping of executables and shared libraries

Note: object files are built at the place where configure is launched.

[Edit]
Precautions

[Edit]
Make will generate the following files
  • FFmpeg, ffplay, and ffserver (without debugging information)
  • Ffmpeg_g, ffplay_g (with debugging information)
    • You can use GDB (DDD) to debug the xxx_g file.
    • I am not very clear about the specifics. I used to use ffplay for debugging in the past. I added the configer option and forgot to do so.

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.