[Vorbis] Stream "Saving" and Excerpting...

Michael Smith msmith at xiph.org
Wed Sep 28 06:26:22 PDT 2005


> > If you don't need sample-accurate editing, starting with vcut is a bad
> > idea. It's a heap of extra complexity that you don't need.
>
> How can I de-complexify it?

By not using it as a base for your code. At all. Don't use it for
code, don't use it for ideas. It's the wrong approach for your
problem. (it's the wrong approach for the problem vcut is meant to
solve too, which is why the code is so messy and buggy, but that's a
different matter).

For your purposes, you can probably get away with just parsing the ogg
data, getting the header pages, dumping them into each output file,
and then putting appropriate data pages into each output file. You
shouldn't need to use libvorbis at all for this (well, maybe for doing
granulepos->time mapping).

Oh, and you might want to change the serial numbers to be unique
(which will require re-checksumming).

Mike


More information about the Vorbis mailing list