Re: Time in video file

"Benjamin M. Schwartz" <[email protected]> Tue, 15 Mar 2011 13:41:59 -0400
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
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

_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1/pOgACgkQUJT6e6HFtqQHSgCdFP5CYl3eypopGFuktDJPJdNq
k1cAn0/DRUcQ31VqohnQGMXoQ+7ntJ7L
=zT3i
-----END PGP SIGNATURE-----