[theora] Changing frame rate in an ogg

Ralph Giles giles at thaumas.net
Thu Aug 25 14:51:03 PDT 2011


On 25 August 2011 23:57, Stefano Luceri <stefano.luceri at agilex.it> wrote:

> Reading theora documentation it seems that frame rate (FRN and FRD) only
> affects granulepos/timestamp but changing it (manually) in the ogg files
> causes bad decoded frames while playing (I’ve also tried other ogg videos).

Two things:

Theora is strictly fixed frame rate. If the incoming video data is not
at a fixed frame rate, then your encoder will need to check against
the playback clock and duplicate or drop frames to make it so. Since
RTP has per-packet timestamps, this can be relaxed to simplify the
sender implementation, but once saved to an Ogg file, all players will
treat the stream as fixed frame rate. This is likely the reason your
file doesn't behave as you expect.

If you just want to adjust the frame rate of an already saved file,
you could try the little 'rogg_theora' utility I wrote.

  http://downloads.xiph.org/releases/rogg/rogg-0.4.tar.gz

Be aware that it doesn't support Ogg chains or files over 2 GB on 32
bit systems.

 -r


More information about the theora mailing list