PDA

View Full Version : x264 compile size


leoenc
29th January 2008, 14:59
Following hpn's excellent guide I managed to compile the latest 736 source code, but it came out as only 538k, comparing with the 936k of the official build.

I did not include MP4 output (couldn't make it work), only avis input and pthread. Could that take almost 400k alone?

Is there a list somewhere of all the x264 configure options?

squid_80
29th January 2008, 15:40
I think gpac (mp4) probably could account for most of that.

nm
29th January 2008, 16:31
Is there a list somewhere of all the x264 configure options?
./configure --help

Dark Shikari
29th January 2008, 17:23
x264 with pthreads support but not mp4 is roughly 690k or so--so if you didn't build with pthreads that makes sense perhaps.

akupenguin
29th January 2008, 17:40
compiler version, fprofile, and cygwin vs mingw can also make a large difference in size.

leoenc
29th January 2008, 18:47
Thanks
I did build with pthread, but couldn't figure out how to embed pthreadGC2.dll, so I just place it in the same folder as x264.exe.
I guess that accounts for another 59k.

TheRyuu
29th January 2008, 19:29
The complier used also can make a difference. I believe the older gcc version (3.4.5ish) created a bigger file size due to certain optimizations that are no longer implemented in the later versions (4.2+) because they were found to be ineffective.

With the latest gcc, I'd say with mp4 support you're looking at ~700kB file size. With mp4 support, for me at least, this jumps to 1mB+.

funroll-loops which is a good optimization to use also increase the file size further. Right now I think with VAQ, and some optimizations, we're up to 820kB default without mp4 support.

And to answer your question, ~580kB is entirely possible depending on your compiler, cflags, etc...

Sharktooth
29th January 2008, 19:53
size changes between compiers too (VC, ICL, GCC...) and optimization options.
GCC's --Os will always produce a smaller file than --O2 or --O3 for example..

leowai
31st January 2008, 13:17
Thanks
I did build with pthread, but couldn't figure out how to embed pthreadGC2.dll, ...
Same are what you did now. I also want to know how to compile x264 as a standalone exe with pthread supported.

squid_80
31st January 2008, 13:47
Compile pthreads as a static lib, not a dll.

leowai
31st January 2008, 16:56
Compile pthreads as a static lib, not a dll.

Thanks. Got it to work now. :)

For who interested how I did it:
I used following command to compile the pthreads-w32-2-8-0-release.tar.gz (ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz) source file

make clean GC-static


After compilation complete, copy the Static library libpthreadGC2.a to MinGW's lib folder AND *.h (ftp://sources.redhat.com/pub/pthreads-win32/prebuilt-dll-2-8-0-release/include/) to MinGW's include folder.