[Libav-user] Why my ffmpeg libs are so large?

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Apr 7 23:48:47 CEST 2014


Stack Off <stackoff at ...> writes:

> ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" 
> --enable-static --disable-asm

Why are you using --disable-asm?
It is a bad idea.

> ./configure --prefix="$HOME/ffmpeg_build" 
> --extra-cflags="-I$HOME/ffmpeg_build/include" \
> --extra-ldflags="-L$HOME/ffmpeg_build/lib" 
> --bindir="$HOME/bin" --extra-libs="-ldl" --   enable-gpl \
>   --enable-libx264 --enable-x11grab 

> --disable-yasm

Please remove this, it should never be used except for 
debugging.

> But the final libs are really large (For example, 
> libavcodec.a > 140 Mo). Anybody know why my libs 
> are so large ?

Because of the many supported codecs, you can add 
--enable-small --disable-debug to make the library 
smaller (but see below).

> About libavcodec: I understand it contains many 
> codecs but I only need one codec, H.264(x264). 
> Is there a way to remove other codecs using 
> compilation flags?

Start with --disable-everything and add what you need, 
like for example --enable-decoder=h264 --enable-parser=h264

Carl Eugen



More information about the Libav-user mailing list