[theora] Additional encoding options for theora

Basil Mohamed Gohar abu_hurayrah at hidayahonline.org
Wed Nov 18 10:13:21 PST 2009


On 11/18/2009 01:02 PM, Benjamin M. Schwartz wrote:
> Basil Mohamed Gohar wrote:
>   
>> On 11/18/2009 12:04 PM, Gregory Maxwell wrote:
>>     
>>> Getting good results from codec tweaking requires a commitment of
>>> time, both to thoroughly explore the changes and to understand the
>>> changes being made.  If you're willing to make that investment then
>>> rebuilding libtheora shouldn't be *too* much of a hurdle.
>>>       
> That's true... but more parameter space exploration might happen if it
> could be done with shell scripts.
>   
That sounds like what I am interesting in doing, i.e., writing scripts
that will test a suite of sample videos (some of which I've created)
with the various settings that are made available, and comparing &
contrasting encode times, resulting file sizes, etc.  Not sure how to do
accurate quality comparisons automatically, so that may be a manual
process.
>> I was under the impression that such values were tweakable and just not
>> made accessible through the interface.
>>     
> libtheoraenc has many functions for setting encode properties, and some
> are not exposed through ffmpeg2theora (nor most other interfaces).  Two
> major ones are the huffman tables [1] and quant matrices [2].  These have
> a large impact on the encode, but are not exposed because they are much
> too long to be specified by a human.  If you're interested in real
> experimentation, you might consider patching encoder_example to accept
> arguments for these ... but playing with them is not like choosing a
> single number.  The quant matrices alone represent hundreds of parameters
> for each quality level.
>
> There are also other hard-coded constants in libtheoraenc that could be
> exposed for tuning, but have not been.  These include the RDO lambdas, Y
> vs. UV precision, and many other things beyond my knowledge.  These could
> be exposed, but not without modifying libtheoraenc.
>
> Of course, the really interesting encoder work is algorithm improvements,
> which cannot be achieved by exposing knobs.
>
> --Ben
>
> [1]
> http://theora.org/doc/libtheora-1.1/theoraenc_8h.html#a0165348788e560a19b7c61ae8f0c2283
> [2]
> http://theora.org/doc/libtheora-1.1/theoraenc_8h.html#a3befcdd66678f8d27034f9c4b16d1b9c
>   
I can see that the areas that Theora needs the most work in are
currently beyond my abilities.  I have little experience in the dynamics
of information theory and actual codec implementation, so I was hoping
for a less steep learning curve in the process of Theora improvement.


More information about the theora mailing list