Build Guide: FFmpeg with VMAF - dcomp-leris/CGSynth GitHub Wiki
VMAF is a perceptual video quality metric. Build and install libvmaf
and FFmpeg with VMAF support.
sudo apt update
sudo apt install -y git build-essential pkg-config libtool \
libssl-dev yasm cmake python3-venv meson ninja-build nasm \
libass-dev libfreetype6-dev libtheora-dev libvorbis-dev \
libx264-dev libx265-dev libnuma-dev
git clone https://github.com/Netflix/vmaf.git
cd vmaf
make
sudo make install
sudo ldconfig
cd ..
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-libx264 --enable-libx265 --enable-libvmaf
make -j$(nproc)
sudo make install
cd ..
ffmpeg -filters | grep vmaf
You should see lines like:
.. libvmaf VV->V Calculate the VMAF between two video streams.
.. vmafmotion V->V Calculate the VMAF Motion score.
ffmpeg -i reference.mp4 -i distorted.mp4 \
-lavfi "[0:v][1:v]libvmaf=log_path=vmaf.json:log_fmt=json" \
-f null -
Troubleshooting tips:
- If
nasm
,meson
, orninja
are missing, install them via apt. - Run
sudo ldconfig
after installing libvmaf. - Rebuild ffmpeg after installing libvmaf if it was built earlier.