<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
text="#000000">
On 03/04/2014 12:58 AM, YIRAN LI wrote:<br>
<br>
<br>
<span style="white-space: pre;">> Hi,<br>
> <br>
> I'm building ffmpeg dlls for Windows using MingW, and the
dlls I got<br>
> seems quite large. libavcodec 8 MB and libavformat 1.5 MB.<br>
> <br>
> Firstly may I know, since ffmpeg is built into several dlls,
is it<br>
> possible that same code got built into each dll so that
there're<br>
> some unnecessary waste? Is it possible to build all code into
</span><br>
<span style="white-space: pre;">> one dll?</span><br>
<br>
<br>
As far as I know there isn't really any waste, and while it is
always possible to build everything into one dll, that is not
supported by the existing configure/make system.<br>
<br>
<br>
If you configure to only use parts you need
(decoders/encoders/parsers), the .dlls may be much smaller. However,
if you care so much about distribution size, you are probably better
off using static linking. You would still need to configure only the
decoders/encoders you need. And you must also abide by the licenses
of the code you use (e.g. libx264 is GPL, meaning that your software
must be GPL if you use it; some ffmpeg is LGPL, meaning that if you
do a static link you will need to LGPL your code as well). <br>
<br>
<br>
<span style="white-space: pre;">> Second, is there any option I
can use to reduce the size of the<br>
> dlls?</span><br>
<br>
<br>
UPX is useful for this - both for .dlls and for .exes; though note
that if you do use upx, then mutliple processes will not share their
read-only memory sections -- e.g. if you have 40MB code (happens
with some C++ code bases...), and you use UPX and run 10 copies, it
will take 400MB of RAM; if you don't use UPX, that code will only
take ~40MB of ram no matter how many copies you run.<br>
<br>
<br>
Do remember the license issues though.<br>
<br>
</body>
</html>