mstorsjo / fdk-aac

A standalone library of the Fraunhofer FDK AAC code from Android.

Home Page:https://sourceforge.net/projects/opencore-amr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to compile fdkaac into much smaller library?

Shumpert820 opened this issue · comments

Hello,
my project only need acodec for aac eld(16k sample rate 480 sample numbers) and aac lc(16k sample rate 1024 sample numbers). The size of libfdk-aac after I compiled is about 2MB. However, the device's memory is limited. so, is there any way to compile this lib much smaller, 100KB or even smaller is perfect.

Hi, if you need only AAC encoder on your device you might try my own fdk-aac fork with precise configuration for CMake build options https://github.com/widgetii/fdk-aac/tree/tinification:

-DDISABLE_SBR_ENCODER=ON 
-DDISABLE_SAC_ENCODER=ON
-DDISABLE_META_ENCODER=ON
-DDISABLE_DECODERS=ON

With LTO enabled and static build, I have about 250Kb of the whole AAC encoder binary size. I'm sure there is some space for improvements still

Hi, if you need only AAC encoder on your device you might try my own fdk-aac fork with precise configuration for CMake build options https://github.com/widgetii/fdk-aac/tree/tinification:

-DDISABLE_SBR_ENCODER=ON 
-DDISABLE_SAC_ENCODER=ON
-DDISABLE_META_ENCODER=ON
-DDISABLE_DECODERS=ON

With LTO enabled and static build, I have about 250Kb of the whole AAC encoder binary size. I'm sure there is some space for improvements still

Thank you very much. Is the same way to compress AAC decoder?

I guess you can try the same way to adapt source code as well but I didn't need it for my purposes