[ogg-dev] packets and OGG pages
conrad at metadecks.org
Tue Mar 13 21:35:32 PDT 2007
The Ogg format is fairly complex -- packets don't always begin at the
start of a page, and files rarely contain padding after the comment
packet. To answer your other question, yes the meta-header refers to
the bos page.
I suggest you avoid writing your own Ogg layer. Perhaps you would be
better off writing your comment editor using illiminable's OOOgg
libraries, which are part of the sourcecode for the DirectShow
On 14/03/07, Mathias Kunter <mathiaskunter at yahoo.de> wrote:
> Hello all,
> my name is Mathias, I'd like to ask about some details of the OGG format because I'm quite new to it. I'd like to write a native .NET library for reading and writing Vorbis comments. It's going to be open-sourced as soon as it's finished. So here it goes:
> 1) When packing (Vorbis) packets to OGG pages, does a new packet always begin on a fresh OGG page? Within the specs I could only find the info that a packet can be split over several pages.
> 2) http://xiph.org/ogg/doc/oggstream.html stats:
> "A physical bitstream consists of
> multiple logical bitstreams multiplexed at the page level and may
> include a 'meta-header' at the beginning of the multiplexed logical
> stream that serves as identification magic."
> What is meant by this "meta-header", I couldn't find any detailed specs about it? Does this simply refer to the "begin of stream" (bos) page where the codec identification header is stored?
> 3) When new information is added to the comment header, it has to be expanded, of course. Is there a way to use some kind of "padding" like ID3v2 does so that rewriting the entire file can be avoided? I thought it must be possible by simply creating an ogg page with a size which is greater than the space required by the comment header, and filling up the remaining bytes with 0's for "clarification". Unless I don't exceed the maximum page size of nearly 64K there should be no problem. Even if I would exceed the 64K limit I think it should be possible by adding a new ogg page, although this would cause to re-number the other ogg pages. Am I right about these assumptions?
> Many thanks for any point to the right direction.
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
> ogg-dev mailing list
> ogg-dev at xiph.org
More information about the ogg-dev