Log in

View Full Version : VFR and AssumeFPS


ncahammer
27th October 2008, 10:55
Not long ago I did a correction to the Avisynth Wiki about the computation of the clip's FPS

http://avisynth.org/mediawiki/VFR#encoding_to_vfr_.28mkv.29

(the "oldfps = framerate" line moved and it's now computed before decimation)

Trying to validate the numbers a took a sample clip, which before decimation I had those numbers

frames:77166, 29,97002997003fps, duration:00:42:54.7722000

with the old computation the decimated result was
frames:62066, 19,3884342607747fps, duration:00:53:21.1868089

but with my correction the numbers were
frames:63064, 24,4927234927235fps, duration:00:42:54.8055343

All nice, you may say, but...
now I do notice the different framecount which is wrong in my case

I thought that was a precision thing, so I changed the line
"averagefps = (float(framecount)/float(oldcount))*oldfps"
to
"averagefps = (float(framecount)*oldfps)/float(oldcount)"

and I got
frames:62066, 24,1054333764554fps, duration:00:42:54.7722113

very nice, the duration is much closer to the original duration and the framecount seems correct

last I did try to remove all lines that change FPS and the AssumeFPS line and I got

frames:62066, 24,1054334826203fps, duration:00:42:54.7722000

which is the most accurate.
And my question is :
Do we really need all those FPS calculations or they do exist as workaround to a bug that avisynth had, but now avisynth is corrected and the only thing that offer are inaccurate results ?

ncahammer
29th October 2008, 18:12
In the above post I challenge the validity of the avisynth documentation
Since not one comment it means that either it's an extremely stupid post or it's too bad written for anyone to understand it
Please delete it