[Ffmpeg-devel] How to reduce the ffmpeg avcodec.dll, avformat.dllsize

Rich Felker dalias
Mon Mar 20 15:44:44 CET 2006


On Mon, Mar 20, 2006 at 09:15:38AM +0100, Steve Lhomme wrote:
> Jimmy Zha wrote:
> >Hi,Michel Bardiaux,
> >
> >	Thanks for your help:),i have got the lastest CVS version.
> >	
> >	I figured it out with read the prediscussed in this MailList.Now the 
> >	filesize is avcodec.dll(3.53mb),avformat.dll(408K).
> >
> >	There are some tips for the future guys :):
> >
> >	1. Resolve the "Avcodec.dll staticly linking into the avformat.dll" 
> >	problem,you can get the informations by search this MailList. This 
> >	"bug" will appear while you compile the FFMpeg in MinGW.This point 
> >	can reduce the avformat.dll to the normally size(about 1/10 of 
> >	avcodec.dll).
> >
> >	2. I use follow configure to compile the project:
> >     
> >--enable-mp3lame --enable-gpl --enable-shared --enable-static 
> >--enable-memalign-hack --disable-audio-oss --disable-v41 --disable-bktr 
> >--disable-mpegaudio-hp --disable-dv1394 --disable-network --disable-zlib 
> >--disable-debug --disable-strip --disable-ffserver --disable-ffplay
> >
> >	This point will reduce the avcodec.dll to 3.xx MB.Can anybody give a 
> >	better configure:)? I still want to reduce the size.
> >
> >	
> >	I tried to enable/disable some encoder/decoder, but the effect is 
> >	not very good.It just can reduce xx K :( .
> 
> 
> You'll have to wait until the MinGW gcc is upgraded to gcc4. Because 
> gcc4 can remove unused code from an exe (and I suppose a DLL too when 
> it's available). But I don't know if it will happen in the next few 

I really doubt it. Removing unused code at the linking stage would be
up to the linker, not the compiler, and it's very difficult for a
linker to decide if it can remove things.

If code is not being removed by the compiler with some
encoders/decoders disabled, it's probably because it's accidentally
being used, due to function pointers in the data segment, etc.

Rich






More information about the ffmpeg-devel mailing list