I am working with Video comparison using FFmpeg on Java. I have videos name “video1 and Video2”. I can find the difference between two video using FFmpeg.
It shows the result Video with difference. But here I want to find how many percent (IE: 20%) Video1 different from Video2. How to achieve this?
If just file comparison, lots of tools can do that.
If video content comparison, you need to scale the 2 videos to the same width & height and calculate SSIM of each pair of frames. SSIM is short for “Structural similarity”, which is a float number between 0 and 1, where 1 stands for totally the same and 0 the opposite.
FFMPEG has a SSIM Filter to do what I just said. It would give you a text file containing SSIM comparison of all frames. Then your program can parse this file and get what you want.