[ogg-dev] Header packet multiplicity

ogg.k.ogg.k at googlemail.com ogg.k.ogg.k at googlemail.com
Tue Feb 12 04:49:28 PST 2008

Has anyone thoughts on whether multiple header packets are a good idea ?
I currently have a header per "type" of data, and I'm now at 9 headers. The
original idea was to make it harder to hit a maximum limit, but I've
since realized
that the 64 KB (ish) limit is on pages, rather than on packets, so this is moot.

I've recently slightly changed the format of my headers after reading the wiki
about RTP encapsulation, and the way headers may have to be concatenated
in some containers. In my particular case, all header packets are
critical (apart
from the Vorbis comments packet, actually), and data packets aren't (though
losing one would lose one text event).

In this light, does anyone know of results (statistical or otherwise) indicating
whether having multiple smaller packets is better or not than a consolidated
single packet ?

Additionally, is there some kind of guidelines about header packet design, and
the constraints or recommendations about it ? I'm thinking about parsing those
packets by a parser that doesn't know their format, from, eg,
http://wiki.xiph.org/index.php/Oggless,  that specify a way to skip
those headers
without actually understanding them. This had me thinking about adding a length
field to headers (and maybe all packets). This seemed to be useless when the
stream is encapsulated in Ogg, but now seems like a good fallback idea, though
it means a low-ish overhead for each packet.
As a side possibility, it could be possible to include this field only
for when the
stream is not in Ogg, though that might be confusing, though it could be visible
through a "is_in_ogg" flag in kate_info, before starting encoding or
decoding, to
hide the difference in low level stream format. Again, this might not
be a good idea
but I haven't given much thought to it yet. Comments appreciated from those who
have given thought to these  issues.

I apologize that this question is not actually directly related to
Ogg, but the info
I'm basing this on was gleaned from the xiph wiki, so people here should be in
the know.


More information about the ogg-dev mailing list