[vorbis-dev] clarifications on comments spec
Scott Wheeler
wheeler at kde.org
Tue Jul 1 17:00:30 PDT 2003
On Tuesday 01 July 2003 4:19, Michael Smith wrote:
> Encoder vendor. Not changing it is the right thing to do.
Cool; won't change that then.
> Yes, this lastt bit is correct, but padding is certainly possible. Just use
> a packet which is larger than the contents of the packet - with the rest
> probably zero-filled, though it doesn't really matter.
Ok, in my other mail I mentioned that I'm playing with this and will do some
more soon...
> So far, other ogg specs have pulled in the vorbis comment specs themselves,
> with minor differences (i.e. the others generally don't start with
> "vorbis").
Ok, like I said, my comment handling class assumes that the file handling
class has already parsed the Vorbis (or any other codec) packet. From there
it just assumes that the rest of the byte arrangement follows the
specification. I think what I'm hearing is that this type of separation
(i.e. just doing step 4 from section 5.2.1 of the spec in my comment class)
should work for the other Xiph codecs too.
> In the future, we'll probably have a generalised ogg metadata stream type.
Cool. I'll probably subscribe here and let the lurking begin. :-)
> That's true, I suppose, if the header spans multiple pages. Fundamental part
> of the ogg design, so that won't change...
Yes, but I hadn't understood earlier that I can get the size of the Vorbis
packet from the lacing values -- in fact I realize now that I had
misinterpreted what exactly a "codec packet" is.
> Depends. This is a matter of how much complexity you want. The only case
> where (assuming a correct input file) you need to re-'render' every ogg page
> is if the total length of the comment header increases to more than
> (current_number_of_ogg_pages_for_comment_header * max_page_length), where
> max_page_length is just under 64 kB. That's pretty rare.
>
> > *) A comment is allowed to span multiple Ogg pages. This is a pain in the
> > butt. ;-) Despite the Ogg spec saying "large packets are forseens as
> > being useful for initialization data at the beginning of a logical
> > bitstream", it wasn't stipulated in the Vorbis comment spec that this is
> > one such application. Especially when you're just tagging -- and not
> > encoding at the same time -- you're never going to want to split the tag
> > into multiple pages because then you have to go through and rewrite the
> > page number for every following page.
>
> Right. See above. This is only the case where the number of pages HAS to
> change, which will essentially never happen. You could just choose not to
> support that case - 64 kB of text comments is quite a lot. Doing so would
> solve your issues, I think.
Well, yes, I could (and do in my attempt from last weekend), but despite my
whining I'll probably go ahead and get a compliant implementation working.
Aside from padding my comments were mostly intended as a "at some point in
the future this might be nice for future implementors" type-of-thing.
My attempts from last weekend, while working for the cases I've tested, well,
I can say that part of the "working" bit was luck. :-) But it gave me a
little bit of background for to bring up these questions, for which the
answers have been really helpful.
Again, thanks folks -
-Scott
--
We should forget about small efficiencies, say about 97% of the time:
premature optimization is the root of all evil.
-Donald Knuth
<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-dev-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-dev
mailing list