Why is ogg better?

Hey –

I’ve heard people talking about how great it is that the new FW supports ogg & flac. I understand that flac is lossless and the highest quality. What I don’t understand is … why is ogg so great? It’s another lossy format like mp3…isn’t it?

Ogg is similar to mp3 in that it’s lossless but ogg has a different algorithm. BTW, ogg is not really a codec but a container. Generally speaking when people refer to ogg for music they’re referring to Ogg Vorbis.

Ogg can compress files smaller keeping similar quality or even better quality than mp3, but each one has its drawbacks - each modify certain frequencies or parts, etc. resulting in a different sound than the original.

So what sounds good for one type of genre, may not sound so good for another type of genre.


Ogg Vorbis vs. MPEG-layer3 is complicated. Generally speaking, Ogg has a better compression algorithm, so the same quality music will take less space. In other words, if you compress a WAV file into both 128kb mp3 and 128kb Ogg, the Ogg will sound just as good (some people think it sounds even better) and take up less space. On the downside, since the Ogg vorbis files are better compressed, they require more battery power to decompress.

Ogg vorbis seems to experience less artifacting at lower compression levels. Ever hear those “gluurph” sounds playing a 128kb mp3? I’ve never experienced that with Ogg vorbis files.

Once you get into higher bitrates though, it won’t really matter which one you use.


Message Edited by KCE on 10-05-2008 02:31 PM

@kce wrote:

Ogg is similar to mp3 in that it’s lossless

Both formats are lossy, FLAC for example isn’t.

@kce wrote:

if you compress a WAV file into both 128kb mp3 and 128kb Ogg, the Ogg will sound just as good (some people think it sounds even better) and take up less space.

Wrong, both files would be equal in size (128 kilobit * seconds of playtime), but the Vorbis should sound better.

Vorbis is my preferred Audiocodec, because I can clearly hear a difference in the sound quality of a Vorbis and MP3 file of the same size. At around 128kbps you can’t really tell, if your hearing the original source or the Vorbis copy, whereas an MP3 of the same size sounds distorted (to me). I always convert my music to ~192kbps Ogg Vorbis, just to make sure that I will get the best sound.
Message Edited by zickZackMann on 10-06-2008 04:13 PM

Message Edited by zickZackMann on 10-06-2008 04:14 PM

At lower bit rates, Ogg Vorbis has a significant sound quality advantage over MP3.  At higher bitrates, the latest LAME encoder has gotten pretty close to Ogg Vorbis and the difference isn’t as dramatic.


@kce wrote:

if you compress a WAV file into both 128kb mp3 and 128kb Ogg, the Ogg will sound just as good (some people think it sounds even better) and take up less space.


Wrong, both files would be equal in size (128 kilobit * seconds of playtime), but the Vorbis should sound better.

Wrong too!! :slight_smile:

Because Ogg use a compression algoithm based on quality and not bitrate. Ogg adjust the bitrate depending of the complexity of the sound. If a sound is constant, no need to encode it at a huge bite rate because there is no high frequencies.

That’s why at an average bitrate of 128kps (for exemple), an ogg file is smaller than a mp3 file and his quality is better.

If you really want to compare, you have to compare a mp3 vbr with ogg vorbis.

And due to a better algorithm, for the same quality than a mp3 you have a smaller file. A ogg vorbis at an average bit rate of 128 or 160 kbps is of good quality while you must compress an mp3 à 192kbps to be sure of the quality.

Noes! You can choose average bitrate and say “128kbps pliz” and set the lower min and upper max to 128kbps also.

@jakewoodblues wrote:

Hey –

 

I’ve heard people talking about how great it is that the new FW supports ogg & flac. I understand that flac is lossless and the highest quality. What I don’t understand is … why is ogg so great? It’s another lossy format like mp3…isn’t it?

A less commonly cited advantage of the Ogg Vorbis compression format is that it is sample-accurate. This means that if you compress a WAV file with the Ogg Vorbis codec and then decompress the file, you will end up with a WAV file that has -exactly- the same length as the original WAV file (although the contents will differ, of course, since Vorbis is a lossy audio codec). This is important if you’re recreating a CD and want the track lengths to match precisely so that, for example, CDDB lookups still work.

If you care about archival characteristics, you ought to be using FLAC (which can also be embedded inside an Ogg container file!), but that’s another story.

Another major benefit that the Ogg container format brings to the table is a consistent storage format for arbitrary metadata. This means that instead of having ad-hoc ID3 tags that get glumped into your file haphazardly, and at different locations depending on which version of the ID3 “spec” you’re using, the tags that get added to an Ogg file go in cleanly. This is independent of whether the Ogg file contains FLAC or Vorbis data.

This tag format is also explicitly defined to contain UTF-8 data. This is very important. The ID3 tags that the previous Fuze firmware seemed to parse best had to contain ISO 8859-1 text data. This text format contains only 256 symbols, and only 191 of those are printable - the Wikipedia article contains a table which competently displays which ones. UTF-8, on the other hand, is an encapsulation format: it doesn’t define a strict set of characters, but rather a mapping from bytes into the set of available Unicode characters. This is important because as Unicode evolves, UTF-8 has plenty of room to grow without needing to itself be extended.

However, in order for UTF-8 to be able to encapsulate Unicode text in a useful fashion, the machine that reads that UTF-8 data must have a Unicode font somewhere. Unicode defines far, far more than 191 characters. That’s why you may have noticed that Ogg is a particularly good container format for anime soundtracks, for example, or for, um, Thai folk songs. Or Korean orchestral recordings. Or, say, the lyrics for Tolkien songs in the original Tengwar script.

I’ve got this mental image of the SanDisk firmware engineers saying “you want us to implement what?! On an embedded device with how many kilobytes of RAM?! You understand that the whole purpose of this device is to play audio and not display text, right? This is going to take months! [We need to fold the monkey](http://www.monkeybagel.com/ bleep.html).”

Woo, tangent.

So, one of the several prerequisites for adding Ogg support is the ability to parse, display and generally work with at least some useful subset of UTF-8 encoded Unicode. That’s a huge benefit there.

There are also the technopolitical points about how Ogg Vorbis is technically superior to MP3 because it doesn’t require paying royalties to FraunhoferThompsonGesselWhatever, is about fifteen years more recent and benefits from all that additional research time, supports Ambisonics-based multichannel audio (ever found an MP3 file with more than two channels of audio? Ever tried to compress a 5.1-channel AC3 soundtrack to fit onto a portable audio player? Vorbis makes this possible), theoretically supports bitrate peeling (which is almost completely inconsequential in the context of a portable audio player but which is still a technically nifty feature and an advantage of the format)… I could go on.

The very best thing about the Vorbis codec in the Ogg container file, though, is that it lets those who care do really cool things, and that those who don’t care don’t have to worry about it.

Oh, and it generally compresses better than MP3 for the same quality level, which is the same as saying that it offers better quality at the same compression level.

OK, that previous thing was way too long. The benefits of Ogg Vorbis, as an executive summary:

  • a sane and well-defined tagging model, rather than a very large set of tacked-on ID3 tag formats, none of which are entirely compatible;
  • an extensible tagging model, so that you can add synchronized lyrics to all your Ogg files now without worrying about confusing your Fuze (and who knows? It may support them some day in the future!);
  • better compression at the same quality level as MP3, which is the same as better quality at the same compression level;
  • sample-accurate decoding to allow a CD created from decompressed Ogg Vorbis files to be looked up via CDDB correctly;
  • bitrate peeling, which allows one to generate a lower-quality, smaller Vorbis file from an existing Vorbis file without re-encoding;
  • support for multichannel audio (though I still wouldn’t expect SanDisk’s first implementation to play more than two channels or to downmix);
  • patent- and royalty-free;
  • well-documented spec with multiple available reference implementations with a variety of licenses.
    There are many other, more subtle benefits, but these are the ones that are most likely to be important to forumgoers here.

@Gnomon - very nice summary.  I’ve been following Ogg for a long time and wasn’t even aware of the following points:

  • sample-accurate decoding to allow a CD created from decompressed Ogg Vorbis files to be looked up via CDDB correctly;
  • bitrate peeling, which allows one to generate a lower-quality, smaller Vorbis file from an existing Vorbis file without re-encoding;

I’ve stuck with mp3 for compatibility reasons (main library is FLAC). But now that my Clip and Fuze support Ogg Vorbis, I might finally give it a try.

Hey, let’s not forget the coolest part of OGG:

The OGG fishie.

I’m glad SanDisk has opened support for the format, and capabilities for new users.

Bob  :smileyvery-happy: