[vorbis-dev] Header page splitting

Matthias Erll merll at gmx.de
Thu May 8 09:07:00 PDT 2003



Hi!

> Tor-Einar Jarnbjo wrote:
>
> >Matthias Erll wrote:
> >All that works fine with my test files, but I want it to be reliable
> >working with all files with comment headers larger than 8 kbytes.
> >Now,  my question is: Can I just split up the comment and the
> >setup header, whereever I want, or do I have to split them at
> >a certain point?
>
> The only requirement is that the identification header ends on a
> page boundary (meaning that the comment header must begin on a fresh
> page) and that the setup header ends on a page boundary (meaning
> that the first audio packet must begin on a fresh page). The headers
> must also be written in this order: identification, comment, setup.
>
> You should also consider, that there is no limit on the length of
> the comment header, and that you may have to split it over more than
> two Ogg pages.

Actually I had already considered all that... that would have meant I
did not have to change anything. But now I tested some things - with
weird results:
First I forced my program to split the comment and the setup header
into 4 kbyte pages. The Winamp plugin refused to accept the file, but
oggdropXPd was still able to decode it.
Then I changed the page size back to 8 kbyte. But now that the
remainder of the setup header had a different length, so the comment
header ended up being all the way in the second page, while the setup
header got split into the second, the third, and the fourth page.
Neither the Winamp plugin, nor oggdropXPd will accept the file anymore.
To solve the problem, I had my Delphi class memorize the positions of
all the remaining setup header pages, too. When I had this file and
others rewritten with 4 kbyte pages then, still neither oggdropXPd nor
Winamp would read it.
Then I tried to find out what was wrong with the files, I noticed a
similarity between all my OggVorbis files encoded with oggdropXPd: In
all files, the remaining length of the setup header in the second page
was 0xff0 (4080) bytes, even though the comment headers had different
lengths.
Now, is my assumption right, that there IS something like a requirement
for the setup header to be split up in a certain way? Or is there
something I forgot?

  Thanks for your help,
   Matthias

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