
MP3 Encoding | MP3 Decoding | Streaming | Reference
MP3 Encoder software
Sound quality is highly dependent on the performance of the encoder. Better encoder software will produce higher-quality files with fewer sound problems. FhG IIS (Fraunhofer-Gesellschaft Institut Integrierte Schaltungen) developed much of the mp3 standard and have some good encoders available, the best encoder right now is xconsidered to be the open source program LAME. There is info on specific encoder programs in the software section.
CBR
Most encoders use constant-bitrate (CBR) encoding. In this mode you choose a target bitrate (say 128kBit/s) and the encoder will hit it*. 4 different stereo modes are available for encoding stereo files:
- Intensity stereo - Mono recording with direction information to create a stereo effect.
- Joint stereo - Uses intensity mode for low frequency information and discrete channels for high frequency information.
- Stereo - Encoders 'share' unused bandwidth between channels.
- Dual channel - Encodes each channel completely separately.
VBR and ABR
Early VBR encoders were primitive compared to the CBR versions of the time and did not sound as good. Now they are faster and generally produce the best-quality files. By allocating only as much data as is needed to represent the audio stream to within a certain error margin, VBR files save space and can help improve quality. ABR, a variant of VBR present in LAME uses variable encoding while still trying to maintain a certain average bitrate. This gives a reasonably predictable size to the finished files and the best quality one can expect.All properly written MP3 players can playback VBR encoded files. Hardware players often have restrictions on the minimum and maximum bitarate so you should consider resticting your range when encoding to accomodate your target device.
The Fraunhofer codecs are used in the current version of Musicmatch jukebox and a few other programs. Some rippers, like EAC can use commandline versions of LAME for their encoding. See the software page for more information.
*If a portion of the sound source is not complex enough to fill a given MPEG frame it will be padded out or, in FhG IIS codecs, marked for use in 'high-quality' encoder modes.
Audio sources
To get a high-quality compressed file you need to start with high-quality source material - this usually means CD's (and will soon include uncompressed DVD Audio). To obtain the best files from your CD's it would be advisable to make a direct digital copy using digital audio extraction (called ripping). A surprising number of CD-ROM drives (both IDE and SCSI) can do this. If you would like to see what ripping software will work with your drive (if any) then you need to go to the CDDA page. Check the 'results' page and look for your drive. Tip: if you are running Windows 9x you can get the actual model of your drive from device manager (in the system applet). If you are looking to purchase a drive just for this application, there is one best choice: Plextor.
If you can possibly avoid it, do not use analog captures from CD's. The quality really is inferior, even if it doesn't sound like it right away. A good trick to get a CD-ripper to allow DAE is to install a new ASPI layer. Some rippers have resources for this on the websites. Newer versions of windows use DAE for CD playback in Media Player.
Problems with MP3 encoded files
If you're encoding and run across a file that just doesn't sound good when coded at 112 or 128kbit/s, you can just code at a higher data rate to remove some of the compression artifacts. 160kbit/s is supported by most of the coders, and should eliminate some problems - if not then 256kbit/s will. The 'squishy', 'hollow' or 'flippy' sounds are typically caused by phase shifts in the source file, which are very common in non-professional live stereo recordings, and deliberately present in surround encoded files.
Some compression problems are not due to insufficient datarate - a number of these problems are caused by the use of Joint-Stereo coding, where some frequency bands are encoded in mono (with steering information so it can be reproduced in the correct location in the soundfield). Instead of just increasing the datarate of your files you can try an encoder capable of producing Simple-stereo or 2ch files (dual mono). For these files I recommend using slightly higher datarates: 128, 160 or 192kbit/s to offset the increase in data. The 256kbit/s mode in mp3enc (formerly l3enc) uses 2ch coding and can carry two completely seperate program streams. Most newer coders will use Simple stereo mode at high datarates (including the FhG IIS ones) and should get you that CD-quality sound you're after.
One more thing: If you are trying to batch encode a sequence of files and the encoder keeps crashing try opening up the file in a sound editor and pad a small amount of silence to the beginning or end and resave it.
![]()