[theora] Questions about encoder parameters.

Gisle Sælensminde gisle at snirklasjon.no
Thu Mar 25 02:57:55 PDT 2010

I have almost finished integration of Theora into our videoconferencing 
program. Since a videoconferencing program is realtime, it is UDP-based 
and wraps the Theora stream in RTP (More on that later). The problem 
here is that most examples I could find, wraps the theora stream in ogg, 
and used over tcp or files. I send over UDP and clients need to be able 
to start in the middle of the stream. I do resend packets periodically, 
so the clients need to wait for a header resend before they can start. 
Even after that, I have a problem that I only see the difference from a 
white background the first few seconds, and ghost images after that. One 
of the problems is probably that I send wrong parameters to theora for 
encoding. I had some problem understanding what the intention of these 
parameters are. I will therefore ask some questions about some of the 
parameters in the th_info structure:

    th_info info;

    info.fps_numerator = 10;
    info.fps_denominator = 1;

My understanding is that this is the framerate, and that the parameters 
above means 10 frames per second, Is that right?

    info.aspect_denominator = 0;
    info.aspect_numerator = 0;

Here I use the default, and hope that is OK.

    info.keyframe_granule_shift = 10;

I'm uncertain on what the intention of the parameter is. It seems like 
it is the frequency keyframes are sent in, so the parameter above would 
mean that every 10th frame is a keyframe, but I'm not sure that is 
right, and would like this parameter to be explained, as it was not 
obvious for me by reading the documentation.

Hope somebody would help me with this.


More information about the theora mailing list