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: Highest Possible AAC Quality (Read 3477 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Highest Possible AAC Quality

Challenge: Put the highest quality possible music in my car, disregarding practicalities if the audible difference is possible to discern. 

Constraints: I have an older car that’s USB drive is limited to fat32 formatting and can only play the following music file types: AAC, WMA, or mp3 (not flac, wav, etc.)   [Used my flac archive and converted files with foobar2000.]

Strategy:
(1)   The highest quality between AAC, WMA, and mp3 is regarded as AAC.
(2)   The best AAC encoder is considered to be Apple’s qaac per this link:  https://wiki.hydrogenaud.io/index.php?title=Advanced_Audio_Coding
(3)   Presuming higher bitrate is better, the highest quality Encoding Strategy may be Constrained Variable Bit Rate (CVBR)
a.   This link describes the differences, which suggest CVBR bitrate setting is the nominal and goes up as needed (i.e. produces a higher aggregate bitrate than CBR and ABR).   https://developer.apple.com/library/archive/technotes/tn2237/_index.html
b.   This link’s histograms that suggest CVBR and VBR achieve the highest (and very similar) bitrates:.  https://hydrogenaud.io/index.php/topic,118203.0.html
c.   See table below for analysis showing CVBR produces the largest files and likely highest aggregate bitrates (for a sample size of 1).
(4)   The highest bitrate setting for CVBR is 512 kbps

Comparisons Using The Beatles - Sargent Pepper's Lonely Hearts Club Band   

Type   Enc   Set    kbps      Size   

AIFF   AIFF   N/A   1,411   22,901   100%
WAV   WAV   N/A   1,411   22,901   100%
AL   Apple   N/A   1,411   13,495   59%
flac   flac   level 8   1,411   13,219   58%
AAC   FhG   CBR   512   9,492   41%
AAC   FDK   CBR   512   9,490   41%
AAC   qaac   CVBR   512   7,232   32%
AAC   qaac   VBR   q127   7,003   31%
AAC   qaac   ABR   512   6,698   29%
WMA   9.2   CBR   320   6,671   29%
AAC   qaac   CBR   512   6,621   29%
mp3   Lame   CBR   320   6,595   29%
mp3   Lame   VBR   V0   5,467   24%
AAC   qaac   CVBR   320   5,424   24%
AAC   FDK   VBR   q5 224   5,291   23%
WMA   9.2   VBR   192   4,707   21%
AAC   qaac   CVBR   256   4,374   19%
AAC   qaac   VBR   q64   3,930   17%
mp3   Lame   CBR   128   3,724   16%
AAC   qaac   CBR   128   1,975   9%
Other:
FhG is regarded as the second best AAC encoder, and since it showed a higher file size at 512 kbps, I briefly experimented with it.  However, it was found to introduce audible ‘clicks’ when played in the car, which was not heard when the file was played on a computer.  Speculate this may have been exceeding the bitrate the car’s audio system can support?? 

Results:
I was able to put 2,982 AAC CVBR songs on a Samsung FIT 32 GB USB drive.  For comparison, doing the same with qaac q127 settings, I fit 3,123 songs.  It takes about 17 seconds to read the USB at each startup.  Fidelity wise, it’s definitely a huge improvement over FM radio, but I acknowledge is greatly overkill and neurotic. 
Other than the obvious that this was way overkill, does this logic make sense for creating the theoretically best music file input, given the constraints? 

Re: Highest Possible AAC Quality

Reply #1
Hi Rick Roberts, you did a very nice job here. AAC is indeed better than WMA and MP3. Apple AAC usually ends at the top of listening test. 512 kbps is indeed overkill.
There's really nothing else to mention, except perhaps emphasizing the reduction of the bitrate, as 500 kbps doesn't provide any audible improvement, particularly in a car environment. You can comfortably cut the bitrate in half.
Cheers
Wavpack Hybrid -c4hx6

Re: Highest Possible AAC Quality

Reply #2
The decoder bugs will probably play the biggest role, as you already found. Perhaps there are also some bugs more subtle than clicks, who knows.
If file size is of little concern, FDK AAC encoder is also an option. It only accepts 16 bit input but in a car that's absolutely not going to matter ever.
Is there a possibility to capture the output? E.g. by plugging the output audio jack and recording. Then you could record a couple test samples and test them against originals from the comfort of your home.
Also even MP3(LAME) is perhaps worth comparing, it might have an advantage on the decoder end in terms of possible bugs, because it's so popular and old.
If there is no difference noticeable, the ease of conversion will be the biggest factor long term - some of these encoders are a relative pain in the ass to acquire, build or execute, on some systems.
(P.S. if I were in your situation I'd probably just do a quick check if LAME V0 produces any obvious issues and if not, just go with it - and for further improvement, try room equalization techniques to make the final frequency response closer to flat)
a fan of AutoEq + Meier Crossfeed

Re: Highest Possible AAC Quality

Reply #3
@Rick Roberts
These settings are what I use for a quality 1st approach  (it sounds like what you are after). 

For (Q)AAC  cvbr
qaac -v170

MP3 fast ABR method
lame --abr 200 -f --lowpass 17
lame --abr 250 -f --lowpass 17.5

Re: Highest Possible AAC Quality

Reply #4
Thanks everyone for the feedback!  Regarding the decoder bugs that magicgoose was noting, what experience is there, on these being directly caused  by too high of bitrate?  Or are they typically there regardless of the bitrate?

I already have the USB drive completed with 512 kbps, and not sure if I've done more potential harm than good and should, for example, re-encode my flac files to 256 kbps.  


Re: Highest Possible AAC Quality

Reply #5
I also think the difficulties you're experiencing with FHG encodings above 512 kbps are related to the car's decoder. There's hardly any doubt about this if you say that playback on a PC works perfectly fine in parallel. If you haven't encountered any issues so far with Apple AAC at 512 kbps, I don't think you'll face any in the future. And if you don't feel the need to add music to an already full USB drive, then there's no need to re-encode everything.
Wavpack Hybrid -c4hx6


Re: Highest Possible AAC Quality

Reply #7
My car will not play wav, flac, aiff, or any lossless format, that is why I've focused on AAC (which it will play).  I am happy with AAC qaac CVBR 512 kbps settings, and haven't heard any audible artifacts.  I was just looking for advice in this forum if there were clearly any higher quality choices I could make. 

Another question I have is, how does MS Windows calculate bitrate for files (when you add the column in file explorer)?   See below, it doesn't always correlate with the overall file size, which I found surprising.  (Sorry, my skills making tables in this format are not very good.)  MS kbps represents the bitrate MS Windows says the file is.  The percentages below are that specific file in relation to the wav version (both in size and bitrate).

Type   Enco   Set   kbps   MS kbps   Perc   Size (kb)   Perc
AIFF   AIFF   N/A   1,411   1,411   100%   22,901   100%
WAV   WAV   N/A   1,411   1,411   100%   22,901   100%
AL   Apple   N/A   1,411   784   56%   13,495   59%
flac   flac   level 8   1,411   766   54%   13,219   58%
AAC   FhG   CBR   512   514   36%   9,492   41%
AAC   FDK   CBR   512   509   36%   9,490   41%
AAC   qaac   CVBR   512   359   25%   7,232   32%
AAC   qaac   VBR   q127   344   24%   7,003   31%
AAC   qaac   ABR   512   323   23%   6,698   29%
WMA   9.2   CBR   320   320   23%   6,671   29%
AAC   qaac   CBR   512   318   23%   6,621   29%
mp3   Lame   CBR   320   320   23%   6,595   29%
mp3   Lame   VBR   V0   244   17%   5,467   24%
AAC   qaac   CVBR   320   359   25%   5,424   24%
AAC   FDK   VBR   q5 224   230   16%   5,291   23%
WMA   9.2   VBR   192   205   15%   4,707   21%
AAC   qaac   CVBR   256   289   20%   4,374   19%
AAC   qaac   VBR   q64   139   10%   3,930   17%
mp3   Lame   CBR   128   128   9%   3,724   16%
AAC   qaac   CBR   128   129   9%   1,975   9%

Re: Highest Possible AAC Quality

Reply #8
If you want to be fanatical...   or neurotic...  The best solution is probably to upgrade your car stereo to one that supports Bluetooth, or you can probably get an adapter for your particular car.   Then you use lossless Bluetooth and play lossless files from your phone or from a tablet, etc.

Re: Highest Possible AAC Quality

Reply #9
Thanks.  Regarding Bluetooth, the car actually does support it.  However, from my research, it would surely use the SBC codec for Bluetooth transmission.  Which would mean, even if I used a phone with lossless files, it would re-encode the files to SBC for Bluetooth, which is not regarded as the highest fidelity codec.  From what I understand, SBC would vary the bitrate based on the transmission signal quality, and would top out at 328 kbps (i.e. less bitrate than the AAC files I have already).  I admit, that still is likely plenty good fidelity wise and likely indistinguishable given the environment of being in a car, etc.  But I would also prefer to save storage space on my phone, and use the USB drive in the car. 

Here's a couple articles on bluetooth codecs:

https://addictedtoaudio.com.au/blogs/how-things-work/bluetooth-codecs-getting-music-from-your-phone-to-your-audio-gear

https://addictedtoaudio.com.au/blogs/how-things-work/let-s-measure-the-bluetooth-codecs-which-performs-the-best

Certainly getting a new stereo that could read flac files is another option, but was outside my scope and budget.  It also has a CD player, so that is technically superior file format too (lossless redbook PCM), but is not very practical at 700 MB per disc.   

Re: Highest Possible AAC Quality

Reply #10
AAC is generally transparent at 192 kbps. With a highly sophisticated encoder, minor differences can be perceived here and there if one is trained and in a suitable listening environment. Each increase in bitrate further reduces the intensity of any remaining flaws. I don't recall anyone successfully conducting a conclusive ABX test at 320 kbps. Needless to say, at 512 kbps, trying to find a flaw is like searching for a needle on Mars with a telescope. I don't rule out the theoretical possibility of finding an unusual audio signal that causes issues at this bitrate, but if it hasn't happened in 20 years, I doubt it ever will.

The real problem here, which many of us are aware of, is the trust in lossy codecs. I think you lack confidence in them, and therefore seek the highest bitrate possible. Even with an astronomical bitrate, you regret not having lossless support.

It sometimes takes a bit of time and experience to ease your mind. Keep your lossless files at home, and over time, you might find yourself opting for more practical solutions (moderate bitrates, Bluetooth transmission).
Wavpack Hybrid -c4hx6

Re: Highest Possible AAC Quality

Reply #11
Thanks guruboolez.  I do like the concept of getting the closest possible to my lossless files in fidelity, even though it's way past the point of diminishing returns.   I thought it was a interesting project (in a obsessive way  ;D ), that helped me learn about codecs, and now I can just enjoy the results ...until someone here convinces me I'm wrong. 

If it makes me seem a little more sane, for my iPhone I converted a smaller library of flac files to AAC qaac CVBR 256 kbps, or what Apple calls "iTunes Plus".  Since AirPods use the AAC codec for bluetooth, which I believe is limited to about ~250 kbps, this setting seemed like a safe bet for minimizing re-encoding done by the phone and get the best fidelity (for AirPods).  

Re: Highest Possible AAC Quality

Reply #12
Since AirPods use the AAC codec for bluetooth, which I believe is limited to about ~250 kbps, this setting seemed like a safe bet for minimizing re-encoding done by the phone and get the best fidelity (for AirPods).
Yes, they differ in bitrate, bit depth and sample rate. I found a table here, scroll down: https://www.audiophonics.fr/en/blog-diy-audio/45-the-different-bluetooth-codecs-aac-sbc-aptx-ldac.html

Really, if you create Apple AAC files ~200kbps and beyond, don't waste time. Use your time listening, so much to explore and life is short. I mean you could create a test set of files with QAAC encoder and q64, q73, q82, q91... and likely not be able to distinguish the files at all. And it doesn't matter if Apple calls something Plus or banana. q91 is what I use for everyday listening.
In my car I use mp3 (just LAME v1) because that stupid audio hardware isn't able to display embedded album art from m4a files.

Re: Highest Possible AAC Quality

Reply #13
If 320 is already transparent and BT or CD are the only alternatives then really CD is the only way to get full lossless. There isn't much point of trying to make lossy lossless since artifacts can still show up, different flaws for different encoders for different files, and stereo gaps can be present anyway (where parts of the content are mono anyway), and worse, bit rates can exceed those of lossless when pushing further with no guarantee of improvement.

FAAC 1.3 can go higher than 512 kbps since it doesn't have the moderate block size ceiling but most decoders have limits on block sizes, and quality doesn't fare well on bits to transparency ratio compared to Apple or FhG.

I'm guessing the car doesn't support WMA lossless.

 

Re: Highest Possible AAC Quality

Reply #14
I haven't tried WMA lossless yet.  Thanks for the suggestion.   

Regarding the artifacts, are these the kinds of things you can see when analytically measured, like shown in this article: https://www.stereophile.com/features/308mp3cd/index.html
or "preechoes" discussed in section 5.1.2 of this article: https://www.ee.columbia.edu/~dpwe/papers/Brand99-mp3.pdf?

Again, I understand that the vast majority of artifacts probably audibly disappear at much more moderate bitrates than I used, but am just curious if these are the same kinds of theoretical artifacts, or not. 

Re: Highest Possible AAC Quality

Reply #15
> Since AirPods use the AAC codec for bluetooth, which I believe is limited to about ~250 kbps, this setting seemed like a safe bet for minimizing re-encoding done by the phone and get the best fidelity (for AirPods).  

There is zero chance it's skipping re-encoding, especially if you can hear other signals like notifications on top of what's being played back, it has to go through a (PCM) mixer for that. There isn't really a way to directly mix AAC streams into one, certainly none that wouldn't be a total rocket science.

But AAC was also shown to have good tolerance for generation loss, so it shouldn't matter.
a fan of AutoEq + Meier Crossfeed

Re: Highest Possible AAC Quality

Reply #16
> AAC is generally transparent at 192 kbps

For a *good* encoder, i.e. one that you would use when manually transcoding - I'd agree.
But *generally* - if that includes Bluetooth AAC encoders which also can involve special hardware, I'd be suspicious.
I've heard how it sounds in some (modern!) Android phones when they also force it to 165 kbps, and then it's basically unlistenable (at least, on typically "difficult" to encode music like some black metal).
256, however, should be enough even for crappy encoders and at least not cause anything too disgusting.
a fan of AutoEq + Meier Crossfeed

Re: Highest Possible AAC Quality

Reply #17
So I tried WMA 9.2 lossless and WMA 10, both converted with dBpoweramp (which I love and also used to rip all my music CDs to flac), and neither would play in the car.  AAC remains the best format this car will play. 

"There is zero chance it's skipping re-encoding, especially if you can hear other signals like notifications on top of what's being played back, it has to go through a (PCM) mixer for that. There isn't really a way to directly mix AAC streams into one, certainly none that wouldn't be a total rocket science." - great point magicgoose.  So my take is that this still suggests there is no point in using any higher bitrate than 256 kpbs, since AAC bluetooth will 'down'code it back to it's limit of ~250 kbps. 

Re: Highest Possible AAC Quality

Reply #18
Thanks guruboolez.  I do like the concept of getting the closest possible to my lossless files in fidelity, even though it's way past the point of diminishing returns.   I thought it was a interesting project (in a obsessive way  ;D ), that helped me learn about codecs, and now I can just enjoy the results ...until someone here convinces me I'm wrong. 

If it makes me seem a little more sane, for my iPhone I converted a smaller library of flac files to AAC qaac CVBR 256 kbps, or what Apple calls "iTunes Plus".  Since AirPods use the AAC codec for bluetooth, which I believe is limited to about ~250 kbps, this setting seemed like a safe bet for minimizing re-encoding done by the phone and get the best fidelity (for AirPods).  

At least AFAIK back in 2021 most if not all Wireless Earphone ( including AirPod ) will still re-encode your AAC file and does not support AAC pass through. And I am not sure if things have changed.

Generally speaking 128Kbps AAC-LC from a decent encoder ( Apple iTunes ) is good enough for 80% of people. But of course anyone who ends up on HA is likely the top 1-5% picky listeners. In that case 256Kbps would have been good enough for most cases. The last time we did similar test 320Kbps was already scoring indistinguishable or Transparent for 50%+ of the clips and the rest are all barely any difference with near zero minor annoyance.  I would have usually said 512kbps would have been overkill and practically lossless for 95% of cases if not higher depending on your years.

Basically if you dont mind the storage etc, 512Kbps should make you very happy. :).  Make be someday, we already have WiFi EarPods that could stream 3-4Mbps. So Wireless and Lossless Earphone is coming.

Or you may want to change the audio system on your car just to play lossless.

Re: Highest Possible AAC Quality

Reply #19
Basically if you dont mind the storage etc, 512Kbps should make you very happy. :).
If a 16/44.1 Piano album (generally, the ones with fewer transients) averages at 350 kbps FLAC I would be unhappy inflating it to some bigger lossy file.
IDK. Peace of mind by a really large margin for me is Apple AAC at q100, q109 where files come out with bitrates somewhere between 200/300 kbps.

Picky? I wouldn't say this necessarily applies to average HA members.

Do things right, move on, listen to music instead of wasting your limited time on placebo effects. Audio has long been solved. It makes no sense being picky. Phantasizing about a possible artifact which cannot be abx'ed, while outside of your listening room a mouse passes by - More audibly.

Re: Highest Possible AAC Quality

Reply #20
If a 16/44.1 Piano album (generally, the ones with fewer transients) averages at 350 kbps FLAC I would be unhappy inflating it to some bigger lossy file.
From my experience (limited to Apple AAC true VBR), the encoder always lowers the average bitrate on such quiet material.
I tried with one album using -v 512 and -v 0 (just to be sure, both settings produce identical AAC output).

Lossless = 322 kbps (flac) / 179 Mb
Apple AAC -v 512 [constraint VBR] : 279 kbps / 155 Mb
Apple AAC -a 512 [ABR] : 272 kbps / 151 Mb
Apple AAC -c 512 [CBR] : 320 kbps / 177 Mb

Nero ABR 512 : 273 kbps / 152 Mb
Nero ABR 2-pass 512 : 408 kbps / 226 Mb
Nero CBR 512 : 512 kbps / 284 Mb


Source material: https://www.petrikumela.com/small-creatures-2
Wavpack Hybrid -c4hx6

Re: Highest Possible AAC Quality

Reply #21
Basically if you dont mind the storage etc, 512Kbps should make you very happy. :).
Do things right, move on, listen to music instead of wasting your limited time on placebo effects. Audio has long been solved. It makes no sense being picky. Phantasizing about a possible artifact which cannot be abx'ed, while outside of your listening room a mouse passes by - More audibly.
Hear, hear!
• Listen to the music, not the media it's on
• The older, the 'lossier'

Re: Highest Possible AAC Quality

Reply #22
So I actually have an even older vehicle (true story) that does not have USB, however can play CD-Rs burned with either WMA 9 or mp3 files (not AAC).  So similar to before, and again fully appreciating that differences may not be audible, what is the highest quality format, encoder, and settings?

I believe WMA 9 is a newer format than mp3, however mp3 encoders have continued to evolve after WMA 9 development stopped.  I haven’t seen much comparing them at their best settings, except for this article which suggests mp3 is better at the highest bitrates. 
https://ceciliadigiarty.medium.com/mp3-vs-wma-which-one-should-you-use-682e432ffb66

Regarding mp3, it seems like LAME has long been regarded as the best encoder.  Comparing variable bitrate (VBR) versus constant bitrate (CBR), the following blog has a graph that suggests 320 kbps CBR may be slightly better than V0 VBR.
https://www.head-fi.org/threads/320kbps-vbr-vs-320kbps-cbr-mp3s.462383/

Based on this, I decided to burn 4 CD-Rs of different artists with the following settings, which seem like the best competing options:
1.   WMA 9.2, 2-pass, CBR, 320 kbps
2.   LAME mp3, CBR, 320 kbps
3.   LAME mp3, VBR, V0
4.   WMA 9.2, 2-pass, VBR 192 kbps

I was able to fit about 60 to 140 songs on each 650 MB CD-R, depending on the file sizes of these formats.  All sound great, and not surprisingly, I can’t tell the audible difference between any so far. 

Again, holding audio quality above all else, which may have the best theoretical fidelity?

My suspicion is the responses will tend to be:
(1)   Relax, stop worrying, and enjoy the music (I agree this is the correct answer, but some of us do enjoy the music, but are still curious and enjoy optimizing audio quality.)
(2)   Use LAME mp3 VBR V0 (or lower).
(3)   Use WMA 9.2 VBR 192 kbps (since it fit the most songs on it, and you couldn’t tell the difference  ;) .)

Re: Highest Possible AAC Quality

Reply #23
My suspicion is the responses will tend to be:
(1) Relax, stop worrying, and enjoy the music (I agree this is the correct answer, but some of us do enjoy the music, but are still curious and enjoy optimizing audio quality.)
(2) Use LAME mp3 VBR V0 (or lower).
(3) Use WMA 9.2 VBR 192 kbps (since it fit the most songs on it, and you couldn’t tell the difference  ;) .)
Or:
(4) Conduct an ABX test using a small, representative selection from your music library, not specialized "killer samples", which are best for tuning/finding flaws in lossy formats.
Start with the lowest quality setting and work upward until you can no longer hear any issues. This is your optimal compression level - where file size and sound quality are perfectly balanced for your ears, equipment and use case.

Edit: Like our own ability to follow furniture assembly instructions, we are usually not quite prepared to admit it, but unless you have above-the-average hearing like our resident expert Guruboolez, you'll likely be surprised by how much our cognitive bias affect our perception of audio quality.
• Listen to the music, not the media it's on
• The older, the 'lossier'

Re: Highest Possible AAC Quality

Reply #24
I was able to fit about 60 to 140 songs on each 650 MB CD-R, depending on the file sizes of these formats.  All sound great, and not surprisingly, I can’t tell the audible difference between any so far.
But what about 700 MB CD-Rs? Sure, you can fit about 65 to 150 songs, a few more than a 650 MB one.
Also, WMA 2-pass CBR at 256 kbps should be transparent like MP3 LAME at V0.