[Libav-user] reduce dll size

Camera Man i.like.privacy.too at gmail.com
Fri Mar 7 19:20:16 CET 2014


[My thunderbird, despite repeat reconfiguration, insists on sending HTML 
unless I explicitly force it not to in every message - appologies if you 
can't read the previous HTML version. Guess it's time I upgrade to a 
newer Thunderbird]

On 03/04/2014 06:35 AM, YIRAN LI wrote:

 > Thanks Camera Man,
 >
 > Do you know is there any options in configuration to let the ffmpeg 
make system strip for us?
 >


I see you figured that out.


But let me repeat: the smallest executable set (.dlls + .exe) is to use 
static linking - configure --enable-static --disable-shared to make sure 
that you don't link in any shared library by mistake. If you do that, 
everything you need will be inside your .exe and you will not need any 
of the ffmpeg av*.dll files. When I select just the parts I need 
(encoders, decoders, parser, etc), I can get down to 4MB static 
executable (that does not need any .dll and includes my own code as well 
as everything from ffmpeg that I need), and upx actually cuts that down 
to ~1MB.


However, the license (LGPL) requires that you let user upgrade the 
library without  your help. That is usually easy to achieve when you 
ship .dlls, but not as easy when you do static linking. If you use a GPL 
component (e.g. the x264 encoder), you will need to make your project 
GPL as well, which means releasing complete buildable sources of every 
executable you deliver, or at the very least making an offer to provide 
those.


(Thanks to Carl Eugen Hoyos for correcting my earlier wrong statement 
about the LGPL - I had the GPL and LGPL confused).



More information about the Libav-user mailing list