读写 WAV/RIFF 标签
我正在编写一个简单的音频录制实用程序,我还希望能够使用元数据标记生成的文件。找到用 ID3 标签标记 MP3 文件的库非常容易,但我对无损编解码器(例如 WAV 和可能的 FLAC)更感兴趣。
据我了解,WAVE 文件实际上是 RIFF 文件类型的子集,它可以包含波形“块”和元数据“块”。
任何人都可以向我指出库、规范或示例项目的方向,以帮助我弄清楚如何在 WAVE 文件中读取和写入这些 RIFF 标签吗?
还有人知道 FLAC 是否存在类似的标签,以及将元数据写入 FLAC 文件的任何好的资源吗?
I'm writing a simple audio recording utility which I want also to be able to tag the resulting files with meta data. It's pretty easy to find libraries to tag MP3 files with ID3 tags, but I'm more interested in lossless codecs like WAV and possibly FLAC.
As I understand it WAVE files are really a subset of the RIFF file type which can contain both waveform "chunks" and metadata "chunks".
Can anyone point me in the direction of libraries, specifications, or sample projects that would help me figure out how to read and write these RIFF tags to and from WAVE files?
Also does anyone know if similar tags exist for FLAC, and of any good resources for writing metadata to FLAC files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 RIFF-WAV。
是的,元数据存储在特殊的块中。应该注意的是,您将无法以标准方式将 ID3(或其他标签)映射到 RIFF-WAV 元数据。一些常见的标签字段具有适当的标准 RIFF-WAV 字段,而对于其他字段,您应该自行发明。而且大多数软件无法识别 RIFF-WAV 标签。
对于 FLAC。
您可以根据FLAC 规范使用 FLAC 标记。
For RIFF-WAV.
Yes, metadata is stored in special chunk. It should be noted, that you will not be able to map ID3 (or other tags) to RIFF-WAV metadata in a standard manner. Some common tag fields have appropriate standard RIFF-WAV fields, for another you should make your private inventions. Also the majority of software does not recognize RIFF-WAV tags.
For FLAC.
You can work with FLAC tags according to FLAC specifications.