Page 1 of 1

How to make VLC very small?

Posted: 03 Mar 2004 13:06
by m0m
Hello!

I'm using MinGW & Msys for Windows
I need to compile VLC to a very small size.

But when I type ./configure --disable-... --disable-... to disable plugins I don't need, the size after compiling is the same for any configurations: 1,8 Mb.

So, please help me to compile VLC to a small size: 300-500 Kb.

Thank you!

Posted: 03 Mar 2004 13:11
by Gibalou
You don't need to specify all these --disable-foo options as most modules are compiled as plugins anyway so you can just get rid of them.

What you want to remove though will be the unnecessary "builtins".
For that, after your ./configure step, just edit vlc-config, find the builtins list and remove them. You may have to remove src/misc/modules_builtin.h which will be regenerated on the next "make".

Also don't forget to "strip" the final executable to remove any debugging or extra data from it.

Small VLC

Posted: 03 Mar 2004 13:26
by m0m
Thanks for your answer.
I'll try to do as you say.

And tell me please, how can I "srip" final executable? I must use any special tools?

Posted: 03 Mar 2004 13:56
by Gibalou
Run the "strip" command on the final executable and dlls.

VLC FILE IS TO BIG

Posted: 03 Mar 2004 14:42
by m0m
FILE IS TO BIG! HELP ME PLEASE!

After editing vlc-config and deleting ALL from builtin section I run make. File size is 1,77 Mb. TO BIG
OK. I use strip on vlc.exe. File size is 1,21 Mb. TO BIG.

For example, when compiling in MSVC 7 file size is 290 Kb, but vlc doesn't work.

I don't want to use MSVC, I want vlc to work, and I want small file size.


HELP ME PLEASE !!!

Posted: 03 Mar 2004 17:13
by Sigmund
Why do you want such a insanly small file?

One more thing you can try is upx. upx is a tool that can compress .exe files in such a way that it will still work. It actually adds a tiny uncompress header to the start of the file and uncompresses it into memory, so if memory usage is your concirn it will not help

Posted: 03 Mar 2004 17:26
by Gibalou
You can also play with gcc's optimisation flags (eg. -Os) but that's about all you can do.

Posted: 12 Apr 2004 19:32
by klumy
i think compressing all exe and dll's from VLC would be a good idea. Current version od VLC needs about 27MB. If you use UPX cou can dramatically reduce the HD space.

Posted: 12 Apr 2004 22:22
by The DJ
That would also be really slow (if you are running on a system that doesn't even have proper HD space)

Posted: 17 Apr 2004 11:37
by klumy
I just have made a test and had compress all DLL's and EXE of VideoLAN with UPX.

The startup speed of the program has been increased from 3 sec to under 1 second. Can anyone confirm this experience?