How does the calculation work?
- Both files are opened in the browser’s video player to read their duration and resolution. If the resolution, aspect ratio or duration differs, you get a warning right away.
- The shorter duration is divided by the number of samples you chose, and both videos are seeked to the midpoint of each segment to pull out one frame each.
- The luma (Y) of each frame is computed. If the resolutions differ, the encoded video is drawn at the original’s size.
- PSNR is 10·log10(255² ÷ MSE), where MSE is the mean squared error between the two luma values. Higher means closer to the original.
- SSIM is the average of values obtained by sliding an 8×8 window in steps of 4 pixels and comparing the luma mean, variance and covariance of the two videos. The closer to 1, the more similar the structure.
- The values from all samples are collected into the mean, the minimum, the mean of the lowest 5%, a graph over time, and the 5 worst samples.
The mean PSNR follows the definition used in this site’s measurement articles. The PSNR in those measurements is the average of the per-frame luma PSNR, and this tool also averages the PSNR of each sample frame.
How is VMAF estimated?
The CSV behind Is PSNR 40 dB good quality? A measurement holds the PSNR and VMAF of 4 10-second 1080p25 clips, each encoded with 4 codecs (x264, x265, SVT-AV1 and VP9) at 6 CRF steps: 16 curves and 96 measurement points in all. The tool places your video’s mean PSNR on each curve and reads off VMAF by connecting the two neighboring measurement points with a straight line. Outside a curve’s range it does not extrapolate and only says “out of range.” If you pick a codec, only that codec’s curves are used; if you don’t know, all of them are.
Looking at what VMAF the same PSNR maps to on these curves shows why the estimate only comes out as a ‘range.’
| PSNR (luma) | blue_sky | pedestrian_area | riverbed | rush_hour | Lowest–highest over all curves |
|---|
| 35 dB | 93.5 | 65.4 | 85.4 | 54.1 | 53.9 ~ 93.5 (15/16 curves) |
| 38 dB | 99.2 | 84.9 | 99.8 | 73.4 | 71.0 ~ 99.8 (16/16 curves) |
| 40 dB | 100.0 | 93.9 | 99.9 | 85.5 | 83.3 ~ 100.0 (15/16 curves) |
The clip columns are the VMAF read from the x264 curve. The last column is the lowest to highest value among the curves (of 16) whose measured range contains that PSNR. All values are interpolated by connecting the psnr_y and vmaf_mean columns of the CSV with straight lines.
At the same 38 dB, VMAF spreads from 71.0 to 99.8. That is why this tool gives VMAF as a range rather than a single number: PSNR alone can’t tell how much the result differs by type of video.
How do I use the results?
- Look at the lowest 5% and the worst samples before the average. Some encodes have a fine average but drop sharply only in dark scenes or high-motion sections. Open the timestamps of the bad samples in the Video Quality Compare Slider and check with your own eyes.
- It works well for comparing two or three encodes of the same source made with different settings. A relative comparison between numbers measured the same way is more trustworthy than the absolute numbers. To look at size together with quality, use the “Size ratio” above.
- If the estimated VMAF range straddles your target (say, 90), don’t draw a conclusion; measure it yourself with FFmpeg. The VMAF Command Builder builds the command, and the VMAF Score Interpreter shows what the resulting score feels like.
- If PSNR comes out below 20 dB, suspect misaligned frames before suspecting a quality problem: you picked the wrong files, the start was trimmed, or the frame rate changed.
- If you changed the resolution when encoding, that conversion by itself lowers PSNR. The tool warns you when the resolutions differ, but read the result knowing that it measures the quality of the downscaled video “scaled back to the original size.”
Limitations worth knowing
- It is a sample, not every frame. Only the number of frames you choose (24–240) is measured, at equal intervals, and the tool doesn’t decode frame by frame with WebCodecs; it seeks the player to each timestamp and reads the picture. It can miss a bad frame that flashes by briefly, and the minimum is the ‘lowest among the samples,’ not the ‘lowest of the whole video.’
- The values are not the same as FFmpeg’s. The luma is recomputed from frames the browser converted to 8-bit RGB for display, which differs from FFmpeg working on the YUV source. It uses a simple rule: BT.709 coefficients when the height is 720 or more and BT.601 below that, which may differ from the color matrix specified in the video.
- The limited-range correction is an assumption. If the video’s luma is stored as ‘limited range’ (16–235), FFmpeg’s luma error is 219/255 of the display-range value, so the same video gets a PSNR about 1.32 dB higher (20·log10(255/219)). The tool turns this correction on by default but can’t read which range the file actually uses. Flip the switch and compare the two values.
- The VMAF estimate is only an interpolated range. The curves come from 4 videos, 4 codecs and one preset each (1080p25, 8-bit, one PC), and they do not include animation, screen recordings or dark footage. They may not fit videos at other resolutions or other VMAF models (phone, 4K, NEG). The measured PSNR was computed with libvmaf, so its calculation path differs from this tool’s PSNR, which is another source of error.
- SSIM uses luma only. It can’t see differences in the color components, and while it is similar to FFmpeg’s ssim filter, it isn’t guaranteed to give the same values. This site’s measurements contain no SSIM data, so VMAF is not estimated from SSIM.
- HDR and 10-bit video are not accurate. The tool uses frames the browser converted to 8-bit display values. Codecs the browser can’t open (HEVC, AV1 and so on) may not be readable (see Codec Support Check).
- With variable frame rate or files that start at different times, frames at the same timestamp can be different scenes. The tool matches timestamps, not frame numbers.
Learn more
Why PSNR and VMAF disagree is covered in the PSNR-VMAF measurement, how a filter that raises PSNR looks to VMAF in the sharpening, VMAF and PSNR measurement, and the bad frames an average hides in the VMAF lowest-5% measurement.