audiocogs / aac.js

AAC decoder in JavaScript.

Home Page:http://audiocogs.org/codecs/aac/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement AAC-HE v1 and v2

devongovett opened this issue · comments

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.

Pull implementations from FAAD2 or something like that?

AAC-HE v2 support would be really awesome!

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

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...

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

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!

Ok, thanks for the quick answer!

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?

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.

WIP on HE-AAC v1 happening here: #13.