Low bit rate format: AAC vs OGG?

Status
Not open for further replies.
Joined
Oct 30, 2002
Messages
42,840
Location
Great Lakes
Say you want to recompress some audio to a lower bit rate (around 96 kbps) due to limited storage on a mobile device. Top quality obviously isn't that important, but it should still sound decent.

I've been playing around with some listening tests comparing how AAC (using Nero AAC codec 1.5.4) and OGG (using Xiph.Org libVorbis I 20100325) sound at this bit rate. There wasn't a whole lot of difference, but ears preferred OGG slightly. When I analyzed the frequency spectrum, it looked like AAC was cutting everything above about 15.7 kHz while OGG - around 16.5 kHz.

Do you guys know of any more scientific comparisons of lower bit rate encoders that you can point me to?

Are there any noticeable differences between AAC and OGG decoding when it comes to CPU utilization and the resulting battery life? Speaking of an Android phone here...

Thanks!
 
AAC is superior to OGG Vorbis at all bitrates and is compatible with portable media players (OGG and other open source formats are not big business-friendly; Android being a notable exception, being open source itself...) AAC is *waaaaaaaaaaaaaaay* more CPU-intensive both to encode and decode; which has battery life implications.

AAC is, of course, patent encumbered where OGG and Vorbis are not; so you can use a higher bitrate in OGG (my encoders at "quality 10" are about 480kbps and sound fantastic) and know that in x # of years you'll still be able to get and install the codec. I encode all of my family videos at very high bitrates with OGG Theora for the same reason. (OGG is not a codec, just a container: the audio codec most commonly used in OGG is Vorbis and for video is Theora.)

"Scientific" tests are difficult because both formats are lossy and trying to measure which format remains closest to the original would be missing the point of lossy encoding entirely. I am afraid you're stuck with the subjective opinions of folks with expensive speakers; and they're unanimous in touting AAC's technical superiority over pretty much everything else as of this writing.
 
Originally Posted By: uc50ic4more
AAC is superior to OGG Vorbis at all bitrates and is compatible with portable media players (OGG and other open source formats are not big business-friendly).

Compatibility is not an issue. I'm doing the transcoding for this particular device (phone), and it supports both formats just fine. I'm still keeping the original (in whatever format I have it) on my local hard drive.

Quote:

AAC is *waaaaaaaaaaaaaaay* more CPU-intensive both to encode and decode; which has battery life implications.

That's interesting because when using Foobar2000, encoding to AAC takes less time than to OGG Vorbis. Maybe the OGG Vorbis encoder I'm using isn't optimized for a dual-core cpu...

Quote:

AAC is, of course, patent encumbered where OGG and Vorbis are not; so you can use a higher bitrate in OGG (my encoders at "quality 10" are about 480kbps and sound fantastic) and know that in x # of years you'll still be able to get and install the codec.

Again, high bit rates aren't what I'm trying to achieve, and in x # of years I'll have a different phone and be listening to different music, so it's really a non issue for me, but thanks for the info.
smile.gif
 
Originally Posted By: Quattro Pete
Originally Posted By: uc50ic4more
AAC is superior to OGG Vorbis at all bitrates and is compatible with portable media players (OGG and other open source formats are not big business-friendly).

Compatibility is not an issue. I'm doing the transcoding for this particular device (phone), and it supports both formats just fine. I'm still keeping the original (in whatever format I have it) on my local hard drive.


Having read that, then, I'd say that in ear buds (especially at low bitrates when a LOT of dynamic information is discarded and inter-modulation distortion goes through the roof) any differences are going to be pretty moot anyhow. I'd base my decision on two factors:

1) encoding speed: This may well be machine-specific; although CPU intensity is kinda the only (or at least the most famous) "gotcha" w/ AAC.
2) container quality: Some container formats have difficulty on some devices or with some decoders doing things like seeking within a currently-playing file and resuming from pause. If you've not have any issues w/ OGG files, then this, too, is moot.

Also of note is the "whatever format you already have it". If your music is already in a lossy format then transcoding to another will bring about an almost chaotic multiplication or exacerbation of the artifacts of the two lossy formats; and it may well be unpredictable how mp3 -> AAC and mp3 -> Vorbis will differ *irrespective of AAC and Vorbis' innate existing differences*... If you already have .mp3's, for example, it might be best to remain as .mp3 .
 
Thanks.

The only difference I really heard was slightly more highs using OGG Vorbis at that rate, and that's consistent with the observed frequency range cutoff differences between the two. AAC seems to be cutting more of the high frequencies, but maybe in exchange it does a better job at preserving material in the lower frequencies, who knows...

It may also make a difference that my source is typically a 320 kbps MP3. Maybe going from MP3 to OGG is less harmful than going from MP3 to AAC...
 
Originally Posted By: Quattro Pete
The only difference I really heard was slightly more highs using OGG Vorbis at that rate, and that's consistent with the observed frequency range cutoff differences between the two. AAC seems to be cutting more of the high frequencies, but maybe in exchange it does a better job at preserving material in the lower frequencies, who knows...


Not to worry: Ear buds will make shorter work of highs, lows and dynamic transients much more ruthlessly than any codec I've come across!

Dynamics are where all audio codecs step on their own [censored]. In sound with a lot of dynamic information you have rapidly fluctuating volume levels (duh) as well as wildly variant tones and textures in the "envelope" of a sound from attack to sustain through decay. This is very difficult to compress because there is little tonal consistency from (micro)moment to moment. Codecs really, really, really love over-compressed, heavily equalized modern pop and rock! All codecs like very little "movement" from moment to moment.
 
Unless you are rocking some very high-end headphones or studio monitors, ultra-high bitrate files are not going to sound any better.
 
Originally Posted By: Quattro Pete
When I analyzed the frequency spectrum, it looked like AAC was cutting everything above about 15.7 kHz while OGG - around 16.5 kHz.

Never use frequency analysis to determine the quality of a perceptual codec. It's useless. Less than useless, really, as all it can do is bias or mislead. All that matters is how the file sounds, and looking at a graph can't tell you that. Bear in mind that being able to hear a test tone at X KHz is very different than being able to hear if music has been lowpassed at X KHz.

If you're interested in doing a scientific test, do an ABX test of 12-16 trials (foobar has an ABX tester built right in), and see what your ears think. Unless you've taken the time to really train yourself to hear lossy artifacts and/or have ears that lie well outside the norm, I'd bet that both Vorbis and AAC at 96Kb/s will be essentially equal to your ears. In fact, since your source is at such a high bitrate, assuming it wasn't with some horrible encoder like Blade or something, I wouldn't be surprised if Lame at V6, or maybe even V7, is acceptably solid.
 
Personally, I prefer the AAC HE codec. 64Kb/sec is sufficient for just about any song, even complex jammin' tunes with lotsa cymbals, keyboards, etc.

Anything on my mobile devices gets the AAC HE treatment as I can stuff a lot more tunes/audiobooks/podcasts on there compared to MP3.
 
^ Either you have lousy headphones or you have never heard better. AAC HE is fine for spoken word stuff (podcast, books) but it was never designed for music.
 
It's fine for music. Rush's latest single "BU2B" sounds amazingly clean using AAC HE 64Kb. Tons of guitar, cymbals, etc.

Metallica's "Wasting My Hate" sounds great too.
 
Originally Posted By: gib
If you're interested in doing a scientific test, do an ABX test of 12-16 trials (foobar has an ABX tester built right in),

How do I access the ABX feature? I've looked all over for it in Foobar 1.1.6 (latest) and just can't find it anywhere. The video I've watched says to right-click on two tracks and it should be under Utilities... but not in my Foobar.

Quote:

I'd bet that both Vorbis and AAC at 96Kb/s will be essentially equal to your ears.

As I mentioned at the beginning, I already listened to some samples back to back, and preferred OGG because it sounded more crisp, like it had more of the higher frequency spectrum preserved. The frequency analysis tool just confirmed what I thought I initially heard.
 
Originally Posted By: uc50ic4more
Codecs really, really, really love over-compressed, heavily equalized modern pop and rock! All codecs like very little "movement" from moment to moment.

That's a bit of an oversimplification. Perceptual encoders work in part because, to our ears, loud sounds mask the presence of quiet sounds. On dynamic music, this is highly exploitable because, well, they are loud and quiet sounds to work with.

With today's music that's been ravaged by severe dynamic range compression, everything is jacked up which leaves less quiet stuff to work with for perceptual encoders. The result is that heavily DRC'd music needs higher bitrates to encode well than dynamic music from days gone by. Indeed, heavily DRC'd music stresses encoders more than dynamic music.

But then there are dynamics that are truly severe attacks. A high-hat is a good example. Castanets are another, and a long time nemesis of MP3s. The nature of MP3 is such that sharp attacks in those higher frequency ranges can result in a watery, whooshy sound called pre-echo, a classic lossy artifact. On the other hand, MPC, which was basically an extension of MP2, works differently. It handles sharp attacks well and will succeed where MP3 may struggle. Of course, MPC has other issues all its own.

So the point I want to make is that dynamics in general aren't automatically bad for encoders, especially modern encoders that have come a long way since MP3. Really it depends on exactly what the dynamic is.
 
Originally Posted By: Quattro Pete
Nevermind. I found out I had to install a separate .dll to get the ABX tester feature. It does not come standard.

Yeah. If you haven't found it already, it's available at foobar's website under components. It's interesting to play with. It can be surprising what, once you remove the bias of knowing what you are listening to, your ears find equivalent.

Also, you might want to experiment with something other than the stock build. aoTuV has been on the forefront of the codec for a long time now. You can grab it here.
 
You're right. I tried some more ABX tests on relatively good headphones (cans), and honestly I can't tell them apart. I'll probably just stick with whatever transcodes faster, which is AAC in my case.
 
Originally Posted By: uc50ic4more

AAC is, of course, patent encumbered where OGG and Vorbis are not; so you can use a higher bitrate in OGG (my encoders at "quality 10" are about 480kbps and sound fantastic) and know that in x # of years you'll still be able to get and install the codec. I encode all of my family videos at very high bitrates with OGG Theora for the same reason. (OGG is not a codec, just a container: the audio codec most commonly used in OGG is Vorbis and for video is Theora.)

Theora? Really??? I mean I know it was supposed to be the open sores community's answer to h.264 but its pretty much unspported on anything other than software player. I use h.264 (using the x264 encoder) and Nero AAC wrapped in an mp4 or mkv container depending on its intended use.

I love MEncoder for shrinking my movies down for portability - Complete 7 seasons of Star Trek Next Gen, all 4 Next Gen movies, and ST 2009 all fit into less than 64GB disk space with excellent picture quality and sound.

As for audio, I just stick with the latest LAME encoder set at V0 for compatibility purposes across multiple devices. Files range from 5 to 9MB and audio quality is CD transparent.
 
Originally Posted By: gib
Originally Posted By: uc50ic4more
Codecs really, really, really love over-compressed, heavily equalized modern pop and rock! All codecs like very little "movement" from moment to moment.

That's a bit of an oversimplification.


As I would hope someone whose living was made in motor oil would oversimplify motor oil matters on a professional audio forum.
smile.gif


Originally Posted By: gib
But then there are dynamics that are truly severe attacks. A high-hat is a good example. Castanets are another, and a long time nemesis of MP3s.


A lot of folks who sit behind fancy-pants mixing consoles use jangling car keys to test weaknesses in all sorts of systems, including codecs. Let me tell you: it hurts real, real bad to buy a mic worth more than your car, fire it up and jangle some keys in front of it only to have it sound like you're being spat at by a metallic poltergeist.
 
Originally Posted By: buickman50401
Theora? Really??? I mean I know it was supposed to be the open sores community's answer to h.264 but its pretty much unspported on anything other than software player. I use h.264 (using the x264 encoder) and Nero AAC wrapped in an mp4 or mkv container depending on its intended use.

I love MEncoder for shrinking my movies down for portability - Complete 7 seasons of Star Trek Next Gen, all 4 Next Gen movies, and ST 2009 all fit into less than 64GB disk space with excellent picture quality and sound.

As for audio, I just stick with the latest LAME encoder set at V0 for compatibility purposes across multiple devices. Files range from 5 to 9MB and audio quality is CD transparent.


The beginning of your post managed to be both offensive (Theora? Really???") and condescending ("open sores").

Theora pre-dates h.264, by the way; and isn't really an answer to anything save for the need to have more good quality, free, codecs.

I am not sure if you were interesting in discussing anything, or if you just wanted to seize an opportunity to talk about yourself and your own methods of copying copywritten media using "open sores" projects like Matroska (mkv), MEncoder and LAME. If my use of the codec is so offensive to you that you have to strike the "?" key several times because you just can't believe someone would use an open sores project to encode something as important as family videos (you know, instead of closed sores products that may or may not be around or supported or available or free-to-use in 15 years, based on the self-serving whims of corporations who live and die by keeping people on a treadmill of cyclical obsolescence) then I have two suggestions: 1) Don't use Theora. 2) Ignore posts by uc50ic4more.
 
Originally Posted By: uc50ic4more

The beginning of your post managed to be both offensive (Theora? Really???") and condescending ("open sores").

Oh you noticed?

Quote:
Theora pre-dates h.264, by the way; and isn't really an answer to anything save for the need to have more good quality, free, codecs.

Yes its old tech that competes well with older standards like MPEG-2. It remains to be seen what role it will play in HTML5.

http://arstechnica.com/open-source/news/2010/02/ogg-theora-vs-h264-head-to-head-comparisons.ars

And while "free" it looks like there may be some patent challenges in the future due to possible infringement.

http://timanovsky.wordpress.com/2010/05/02/some-myths-about-h-264-vs-theora/

Quote:
Myth: Theora – open source codec, therefore it could be no problems with patent infringement.
Facts: Video codecs (and audio too) is a knowledge area with extremely high patent density. Everything one can imagine has already been patented, that’s what millions bucks research budgets are spent for. So probability of Theora being patent-clear is zero.

By their own admission in the past, the Theora developers had to use less efficient algorithms to go around patents. This sucks of course, but it all comes down to this: do you want an open FOSS solution, or you want the best solution? Many readers on OSNews will choose the first option, but their teenager brother would probably choose the second.
 
Status
Not open for further replies.
Back
Top Bottom