Log in

View Full Version : Avisynth+


vinnytx
9th September 2015, 17:23
Hi,

I'd like to translate this Avisynth script to Avisynth+

SetMemoryMax(512)
SetMTMode(3,8)
ffdshow_source()
SetMTMode(2)
dispWidth = 1920
dispHeight = 1080
mWidth = float(last.width)
mHeight = float(last.height)
ratio = (mWidth/mHeight)
newHeight= round((dispWidth/ratio)/2)*2
newHeight > dispHeight ? Eval("""
newHeight=dispHeight
newWidth=round((newHeight*ratio)/2)*2
""") : Eval("""
newWidth=dispWidth
""")
spline64resize(newWidth,newHeight)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : las

but I have an error on SetMTMode instruction, so I replaced it with SetFilterMTMode but again I have an error message on SetFilterMTMode

Groucho2004
9th September 2015, 17:31
I have an error message on SetFilterMTMode
What is the error message? Also, post your modified script.

Edit: Why do you need to multi-thread that script? It's pretty fast single threaded.

vinnytx
9th September 2015, 17:59
Script error: There is no function named 'SetMTMode' (ffdshow_filter_avisynth_script, line 7)
and
Script error: There is no function named 'SetFilterMTMode' (ffdshow_filter_avisynth_script, line 7)

my modded script is

SetMemoryMax(512)
SetFilterMTMode(3)
ffdshow_source()
Prefetch(8)
SetFilterMTMode(2)
dispWidth = 1920
dispHeight = 1080
mWidth = float(last.width)
mHeight = float(last.height)
ratio = (mWidth/mHeight)
newHeight= round((dispWidth/ratio)/2)*2
newHeight > dispHeight ? Eval("""
newHeight=dispHeight
newWidth=round((newHeight*ratio)/2)*2
""") : Eval("""
newWidth=dispWidth
""")
spline64resize(newWidth,newHeight)
Prefetch(8)
SetFilterMTMode(1)
GetMTMode(false) > 0 ? distributor() : las
Prefetch(8)


I hope Avisynth+ uses less cpu than Avisynth MT

Groucho2004
9th September 2015, 18:08
Script error: There is no function named 'SetMTMode' (ffdshow_filter_avisynth_script, line 7)
and
Script error: There is no function named 'SetFilterMTMode' (ffdshow_filter_avisynth_script, line 7)
Create a simple script with just "version()". Open it in a media player and tell us what it reads.

vinnytx
9th September 2015, 18:25
http://i.imgur.com/nf8G9y9.jpg

Groucho2004
9th September 2015, 18:33
AVS+ r1576 does not support MT. You'll have to upgrade to a more recent version. However, AVS+ MT is not very stable, it might be rather frustrating to get this to work and you're probably better off staying with SEt's MT for the time being.
Again, with your particular script I don't think MT is necessary ... but whatever floats your boat.

vinnytx
9th September 2015, 19:19
I thought I downloaded the latest version from official website. I searched on google but I didn't find a newer one.
Please, post the link for MT version of Avisynth+

sl1pkn07
9th September 2015, 19:20
http://avisynth.nl/index.php/AviSynth%2B#Latest_Release

vinnytx
9th September 2015, 20:55
Thank you all,
i tested r1779 and I can't hear audio on Zoom Player but in PotPlayer it is ok, on the contrary my cpu was able to load SuperResolution plugin.
With AviSynth+ r1825 I have the same problem with Zoom Player and a crash with PotPlayer