[theora-dev] dynamic change video quality........

xiphmont at xiph.org xiphmont at xiph.org
Tue Feb 19 00:47:05 PST 2008


On Feb 19, 2008 1:06 AM, Asanka Dilruk <adilruk at gmail.com> wrote:
> I am going to change video quality parameter frame by frame.

There is currently no way to do this as there's no API.  You'd have to
reach directly into the internal code (which is, of course, what you
are suggesting), but this will be unstable.  Eg, once the Thusnelda
changes are merged back to mainline, this strategy will break.  The
symbols will not even be exposed in normal lib builds. Also, for what
you've described, you want to be influencing the bitrate management
parameters, not the quality parameter.

Anyway, I can see the use of this functionality, so I will see to
adding it to the API.  Derf, do you have documentation of your new API
so that I can do this correctly...?

> So i find a
> parameter called thisframequalityvalue for this task. so i changed
> cpi->Configuration.ActiveMaxQ(set "1" for half of the frames and set "63"
> for other half of frames) manually to change thisframequalityvalue parameter
> in UpdateFrame frame function. But quality was not changed. Why is
> that..

Because that's an internally computed value, and it is recomputed for
each frame internally regardless of what you set it to outside.  All
you're doing is accidentally clobbering the value of
LastFrameQualityValue, which will cause the internal regulation to go
haywire.  I'm not sure why you'd think that would do what you want...

Monty


More information about the theora-dev mailing list