1

I'm testing ways to compare image similarity using ffmpeg. I'm looking at using SSIM, PSNR and VMAF.
For reference, I'm running the comparison with duplicated sources and expect a score of 100%.

Running SSIM like this:
ffmpeg -hide_banner -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -filter_complex "ssim" -pix_fmt yuv420p -t 1 -f null
Gives a perfect score:
[Parsed_ssim_0 @ 0x6000015844d0] SSIM Y:1.000000 (inf) U:1.000000 (inf) V:1.000000 (inf) All:1.000000 (inf)

Running PSNR like this:
ffmpeg -hide_banner -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -filter_complex "PSNR" -pix_fmt yuv420p -t 1 -f null
Gives a perfect score:
[Parsed_psnr_0 @ 0x600001478630] PSNR y:inf u:inf v:inf average:inf min:inf max:inf

Running VMAF like this:
ffmpeg -hide_banner -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -f lavfi -i color=red:duration=10:size=1280x720:rate=30 -filter_complex "libvmaf" -pix_fmt yuv420p -t 1 -f null
I get:
[Parsed_libvmaf_0 @ 0x600002c10630] VMAF score: 97.428043

Why does VMAF give less the perfect score for the duplicated inputs?
Is there a way around this?

1 Answer 1

2

Short answer: the VMAF engine isn't comparing pixel to pixel. The engine calculates some objective metrics for each stream (subject and reference); the final VMAF score then is a prediction of a machine learning model, hence the imperfect score.

Long answer: read the discussion at https://github.com/Netflix/vmaf/issues/76

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.