Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: HE AAC Audio Quality & Tuning (Read 19954 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HE AAC Audio Quality & Tuning

I am new to the lossy coding world.  I recently became a DROID owner and, in an effort to get down to carrying one device, I ripped all of my music to my DROID at 64 kbps.  In the environments I often listen in (Airports, Planes, Rental Cars, Taxi's, etc.) this is good enough for me and has the great benefit of using minimal storage space.  The efficiency of a codec that provides satisfactory audio quality while using lower bitrates appeals to me.

My question is whether this codec is still being developed and "tuned"?  I guess I am curious as to whether HE-AAC is now about as good as it will ever get.  For example, is the crossover point from real sound to where the SBR begins as finely tuned as possible?  Will we ever get to the point where a 48 kbps rip is perceived qualitatively by a general audience like a 128 kbps AAC file is today?  Thanks!

HE AAC Audio Quality & Tuning

Reply #1
Which codec?

HE-AAC is a standard. There are several implementations of it.

HE AAC Audio Quality & Tuning

Reply #2
My question is whether this codec is still being developed and "tuned"?

Yes,  Fraunhofer and Apple HE-AAC encoders have been updated not so long time ago. For HE-AAC ~64 kbps (variable bitrate VBR)  I'd go with Fraunhofer encoder from the latest Winamp.   


Will we ever get to the point where a 48 kbps rip is perceived qualitatively by a general audience like a 128 kbps AAC file is today?

No, that won't happen. Developers improve a quality of both HE-AAC and LC-AAC. HE-AAC is excelent for low bitrates. For bitrates more than 80 kbps use LC-AAC.
Some wiki articles about this format will be a good start.


HE AAC Audio Quality & Tuning

Reply #4
For HE-AAC ~64 kbps (variable bitrate VBR)  I'd go with Fraunhofer encoder from the latest Winamp. 

Thanks a lot, I take that as a compliment  Sounds like you have done a blind comparison on many items. Would you mind sharing a plot of your results, like you did in another thread? I'm interested in the names of the items where you feel the iTunes encoder is notably better than the one in Winamp. Maybe I or my colleagues can still do something about those.

Will we ever get to the point where a 48 kbps rip is perceived qualitatively by a general audience like a 128 kbps AAC file is today?

I agree with Igor. 48-kbps HE-AAC uses parametric tools for the high frequencies, which don't allow you to perfectly reconstruct the original spectrum. Anyone with normal hearing who concentrates during a comparison test will hear the degradation over the 128-kbps encoding, I would say.

Chris
If I don't reply to your reply, it means I agree with you.

HE AAC Audio Quality & Tuning

Reply #5
Chris,

The Average scores are:

Apple HE-AAC - 2.85
FhG  HE-AAC -  3.01

One would think that the difference is pretty small. Yes, but I've performed the test on these codecs before and the results were the same. Let me see if I can find those results on my hard disk later.
Also the scores are pretty low because I didn't include the low anchor.  The quality is actually pretty good and if it was a public test the average scores would be in range of 3.9-4.0.


Code: [Select]
Apple HEAAC	FhG HEAAC
3 3,7
4,1 4
1,8 4,3
3,2 3,2
3,1 2,8
1,5 1
2 2,4
3 3
2 3,1
1 1,7
3 3,1
1 1
2,7 3,5
3,2 3,6
3,8 3,8
1 1
3,8 3,8
2,5 2,5
4 3,6
3,4 3,1
2 2,5
3,3 3,5
3,4 3,4
3,5 4
3,4 2,9
3,3 3,3
3,3 3,6
3,4 3,2
4 3,8
2,8 1,8
I won't post here particular ABC/HR logs as this test wasn't meant to be published. Nothing special, just private stuff.

Those are 30 samples from public test 64 kbps (2011). There were some pathological cases where both encoders don't perform well.  Those are classical transient samples like castanets,  fatboy and eig.
FhG did a good job comparing to Apple on all samples except the last one. Sample30. It was also a difficult sample for FhG LC-AAC encoder in last public AAC test.
It will be great to see an updates of your encoder.

HE AAC Audio Quality & Tuning

Reply #6
Awesome, thanks a lot, Igor!

FhG did a good job comparing to Apple on all samples except the last one. Sample30. It was also a difficult sample for FhG LC-AAC encoder in last public AAC test.

Yeah, that Sample30 (or 20 in the 96-kbps test) is a pain. I recently added a minimally invasive patch which gives a bit more (hopefully enough) bit-rate to that item without affecting others much. Once that encoder version becomes publicly available, I'll let you know.

Chris
If I don't reply to your reply, it means I agree with you.

HE AAC Audio Quality & Tuning

Reply #7
I recently added a minimally invasive patch which gives a bit more (hopefully enough) bit-rate to that item without affecting others much. Once that encoder version becomes publicly available, I'll let you know.

Bump. Just found a forum post saying that Winamp 5.63 has been released. Relevant quotes from the release notes:

* Improved: [enc_fhgaac] Added VBR mode 6, plus other minor quality improvements
* Fixed: [aacdec] Memory leak when re-syncing to AAC stream
* Updated: [aacdec] Fraunhofer AAC Decoder v1.762.208

Chris
If I don't reply to your reply, it means I agree with you.

HE AAC Audio Quality & Tuning

Reply #8
Good news.
Eagerly waiting to get home and try it.

Thank You.

22 June.

HE AAC Audio Quality & Tuning

Reply #9
I recently added a minimally invasive patch which gives a bit more (hopefully enough) bit-rate to that item without affecting others much. Once that encoder version becomes publicly available, I'll let you know.

Bump. Just found a forum post saying that Winamp 5.63 has been released. Relevant quotes from the release notes:

* Improved: [enc_fhgaac] Added VBR mode 6, plus other minor quality improvements
* Fixed: [aacdec] Memory leak when re-syncing to AAC stream
* Updated: [aacdec] Fraunhofer AAC Decoder v1.762.208

Chris


Hi i have tried encoding in vbr 6 and i find there is hardly any increase in bitrate between 5 and 6. Could you please give me some more info in the changes?

HE AAC Audio Quality & Tuning

Reply #10
Hi i have tried encoding in vbr 6 and i find there is hardly any increase in bitrate between 5 and 6. Could you please give me some more info in the changes?


I just tested on a "difficult" (kraftwerk-style electronic music) track and saw a substantial difference, 222 kbps for VBR5 and 277 kbps VBR6.  For "easy" material, particularly when lacking in high frequency energy, you might not see much of a difference.

HE AAC Audio Quality & Tuning

Reply #11
Hi i have tried encoding in vbr 6 and i find there is hardly any increase in bitrate between 5 and 6. Could you please give me some more info in the changes?


I just tested on a "difficult" (kraftwerk-style electronic music) track and saw a substantial difference, 222 kbps for VBR5 and 277 kbps VBR6.  For "easy" material, particularly when lacking in high frequency energy, you might not see much of a difference.


Ok thanks for the info, yeah the audio was prob easy to encode like you said, its good to see updates on this already excellent encoder 

HE AAC Audio Quality & Tuning

Reply #12
Is there a reference or an explanation somewhere for what frequency SBR begins when using HE AAC?  It would seem to me that the LC "cut point" would be higher in frequency the higher the bit rate used, so that 48 kbps HE AAC has more use of SBR, relatively, than 80 kbps?  Is this correct?

HE AAC Audio Quality & Tuning

Reply #13
Is there a reference or an explanation somewhere for what frequency SBR begins when using HE AAC?


SBR kicks in at 1/4th the sampling rate, so for 44.1khz audio its 11.025khz and above. 

HE AAC Audio Quality & Tuning

Reply #14
Is there a reference or an explanation somewhere for what frequency SBR begins when using HE AAC?  It would seem to me that the LC "cut point" would be higher in frequency the higher the bit rate used, so that 48 kbps HE AAC has more use of SBR, relatively, than 80 kbps?  Is this correct?

Correct. The SBR start (or cross-over) frequency is chosen by the HE-AAC encoder from a table of possible frequencies (or rather, fractions of the sampling rate). The creation of the table is described in the ISO/IEC standard and a bit complicated, so I won't go into detail. Just so much: the minimum start frequency is around 4 kHz, the maximum is half the sampling rate (in "downsampled" SBR mode) or a quarter of the sampling rate ("normal" SBR mode). So what saratoga mentioned is just one possible - and rare - configuration.

Chris
If I don't reply to your reply, it means I agree with you.

HE AAC Audio Quality & Tuning

Reply #15
Is there a reference or an explanation somewhere for what frequency SBR begins when using HE AAC?  It would seem to me that the LC "cut point" would be higher in frequency the higher the bit rate used, so that 48 kbps HE AAC has more use of SBR, relatively, than 80 kbps?  Is this correct?

Correct. The SBR start (or cross-over) frequency is chosen by the HE-AAC encoder from a table of possible frequencies (or rather, fractions of the sampling rate). The creation of the table is described in the ISO/IEC standard and a bit complicated, so I won't go into detail. Just so much: the minimum start frequency is around 4 kHz, the maximum is half the sampling rate (in "downsampled" SBR mode) or a quarter of the sampling rate ("normal" SBR mode). So what saratoga mentioned is just one possible - and rare - configuration.


I didn't realize that.  How does that work with LC backwards compatibility?  Would you get a badly distorted file when listening on an LC only decoder?

HE AAC Audio Quality & Tuning

Reply #16
I didn't realize that.  How does that work with LC backwards compatibility?  Would you get a badly distorted file when listening on an LC only decoder?

Depends on what you consider "badly distorted". It's playable but the frequency bandwidth is limited to that of the AAC LC core coder signal, so it will sound dull/muffled. If the SBR cross-over frequency is 4 kHz, it will probably sound like coming from a telephone on an LC-only decoder.

Chris
If I don't reply to your reply, it means I agree with you.

HE AAC Audio Quality & Tuning

Reply #17
Side note: This is also the rationale behind the so-called "downsampled SBR" mode (which isn't exposed in the Winamp AAC encoder at the moment, as I'm not sure how well it's tuned).  If you run the LC core @ 44.1khz and the SBR @ 88.2khz, and downsample to 44.1khz in the decoder, you can now effectively move the crossover point above 11,025hz

Edit: I should have fully read what Chris wrote before replying, as he already mentions this

HE AAC Audio Quality & Tuning

Reply #18
In my recent experience, there is a surprisingly large difference in sound quality between music at 64kbps and 80kbps, both encoded with iTunes HE-AAC, which is why I posed the question about SBR.  Much more pronounced than I expected.  An interesting comparison (perhaps to assess how well SBR really works) would be a number of 80kbps HE-AAC samples to 96kbps LC-AAC samples. 

My paramount objective is to keep file size small so I can fit everything onto my phone, but I may move to 80kbps because of what I perceive to be much better results.   

Thanks for the answers!

HE AAC Audio Quality & Tuning

Reply #19
The crossover frequency for Apple HE-AAC (CVBR 64 and CVBR 80) is ~9600 Hz.

(Decode M4A file to WAV and make a spectrogram with SoX: sox.exe decoded.wav -n remix 1,2i spectrogram -w K -z 90 )

HE AAC Audio Quality & Tuning

Reply #20
An interesting comparison (perhaps to assess how well SBR really works) would be a number of 80kbps HE-AAC samples to 96kbps LC-AAC samples.


Some time ago  I've performed a personal blind test between Apple HE-AAC/LC-AAC both at 80 kbps.
http://www.hydrogenaudio.org/forums/index....c=74781&hl=
I've prefered a fair but lowpassed LC-AAC (15 kHz) instead of parametrically extended bandwidth (SBR) up to ~20 kHz
During the last ye/ar I've performed some blind tests with Apple HE and LC codecs on another sets of samples and other hardware. The results were same.
It will be great to see your own comparison. 



The crossover frequency for Apple HE-AAC (CVBR 64 and CVBR 80) is ~9600 Hz.

That can explain why Apple HE-AAC CVBR 64 and CVBR 80 have very similar quality in my personal comparison .

HE AAC Audio Quality & Tuning

Reply #21
I may try to do this if I can spare the time - are there web resources that can facilitate ABX testing for a solo practitioner?

From a purely unscientific point of view, at such low bit rates, it would seem like the addition of 16,000 additional bits would inherently result in better sound (64kbps to 80kbps).  But I agree that one's ears are the ultimate arbiter.  My own are not perfect any more - too much time in loud environments, either music or travel or rifle ranges in the military...!

HE AAC Audio Quality & Tuning

Reply #22
are there web resources that can facilitate ABX testing for a solo practitioner?
IgorC’s linked test specifically mentions ABC/HR:
Quote
ABC/HR is an audio comparison tool that allows users to self-conduct double-blind listening tests of digital audio codecs.

From a purely unscientific point of view, at such low bit rates, it would seem like the addition of 16,000 additional bits would inherently result in better sound (64kbps to 80kbps).
Again, in IgorC’s test, it did.

HE AAC Audio Quality & Tuning

Reply #23
Some time ago  I've performed a personal blind test between Apple HE-AAC/LC-AAC both at 80 kbps.
http://www.hydrogenaudio.org/forums/index....c=74781&hl=
I've prefered a fair but lowpassed LC-AAC (15 kHz) instead of parametrically extended bandwidth (SBR) up to ~20 kHz
During the last ye/ar I've performed some blind tests with Apple HE and LC codecs on another sets of samples and other hardware. The results were same.
It will be great to see your own comparison. 

Turns out I have the same preferences as you for classical music, but the opposite for rock music.