Log in

View Full Version : LSFmod error - Python exception: No attribute with the name focus2 exists.


hydra3333
1st August 2016, 09:04
Hello. Just starting to learn to use vapoursynth and have come across an error I don't know how to resolve it.

I installed embedded python and portable VapourSynth per http://www.vapoursynth.com/doc/installation.html#windows-portable-instructions and it works, sort of:
import vapoursynth as vs
import havsfunc as haf # http://forum.doom9.org/showthread.php?t=166582
import mvsfunc as mvs # http://forum.doom9.org/showthread.php?t=172564
core = vs.get_core(accept_lowercase=True) # leave off threads=8 so it auto-detects threads
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\AddGrain.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\d2vsource.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\Deblock.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\DFTTest.dll') # the r'' indicates do not treat special characters and accept backslashes
##core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\ffms2.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\fmtconv.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\KNLMeansCL.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\libawarpsharp2.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\libmvtools.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\libnnedi3.dll') # the r'' indicates do not treat special characters and accept backslashes
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\scenechange.dll') # http://forum.doom9.org/showthread.php?t=166769
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\vsdctfilter.dll') # http://vfrmaniac.fushizen.eu/works
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\vsfft3dfilter.dll') # http://vfrmaniac.fushizen.eu/works
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\Yadifmod.dll') # the r'' indicates do not treat special characters and accept backslashes
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\DGIndex\DGDecodeNV.dll')
video = core.avs.DGSource(r'T:\HDTV\WDTVlive\MP4-VS\1\TEST1.dgi')
video = core.std.Trim(video,first=10,length=25)
# yes yes i know it is interlaced, just for testing that plugins exist etc, do a quick and nasty if we have not done QTGMC
video = core.std.SeparateFields(video, tff=True)
#video = haf.LSFmod(video, Smode=1, strength=100)
video = haf.Weave(video, tff=True)
video = mvs.AssumeTFF(video)
video.set_output()
yields this:"C:\SOFTWARE\Vapoursynth\VSPipe.exe" --info ".\z.vpy" -
Width: 720
Height: 576
Frames: 25
FPS: 25/1 (25.000 fps)
Format Name: YUV420P8
Color Family: YUV
Bits: 8
SubSampling W: 1
SubSampling H: 1
However when I un-comment the LSFmod line, it yields an error:
"C:\SOFTWARE\Vapoursynth\VSPipe.exe" --info ".\z.vpy" -
Script evaluation failed:
Python exception: No attribute with the name focus2 exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src\cython\vapoursynth.c:26897)
File ".\z.vpy", line 24, in <module>
video = haf.LSFmod(video, Smode=1, strength=100)
File "C:\SOFTWARE\Vapoursynth\havsfunc.py", line 4093, in LSFmod
diff = core.std.Expr([diff, TemporalSoften(diff, 1, 255 << shift, 0, 32 << shift, 2)],
File "C:\SOFTWARE\Vapoursynth\havsfunc.py", line 4331, in TemporalSoften
return core.focus2.TemporalSoften2(clip, radius, luma_threshold, chroma_threshold, scenechange)
File "src\cython\vapoursynth.pyx", line 1105, in vapoursynth.Core.__getattr__ (src\cython\vapoursynth.c:20791)
AttributeError: No attribute with the name focus2 exists. Did you mistype a plugin namespace?
What am I missing ?

feisty2
1st August 2016, 09:10
core.focus2.TemporalSoften2 -> core.focus.TemporalSoften

hydra3333
1st August 2016, 09:16
Never mind; I RTFM, extracted the 2 extra files into the right places, and added
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth\vapoursynth32\plugins\dll-to-choose-from\temporalsoften2.dll')

It works now.

hydra3333
1st August 2016, 09:17
core.focus2.TemporalSoften2 -> core.focus.TemporalSoften

Thanks, you posted just as I fixed it :)

feisty2
1st August 2016, 09:23
temporalsoften2.dll? what's that?
why not just pick the one that comes with the installer?

hydra3333
1st August 2016, 09:31
I installed embedded python and portable VapourSynth and yes the standard temporalsoften.dll came with it.

Unfortunately the latest version of LSFmod in havsfunc from http://forum.doom9.org/showthread.php?p=1603176 and https://github.com/HomeOfVapourSynthEvolution/havsfunc crashes for me without TemporalSoften2.

I sourced it from http://forum.doom9.org/showthread.php?t=166769 scenechange-0.2.0-2.7z which contains it.

I didn't want to edit havsfunc.py, so I extracted and copied and loaded the plugin and LSFmod works.

Have I done something wrong ? Is there a better way ?

feisty2
1st August 2016, 09:40
Have I done something wrong ?

no, but better off just take the installer one, it might feature floating point support and SpatialSoften in future releases

hydra3333
1st August 2016, 09:57
OK, yes I'll try to edit havsfunc.py to use the standard temporalsoften and call it, say, havsfuncTS.py.

Although LSFmod appears to work with TemporalSoften2, when I attempt to use havsfunc's QTGMC it just comes up with a windows dialog box "VSPipe has stopped working" and no other message/info at all.
video = haf.QTGMC(video, TFF=True, Preset="Very Slow", Sharpness=1.2, SLMode=2, EZKeepGrain=1.2, NoiseProcess=2)

So, I'll make the edit and try that.

Than you.

feisty2
2nd August 2016, 04:49
Something runs at 300+ fps will definitely never be the bottleneck, you'll end up with the same performance for some actual bottleneck elsewhere like mvtools or nnedi or eedi..