The VMAF quality metric

My main project currently is about improving certain points of the x265 implementation of the HEVC encoder.
Therefore, quality metrics are particularly important (and even more given that my improvements target only constant bitrate mode).
After reading this article from Netflix's techblog about their new VMAF quality metric, I decided to give it a try.

The great thing is that, thanks to Leandro Moreira (who actually recently wrote a nice article article about video quality metrics), there is a Dockerfile for the project.

However, the Dockerfile installs dependencies for each and every one feature of the project, resulting in a Docker image of over 3GB.
With the help of my one-liner to get the download size of a package prior to downloading it published recently, I could identify which packages take most of the space (namely python-pandas and python-sympy).

So I created a new version of the Docker image, which packs only the stuff necessary to compute the VMAF. It now weighs around 1GB and you can find on Docker hub at this address! 🎉

Use it in your Travis CI pipeline

You can use my lighter VMAF image in your Travis CI pipeline by applying the following steps:

  1. Enable Docker in your Travis build, by adding those lines to your Docker file (see the docs for more details)

    sudo: required
    services:
      - docker
    
  2. Pull the VMAF Docker image in the before_install or install step

    before_install:
      - docker pull nonatomiclabs/vmaf:1.0
    
  3. Run the Docker image

    docker run --rm -v /folder/with/video/resources:/tmp nonatomiclabs/vmaf:1.0 run_vmaf yuv420p 1920x1080 /tmp/ref.yuv /tmp/comp.yuv --out-fmt json
    

Enjoy!