1

I downloaded a bunch of photos and movie files from my iPhone into a folder on my PC. Then I redownloaded them to a different folder on my PC. Then I diffed the 2 folders, and some of the photos and movie files have differences. I want to make sure the only differences are in the metadata, and that the photo data and movie data are still the same.

I know I can use the compare command in ImageMagick to determine if any pixels are different between 2 images.

Is there any command line software that can compare 2 video files (specifically .MOV files) and tell me if the video data is exactly the same? This software must run on Windows and preferably be free.

I know that FFmpeg can calculate an MD5 for a video file, but that results in different MD5 values for 2 different copies of the same video file (unedited on my iPhone, but transferred to my PC on different days which somehow resulted in the internal data being different).

1 Answer 1

1

ffmpeg is an example of a popular tool that can compare video frames.

It implements multiple algorithms that can do that:

  • SSIM (Structural Similarity Metric) - it compares sources and results in a value between 0 and 1. Sources need to have the same number of frames, resolution and pixel format for the result to be accurate
  • PSNR (Peak Signal to Noise Ratio) - compares sources and measures difference in dB. Same requirements as above.

Example command from the docs that uses both SSIM and PSNR:

ffmpeg -i input.mp4 -i input2.mp4 -lavfi "ssim;[0:v][1:v]psnr" -f null -

You can parse the output of that, which looks like this for the same video:

[Parsed_ssim_0 @ 000002c88edeedc0] SSIM R:1.000000 (inf) G:1.000000 (inf) B:1.000000 (inf) All:1.000000 (inf)
[Parsed_psnr_1 @ 000002c88edeeec0] PSNR r:inf g:inf b:inf average:inf min:inf max:inf

and extract inf if the videos are the same.

There's also VMAF (Video Multi-Method Assessment Fusion) as a more robust tool with additional options, but that ma be not included in some builds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.