AssertionError about Vmaf in Windows10
zzq0516 opened this issue · comments
zzq0516 commented
I used this https://github.com/Netflix/vmaf/blob/master/resource/doc/windows.md way to bulid projects in windows system,but when i run run_vmaf.py it gave me a error about AssertionError,can you tell me some wrong with this.
Nil Fons Miret commented
Hi,
I don't have access to a Windows system at the moment, but taking a look at the meson documentation and trying it out on my Mac, I have found the following:
- The following instruction in our Windows docs seems wrong - the order of the arguments should be
meson setup builddir srcdir
, but we are passing them asmeson setup srcdir builddir
. However, trying it out on my system, Meson is smart enough to understand which one is the srcdir, so I don't think this is causing your problem. - The
meson install -C libvmaf/build
is going to install VMAF at the path provided with--prefix
earlier. Therun_vmaf.py
script expects an installed VMAF atlibvmaf/build/tools/vmaf
. I see two possible fixes:
a) If you have access toninja
, you can runninja -vC libvmaf/build
, and that will generate the build files in the right location.
b) Otherwise, you can create a file inpython/vmaf/externals.py
and specify the path to your VMAF executable like this:
VMAFEXEC_PATH = '<path to your executable>'
The following commands worked on my system without using ninja:
# Here, you can replace /tmp/vmaf with any absolute path you like
meson setup libvmaf/build libvmaf -Denable_float=true --prefix /tmp/vmaf
meson install -C libvmaf/build
# Replace /tmp/vmaf with whatever path you used earlier
echo "VMAFEXEC_PATH = '/tmp/vmaf/bin/vmaf'" > python/vmaf/externals.py
# Run the run_vmaf.py script
PYTHONPATH=python ./python/vmaf/script/run_vmaf.py \
yuv420p 576 324 \
src01_hrc00_576x324.yuv \
src01_hrc01_576x324.yuv \
--out-fmt json
Nil Fons Miret commented
Closing as inactive, please reopen if you are still having this issue.