Skip to main content
Topic: AAC decoder generating mono stream instead of stereo (Read 398 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AAC decoder generating mono stream instead of stereo

I'm using the Helix AAC decoder  (https://hydrogenaud.io/index.php?topic=32051.0) in a streaming player project and noticed that higher bitrate streams (e.g. 128K) are in stereo, but the lower bitrate streams (e.g. 64 or 48K) are decoding to mono. I always thought these lower bitrate streams were truly in mono, until I tried the same stream in Winamp and noticed that's decoding to stereo.

And tried in VLC, and that's also stereo. I'm good with electronics and firmware, but I'm lost on this one. AAC confuses me and someone who knows more about it might have some explanation. Like for example, you have to have this feature to decode to stereo, etc.

 This decoder has SBR, so I tried enabling that. It doubled my output sample rate, but it's still in mono. Anyone know more?

Re: AAC decoder generating mono stream instead of stereo

Reply #1
There are different versions of the AAC encoder, some store a mono signal even at half sampling frequency and then integrate the missing information; the decoder can reconstruct even if less faithfully (check 4 letters code aacp and aacf) .

Re: AAC decoder generating mono stream instead of stereo

Reply #2
Yes, AAC High Efficiency, v1 downsamples the elementary Low Complexity stream to half the input sample rate, then encodes the information to reconstruct the rest of the frequency spectrum, known as Spectral Band Replication. v2 additionally downmixes the original signal to mono, and uses similar information to reconstruct the stereo image, known as Parametric Stereo.

If your decoder doesn't support these things, you may only get the elementary Low Complexity stream.

Re: AAC decoder generating mono stream instead of stereo

Reply #3
Since OP says "streaming", I would assume AAC is encapsulated within something like ADTS.
In ADTS headers, there's no room for SBR/PS codec specific data. Therefore, when HE-AAC (or HE-AACv2) is multiplexed within ADTS, it is always implicit (SBR/PS is not explicitly signaled as present).

Some decoders (for example, ffmpeg) decodes SBR/PS even when they are not explicitly signaled as present. These decoders always look into extension payload in the FIL elements, where SBR/PS data is stored (when they are present).
Others does not.

In other words, not all AAC decoder cannot decode SBR/PS in ADTS, even when the decoder itself supports SBR/PS.

 

Re: AAC decoder generating mono stream instead of stereo

Reply #4
Thanks to everyone who replied. This is helpful.

I'm now trying to get FAAD2 to work. Is this generally considered to support all the current AAC standards? It seems to be quite up to date.


 
SimplePortal 1.0.0 RC1 © 2008-2020