# LAME

**LAME**（“LAME Ain't an MP3 Encoder”的递归缩写）是一款自由、开源的 MPEG 音频层 III（MP3）音频编码器，以 LGPL 许可证授权，通过 LAME 项目分发。<sup>[1](https://lame.sourceforge.io/)</sup> 它将未压缩的 PCM 音频转换为 MP3 比特流，是 Audacity、foobar2000 以及大多数自由 CD 抓轨软件所使用的编码库。<sup>[1](https://lame.sourceforge.io/)</sup><sup> • </sup><sup>[2](https://www.free-codecs.com/download/lame_encoder.htm)</sup> 项目自己的网站称，LAME 被认为是中高比特率和可变比特率（VBR）下最好的 MP3 编码器，而且很可能是唯一仍在积极开发的 MP3 编码器。<sup>[1](https://lame.sourceforge.io/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一款以 LGPL 授权的自由、开源 MPEG 音频层 III（MP3）编码器<sup>[1](https://lame.sourceforge.io/)</sup> |
| 起源 | 约 1998 年中期由 Mike Cheng 发起，最初是针对 8hz-MP3 编码器源码的一个补丁；从 3.81 版起，所有 dist10 参考代码均被替换<sup>[1](https://lame.sourceforge.io/)</sup> |
| 编码库 | libmp3lame，提供用于编码、ID3 标签和 MP3 解码的 C API<sup>[3](https://github.com/lameproject/lame/blob/master/API)</sup> |
| 寿命最长的版本 | 3.100，2017 年 10 月 13 日发布，作为当前版本维持了近九年<sup>[4](https://sourceforge.net/projects/lame/files/lame/)</sup> |
| 当前版本 | v4.0，2026 年 7 月，前身为 3.101；属于安全与维护性发布，而非音质大改<sup>[1](https://lame.sourceforge.io/)</sup><sup> • </sup><sup>[2](https://www.free-codecs.com/download/lame_encoder.htm)</sup> |
| 默认立体声模式 | 联合立体声，逐帧在 L/R 与中/侧编码之间切换<sup>[5](https://manpages.debian.org/bookworm/lame/lame.1.en.html)</sup> |
| 在 Audacity 中的使用 | 编码库专利到期后，Windows 和 Mac 版 Audacity 已内置；Linux 用户需单独安装<sup>[6](https://manual.audacityteam.org/man/faq_installing_the_lame_mp3_encoder.html)</sup> |

## 历史

LAME 的开发始于 1998 年中期左右，当时 Mike Cheng 将其作为针对 8hz-MP3 编码器源码的一个补丁开始编写。在其他人提出质量方面的疑虑后，他决定基于 dist10 参考源码从头开始，目标是在不触动质量的前提下加快速度。那个分支成为了 Lame 2.0；到 Lame 3.81 时，dist10 的代码已全部被替换，因此 LAME 不再只是一个补丁。<sup>[1](https://lame.sourceforge.io/)</sup>

项目很快成为团队协作的成果。Cheng 卸下领导职责，创办了 MP2 编码器 tooLame，由 Mark Taylor 接手，在追求速度之外还追求更好的质量；他被视为项目当前形态的奠基人，并发布了 3.0 版，其中包含他开发的新心理声学模型 gpsycho。<sup>[1](https://lame.sourceforge.io/)</sup> 2003 年初 Taylor 离开项目领导岗位，此后项目由其活跃开发者合作运营，目前为三人。<sup>[1](https://lame.sourceforge.io/)</sup> 开发者页面列出的主要贡献者包括 Robert Hegemann（调优、优化、心理声学）、Alexander Leidinger（多平台配置、发布管理）和 Rogério Brito（Debian 打包、调试），已退出的贡献者包括 Gabriel Bouvigne、Frank Klemm、Naoki Shibata 和 Takehiro Tominaga。<sup>[7](https://lame.sourceforge.io/developers.php)</sup>

发布记录显示 2000 年代保持着稳定的节奏：2002 年 4 月的 3.90、2002 年 11 月的 3.93、2006 年 9 月的 3.97、2008 年 7 月的 3.98、2012 年 2 月的 3.99，以及 2017 年 10 月 13 日的 3.100。<sup>[4](https://sourceforge.net/projects/lame/files/lame/)</sup> 3.100 之后，项目沉寂了近十年。

## 2026 年的复兴

2026 年 7 月 11 日，Alexander Leidinger 在 lame-dev 邮件列表上宣布，在长期停滞后短时间内发布了两个版本：v3.101 汇集了过去九年积累的全部改动，v4.0 则修复了某些编译器下的编译期问题以及一些缺陷和安全问题。<sup>[8](https://sourceforge.net/p/lame/mailman/lame-dev/thread/a386e8e386319eb46235fe368c86127c%40Leidinger.net/)</sup> LAME 4.0 于 2026 年 7 月 11 日问世，是自 2017 年 3.100 以来第一个新的大版本，属于安全与维护性发布，而非音质大改，因此现有音频库中的文件无需重新编码。<sup>[2](https://www.free-codecs.com/download/lame_encoder.htm)</sup>

一个可见的变化解释了版本号的跳跃。LAME 生成的每个 MP3 文件都包含一个简短的标签，标明其为 LAME 输出，而该标签内的版本字符串占有一段固定为九字节的空间。后续版本已在计划中；4.1 的工作已经展开，包括一项性能改进和帧分析器的 GTK4 更新。<sup>[8](https://sourceforge.net/p/lame/mailman/lame-dev/thread/a386e8e386319eb46235fe368c86127c%40Leidinger.net/)</sup>

## 技术设计

MP3 编码器要为每一块音频决定在每个频带上花多少比特，其依据是一个心理声学模型，该模型估计量化噪声会在何处被信号本身掩蔽。LAME 的模型是 GPSYCHO，一个面向基于 ISO 的 MP3 编码器的开源心理声学与噪声整形模型。它修复了 ISO 演示源码心理声学模型中的重大缺陷，并增加了中/侧立体声、真正的比特池控制、改进的临界频带比特分配、可选的可变比特率以及预回声控制。<sup>[9](https://lame.sourceforge.io/gpsycho.php)</sup>

GPSYCHO 的行为随目标比特率而变化。在 128 kbps 下，其质量被描述为显著优于 ISO 心理声学模型所产出的质量，并接近 Fraunhofer（FhG）编码器的质量，不过仍有改进空间。低通滤波根据压缩比施加：在 256 kbps 下不做滤波，而在 128 kbps 下低通滤波器的截止频率约为 15.5 kHz。<sup>[9](https://lame.sourceforge.io/gpsycho.php)</sup>

命令行编码器提供常见的 MP3 操作模式。对立体声文件，默认使用联合立体声；在此模式下，编码器可以逐帧选用 L/R 立体声或中/侧立体声——后者对中（L+R）与侧（L−R）声道进行编码，更多比特分配给中声道，从而在立体声分离度较小时有效增加带宽。<sup>[5](https://manpages.debian.org/bookworm/lame/lame.1.en.html)</sup> 必要时，LAME 会自动将输入文件重采样为受支持的 MP3 采样率之一，并对原始 PCM 输入接受每样本 8、16、24 或 32 位的输入位宽。<sup>[5](https://manpages.debian.org/bookworm/lame/lame.1.en.html)</sup>

## API 与集成

编码核心是 libmp3lame 共享库。其 API 是 libmp3lame.so 编码部分的简单接口；该库还包含用于添加 ID3 标签和进行 MP3 解码的例程，文档见 include/lame.h，示例前端代码见 frontend/main.c。<sup>[3](https://github.com/lameproject/lame/blob/master/API)</sup> 每次 MP3 编码的 API 调用序列包括获取编码器版本、为 GUI 应用设置错误消息处理器，以及将 Xing VBR/INFO 标签写入 MP3 文件。<sup>[3](https://github.com/lameproject/lame/blob/master/API)</sup>

最引人注目的集成是 Audacity。由于 LAME 编码库的[软件专利](https://www.edgepedia.org/zh/software-patent)已到期，用于 MP3 导出的 LAME 库现已内置于 Windows 和 Mac 版 Audacity；Linux 用户仍需下载并安装免费的 LAME 第三方编码器才能导出 MP3 文件。<sup>[6](https://manual.audacityteam.org/man/faq_installing_the_lame_mp3_encoder.html)</sup> 当在 Linux 上从官方发行版仓库安装 Audacity 时，大多数发行版会自动安装 LAME。<sup>[10](https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html)</sup> Audacity 的“库”首选项会显示当前用于 MP3 导出的 LAME MP3 编码库版本，其外部程序导出功能可以调用已安装的 LAME 或 FFmpeg 命令行编码器并附加参数。<sup>[11](https://manual.audacityteam.org/man/libraries_preferences.html)</sup><sup> • </sup><sup>[12](https://manual.audacityteam.org/man/exporting_to_an_external_program.html)</sup>

## 质量地位

项目对质量的宣称建立在开放开发模式之上——它称这使其得以汲取世界各地的工程资源——以及听音测试之上：GPSYCHO 算法被描述为经过严格的听音测试检验。<sup>[1](https://lame.sourceforge.io/)</sup><sup> • </sup><sup>[9](https://lame.sourceforge.io/gpsycho.php)</sup> Hydrogenaudio 论坛上的社区听音测试屡次纳入 LAME 构建版本，例如在 128 kbps 测试中与 iTunes AAC、FhG MP3 和 Helix 同场的 LAME 3.97 与 3.98.2。<sup>[13](https://wiki.hydrogenaudio.org/index.php?title=Listening_Tests)</sup> 基于浏览器的盲测工具在若干比特率下将无损文件与 MP3 重编码文件进行对比，所有编码均使用 LAME 编解码器，从而保持编解码器这一变量恒定。<sup>[14](https://www.techradar.com/audio/i-tried-the-lossless-audio-test-and-couldnt-believe-my-ears-can-you-really-tell-the-difference-between-lossless-audio-and-plain-old-mp3-versions-of-your-favorite-tunes)</sup>

## References

1. [The LAME Project, lame.sourceforge.io](https://lame.sourceforge.io/)
2. [LAME MP3 Encoder 4.0 Free Download, Free-Codecs](https://www.free-codecs.com/download/lame_encoder.htm)
3. [The LAME API, lameproject/lame on GitHub](https://github.com/lameproject/lame/blob/master/API)
4. [LAME (Lame Aint an MP3 Encoder) file releases, SourceForge](https://sourceforge.net/projects/lame/files/lame/)
5. [lame(1) Debian manpage, Debian Bookworm](https://manpages.debian.org/bookworm/lame/lame.1.en.html)
6. [FAQ: Installing the LAME MP3 Encoder, Audacity Manual](https://manual.audacityteam.org/man/faq_installing_the_lame_mp3_encoder.html)
7. [LAME Developers, lame.sourceforge.io](https://lame.sourceforge.io/developers.php)
8. [Thread: [Lame-dev] lame 4.0 released, SourceForge mailing list](https://sourceforge.net/p/lame/mailman/lame-dev/thread/a386e8e386319eb46235fe368c86127c%40Leidinger.net/)
9. [GPSYCHO: A LGPL'd Psycho-Acoustic Model, lame.sourceforge.io](https://lame.sourceforge.io/gpsycho.php)
10. [Installing and updating Audacity on Linux, Audacity Manual](https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html)
11. [Libraries Preferences, Audacity Manual](https://manual.audacityteam.org/man/libraries_preferences.html)
12. [Exporting using an external encoder program, Audacity Manual](https://manual.audacityteam.org/man/exporting_to_an_external_program.html)
13. [Hydrogenaudio Listening Tests, Hydrogenaudio Knowledgebase](https://wiki.hydrogenaudio.org/index.php?title=Listening_Tests)
14. [I tried the lossless audio test, TechRadar](https://www.techradar.com/audio/i-tried-the-lossless-audio-test-and-couldnt-believe-my-ears-can-you-really-tell-the-difference-between-lossless-audio-and-plain-old-mp3-versions-of-your-favorite-tunes)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Graphics, audio, and video software

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/lame

English original: https://www.edgepedia.org/lame
