# 音频文件格式

音频文件格式是一种在计算机文件中存储数字音频的既定结构，它将组织数据和元数据的容器与一种编码方式结合在一起，该编码方式决定了声音本身如何被表示，例如无压缩线性PCM、[无损压缩](https://www.edgepedia.org/zh/lossless-compression)或[有损压缩](https://www.edgepedia.org/zh/lossy-compression)。常见的例子包括WAV、AIFF、FLAC、MP3，以及封装在MP4或ADTS包装中的AAC。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup><sup> • </sup><sup>[2](https://www.loc.gov/preservation/digital/formats/fdd/fdd_workplan.shtml)</sup>

| 关键事实 | 详情 |
|---|---|
| 两个层次 | 一种文件格式将容器（WAV、CAF、MP4、Ogg、Matroska）与音频编码（LPCM、FLAC、MP3、AAC）配对；容器可以容纳多种编码。 |
| WAV的起源 | WAVE是微软（Microsoft）与IBM于1991年联合发明的，存储无压缩PCM音频，以较大的文件体积为代价提供完整保真度。<sup>[3](https://www.loc.gov/static/programs/national-recording-preservation-plan/documents/Digital-Audio-Types.pdf)</sup><sup> • </sup><sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup> |
| 广播WAVE | BWF由欧洲广播联盟（European Broadcasting Union）在基于RIFF的WAVE结构上开发，增加了一个必需的bext元数据块，携带创作者、创建日期和时间，以及采样精确的时间戳。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup> |
| 苹果CAF | 核心音频格式（Core Audio Format）是一种基于块的容器，其文件头必须携带文件类型“caff”和版本1；它被设计用于处理音频数据而不受其他格式文件大小限制的约束。<sup>[5](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)</sup><sup> • </sup><sup>[6](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/)</sup> |
| FLAC | FLAC是一种开放、文档完备的PCM音频无损编解码器，已标准化为IETF RFC 9639，具有帧CRC和文件头中原始音频的MD5签名；它没有已知的专利。<sup>[7](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)</sup> |
| 有损编解码器 | MP3（MPEG Layer III）和MPEG-4 AAC是有损格式；MP3的专利均已过期，消除了此前阻碍其使用的版税壁垒。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup> |
| 保存偏好 | 美国国会图书馆（Library of Congress）偏好以广播WAVE封装LPCM，作为模拟录音单声道和立体声格式转换的存档母版。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup> |

## 容器与编码

容器是文件的组织骨架。它定义了一个标识文件类型的文件头，以及一系列带标签的数据区段（通常称为块），用于存放音频数据和描述性元数据。WAVE和广播WAVE是基于块的格式，建立在微软和IBM开发的资源交换文件格式（RIFF）规范之上。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup>苹果的核心音频格式工作原理相同：每个CAF文件都以一个文件头开始，音频描述块必须是其后的第一个块，说明采样率、格式标识符、每帧声道数和包布局。音频数据块可以出现在文件中的任何其他位置，除非其大小未确定，在这种情况下其头部大小字段设为-1，且该块必须放在最后。<sup>[5](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)</sup><sup> • </sup><sup>[8](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000591.shtml)</sup>

编码是声音本身的表示方式。无压缩PCM直接存储每个采样；WAV文件包含无压缩PCM音频，以较大的文件体积为代价提供最高保真度。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup>无损压缩在减小体积的同时允许逐位重建：FLAC对PCM数据的编码不造成任何信息损失，每帧携带一个16位CRC，文件头中存储原始音频的MD5签名用于完整性检查。<sup>[7](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)</sup>有损压缩在人类听觉模型的指导下丢弃信息；MP3和MPEG-4 AAC是消费者熟悉的例子，保存指南将严重压缩的有损文件视为不可接受的保存对象，因为音频无法尽可能丰富地还原。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup><sup> • </sup><sup>[9](https://www.loc.gov/static/programs/national-recording-preservation-board/documents/pub148.pdf)</sup>

在CAF中，音频描述块通过其包字段区分这些情况。对于恒定比特率的压缩格式，mBytesPerPacket给出固定的包大小；对于可变比特率数据（如MPEG-4 AAC），mBytesPerPacket为0，并且需要一个包表块。一个44,100帧/秒的双声道AAC-LC文件使用mFramesPerPacket为1024，mBitsPerChannel和mBytesPerPacket均为0。<sup>[5](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)</sup>

## 值得注意的格式

**WAV与广播WAVE。** WAVE存储无压缩PCM，是许多录音室和桌面音频的基线容器。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup><sup> • </sup><sup>[3](https://www.loc.gov/static/programs/national-recording-preservation-plan/documents/Digital-Audio-Types.pdf)</sup>欧洲广播联盟将其改进为广播WAVE，记录在EBU Tech 3285（版本1，2001年第二版）中，增加了必需的广播音频扩展（bext）块，包含创作者、创建时间戳，以及用于在编辑时间线上定位的采样精确时间戳。BWF文件中的音频可以被任何读取.wav文件的软件重现；不支持该格式的应用程序只是无法访问bext元数据。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup>BWF还确立了另外四种元数据块，包括用于播出管理和调度信息的AES46、EBU的axml（2003），以及用于制作元数据的iXML，其规范修订版3.01的日期为2021年10月28日。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup>由于RIFF将文件限制在4 GB以内，EBU发布了MBWF/RF64（EBU Tech 3306，2009），这是一种扩展文件格式，允许文件大于4 GB并支持多声道音频。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup>

**苹果核心音频格式。** CAF是苹果用于存储和传输数字音频的容器，旨在简化多种音频数据类型的处理，而不受其他格式文件大小限制的约束。<sup>[6](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/)</sup>所有头部和块字段均为大端序，但音频数据本身除外，它可以根据音频描述块中描述的数据格式为大端序或小端序。<sup>[5](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)</sup>其mFormatID枚举涵盖线性PCM（'lpcm'）、IMA 4:1 ADPCM（'ima4'）、MPEG-4 AAC（'aac '）、MACE 3:1和6:1、μ律和A律、MPEG第1至第3层，以及苹果无损（'alac'），规范指出该列表并非详尽无遗。<sup>[5](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)</sup>可选块记录峰值振幅、编辑注释、标记、区域、乐器设置和唯一素材标识符，空闲块为日后使用预留空间。<sup>[8](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000591.shtml)</sup>CAF可以承载FLAC数据，并作为杜比全景声母版文件（Dolby Atmos Master File）的容器。<sup>[8](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000591.shtml)</sup>

**FLAC及其他无损格式。** FLAC依据以IETF RFC 9639形式发布的开放规范，无损压缩PCM音频。流以fLaC标记开始，随后是必需的streaminfo元数据块，携带采样率、声道数、总采样数和未编码音频的MD5签名，然后是最多127种元数据块中的任意种类以及音频帧。<sup>[7](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)</sup>苹果的ALAC在苹果生态系统中扮演类似角色；两种无损格式都没有得到普遍支持，FLAC是两者中支持更广泛的，但在iOS上缺失，在macOS上不安装额外软件也无法使用，因此同时提供两者是接近通用无损兼容性的常见方式。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup>

**分发格式。** MP3、封装在MP4或ADTS包装中的AAC、Ogg Vorbis和WebM音频是常见的终端用户分发格式，浏览器支持大多集中在Firefox上，Safari还额外支持Ogg音频。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup>苹果的音频文件类型API识别广泛的容器集合，包括WAVE、AIFF和AIFF-C、CAF、MP3、MP2、MP1、M4A、MPEG-4、AC-3、ADTS AAC、3GP和3GPP2、AMR、NeXT/Sun、Sound Designer II、FLAC、RF64、BW64和Wave64。<sup>[10](https://developer.apple.com/documentation/audiotoolbox/1576497-audio-file-types)</sup>

## 为保存选择格式

保存实践倾向于无压缩或无损失编码。美国国会图书馆的指南将线性PCM（无压缩）排在两种压缩方案之上，偏好24位采样字长而非更短的，对于相同的压缩方案和采样率偏好更高的数据率而非更低的；在有损编解码器中，它偏好AAC而非MPEG Layer 2（MP3）。<sup>[11](https://www.loc.gov/preservation/digital/formats/content/sound_preferences.shtml)</sup>其音频作品推荐格式声明要求最终制作版本的高分辨率文件，96 kHz/24位或更高的PCM或2.8 MHz或更高的DSD，其中携带嵌入元数据的WAVE（广播WAVE）优于不带元数据的WAVE，CD红皮书质量文件（44.1 kHz/16位）以PCM WAVE或DDP形式列为可接受。<sup>[12](https://www.loc.gov/preservation/resources/rfs/audio.html)</sup>图书馆本身在帕卡德音像保存园区（Packard Campus for Audio-Visual Conservation）和美国民俗生活中心（American Folklife Center）转换模拟录音时，使用广播WAVE封装LPCM作为单声道和立体声音频的存档母版格式。<sup>[4](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)</sup>

无损压缩在档案馆中正在获得认可：美国国家档案馆（US National Archives）将FLAC v1.2.1列入其数字音频传输指南的首选格式，史密森尼学会档案馆（Smithsonian Institution Archives）将其列为电子记录可接受的格式，尽管评论指出FLAC在保存领域的地位不如WAV稳固，工具支持也不够明确。<sup>[7](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)</sup>

## 网络分发考量

浏览器支持塑造了网络音频的格式选择。Firefox支持WAV、MP3、MP4/M4A音频、FLAC、ADTS AAC、Ogg、WebM和3GP容器，而Safari支持Ogg音频和QuickTime MOV视频；FLAC在主流网络浏览器中得到广泛支持。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup><sup> • </sup><sup>[7](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)</sup>MP3专利的到期消除了曾经使格式选择复杂化的版税考量，使兼容性成为有损分发格式之间的主要权衡因素。<sup>[1](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)</sup>

## References

1. [Media container formats (file types), MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Containers)
2. [Format Description Workplan, Sustainability of Digital Formats, Library of Congress](https://www.loc.gov/preservation/digital/formats/fdd/fdd_workplan.shtml)
3. [Guide to Audio Formats, National Recording Preservation Plan, Library of Congress](https://www.loc.gov/static/programs/national-recording-preservation-plan/documents/Digital-Audio-Types.pdf)
4. [broadcast wave audio file format, version 1](https://loc.gov/preservation/digital/formats/fdd/fdd000356.shtml)
5. [Apple Core Audio Format Specification 1.0, Apple Developer](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/CAF_spec/CAF_spec.html)
6. [Core Audio Format Specification: Introduction, Apple Developer](https://developer.apple.com/library/archive/documentation/MusicAudio/Reference/CAFSpec/)
7. [FLAC (Free Lossless Audio Codec) Family, Library of Congress](https://loc.gov/preservation/digital/formats/fdd/fdd000657.shtml)
8. [Apple Core Audio Format, Library of Congress](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000591.shtml)
9. [The State of Recorded Sound Preservation in the United States, Library of Congress](https://www.loc.gov/static/programs/national-recording-preservation-board/documents/pub148.pdf)
10. [Audio File Types, Apple Developer Documentation](https://developer.apple.com/documentation/audiotoolbox/1576497-audio-file-types)
11. [Preferences in Summary for Sound Content, Library of Congress](https://www.loc.gov/preservation/digital/formats/content/sound_preferences.shtml)
12. [Recommended Formats Statement – Audio Works, Library of Congress](https://www.loc.gov/preservation/resources/rfs/audio.html)

---
*Initially written Sep 17, 2026 · Reviewed: 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/audio-file-format

English original: https://www.edgepedia.org/audio-file-format
