HE-AAC Plus encoder for Mac (Universal Binary)

This post is outdated, for a more up to date version of both the binary encoder and the sources, please visit this new post.

I needed a native solution to encode HE-AAC Plus audio on a Mac, but there is not any native solution so far right now, so i compiled the reference encoder (enhAacPlusEnc) published by the 3GPP group.
I also created an xCode project to make it easy to manage future builds.
This is an “Universal Binary” build, meaning that it will work on both, Intel based and PowerPC based Macs.

You can download the universal binary encoder by clicking here, and you can download the xcode project by clicking here.

Keep in mind that i had to make some minor modifications in order to make it compile as Universal Binary, so you wil find some minor diferences when comparing with the original source code released by the 3GPP group.

If you have any question, leave a comment here.


19 Responses to “HE-AAC Plus encoder for Mac (Universal Binary)”

  1. I would like to encode a H264-flv-file to be played by the new Flv-player that can handle video in this codec.
    I have downloaded the universal binary encoder and the xcode project on your webpage:

    http://massanti.com/2007/09/30/he-aac-plus-encoder-mac-universal-binary/

    Call me stupid, but i don´t understand ANYTHING what i must do to make this encode my file ?
    Is this some kind of software or what is it ?
    When i double click the file “enhAacPlusEnc” all it does is open the terminal in my Powermac G5 with the following message:

    ……………………………………………..
    Last login: Tue Oct 2 13:17:38 on ttyp1
    /Users/magoo/Desktop/enhAacPlusEnc; exit
    Welcome to Darwin!
    systemadmins-power-mac-g5:~ gunnar$ /Users/magoo/Desktop/enhAacPlusEnc; exit

    **************************************
    * Enhanced aacPlus 3GPP Floating Point Reference Encoder
    * Build Sep 11 2007, 08:38:13
    *
    **************************************

    Usage: /Users/magoo/Desktop/enhAacPlusEnc

    Use – as filename for stdin and/or stdout.

    Example: /Users/magoo/Desktop/enhAacPlusEnc input.wav out.aac 32000 s
    logout
    [Processen slutförd]
    ……………………………………………..

    The other file i downloaded from your site is a folder containing a lot of other folders, eg:
    enhAacPlusEnc.xcodeproj
    libaacenc
    libbitbuf
    and so on….

    What is this ? Do i have to be a programmer in Unix-code to make this work or what ?
    I REALLY hope you can help me out so that i can start encoding my files :-)

    Kind regards
    / Gunnar Aronzon in Sweden

    by Gunnar Aronzon, October 2nd, 2007 at 7:28 am


  2. you must use the encoder like this:

    1st) you dont need to download the folder with the xcodeproj and nothing of that, you just need the binary (the first file in the post).

    2nd) uncompress the file enhAacPlusEnc to any directory that you like.

    3rd) use like this:

    ./enhAacEncPlus yourfile.wav yourfile.aac 32000 s

    That will convert your WAV file into a 32kbps AACPlus V2 audio file in stereo.

    Hope it helps.

    by Diego Massanti, October 2nd, 2007 at 7:35 am


  3. Btw, after re-reading your post, it looks to me as if you are “double clicking” the encoder !
    Well, it doesnt works like that.
    You MUST copy the encoder to some directory, and then use it from the command like the way i posted in my prior comment.

    You REALLY need to know at least the basics of how to execute a program in the command line if you plan to use this and my other tutorials :/

    by Diego Massanti, October 2nd, 2007 at 7:49 am


  4. Hello all,

    I am using the 3GPP reference floating point HE AAC Plus Codec.

    I am using a wav file as input sampled at 16000Hz @ 16-bits per
    sample, mono. The encoder operates at 14000 bit rate. The input file
    is about 1Megs, the .3gp output file is about 64K.

    When I pass .3gp file to decoder with option m16 (for 16Khz) sampling
    the resulting wav file is double the size of the original wav file.

    I am expecting the size to be the same, investigating further I found
    the decoder makes a stereo wav file despite using m16, similarly it generated stereo at 8K for m8.

    I would be greatful if someone knows how to force mono at the output.

    Another query, has anyone tried using the codec at 22Khz, it seems
    that the current version supports 16K, 32K and above…. (and not 8K/
    22K)

    Thanks
    Vimal

    by Vimal, November 16th, 2007 at 8:27 am


  5. […] Nero enhanced AAC audio encoder if you are on linux / unix or my build of the 3GPP HE-AAC encoder if you are on a […]

    by Diego’s Rants » Encoding high quality h.264 / aacPlus v2 files for web streaming with Flash 9, version 2., January 1st, 2008 at 11:05 pm


  6. […] to MP3 with the LAME encoder at 192kbps at maximum quality, and the same file encoded with the 3GPP aacPlus encoder at […]

    by Diego’s Rants » 5 things that apple could / should consider for iTunes 8, January 13th, 2008 at 1:05 am


  7. where can i download the reference codec. i want to compile my own

    by MySchizoBuddy, February 20th, 2008 at 1:04 pm


  8. both links are broken (for xcode and binary). is there any way yo get any of those?

    by wujek, February 29th, 2008 at 8:27 am


  9. Hi there wujek, sorry about that, i have fixed the links already, you can redownload.

    Thanks for reporting it :)

    by Diego Massanti, February 29th, 2008 at 11:26 pm


  10. diego, do you know if that reference codec by 3gpp can be used
    in commercial applications? please contact directly on my email
    as i have additonal questions for you as well.

    by wujek, March 3rd, 2008 at 3:15 pm


  11. hey good info but but i was just wondering by downloading and using this codec, there will no licensing / patent infringement problem?

    for instance in http://www.ipsupermarket.com companies/devlopers buy/sell or license their codecs. so no obligation of license infringement. what’s about here?

    by john_jk, May 9th, 2008 at 5:38 am


  12. Hey, I just read about HE-AAC Plus encoding in an All About Symbian article this week and looked everywhere for an encoder that would work on OS X. This worked perfectly. Thanks!

    by Chris, May 18th, 2008 at 8:22 am


  13. dear diego,

    updated my machine to OSX 10.5.3.. now everything i try to encode results in noisy garbage.
    i’ve tried to compile the xcode-project but i get 35 errors – i’m not used to xcode, though.

    can you help me out? do you need more information?

    thanks a lot,
    tom!

    by tom, June 4th, 2008 at 10:49 am


  14. Thanks for publishing this, you just saved me some headaches and enabled a personal project of mine to proceed!

    by nathan ramella, October 2nd, 2008 at 1:11 am


  15. I am not able to open your Xcode project file.It is giving me error.Also is it possible to create a aacplus file from an mp3 file using your encoder?
    Thanks
    -Arnab

    by Arnab, November 20th, 2008 at 10:34 am


  16. Does this encoder only take .wav as input or does it support other formats for input?

    Thanks,
    Olivier

    by Olivier, January 25th, 2009 at 4:21 pm


  17. Try as I might, I just can’t get enhaacplusenc to work.

    First, attempt:

    – Moved enhaacplusenc and a WAV file I ripped from a CD to ~.
    – Opened Terminal.
    – Typed:
    cd ~
    ./enhaacplusenc .wav test.aac 32000 s
    – Receive the following message:
    Need stereo input for stereo coding mode !

    But I know this is a stereo WAV. I ripped it from a commercial CD, and it even says stereo in iTunes.

    Even though I ultimately want to encode in stereo, I figured I would try mono just to see if I could get a successfully encoding.

    – Typed:
    ./enhaacplusenc .wav test.aac 32000 m

    – Receive the following message:
    No valid SBR configuration found for:
    br=32000
    ch=1
    sr=2797732

    Unable to get the command line encoder to work, I turned to the Xcode project.

    Initially, I couldn’t get enhaacplusenc.xcodeproj to open, which, after investigating, I found was due to Safari 4 (http://support.apple.com/kb/TS2627).

    – Downloaded and installed Xcode 3.1.2.
    – Tried again to open the project file.
    – Received the following message:
    Unable to Open Project

    Project /Users//Downloads/audio/enhAacPlusEnc.xcodeproj cannot be opened because it is missing its project.pbxproj file.

    At this point, I’ve no other ideas to try despite my interest in getting it to work. I’ve tried neroaacenc but am not satified with the HE-AAC v2 results I’m getting.

    Can you help me with enhaacplusenc?

    by Jay, March 15th, 2009 at 9:43 pm


  18. Diego,

    The xcode file you’ve provided for download causes some trouble because of the zip file’s filename. When Mac OS extracts the zip file, it automatically extracts into a folder called “enhAacPlusEnc.xcodeproj”. Mac OS then thinks the entire thing is an Xcode project, even though the real Xcode project files are contained inside and the outer container is supposed to be a folder.

    You may want to consider renaming the zip file so that this doesn’t confuse others that download and think the file is invalid/corrupt. (The error that occurs when trying to open this fake project file is “Project enhAacPlusEnc.xcodeproj cannot be opened because it is missing its project.pbxproj file”.)

    Regards,

    by C Snover, December 1st, 2009 at 10:57 pm


  19. Thank you for figuring this out, i will update the file asap, in any case, i doubt that any person downloading the sources would have a problem realizing whats going on :p
    Cheers, Diego.

    by Diego Massanti, December 2nd, 2009 at 12:13 am