[Theora-dev] Dropped / Duplicate Frames

Ralph Giles giles at xiph.org
Tue Mar 7 10:52:33 PST 2006


On Tue, Mar 07, 2006 at 12:49:56PM +0000, Philip Heron wrote:

> Now encoding Theora ain't exactly a speedy process, and sometimes frames
> get lost during capturing. What I'd like to be able to do is tell
> libtheora that the next few frames are missing (or are duplicates of the
> last frame) without having to re-submit the same frame more than once -
> which seems a bit of a waste. Any way of doing this?

You're correct that you need to duplicate frames that were dropped on 
capture. For a lot of cheap capture hardware you also have to drop
and duplicate frames to maintain sync, but that's less of an issue
if you're doing video only.

Currently the only way to do that is to resubmit the buffer. Fortunately 
duplicate frames compress well.

We've talked about adding a 'zero-length packet implies duplicate frame' 
feature to the spec, but the reference implementation doesn't support
this. Either way, I think it's reasonable to add an api call to request
a duplicate compressed frame as an optimization (unless your at a forced
keyframe, in which case it has to encode the previous frame as such).

Keep us posted on your experiment; this is useful feedback.

 -r


More information about the Theora-dev mailing list