[theora-dev] Time in video file

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Tue Mar 15 10:41:59 PDT 2011


On 03/15/2011 01:36 PM, Bjoern D. Rasmussen wrote:
> Since Theora is fed with a
> framerate which isn't precise the time of each frame when I play it in
> VLC doesn't match the exact time of when the frame occurred. So
> basically I wonder how can I sync a video frame to a clock using
> Theora and Ogg?

Ogg Theora operates at a strictly fixed framerate.  If you start the
stream at 30 fps, then it is a 30 fps stream, and the time of each frame
is exactly determined by its number.  If your webcam is dropping frames
then you must fill in the gaps.  You can most easily do this by submitting
frames multiple times to make up for any dropped frames.

The encoder has various optimizations for the special case of duplicate
frames, but these are not important for your immediate problem.

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20110315/15ea3e01/attachment.pgp 


More information about the theora-dev mailing list