FFmpeg 4.3.8
Since* 3.4
#

Obtain the VMAF (Video Multi-Method Assessment Fusion) score between two input videos.

The obtained VMAF score is printed through the logging system.

It requires Netflix’s vmaf library (libvmaf) as a pre-requisite. After installing the library it can be enabled using: ./configure --enable-libvmaf --enable-version3. If no model path is specified it uses the default model: vmaf_v0.6.1.pkl.

The filter has following options:

model_path

Set the model path which is to be used for SVM. Default value: "/usr/local/share/model/vmaf_v0.6.1.pkl"

log_path

Set the file path to be used to store logs.

log_fmt

Set the format of the log file (xml or json).

enable_transform

This option can enable/disable the score_transform applied to the final predicted VMAF score, if you have specified score_transform option in the input parameter file passed to run_vmaf_training.py Default value: false

phone_model

Invokes the phone model which will generate VMAF scores higher than in the regular model, which is more suitable for laptop, TV, etc. viewing conditions. Default value: false

psnr

Enables computing psnr along with vmaf. Default value: false

ssim

Enables computing ssim along with vmaf. Default value: false

ms_ssim

Enables computing ms_ssim along with vmaf. Default value: false

pool

Set the pool method to be used for computing vmaf. Options are min, harmonic_mean or mean (default).

n_threads

Set number of threads to be used when computing vmaf. Default value: 0, which makes use of all available logical processors.

n_subsample

Set interval for frame subsampling used when computing vmaf. Default value: 1

enable_conf_interval

Enables confidence interval. Default value: false

This filter also supports the framesync options.

#

Examples

  • On the below examples the input file main.mpg being processed is compared with the reference file ref.mpg.

    ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf -f null -
  • Example with options:

    ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="psnr=1:log_fmt=json" -f null -
  • Example with options and different containers:

    ffmpeg -i main.mpg -i ref.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf=psnr=1:log_fmt=json" -f null -