fifonik / FFMetrics

Visualizes Video Quality Metrics (PSNR, SSIM & VMAF) calculated by ffmpeg.exe
562 stars 22 forks source link

FFMetrics — yet another program for video Visual Quality Metrics visualization

FFMpeg can be used for calculating different visual quality metrics (PSNR, SSIM, VMAF). FFMetrics is a FFMpeg GUI that purpose is to visualize quality metrics calculated by FFMpeg. The program allows you to select files without dealing with command line, calculate & visualize PSNR, SSIM & VMAF quality metrics for all of them in one go.

Well, and build shiny interactive graphs of course:

Features

Latest version:

Requirements

How to use

How to run with command line options

FFMetrics.exe [options] ref.mp4 file1.mp4 [file2.mp4] [file3.mp4] [...]

Accepted options

-auto-save-results                     After calculation save results to log
-auto-save-results-file=C:\path\file.csv
-duration=<seconds>                    Duration of video stream to be processed
                                       Default: 0 (whole stream used)
-log-commands                          Log ffmpeg commands
-log-frames                            Log frames' metrics in csv files
-log-frames-dir=C:\path\               Folder where frame's metrics will be stored
-log-level=DEBUG|ERROR|INFO            Default: INFO
-metric=PSNR|SSIM|VMAF                 Default: all (-metric=PSNR -metric=SSIM -metric=VMAF)
-plot-update-speed=HIGH|NORMAL|LOW|OFF Plots update frequency
                                       Default: NORMAL
-plot-window-manual                    Do not open plot window automatically when starting calculation
-project=C:\path\to\project.ffmproj    Read project options from specified file
-run                                   Run calculation when program started
-scaling-method=NEIGHBOR|GAUSS|BILINEAR|BICUBIC|LANCZOS|SINC|SPLINE
                                       Default: BICUBIC
-skip=<seconds>                        Duration of video stream to be skipped
                                       Default: 0 (stream processed from the beginning)
-temp-dir=dirspec                      Default: default user temporary directory
-vmaf-model=filename                   Default: detected automatically based on reference media info
-vmaf-phone-model
-vmaf-pool=MEAN|HARMONIC_MEAN          Default: MEAN
-vmaf-subsample=<value>                1 means VMAF metric for every frame to be calculated
                                       2 means VMAF metric for every 2nd frame to be calculated
                                       And so on
                                       Default: 1

All options can be provided using single leading dash (-option) or double leading dash (--option).

Examples

FFMetrics.exe \\server\path\to\ref.mp4 "c:\path\to\my file.mp4"
FFMetrics.exe -log-frames -metric=SSIM -metric=VMAF -run c:\to\ref.mp4 c:\to1\file1.avi c:\to2\file2.avs
FFMetrics.exe -project=c:\path\to\project.ffmproj -vmaf-model=vmaf_v0.6.1neg -vmaf-pool=harmonic_mean -run

Limitations

Troubleshooting

Common issues

  1. “Start” button disabled
    • No FFMpeg.exe found;
    • No reference file added, reference file does not exist (red file name) or program is unable to get file's media info;
    • No distorted file added, distorted file does not exist (red file name), program unable to get file's media info or no active distorted files (files with checkbox on the left of the file name ticked);
    • No metrics selected.
  2. VMAF checkbox disabled
    • FFMpeg.exe does not support VMAF. Download newer version, make sure it supports VMAF.
    • No vmaf-models folder with supported models in it. FFMpeg might support pkl model but there are only json models in the folder or visa versa.
    • Program path contains non-English characters. FFMetrics itself should not have issues with non-English characters in paths, but FFMpeg.exe could fail while trying to open VMAF model file during FFMpeg feature-detection startup process.
  3. Error while calculating VMAF metric
    • Invalid VMAF model file. The first thing that you should check if you downloaded models on you own. Model file must be less than 30KB and should not contain HTML in it.
  4. I'm trying to calculate VMAF metric comparing the file with itself and not getting score 100.

Author

fifonik

ko-fi

Discussions