[vorbis] What tags are allowed in ogg files?

Owen Emry Owen.Emry at corp.palm.com
Fri Jul 26 15:21:54 PDT 2002



Anders Thomsen wrote:
> I'm writing a tag-editor for ogg files.
> What tags, besides ogg-tags, are allowed in ogg files (if any).
> I'm thinking of id3v1, id3v2, ape tags and so on.

Vorbis streams supports any arbitrary metadata (e.g. tags).  The Ogg stream encapsulates the Vorbis stream and contains no metadata of its own, although you could roll-your-own method of multiplexing it in if you want (but it sounds like this isn't what you want).

> I have a (probably small) problem with writing a new "comment 
> header". I
> have tried opening a file with a valid header, and then 
> simply moved some of
> the comment tags position,
> so that the total size and the count still remains the same. 
> I then save the
> file and try to analyze it with the OggInfo tool, but it tells me:
> "Warning: Could not decode vorbis header packet - invalid 
> vorbis stream (1)"

You're abusing the file format -- it doesn't work that way.  The direct cause of your problem is that by changing the data, you're breaking the checksum, and that's why ogginfo complains.

> If I analyze the two files with hexeditors, the contents are 
> exactly the
> same, except that two comment tags (and their leading 32 bit integer
> describing the tags length) are switched position.

Instead of hacking the files with hex editors, you need to manipulate the bitsteam in a supported way.  Studying the vorbiscomment source is probably a good place to start.

Regards,
Owen

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list