I suck with numbers, but I've noticed there are people here who on the other hand, don't. So here's the challenge:

Some video sources do not have a constant frame-rate such as many DOS games that have 125875/1796 fps during most parts and 125875/2108 for others.

To avoid skipping any frames, one usually captures at the highest known fps the game runs at and then drops all duplicate frames with avisynth/direct264.

The problem with this is that it doesn't accurately capture the frames if the FPS during capture is not a lowest common multiple of the 2 framerates the video runs at. Some frames get duplicated and some dont so the end result doesnt look too smooth.

Example, if there are sections that run at 24 and 30 fps, it's best to capture at 120 fps since it's divisible by both 24 and 30. Capturing at 30 fps will duplicate every 4th frame during the 24fps parts and make them twice as longer, ******* up the fluidity of the motion.

The problem with my case is that the LCM of the DOS framerates is over 30,000. I can't capture at that rate.

Does anyone have a formula to find a non-exact but very close LCM that won't exceed 200-300 and won't make the timings of the new VFR timecodes too erratic?

29.97 and 50 is an even better example. The LCM is 149,850 fps. Damn.