Skip to content

SSIMULACRA2

SSIMULACRA 2 is a visual fidelity metric based on the concept of the multi-scale structural similarity index measure (MS-SSIM), computed in a perceptually relevant color space, adding two other (asymmetric) error maps, and aggregating using two different norms. It is currently the most reputable visual quality metric according to its correlation with subjective results, and is considered a very robust means of comparing encoders. It is debatable whether Butteraugli is better for very high fidelity, but SSIMULACRA 2 is considered the best for medium/low fidelity comparisons. Although it does not feature any inter-frame temporal awareness, it is still considered a very strong metric for video fidelity comparison nonetheless.

While a reference implementation by Cloudinary exists, most people will want to use the rust implementation ssimulacra2_rs.

Installing

To install ssimulacra2_rs using cargo, run this:

Terminal window
cargo install ssimulacra2_rs

Running

On Images

Comparing images is simple, run this:

Terminal window
ssimulacra2_rs image source.png distorted.png

On Videos

If you want to compare videos, run this:

Terminal window
ssimulacra2_rs video source.mkv distorted.mkv

Multithreading

Multithreading with ssimulacra2_rs works, but it scales badly. This is likely due to memory bandwidth limitations.
However, the speedup is worth it.

To run multithreaded, use the --frame-threads or -f parameters. For example, to run with 16 threads:

Terminal window
ssimulacra2_rs video source.mkv distorted.mkv -f 16

Memory limitation

If you have a small amount of system memory, you may encounter out of memory errors while running with multi-threading. If that’s the case, you need to lower the amount of threads.

Scoring

The score that ssimulacra2 outputs is simple:

  • Very high quality: 90 and above
  • High quality: 70 to 90
  • Medium quality: 50 to 70
  • Low quality: Below 50