Xombie
4th December 2002, 10:48
Does anyone know a good formula to convert a video frame to a millisecond time? I'm pulling in an avi file and I have most of the basic information available - rate, scale, etc...
I've got a simple formula in the realm of:
ms = int(((in_frame) * (avi_scale/avi_rate))*1000)
But this will return a result that varies +- 1ms (as checked against VirtualDub). Which isn't too bad, I suppose, but if there's a way to get it much more accurate I'd sure like to know.
Thanks!
I've got a simple formula in the realm of:
ms = int(((in_frame) * (avi_scale/avi_rate))*1000)
But this will return a result that varies +- 1ms (as checked against VirtualDub). Which isn't too bad, I suppose, but if there's a way to get it much more accurate I'd sure like to know.
Thanks!