[theora-dev] question about ogg mapping

Ralph Giles giles at xiph.org
Thu Jun 12 10:12:43 PDT 2003



On Thursday, June 12, 2003, at 05:58 pm, Dan Miller wrote:

> The problem is this: right now, with each frame in its own page,

Are you sure that's the way it is right now? The only explicit page 
flushes I see are after the first and last header packets. In fact, the 
whole encoder loop works to hand frames to the codec *until* a page 
pops out the other end. AFAIK we're relying to libogg to flush whenever 
it feels like it.

> We could impose the following limitation, which would work in most 
> scenarios:  if a page contains multiple frames, and there are any 
> keyframes within that page, then the first frame in the page must be a 
> keyframe (and granulepos will reflect this, calling the whole page a 
> 'keyframe').

Interesting. Purple and I were discussing the same idea. For the sake 
of a live streaming server, I was thinking it might make sense to add a 
flush requirement *after* a keyframe. Given that symmetry, I'd guess 
neither idea will help much.

You seem to be assuming that you need packet-level information to do 
seeking, but really you only need to start on the right page, since ogg 
will require that framing start there anyway. Seeking often involves 
logic like 'find the page after the closest before the target' so you 
end up comparing pairs anyway, so you don't need the exact keyframe 
granulepos, just to bracket it.

At least, that's another approach.

  -r

--- >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 'theora-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 Theora-dev mailing list