Julius' HD600

Creating quality audio-files using Windows, L.A.M.E., Ogg Vorbis

This page started out in 1997 as a personal online reference to some facts & files related to MP3. It leaked to friends, work colleagues in the audio- and broadcasting-field, so more questions needed to be answered here over time. We tried to do that in a way we would like to see it done ourselves. Please keep in mind this was not a paid project, nor did we expect it to get so many visitors.
- The Downloads
- Settings to use for quality MP3 files
- Fighting the "MP3 is not for audio professionals" myth
- L.A.M.E., FM-radio quality and Sample-rate
- Podcast/rivercast settings for L.A.M.E.
- Why the freakin' lowpass?
- So you're the experts?
- Why VBR?


O G G

Ogg Vorbis is more efficient than MP3 and is the state of the art in audio compression technology. Used properly, recent Ogg Vorbis encoders deliver sound quality surpassing MP3 with all possible bitrates.

  • To encode/decode OGG files we recommend OggDropXPd, the aoTuV version with Aoyumi's code.
    Some of you need libmmd.dll for that to work: it's here, unzip and put it in your \Windows\system32\ folder.
    Other free software is dMC, with that just add the ogg codec. And here is a long list of software supporting ogg
  • Best quality/size ratio for Ogg Vorbis: 6 in Quality Management Mode, and here are some settings resulting in high enough quality.
  • For audio-streaming or live-casting we recommend the Oddcast plugins by oddsock to feed your icecast server-software.



    M P 3

    For WAV to MP3, or vice versa, we offer this easy installer, with all files needed;
    RazorLamepack.exe 0.5 MB download Oktober 2006 release
    ( the above as a zip download - for those without C:\Program Files\ )

  • To encode/decode MP3 files we recommend RazorLame, a Windows frontend for the command-line executable of L.A.M.E..
    Using LAME.EXE without having to type command-lines;

    example using LAME with Razorlame
    Note that we marked Only use custom options and copy-pasted switches
    normally seen on a commandline, like you see used in below example:
    encoding with LAME using commandline
    -V9 is the lowest possible quality VBR with LAME,
    as you can see --lowpass 19.7 considerably pulls up the bitrate, mostly caused by high-frequency content in the source audio-file; High frequencies are still very hard to encode for the MP3-format. This is just an example hack, not a commandline you should use.

    Why a Variable Bit Rate?

    There are still people busy spreading lies about audio quality issues involving MP3, VBR and LAME. That is one of the reasons why you still see so many CBR (Constant Bit Rate) MP3 files around, which is, well, just very stupid;

    VBR really is a no-brainer. Near the beginning and ending of a song (assuming it starts and ends softly), where the volume is lower, and the music is less "demanding" in terms of its encodability, it makes sense to drop the bit rate, simply because there's not much there to encode, and the wasted space is overkill. In the middle of the song, where it may be more complicated, the idea of giving the encoder the option of "bumping up" the rate on a frame-by-frame basis is great! You may end up with a file that's the same overall size as a 160kbit/s CBR, but that uses frames as low as 32 on the really dead parts, and as high as 320 on the really tough parts. The bitrate is dynamically adapting to keep the quality constant. To know that the whole file isn't bloated where it isn't necessary, is a real bonus. On top of that:
    If you've ever listened to an MP3 of a complex song at a very low bitrate, you've probably heard the famous watery swishing sound, and artifacts in the treble or high end of the spectrum (such as cymbals), or the muffled tones at bass sounds. With Variable Bit Rate you can keep the song at a stable relative quality level by adjusting the compression rate according to the complexity of the encoded audio. Ogg Vorbis (and VBR in MP3) does this by automatically tuning a compression level for each particle of the input based upon the relative complexity of that slice of sound. An example of what VBR is about: (using EncSpot)

    As you see there are fragments where the audio required 96kbit/s to sustain quality, and there are parts when the mp3 uses 320kbit/s to sustain that same quality. Now, as a CBR freak, what would you do? Either you choose to encode 160kbit/s and have some horrible sounding seconds in your music clip, or you're left to encode this clip in 256 or even 320 kbit/s, wasting a lot of bits in the process. So:
    Dear world, STOP being afraid to use VBR ;-) it is fully supported and legal (even though some software has a hard time accepting this). You should be using VBR because the goal is to keep the quality at a consistent level throughout the song: a quality that has no audible artifacts to the average listener using relatively good equipment, and still have good file size savings. This is the holy grail of audio compression, and something that is simply not possible with CBR. With CBR you'll have artifacts that any untrained ear can hear at some point in almost any given song. If you encoded digital silence, you'd still be encoding it with the much used bitrate of 192kbit/s. In Ogg Vorbis you could have encoded the silence at 4kbit/s!
    The Ogg Vorbis VBR is not the same as the one used for L.A.M.E. MP3 though. For instance, LAME doesn't rely on its psychoacoustic interpretations, it only uses them as suggestions. In Vorbis o.t.o.h. the psychoacoustic analysis is what determines how many bits get used.

    Settings we recommend for LAME/MP3 (best quality/size ratio in our opinion):
    lame in.wav out.mp3 -V2 --vbr-new -q0 --lowpass 19.7

    To give you an indication; If the original WAV is 100 MB, the resulting MP3 will be around 11 MB with this commandline.

    LAME, like Ogg Vorbis, is still improving. For a bleeding edge on quality, special commands for certain LAME-versions are often necessary. So, please note that we're only giving you commandlines for use with the lame-release accompanying RazorLame on THIS page. Amazingly high quality (from big to small sized) MP3-files can be created using:

    -V2 --vbr-new -q0 --lowpass 19.7 -b96
    -V3 --vbr-new -q0 --lowpass 19 -b96

    -V5 --vbr-new -q0 --lowpass 18
    -V6 --vbr-new -q0 --lowpass 17 -b112

    These commandline options can be used the way you see in the Razorlame screenshot above.

    Why the freakin' lowpass?

    More info on Low-pass issues and CD history here
    The --lowpass 19.7 entry in the commandline means that LAME uses polyphase lowpass filtering during encoding to MP3. This roughly means that the lower part of 19.7 kHz will pass, go through, in this case frequencies above 20 kHz will NOT be in your MP3 file. Encoding frequencies above 20 kHz is pretty much ridiculous. We'll try to explain why. Goal of 44.1 kHz sampling (which will have 22.05 kHz as your highest sample frequency) was to have perfect response up to 20 kHz, with a 'safe' range of 2 kHz for anti-aliasing and other A->D issues. The fact we have 44.1 kHz samplerate is a simple result of mathematics and easy handling of data, deriving from video (SONY U-matic), which used to be the only storage medium for audio. Nobody expected this rate would become barrier-free and steepless in the year 1999 ;-) One could debate if harmonics and feelings you have (when hearing the original audio) will be more parent when you can encode up to 22 kHz, but still the level of importance of those frequencies has never been proven.
    Using a lowpass filter creates an MP3 including enough of the human hearing's threshold for the highest frequencies.

    LAME, FM-radio quality and Sample-rate

    Many people have asked us how we use LAME together with FM-radio. Let's explain:
    Before FM-stereo audio goes into the transmitter it's being filtered at 15 kHz (this - among other things - has to do with bandwidth of the transmitter-signal and stereo-keying at 19 kHz). All high frequency content above 15.* kilohertz will be cut off entirely. Some tuners will give you 15.7 kHz as their highest 'clean' audio frequency output, but most transmitters will not even air anything above 15 kHz.
    Conclusively;
    Encoding MP3 audio intended for analog FM-radio, or
    encoding MP3 from audio that's recorded from analog FM-radio (tuner) outputs,
    can safely be done using a commandline like:

    (big to small mp3 file size)
    lame  in.wav out.mp3  -V5 --vbr-new -q0 -b96 --lowpass 15.4 or
    lame  in.wav out.mp3  -V6 --vbr-new -q0 -b96 --lowpass 15.4 or
    lame  in.wav out.mp3  -V7 --vbr-new -q0 -b112 --lowpass 15.4
    with these you'll achieve around 10 times compression, while not losing anything from the FM original. Cutting off from 15 Kc will actually give you higher quality files, since there's more room left for other audio in the spectrum.

    Logically, people then asked at what sample-rate they should record their FM-transmitted radio-audio.
    If the anti-aliasing filter on a 32kHz digitizer is steeper than the original 15kHz filter used when the broadcasts were first made, it's possible that 32kHz digitization might lose a tiny bit of HF energy. The solution to this is to use no anti-aliasing filter before digitization (the material is already band-limited at 15kHz, so it doesn't need further filtering). An absolutely safe choice of sample frequency would be 38kHz, but this is almost never supported. If you are uncertain about the anti-aliasing of your soundcard (the SB Live! for example is safe to use with 32 kHz for FM-stereo mastering) use 44.1kHz, but both 44.1 and 48kHz are certainly overkill for FM-radio...


    Fighting the "MP3 does not deliver professional quality audio" myth.

    Often you hear people say stuff like "I would never encode this song with a lossy codec, even if I couldn't hear the difference, because when I play it, I want to know that I'm hearing all of it." Well, it's easy to find out if you WOULD hear the difference, and if not it's ridiculous to encode above your own quality threshold, because that is not what MP3 is for. In case you intend to use the encoded material later for further processing, or want to archive songs for historic purposes, don't use MP3 and go for a lossless audio-compression format. For Windows, try Monkeysaudio, or FLAC, there's even Winamp plugins for playback (decompression)!

    So, the real important question to ask is: What do you do with the encoded (compressed) audio?
    Will you listen to it, enjoy it, play it as a DJ or on your portable, stuff like that? Then don't use bitrates above ~224 kbit/s. Go with your acceptable minimum, and don't lie to yourself doing that. For us that means Ogg Vorbis files around ~210 kbit/s (encoded with these settings for example), or MP3 files with a VBR around ~220 kbit/s.

    Since audio is being compressed, and the compression schemes are lossy, people think MP3 is inferior to what they call 'CD-quality'. That is complete nonsense; Let's check out the CD-audio format, it can only run 16 bit audio at 44.1 kHz samplerate, while one can create MP3 out of 96 kHz samplerate audio-files with 24 bit resolution. Also, dynamic range and signal-to-noise ratio inside MP3 are determined by the source-audio and can in theory be infinite, while that of an audio-CD can only be as high as the quality of the DA converter you use, which these days is usually of lower quality than when played directly from MP3 using a pro or semi-pro soundcard in a PC. You may like to read a more elaborate piece on this matter in Dutch, over here.
    Compressed audio in the form of MP3 can very well be used 'professionally', as long as you use a high enough bitrate and know what you're doing. We challenge each of you readers to do the test yourselves; Make sure you have a high quality original audio file (WAV/AIFF), encode a good MP3 out of it using -V1 --vbr-new -b112 --lowpass 21 -q0 for example, then decode the MP3 back to a WAV with a new name. Let someone else rename and datestamp both the original WAV and the new one. Now try and guess which one is the original. The best ears out there will guess wrong half the time, wanna bet?


    Net-cast settings for LAME

    For this let's first explain where the name MP3 comes from;
    MP3 stands for MPEG Phase 1 Layer III, or "MPEG-I L3", and is used on the internet as the most popular method of audio data compression allowing a 50 MB ".WAV" file to be compressed to a 5 MB ".MPG" file.
    .mp2 and .mp3 files are MPEG phase 1 Layer II and Layer III compressed files.
    Because MPEG uses two numbered entities (the phase and the layer) this is cause for a lot of confusion;

    Layer I - most simplistic encoding; utilizes adaptive bit allocation, block compounding, and 32 equal-width filtering system for the data compression. Not well received by the computing world, not being used anymore.
    Layer II - 2 to 4 times more complex encoding schemes consisting of bit rates ranging from 32 - 192 kb/s (mono) and from 64 - 384 kb/s (stereo). Improved forms of adaptive bit allocation, block compounding etc. Used moderately for moving picture broadcasts over the internet, also shares the same structure as ATRAC, the MiniDisc encoding format.
    Layer III - modified codec (compressor/decoder) improves high-quality audio/video data compression. Compacts audio/video data into bands of ISDN telecommunications providing for superior compression capabilities. Uses smart technology called "perceptual coding" to compress data by "masking." MPEG 1 originally designed for coding progressive pictures, utilizes multiplexing system to play back audio and video data in close synchronization. This system interweaves the audio and video data creating support for up to 1.5 Mbits/s of non-interlaced streaming code. Produces VCR quality motion picture with usage of only 3-6 MB.
    The most important difference between MPEG Phase 1 and MPEG Phase 2 is the sample frequency of the input file.
    Phase 1 (often called MPEG-I, to make things worse) can handle input streams (or WAV files) with a sample frequency of 48000, 44100 or 32000 Hz.
    Phase 2 (often called MPEG-II, making confusion complete) on the other hand will only support stream for 24000, 22050 and 16000 Hz. Basically, Phase 2 is intended for lower bit rates (e.g. for voice communication, or if you need small files with reduced quality). The lowest bit-rate for MPEG-II is 8 kBits/sec while for MPEG-I the lowest bit rate is 32 kBits/s.

    If your source-recording for a podcast has a sample-frequency of 44.1 kiloHertz, we recommend downsampling to 32 kHz, using this commandline:

    lame  in.wav out.mp3  -V7 --vbr-new -q0 -B192 --lowpass 15.5 --lowpass-width 1 --resample 32

    of course, if the source audio is already at 32 kHz you may leave out the "resample" part:
    lame  in.wav out.mp3  -V7 --vbr-new -q0 -B192 --lowpass 15.5 --lowpass-width 1
    This will give you files averaging around 112kbit/s. For even smaller results try -V8 instead of -V7, and/or use 24 kHz samplerate, for example:
    lame  in.wav out.mp3  -V8 -q0 -B128 --lowpass 11.6 --resample 24

    These commandline options can be used the way you see in the RazorLame screenshot above.
    For lower bitrates we don't recommend using MP3, instead Ogg Vorbis (aoTuV version) would be the smartest thing right now. Check out some/our ogg streams here and here.


    So you're the experts?

    As far as LAME goes, we sometimes recompile our own releases with adaptations based on different opinions about certain settings. Being frequent users, we do many tests with it based on personal taste and personal interpretations. This webpage is maintained by me, my cousin and Jaap de Jong. We all use LAME and MP3 professionally (that is to say, we release MP3 files to wide audiences, and are also involved in broadcast-uses of it). The settings mentioned on this page are used for the audio WE encode, they apply to the choice of LAME release one can download from this page (and NO other). Collected presets, like for example the "alt-presets" are called "alt" for a reason; They are alternatives. We like to stay in control of ALL parameters, since we disagree with trade-offs done for standardized presets, so YES, presets shown on this page change with each new release (duh!). We never follow results from "listening tests", especially not those controlled by people who refuse(d) to let us take part in it (using pathetic IP-blocks and the likes). You should stay away from everybody strongly siding with certain webfora that feel the need to call all of our writing "misinformation". Quite often they're biased (there's a lot of money involved in MP3, ISDN and APT-X codec sales, digistream and satellite audio uplink equipment and so on) and/or funded by codec-fanboys who are unable to deal with contradicting (often technically superior) opinions on sound. Furthermore results on sites like that are unrealistic; tests have been done using EVERY random ear out there (as if suddenly expert knowledge would no longer count). We always check different LAME settings OURSELVES, you may decide on *our* expertise in the field by looking here, here or here.
    Take this test. After having done that, notice here how Julius was the only one who got it right. ;-)

  • We are Members of the Audio Engineering Society
  • Laat Je Geen Oor Aannaaien (Dutch)
  • Pseudo Techniek (Dutch)
  • Ogg Vorbis and others
  • CD history / 44.1kHz issues | VBR-ABR-CBR ? (old)
  • EAC codec settings guide
  • David's Audio work (old)
  • recommended reading.
  • Examples of encoded audio are usually here
  • Affiliated streams: ogg, mp3 and aac+
  • RESPECT & THANKS TO:

    the L.A.M.E. developers
    Holger Dors for creating RazorLame
    Our friends @Nullsoft for making
    MP3 what it is today
    Sound Professionals
    ExactAudioCopy


    JT HZ
    Men Without Plan Enterprises
    Some homemade Music and Software

    Free counter and web stats