# FLAC

**FLAC**（Free Lossless Audio Codec，免费无损音频编解码器）是一种音频压缩格式，它能在不丢失任何信息的前提下减少数字音频所需的存储空间，因此解码后的 FLAC 文件与原始 PCM 音频逐比特完全一致。其规范是公开的，参考实现是开源的，且该格式及其编解码方法不受任何已知专利的覆盖<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup><sup> • </sup><sup>[2](https://www.xiph.org/flac/license.html)</sup>。与其他无损音频格式相比，FLAC 的复杂度较低，编解码所需计算量很小，甚至有不使用浮点运算的实现<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup>。

| 关键事实 | 详情 |
|---|---|
| 是什么 | 无损音频编解码器；解码输出与输入 PCM 音频完全一致<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup> |
| 首次规范 | 2000 年 12 月；比特流随 2001 年 7 月 FLAC 1.0 的发布而冻结<sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup> |
| 正式标准 | RFC 9639，IETF 标准轨道，由 M.Q.C. van Beurden 与 A. Weaver 于 2024 年 12 月发布<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup> |
| 声道 | 每流 1 至 8 声道，对立体声和 5.1 环绕声有明确的声道分配<sup>[4](https://www.xiph.org/flac/faq.html)</sup> |
| 压缩率 | 音频可压缩至原始大小的 30%–70%，而通用 ZIP 对 CD 音质音频的压缩率为 20%–40%<sup>[5](https://wiki.xiph.org/FLAC)</sup> |
| 许可 | 格式可免费用于任何用途；libFLAC 与 libFLAC++ 采用新 BSD 许可证，工具采用 GPL；无已知专利<sup>[2](https://www.xiph.org/flac/license.html)</sup> |
| 当前版本 | FLAC 1.5.0，2025 年 2 月 11 日发布，含多线程编码器<sup>[6](https://github.com/xiph/flac/releases)</sup> |
| 媒体类型 | audio/flac，已在 FFmpeg、Apache、Firefox 等应用中注册<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup> |

## 编解码器工作原理

FLAC 将未编码音频划分为块，每块单独编码为一帧。参考编码器对整个流使用单一块大小，但格式本身并不要求如此；对于采用线性预测的 44.1 kHz 音频，默认块大小为 4096 个采样，最佳大小通常在 2000 至 6000 个采样之间<sup>[7](https://www.xiph.org/flac/documentation_format_overview.html)</sup>。

对于立体声输入，可选的声道间去相关步骤将左右声道转换为中声道与边声道，其中中声道 =（左 + 右）/ 2，边声道 = 左 − 右。这是一种无损变换，不同于有损编解码器中的联合立体声，对于典型的 CD 音频可带来显著的额外压缩。flac 工具提供两种模式：-m 始终同时压缩左右声道版本和中边声道版本并保留较小的帧，而 -M 则在两者之间自适应切换<sup>[7](https://www.xiph.org/flac/documentation_format_overview.html)</sup>。

随后编码器用一个函数逼近每个信号，使得残差——即逼近值与实际采样之差——每采样所需的比特数更少。FLAC 使用两种预测方法：固定多项式预测器，其参数只需 3 比特传输；以及通用线性预测编码（LPC），后者较慢但更精确，精度随 LPC 阶数升高而提高，直至收益递减<sup>[7](https://www.xiph.org/flac/documentation_format_overview.html)</sup>。残差随后用 Rice 编码进行熵编码，在可流式传输子集中其分区阶数最多限制为 8<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup>。

## 文件结构与元数据

FLAC 文件以 ASCII 签名 `fLaC` 开头，随后是一个或多个元数据块，然后是音频帧。第一个元数据块必须是流信息块，记录采样率、声道数、每采样比特数、块与帧大小范围、总采样数，以及未编码音频的 MD5 校验和。解码器用该 MD5 值验证解码输出与原始音频一致；即使比特流本身有效，flac 命令行工具的测试与解码模式也会报告不匹配<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup><sup> • </sup><sup>[8](https://www.xiph.org/flac/documentation_tools_flac.html)</sup>。

其他元数据块类型包括填充、应用数据、定位表、Vorbis 注释（原生标签系统，与 Vorbis 共用，也是所有 FLAC 实现必须支持的唯一标签系统）、提示表以及嵌入图片<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup><sup> • </sup><sup>[4](https://www.xiph.org/flac/faq.html)</sup>。每个帧头重复基本流信息，如采样率、位深和声道数，对常见值使用查找表，以便解码器无需读取流信息块即可从流中间开始解码<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup>。

## 可流式传输子集

该格式定义了一个受限配置——FLAC 可流式传输子集，旨在保证无法定位的解码器能从流中间接入，并使硬件解码器能以固定的小缓冲区构建。该子集要求帧头直接标明采样率和位深，而非引用流信息块；限制块最多包含 16,384 个声道间采样；对于 48,000 Hz 及以下的音频，块上限为 4,608 个采样；对此类音频，LPC 预测器阶数限制为 12 或以下；并要求标准声道顺序<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup>。

## 历史与标准化

FLAC 格式于 2000 年 12 月首次规范，比特流随 2001 年 7 月参考编码器与解码器 FLAC 1.0 的发布而被视为冻结；1.0 的公告由 Josh Coalson 于 2001 年 7 月 22 日发布到 flac-dev 邮件列表<sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup><sup> • </sup><sup>[9](https://lists.xiph.org/pipermail/flac-dev/2001-July/000412.html)</sup>。2003 年 1 月 29 日，Xiph.Org 基金会宣布 FLAC 与 Vorbis、Theora、Speex 一同纳入其旗下<sup>[5](https://wiki.xiph.org/FLAC)</sup>。

正式标准化则晚得多。RFC 9639 由 Martijn van Beurden 与 Andrew Weaver 通过 IETF CELLAR 工作组撰写，于 2024 年 12 月发布。Xiph.org 项目指出，该发布除明确增加对 32 位音频的支持及相关限制外，并未改变格式；其主要好处是使从零编写新解码器变得容易得多，同时让档案馆确信文件在遥远的未来仍可解码<sup>[1](https://www.rfc-editor.org/rfc/rfc9639.html)</sup><sup> • </sup><sup>[10](https://www.xiph.org/flac/2024/12/19/rfc-9639-published.html)</sup>。

## 许可与采用

FLAC 与 Ogg FLAC 格式及其规范可免费用于商业和非商业用途，实现该格式或分发、销售、流式传输以其编码的媒体均无需许可费或版税。参考库 libFLAC 与 libFLAC++ 采用新 BSD 许可证分发，已被用于商业产品，包括其他开源许可证可能带来问题的硬件设备固件；项目其余软件（包括 flac 与 metaflac 工具）采用 GNU 通用公共许可证。该格式及所实现的编码方法均不受任何已知专利覆盖<sup>[2](https://www.xiph.org/flac/license.html)</sup>。

FLAC 与通用无损压缩器的区别在于它专为音频设计：ZIP 对 CD 音质音频文件可能压缩 20%–40%，而 FLAC 的压缩率可达 30%–70%<sup>[5](https://wiki.xiph.org/FLAC)</sup>。美国国会图书馆在其格式注册表中列有 FLAC 系列，[互联网档案馆](https://www.edgepedia.org/zh/internet-archive)将 FLAC 列为音频条目首选的无损上传格式之一<sup>[11](https://wwws.loc.gov/preservation/digital/formats/fdd/browse_list.shtml)</sup><sup> • </sup><sup>[12](https://archivesupport.zendesk.com/hc/en-us/articles/360016549992-Audio-and-Music-Items-A-Basic-Guide)</sup>。

## 近期发展

参考实现继续在 GitHub 的 xiph 组织下活跃开发。2025 年 2 月 11 日发布的 FLAC 1.5.0 首次使编码器支持多线程，并在解码器中增加了对链式 Ogg FLAC 文件的处理；libFLAC 接口版本增至 14<sup>[6](https://github.com/xiph/flac/releases)</sup>。

FLAC 也成为消费级无损流媒体的传输格式。Spotify 于 2025 年 9 月开始向 Premium 订阅用户推出其无损功能，以最高 24 位/44.1 kHz 的 FLAC 流式传输曲目，到 2025 年 10 月 6 日该功能已在 50 多个市场上线<sup>[13](https://newsroom.spotify.com/2025-09-10/lossless-listening-arrives-on-spotify-premium-with-a-richer-more-detailed-listening-experience/)</sup>。What Hi-Fi? 的测试发现，Spotify 的绝大多数无损流实际上为 CD 标准的 16 位/44.1 kHz，且以比特完美方式传输<sup>[14](https://www.whathifi.com/streaming-entertainment/is-spotify-lossless-truly-lossless)</sup>。由于[蓝牙](https://www.edgepedia.org/zh/bluetooth)链路缺乏无损音频所需的带宽，Spotify 建议使用有线连接或 Spotify Connect 进行无损播放<sup>[13](https://newsroom.spotify.com/2025-09-10/lossless-listening-arrives-on-spotify-premium-with-a-richer-more-detailed-listening-experience/)</sup>。

研究仍将 FLAC 作为基线：一项 2026 年针对无损音频压缩的语言模型基准测试发现，此类模型在 8 位和 16 位深度下始终优于 FLAC，且随着位深超过 8 位，优势逐渐缩小<sup>[15](https://arxiv.org/abs/2603.08683)</sup>。

## References

1. [RFC 9639: Free Lossless Audio Codec (FLAC), M.Q.C. van Beurden and A. Weaver, IETF, December 2024](https://www.rfc-editor.org/rfc/rfc9639.html)
2. [FLAC - License, Xiph.org](https://www.xiph.org/flac/license.html)
3. [RFC 9639 (plain text), section on format history](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)
4. [FLAC - FAQ, Xiph.org](https://www.xiph.org/flac/faq.html)
5. [FLAC - XiphWiki](https://wiki.xiph.org/FLAC)
6. [Releases, xiph/flac, GitHub](https://github.com/xiph/flac/releases)
7. [FLAC - Format overview, Xiph.org](https://www.xiph.org/flac/documentation_format_overview.html)
8. [FLAC - FLAC command line tool, Xiph.org](https://www.xiph.org/flac/documentation_tools_flac.html)
9. [Flac-dev mailing list: FLAC 1.0 released, Josh Coalson, 22 July 2001](https://lists.xiph.org/pipermail/flac-dev/2001-July/000412.html)
10. [FLAC is now formally specified in RFC 9639, Xiph.org, 19 December 2024](https://www.xiph.org/flac/2024/12/19/rfc-9639-published.html)
11. [Alphabetical List of Format Descriptions, Library of Congress](https://wwws.loc.gov/preservation/digital/formats/fdd/browse_list.shtml)
12. [Audio and Music Items - A Basic Guide, Internet Archive Help Center](https://archivesupport.zendesk.com/hc/en-us/articles/360016549992-Audio-and-Music-Items-A-Basic-Guide)
13. [Lossless Listening Arrives on Spotify Premium, Spotify Newsroom, 10 September 2025](https://newsroom.spotify.com/2025-09-10/lossless-listening-arrives-on-spotify-premium-with-a-richer-more-detailed-listening-experience/)
14. [Is Spotify Lossless truly lossless?, What Hi-Fi?](https://www.whathifi.com/streaming-entertainment/is-spotify-lossless-truly-lossless)
15. [Benchmarking Language Modeling for Lossless Compression of Full-Fidelity Audio, arXiv](https://arxiv.org/abs/2603.08683)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Data formats and serialization › Audio formats and codecs

Copyright 2026 Edgepedia

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

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

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