[Theora-dev] Dropped / Duplicate Frames
Ralph Giles
giles at xiph.org
Sat Mar 11 20:04:54 PST 2006
On Sun, Mar 12, 2006 at 01:56:30AM +0000, Philip Heron wrote:
> Thanks for the description, that's help a lot. I've now got it saving
> valid Ogg files from the live stream.
Yay.
> Now, is there a handy way of forcing a keyframe to be the first packet
> in a page? Since I'm caching at the page level the created files tend to
> start on an intra-frame. Makes for a nice green mess at the start :)
If you control the encoder you can call theora_packet_iskeyframe() on
each packet libtheora returns; then loop while(ogg_stream_flush())
{my_write_page();} before submitting a keyframe packet for pagination.
Otherwise, you'll have to repage the stream (e.g. if you're writing a
cut stream to disk) and/or fix your decoder to skip to the next
keyframe.
HTH
-r
More information about the Theora-dev
mailing list