I am going to change video quality parameter frame by frame. 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..Please help me to achieve my task.... -- Asanka Dilruk Department of Computer Science and Eng. University of Moratuwa.... http://www.asankadilruk.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20080219/cbfb70dd/attachment.htm
On Feb 19, 2008 1:06 AM, Asanka Dilruk <adilruk@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
Timothy B. Terriberry
2008-Feb-19 01:14 UTC
[theora-dev] dynamic change video quality........
xiphmont@xiph.org wrote:> 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...?The API was never really finished, or implemented, but you can get the basic idea by looking at http://people.xiph.org/~tterribe/doc/libtheora-exp/theoraenc_8h.html#encctlcodes (see specifically TH_ENCCTL_SETUP_VBR and TH_ENCCTL_SETUP_CQI). The idea was that these functions could be called at any point during the encoding process to change the current encoding mode and parameters. A TH_ENCCTL_SETUP_ABR was planned for an average bitrate mode, exposing things like rate-control buffer size, etc.