audiocogs / aac.js

AAC decoder in JavaScript.
http://audiocogs.org/codecs/aac/
GNU Lesser General Public License v3.0
222 stars 45 forks source link

Implement AAC-HE v1 and v2 #1

Open devongovett opened 12 years ago

devongovett commented 12 years ago

Right now we have AAC-LC working but it would be good to support AAC-HE v1 and v2 for streaming purposes. I don't think many of the other profiles are actually used very much these days... Anyway, this means implementing SBR (Spectral Band Replication) and PS (Parametric Stereo) decoding.

mahadevan-k commented 11 years ago

Pull implementations from FAAD2 or something like that?

bawNg commented 11 years ago

AAC-HE v2 support would be really awesome!

marchant commented 10 years ago

This has been opened for a while, the support for AAC-HE would indeed be great! Any update on this?

devongovett commented 10 years ago

I don't have time to work on this myself (sorry!), but I'll accept a working pull request from someone gladly. Would be awesome to have. Otherwise, someone might be able to do an Emscripten compile of some library as a separate project...

marchant commented 10 years ago

would be able to share some pointers and offer some guidance to help someone else do it?

devongovett commented 10 years ago

Sure. I based this implementation on several other projects, linked to from the readme. I also left a bunch of comments in the code (TODOs) with missing functionality. As mentioned above, it would be SBR (Spectral Band Replication) and PS (Parametric Stereo) for HE support, so look for mentions of those in comments and code as starting points. The code starts in decoder.js and goes from there. You'll have to follow the algorithm that is already implemented by comparing it with some other implementations, and you may be able to see where the HE support should hook in by seeing how the existing functions are implemented. Not sure what other advice to give, but if anyone implementing this has questions I will try my best to answer them!

marchant commented 10 years ago

Ok, thanks for the quick answer!

marchant commented 10 years ago

I was able to read and convert and HE-AAC file with this: http://quick-apps.com/audio/ that uses this project: https://github.com/sopel39/audioconverter.js

Did you know that project? Might be a good place to start?

devongovett commented 10 years ago

That's a port of ffmpeg, which is a huge library. It may work for you, but I don't know what your requirements are. Aurora codecs decode as needed and can stream files from various sources, and I'm not sure what that project can do. So it's probably not the best as an Aurora codec for those reasons, but you might be able to get by with it for your project if it fits your requirements. Otherwise, I'd suggest porting a standalone AAC decoder using Emscripten, or doing a hand port to fit in with this library.

devongovett commented 8 years ago

WIP on HE-AAC v1 happening here: https://github.com/audiocogs/aac.js/pull/13.