[Bug 627459] theoraenc should provide option for TH_ENCCTL_SET_DUP_COUNT

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu May 12 06:43:51 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=627459
  GStreamer | gst-plugins-base | 0.10.x

--- Comment #28 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-12 13:43:47 UTC ---
(In reply to comment #26)
> (In reply to comment #25)
> > * Please don't mix multiple changes in a single patch. Attach one patch for the
> > dup-property/SET_DUP_COUNT and another one for removing the discont function.
> 
> ok. i removed it because it will not work with discont function

Ok, please do it in a different patch and explain why it does not work with the
dup stuff. It's there a for a reason :)

> > * libtheora will handle the bitrate/keyframe constraints internally already and
> > will not output more dup frames than allowed
> 
> Not correct, if we apply more dups than keyframe freq, th_encode_ctl will
> return error. And we will get only one frame back. So why should we fail, if we
> can set a limit for dups?

Oh, I assumed that it simple outputs non-dup frames for some then. In that case
your approach is correct to handle this outside libtheora

> > * You should keep a queue with buffer timestamps and durations for the dup
> > frames and use these values for the output instead of interpolating
> 
> I thought about this, but why? The dup setting make sence only with ogg,
> also only with constant frame rate, only after videorate. If we get not
> constant rate it will fail, so or so.

Dup also makes sense for non-ogg, it's not only videorate that sets the gap
flag on buffers and people are using videorate before other muxers too.

Also other elements might set the gap flag on buffers in non-constant framerate
streams

(In reply to comment #27)
> > > * I think your GAP flag handling is wrong. You should always keep the last
> > > non-gap buffer, count the number of gap buffers and on the next non-gap buffer
> > > you encode the previous non-gap buffer, get the dups and then keep the new
> > > non-gap buffer and do everything from the beginning again
> > 
> > Ok. This will cure the timemachine effect.
> 
> Your suggestion looks like this. is it correct?:
> After videorate  [1*2**3****4*5*]
> Your suggestion  [11*2**3****4*]
> This Patch       [12*3**4****5*]

My suggestion would be to transform the gap buffers into dup frames, i.e.

After videorate   [1*2**3****4*5*]
After theoraenc [1*2**3****4*5*]

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list