<p>VMAF have changed their API yet again. Compile against 1.3.4.</p>

CC BY-SA 4.0
2018-06-20T12:50:21.540Z
I confirm that ffmpeg 4.0 and even the latest nightly are compatible only with VMAF VDK v. 1.3.4 or lower. I have opened a ticket in the ffmpeg bug tracker and also with VMAF.
Georgi Stoyanov
CC BY-SA 4.0
2018-06-18T16:23:19.417Z
2018-06-18T16:23:19.417Z
Gyan
<p>I am trying to compare two videos using the libvmaf in ffmpeg 4.0. I have compiled and installed from source VMAF and FFMPEG and FFMPEG has built-in support for <code>libvmaf</code>. That's the ffmpeg configuration: </p>

<pre><code>$ ffmpeg -version
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --pkg-config-flags=--static --extra-libs='-lpthread -lm' --toolchain=hardened --enable-gpl --enable-nonfree --enable-version3 --disable-stripping --enable-avisynth --enable-libass --enable-libfontconfig --enable-libfreetype --enable-libvmaf --enable-libfribidi --enable-libgme --enable-libgsm --enable-librubberband --enable-libshine --enable-libsnappy --enable-libssh --enable-libtwolame --enable-libwavpack --enable-libzvbi --enable-openal --enable-sdl2 --enable-libdrm --enable-frei0r --enable-ladspa --enable-libpulse --enable-libsoxr --enable-libspeex --enable-avfilter --enable-postproc --enable-pthreads --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-ffplay --enable-libopenjpeg --enable-libsrt --enable-libwebp --enable-libxvid --enable-libvidstab --enable-libopenh264 --enable-zlib --enable-openssl
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100
</code></pre>

<p>My VMAF is version: </p>

<pre><code>VMAF Development Kit (VDK) Version 1.3.5
VMAF Version 0.6.3
</code></pre>

<p>When I try to run the VMAF on both files using the following command I get a segmentation fault error and error about unknown format and segmentation fault. The syntax of my command is the following: 
<code>
ffmpeg -i distorted.nut -i reference.nut -lavfi libvmaf -f null -
</code>
The NUT files in this case are both in raw format. I have tried to convert the nut to mp4 using <code>libx264</code> but the result was exactly the same. I have uploaded the log file to <a href="https://we.tl/gUNY9Adoky" rel="nofollow noreferrer">wetransfer_link</a> with the debug information. </p>

<p>If I run the VMAF manually from the VMAF install directory I got the results: </p>

<pre><code>./run_vmaf yuv420p 1280 720 reference.nut distorted.nut --out-fmt json
</code></pre>

<p>This is the aggregated VMAF score: </p>

<pre><code>"aggregate": {
        "VMAF_feature_adm2_score": 0.989985319391465,
        "VMAF_feature_motion2_score": 12.065062245699426,
        "VMAF_feature_vif_scale0_score": 0.6955497705160056,
        "VMAF_feature_vif_scale1_score": 0.956442334512976,
        "VMAF_feature_vif_scale2_score": 0.9785004960696057,
        "VMAF_feature_vif_scale3_score": 0.9873306412919364,
        "VMAF_score": 99.37877231666236,
        "method": "mean"
    }
</code></pre>

<p>I have checked and the library header <code>libvmaf.h</code> is under <code>/usr/local/include</code>, the library <code>libvmaf.a</code> under <code>/user/local/lib</code> and all the model files under <code>/usr/local/share</code>, so everything looks OK. </p>

<video><ffmpeg><video-quality>
FFMPEG LIBVMAF segmentation fault
Georgi Stoyanov
# FFMPEG LIBVMAF segmentation fault

(Asked by: username_0 on 2018-06-18)

I am trying to compare two videos using the libvmaf in ffmpeg 4.0. I have compiled and installed from source VMAF and FFMPEG and FFMPEG has built-in support for libvmaf. That's the ffmpeg configuration: 
$ ffmpeg -version
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --pkg-config-flags=--static --extra-libs='-lpthread -lm' --toolchain=hardened --enable-gpl --enable-nonfree --enable-version3 --disable-stripping --enable-avisynth --enable-libass --enable-libfontconfig --enable-libfreetype --enable-libvmaf --enable-libfribidi --enable-libgme --enable-libgsm --enable-librubberband --enable-libshine --enable-libsnappy --enable-libssh --enable-libtwolame --enable-libwavpack --enable-libzvbi --enable-openal --enable-sdl2 --enable-libdrm --enable-frei0r --enable-ladspa --enable-libpulse --enable-libsoxr --enable-libspeex --enable-avfilter --enable-postproc --enable-pthreads --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-ffplay --enable-libopenjpeg --enable-libsrt --enable-libwebp --enable-libxvid --enable-libvidstab --enable-libopenh264 --enable-zlib --enable-openssl
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100

My VMAF is version: 
VMAF Development Kit (VDK) Version 1.3.5
VMAF Version 0.6.3

When I try to run the VMAF on both files using the following command I get a segmentation fault error and error about unknown format and segmentation fault. The syntax of my command is the following: 

ffmpeg -i distorted.nut -i reference.nut -lavfi libvmaf -f null -

The NUT files in this case are both in raw format. I have tried to convert the nut to mp4 using libx264 but the result was exactly the same. I have uploaded the log file to wetransfer_link with the debug information. 
If I run the VMAF manually from the VMAF install directory I got the results: 
./run_vmaf yuv420p 1280 720 reference.nut distorted.nut --out-fmt json

This is the aggregated VMAF score: 
"aggregate": {
        "VMAF_feature_adm2_score": 0.989985319391465,
        "VMAF_feature_motion2_score": 12.065062245699426,
        "VMAF_feature_vif_scale0_score": 0.6955497705160056,
        "VMAF_feature_vif_scale1_score": 0.956442334512976,
        "VMAF_feature_vif_scale2_score": 0.9785004960696057,
        "VMAF_feature_vif_scale3_score": 0.9873306412919364,
        "VMAF_score": 99.37877231666236,
        "method": "mean"
    }

I have checked and the library header libvmaf.h is under /usr/local/include, the library libvmaf.a under /user/local/lib and all the model files under /usr/local/share, so everything looks OK.

**Tags:** video, ffmpeg, video-quality


---

## 1 answers

### Answer by username_1 on 2018-06-18. Score: 2 | Accepted answer

VMAF have changed their API yet again. Compile against 1.3.4.

> **Comments:**
> **username_0**: I confirm that ffmpeg 4.0 and even the latest nightly are compatible only with VMAF VDK v. 1.3.4 or lower. I have opened a ticket in the ffmpeg bug tracker and also with VMAF.  

---

