[Bf-committers] FFMPEG Static Linking
Jacques Beaurain
jacques.beaurain at gmail.com
Wed Nov 22 05:11:29 CET 2006
Hi All,
As discussed in the meeting, I attempted to link FFMPEG statically on
Windows. This taught me some valuable MINGW32 tricks for creating
static libs from GPL sources as well as gave me some metrics as to
what space gain we can achieve by doing this. Here is the metrics and
some technical details follows below:
Full shared library extra size required by adding the FFMPEG dlls to
the Windows install
8.11MB
Blender binary size gain by linking FFMPEG as described below statically:
2.67MB (Minimal support AC3, MPEG2/4, OGG, no MP3)
Estimated size extra for some other formats (estimates on shared or
static binary size but may be smaller even after linking in, still
dealing with some issues here):
500kB h264
700kB XVid
350kB MP3
So bottom line is that I predict about a 4MB improvement linking
statically with some wanted formats which is pretty much what I think
the current official linux builds show (give or take the extra binary
size due to other features):
16.2MB (2.42a)
11.3MB (2.41)
So bottom line is that it may not be worth the effort. On the other
hand I did look at the GStreamer project (someone mentioned it at the
meeting) and it shows promise of a more stable API and possibly
smaller form factor, but I will play with that later.
Fore those interested here are some very brief technical details on what I did:
First I cut out a lot of stuff by using the following configure:
./configure --enable-memalign-hack --disable-decoders --enable-gpl --enable-a
52 --enable-vorbis --enable-libogg --disable-ffmpeg --disable-ffserver --disabl
e-ffplay --disable-shared --disable-debug
install prefix C:\Program Files/FFmpeg
source path /e/Projects/LocalSource/ffmpeg
C compiler gcc
make make
ARCH x86_32 (generic)
big-endian no
MMX enabled yes
CMOV enabled no
CMOV is fast no
gprof enabled no
zlib enabled no
libgsm enabled no
mp3lame enabled no
libnut enabled no
libogg enabled yes
Vorbis enabled yes
FAAD enabled no
faadbin enabled no
FAAC enabled no
XviD enabled no
x264 enabled no
a52 support yes
a52 dlopened no
DTS support no
pp support no
Software Scaler enabled no
AVISynth enabled no
debug symbols no
strip symbols yes
optimize yes
static yes
shared no
video hooking no
SDL support no
Sun medialib support no
pthreads support no
AMR-NB float support no
AMR-NB fixed support no
AMR-WB float support no
AMR-WB IF2 support no
network support no
.align is power-of-two no
License: GPL
Creating config.mak and config.h...
To get the created .a files to statically link in MSVC I added the
libgcc.a file from the MINGW directories to the linking,
Regards,
Jacques
More information about the Bf-committers
mailing list