Vorbis over AAC - is it worth making the change ?
Aug 12, 2016 at 8:52 PM Thread Starter Post #1 of 38

estreeter

Headphoneus Supremus
Joined
Jun 10, 2009
Posts
8,336
Likes
480
Hi All,
 
      This is hardly groundbreaking stuff, but I think its worth a post or two for those of us looking to fit more files on portable devices. Ripping to FLAC then transcoding to a lossy format makes sense when you find yourself with a 16GB SD card (as does pruning a lot of the 'once in a blue moon' tracks that find their way onto my players). Most of my existing portable stash is 256K AAC, but I soon realised that I needed to find a way to get comparable quality from smaller files.
 
      I'm not going to get bogged down in a discussion of which 'quality' option is best for Opus/Vorbis compression, but I was surprised to see folk on various forums claiming to have good results with OPUS at bitrates as low as 150kbit/s - I normally wont go any lower than 256K with AAC or MP3 VBR. The dealkiller was that Onkyo HF Player doesnt seem to support Opus on Android, so it was back to Vorbis.
 
      Given the joys of listening in noisy environments, and my modest gear, one might argue that I should just go with 256K VBR MP3s and call it a day - I cant think of a single playback app that doesnt support the format and the files are smaller than the AAC originals. Just as I hold to the belief that AAC is a better algorithm than MP3, I'm prepared to countenance the possibility that the claims made for Vorbis over MP3 are accurate.
 
       And that brings me to this little exercise, where I've converted a FLAC file to aac and ogg using  the Linux tools at my disposal (ffmpeg and oggenc, FWIW), only to arrive at very similar outcomes for ~256K VBR:
 
 
someguy@somebox:~/Desktop/CONVERSIONS/comparisons$ ls --block-size=M -l
total 100M
-rw-rw-r-- 1 a* a*  8M Aug 13 09:43 Aura.aac
-rw-r--r-- 1 a* a* 86M Aug 13 09:38 Aura.flac
-rw-rw-r-- 1 a* a*  8M Aug 13 09:53 Aura.ogg

 
        Most of us would happily opt for either 8M file over the FLAC original unless we had a seriously large hard drive on our portable player, but Vorbis does seem to have saved a few KBytes somewhere in the mix:
 
./comparisons$ ls --block-size=K -l
total 102068K
-rw-rw-r-- 1 a* a*  7448K Aug 13 09:43 Aura.aac
-rw-r--r-- 1 a* a* 87232K Aug 13 09:38 Aura.flac
-rw-rw-r-- 1 a* a* 7385K Aug 13 09:53 Aura.ogg
 
         ~65K isnt going to send too many of us dashing off to transcode our libraries, but multiply that by hundreds or even thousands of files and it means I can fit more files on my tablet/phone - that's a win IMO. My listening to date hasnt revealed any apparent difference in quality, but for someone with more revealing gear it might be different. This isnt about lossless vs lossy - no argument that I sacrificed something the day I opted for AAC over the original archived lossless files - its whether or not Vorbis makes sense for those of us who are prepared to accept a lossy format in exchange for having more music on our devices. The clincher for me was the fact that oggenc happily transferred my FLAC metadata to the ogg file, including the cover art - I like it when a plan comes together.
 
estreeter
 
For those who wish to experiment with their own music, this is the command I used to do the transcoding from FLAC to Vorbis (Ubuntu 15.04 'MATE'). Foobar2K makes things a lot simpler but its easier (for me) to script batch conversions on Linux. As always, use what works for you.
 
./comparisons$ /usr/bin/oggenc Aura.flac -q 6.45 -o Aura.ogg
Opening with flac module: FLAC file reader
Encoding "Aura.flac" to
         "Aura.ogg"
at quality 6.45
    [ 99.9%] [ 0m00s remaining] /
Done encoding file "Aura.ogg"
    File length:  3m 53.0s
    Elapsed time: 0m 21.0s
    Rate:         11.1281
    Average bitrate: 257.7 kb/s
 
./comparisons$ file *
Aura.aac:  MPEG ADTS, AAC, v4 LC, 96 kHz, stereo
Aura.flac: FLAC audio bitstream data, 24 bit, stereo, 96 kHz, 22385280 samples
Aura.ogg:  Ogg data, Vorbis audio, stereo, 96000 Hz, ~4294967294 bps, created by: Xiph.Org libVorbis I
 
Aug 13, 2016 at 7:32 AM Post #2 of 38
opus is certainly promising when it comes to small bit rates. but I'm not sure it serves much purpose at high bitrates? as soon as you go for the higher bitrates of lossy formats, the benefits and differences tend to melt away.
opus started as a voip codec AFAIK, and I did love it for online stuff(what gamer wouldn't appreciate low latency anything?^_^). but I didn't see much interest in moving on to opus for music(basically because I'm lazy). just like I didn't see it when came the time to move from mp3 to AAC. in both cases, they are superior lossy formats, I believe we all agree on that. but that superiority manifests itself when using the lowest settings, not so much when using high bitrates. now for the very same reason, I also see nothing wrong using high rate AAC or opus instead of mp3, it's only a matter of what we started with and how lazy we are
biggrin.gif
. they certainly make a lot of sense for one who will use low bitrates and try to save the last extra storage space. for that job mp3 is rather bad.
 
Aug 13, 2016 at 7:06 PM Post #3 of 38
Thanks for your feedback. I guess the important thing is that I'm not losing anything moving to Vorbis for any future rips / transcoding - no-one wants to be stuck with a dead format (SACD, HDCD, DS.... (
evil_smiley.gif
)) . MQA holds a lot of promise if it delivers on the hype, but I cant say I'm willing to spend money on either an MQA-enabled DAC or MQA downloads of my favourite music, assuming they even become available - in that context, playing with different compression schemes is win-win.
 
Aug 14, 2016 at 6:02 PM Post #4 of 38
For anyone wishing to do this via linux without the command line there is a bit of software aptly named Sound Converter.  It will do batch conversions into several formats including AAC, FLAC, Ogg and Opus with a very simple gui and simple settings. Works very quickly and simply.  All drag and drop or pick and select with nary a command line needed.
 
Also don't confuse it with a similar, but less good in my experience Sound Konverter.
 
Also Ogg Vorbis is usually better for a given file size than MP3 though the difference is smaller if you go to MP3 VBR.  Mainly because Vorbis is inherently VBR. 
 
To my knowledge the best sound quality at the lower bitrates is from AAC VBR.  This from blind testing as well not just opinion.  Unless someone has come out without something better in the last couple years.  Now even AAC at lower than 128k rates will suffer.  It is possible Opus is better at lower rates, but by then you are going to lose quality musically. 
 
Aug 14, 2016 at 7:13 PM Post #5 of 38
  For anyone wishing to do this via linux without the command line there is a bit of software aptly named Sound Converter.  It will do batch conversions into several formats including AAC, FLAC, Ogg and Opus with a very simple gui and simple settings. Works very quickly and simply.  All drag and drop or pick and select with nary a command line needed.
 
Also don't confuse it with a similar, but less good in my experience Sound Konverter.
 
Also Ogg Vorbis is usually better for a given file size than MP3 though the difference is smaller if you go to MP3 VBR.  Mainly because Vorbis is inherently VBR. 
 
To my knowledge the best sound quality at the lower bitrates is from AAC VBR.  This from blind testing as well not just opinion.  Unless someone has come out without something better in the last couple years.  Now even AAC at lower than 128k rates will suffer.  It is possible Opus is better at lower rates, but by then you are going to lose quality musically. 

 
The Opus folk make the point that each of the major codecs has undergone significant changes since the listening tests they link to were conducted, making them largely obsolete, but as always in this hobby many will undoubtedly accept the mantra that 'codec X is better than codec Y' based on whatever reference they've seen, regardless of the timeline or the validity of any testing. After skimming the criteria for 'valid' DBT at HydrogenAudio, I'm in no hurry to revisit the ABX comparator in Foobar - its just tedious unless there is a stark difference between 'A' and 'B' and I readily admit that I dont have the hearing or the gear needed to split hairs - all I will say is that by the time I get to 128K MP3 files, it has to be disposable pop or voice and why bother trying to listen critically to either ? I dont get too hung up on jitter measurements, but we all know what the dreaded 'jaggies' sound like and thankfully they are nowhere in evidence with Vorbis at 256K. I remain a huge fan of AAC, but I'm heartened by the out-of-the-box support for Vorbis. No funky ADTS containers, either.
 
Edit: thanks for the tip re Sound Converter - I've been trying to wean myself off the GUI tools as I prepare to leap into the CLI universe with a headless Raspberry Pi3 running mpd and very little else. Compared to where we were when I joined this forum, setting up a music server in 2016 holds far more promise.
 
Aug 17, 2016 at 7:52 AM Post #6 of 38
Ime aac is better at low bitrates. I can't even hear the difference between flac and 128 aac. Ogg Is good down to 96kbps, but he-aac still sounds incredibly convincing at 64kbps.
 
Aug 17, 2016 at 7:59 PM Post #7 of 38
Ime aac is better at low bitrates. I can't even hear the difference between flac and 128 aac. Ogg Is good down to 96kbps, but he-aac still sounds incredibly convincing at 64kbps.

 
Thanks for the feedback. As of today, I'm going to play around with the Vorbis quality setting to see if I can discern major differences between 'q=10' and 'q=5' - presumably there is a sweet spot somewhere in the middle. I assume most of us have seen the graph illustrating said sweet spot (quality for a given file size) for FLAC compression, but it still comes down to the listener's subjective opinion of the end result.
 
I did intend doing some comparisons using Foobar's ABX comparator, but reading the Hydrogenaudio primer on what constitutes a valid DBT (vs '18 lucky guesses' ..), I decided that I have better things to do with my life. Spent wasted too many hours with a pair of HD800s strapped to my head in 2014 trying to discern the difference between SACD/DSD and plain old Redbook, only to be told that I was never going to hear the 'DSD magic' from a Chord Hugo / Marantz SA14-S1 / Oppo BDP-105 (the poster in question had obviously chosen the 'right' source and I hadn't. Bit of a slap in the face when you've just shelled out roughly 4K USD for two disc spinners, but that's audio I guess). The other downside to such testing is that it can seriously erode your appreciation of tracks that you've known and loved for a very long time. As long as I keep as much of my archive in a lossless format, I don't see a downside to simply listening to my music and only making another change if and when I feel the need to.
 
Aug 18, 2016 at 12:44 PM Post #8 of 38
Ime aac is better at low bitrates. I can't even hear the difference between flac and 128 aac. Ogg Is good down to 96kbps, but he-aac still sounds incredibly convincing at 64kbps.

to help clarity, are you talking about vorbis or opus when you say ogg?
 
Aug 18, 2016 at 1:24 PM Post #9 of 38
to help clarity, are you talking about vorbis or opus when you say ogg?


Both. Opus is better than vorbis but down below 96kbps it started pooping out. It's also not helped by the fact it only does 48khz, which is a waste data considering most music is mastered to 44.1khz.

Opus and vorbis both sound bad below 96, while aac he is easier to listen to at even 64kbps and I can't even reliably abx it at 80kbps. Some of it may be down to preference too. Aac likes to chop off quiet high frequencies where other codes are across the spectrum throwing out masked audio. Regardless, above higher bitrates any codec is fine, but technically aac throws out less data than ogg and opus at all bitrates based on phase testing I've done and the data it does throw out is hard to hear even by itself.

Another good thing about aac is that it surprisingly trans codes without losing extra data. A test I did re-encoding a 128kbps aac file 20 times over itself showed no difference to the original encoding.
 
Aug 18, 2016 at 1:44 PM Post #10 of 38
Aac likes to chop off quiet high frequencies where other codes are across the spectrum throwing out masked audio. 

 
Well, the coders do low pass enthusiastically, but it's not a compulsory thing. The Fraunhofer FDK AAC codec (which is probably the nicest short of the awkward Apple one) lets you explicitly configure the cutoff frequency. For example, when encoding with FFMPEG, you could use -cutoff 18000 or so forth. I think it's limited to 20KHz, but that's reasonable.
 
What is neat is that HE-AAC uses SBR, so whips those higher frequencies out of a hat as it goes along. Wondrous times. I don't know how that interacts with the above, though- if anyone has fiddled with this in the FDK coder, please do chime in. 
 
Aug 18, 2016 at 7:20 PM Post #11 of 38
Just a quick query - most of my music is 16/44.1 but I do have some 24/96 FLAC / AIFF. oggenc refuses to work with these files, telling me that I need to supply 16-bit PCM versions. I've read 'The Myth of 24-bit audio' and Schiit's thoughts on just how good a 24-bit DAC has to be to manage as little as 20-bits resolution, but the sad little geek in me is hesitant to convert the files in question even though I will still have the originals on my hard drive. Am I just being overly anal here ? The savings in disk space are phenomenal - duh - and I wouldnt hesitate if these were HDTracks downloads of questionable provenance, but I know how much work (for example) Dream Theater put into their self-titled album to be able to release a genuine 24-bit download. Thoughts ?
 
Aug 18, 2016 at 7:40 PM Post #12 of 38
  Just a quick query - most of my music is 16/44.1 but I do have some 24/96 FLAC / AIFF. oggenc refuses to work with these files, telling me that I need to supply 16-bit PCM versions. I've read 'The Myth of 24-bit audio' and Schiit's thoughts on just how good a 24-bit DAC has to be to manage as little as 20-bits resolution, but the sad little geek in me is hesitant to convert the files in question even though I will still have the originals on my hard drive. Am I just being overly anal here ? The savings in disk space are phenomenal - duh - and I wouldnt hesitate if these were HDTracks downloads of questionable provenance, but I know how much work (for example) Dream Theater put into their self-titled album to be able to release a genuine 24-bit download. Thoughts ?

 
24 bit is a waste of effort for end-user listening. Unlike high sample rates, it's not actively harmful to what you hear, but it just wastes disk space. You won't hear any difference- the greater dynamic range possible in 24 bit isn't relevant at normal listening volumes at all.
 
Bigger bit depths are great for giving you extra headroom and noise floor advantages when you're recording, but that ceases to be an issue once it's all recorded, mixed and mastered. 16 bit has enough dynamic range to exceed the capabilities of your ears by quite a tidy margin. The equipment and the edit benefit from the extra bit depth; fewer issues with noise when putting gain on an element that's too quiet, and less quantisation pain N edits down, for example, but it's totally wasted on you for listening.
 
Once a track is delivered in a "finished" state, non-editing listeners don't need higher bit depths, and absolutely shouldn't have higher sample rates than the high forties (KHz, obvs) or thereabouts.
 
You can keep stuff 24 bit and listen to it, it won't hurt anything, but nor will it gain you anything. Various software will make you 24 bit FLAC if you ask it nicely. I think Foobar2000 will, for example. I don't think you'll get quite as good compression ratios as you would with 16 bit input, though.
 
Aug 18, 2016 at 11:58 PM Post #13 of 38
Ime aac is better at low bitrates. I can't even hear the difference between flac and 128 aac. Ogg Is good down to 96kbps, but he-aac still sounds incredibly convincing at 64kbps.


He-aac is not optimized for music. It was created for encoding voice. You are better off with standard aac for music.
 
Aug 19, 2016 at 10:15 AM Post #15 of 38
  Just a quick query - most of my music is 16/44.1 but I do have some 24/96 FLAC / AIFF. oggenc refuses to work with these files, telling me that I need to supply 16-bit PCM versions. I've read 'The Myth of 24-bit audio' and Schiit's thoughts on just how good a 24-bit DAC has to be to manage as little as 20-bits resolution, but the sad little geek in me is hesitant to convert the files in question even though I will still have the originals on my hard drive. Am I just being overly anal here ? The savings in disk space are phenomenal - duh - and I wouldnt hesitate if these were HDTracks downloads of questionable provenance, but I know how much work (for example) Dream Theater put into their self-titled album to be able to release a genuine 24-bit download. Thoughts ?


when you use lossy formats at the highest bitrate, some sounds(those judged by the algorithm as being masked) can be altered/removed as high as -60db from what I've seen. that's 10bit yet we usually fail to pass an abx.
so you embarrassing not only lossy formats, but lower bitrates ones, while being worry about turning a 24bit album into 16bit, that's a nice little paradox IMO ^_^.
I have actually deleted most of my highres files last year. I keep a few for testing purposes, but after converting and making real sure I didn't mess up the conversion, I decided to only keep 16/44 or 16/48 files(depending on the original sample rate). I don't particularly recommend it, but when I realized how much space those suckers were using, I was like :
Let it go, let it go
Can't hold it back anymore
Let it go, let it go
Turn away and slam the door!
 
 
edit for the 120000spelling mistakes
 

Users who are viewing this thread

Back
Top