On Apr 2, 2011, at 2:13 PM, Ethan Funk wrote:
VLC wont play it either, and iTunes does (as of some recent version) play aac+ streams... works fine when I send the data encoded with the aacplusenc program, it just won't play it when I use the CoreAudio encoder and with my ADTS packet headers.
Unless I am incorrect that what is commonly called "aacplus" is actually AAC-HEv1 and "aacplusv2" is AAC-HEv2. If I am wrong, then what is aacplusenc actually doing? Either the CoreAudio AAC-HE coder is doing something different that aacplusenc or my ADTS header is wrong for AAC-HE packets, but correct for AAC-LC. And I'd bet on it being my error someplace.
Have you verified that the information you're embedding in your ADTS header relates to the AAC-LC core layer and not to the HE extension layer? Here's an example of the different layers of an HE-v2 stream:
- AAC-LC: 220.25kHz, 1 channel ('aac ')
- AAC-HEv1: 44.1kHz, 1 channel ('aach')
- AAC-HEv2: 44.1kHz, 2 channel ('aacp')
Since the ADTS header only describes the LC layer, according to this example, you need to set the sample rate to 22.025kHz and the channel configuration to 1.
Eric