[Vorbis-dev] copying an ogg stream

Monty xiphmont at xiph.org
Tue Sep 21 23:26:38 PDT 2004




On Thu, Sep 23, 2004 at 11:19:31AM +0800, illiminable wrote:
> The only reason i saw it as a potentialy better approach is that since most 
> of the packets don't have a granule pos... if the remux doesn't exactly 
> match the same page boundries, you either have to do codec level granule 
> pos calculation, or you end up with a heap of pages having -1 granule pos 
> anyway.

You do have a point there.

> Which reminds me actually... i found a bug in my mux, i'm not sure if the 
> same problem applies in libogg, but it's posible, so i figure i'll mention 
> it.
> 
> It basically happens when muxing something with very large packets, ie very 
> high quality video. Assuming there is no audio stream.
> 
> Since the packets are so large compared to the average page size... almost 
> none of the pages actually have a granule pos. So i'm not sure if libogg 
> has a "forced granule pos" bit of code... basically where it ignores it's 
> normal page sizing algorithm and if a page with a granule pos hasn't been 
> written for x pages or y seconds it forces out a short page in order to 
> provide a sync point.

If pages are reliably smaller than packets, you still get a granule
pos every packet.

Monty


More information about the Vorbis-dev mailing list