size - Why my ffmpeg libs are so large? -
i compiled ffmpeg libs on ubuntu 64-bits using following script:
   mkdir ~/ffmpeg_sources   #x264
cd ~/ffmpeg_sources    wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2    tar xjvf last_x264.tar.bz2    cd x264-snapshot*    ./configure --prefix="$home/ffmpeg_build" --bindir="$home/bin" --enable-static --disable-asm    make    make install    make distclean   #ffmpeg
cd ~/ffmpeg_sources    wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2    tar xjvf ffmpeg-snapshot.tar.bz2    cd ffmpeg    pkg_config_path="$home/ffmpeg_build/lib/pkgconfig"    export pkg_config_path    ./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                                                                                                                                   make    make install    make distclean    hash -r   but final libs large (for example, libavcodec.a > 140 mb). know why libs large ?
edit
my solutions:
- add option "--disable-debug" ./configure. size of libavcodec fell 150mb 12mb!
 - remove unnecessary codecs: add options -disable-encoders, --disable-decoders , add codecs want --enable-encoder=name , --enable-decoder=name. print list using ./configure --list-encoders --list-decoders. see ./configure --help more information. (my final libavcodec has size of 4mo)
 
note static libs (such libavcodec.a) contain kinds of data stripped off linker. 
but after can add --enable-small ./configure parameters. year ago parameter reduced size of libavcodec.so 14 ~3 mbyte.
Comments
Post a Comment