When using FFmpeg or LIBAV for development, most of the time the function needs to be relatively single, such as the player only need to de-reuse and decoding module, or even only need an audio or video decoder, or need to use FFMPEG for the specified format encoding, transcoding, etc. At this time if the ffmpeg is not customized, and directly from the official Web download, it may take dozens of m of hard disk space, in order to help the product of thin, need to compile a ffmpeg to meet their needs.
For example, compile FFmpeg's configure parameter (MinGW) under Windows:
./configure--enable-shared--ENABLE-GPL--enable-version3--disable-doc--disable-ffplay--disable-ffprobe-- Disable-ffserver--disable-network--disable-avfilter--enable-memalign-hack--disable-everything -- Enable-decoder=h264--enable-decoder=mp3--ENABLE-DECODER=AAC --disable-debug-- Enable-pthreads--disable-filters--extra-cflags= "-i/c/mingw/include"--extra-ldflags= "-L/C/MinGW/lib"
I only need three decoders for H, MP3 and AAC here, so I use--enable-decoder=h264--enable-decoder=mp3--ENABLE-DECODER=AAC for activation, while the others are all Disbale, In this way, I compiled my own ffmpeg dynamic library is very small, such as:
In fact, through the Configure parameter, you can also compile a smaller dynamic library, but the current size is enough for us to use.
This article is from the "Big bro" blog, make sure to keep this source http://cto521.blog.51cto.com/9652841/1630946
FFMPEG/LIBAV to streamline unwanted modules