I've got some vhs tapes that I've captured and editing to make dvds. These tapes are very old and have some sections that the tape stuck on a few frames. I've been overlaying the previous frame and this seems to be cleaning up the jitteriness. I'm wanting to try to come up with a script in cmd or powershell to do this automatically because it's a very time consuming process frame by frame in Premiere. I'm able to export single frames in ffmpeg to png but trying to find a variable I can key of to where if the frame is X % different then I can do an if statement to use the previous frame in the export of the video. Also, is it possible to do this comparison thru logs w/o exporting each frame to png or jpg?

Or does anyone know of any products that can do this thru a GUI that are freeware or avail for purchase?