[theora-dev] Time in video file

Basil Mohamed Gohar abu_hurayrah at hidayahonline.org
Tue Mar 15 10:46:26 PDT 2011

On 03/15/2011 01:41 PM, Benjamin M. Schwartz wrote:
> 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
Ben and others on this list know about this much more than I do, but I
thought we should mention that if you want to get something like
"variable" frame rates, you just set your framerate to the lowest common
denominator of all possible frame rates, and then just use drop frames
in the stream to fill in the blanks between the times that your real
video frames come in.  This sounds a lot more complicated than Ben's
suggestion, but I just thought I'd throw it out...and also appear like I
know what I'm talking about.

(That is, until someone corrects what I said because I got it wrong...:p)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20110315/4310116c/attachment.htm 

More information about the theora-dev mailing list