[theora] Questions about encoder parameters.

ogg.k.ogg.k at googlemail.com ogg.k.ogg.k at googlemail.com
Thu Mar 25 03:27:21 PDT 2010

>     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.

This setup means it is unspecified.

>     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.

This particular setting means that there will ve a keyframe at most every 1024
frames (2^10, as there are 10 bits to encode the number of frames
since last keyframe). Keyframes may well (and probably will) happen
more often, though.
http://wiki.xiph.org/GranulePosAndSeeking should be of interest to understand
how the granule position system works, and how the granule shift determines
that maximum keyframe spacing.

More information about the theora mailing list