Duplicate Frame Detection

Originally requested here: https://community.topazlabs.com/t/video-enhance-ai-feature-requests/20542/122?u=shikuteshi

You could read the original request but I think I’ve come up with a more efficient idea.
Duplicate frames are a huge waste of time to process. It’s sometimes worth the effort to manually identify which parts of a video have a still frame for a few seconds and not have VEAI process them by manually setting fixed ranges.

But I feel this could simply be automated by having VEAI always remember the original frame it just worked on and compare it to the next one it’s about to work on.
If it’s an exact 1:1 match then simply skip the frame and make a copy of the first one it just worked with to take its place. It would use this same first image for the following frames until it comes across one that’s no longer a 1:1 match and then continue as usual by forgetting the previous one and picking up this new one to remember.
As per the original post, it wouldn’t be a bad idea to have this done as a pre-processing step.
But all of that would be optional since only specific types of media would benefit. And it would be a waste of processing time for live action videos or videos with grain.

If there is the potential to add some user defined settings then that would be very nice. Like looking for a certain VMAF, SSIM, or PSNR range since one could be trying to combat compression differences.

Remember that noise or/and compression artifacts can mislead duplicate frame detection and if the threshols is set too high then non duplicates can be wrongly tagged as duplicates.
But if it’s a regular pattern things can be much easier by just tell the software what the pattern is.
The nightmare is random duplicates that is often seen when converting VFR videos to CFR.