<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JAZ</id>
	<title>Hydrogenaudio Knowledgebase - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hydrogenaudio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JAZ"/>
	<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=Special:Contributions/JAZ"/>
	<updated>2026-04-29T18:52:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20266</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20266"/>
		<updated>2010-04-01T12:42:18Z</updated>

		<summary type="html">&lt;p&gt;JAZ: adding credits to mp3-tech.org&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;if&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to simply remove them instead).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of the time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, and consequently less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
*The exception is scalefactor band 21 (sfb21), which does not have a scale factor. This band stores frequencies of 16 kHz and above.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
(See section notes about scalefactors and global gain)&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scale factor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization, since global gain applies to all bands.&lt;br /&gt;
* Scale factors are stored as a relative value of global gain (just the difference is stored). Let&#039;s call this value the relative factor.&lt;br /&gt;
* To balance the reduction of global gain, the scale factor of the other bands should increase. Consequently, the relative factor decreases.&lt;br /&gt;
* The relative factor can be decreased until it reaches zero. At that point, any further reduction of global gain implies that the band will use more resolution than needed.&lt;br /&gt;
* The encoder is forced to increase the bitrate needed, not only because of the frequencies at or above 16Khz, but also because other bands below the sfb21 have excessive resolution.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect to quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scale factors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitly or explicitly), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz and above frequencies still get encoded.&lt;br /&gt;
&lt;br /&gt;
The ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch. &#039;&#039;&#039;The Y switch prevents global gain quantization from being decreased solely to accomodate the needs of sfb21&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch can only be activated in [[LAME#Technical information|VBR mode]]. By default, -V 3 to -V 9 use -Y. -V 0, -V 1, and -V 2 do not. Consequently, adding -Y is only useful for the highest three VBR settings.&lt;br /&gt;
&lt;br /&gt;
This is because in CBR and ABR modes, the encoder uses -Y implicitly. &lt;br /&gt;
Specifically, LAME targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
This is the same treatment as using -Y in VBR mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation behind this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not do. It is frequently misinterpreted, like [[Joint_stereo|joint stereo]], and mistaken for a filter.&lt;br /&gt;
&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation behind and the usage of the switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
For long blocks, the last scalefactor band is sfb21. For short blocks it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
Global gain and scale factors are not independent when stored to the file. The latter is expressed as a difference of the former. (relative factor)&lt;br /&gt;
&lt;br /&gt;
* The global gain is the global quantization step size, with a value range between 0 and 255.&lt;br /&gt;
* The relative factor per band is the amount to reduce the global quantization step size. The range of this value is dependant on the band.&lt;br /&gt;
Consequently, there are just a reduced amount of values to use and a change to global gain needs to be compensated by a change in the relative factor.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;br /&gt;
The definition of the sfb21 problem is reworded from the article at [http://www.mp3-tech.org/content/?Mp3%20Limitations Mp3 tech.org]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20265</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20265"/>
		<updated>2010-04-01T12:35:56Z</updated>

		<summary type="html">&lt;p&gt;JAZ: Corrected the definition of the sfb21 problem and improved the explanation of how scale factors are stored.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;if&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to simply remove them instead).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of the time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, and consequently less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
*The exception is scalefactor band 21 (sfb21), which does not have a scale factor. This band stores frequencies of 16 kHz and above.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
(See section notes about scalefactors and global gain)&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scale factor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization, since global gain applies to all bands.&lt;br /&gt;
* Scale factors are stored as a relative value of global gain (just the difference is stored). Let&#039;s call this value the relative factor.&lt;br /&gt;
* To balance the reduction of global gain, the scale factor of the other bands should increase. Consequently, the relative factor decreases.&lt;br /&gt;
* The relative factor can be decreased until it reaches zero. At that point, any further reduction of global gain implies that the band will use more resolution than needed.&lt;br /&gt;
* The encoder is forced to increase the bitrate needed, not only because of the frequencies at or above 16Khz, but also because other bands below the sfb21 have excessive resolution.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect to quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scale factors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitly or explicitly), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz and above frequencies still get encoded.&lt;br /&gt;
&lt;br /&gt;
The ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch. &#039;&#039;&#039;The Y switch prevents global gain quantization from being decreased solely to accomodate the needs of sfb21&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch can only be activated in [[LAME#Technical information|VBR mode]]. By default, -V 3 to -V 9 use -Y. -V 0, -V 1, and -V 2 do not. Consequently, adding -Y is only useful for the highest three VBR settings.&lt;br /&gt;
&lt;br /&gt;
This is because in CBR and ABR modes, the encoder uses -Y implicitly. &lt;br /&gt;
Specifically, LAME targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
This is the same treatment as using -Y in VBR mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation behind this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not do. It is frequently misinterpreted, like [[Joint_stereo|joint stereo]], and mistaken for a filter.&lt;br /&gt;
&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation behind and the usage of the switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
For long blocks, the last scalefactor band is sfb21. For short blocks it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
Global gain and scale factors are not independent when stored to the file. The latter is expressed as a difference of the former. (relative factor)&lt;br /&gt;
&lt;br /&gt;
* The global gain is the global quantization step size, with a value range between 0 and 255.&lt;br /&gt;
* The relative factor per band is the amount to reduce the global quantization step size. The range of this value is dependant on the band.&lt;br /&gt;
Consequently, there are just a reduced amount of values to use and a change to global gain needs to be compensated by a change in the relative factor.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20263</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20263"/>
		<updated>2010-04-01T10:04:01Z</updated>

		<summary type="html">&lt;p&gt;JAZ: Orthographic revision, extension on some points.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;if&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to simply remove them instead).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of the time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, and consequently less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
*The exception is scalefactor band 21 (sfb21), which does not have a scale factor. This band stores frequencies of 16 kHz and above.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
(See section notes about scalefactors and global gain)&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scale factor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization, since global gain applies to all bands.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase, causing the bitrate to rise.&lt;br /&gt;
* The encoder is forced to excessively increase the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized. &lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect to quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scale factors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitly or explicitly), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz and above frequencies still get encoded.&lt;br /&gt;
&lt;br /&gt;
The ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch. &#039;&#039;&#039;The Y switch prevents global gain quantization from being decreased solely to accomodate the needs of sfb21&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch can only be activated in [[LAME#Technical information|VBR mode]]. By default, -V 3 to -V 9 use -Y. -V 0, -V 1, and -V 2 do not. Consequently, adding -Y is only useful for the highest three VBR settings.&lt;br /&gt;
&lt;br /&gt;
This is because in CBR and ABR modes, the encoder uses -Y implicitly. &lt;br /&gt;
Specifically, LAME targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
This is the same treatment as using -Y in VBR mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation behind this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not do. It is frequently misinterpreted, like [[Joint_stereo|joint stereo]], and mistaken for a filter.&lt;br /&gt;
&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation behind and the usage of the switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
Global gain and scale factors are not independent. The latter is expressed as a difference of the former.&lt;br /&gt;
&lt;br /&gt;
* The global gain is the global quantization step size, with a value range between 0 and 255.&lt;br /&gt;
* The scale factor per band is the amount to reduce the global quantization step size. The range of this value is dependant on the band.&lt;br /&gt;
Consequently, there are just a reduced amount of values to use.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20262</id>
		<title>LAME</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20262"/>
		<updated>2010-03-31T19:44:30Z</updated>

		<summary type="html">&lt;p&gt;JAZ: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = LAME&lt;br /&gt;
| screenshot = [[Image:Lamelogo.png|250px|LAME official logo]]&lt;br /&gt;
| caption = LAME ain&#039;t an MP3 encoder&lt;br /&gt;
| maintainer = The LAME project&lt;br /&gt;
| stable_release = 3.98.4&lt;br /&gt;
| preview_release = none&lt;br /&gt;
| operating_system = Windows, Mac OS/X, Linux/BSD&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = LGPL&lt;br /&gt;
| website = [http://lame.sourceforge.net/ LAME website]&lt;br /&gt;
}}{{featured}}&lt;br /&gt;
&#039;&#039;&#039;LAME&#039;&#039;&#039; (Lame Ain&#039;t an MP3 Encoder) is the [[Hydrogenaudio]] recommended [[MP3]] encoder. It has been developed by the open-source community since 1998, and has become the highest quality [[MP3]] encoder for most purposes.&lt;br /&gt;
&lt;br /&gt;
Some benefits of using LAME:&lt;br /&gt;
* Highly optimised presets&lt;br /&gt;
* Fast encoding&lt;br /&gt;
* [[CBR]], [[ABR]] and quality-optimized [[VBR]] encoding methods&lt;br /&gt;
* [[Gapless]] playback with LAME-header compliant decoders&lt;br /&gt;
* Supported by recommended CD rippers [[Exact Audio Copy]] and [[CDex]]&lt;br /&gt;
* Highly tunable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
LAME development began around mid-1998. Mike Cheng started it as a patch against the 8hz-MP3 encoder sources. After some quality concerns raised by others, he decided to start from scratch based on the dist10 sources. That branch (a patch against the reference sources) became LAME 2.0, and only on LAME 3.81 they got rid of all dist10 code, making LAME a completely new program-not a mere patch of an existing encoder.&lt;br /&gt;
&lt;br /&gt;
The project quickly became a team effort. Mike Cheng eventually left leadership and started working on [http://toolame.sourceforge.net/ tooLAME], an [[MP2]] encoder. Mark Taylor became leader and released version 3.0 featuring gpsycho, a new psychoacoustic model developed by him.&lt;br /&gt;
&lt;br /&gt;
Nowadays LAME is considered the best MP3 encoder at mid-high bitrates and features the best VBR model among MP3 implementations, mostly thanks to the dedicated work of talented developers like Takehiro Tominaga, Naoki Shibata, Darin Morrison, Gabriel Bouvigne, Robert Hegemann, etc. And development is still going on...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder compiles and source code==&lt;br /&gt;
&lt;br /&gt;
Unless noted otherwise, the recommended LAME compile for optimal quality is always the &#039;&#039;&#039;latest stable version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It is suggested that the compiles available here be used with the recommended encoder settings you can find below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download the latest LAME from these links:&#039;&#039;&#039;&lt;br /&gt;
* [http://www.rarewares.org/mp3.php RareWares MP3 Page] - Compiles for Win32, Mac OS X universal binary, Linux etc.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=290&amp;amp;package_id=309 LAME source code on SourceForge]&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder settings==&lt;br /&gt;
This section describes the [[Hydrogenaudio]] recommended settings to be used with [[LAME]] for highest quality [[MP3]] encoding. These settings require LAME 3.98 or later (the latest stable version is recommended).&lt;br /&gt;
&lt;br /&gt;
===Quick start (short answer)===&lt;br /&gt;
====Best quality: &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;archiving&amp;quot;&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;-b 320&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt;. This is the strongest setting for [[MP3]], with the lowest risk of [[artifact]]s.&lt;br /&gt;
With the exception of a few situations, quality is rarely better than the highest [[VBR]] profiles described below. However, &#039;archiving&#039; music using a lossy format like [[MP3]] is never recommended &amp;amp;ndash; no matter how transparent the resulting files might sound.&lt;br /&gt;
The alternative is to use [[Lossless]] formats like [[WavPack]], [[FLAC]] etc. that allow true archiving, bit for bit like on the original CD.&lt;br /&gt;
&lt;br /&gt;
====High quality: &amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;HiFi, home or quiet listening&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V0&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~245 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V1&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~225 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V2&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~190 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V3&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~175 kbps) are recommended.&lt;br /&gt;
These settings will normally produce [[transparent]] encoding (transparent = most people can&#039;t distinguish the [[MP3]] from the original in an [[ABX]] blind test).&lt;br /&gt;
Audible differences between these presets exist, but are rare.&lt;br /&gt;
&lt;br /&gt;
====Portable: &amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;background noise and low bitrate requirement, small sizes&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~165 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V5&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~130 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~115 kbps) are recommended.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; produces an &amp;quot;acceptable&amp;quot; quality, while &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; should be close to perceptual [[transparency]].&lt;br /&gt;
&lt;br /&gt;
====Very low bitrate, small sizes: &amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;eg. for voice, radio, [[mono]] encoding etc.&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
For very low bitrates, up to 100kbps, [[ABR]] is most often the best solution. &lt;br /&gt;
Use &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;--abr &amp;lt;bitrate&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (e.g. --abr 80).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--preset voice&#039;&#039;&#039; is only available in the command line front-end, and is there for compatibility.&lt;br /&gt;
It is currently mapped to &#039;&#039;&#039;&#039;&#039;--abr 56 -mm&#039;&#039;&#039;&#039;&#039;, so that means that the recommendation would be to encode in mono, and use ABR.&lt;br /&gt;
&lt;br /&gt;
===Detailed explanation (long answer)===&lt;br /&gt;
====VBR (variable bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[VBR]]:&#039;&#039;&#039; &#039;&#039;variable bitrate mode. Use variable bitrate modes when the goal is to achieve a fixed level of quality using the lowest possible bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[VBR]] is best used to target a specific quality level, instead of a specific bitrate. The final file size of a [[VBR]] encode is less predictable than with [[ABR]], but the quality is usually better.&lt;br /&gt;
&lt;br /&gt;
Unlike other MP3 encoders which do VBR encoding based on predictions of output quality, LAME&#039;s default VBR method tests the &#039;&#039;actual&#039;&#039; output quality to ensure the desired quality level is always achieved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V(number)&amp;lt;/code&amp;gt; where number is 0-9, 0 being highest quality, 9 being the lowest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The switch &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt;, which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 as it is now the default VBR mode. However, if you&#039;re still using LAME 3.97 or older, you have to add &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; to your commandline to use that mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Bitrate overview (mostly based on LAME 3.98.2 results)&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbit/s&#039;&#039;&#039; || &#039;&#039;&#039;Bitrate range kbit/s&#039;&#039;&#039;&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -b 320 || --preset insane || 320 || 320 CBR&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme || 245 || 220...260&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 ||&amp;amp;nbsp;|| 225 || 190...250&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || 190 || 170...210&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 ||&amp;amp;nbsp;|| 175 || 150...195&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium  || 165 || 140...185&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 ||&amp;amp;nbsp;|| 130 || 120...150&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 ||&amp;amp;nbsp;|| 115 || 100...130&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 ||&amp;amp;nbsp;|| 100 || 80...120&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 ||&amp;amp;nbsp;|| 85 || 70...105&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 ||&amp;amp;nbsp;|| 65 || 45...85&lt;br /&gt;
|}&lt;br /&gt;
See also [[#Technical information|Technical details for recommended LAME settings]].&lt;br /&gt;
&lt;br /&gt;
If you need a predictable bitrate (in a streaming application, for example), use [[ABR]] or [[CBR]] modes, described below.&lt;br /&gt;
&lt;br /&gt;
====ABR (average bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[ABR]]:&#039;&#039;&#039; &#039;&#039;average bitrate mode. A compromise between [[VBR]] and [[CBR]] modes, [[ABR]] encoding varies bits around a specified target bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use [[ABR]] when you need to know the final size of the file but still want to allow the encoder some flexibility to decide which passages need more bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (desired averaged bitrate in kbit/s) can be any value between 8 - 320 , like eg. 9, 17, 80, 128, 133, 200 etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[ABR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====CBR (constant bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[CBR]]:&#039;&#039;&#039; &#039;&#039;constant bitrate mode. [[CBR]] encoding is not efficient. Whereas [[VBR]] and [[ABR]] modes can supply more bits to complex music passages and save bits on simpler ones, [[CBR]] encodes every frame at the same bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[CBR]] is only recommended for usage in streaming situations where the upper bitrate must be strictly enforced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (bitrate in kbit/s) must be chosen from the following values: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b 192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[CBR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
* The rule of thumb when considering encoding options: at a given bitrate, [[VBR]] is higher quality than [[ABR]], which is higher quality than [[CBR]] ([[VBR]] &amp;gt; [[ABR]] &amp;gt; [[CBR]] in terms of quality). The exception to this is when you choose the highest possible [[CBR]] bitrate, which is 320 kbps (-b 320 = --alt-preset insane), but this produces the largest filesizes for doubtful audible benefit.&lt;br /&gt;
&lt;br /&gt;
* All modes and settings mentioned in this topic belong to the specifications of the [[MP3]] standard, and the resulting MP3s should be playable by every [[MP3]] decoder that conforms with the standard. If your decoder or device does not play MP3s produced by LAME, blame the manufacturer or developer, not LAME.&lt;br /&gt;
&lt;br /&gt;
* Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes. Use them only if you want to help developers with feedback. History of [http://www.hydrogenaudio.org/forums/index.php?showtopic=28125/ Lame versions &amp;amp; compiles].&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; switch enables the new [[VBR]] mode (no longer needed with LAME 3.98, as it is now the default VBR mode). In terms of quality, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; appears to be better than the old model, but reports of artifacts when using the new model do exist. Despite these possible issues, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is currently recommended over the default [[VBR]] mode due to both the speed and quality increases afforded by the new algorithm.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-mm&#039;&#039;&#039; : the sound will be encoded in &#039;&#039;&#039;mono&#039;&#039;&#039;. Useful for low bitrates and/or when stereo is not important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:lame-chart-2.png|frame|center|Here a trial to see how the &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;perceived listening quality&amp;lt;/font&amp;gt; improves with settings/&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;averaged filesize&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Hey! What happened to &amp;quot;--alt-preset&amp;quot;?====&lt;br /&gt;
&lt;br /&gt;
The revolutionary &amp;lt;code&amp;gt;--alt-preset&amp;lt;/code&amp;gt; system was introduced in LAME 3.90; it was replaced by the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; flags in later versions. Starting with version 3.94, the &amp;lt;code&amp;gt;-Vx&amp;lt;/code&amp;gt; quality system was introduced, which allows finer control over the desired bitrate; the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; switches were made into aliases to the corresponding &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; flags for the sake of backwards compatibility. &#039;&#039;&#039;There is no difference between the output you get if you use &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--alt-preset standard&amp;lt;/code&amp;gt;.&#039;&#039;&#039; (Although adding &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is recommended for now, see above for details.)&lt;br /&gt;
&lt;br /&gt;
More encoding options are available under the new system, such as &amp;lt;code&amp;gt;-V1&amp;lt;/code&amp;gt;, which provides a level of quality between the old &amp;quot;standard&amp;quot; and &amp;quot;extreme&amp;quot; presets, or &amp;lt;code&amp;gt;-V3&amp;lt;/code&amp;gt;, which is between the old &amp;quot;medium&amp;quot; and &amp;quot;standard&amp;quot; presets.&lt;br /&gt;
&lt;br /&gt;
Recent LAME versions feature more streamlined command line options, and it&#039;s recommended to stick to one of the values described in the text or shown in the tables above.&lt;br /&gt;
&lt;br /&gt;
For example, the following command lines will all produce the same output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;-b 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(&amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt; is the exact same thing as &amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt;, etc.)&lt;br /&gt;
&lt;br /&gt;
==Technical information==&lt;br /&gt;
The table below contains technical details about the recommended settings. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Technical details of the recommended settings&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbps&#039;&#039;&#039; || &#039;&#039;&#039;[[LAME_Y_SWITCH|Y Switch]]&#039;&#039;&#039; || &#039;&#039;&#039;Lowpass&#039;&#039;&#039; || &#039;&#039;&#039;Resample&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme ||  ~245 || || 19383 Hz - 19916 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 || || ~225 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || ~190 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 || || ~175 || Y || 17960 Hz - 18494 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium || ~165 || Y || 17249 Hz - 17782 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 || || ~130 || Y || 16538 Hz - 17071 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 || || ~115 || Y || 15115 Hz - 15648 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 || || ~100 || Y || 14581 Hz - 14968 Hz || 32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 || || ~85 || Y || 12516 Hz - 12903 Hz ||  32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 || || ~65 || Y || 9336 Hz -  9602 Hz || 24000 Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]]&lt;br /&gt;
* [[EAC_and_Lame | Configuring EAC and LAME]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;People who took part in suggesting the different settings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, r3mix, ff123, Hans Heijden, kjempen, Benjamin Lebsanft, GeSomeone, Wombat &amp;amp; GuruBoolez for his immense testing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creation of the alt preset system and related special code level quality enhancements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, with technical assistance from Robert Hegemann and Naoki Shibata, Gabriel and extensive tuning help and quality verification via listening tests from JohnV and also initial help (--dm-preset era) from Hans Heijden, ff123, Wombat, and others. Test clips, bitrate information, and further listening tests provided by TheBashar, zbutsam, Pio2001, BadDuDeX, r3mix, h, TarX, Hans Heijden, ff123, Wombat, Filburt, Volcano, Garf, MrDrew, TrNSZ, nyaochi, Amadeus93, in no particular order, and many, many others we (Dibrom, user) probably forgot to mention.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Idea (also exposing the need for a unified preset system), Original post and list of original settings collected by:&#039;&#039;&#039; user&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Layout and additional work by:&#039;&#039;&#039; dev0, CiTay, SNYder, Dibrom.&lt;br /&gt;
&lt;br /&gt;
And finally...&lt;br /&gt;
&lt;br /&gt;
Thank you ALL in the community for making it what it is, providing interest and discussion and helping to work towards the most concise, well tuned, and most thought out MP3 quality &amp;quot;paradigm&amp;quot; seen yet! -- Dibrom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*[[CBR]]&lt;br /&gt;
*[[ABR]]&lt;br /&gt;
*[[VBR]]&lt;br /&gt;
*[[LAME_Y_SWITCH| The -Y switch]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://lame.sourceforge.net LAME official homepage]&lt;br /&gt;
*[http://www.rjamorim.com/rrw/lame.html Historical versions of LAME] at ReallyRareWares&lt;br /&gt;
*[http://www.rjamorim.com/test/ Several multiformat listening tests] featuring LAME and other encoders.&lt;br /&gt;
*[http://www.rarewares.org/mp3.html RareWares MP3 page]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=478&amp;amp;st=0 Discussion of recommended Lame compiles in the Hydrogenaudio forum]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=16&amp;amp;t=32288 Forum discussion of the recommended settings]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=15&amp;amp;t=203 Forum discussion of the recommended settings (older)]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=32288&amp;amp;view=findpost&amp;amp;p=327262 Previous recommendations (outdated)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20261</id>
		<title>LAME</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20261"/>
		<updated>2010-03-31T19:44:13Z</updated>

		<summary type="html">&lt;p&gt;JAZ: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = LAME&lt;br /&gt;
| screenshot = [[Image:Lamelogo.png|250px|LAME official logo]]&lt;br /&gt;
| caption = LAME ain&#039;t an MP3 encoder&lt;br /&gt;
| maintainer = The LAME project&lt;br /&gt;
| stable_release = 3.98.4&lt;br /&gt;
| preview_release = none&lt;br /&gt;
| operating_system = Windows, Mac OS/X, Linux/BSD&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = LGPL&lt;br /&gt;
| website = [http://lame.sourceforge.net/ LAME website]&lt;br /&gt;
}}{{featured}}&lt;br /&gt;
&#039;&#039;&#039;LAME&#039;&#039;&#039; (Lame Ain&#039;t an MP3 Encoder) is the [[Hydrogenaudio]] recommended [[MP3]] encoder. It has been developed by the open-source community since 1998, and has become the highest quality [[MP3]] encoder for most purposes.&lt;br /&gt;
&lt;br /&gt;
Some benefits of using LAME:&lt;br /&gt;
* Highly optimised presets&lt;br /&gt;
* Fast encoding&lt;br /&gt;
* [[CBR]], [[ABR]] and quality-optimized [[VBR]] encoding methods&lt;br /&gt;
* [[Gapless]] playback with LAME-header compliant decoders&lt;br /&gt;
* Supported by recommended CD rippers [[Exact Audio Copy]] and [[CDex]]&lt;br /&gt;
* Highly tunable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
LAME development began around mid-1998. Mike Cheng started it as a patch against the 8hz-MP3 encoder sources. After some quality concerns raised by others, he decided to start from scratch based on the dist10 sources. That branch (a patch against the reference sources) became LAME 2.0, and only on LAME 3.81 they got rid of all dist10 code, making LAME a completely new program-not a mere patch of an existing encoder.&lt;br /&gt;
&lt;br /&gt;
The project quickly became a team effort. Mike Cheng eventually left leadership and started working on [http://toolame.sourceforge.net/ tooLAME], an [[MP2]] encoder. Mark Taylor became leader and released version 3.0 featuring gpsycho, a new psychoacoustic model developed by him.&lt;br /&gt;
&lt;br /&gt;
Nowadays LAME is considered the best MP3 encoder at mid-high bitrates and features the best VBR model among MP3 implementations, mostly thanks to the dedicated work of talented developers like Takehiro Tominaga, Naoki Shibata, Darin Morrison, Gabriel Bouvigne, Robert Hegemann, etc. And development is still going on...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder compiles and source code==&lt;br /&gt;
&lt;br /&gt;
Unless noted otherwise, the recommended LAME compile for optimal quality is always the &#039;&#039;&#039;latest stable version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It is suggested that the compiles available here be used with the recommended encoder settings you can find below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download the latest LAME from these links:&#039;&#039;&#039;&lt;br /&gt;
* [http://www.rarewares.org/mp3.php RareWares MP3 Page] - Compiles for Win32, Mac OS X universal binary, Linux etc.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=290&amp;amp;package_id=309 LAME source code on SourceForge]&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder settings==&lt;br /&gt;
This section describes the [[Hydrogenaudio]] recommended settings to be used with [[LAME]] for highest quality [[MP3]] encoding. These settings require LAME 3.98 or later (the latest stable version is recommended).&lt;br /&gt;
&lt;br /&gt;
===Quick start (short answer)===&lt;br /&gt;
====Best quality: &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;archiving&amp;quot;&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;-b 320&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt;. This is the strongest setting for [[MP3]], with the lowest risk of [[artifact]]s.&lt;br /&gt;
With the exception of a few situations, quality is rarely better than the highest [[VBR]] profiles described below. However, &#039;archiving&#039; music using a lossy format like [[MP3]] is never recommended &amp;amp;ndash; no matter how transparent the resulting files might sound.&lt;br /&gt;
The alternative is to use [[Lossless]] formats like [[WavPack]], [[FLAC]] etc. that allow true archiving, bit for bit like on the original CD.&lt;br /&gt;
&lt;br /&gt;
====High quality: &amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;HiFi, home or quiet listening&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V0&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~245 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V1&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~225 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V2&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~190 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V3&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~175 kbps) are recommended.&lt;br /&gt;
These settings will normally produce [[transparent]] encoding (transparent = most people can&#039;t distinguish the [[MP3]] from the original in an [[ABX]] blind test).&lt;br /&gt;
Audible differences between these presets exist, but are rare.&lt;br /&gt;
&lt;br /&gt;
====Portable: &amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;background noise and low bitrate requirement, small sizes&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~165 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V5&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~130 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~115 kbps) are recommended.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; produces an &amp;quot;acceptable&amp;quot; quality, while &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; should be close to perceptual [[transparency]].&lt;br /&gt;
&lt;br /&gt;
====Very low bitrate, small sizes: &amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;eg. for voice, radio, [[mono]] encoding etc.&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
For very low bitrates, up to 100kbps, [[ABR]] is most often the best solution. &lt;br /&gt;
Use &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;--abr &amp;lt;bitrate&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (e.g. --abr 80).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--preset voice&#039;&#039;&#039; is only available in the command line front-end, and is there for compatibility.&lt;br /&gt;
It is currently mapped to &#039;&#039;&#039;&#039;&#039;--abr 56 -mm&#039;&#039;&#039;&#039;&#039;, so that means that the recommendation would be to encode in mono, and use ABR.&lt;br /&gt;
&lt;br /&gt;
===Detailed explanation (long answer)===&lt;br /&gt;
====VBR (variable bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[VBR]]:&#039;&#039;&#039; &#039;&#039;variable bitrate mode. Use variable bitrate modes when the goal is to achieve a fixed level of quality using the lowest possible bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[VBR]] is best used to target a specific quality level, instead of a specific bitrate. The final file size of a [[VBR]] encode is less predictable than with [[ABR]], but the quality is usually better.&lt;br /&gt;
&lt;br /&gt;
Unlike other MP3 encoders which do VBR encoding based on predictions of output quality, LAME&#039;s default VBR method tests the &#039;&#039;actual&#039;&#039; output quality to ensure the desired quality level is always achieved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V(number)&amp;lt;/code&amp;gt; where number is 0-9, 0 being highest quality, 9 being the lowest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The switch &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt;, which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 as it is now the default VBR mode. However, if you&#039;re still using LAME 3.97 or older, you have to add &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; to your commandline to use that mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Bitrate overview (mostly based on LAME 3.98.2 results)&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbit/s&#039;&#039;&#039; || &#039;&#039;&#039;Bitrate range kbit/s&#039;&#039;&#039;&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -b 320 || --preset insane || 320 || 320 CBR&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme || 245 || 220...260&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 ||&amp;amp;nbsp;|| 225 || 190...250&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || 190 || 170...210&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 ||&amp;amp;nbsp;|| 175 || 150...195&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium  || 165 || 140...185&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 ||&amp;amp;nbsp;|| 130 || 120...150&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 ||&amp;amp;nbsp;|| 115 || 100...130&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 ||&amp;amp;nbsp;|| 100 || 80...120&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 ||&amp;amp;nbsp;|| 85 || 70...105&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 ||&amp;amp;nbsp;|| 65 || 45...85&lt;br /&gt;
|}&lt;br /&gt;
See also [[#Technical information|Technical details for recommended LAME settings]].&lt;br /&gt;
&lt;br /&gt;
If you need a predictable bitrate (in a streaming application, for example), use [[ABR]] or [[CBR]] modes, described below.&lt;br /&gt;
&lt;br /&gt;
====ABR (average bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[ABR]]:&#039;&#039;&#039; &#039;&#039;average bitrate mode. A compromise between [[VBR]] and [[CBR]] modes, [[ABR]] encoding varies bits around a specified target bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use [[ABR]] when you need to know the final size of the file but still want to allow the encoder some flexibility to decide which passages need more bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (desired averaged bitrate in kbit/s) can be any value between 8 - 320 , like eg. 9, 17, 80, 128, 133, 200 etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[ABR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====CBR (constant bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[CBR]]:&#039;&#039;&#039; &#039;&#039;constant bitrate mode. [[CBR]] encoding is not efficient. Whereas [[VBR]] and [[ABR]] modes can supply more bits to complex music passages and save bits on simpler ones, [[CBR]] encodes every frame at the same bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[CBR]] is only recommended for usage in streaming situations where the upper bitrate must be strictly enforced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (bitrate in kbit/s) must be chosen from the following values: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b 192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[CBR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
* The rule of thumb when considering encoding options: at a given bitrate, [[VBR]] is higher quality than [[ABR]], which is higher quality than [[CBR]] ([[VBR]] &amp;gt; [[ABR]] &amp;gt; [[CBR]] in terms of quality). The exception to this is when you choose the highest possible [[CBR]] bitrate, which is 320 kbps (-b 320 = --alt-preset insane), but this produces the largest filesizes for doubtful audible benefit.&lt;br /&gt;
&lt;br /&gt;
* All modes and settings mentioned in this topic belong to the specifications of the [[MP3]] standard, and the resulting MP3s should be playable by every [[MP3]] decoder that conforms with the standard. If your decoder or device does not play MP3s produced by LAME, blame the manufacturer or developer, not LAME.&lt;br /&gt;
&lt;br /&gt;
* Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes. Use them only if you want to help developers with feedback. History of [http://www.hydrogenaudio.org/forums/index.php?showtopic=28125/ Lame versions &amp;amp; compiles].&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; switch enables the new [[VBR]] mode (no longer needed with LAME 3.98, as it is now the default VBR mode). In terms of quality, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; appears to be better than the old model, but reports of artifacts when using the new model do exist. Despite these possible issues, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is currently recommended over the default [[VBR]] mode due to both the speed and quality increases afforded by the new algorithm.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-mm&#039;&#039;&#039; : the sound will be encoded in &#039;&#039;&#039;mono&#039;&#039;&#039;. Useful for low bitrates and/or when stereo is not important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:lame-chart-2.png|frame|center|Here a trial to see how the &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;perceived listening quality&amp;lt;/font&amp;gt; improves with settings/&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;averaged filesize&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Hey! What happened to &amp;quot;--alt-preset&amp;quot;?====&lt;br /&gt;
&lt;br /&gt;
The revolutionary &amp;lt;code&amp;gt;--alt-preset&amp;lt;/code&amp;gt; system was introduced in LAME 3.90; it was replaced by the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; flags in later versions. Starting with version 3.94, the &amp;lt;code&amp;gt;-Vx&amp;lt;/code&amp;gt; quality system was introduced, which allows finer control over the desired bitrate; the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; switches were made into aliases to the corresponding &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; flags for the sake of backwards compatibility. &#039;&#039;&#039;There is no difference between the output you get if you use &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--alt-preset standard&amp;lt;/code&amp;gt;.&#039;&#039;&#039; (Although adding &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is recommended for now, see above for details.)&lt;br /&gt;
&lt;br /&gt;
More encoding options are available under the new system, such as &amp;lt;code&amp;gt;-V1&amp;lt;/code&amp;gt;, which provides a level of quality between the old &amp;quot;standard&amp;quot; and &amp;quot;extreme&amp;quot; presets, or &amp;lt;code&amp;gt;-V3&amp;lt;/code&amp;gt;, which is between the old &amp;quot;medium&amp;quot; and &amp;quot;standard&amp;quot; presets.&lt;br /&gt;
&lt;br /&gt;
Recent LAME versions feature more streamlined command line options, and it&#039;s recommended to stick to one of the values described in the text or shown in the tables above.&lt;br /&gt;
&lt;br /&gt;
For example, the following command lines will all produce the same output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;-b 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(&amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt; is the exact same thing as &amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt;, etc.)&lt;br /&gt;
&lt;br /&gt;
==Technical information==&lt;br /&gt;
The table below contains technical details about the recommended settings. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Technical details of the recommended settings&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbps&#039;&#039;&#039; || &#039;&#039;&#039;[[LAME_Y_SWITCH|Y Switch]]&#039;&#039;&#039; || &#039;&#039;&#039;Lowpass&#039;&#039;&#039; || &#039;&#039;&#039;Resample&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme ||  ~245 || || 19383 Hz - 19916 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 || || ~225 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || ~190 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 || || ~175 || Y || 17960 Hz - 18494 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium || ~165 || Y || 17249 Hz - 17782 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 || || ~130 || Y || 16538 Hz - 17071 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 || || ~115 || Y || 15115 Hz - 15648 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 || || ~100 || Y || 14581 Hz - 14968 Hz || 32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 || || ~85 || Y || 12516 Hz - 12903 Hz ||  32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 || || ~65 || Y || 9336 Hz -  9602 Hz || 24000 Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]]&lt;br /&gt;
* [[EAC_and_Lame | Configuring EAC and LAME]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;People who took part in suggesting the different settings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, r3mix, ff123, Hans Heijden, kjempen, Benjamin Lebsanft, GeSomeone, Wombat &amp;amp; GuruBoolez for his immense testing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creation of the alt preset system and related special code level quality enhancements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, with technical assistance from Robert Hegemann and Naoki Shibata, Gabriel and extensive tuning help and quality verification via listening tests from JohnV and also initial help (--dm-preset era) from Hans Heijden, ff123, Wombat, and others. Test clips, bitrate information, and further listening tests provided by TheBashar, zbutsam, Pio2001, BadDuDeX, r3mix, h, TarX, Hans Heijden, ff123, Wombat, Filburt, Volcano, Garf, MrDrew, TrNSZ, nyaochi, Amadeus93, in no particular order, and many, many others we (Dibrom, user) probably forgot to mention.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Idea (also exposing the need for a unified preset system), Original post and list of original settings collected by:&#039;&#039;&#039; user&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Layout and additional work by:&#039;&#039;&#039; dev0, CiTay, SNYder, Dibrom.&lt;br /&gt;
&lt;br /&gt;
And finally...&lt;br /&gt;
&lt;br /&gt;
Thank you ALL in the community for making it what it is, providing interest and discussion and helping to work towards the most concise, well tuned, and most thought out MP3 quality &amp;quot;paradigm&amp;quot; seen yet! -- Dibrom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*[[CBR]]&lt;br /&gt;
*[[ABR]]&lt;br /&gt;
*[[VBR]]&lt;br /&gt;
*[[LAME_Y_SWITH| The -Y switch]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://lame.sourceforge.net LAME official homepage]&lt;br /&gt;
*[http://www.rjamorim.com/rrw/lame.html Historical versions of LAME] at ReallyRareWares&lt;br /&gt;
*[http://www.rjamorim.com/test/ Several multiformat listening tests] featuring LAME and other encoders.&lt;br /&gt;
*[http://www.rarewares.org/mp3.html RareWares MP3 page]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=478&amp;amp;st=0 Discussion of recommended Lame compiles in the Hydrogenaudio forum]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=16&amp;amp;t=32288 Forum discussion of the recommended settings]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=15&amp;amp;t=203 Forum discussion of the recommended settings (older)]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=32288&amp;amp;view=findpost&amp;amp;p=327262 Previous recommendations (outdated)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_SWITH&amp;diff=20260</id>
		<title>LAME Y SWITH</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_SWITH&amp;diff=20260"/>
		<updated>2010-03-31T19:43:05Z</updated>

		<summary type="html">&lt;p&gt;JAZ: LAME Y SWITH moved to LAME Y SWITCH: typo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[LAME Y SWITCH]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20259</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20259"/>
		<updated>2010-03-31T19:43:05Z</updated>

		<summary type="html">&lt;p&gt;JAZ: LAME Y SWITH moved to LAME Y SWITCH: typo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. It is frequently misinterpreted, like [[Joint_stereo|joint stereo]], and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20258</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20258"/>
		<updated>2010-03-31T13:01:52Z</updated>

		<summary type="html">&lt;p&gt;JAZ: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. It is frequently misinterpreted, like [[Joint_stereo|joint stereo]], and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20257</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20257"/>
		<updated>2010-03-31T12:56:48Z</updated>

		<summary type="html">&lt;p&gt;JAZ: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20256</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20256"/>
		<updated>2010-03-31T12:56:36Z</updated>

		<summary type="html">&lt;p&gt;JAZ: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0 |Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20255</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20255"/>
		<updated>2010-03-31T12:56:06Z</updated>

		<summary type="html">&lt;p&gt;JAZ: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0|Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20254</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20254"/>
		<updated>2010-03-31T12:55:36Z</updated>

		<summary type="html">&lt;p&gt;JAZ: Small reordering, Adding aknowledgements.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation under this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;br /&gt;
[http://www.hydrogenaudio.org/forums/index.php?showtopic=79841&amp;amp;st=0|Hydrogenaudio thread discussing this article]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
This article has been brought up partially with comments fom Aleron Ives, robert and benski.&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20253</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20253"/>
		<updated>2010-03-31T11:59:59Z</updated>

		<summary type="html">&lt;p&gt;JAZ: Added description for CBR operation and improved the description of the -Y switch in the technical section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate the alternate logic that CBR uses in respect of quantization noise in the sfb21 band.&lt;br /&gt;
* The encoder determines the desired quantization noise within the sfbs. The scalefactors are choosen acording to these values.&lt;br /&gt;
* If -Y switch is not used (either implicitely or explicitely), sfb21 gets evaluated and the global gain is set acordingly.&lt;br /&gt;
* Adding -Y lets the encoder ignore whatever quantization noise will be in sfb21.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR/ABR ==&lt;br /&gt;
The -Y switch is used along with the [[LAME#Technical information|VBR modes]].&lt;br /&gt;
&lt;br /&gt;
For CBR and ABR, the encoder uses -Y implicitely.&lt;br /&gt;
Concretely, the encoder targets a given bitrate, and adjusts the quantization steps until that target is reached.&lt;br /&gt;
Since the sfb21 does not have quantization, its quantization noise is not evaluated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation for this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20252</id>
		<title>LAME</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20252"/>
		<updated>2010-03-31T11:39:24Z</updated>

		<summary type="html">&lt;p&gt;JAZ: added link to the -y switch article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = LAME&lt;br /&gt;
| screenshot = [[Image:Lamelogo.png|250px|LAME official logo]]&lt;br /&gt;
| caption = LAME ain&#039;t an MP3 encoder&lt;br /&gt;
| maintainer = The LAME project&lt;br /&gt;
| stable_release = 3.98.4&lt;br /&gt;
| preview_release = none&lt;br /&gt;
| operating_system = Windows, Mac OS/X, Linux/BSD&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = LGPL&lt;br /&gt;
| website = [http://lame.sourceforge.net/ LAME website]&lt;br /&gt;
}}{{featured}}&lt;br /&gt;
&#039;&#039;&#039;LAME&#039;&#039;&#039; (Lame Ain&#039;t an MP3 Encoder) is the [[Hydrogenaudio]] recommended [[MP3]] encoder. It has been developed by the open-source community since 1998, and has become the highest quality [[MP3]] encoder for most purposes.&lt;br /&gt;
&lt;br /&gt;
Some benefits of using LAME:&lt;br /&gt;
* Highly optimised presets&lt;br /&gt;
* Fast encoding&lt;br /&gt;
* [[CBR]], [[ABR]] and quality-optimized [[VBR]] encoding methods&lt;br /&gt;
* [[Gapless]] playback with LAME-header compliant decoders&lt;br /&gt;
* Supported by recommended CD rippers [[Exact Audio Copy]] and [[CDex]]&lt;br /&gt;
* Highly tunable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
LAME development began around mid-1998. Mike Cheng started it as a patch against the 8hz-MP3 encoder sources. After some quality concerns raised by others, he decided to start from scratch based on the dist10 sources. That branch (a patch against the reference sources) became LAME 2.0, and only on LAME 3.81 they got rid of all dist10 code, making LAME a completely new program-not a mere patch of an existing encoder.&lt;br /&gt;
&lt;br /&gt;
The project quickly became a team effort. Mike Cheng eventually left leadership and started working on [http://toolame.sourceforge.net/ tooLAME], an [[MP2]] encoder. Mark Taylor became leader and released version 3.0 featuring gpsycho, a new psychoacoustic model developed by him.&lt;br /&gt;
&lt;br /&gt;
Nowadays LAME is considered the best MP3 encoder at mid-high bitrates and features the best VBR model among MP3 implementations, mostly thanks to the dedicated work of talented developers like Takehiro Tominaga, Naoki Shibata, Darin Morrison, Gabriel Bouvigne, Robert Hegemann, etc. And development is still going on...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder compiles and source code==&lt;br /&gt;
&lt;br /&gt;
Unless noted otherwise, the recommended LAME compile for optimal quality is always the &#039;&#039;&#039;latest stable version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It is suggested that the compiles available here be used with the recommended encoder settings you can find below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download the latest LAME from these links:&#039;&#039;&#039;&lt;br /&gt;
* [http://www.rarewares.org/mp3.php RareWares MP3 Page] - Compiles for Win32, Mac OS X universal binary, Linux etc.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=290&amp;amp;package_id=309 LAME source code on SourceForge]&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder settings==&lt;br /&gt;
This section describes the [[Hydrogenaudio]] recommended settings to be used with [[LAME]] for highest quality [[MP3]] encoding. These settings require LAME 3.98 or later (the latest stable version is recommended).&lt;br /&gt;
&lt;br /&gt;
===Quick start (short answer)===&lt;br /&gt;
====Best quality: &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;archiving&amp;quot;&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;-b 320&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt;. This is the strongest setting for [[MP3]], with the lowest risk of [[artifact]]s.&lt;br /&gt;
With the exception of a few situations, quality is rarely better than the highest [[VBR]] profiles described below. However, &#039;archiving&#039; music using a lossy format like [[MP3]] is never recommended &amp;amp;ndash; no matter how transparent the resulting files might sound.&lt;br /&gt;
The alternative is to use [[Lossless]] formats like [[WavPack]], [[FLAC]] etc. that allow true archiving, bit for bit like on the original CD.&lt;br /&gt;
&lt;br /&gt;
====High quality: &amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;HiFi, home or quiet listening&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V0&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~245 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V1&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~225 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V2&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~190 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V3&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~175 kbps) are recommended.&lt;br /&gt;
These settings will normally produce [[transparent]] encoding (transparent = most people can&#039;t distinguish the [[MP3]] from the original in an [[ABX]] blind test).&lt;br /&gt;
Audible differences between these presets exist, but are rare.&lt;br /&gt;
&lt;br /&gt;
====Portable: &amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;background noise and low bitrate requirement, small sizes&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~165 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V5&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~130 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~115 kbps) are recommended.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; produces an &amp;quot;acceptable&amp;quot; quality, while &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; should be close to perceptual [[transparency]].&lt;br /&gt;
&lt;br /&gt;
====Very low bitrate, small sizes: &amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;eg. for voice, radio, [[mono]] encoding etc.&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
For very low bitrates, up to 100kbps, [[ABR]] is most often the best solution. &lt;br /&gt;
Use &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;--abr &amp;lt;bitrate&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (e.g. --abr 80).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--preset voice&#039;&#039;&#039; is only available in the command line front-end, and is there for compatibility.&lt;br /&gt;
It is currently mapped to &#039;&#039;&#039;&#039;&#039;--abr 56 -mm&#039;&#039;&#039;&#039;&#039;, so that means that the recommendation would be to encode in mono, and use ABR.&lt;br /&gt;
&lt;br /&gt;
===Detailed explanation (long answer)===&lt;br /&gt;
====VBR (variable bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[VBR]]:&#039;&#039;&#039; &#039;&#039;variable bitrate mode. Use variable bitrate modes when the goal is to achieve a fixed level of quality using the lowest possible bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[VBR]] is best used to target a specific quality level, instead of a specific bitrate. The final file size of a [[VBR]] encode is less predictable than with [[ABR]], but the quality is usually better.&lt;br /&gt;
&lt;br /&gt;
Unlike other MP3 encoders which do VBR encoding based on predictions of output quality, LAME&#039;s default VBR method tests the &#039;&#039;actual&#039;&#039; output quality to ensure the desired quality level is always achieved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V(number)&amp;lt;/code&amp;gt; where number is 0-9, 0 being highest quality, 9 being the lowest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The switch &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt;, which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 as it is now the default VBR mode. However, if you&#039;re still using LAME 3.97 or older, you have to add &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; to your commandline to use that mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Bitrate overview (mostly based on LAME 3.98.2 results)&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbit/s&#039;&#039;&#039; || &#039;&#039;&#039;Bitrate range kbit/s&#039;&#039;&#039;&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -b 320 || --preset insane || 320 || 320 CBR&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme || 245 || 220...260&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 ||&amp;amp;nbsp;|| 225 || 190...250&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || 190 || 170...210&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 ||&amp;amp;nbsp;|| 175 || 150...195&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium  || 165 || 140...185&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 ||&amp;amp;nbsp;|| 130 || 120...150&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 ||&amp;amp;nbsp;|| 115 || 100...130&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 ||&amp;amp;nbsp;|| 100 || 80...120&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 ||&amp;amp;nbsp;|| 85 || 70...105&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 ||&amp;amp;nbsp;|| 65 || 45...85&lt;br /&gt;
|}&lt;br /&gt;
See also [[#Technical information|Technical details for recommended LAME settings]].&lt;br /&gt;
&lt;br /&gt;
If you need a predictable bitrate (in a streaming application, for example), use [[ABR]] or [[CBR]] modes, described below.&lt;br /&gt;
&lt;br /&gt;
====ABR (average bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[ABR]]:&#039;&#039;&#039; &#039;&#039;average bitrate mode. A compromise between [[VBR]] and [[CBR]] modes, [[ABR]] encoding varies bits around a specified target bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use [[ABR]] when you need to know the final size of the file but still want to allow the encoder some flexibility to decide which passages need more bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (desired averaged bitrate in kbit/s) can be any value between 8 - 320 , like eg. 9, 17, 80, 128, 133, 200 etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[ABR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====CBR (constant bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[CBR]]:&#039;&#039;&#039; &#039;&#039;constant bitrate mode. [[CBR]] encoding is not efficient. Whereas [[VBR]] and [[ABR]] modes can supply more bits to complex music passages and save bits on simpler ones, [[CBR]] encodes every frame at the same bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[CBR]] is only recommended for usage in streaming situations where the upper bitrate must be strictly enforced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (bitrate in kbit/s) must be chosen from the following values: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b 192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[CBR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
* The rule of thumb when considering encoding options: at a given bitrate, [[VBR]] is higher quality than [[ABR]], which is higher quality than [[CBR]] ([[VBR]] &amp;gt; [[ABR]] &amp;gt; [[CBR]] in terms of quality). The exception to this is when you choose the highest possible [[CBR]] bitrate, which is 320 kbps (-b 320 = --alt-preset insane), but this produces the largest filesizes for doubtful audible benefit.&lt;br /&gt;
&lt;br /&gt;
* All modes and settings mentioned in this topic belong to the specifications of the [[MP3]] standard, and the resulting MP3s should be playable by every [[MP3]] decoder that conforms with the standard. If your decoder or device does not play MP3s produced by LAME, blame the manufacturer or developer, not LAME.&lt;br /&gt;
&lt;br /&gt;
* Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes. Use them only if you want to help developers with feedback. History of [http://www.hydrogenaudio.org/forums/index.php?showtopic=28125/ Lame versions &amp;amp; compiles].&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; switch enables the new [[VBR]] mode (no longer needed with LAME 3.98, as it is now the default VBR mode). In terms of quality, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; appears to be better than the old model, but reports of artifacts when using the new model do exist. Despite these possible issues, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is currently recommended over the default [[VBR]] mode due to both the speed and quality increases afforded by the new algorithm.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-mm&#039;&#039;&#039; : the sound will be encoded in &#039;&#039;&#039;mono&#039;&#039;&#039;. Useful for low bitrates and/or when stereo is not important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:lame-chart-2.png|frame|center|Here a trial to see how the &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;perceived listening quality&amp;lt;/font&amp;gt; improves with settings/&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;averaged filesize&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Hey! What happened to &amp;quot;--alt-preset&amp;quot;?====&lt;br /&gt;
&lt;br /&gt;
The revolutionary &amp;lt;code&amp;gt;--alt-preset&amp;lt;/code&amp;gt; system was introduced in LAME 3.90; it was replaced by the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; flags in later versions. Starting with version 3.94, the &amp;lt;code&amp;gt;-Vx&amp;lt;/code&amp;gt; quality system was introduced, which allows finer control over the desired bitrate; the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; switches were made into aliases to the corresponding &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; flags for the sake of backwards compatibility. &#039;&#039;&#039;There is no difference between the output you get if you use &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--alt-preset standard&amp;lt;/code&amp;gt;.&#039;&#039;&#039; (Although adding &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is recommended for now, see above for details.)&lt;br /&gt;
&lt;br /&gt;
More encoding options are available under the new system, such as &amp;lt;code&amp;gt;-V1&amp;lt;/code&amp;gt;, which provides a level of quality between the old &amp;quot;standard&amp;quot; and &amp;quot;extreme&amp;quot; presets, or &amp;lt;code&amp;gt;-V3&amp;lt;/code&amp;gt;, which is between the old &amp;quot;medium&amp;quot; and &amp;quot;standard&amp;quot; presets.&lt;br /&gt;
&lt;br /&gt;
Recent LAME versions feature more streamlined command line options, and it&#039;s recommended to stick to one of the values described in the text or shown in the tables above.&lt;br /&gt;
&lt;br /&gt;
For example, the following command lines will all produce the same output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;-b 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(&amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt; is the exact same thing as &amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt;, etc.)&lt;br /&gt;
&lt;br /&gt;
==Technical information==&lt;br /&gt;
The table below contains technical details about the recommended settings. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Technical details of the recommended settings&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbps&#039;&#039;&#039; || &#039;&#039;&#039;[[LAME_Y_SWITH|Y Switch]]&#039;&#039;&#039; || &#039;&#039;&#039;Lowpass&#039;&#039;&#039; || &#039;&#039;&#039;Resample&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme ||  ~245 || || 19383 Hz - 19916 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 || || ~225 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || ~190 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 || || ~175 || Y || 17960 Hz - 18494 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium || ~165 || Y || 17249 Hz - 17782 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 || || ~130 || Y || 16538 Hz - 17071 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 || || ~115 || Y || 15115 Hz - 15648 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 || || ~100 || Y || 14581 Hz - 14968 Hz || 32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 || || ~85 || Y || 12516 Hz - 12903 Hz ||  32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 || || ~65 || Y || 9336 Hz -  9602 Hz || 24000 Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]]&lt;br /&gt;
* [[EAC_and_Lame | Configuring EAC and LAME]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;People who took part in suggesting the different settings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, r3mix, ff123, Hans Heijden, kjempen, Benjamin Lebsanft, GeSomeone, Wombat &amp;amp; GuruBoolez for his immense testing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creation of the alt preset system and related special code level quality enhancements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, with technical assistance from Robert Hegemann and Naoki Shibata, Gabriel and extensive tuning help and quality verification via listening tests from JohnV and also initial help (--dm-preset era) from Hans Heijden, ff123, Wombat, and others. Test clips, bitrate information, and further listening tests provided by TheBashar, zbutsam, Pio2001, BadDuDeX, r3mix, h, TarX, Hans Heijden, ff123, Wombat, Filburt, Volcano, Garf, MrDrew, TrNSZ, nyaochi, Amadeus93, in no particular order, and many, many others we (Dibrom, user) probably forgot to mention.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Idea (also exposing the need for a unified preset system), Original post and list of original settings collected by:&#039;&#039;&#039; user&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Layout and additional work by:&#039;&#039;&#039; dev0, CiTay, SNYder, Dibrom.&lt;br /&gt;
&lt;br /&gt;
And finally...&lt;br /&gt;
&lt;br /&gt;
Thank you ALL in the community for making it what it is, providing interest and discussion and helping to work towards the most concise, well tuned, and most thought out MP3 quality &amp;quot;paradigm&amp;quot; seen yet! -- Dibrom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*[[CBR]]&lt;br /&gt;
*[[ABR]]&lt;br /&gt;
*[[VBR]]&lt;br /&gt;
*[[LAME_Y_SWITH| The -Y switch]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://lame.sourceforge.net LAME official homepage]&lt;br /&gt;
*[http://www.rjamorim.com/rrw/lame.html Historical versions of LAME] at ReallyRareWares&lt;br /&gt;
*[http://www.rjamorim.com/test/ Several multiformat listening tests] featuring LAME and other encoders.&lt;br /&gt;
*[http://www.rarewares.org/mp3.html RareWares MP3 page]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=478&amp;amp;st=0 Discussion of recommended Lame compiles in the Hydrogenaudio forum]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=16&amp;amp;t=32288 Forum discussion of the recommended settings]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=15&amp;amp;t=203 Forum discussion of the recommended settings (older)]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=32288&amp;amp;view=findpost&amp;amp;p=327262 Previous recommendations (outdated)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20251</id>
		<title>LAME</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME&amp;diff=20251"/>
		<updated>2010-03-31T11:37:49Z</updated>

		<summary type="html">&lt;p&gt;JAZ: added link to the -y switch article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Software Infobox&lt;br /&gt;
| name = LAME&lt;br /&gt;
| screenshot = [[Image:Lamelogo.png|250px|LAME official logo]]&lt;br /&gt;
| caption = LAME ain&#039;t an MP3 encoder&lt;br /&gt;
| maintainer = The LAME project&lt;br /&gt;
| stable_release = 3.98.4&lt;br /&gt;
| preview_release = none&lt;br /&gt;
| operating_system = Windows, Mac OS/X, Linux/BSD&lt;br /&gt;
| use = Encoder/Decoder&lt;br /&gt;
| license = LGPL&lt;br /&gt;
| website = [http://lame.sourceforge.net/ LAME website]&lt;br /&gt;
}}{{featured}}&lt;br /&gt;
&#039;&#039;&#039;LAME&#039;&#039;&#039; (Lame Ain&#039;t an MP3 Encoder) is the [[Hydrogenaudio]] recommended [[MP3]] encoder. It has been developed by the open-source community since 1998, and has become the highest quality [[MP3]] encoder for most purposes.&lt;br /&gt;
&lt;br /&gt;
Some benefits of using LAME:&lt;br /&gt;
* Highly optimised presets&lt;br /&gt;
* Fast encoding&lt;br /&gt;
* [[CBR]], [[ABR]] and quality-optimized [[VBR]] encoding methods&lt;br /&gt;
* [[Gapless]] playback with LAME-header compliant decoders&lt;br /&gt;
* Supported by recommended CD rippers [[Exact Audio Copy]] and [[CDex]]&lt;br /&gt;
* Highly tunable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
LAME development began around mid-1998. Mike Cheng started it as a patch against the 8hz-MP3 encoder sources. After some quality concerns raised by others, he decided to start from scratch based on the dist10 sources. That branch (a patch against the reference sources) became LAME 2.0, and only on LAME 3.81 they got rid of all dist10 code, making LAME a completely new program-not a mere patch of an existing encoder.&lt;br /&gt;
&lt;br /&gt;
The project quickly became a team effort. Mike Cheng eventually left leadership and started working on [http://toolame.sourceforge.net/ tooLAME], an [[MP2]] encoder. Mark Taylor became leader and released version 3.0 featuring gpsycho, a new psychoacoustic model developed by him.&lt;br /&gt;
&lt;br /&gt;
Nowadays LAME is considered the best MP3 encoder at mid-high bitrates and features the best VBR model among MP3 implementations, mostly thanks to the dedicated work of talented developers like Takehiro Tominaga, Naoki Shibata, Darin Morrison, Gabriel Bouvigne, Robert Hegemann, etc. And development is still going on...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder compiles and source code==&lt;br /&gt;
&lt;br /&gt;
Unless noted otherwise, the recommended LAME compile for optimal quality is always the &#039;&#039;&#039;latest stable version&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It is suggested that the compiles available here be used with the recommended encoder settings you can find below.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Download the latest LAME from these links:&#039;&#039;&#039;&lt;br /&gt;
* [http://www.rarewares.org/mp3.php RareWares MP3 Page] - Compiles for Win32, Mac OS X universal binary, Linux etc.&lt;br /&gt;
* [http://sourceforge.net/project/showfiles.php?group_id=290&amp;amp;package_id=309 LAME source code on SourceForge]&lt;br /&gt;
&lt;br /&gt;
==Recommended encoder settings==&lt;br /&gt;
This section describes the [[Hydrogenaudio]] recommended settings to be used with [[LAME]] for highest quality [[MP3]] encoding. These settings require LAME 3.98 or later (the latest stable version is recommended).&lt;br /&gt;
&lt;br /&gt;
===Quick start (short answer)===&lt;br /&gt;
====Best quality: &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&amp;quot;archiving&amp;quot;&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;-b 320&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt;. This is the strongest setting for [[MP3]], with the lowest risk of [[artifact]]s.&lt;br /&gt;
With the exception of a few situations, quality is rarely better than the highest [[VBR]] profiles described below. However, &#039;archiving&#039; music using a lossy format like [[MP3]] is never recommended &amp;amp;ndash; no matter how transparent the resulting files might sound.&lt;br /&gt;
The alternative is to use [[Lossless]] formats like [[WavPack]], [[FLAC]] etc. that allow true archiving, bit for bit like on the original CD.&lt;br /&gt;
&lt;br /&gt;
====High quality: &amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;HiFi, home or quiet listening&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V0&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~245 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V1&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~225 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V2&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~190 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:green&amp;quot;&amp;gt;-V3&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~175 kbps) are recommended.&lt;br /&gt;
These settings will normally produce [[transparent]] encoding (transparent = most people can&#039;t distinguish the [[MP3]] from the original in an [[ABX]] blind test).&lt;br /&gt;
Audible differences between these presets exist, but are rare.&lt;br /&gt;
&lt;br /&gt;
====Portable: &amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;background noise and low bitrate requirement, small sizes&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~165 kbps), &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V5&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~130 kbps) or &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (~115 kbps) are recommended.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V6&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; produces an &amp;quot;acceptable&amp;quot; quality, while &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:purple&amp;quot;&amp;gt;-V4&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; should be close to perceptual [[transparency]].&lt;br /&gt;
&lt;br /&gt;
====Very low bitrate, small sizes: &amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;eg. for voice, radio, [[mono]] encoding etc.&amp;lt;/font&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
For very low bitrates, up to 100kbps, [[ABR]] is most often the best solution. &lt;br /&gt;
Use &amp;lt;code&amp;gt;&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;--abr &amp;lt;bitrate&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/code&amp;gt; (e.g. --abr 80).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--preset voice&#039;&#039;&#039; is only available in the command line front-end, and is there for compatibility.&lt;br /&gt;
It is currently mapped to &#039;&#039;&#039;&#039;&#039;--abr 56 -mm&#039;&#039;&#039;&#039;&#039;, so that means that the recommendation would be to encode in mono, and use ABR.&lt;br /&gt;
&lt;br /&gt;
===Detailed explanation (long answer)===&lt;br /&gt;
====VBR (variable bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[VBR]]:&#039;&#039;&#039; &#039;&#039;variable bitrate mode. Use variable bitrate modes when the goal is to achieve a fixed level of quality using the lowest possible bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[VBR]] is best used to target a specific quality level, instead of a specific bitrate. The final file size of a [[VBR]] encode is less predictable than with [[ABR]], but the quality is usually better.&lt;br /&gt;
&lt;br /&gt;
Unlike other MP3 encoders which do VBR encoding based on predictions of output quality, LAME&#039;s default VBR method tests the &#039;&#039;actual&#039;&#039; output quality to ensure the desired quality level is always achieved.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V(number)&amp;lt;/code&amp;gt; where number is 0-9, 0 being highest quality, 9 being the lowest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The switch &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt;, which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 as it is now the default VBR mode. However, if you&#039;re still using LAME 3.97 or older, you have to add &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; to your commandline to use that mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Bitrate overview (mostly based on LAME 3.98.2 results)&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbit/s&#039;&#039;&#039; || &#039;&#039;&#039;Bitrate range kbit/s&#039;&#039;&#039;&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -b 320 || --preset insane || 320 || 320 CBR&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme || 245 || 220...260&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 ||&amp;amp;nbsp;|| 225 || 190...250&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || 190 || 170...210&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 ||&amp;amp;nbsp;|| 175 || 150...195&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium  || 165 || 140...185&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 ||&amp;amp;nbsp;|| 130 || 120...150&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 ||&amp;amp;nbsp;|| 115 || 100...130&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 ||&amp;amp;nbsp;|| 100 || 80...120&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 ||&amp;amp;nbsp;|| 85 || 70...105&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 ||&amp;amp;nbsp;|| 65 || 45...85&lt;br /&gt;
|}&lt;br /&gt;
See also [[#Technical information|Technical details for recommended LAME settings]].&lt;br /&gt;
&lt;br /&gt;
If you need a predictable bitrate (in a streaming application, for example), use [[ABR]] or [[CBR]] modes, described below.&lt;br /&gt;
&lt;br /&gt;
====ABR (average bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[ABR]]:&#039;&#039;&#039; &#039;&#039;average bitrate mode. A compromise between [[VBR]] and [[CBR]] modes, [[ABR]] encoding varies bits around a specified target bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use [[ABR]] when you need to know the final size of the file but still want to allow the encoder some flexibility to decide which passages need more bits.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (desired averaged bitrate in kbit/s) can be any value between 8 - 320 , like eg. 9, 17, 80, 128, 133, 200 etc.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;--preset 200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[ABR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====CBR (constant bitrate) settings====&lt;br /&gt;
&#039;&#039;&#039;[[CBR]]:&#039;&#039;&#039; &#039;&#039;constant bitrate mode. [[CBR]] encoding is not efficient. Whereas [[VBR]] and [[ABR]] modes can supply more bits to complex music passages and save bits on simpler ones, [[CBR]] encodes every frame at the same bitrate.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[CBR]] is only recommended for usage in streaming situations where the upper bitrate must be strictly enforced.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Usage:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b &amp;lt;bitrate&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;bitrate&amp;gt; (bitrate in kbit/s) must be chosen from the following values: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039; &amp;lt;code&amp;gt;-b 192&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; &#039;&#039;[[CBR]] setting is tuned from 320 kbit/s down to 80 kbit/s.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
* The rule of thumb when considering encoding options: at a given bitrate, [[VBR]] is higher quality than [[ABR]], which is higher quality than [[CBR]] ([[VBR]] &amp;gt; [[ABR]] &amp;gt; [[CBR]] in terms of quality). The exception to this is when you choose the highest possible [[CBR]] bitrate, which is 320 kbps (-b 320 = --alt-preset insane), but this produces the largest filesizes for doubtful audible benefit.&lt;br /&gt;
&lt;br /&gt;
* All modes and settings mentioned in this topic belong to the specifications of the [[MP3]] standard, and the resulting MP3s should be playable by every [[MP3]] decoder that conforms with the standard. If your decoder or device does not play MP3s produced by LAME, blame the manufacturer or developer, not LAME.&lt;br /&gt;
&lt;br /&gt;
* Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes. Use them only if you want to help developers with feedback. History of [http://www.hydrogenaudio.org/forums/index.php?showtopic=28125/ Lame versions &amp;amp; compiles].&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; switch enables the new [[VBR]] mode (no longer needed with LAME 3.98, as it is now the default VBR mode). In terms of quality, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; appears to be better than the old model, but reports of artifacts when using the new model do exist. Despite these possible issues, &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is currently recommended over the default [[VBR]] mode due to both the speed and quality increases afforded by the new algorithm.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;-mm&#039;&#039;&#039; : the sound will be encoded in &#039;&#039;&#039;mono&#039;&#039;&#039;. Useful for low bitrates and/or when stereo is not important.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:lame-chart-2.png|frame|center|Here a trial to see how the &amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;perceived listening quality&amp;lt;/font&amp;gt; improves with settings/&amp;lt;font style=&amp;quot;color:blue&amp;quot;&amp;gt;averaged filesize&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Hey! What happened to &amp;quot;--alt-preset&amp;quot;?====&lt;br /&gt;
&lt;br /&gt;
The revolutionary &amp;lt;code&amp;gt;--alt-preset&amp;lt;/code&amp;gt; system was introduced in LAME 3.90; it was replaced by the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; flags in later versions. Starting with version 3.94, the &amp;lt;code&amp;gt;-Vx&amp;lt;/code&amp;gt; quality system was introduced, which allows finer control over the desired bitrate; the &amp;lt;code&amp;gt;--preset&amp;lt;/code&amp;gt; switches were made into aliases to the corresponding &amp;lt;code&amp;gt;-V&amp;lt;/code&amp;gt; flags for the sake of backwards compatibility. &#039;&#039;&#039;There is no difference between the output you get if you use &amp;lt;code&amp;gt;-V2&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--alt-preset standard&amp;lt;/code&amp;gt;.&#039;&#039;&#039; (Although adding &amp;lt;code&amp;gt;--vbr-new&amp;lt;/code&amp;gt; is recommended for now, see above for details.)&lt;br /&gt;
&lt;br /&gt;
More encoding options are available under the new system, such as &amp;lt;code&amp;gt;-V1&amp;lt;/code&amp;gt;, which provides a level of quality between the old &amp;quot;standard&amp;quot; and &amp;quot;extreme&amp;quot; presets, or &amp;lt;code&amp;gt;-V3&amp;lt;/code&amp;gt;, which is between the old &amp;quot;medium&amp;quot; and &amp;quot;standard&amp;quot; presets.&lt;br /&gt;
&lt;br /&gt;
Recent LAME versions feature more streamlined command line options, and it&#039;s recommended to stick to one of the values described in the text or shown in the tables above.&lt;br /&gt;
&lt;br /&gt;
For example, the following command lines will all produce the same output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset insane&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;-b 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset 320&amp;lt;/code&amp;gt; = &amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(&amp;lt;code&amp;gt;--preset cbr 320&amp;lt;/code&amp;gt; is the exact same thing as &amp;lt;code&amp;gt;--alt-preset insane&amp;lt;/code&amp;gt;, etc.)&lt;br /&gt;
&lt;br /&gt;
==Technical information==&lt;br /&gt;
The table below contains technical details about the recommended settings. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin: 1em auto 1em auto;&amp;quot;&lt;br /&gt;
|+&#039;&#039;&#039;Technical details of the recommended settings&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Switch&#039;&#039;&#039; || &#039;&#039;&#039;Preset&#039;&#039;&#039; || &#039;&#039;&#039;Target Kbps&#039;&#039;&#039; || &#039;&#039;&#039;Y Switch&#039;&#039;&#039; || &#039;&#039;&#039;Lowpass&#039;&#039;&#039; || &#039;&#039;&#039;Resample&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 0 || --preset fast extreme ||  ~245 || || 19383 Hz - 19916 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 1 || || ~225 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 2 || --preset fast standard || ~190 || || 18671 Hz - 19205 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 3 || || ~175 || Y || 17960 Hz - 18494 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 4 || --preset fast medium || ~165 || Y || 17249 Hz - 17782 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 5 || || ~130 || Y || 16538 Hz - 17071 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 6 || || ~115 || Y || 15115 Hz - 15648 Hz ||&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 7 || || ~100 || Y || 14581 Hz - 14968 Hz || 32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 8 || || ~85 || Y || 12516 Hz - 12903 Hz ||  32000 Hz&lt;br /&gt;
|-&lt;br /&gt;
|- style=&amp;quot;background:white;&amp;quot;&lt;br /&gt;
| -V 9 || || ~65 || Y || 9336 Hz -  9602 Hz || 24000 Hz&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[MP3]]&lt;br /&gt;
* [[Exact_Audio_Copy|Exact Audio Copy]]&lt;br /&gt;
* [[EAC_and_Lame | Configuring EAC and LAME]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes and references==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;People who took part in suggesting the different settings:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, r3mix, ff123, Hans Heijden, kjempen, Benjamin Lebsanft, GeSomeone, Wombat &amp;amp; GuruBoolez for his immense testing.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Creation of the alt preset system and related special code level quality enhancements:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Dibrom, with technical assistance from Robert Hegemann and Naoki Shibata, Gabriel and extensive tuning help and quality verification via listening tests from JohnV and also initial help (--dm-preset era) from Hans Heijden, ff123, Wombat, and others. Test clips, bitrate information, and further listening tests provided by TheBashar, zbutsam, Pio2001, BadDuDeX, r3mix, h, TarX, Hans Heijden, ff123, Wombat, Filburt, Volcano, Garf, MrDrew, TrNSZ, nyaochi, Amadeus93, in no particular order, and many, many others we (Dibrom, user) probably forgot to mention.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Idea (also exposing the need for a unified preset system), Original post and list of original settings collected by:&#039;&#039;&#039; user&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Layout and additional work by:&#039;&#039;&#039; dev0, CiTay, SNYder, Dibrom.&lt;br /&gt;
&lt;br /&gt;
And finally...&lt;br /&gt;
&lt;br /&gt;
Thank you ALL in the community for making it what it is, providing interest and discussion and helping to work towards the most concise, well tuned, and most thought out MP3 quality &amp;quot;paradigm&amp;quot; seen yet! -- Dibrom&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
*[[CBR]]&lt;br /&gt;
*[[ABR]]&lt;br /&gt;
*[[VBR]]&lt;br /&gt;
*[[LAME_Y_SWITH| The -Y switch]]&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://lame.sourceforge.net LAME official homepage]&lt;br /&gt;
*[http://www.rjamorim.com/rrw/lame.html Historical versions of LAME] at ReallyRareWares&lt;br /&gt;
*[http://www.rjamorim.com/test/ Several multiformat listening tests] featuring LAME and other encoders.&lt;br /&gt;
*[http://www.rarewares.org/mp3.html RareWares MP3 page]&lt;br /&gt;
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=478&amp;amp;st=0 Discussion of recommended Lame compiles in the Hydrogenaudio forum]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=16&amp;amp;t=32288 Forum discussion of the recommended settings]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?act=ST&amp;amp;f=15&amp;amp;t=203 Forum discussion of the recommended settings (older)]&lt;br /&gt;
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=32288&amp;amp;view=findpost&amp;amp;p=327262 Previous recommendations (outdated)]&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;br /&gt;
[[Category:Encoder/Decoder]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
	<entry>
		<id>https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20250</id>
		<title>LAME Y switch</title>
		<link rel="alternate" type="text/html" href="https://wiki.hydrogenaudio.org/index.php?title=LAME_Y_switch&amp;diff=20250"/>
		<updated>2010-03-31T11:36:30Z</updated>

		<summary type="html">&lt;p&gt;JAZ: New page: This article describes the function of &amp;#039;&amp;#039;&amp;#039;the -Y switch&amp;#039;&amp;#039;&amp;#039; in the LAME encoder commandline.  ==The short definition== * The -Y switch tells LAME not to encode the highest frequenci...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the function of &#039;&#039;&#039;the -Y switch&#039;&#039;&#039; in the [[LAME]] encoder commandline.&lt;br /&gt;
&lt;br /&gt;
==The short definition==&lt;br /&gt;
* The -Y switch tells [[LAME]] not to encode the highest frequencies &#039;&#039;&#039;accurately&#039;&#039;&#039;, &#039;&#039;&#039;if doing so&#039;&#039;&#039; causes disproportional increases in bitrate. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other ways to say it include:&lt;br /&gt;
* The -Y switch tells [[LAME]] to use a more &#039;&#039;&#039;coarse representation&#039;&#039;&#039; for the highest frequencies, in the parts where it would cause an over-encoding of all the other bands.&lt;br /&gt;
* The -Y switch tells [[LAME]] to &#039;&#039;&#039;not be so strict&#039;&#039;&#039; with the higher frequencies, &#039;&#039;&#039;IF&#039;&#039;&#039; they are going to cause an increase of bitrate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; The -Y switch is not a lowpass filter.&lt;br /&gt;
: It allows high frequencies (&amp;gt;=16Khz) to exist, it just alters its accuracy. If their values are very small it can quantize them to zero (but probably the psychoacoustic analyzer will decide to remove them anyway).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The technical definition==&lt;br /&gt;
&lt;br /&gt;
===How is audio stored in MP3===&lt;br /&gt;
* MP3 audio is stored in the frequency domain (values for frequencies) instead of time domain (values for samples)&lt;br /&gt;
* Frequencies are analyzed and stored in groups, known as bands.&lt;br /&gt;
* Bands are quantized to make them compress better.&lt;br /&gt;
* &#039;&#039;Scale factor&#039;&#039; refers to how much quantization (loss of precision) is applied to each band, where higher quantization causes greater compression, but also less variation between the minimum and maximum values (resolution).&lt;br /&gt;
* Each band has its own scale factor, so that its quantization can be adjusted independently from the others.&lt;br /&gt;
* Global gain is an extra quantizer that affects all bands simultaneously.&lt;br /&gt;
&lt;br /&gt;
===What is the scalefactor band 21 (sfb21) defect===&lt;br /&gt;
* The last band is called &#039;&#039;&#039;sfb21&#039;&#039;&#039;, and &#039;&#039;&#039;does not have&#039;&#039;&#039; a scale factor. This band stores frequencies at 16 kHz and above.&lt;br /&gt;
* If the encoder determines that sfb21 needs more resolution, it has no way to decrease the scalefactor of sfb21 alone, since there is no such scale factor.&lt;br /&gt;
* The only way to increase the resolution on sfb21 is therefore to reduce the global gain quantization.&lt;br /&gt;
* The encoder can reduce the global gain as long as it is above zero.&lt;br /&gt;
* If global gain is zero, resolution will need to be increased (and quantization be lowered) &#039;&#039;&#039;on every other scale factor band&#039;&#039;&#039;.&lt;br /&gt;
* The result is that unnecessary resolution is applied to every other band, so the bits used in all the other bands will increase and ultimately, the bitrate too.&lt;br /&gt;
* The encoder is forced to increase in excess the bitrate of the file just so that the frequencies &amp;gt;= 16 kHz will be adequately quantized.&lt;br /&gt;
&lt;br /&gt;
===The -Y switch and the sfb21 ===&lt;br /&gt;
[[LAME]] implements the -Y switch as a way to activate an alternate logic that considers the sfb21 as different, preventing the reduction of global gain when the psy-model says it needs so to achieve the desired quality in the &amp;gt;= 16Khz range.&lt;br /&gt;
&lt;br /&gt;
The result is that all the 16 kHz + frequencies still get encoded, but the ones that would normally have needed higher resolution to satisfy the criteria of the psy-model don&#039;t receive that treatment, while ones that wouldn&#039;t need higher resolution are unaffected by the Y switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The -Y switch and CBR ==&lt;br /&gt;
The -Y switch is used along with [[LAME#Technical information|VBR modes]].&lt;br /&gt;
For CBR and ABR, the encoder automatically uses a similar process to what -Y does. (&#039;&#039;&#039;More information on this needed&#039;&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Motivation for this article==&lt;br /&gt;
The article tries to clarify what the switch does and what it does not. Just like [[Joint_stereo|joint stereo]] it is frequently misinterpreted, and identified with a filter.&lt;br /&gt;
In explaining what it does, in easy terms and in technical terms, the reader should get a better understanding of the motivation and the usage of such switch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
In MPEG1 (32, 44, 48Khz), the last scalefactor band is sfb21. In MPEG2 (16,22,24Khz), it is sfb12. The frequency at which it starts also depends on the sampling rate. The value of ~16Khz is for 44.1Khz material.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
[[MP3|Description of the MPEG layer 3 format]]&lt;/div&gt;</summary>
		<author><name>JAZ</name></author>
	</entry>
</feed>