From-scratch MS-SSIM calculator

A dependency-light Python script that computes MS-SSIM between two image or frame files from first principles. It prints the per-scale contrast x structure (cs) terms across all five scales, the luminance term at the coarsest scale, the calibrated weights, and the final weighted product, alongside the single-scale SSIM for comparison. Includes a --demo mode (fine-grain-noise case), an explicit minimum-size fallback that renormalizes the weights, and the equivalent FFmpeg/libvmaf float_ms_ssim co

Download free PDF
Book cover: Video Streaming, Volume 3 of the Fora Soft Video Engineering HandbookBook cover: Video Encoding, Volume 1 of the Fora Soft Video Engineering HandbookBook cover: AI for Video, Volume 6 of the Fora Soft Video Engineering Handbook

The handbook · 7 volumes

Fora Soft Video Engineering Handbook

This from-scratch MS-SSIM calculator prints the per-scale contrast and structure terms, the luminance term and the weights, so you can see exactly where the final score comes from. Our seven-volume handbook covers the video stack end to end; start with Volume 1 on quality metrics, pixels and color, then Volume 6 on AI models and Volume 3 on QoE monitoring. Written by Nikolay Sapunov, CEO at Fora Soft.

Browse the handbook on Amazon →7 volumes · 9,000+ pages · Kindle & paperback

Unsure why MS-SSIM and SSIM disagree on your encodes?

Send us the clips and scores, and we will explain the gap scale by scale and recommend which metric your encoding decisions should rely on. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →