Time in video file

"Bjoern D. Rasmussen" <[email protected]> Tue, 15 Mar 2011 18:36:30 +0100
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
Hi

I'm trying to store video I encode to a file using Theora and Ogg. The
video I record is from my webcam and although the framerate is set to
30 fps I rarely get more then 28-29 fps. 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?

I tried looking at th_granule_time() and ogg_page_granulepos() but
they seem to be concerned with the frame number and not time of the
frame.

Thanks for a great video codec!

Regards

Bjoern