Romain Beauxis
2009-Feb-05 15:20 UTC
[theora-dev] Pages with granulepos = -1 while encoding..
Hi all ! Following my recent issued with my encoder, I've narrowed the issue to the fact that, when encoding, for some returned pages, the granulepos returned by the libogg is -1. Is that normal ? How should I intepret it if I want to order the pages ? Romain
ogg.k.ogg.k at googlemail.com
2009-Feb-05 15:29 UTC
[theora-dev] Pages with granulepos = -1 while encoding..
Large packets may span pages. -1 means no packet ends on that page. It should be held till the next page with a >= 0 granpos comes, in which case this granpos also logically applies to the preceding -1 pages.
Ralph Giles
2009-Feb-05 17:21 UTC
[theora-dev] Pages with granulepos = -1 while encoding..
On Thu, Feb 5, 2009 at 7:20 AM, Romain Beauxis <toots at rastageeks.org> wrote:> Following my recent issued with my encoder, I've narrowed the issue to the > fact that, when encoding, for some returned pages, the granulepos returned by > the libogg is -1.Technically speaking, I think you can also use a greedy algorithm and always write out granulepos=-1 pages as soon as you get them, since by definition all you know is that they must come between two marked pages from that same logical stream. The delay-until-the next timestamp suggestion ogg.k made is more likely to be optimal in the future though, if we ever block the packed+spanning packets case. -r