downclimb

mp3/vorbis bitrate comparison

February 29, 2004

What Ogg Vorbis quality setting produces the same file sizes as LAME --alt-preset standard?


introduction

While there are many factors to consider when comparing one lossy audio codec to another, it helps to remember that the main reason we compress music is to reduce file sizes. Therefore, I believe, a comparison in the quality of two codecs should be done with files of the same size. But what settings should we use?

Before we do any comparison, we need to establish a standard. With compressed music the "standard" is mp3, and extensive testing suggests transparency (a term meaning the quality of the compressed audio is not distinguishable from the original) is most efficiently reached with the LAME codec, version 3.90.3, using the setting "--alt-preset standard".

Using audio files encoded with "lame --alt-preset standard" as a reference, we can encode those same audio files using Vorbis (version 1.0.1, the latest official release) using various quality settings until an Ogg Vorbis file is produced that most closely matches the size of the mp3 produced with lame. Because LAME and Vorbis approach encoding audio in different ways, this file size comparison will need to be repeated with each audio file, and a large and various set of audio files need to be encoded to produce a meaningful result.

procedure

These are the steps I followed in this test:

  1. Choose a diverse selection of 60 audio tracks to use in the test. The music should cover many generes and eras without being too heavily weighted towards one type of music. This selection process is limited by my access to original sources and own good judgement. (I apologize for my noticable lack of classical music.)
  2. Rip each track with Exact Audio Copy (EAC), using its most secure settings, and losslessly encode to FLAC, including tags. These files represent the original sources as closely as possible.
  3. Transcode each FLAC file to mp3 using LAME version 3.90.3 with the "--alt-preset standard" setting, including tags in id3v1 format.
  4. Measure the size of the resultant mp3.
  5. Transcode the same FLAC file to Ogg Vorbis using oggenc version 1.0.1 with the "-q 6" setting, including tags in the regular Vorbis Comment format.
  6. Measure the size of the resultant Ogg Vorbis file.
  7. If the Ogg Vorbis file is smaller than the mp3, re-transcode the Ogg Vorbis file using increasingly higher quality settings until it is larger than the mp3.
  8. If/when the Ogg Vorbis file is larger than the mp3, re-transcode the Ogg Vorbis file with a lower quality setting (in increments of 0.1) until the Ogg Vorbis file is smaller than the mp3.
  9. Record data:
Steps 3-8 were automated with a script and all the processing (except for step 2) was performed on a Debian GNU/Linux workstation. The LAME binary was the lame-ha compile available from the RareWares Debian GNU/Linux Repository for Sid/Unstable.

results

The table of results follows below. Data is sorted by Vorbis quality then by Vorbis average bitrate.

FLAC 1.1.0 --best mp3 lame 3.90.3 --alt-preset standard Ogg Vorbis 1.0.1
Song Avg Bitrate Ratio File Size Average Bitrate File Size Quality Nominal Bitrate Average Bitrate*
Ministry - N.W.O. 983.2 69.7 9744 240 9580 8.3 275 237
The Cure - Just Like Heaven 1085.1 76.9 6064 233 6032 7.3 233 232
Laika - Uneasy 1003.8 71.1 8204 225 8160 7.3 233 224
New Order - Bizarre Love Triangle 1021.8 72.4 6364 224 6328 7.3 233 223
Pearl Jam - Jeremy 964.8 68.4 8296 212 8244 7.1 227 211
Garbage - Stupid Girl 1038.4 73.6 6964 220 6908 7 224 218
Def Leppard - Pour Some Sugar On Me 971 68.8 6576 201 6528 7 224 200
U2 - I Still Haven't Found What I'm Looking For 841.2 59.6 6872 201 6836 7 224 200
Janet Jackson - Love Will Never Do (Without You) 1009.7 71.5 9288 216 9180 6.9 220 214
Helmet - Unsung 944.9 67 6256 215 6172 6.9 220 212
Bond - Victory 1019.4 72.2 7316 213 7132 6.9 220 208
Billy Joel - You're Only Human (Second Wind) 900.4 63.8 7276 206 7188 6.9 220 204
Whitesnake - Here I Go Again 910.6 64.5 6848 203 6812 6.9 220 202
Zero 7 - I Have Seen 924.4 65.5 7620 202 7576 6.9 220 201
Natalie Merchant - Carnival 799.9 56.7 8892 202 8768 6.9 220 199
AC/DC - You Shook Me All Night Long 982.4 69.6 5652 218 5592 6.8 217 216
Bee Gees - Stayin' Alive 909.7 64.5 7252 206 7216 6.8 217 205
Black Sabbath - Iron Man 908.6 64.4 9040 206 9004 6.8 217 205
Fiona Apple - Criminal 972.3 68.9 8660 206 8628 6.8 217 205
Run DMC - Walk This Way 1028.7 72.9 7824 205 7752 6.8 217 203
Huey Lewis And The News - The Heart Of Rock & Roll 851.2 60.3 7424 199 7384 6.8 217 198
Kylie Minogue - Can't Get You Out Of My Head 939.8 66.6 5616 198 5608 6.8 217 198
The Beatles - Get Back 845.7 59.9 4976 211 4944 6.7 214 210
George Benson - Give Me The Night 763.2 54.1 5552 203 5532 6.7 214 202
Mariah Carey - Dreamlover 996.8 70.6 5796 202 5788 6.7 214 202
Marvin Gaye - Let's Get It On 801.8 56.8 5876 197 5832 6.7 214 196
Dido - Here With Me 889.3 63 5936 190 5892 6.7 214 189
Steppenwolf - Born To Be Wild 898.6 63.7 5364 205 5320 6.6 211 204
Nine Inch Nails - Head Like A Hole 1031 73.1 7256 197 7248 6.6 211 198
Jimmy Page & Robert Plant - Kashmir 939.1 66.5 18060 197 18044 6.6 211 197
No Doubt - Hella Good 1068.3 75.7 6688 225 6652 6.5 208 224
Johnny Cash - A Boy Named Sue 760.5 53.9 5988 208 5988 6.5 208 209
The Hollies - Bus Stop 850.7 60.3 4460 206 4456 6.5 208 206
Kool & The Gang - Celebration 778.3 55.2 6756 183 6752 6.5 208 183
Norah Jones - Don't Know Why 794.9 56.3 4224 185 4196 6.4 204 184
Blue Six - Let's Do It Together 933.2 66.1 9696 194 9606 6.3 201 193
The Dave Brubeck Quartet - Take Five 856 60.7 7644 191 7584 6.3 201 190
Johnny Cash - Hurt 822.5 58.3 5584 208 5516 6.2 198 206
The Doors - Break On Through 834.1 59.1 3676 203 3676 6.2 198 204
Esthero - That Girl 900.1 63.8 6400 185 6360 6.2 198 184
Mandalay - Insensible 744.2 52.7 5948 167 5928 6.2 198 167
Barry White - Love's Theme 977.5 69.3 6608 215 6564 6.1 195 214
Michael Jackson - Billie Jean 956.4 67.8 7256 201 7188 6.1 195 200
Fleetwood Mac - Rhiannon 787.3 55.8 5652 183 5588 6.1 195 181
Busta Rhymes - Put Your Hands Where My Eyes Could See 815.6 57.8 4168 175 4164 6.1 195 174
Led Zeppelin - Stairway To Heaven 777.7 55.1 11488 195 11416 6 192 194
Air Supply - Even The Nights Are Better 853 60.4 5404 184 5356 6 192 183
Tori Amos - Crucify 839.2 59.5 6696 182 6636 6 192 181
Air - All I Need 821.5 58.2 5604 170 5600 6 192 170
Miles Davis - So What 813.8 57.7 13008 197 12692 5.9 188 192
Blue Oyster Cult - (Don't Fear) The Reaper 869.7 61.6 7116 188 6760 5.9 188 179
Al Green - Love And Happiness 724.7 51.4 7056 187 6604 5.9 188 175
Daryl Hall and John Oates - Maneater 824.5 58.4 5844 174 5724 5.9 188 171
Bad Company - Bad Company 778.7 55.2 6384 179 6052 5.9 188 170
Chicago - Saturday In The Park 845.8 59.9 5132 177 4876 5.9 188 169
Leonard Cohen - Suzanne 685.7 48.6 4924 174 4648 5.9 188 165
Boyz II Men - It's So Hard To Say Goodbye To Yesterday 854.9 60.6 3484 166 3456 5.8 185 165
Aretha Franklin - Respect 683.8 48.5 2336 131 2332 5.7 182 131
James Brown - I Got You (I Feel Good) 675 47.8 2652 130 2644 5.5 176 130
Johnny Cash - Delia's Gone 573.2 40.6 2208 130 2188 5.4 172 130
Averages 877.96 62.2 195.77 6.49 207.40 193.95

*Slightly smaller than mp3 average bitrate because Vorbis files were prepared slightly smaller than the mp3s.

conclusion

This is not a comparison of audible quality! Only personal listening tests could be used to determine which of these mp3s sound better than these Vorbis files, or vice versa, and the results of those kinds of tests are highly influenced by the quality of your equipment and ears. What this experiment does find is that, on average, Ogg Vorbis files encoded with a quality setting of 6.5 are approximately the same size as files encoded with "lame --alt-preset standard", although the range of Vorbis quality settings is rather wide - from "-q 8.3" to "-q 5.4".

If there is any judgement to be made on the quality of these two encoders, it is this: files at the top of the list are more efficiently encoded with Vorbis, and files at the bottom are more efficiently encoded with LAME. That is, Vorbis can use higher nominal bitrates with the files at the top of the list while still producing a file size equal to that produced by LAME. Again, this does not mean these files sound better with Vorbis, although they should. The reverse could be said about the files at the bottom of the list, with LAME appearing to be the more efficient encoder.

It is important to remember that this test was designed using two codecs with settings that most people will find transparent nearly all of the time. This means that if proper listening tests were performed on these files it is not likely that most people would hear any differences.

Most listening tests compare files produced with a particular target (nominal) bitrate. This experiment shows how greatly the average bitrate can vary from the target bitrate. Given that the primary (if not the sole) motivation for audio compression is about file size, it would probably be more fair if listening tests compared files of equal sizes, not equivalent target bitrates. Unfortunately, there is no simple way to produce a file of a given size using today's codecs - the only way is through a test similar to this, encoding and re-encoding a file until the desired file size is produced.

While I do not expect the nature of listening tests to change, I do hope that the issue of file size is not overlooked in our comparisons. Transparency and/or quality with the lowest possible file size, not necessarily bitrate, should be our clearly stated goal.

No CPU cycles were harmed during the production of this experiment. But many, many were used.