Skip to main content


Please be aware that much of the software linked to or mentioned on this forum is niche and therefore infrequently downloaded. Lots of anti-virus scanners and so-called malware detectors like to flag infrequently downloaded software as bad until it is either downloaded enough times, or its developer actually bothers with getting each individual release allow listed by every single AV vendor. You can do many people a great favor when encountering such a "problem" example by submitting them to your AV vendor for examination. For almost everything on this forum, it is a false positive.
Topic: Ideas on parsing mp4 file to get extract the raw aac data (Read 8466 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Ideas on parsing mp4 file to get extract the raw aac data

I am trying to get the fdk-aac source code to compile in android NDK
I want to supply an mp4 file (with only aac audio) to this library and decode it wav samples
Looking around I have seen that people recommend using a separate library to open the mp4 file and extract the aac data and supply it to the fdk-aac decoder, as parsing mp4 is too complicated
Following this advice I tried to include the libav library into my project, but it is very difficult to get this combined project compiled in NDK
I don't need all the features of libav, I just need to be able to open an mp4 file and obtain the raw, aac data inside, so that I can decode this data using fdk-aac library as shown here
It seems I can't just copy the libavformat folder from libav to my project, as it uses file from othe folder (like libavcodec for example) as well, and if I include the whole libav project into my project then it's very difficult to get it to compile

Is there any other simple library that can open and parse mp4 file to get the aac audio inside it? Or is there no option but to make an mp4 parser from scratch?

Re: Ideas on parsing mp4 file to get extract the raw aac data

Reply #1
For MP4 parsing, there are the MP4v2 and Bento4 libraries:

MP4v2 is a bit outdated as it has been mostly unmaintained for a while. You might want to use the unofficial TechSmith fork of it which has some additional fixes:

It is reasonably easy to use though and you can find example code on GitHub etc. Cannot say much about Bento4, but it seems to be more up to date with support for MPEG DASH etc.

Be aware of the licenses though. Bento4 is GPL and a commercial license must be bought from the company behind it for non-GPL use. MP4v2 is licensed under the MPL and can be used under that license even in commercial apps.

SimplePortal 1.0.0 RC1 © 2008-2021