问题
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?
回答1:
Here are some papers/articles.
http://www.codeproject.com/KB/files/riffparser.aspx
http://www.codeproject.com/KB/audio-video/WaveEdit.aspx
For Flac
Assembly to Read and Write Ogg Tags (Vorbis, FLAC and Speex)
回答2:
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.
来源:https://stackoverflow.com/questions/2543335/reading-writing-wav-riff-tags