[vorbis] vorbiscomment and multi line comments

John Morton jwm at eslnz.co.nz
Thu Oct 2 06:54:02 PDT 2003



On Friday 03 October 2003 01:42, you wrote:
>  Ralph Giles <giles at xiph.org> writes:
>  > He said 'field names' not 'field contents'. The tag names must be formed
>  > from an ascii subset by spec. It really is meant to be quick-and-dirty,
>  > casual metadata.
>  >
>  > The values of the tags, after the '=' delimeter, are utf-8.
>
>  The way I read the discussion, it sounded like the problem was
>  something like this:
>
>  SOMETAG=In the early 20th century, Albert Einstein laid the
>  foundations for a theory that would eventually give us
>  E=mc^2, the fundamental basis for the nuclear bomb.
>
>  In this case, the two field names are "SOMETAG" and "E".

This is correct. Internally, a vorbiscomment includes length data for each 
tag, so there's no ambiguity. The problem turns up when using vorbiscomment. 
It prints out something rather like what you have, above, as it was orginally 
intended to just display the comments in a straight forward human readable 
fashion. 

But that becomes a problem if you want to do this sort of thing:

vorbiscomment -l foo.ogg > vorbiscomment -w bar.ogg bar.ogg.tmp && rm bar.ogg 
&& mv bar.ogg.tmp bar.ogg

It will break for multi line comments. Some might argue that you should just 
resort to something like the python API at this point:

import ogg.vorbis
vf = ogg.vorbis.VorbisFile('foo.ogg')
vc = vf.comments()
vc.write_to('bar.ogg')

But it might be nice to make it at least possible to do this sort of thing 
with just the command line tools.

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