Recommended LAME: Difference between revisions

From Hydrogenaudio Knowledgebase
(Some clean up for later insertion)
(Ready for insertion(?))
Line 1: Line 1:
'''Note: These settings require Lame 3.97 or later. Lame 3.97 found on this website is the recommended version''' ([[Lame Compiles|Check here to download]])
=Introduction=


''Note: At a given bitrate range, the quality scale usually works to where VBR is higher quality than ABR which is higher quality than CBR (CBR < ABR < VBR in terms of quality). The exception to this is when you choose the highest possible CBR bitrate which is 320kbps. In the case of the named VBR profiles "standard" and "extreme" they are usually "effectively" equal in quality to high bitrate cbr, in the range of around 256 kbps due to their ability to scale down the bitrate when necessary but increase the bitrate beyond 256 kbps on a frame by frame basis also, when that is necessary.''
This article is meant to explain to the users what are the recommended settings to be used with [[LAME]] for highest quality [[MP3]] encoding.


These settings require Lame 3.94 or later. Lame 3.97beta found on this website is the recommended version ([[Lame Compiles|Check here to download]])


=Recommended encoder settings=
Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes, if you want to help developers with feedback.
 
Note: At a given bitrate range, the quality scale is following: VBR is higher quality than ABR which is higher quality than CBR (VBR > ABR > 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).
 
''''VBR:'''' ''variable bitrate mode, the goal is to keep a constant quality and saving bits where possible without lowering the quality.''


* -V 2  or  --preset standard (~190 kbit/s, typical 180 ... 220. '''Best quality / size ratio''')
''''ABR:'''' ''average bitrate mode varies bits around a specified target bitrate''


* -V 2 --vbr-new  or  --preset fast standard (~190 kbit/s, faster)
''''CBR:'''' ''constant bitrate mode is not efficient regarding distributing bitrate to more complex music parts and saving bits where it would be possible without lowering the quality of those music parts. Only recommended for usage in streaming situations where the upper bitrate margin must be strictly enforced.''


* -V 0  or  --preset extreme (~250 kbit/s, typical 220 ... 270. Quality can be a little better than standard)


* -V 0 --vbr-new  or --preset fast extreme (~250 kbit/s, faster)
''Note: all modes and settings mentioned in this topic belong to the specifications of the MP3 standard, and the resulting MP3s should be played by every standard-conform MP3-Decoder. If this shouldn't be the case, blame the manufacturer or developer of your MP3-Decoder/device. ''


* -b 320  or  --preset insane (320 kbit/s CBR, highest possible quality, that can be a little higher than extreme)


For high quality on portable MP3 players, you may use --alt-preset standard -Y (around 160 kbit/s). -Y usually limits to 16 KHz, something you likely won't notice unless you have an exeptional hearing.


=Recommended encoder settings=


==VBR (Variable bitrate) settings==
==VBR (Variable bitrate) settings==
[[VBR]] can be useful to get good quality from a specific quality level. Size is less predictable than with ABR, but the quality is usually better.
*[[VBR]] can be useful to get good quality from a specific quality level. Size is less predictable than with [[ABR]], but the quality is usually better.


-V(number) where number is 0-10, 0 being highest quality, 10 being the lowest.
-V(number) where number is 0-9, 0 being highest quality, 9 being the lowest.


V0 is ~280kbs
{| align=center border="1" cellpadding="5" cellspacing="0"
V1 is ~250kbs
|+'''Lame 3.96.1 -V n, Presets, bitrates and lowpass of V values'''
| '''Switch''' || '''Preset''' || '''Target Kbps''' || '''Y Switch''' || '''-b''' || '''Lowpass''' || '''Resample'''
|-
| -V 0 || --preset extreme || ~240 || || 128 || 19383 Hz - 19916 Hz ||
|-
| -V 0 --vbr-new || --preset fast extreme ||  ~240 || || 128 || 19383 Hz - 19916 Hz ||
|-
| -V 1 || || ~210 || || 128 || 18671 Hz - 19205 Hz ||
|-
| -V 1 --vbr-new || || ~210 || || 128 || 18671 Hz - 19205 Hz ||
|-
| -V 2 || --preset standard || ~190 || || 128 || 18671 Hz - 19205 Hz ||
|-
| -V 2 --vbr-new || --preset fast standard || ~190 || || 128 || 18671 Hz - 19205 Hz ||
|-
| -V 3 || || ~175 || Y || || 17960 Hz - 18494 Hz ||
|-
| -V 3 --vbr-new || || ~175 || Y || || 17960 Hz - 18494 Hz ||
|-
| -V 4 || --preset medium || ~165 || Y || || 17960 Hz - 18494 Hz ||
|-
| -V 4 --vbr-new || --preset fast medium || ~165 || Y || || 17960 Hz - 18494 Hz ||
|-
| -V 5 || || ~130 || Y || || 16538 Hz - 17071 Hz ||
|-
| -V 5 --vbr-new || || ~130 || Y || || 16538 Hz - 17071 Hz ||
|-
| -V 6 || || ~115 || Y || || 15826 Hz - 16360 Hz ||
|-
| -V 6 --vbr-new || || ~115 || Y || || 15826 Hz - 16360 Hz ||
|-
| -V 7 || || ~100 || Y || || 14581 Hz - 14968 Hz || 32000 Hz
|-
| -V 7 --vbr-new || || ~100 || Y || || 14581 Hz - 14968 Hz || 32000 Hz
|-
| -V 8 || || ~85 || Y || || 12516 Hz - 12903 Hz ||  32000 Hz
|-
| -V 8 --vbr-new || || ~85 || Y || || 12516 Hz - 12903 Hz || 32000 Hz
|-
| -V 9 || || ~65 || Y || || 9774 Hz - 10065 Hz || 24000 Hz
|-
| -V 9 --vbr-new || || ~65 || Y || || 9774 Hz - 10065 Hz || 24000 Hz
|}
 
For high quality on portable MP3 players, you may use --alt-preset standard -Y (around 160 kbit/s). -Y usually limits to 16 KHz, something you likely won't notice unless you have an excellent hearing and equipment.




Line 50: Line 97:


:  note: --b 320 is the exact same thing as --preset insane
:  note: --b 320 is the exact same thing as --preset insane
:  Valid values for CBR encoding are 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 256 or 320

Revision as of 21:28, 8 October 2005

Introduction

This article is meant to explain to the users what are the recommended settings to be used with LAME for highest quality MP3 encoding.

These settings require Lame 3.94 or later. Lame 3.97beta found on this website is the recommended version (Check here to download)

Avoid using alpha (a) versions of LAME. More often than not those are exclusively for testing purposes, if you want to help developers with feedback.

Note: At a given bitrate range, the quality scale is following: VBR is higher quality than ABR which is higher quality than CBR (VBR > ABR > 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).

'VBR:' variable bitrate mode, the goal is to keep a constant quality and saving bits where possible without lowering the quality.

'ABR:' average bitrate mode varies bits around a specified target bitrate

'CBR:' constant bitrate mode is not efficient regarding distributing bitrate to more complex music parts and saving bits where it would be possible without lowering the quality of those music parts. Only recommended for usage in streaming situations where the upper bitrate margin must be strictly enforced.


Note: all modes and settings mentioned in this topic belong to the specifications of the MP3 standard, and the resulting MP3s should be played by every standard-conform MP3-Decoder. If this shouldn't be the case, blame the manufacturer or developer of your MP3-Decoder/device.


Recommended encoder settings

VBR (Variable bitrate) settings

  • VBR can be useful to get good quality from a specific quality level. Size is less predictable than with ABR, but the quality is usually better.

-V(number) where number is 0-9, 0 being highest quality, 9 being the lowest.

Lame 3.96.1 -V n, Presets, bitrates and lowpass of V values
Switch Preset Target Kbps Y Switch -b Lowpass Resample
-V 0 --preset extreme ~240 128 19383 Hz - 19916 Hz
-V 0 --vbr-new --preset fast extreme ~240 128 19383 Hz - 19916 Hz
-V 1 ~210 128 18671 Hz - 19205 Hz
-V 1 --vbr-new ~210 128 18671 Hz - 19205 Hz
-V 2 --preset standard ~190 128 18671 Hz - 19205 Hz
-V 2 --vbr-new --preset fast standard ~190 128 18671 Hz - 19205 Hz
-V 3 ~175 Y 17960 Hz - 18494 Hz
-V 3 --vbr-new ~175 Y 17960 Hz - 18494 Hz
-V 4 --preset medium ~165 Y 17960 Hz - 18494 Hz
-V 4 --vbr-new --preset fast medium ~165 Y 17960 Hz - 18494 Hz
-V 5 ~130 Y 16538 Hz - 17071 Hz
-V 5 --vbr-new ~130 Y 16538 Hz - 17071 Hz
-V 6 ~115 Y 15826 Hz - 16360 Hz
-V 6 --vbr-new ~115 Y 15826 Hz - 16360 Hz
-V 7 ~100 Y 14581 Hz - 14968 Hz 32000 Hz
-V 7 --vbr-new ~100 Y 14581 Hz - 14968 Hz 32000 Hz
-V 8 ~85 Y 12516 Hz - 12903 Hz 32000 Hz
-V 8 --vbr-new ~85 Y 12516 Hz - 12903 Hz 32000 Hz
-V 9 ~65 Y 9774 Hz - 10065 Hz 24000 Hz
-V 9 --vbr-new ~65 Y 9774 Hz - 10065 Hz 24000 Hz

For high quality on portable MP3 players, you may use --alt-preset standard -Y (around 160 kbit/s). -Y usually limits to 16 KHz, something you likely won't notice unless you have an excellent hearing and equipment.


ABR (average bitrate) settings

(128 kbit/s ABR: roughly the same filesize as 128 kbit/s CBR)

  • ABR Setting tuned from 320 kbit/s down to 80 kbit/s
    • --preset <bitrate>
Example: --preset 200
  • 128 kbit/s ABR
    • -V5 --athaa-sensitivity 1 (when using >= LAME 3.96.1, for best results at 128kbps)
    • --preset 128


CBR (constant bitrate) settings

  • CBR Setting tuned from 320 kbit/s down to 80 kbit/s
    • -b <bitrate>
Example: -b 96
  • 128 kbit/s CBR
    • -b 128
note: --b 320 is the exact same thing as --preset insane
Valid values for CBR encoding are 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 256 or 320