AW: [ogg-dev] packets and OGG pages
Mathias Kunter
mathiaskunter at yahoo.de
Wed Mar 14 05:23:47 PDT 2007
Thanks for your replys.
>packets don't always begin at the
>start of a page
OK, since I only want to read / write the Vorbis comments, I can limit it to the Vorbis header packets.
http://xiph.org/vorbis/doc/Vorbis_I_spec.html stats that the comment header always begins on the second ogg page. Since the length of the precedent identification header is fixed, this even is a fixed offset into the logical ogg stream.
The spec now further stats that the comment and setup headers can together span >= 1 pages. So does this also mean that the comment header itself can be split over different pages?
In contrast to that, http://www.ietf.org/rfc/rfc3533.txt stats the following:
"Ogg Vorbis provides the name and revision of the Vorbis codec,
the audio rate and the audio quality on the Ogg Vorbis bos page.
It also uses TWO additional header pages per logical bitstream."Sounds like ogg would ALWAYS use a total of three header PAGES for its three header PACKAGES. Is this actually the case?
> files rarely contain padding after the
> comment packet.
That's a pity. It could have been very easy included in the specs by just defining that the comment header always uses an ogg page alone which has a size greater than the actual content (for example 32K). Re-tagging a music file is common and it's not efficient to rewrite the entire file....
>To answer your other question, yes the meta-header refers to
>the bos page.
I thought it must be this way, also because of the following (from the rfc3533 again):
"A physical bitstream begins with the bos pages of all logical
bitstreams containing one initial header packet per page, followed by
the subsidiary header packets of all streams, followed by pages
containing data packets."
So this means I can ALWAYS expect the first ogg page to be on offset 0 of a physical stream (an ogg file), right?
Mathias
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
More information about the ogg-dev
mailing list