Tagging WAV files

patrick machielse patrick at hieper.nl
Wed Aug 24 20:11:36 UTC 2011

Hi List,

I need to support tagging (read/write) .wav files. I've looked at the TagLib sources, and there is a generic rifffile (base) class and a specific wavfile (sub) class that seem useful.

In my program I need to support tags created by two programs specifically: Serato and Traktor. Experimentation seems to indicate that each app tags .wav files differently:

- Serato adds a complete ID3v2 tag to a RIFF chunk.
- Traktor stores raw metadata directly in specific RIFF chunks.

The wavfile module appeared to be what I needed to support Serato. However, Serato stores the tag in a chunk named 'id3' (lowercase) and wavfile expects it to be in 'ID3'. Editing the wav file results in a file with two ID3 tags in two separate chunks. (QTKit on Mac will refuse to play some of these files).

As far as I can tell there is no direct (public) support for writing to custom RIFF chunks.

My analysis so far is that I will need to create a custom subclass of rifffile -- probably starting with the wavfile code. Is that correct, or is there an easier approach?

Patrick Machielse
Hieper Software

info at hieper.nl

More information about the taglib-devel mailing list