[theora] video files contain one frame more than encoded
Olaf Till
olaf.till at uni-jena.de
Thu Nov 20 00:03:15 PST 2008
On Wed, Nov 19, 2008 at 11:02:59AM -0800, Ralph Giles wrote:
> On Wed, Nov 19, 2008 at 2:49 AM, Olaf Till <olaf.till at uni-jena.de> wrote:
>
> > ogg/theora files produced with libtheora-1.0, according to mplayer,
> > contain one frame more than encoded, and the last two frames in the
> > file are at the same time (correct time of the last encoded frame).
>
> It could be a bug in the encoder, or a bug in mplayer.
>
The former turned out to be the case. I did not understand that
theora_encode_packetout with last_p==1 produces a packet containing a
frame. I called it with &ogg_packet pointing to packet from last call
to theora_encode_packetout and the function of course returned without
changing it because no frame had been supplied to theora in the mean
time ... After fixing that the number of frames in the file is correct.
> Theora is a fixed-framerate codec; libtheora expects to be handed
> regularly spaced frames and encodes what it's given as if that's the
> case. Sometimes that means the driving encoder needs to do temporal
> jitter or interpolation if the original source was not fixed
> framerate.
>
Thats ok for me. Thank you.
More information about the theora
mailing list