[vorbis] What tags are allowed in ogg files?

Michael Smith msmith at labyrinth.net.au
Sun Jul 28 06:51:19 PDT 2002



At 10:30 PM 7/26/02 +0200, you wrote:
>Hi,
>
>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.

Only the ogg tags. id3 tags will cause a corrupt file (there are several
severely broken tools out there that do use id3 tags on vorbis files).

>
>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 must update the page checksum(s), and potentially (only in rare
cases) rewrite much of the ogg framing information for the entire file.

<p>>Bit-by-bit copying all contents of the existing file, until the beginning of
>the "Vendor length" integer.
>Then I write:
>vendorlength (32 bit unsig. int)
>vendorstring
>comment count (32 bit unsig. int)
>comment1 length) 32 bit unsig. int)
>comment1 string (fieldname=value)
>comment2 length..

You need to look at the ogg framing layer, and ensure all this information
remains correct. Then you can just write a new comment header packet (i.e.
what you've got just above, plus the packet-identification stuff that comes
directly before it),

Michael

<p><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