Difference between revisions of "LAME"

From TMB Wiki
Jump to: navigation, search
(lowpass Advanced Setting for FM & Satellite recordings)
 
(46 intermediate revisions by 3 users not shown)
Line 1: Line 1:
LAME (Lame Ain't an MP3 Encoder) is the recommended encoder. It has been developed by the open-source community since 1998, and has become the highest quality [[MP3]] encoder for most purposes.
+
==Introduction to LAME==
  
Some benefits for using LAME:
+
'''LAME''' is high quality [[MP3]] encoder. The name LAME is a recursive acronym for '''L'''AME '''A'''in't an '''M'''P3 '''E'''ncoder, although the current version is, in fact, a stand-alone [[MP3]] encoder. It shows superior performance and gapless playback. [[LAME]] is the recommended [[MP3]] encoder at The Mixing Bowl. Some benefits of using LAME:
* Highly optimised presets
 
* Fast encoding
 
* [[CBR]], [[ABR]] and [[VBR]] encoding methods
 
* [[Gapless]] playback with LAME-header compliant decoders
 
* [[Exact Audio Copy]] (EAC) and [[CDex]] support
 
  
 +
*Highly optimised presets
 +
*[[CBR]], [[ABR]] and [[VBR]] encoding methods
 +
*[[Gapless]] playback with LAME-header compliant decoders
 +
*[[Exact Audio Copy]] and [[CDex]] support
  
=History=
+
==LAME Homepage==
  
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.
+
*http://lame.sourceforge.net/index.php
  
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.
+
==Download==
  
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...
+
Download LAME from RareWares:
  
==VBR (Variable bitrate) settings==
+
*http://www.rarewares.org/mp3.html
'''[[VBR]]:''' ''variable bitrate mode. Use variable bitrate modes when the goal is to achieve a fixed level of quality using the lowest possible bitrate.''
 
  
[[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.
+
==Recommended LAME version==
  
-V(number) where number is 0-9, 0 being highest quality, 9 being the lowest.
+
'''LAME 3.100'''
  
{| align=center border="1" cellpadding="4" cellspacing="0"
+
* The [http://www.rarewares.org/mp3-lame-bundle.php LAME bundle] which includes the ''lame.exe'' & ''lame_enc.dll''
|+'''List of recommended settings'''
+
 
| '''Switch''' || '''Preset''' || '''Target Kbit/s''' || '''Bitrate range kbit/s'''
+
==Usage==
|-
+
 
| -b 320 || --preset insane || 320 || 320 CBR
+
LAME is a command line program, although there are graphical interfaces like [[LAME#ALL2LAME|ALL2LAME]] which can make it easier to use.
|-
+
 
| -V 0 --vbr-new || --preset fast extreme ||  245 || 220...260
+
===Variable Bitrate (VBR)===
|-
+
 
| -V 0 || --preset extreme || 245 || 220...260
+
[[VBR]] mode is the recommended way to use LAME at The Mixing Bowl. You use it like this:
|-
+
 
| -V 1 --vbr-new || || 225 || 200...250
+
lame -V 0 input.wav output.mp3
|-
+
 
| -V 1 || || 225 || 200...250
+
* Please note: The switch '''--vbr-new''', which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 and greater as it is now the default VBR mode. However, if you are still using LAME 3.97 or older, you have to add --vbr-new to your commandline to use that mode.
|-
+
 
| -V 2 --vbr-new || --preset fast standard || 190 || 170...210
+
* The '''-V 0''' switch controls the quality LAME will use and it can be any whole number between 0-9. A lower numbers means a higher quality and therefore a higher bitrate.
|-
+
 
| -V 2 || --preset standard || 190 || 170...210
+
{| class="wikitable"
|-
+
|+ List of bitrates for VBR mode
| -V 3 --vbr-new || || 175 || 155...195
+
! Switch !! Target Kbit/s !! Bitrate range Kbit/s
|-
 
| -V 3 || || 175 || 155...195
 
|-
 
| -V 4 --vbr-new || --preset fast medium || 165 || 145...185
 
|-
 
| -V 4 || --preset medium  || 165 || 145...185
 
 
|-
 
|-
| -V 5 --vbr-new || || 130 || 110...150
+
| -V 0 || 245 || 220...260
 
|-
 
|-
| -V 5 || || 130 || 110...150
+
| -V 1 || 225 || 200...250
 
|-
 
|-
| -V 6 --vbr-new || || 115 || 95...135
+
| -V 2 || 190 || 170...210
 
|-
 
|-
| -V 6 || || 115 || 95...135
+
| -V 3 || 175 || 155...195
 
|-
 
|-
| -V 7 --vbr-new || || 100 || 80...120
+
| -V 4 || 165 || 145...185
 
|-
 
|-
| -V 7 || || 100 || 80...120
+
| -V 5 || 130 || 110...150
 
|-
 
|-
| -V 8 --vbr-new || || 85 || 65...105
+
| -V 6 || 115 || 95...135
 
|-
 
|-
| -V 8 || || 85 || 65...105
+
| -V 7 || 100 || 80...120
 
|-
 
|-
| -V 9 --vbr-new || || 65 || 45...85
+
| -V 8 || 85 || 65...105
 
|-
 
|-
| -V 9 || || 65 || 45...85
+
| -V 9 || 65 || 45...85
 
|}
 
|}
  
If you need a predictable bitrate (in a streaming application, for example), use ABR or CBR modes, described below.
+
====TMB Recommended Setting====
 +
'''-V 0''' (-V 0 --vbr-new for LAME 3.97 and older) is the recommend LAME quality setting to use at The Mixing Bowl. It is probably a higher quality than is strictly necessary (the lower quality presets still provide excellent quality), however its usage is strongly encouraged to avoid any arguments over quality.
 +
 
 +
==''lowpass'' Advanced Setting for FM & Satellite recordings==
 +
 
 +
lame -V 0 --lowpass 16 input.wav output.mp3
 +
 
 +
The '''--lowpass 16''' setting is especially useful on audio that has been recorded from '''FM radio''' transmissions that do not have any audio greater than ~15.5kHz. That includes all UK broadcasts and indeed is especially relevant for older mixes that were recorded onto cassette, VHS, DAT, and MiniDisc tapes.
 +
 
 +
A '''--lowpass 17''' setting can be used for recordings made from '''satellite transmissions''' (DVB-S / DVB-T / DAB) that are broadcast as [[MP2]] files with a cutoff of ~17kHz.
 +
 
 +
In simple terms, this means that by using the switch you'll save a few MBs and produce a slightly lower [[VBR]] bitrate as the encoder will ignore any audio over 16kHz or 17kHz (depending on the lowpass setting used). This means it will remove the FM pilot signal - set at 19kHz - that is often found on FM recordings.
 +
 
 +
The use of the recommended '''-V0''' setting doesn't use a lowpass, which is also another reason why we should make use of this lowpass LAME setting.
 +
 
 +
You only use it when creating [[VBR]] mp3s.
 +
 
 +
This is a superior option than the '''-Y''' setting that is described below.
 +
 
 +
===Constant Bitrate (CBR)===
 +
 
 +
[[CBR]] mode is not recommend because VBR provides better quality at a given bitrate: VBR is higher quality than ABR, which is higher quality than CBR. However, if you still want to use it, then you use it like this:
 +
 
 +
lame -b 320 input.wav output.mp3
 +
 
 +
The '''-b 320''' switch controls the bitrate LAME will use. The bitrate number can be 192, 256 or 320. We still recommend using the '''-V0''' setting though.
 +
 
 +
==Graphical interfaces==
 +
 
 +
===FOOBAR2000===
 +
 
 +
'''[[Foobar2000]]''' is an advanced freeware audio player for the Windows platform that comes packaged with LAME and provides a very easy way to not only listen to but also convert to almost any format you desire.
 +
 
 +
===LameDropXPd ===
 +
 
 +
'''LameDropXPd ''' is a drag 'n' drop frontend for LAME. As well as encoding recordings to MP3, it can also transcode [[Ogg Vorbis]] files, decode [[MP3]] files to [[WAV]], accept [[FLAC]] input to create [[MP3]] files, and auto-tag the files it encodes.
 +
 
 +
It can be downloaded from RareWares:
 +
 
 +
*http://www.rarewares.org/mp3-lamedrop.php
 +
 
 +
==''-Y'' Advanced Setting: depreciated==
 +
 
 +
'''''** This setting is no longer recommended: use --lowpass 16 as stated above. Information remains for historical value. **'''''
 +
 
 +
The '''-Y''' setting is especially useful for use on audio that has been recorded from radio transmissions that do not have any audio greater than 16kHz. That generally includes most UK broadcasts, and indeed is especially relevant for older mixes that were recorded onto cassette, VHS, DAT, and MiniDisc tapes.
 +
 
 +
In simple terms this means that by using the switch you'll save a few KBs and produce a slightly lower [[VBR]] bitrate as the encoder doesn't have to worry about audio over 16kHz.
 +
 
 +
The technical explanation goes something like:
 +
sfb21 bloat is possible with LAME settings '''-V0''' through '''-V2'''. Due to faults in the design of the Layer III format itself, encoding audio of 16kHz and higher will cause more bits to be needed than normal. The ''Heavy Metal'' genre suffers with this sfb21 bloat problem sometimes. '''-V3''' through '''-V9''' do not have this problem as they have the '''-Y''' switch activated by default. This switch basically makes it where if the data above 16kHz will bloat the bitrate it is not encoded.
 +
 
 +
So, you only use it on the '''-V0''', '''-V1''' & '''-V2''' switches.
 +
 
 +
==Further Reading==
 +
 
 +
[http://www.hydrogenaudio.org/ Hydrogenaudio] are widely regarded as ''the'' digital audiophile site on the web. Most of the audio codec developers are members of the forum, and the information detailed there in the [http://wiki.hydrogenaudio.org/ Hydrogenaudio wiki], stickies and posts, in our opinion, is the best available anywhere on the internet.
 +
 
 +
Hydrogenaudio's recommended LAME compile for optimal quality is now always the latest stable version (unless noted otherwise).
 +
 
  
[[Category:Audio Tools]]
+
[[category:Audio Tools]]

Latest revision as of 10:40, 2 April 2021

Introduction to LAME

LAME is high quality MP3 encoder. The name LAME is a recursive acronym for LAME Ain't an MP3 Encoder, although the current version is, in fact, a stand-alone MP3 encoder. It shows superior performance and gapless playback. LAME is the recommended MP3 encoder at The Mixing Bowl. Some benefits of using LAME:

LAME Homepage

Download

Download LAME from RareWares:

Recommended LAME version

LAME 3.100

  • The LAME bundle which includes the lame.exe & lame_enc.dll

Usage

LAME is a command line program, although there are graphical interfaces like ALL2LAME which can make it easier to use.

Variable Bitrate (VBR)

VBR mode is the recommended way to use LAME at The Mixing Bowl. You use it like this:

lame -V 0 input.wav output.mp3
  • Please note: The switch --vbr-new, which enabled a superior VBR mode in LAME 3.97 and some previous versions, is no longer needed with LAME 3.98 and greater as it is now the default VBR mode. However, if you are still using LAME 3.97 or older, you have to add --vbr-new to your commandline to use that mode.
  • The -V 0 switch controls the quality LAME will use and it can be any whole number between 0-9. A lower numbers means a higher quality and therefore a higher bitrate.
List of bitrates for VBR mode
Switch Target Kbit/s Bitrate range Kbit/s
-V 0 245 220...260
-V 1 225 200...250
-V 2 190 170...210
-V 3 175 155...195
-V 4 165 145...185
-V 5 130 110...150
-V 6 115 95...135
-V 7 100 80...120
-V 8 85 65...105
-V 9 65 45...85

TMB Recommended Setting

-V 0 (-V 0 --vbr-new for LAME 3.97 and older) is the recommend LAME quality setting to use at The Mixing Bowl. It is probably a higher quality than is strictly necessary (the lower quality presets still provide excellent quality), however its usage is strongly encouraged to avoid any arguments over quality.

lowpass Advanced Setting for FM & Satellite recordings

lame -V 0 --lowpass 16 input.wav output.mp3

The --lowpass 16 setting is especially useful on audio that has been recorded from FM radio transmissions that do not have any audio greater than ~15.5kHz. That includes all UK broadcasts and indeed is especially relevant for older mixes that were recorded onto cassette, VHS, DAT, and MiniDisc tapes.

A --lowpass 17 setting can be used for recordings made from satellite transmissions (DVB-S / DVB-T / DAB) that are broadcast as MP2 files with a cutoff of ~17kHz.

In simple terms, this means that by using the switch you'll save a few MBs and produce a slightly lower VBR bitrate as the encoder will ignore any audio over 16kHz or 17kHz (depending on the lowpass setting used). This means it will remove the FM pilot signal - set at 19kHz - that is often found on FM recordings.

The use of the recommended -V0 setting doesn't use a lowpass, which is also another reason why we should make use of this lowpass LAME setting.

You only use it when creating VBR mp3s.

This is a superior option than the -Y setting that is described below.

Constant Bitrate (CBR)

CBR mode is not recommend because VBR provides better quality at a given bitrate: VBR is higher quality than ABR, which is higher quality than CBR. However, if you still want to use it, then you use it like this:

lame -b 320 input.wav output.mp3

The -b 320 switch controls the bitrate LAME will use. The bitrate number can be 192, 256 or 320. We still recommend using the -V0 setting though.

Graphical interfaces

FOOBAR2000

Foobar2000 is an advanced freeware audio player for the Windows platform that comes packaged with LAME and provides a very easy way to not only listen to but also convert to almost any format you desire.

LameDropXPd

LameDropXPd is a drag 'n' drop frontend for LAME. As well as encoding recordings to MP3, it can also transcode Ogg Vorbis files, decode MP3 files to WAV, accept FLAC input to create MP3 files, and auto-tag the files it encodes.

It can be downloaded from RareWares:

-Y Advanced Setting: depreciated

** This setting is no longer recommended: use --lowpass 16 as stated above. Information remains for historical value. **

The -Y setting is especially useful for use on audio that has been recorded from radio transmissions that do not have any audio greater than 16kHz. That generally includes most UK broadcasts, and indeed is especially relevant for older mixes that were recorded onto cassette, VHS, DAT, and MiniDisc tapes.

In simple terms this means that by using the switch you'll save a few KBs and produce a slightly lower VBR bitrate as the encoder doesn't have to worry about audio over 16kHz.

The technical explanation goes something like: sfb21 bloat is possible with LAME settings -V0 through -V2. Due to faults in the design of the Layer III format itself, encoding audio of 16kHz and higher will cause more bits to be needed than normal. The Heavy Metal genre suffers with this sfb21 bloat problem sometimes. -V3 through -V9 do not have this problem as they have the -Y switch activated by default. This switch basically makes it where if the data above 16kHz will bloat the bitrate it is not encoded.

So, you only use it on the -V0, -V1 & -V2 switches.

Further Reading

Hydrogenaudio are widely regarded as the digital audiophile site on the web. Most of the audio codec developers are members of the forum, and the information detailed there in the Hydrogenaudio wiki, stickies and posts, in our opinion, is the best available anywhere on the internet.

Hydrogenaudio's recommended LAME compile for optimal quality is now always the latest stable version (unless noted otherwise).