I'm working with footage from a arcade game that runs slightly slower than NTSC framerate, however the capture device has duplicated frames (approximately 1 in 24 though not 100% predictable) to bring the video up to NTSC framerate. I would like the final video to run smoothly at the original framerate. I am using ffmpeg. By default it would drop every 24th frame, but there is no guarantee that would be the one which has been duplicated. I would like it to drop instead the frame most similar to the previous frame in each set of 24 frames.
I know I can do something like this by having it output each frame as an image file, and using mpdecimate with logging and then writing a program to parse the output and remove the most similar frame and then using ffmpeg to reassemble the frames into a video again. But of course that takes a lot of disk space and reduces quality of the video. Is there one command line I can use to have ffmpeg do it all at once?