from Wikipedia, the free encyclopedia

Basic data

developer The LAME team
Current  version 3,100
(October 13, 2017)
Current preliminary version 3.100a2
(January 29, 2016)
operating system platform independent
programming language C , assembler
category MP3 encoder
License LGPL ( free software )
German speaking No

LAME is an open source project that sees itself as a development project to support the MP3 audio format. The name LAME is a recursive acronym for LAME Ain't an MP3 Encoder, “LAME is not an MP3 encoder ”, which is due to the fact that LAME was not originally a full encoder, but only a patch for the MP3 sample implementation, see story . The LAME project de facto develops source code for the generation of MP3 audio files and is thus in competition with other providers, for example the Fraunhofer-Gesellschaft (FhG) with their proprietary MP3 encoders. LAME is used in a variety of free software products and, according to the LAME project, also in at least one portable MP3 player. LAME is under the GNU Lesser General Public License (LGPL) and can therefore be used freely.


The project started in early 1998 when Mike Cheng developed a patch for a sample implementation of an MP3 encoder . This encoder was published by the International Organization for Standardization (ISO) and can be used freely for non-commercial projects. The ISO manages all MPEG standards (and thus also MP3), but this only affects the format itself and the decoding, which are freely available as an ISO standard, not the coding.

LAME is under the LGPL and from version 3.81beta from May 8, 2000 onwards, it does without the old ISO source code. LAME is widely regarded as the highest quality MP3 encoder, which is concluded from numerous listening tests. Due to constant optimization, it is one of the fastest. The LAME-MT project is working on a version with a multi-threaded engine to make better use of multi-core processors .

Most recently, a new LAME version with the number 3.100 was published in mid-October 2017. This edition contains only bug fixes; the audio quality has remained the same.

Licenses and Patents

The Fraunhofer-Gesellschaft and other companies have software patents on partial processes that are used for MPEG coding. There is no all-inclusive MP3 patent. The Fraunhofer-Gesellschaft contributed the largest part to the development of the MP3 standard and has patented some methods for MP3 coding. In a merger with Thomson , the two companies own 18 MP3-related patents. Since September 1998, after the MP3 standard was able to establish itself unencumbered for six years, FhG / Thomson has been charging license fees for MP3 encoders. Other companies also have patent claims on the MP3 process, for example Sisvel, which acts on behalf of Philips .

As a result, many free MP3 projects had to be abandoned. FhG / Thomson's claim that the use of their patents for MP3 encoding would be indispensable has not yet been enforced against LAME in court. The LAME developers could claim to use the freely available ISO source code according to the corresponding license, to be a development project that supports MP3 technology and not to offer a finished product, but only to publish the source code. This means that those who provide LAME-based encoders are also taking some risk by distributing a finished product. FhG / Thomson would first have to prove the validity and applicability of their patents.

The Fraunhofer IIS MP3 license program expired on April 23, 2017, so encoding and decoding are now free.


LAME in the command line and executed with VBR in a high quality level
LAME options in a GUI , here CDex

Due to the high quality of the MP3 files created by LAME, it is widely used and can often be found in shareware and freeware programs. Under Windows, some encoder programs (such as VirtualDub ) require an Audio Compression Manager (ACM) for LAME in addition to the codec (see web links).

In November 2005 there were reports, according to which analyzes indicated that source code from LAME had been illegally used in the controversial copy protection procedure XCP , which was used on music CDs from Sony BMG . Since Sony finally withdrew all CDs with XCP, these allegations fizzled out.

Techniques supported

Bit rate modes

Constant data rate (CBR)

Constant bit rate selectable between 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 kbit / s. Here the quality is variable.

Variable data rate (VBR)

Variable bit rate in ten quality levels ( -V 0 to -V 9 ). An attempt is made to keep the quality constant by dynamically adapting the bit rate to the complexity of the audio signal. A nominal (i.e. average) bit rate is often used in connection with VBR. With Lame 3.90, old presets were introduced that offer a transparent quality.

Average data rate (ABR)

LAME also supports setting an average data rate . As with the variable data rate (VBR), the encoder adapts the compression rate to the information density of the data signal. However, since the attempt is made to achieve an average, specified bit rate on average, the size of the target file should be approximately calculable in advance. The bit rate achieved usually deviates minimally from the target result (example: if you enter 192 kbit / s as the target bit rate, the bandwidth of the bit rate that is achieved is 180–200 kbit / s.).

Channel modes


If the source file is not yet monophonic , it is converted to mono (a so-called downmix ) and encoded in MP3. Only one audio channel is used.

Joint stereo

A distinction is made between the lossy IS joint stereo , in which phase information is lost, and the lossless MS joint stereo . The current version of the LAME encoder only uses MS joint stereo regardless of the lowering of the target bit rate.

Mid / side joint stereo takes advantage of the fact that there are only small differences between the two stereo channels in normal music. The two channels are combined into a sum channel L + R (“Mid”), which is common to the left and right channels (English joint “connected”). The second channel only contains the difference signal LR (“Side”), which is generally far less complex. Low frequencies are not differentiated because their directional information is negligible. In this way, a significantly higher quality can be achieved with an identical bit rate compared to the conventional stereo method. In the case of audio sources that contain completely separate recordings for the left and right channels, however, this method is of no benefit, since simple stereo is automatically used for places with too great channel differences (this automatic mode is deactivated in the Forced Joint Stereo channel mode ; all frames are included here MS joint stereo processed).

Simple stereo

Two independent audio channels are stored. Depending on the complexity, the two channels are assigned corresponding bit rates, for example 65% of the storage space on the left and 35% on the right. The quality is consequently worse compared to joint stereo (with normal stereo files of the same bit rate or the same storage space requirements).

Dual mono / dual channel

As with simple stereo, both channels are encoded separately. The difference, however, is that regardless of the complexity of the right or left channel, both channels get exactly half of the storage space. This result can therefore also be achieved with simple stereo.

Coding speed

LAME was and is not the fastest MP3 encoder. LAME is also usually slower than encoders with other compression methods. The reasons for this lie, for example, in the psychoacoustic model and other internal functions that serve to improve the output quality. The slow processing therefore directly benefits the quality. With the computing speed of modern computers, however, waiting times are becoming less and less important.


  • The quality and speed of the coding can be influenced.
  • The low-pass filtering is activated by default, but can also be deactivated.
  • ID3v1 and ID3v2 tagging .
  • Replay Gain (enabled by default).
  • CRC calculation of the headers.
  • Gapless coding.
  • Input (source files) can be WAV as well as MP1, MP2 and MP3 files.
  • MP3 files can be converted (decoded) into WAV files.
  • Freeformat bitstreams (which do not correspond to the bit rate 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 or 320 kbit / s) can be generated.

LAME allows many other settings for MP3 encoding, either directly via the command line or using the user interface of supporting software.

Coding with LAME

Coding with a variable bit rate is recommended. This ensures that the sample is encoded with constant quality. In contrast, the quality fluctuates when encoding at a constant data rate, and quality drops can occur at difficult-to-encode music locations. Coding with a variable bit rate reduces the data rate for quieter passages of the piece and increases it for complex passages. This achieves constant quality and the minimum file size required for this.

In order to encode with LAME with a variable bit rate, the new VBR mode is also available in addition to the conventional VBR mode . Since it is very mature from version 3.97 and the coding speed has tripled, it should be used as the standard, which is automatically the case with Lame from version 3.98.

Settings profiles

Due to the great flexibility of LAME, the coding ability can be controlled very precisely using many parameters. Since these many possibilities can lead to less than optimal results due to their confusion, there is a system of setting profiles (English presets).

There are three levels that provide optimal solutions in daily use. The standard level (corresponds to -V 2 ) creates a transparent quality at which most people cannot distinguish the MP3-encoded version from the original in terms of sound. It is therefore the recommended setting for encoding music. The medium level below (corresponds to -V 4 ) represents a good compromise between small file size and sufficient quality. Since it produces almost transparent quality, it is well suited for preparing music for portable MP3 players. The Extreme level (corresponds to -V 0 ) brings only slight quality improvements compared to the Standard level, but leads to very large files.

The presets can be --preset standardactivated with, for example . The quality levels (see next section) can also be viewed as presets. So if you want to work directly with these parameters because of the better gradation, you can do so by using them -V 2as parameters, for example .

Quality levels

LAME has improved in quality in recent years. Current listening tests show that most people perceive music encoded with LAME to be transparent at an average bit rate of 128 kbit / s. With this bit rate , LAME now achieves a quality (as of September 2007) that was not possible when the MP3 format was introduced. Therefore, the following assessment for the LAME encoder only applies from version 3.97. Only a few pieces of music contain short passages (problem samples) that do not sound transparent even with high-quality settings. With normal music enjoyment, however, even these differences cannot be heard. The following table serves as an orientation for the 10-level quality level system.

parameter Target bit rate in kbit / s achieved bit rate in kbit / s Music quality comment
-b320 320 320 CBR Excellent Transparent also for trained ears, possible improvement of the quality of problem samples.
-V0 245 220-260 Excellent Transparent also for trained ears, possible improvement of the quality of problem samples.
-V1 225 200-250 Excellent Transparent also for trained ears, possible improvement of the quality of problem samples.
-V2 190 170-210 Very good – excellent Recommended setting. Transparent also for trained ears.
-V3 175 155-195 Very good Transparent even for most trained ears.
-V4 165 145-185 Good Excellent Transparent for normal listeners. Trained ears can rarely tell differences.
-V5 130 110-150 Well In most cases transparent to normal listeners, but trained ears can occasionally see differences.
-V6 115 95-170 Satisfactory – good Even inexperienced ears can often recognize minimal differences. For use in portable devices, but not very high quality hi-fi components for background sound or coding of audio books.
-V7 100 80-160 Satisfying Even inexperienced ears can often see clear differences. But well suited for use in portable devices, low-quality hi-fi components for background sound or coding audio books.
-V8 85 65-175 - V8 and V9 should not be used in version 3.99, in some cases the files are larger (poorer compression) than in V7.
-- abr 128 128 approx. 115-155 - Should only be used in version 3.99 if the file size is to be specified in advance. The target file size is similar to using V7, but the quality is worse.
-- abr 112 112 approx. 100-140 Sufficient Clear differences even for inexperienced ears. Still well suited for audio books and audio plays without high quality standards.
-- abr 96 96 approx. 85-120 Limited Clear differences even for inexperienced ears. Suitable for audio books and audio pieces without high quality requirements.
-- abr 64 64 approx. 55-90 Inadequate Significant loss of quality. Still suitable for audio books and audio pieces on mobile devices.

The values ​​given here are for guidance only. Depending on the source material, the bit rate can -V 2also be well below 170 kbit / s or over 210 kbit / s for the quality level , for example . As of version 3.98, non-integer values ​​are also -Vaccepted as parameters for .

Hearing tests

Audio codecs have repeatedly been subjected to various hearing tests ( e.g. ABX test ). This makes it possible to fine-tune a codec until the result is satisfactory. The community at tested Lame and other encoders with regular listening tests. The results flowed directly into the development of Lame, so that the encoder could be continuously improved. One example is the quality at a bit rate of 128 kbit / s, in which Lame has been able to continuously improve. Lame in version 3.95 achieved 3.74 points in one test, the subsequent version Lame 3.96 in another test already 4.18 points and Lame 3.97b2, again in another test, 4.60 out of 5 points each. However, different people took part in the hearing tests, and other test data were also used in some cases. The results cannot be directly transferred to one another, but still offer an insight into the development of the codec, which has tended to increase significantly in quality. While in 2002 it was only possible to speak of sufficient quality at 128 kbit / s, in 2007 the quality is already transparent for most listeners.

Web links

Individual evidence

  1. See, for example, the recommendation of the Hydrogenaudio community based on numerous blind hearing tests
  2. Mark Taylor: LAME Technical FAQ ( English ) June 1, 2000. Retrieved November 26, 2011: “6. Does LAME use any MP3 patented technology? LAME, as the name says, is * not * an encoder. LAME is a development project which uses the open source model to improve MP3 technology. Many people believe that compiling this code and distributing an encoder which uses this code would violate some patents (in the US, Europe and Japan). However, * only * a patent lawyer is qualified to make this determination. The LAME project tries to avoid all these legal issues by only releasing source code, much like the ISO distributes MP3 'demonstration' source code. Source code is considered as speech, which may contain descriptions of patented technology. Descriptions of patents are in the public domain. "
  3. MP3 no longer requires a license ,, May 15, 2017, accessed on May 15, 2017
  4. Reuters: Sony BMG Software May Contain Open Source Code ( English ) November 21, 2005. Archived from the original on March 6, 2009. Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved November 26, 2011. @1@ 2Template: Webachiv / IABot /
  5. Is Sony in violation of the LGPL?
  6. Sony's XCP DRM