Skip to content

FFMetrics

currentMigrated from docs/utilities/FFMetrics.mdx at 37c3317fd058; modified for Encode Wiki · CC BY-SA 4.0

Visualizes Video Quality Metrics (PSNR, SSIM, XPSNR & VMAF) calculated by ffmpeg.exe

Latest release
v1.7.0
Last commit
Stars
1,034

FFMetrics is a free Windows program by fifonik that runs FFmpeg’s quality metrics, PSNR, SSIM, VMAF and XPSNR, for one reference and up to 24 encodes in one go, and draws interactive per-frame graphs. It saves you writing FFmpeg commands and makes it easy to see where in a clip each encode drops.

It only offers FFmpeg’s metrics. PSNR, SSIM and VMAF are weak judges for comparing encoders or psychovisual settings, and XPSNR is the most useful of the four. For SSIMULACRA2, Butteraugli and CVVDP, use Vship, whose FFVship tool can also draw per-frame graphs. Either way, look at the frames the graph points to; see Compare encoding quality.

  1. Download the latest release from GitHub (stable 1.7.0, or 1.8.0 beta 2) and unpack it.
  2. Put ffmpeg.exe (and its DLLs, for a shared build) in the program folder or on your PATH.
  3. For VMAF, the FFmpeg build needs libvmaf. FFMetrics uses the models built into recent libvmaf, or JSON/PKL model files in its vmaf-models subfolder; the archive includes the common ones.

It needs .NET Framework 4.8, which Windows 10 1903 and later already include. The repository has no licence file; the author describes the program as free, with no registration or tracking.

Drag the reference file onto the Reference field and the encodes onto the file list, tick the metrics you want, and click Start. The graphs update while FFmpeg runs and can be zoomed, panned and saved as PNG or SVG. You can also:

  • analyse only part of the files;
  • save “bad” frames as PNG images to look at;
  • export per-frame values and summary results as tab-separated CSV files;
  • log the FFmpeg commands it runs, which helps when a result looks wrong.

FFMetrics picks a VMAF model from the reference’s resolution and, by default, scales both inputs to the model’s resolution when they differ from it by more than 10%; with that turned off it scales the encode to the reference’s size. Both can be changed in the VMAF options.

Keep colour range and tags consistent. If the files differ in colour range, or carry wrong range metadata, FFmpeg’s automatic conversion can give incorrect results. The 1.8.0 betas add a pixel format control for the conversion applied before measuring.

FFMetrics.exe [options] reference.mp4 encode1.mp4 [encode2.mp4 ...]
OptionEffect
-metric=PSNR|SSIM|VMAF|XPSNRMetric to calculate; repeat for several
-run, -exitStart immediately; quit when finished
-skip=<s>, -duration=<s>Analyse only part of the video
-log-framesSave per-frame values as CSV
-log-commandsLog the FFmpeg commands used
-vmaf-model=<name>VMAF model, e.g. vmaf_v0.6.1neg
-vmaf-scale-to-model=0Don’t scale to the model’s resolution
-scaling-method=<method>Scaler for resizing (default BICUBIC)

For example, to score two encodes with XPSNR (1.8.0 beta) and NEG VMAF and save per-frame CSVs:

FFMetrics.exe -log-frames -metric=XPSNR -metric=VMAF -vmaf-model=vmaf_v0.6.1neg -run reference.mp4 encode1.mp4 encode2.mp4