Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Testing / Bug Reports > Incorrectly Calculated Frametimes(?)


Posted by: mashadar Jan 30 2003, 06:32 AM
Frame: 32271
FPS: 2997/125 (23.976000...)
Time calculated: 22:25.970970970...
Time shown in vdub: 22:25.959
depending on rounding or cropping of value, that means 11-12 ms off from the correct value.
Since this is a proper OpenDML avi, vdub should be able to read the correct exact fps by the num/denum values, instead of relying on the time per frame value.
The error grows bigger the more frames there are in the avi.

I found this one while trying to figure out why textsub+avisynth didn't show subs on a frame where vdub+textsub did.

Posted by: phaeron Jan 30 2003, 07:56 AM
VirtualDub internally converts the video stream rate from rational form to microsecond form (scale*10^6/rate) for display and filter timing purposes. The roundoff error is thus(1000000*125/2997 - 41708) * 32271 = 12103 us.

Fortunately, I can improve the accuracy of some of the calculations without much trouble.

Posted by: wanderering Feb 24 2003, 09:39 PM
Is this related?... When I try to set the capture frame rate to 29.97 VDub comes back with 29.9706? (Subsequently DVD2SVCD/AVI2SVCD complains about frame rate of the captured avi.)

Posted by: phaeron Feb 25 2003, 03:18 AM
The framerate accuracy problem should be solved in 1.5.

As for the capture issue, that's a different problem -- Video for Windows accepts capture rates in microseconds, so 29.9706 is the closest you can get to NTSC rate.

Posted by: fccHandler Feb 25 2003, 03:56 AM
Actually, 29.96973 (1000000/33367) is a tiny bit closer. tongue.gif

There's a related discussion here:
http://virtualdub.everwicked.com/index.php?act=ST&f=2&t=1770&s=853e0dc4057cb0ceebbeca155182fe1b

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)