View Full Version : Avisynth VMAF measurement plugin?
FranceBB
22nd February 2019, 17:04
Hi,
I noticed that there's a Vapoursynth filter for VMAF, but I can't find an Avisynth one.
Is it me that I can't find it, or has it never been ported to Avisynth?
https://github.com/HomeOfVapourSynthEvolution/VapourSynth-VMAF/
Is there any other way I can run VMAF tests?
I read that ffmpeg can actually do it, but I can't find a build that has been compiled with libvmaf.
https://forum.doom9.org/showthread.php?t=174967
I would rather not install VapourSynth only to run VMAF tests.
Thank you in advance,
Frank.
ChaosKing
22nd February 2019, 17:29
It was never ported to avs. You can use my VapourSynth portable fatpack if you want to try it https://forum.doom9.org/showthread.php?t=175529
Or just download the portable version from the vapoursynth homepage (no python and plugins included)
FranceBB
23rd February 2019, 18:04
Got it.
I guess I'm gonna have to try to use VapourSynth then.
WorBry
24th February 2019, 03:39
Yes, it would be nice to have an AVISynth port of the VMAF plugin - I guess it would take someone with a vested interest for that to happen.
I've just switched from installed VapourSynth to ChaosKing's Fatpack portable version on Win10 x64 and I'm liking it a lot.
Just put the VMAF.dll and associated 'Model' folder in the Plugins folder and you're good to go. I've been using VSEditor>Benchmark (F7) to run the scripts and generate the VMAF results files. You'd need to make a registry edit in order to open the vs scripts in VirtualDub2:
https://forum.doom9.org/showthread.php?p=1864051#post1864051
FranceBB
24th February 2019, 22:16
Yes, it would be nice to have an AVISynth port of the VMAF plugin - I guess it would take someone with a vested interest for that to happen.
I've just switched from installed VapourSynth to ChaosKing's Fatpack portable version on Win10 x64 and I'm liking it a lot.
Just put the VMAF.dll and associated 'Model' folder in the Plugins folder and you're good to go. I've been using VSEditor>Benchmark (F7) to run the scripts and generate the VMAF results files. You'd need to make a registry edit in order to open the vs scripts in VirtualDub2:
https://forum.doom9.org/showthread.php?p=1864051#post1864051
I see...
I've never used VapourSynth to be fair, so this is gonna be the very first time.
I read the documentation and it seems to be written in Python.
How about the internal syntax? Is it different from the Avisynth one?
from vapoursynth import core
video = core.ffms2.Source(source='video.mkv')
video.set_output()
I'm not that familiar with Python, but does the internal syntax look like python?
Anyway, I still think that Avisynth is actually more intuitive and easier:
FFMpegSource2("video.mkv", atrack=-1)
As to the VMAF plugin, it's the very first time that I write a VapourSynth script; is this code right?
import vapoursynth as vs
core = vs.get_core()
original = core.ffms2.Source(source='master.mxf')
encoded = core.ffms2.Source(source='encode1.ts')
result = core.vmaf.VMAF(original, encoded, model=1, log_path=r"\\Share\vmaf_encode1.txt", log_fmt=1, pool=1, ci=True)
result.set_output ()
This is supposed to index my AppleProRes masterfile, my H.264 encode for distribution and save the logs in "vmaf_encode1.txt", right?
Thank you in advance,
Frank.
ChaosKing
24th February 2019, 22:31
Looks good to me.
VS is written in c++ but uses python as the "video script language"
In case you missed it: the r"" stands for raw string and is usefull if you use windows file paths. Path examples here:
http://www.vapoursynth.com/doc/functions/loadplugin.html
WorBry
25th February 2019, 17:42
import vapoursynth as vs
core = vs.get_core()
original = core.ffms2.Source(source='master.mxf')
encoded = core.ffms2.Source(source='encode1.ts')
result = core.vmaf.VMAF(original, encoded, model=1, log_path=r"\\Share\vmaf_encode1.txt", log_fmt=1, pool=1, ci=True)
result.set_output ()
Just a note on ci=True. Presently VapourSynth-VMAF version r3 (which uses libvmaf v1.3.13) only generates the per-frame ci95_high, ci95_low and stddev values:
https://forum.doom9.org/showthread.php?p=1865358#post1865358
There is a commit to report aggregate CI scores as well:
https://github.com/Netflix/vmaf/pull/304
So hopefully this will be in the next release.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.