Can someone help me to install the netflix's VMAF library in Ubuntu

Viewed 4044

First of all, I have to say that I am not very experienced in ubuntu. I would like to install this library to use with FFMPEG.

I am following these steps, but I can manage to install it well...

https://github.com/Netflix/vmaf/blob/master/resource/doc/VMAF_Python_library.md

Could someone tell me what are the exact steps (commands) that I have to follow.

On the other hand, someone knows if there are other metrics that can ffmpeg calculates directly (apart from PSNR or SSIM)?

Many thanks

3 Answers

The link you provided is just to install the VMAF python library. To use VMAF with ffmpeg you need to install libvmaf first and then compile ffmpeg with libvmaf filter enabled. However, as one user suggests, you can use already compiled ffmpeg packages https://www.johnvansickle.com/ffmpeg/

Moving to your questions. These are the step by step I followed to install FFmpeg+VMAF over an Ubuntu 20.04:

Installing dependencies:

apt update -qq
apt install pkg-config -y
apt-get install --no-install-recommends\
    ninja-build \
    python3 \
    python3-pip \
    python3-setuptools \
    python3-wheel \
    ninja-build \
    wget \
    doxygen \
    autoconf \
    automake \
    cmake \
    g++ \
    gcc \
    pkg-config \
    make \
    nasm \
    yasm -y
pip3 install --user meson

Installing libvmaf:

export PATH="$PATH:$HOME/.local/bin"
wget https://github.com/Netflix/vmaf/archive/v1.5.1.tar.gz
tar -xzf  v1.5.1.tar.gz
cd vmaf-1.5.1/libvmaf/
meson build --buildtype release
ninja -vC build
ninja -vC build test
ninja -vC build install

Installing ffmpeg:

wget https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2 && tar xjf ffmpeg-4.2.2.tar.bz2 
cd ffmpeg-4.2.2
./configure --enable-libvmaf --enable-version3
make
make install

Sometimes, depending on your OS, you also need to setup your $PATH, $LD_LIBRARY_PATH, $PKG_CONFIG_PATH.

Here is a detailed guide on OTTVerse for compiling and installing FFmpeg with VMAF support on Ubuntu 18.04. It shouldn't take you more than a few minutes.

Be aware, that VMAF's libvmaf library will soon be dropped and replaced with a new library called libvmaf_rc. Hopefully, its compilation with FFmpeg will remain smooth as well.

Related