Thread: VFRtoCFR
View Single Post
Old 29th May 2012, 15:00   #7  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
I'd argue that it's not "off", it's just a different way of converting. For each frame in the output, FFMS2 uses the source frame that starts closest to the target timestamp. You want it to use the first frame that has a timestamp that is greater than or equal to the requested timestamp instead. In my opinion that's a feature request, since I don't see the current implementation as buggy. It might not do what you want, but it's not strictly wrong either.

For many cases, the FFMS2 implementation will almost always pick frames that are much less "off" time-wise than the one you suggest will. The issue, I guess, is that while the strictly equal-or-greater algorithm may pick frames that are at worst "off" by (almost) one output frame duration, the closest-source-timestamp algorithm will at worst pick frames that are 0.5 input frame durations "off". If the maximum input frame duration * 0.5 is smaller than the output frame duration, closest-source-timestamp will always choose better.

I use "off" within quotation marks above because the term is arguable. I guess since you chose the algorithm you did and because of your slideshow example that you consider any frame that is displayed before its source timestamp says it should be displayed to be off, while a frame that is displayed later than its source timestamp might not necessarily be considered "off" to you. I'm not sure if that's the best way to approach framerate conversions in general, though. It works better for your example, sure, but as stated above it has problems with other funny inputs (more specifically, if the output frame duration is longer than the maximum input frame duration, i.e. you're dropping frames).

Last edited by TheFluff; 29th May 2012 at 15:02.
TheFluff is offline   Reply With Quote