AW: [ogg-dev] packets and OGG pages

Ralph Giles giles at xiph.org
Wed Mar 14 10:46:49 PDT 2007


On Wed, Mar 14, 2007 at 02:36:47PM +0000, Mathias Kunter wrote:

> As long as the data between the end of the comment header and the begin of the setup header is all 0's, this should work just fine, and this could also be used to include padding to the file if it has to be rewritten anyway. Good practice would then be to create a single ogg page for the comment header with a size of e.g. 8K (which should be enough for most cases), filling up the rest of the page with 0's to be able to re-tag the files at least in future without rewriting the entire file.

You could do that if you wanted. As long as 8k is a small fraction of 
the total file size most people wouldn't mind I think. But it's the 
rest of the 

Searching for 'vorbis' to find the packet boundary is wrong however.
The lacing values in the Ogg page header tells you exactly where the 
division is. Likewise, it's the rest of the comment packet that you're
filling with zeros, not the page. Don't break the abstraction. Also, 
whether the setup header begins on the page where the comment header
ends is irrelevant as far as being able to cheaply expand the comments.

HTH,
 -r


More information about the ogg-dev mailing list