[vorbis] What tags are allowed in ogg files?

Alejandro G. Belluscio baldusi at uol.com.ar
Fri Jul 26 13:47:16 PDT 2002



Hello Anders,
  I've been investigating the same things. Thou I didn't actually wrote
anything. The first thing to understand is that you have an ogg vorbis
stream inside an ogg container file. The ogg file container
specification allows for any stream of data. So you could concivably
write your own coment stream. Which you would have to multiplex with the
vorbis stream. But that would be your propietary extension.
  The vorbis stream defies that the second vorbis page stores the
comments in the structure you've described. The problem of what you're
doing ir (IIRC) that there's some CRC check embeded within the stream
specification. So you should use the ogglib to access and modify the
file instead of doing it directly.

Best regards,
Alejandro Belluscio
Friday, July 26, 2002, 5:30:32 PM, you wrote:

AT> Hi,

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

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

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

AT> To write the file, i do this:

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

AT> I've uploaded two sliced ogg files (200 kb each):
AT> http://www.mexp.dk/ogg/test1.ogg    (this is the one I modified, so it
AT> doesn't work)
AT> http://www.mexp.dk/ogg/test2.ogg    (this is the original one, which is
AT> okay)

AT> I hope that a kind soul would care to explain to me what I'm doing wrong,
AT> since I've been fiddling with this for two days (or rather nights), and
AT> I've allmost pulled out every single hair on my head by now...

AT> Thanks in advantage,

AT> Regards,
AT> Anders Thomsen

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

<p><p>
-- 
Best regards,
 Alejandro                            mailto:baldusi at uol.com.ar

<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