Log in

View Full Version : Avisynth+


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [30] 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

MysteryX
24th April 2016, 06:17
It's hard to identify where the bug is coming from when there are various components linked.

I've also been getting freezes on load when loading simple AVS+ scripts without SVP, although I haven't tried this latest version but I don't think the bug has been resolved since the last stable build.

As for that thread, I refuse to go into GPL politics here.

MysteryX
24th April 2016, 07:02
OK I did some more testing. I have this script file.


P="Encoder\"
LoadPlugin(P+"LSMASHSource.dll")
LoadPlugin(P+"TimeStretch.dll")
file="INNA - Endless.mkv"
LWLibavVideoSource(file, cache=false)
AudioDub(LWLibavAudioSource(file, cache=false))
ResampleAudio(48000)
TimeStretchPlugin(pitch = 100.0 * 0.98181819915771484)


I drag/drop it into MPC-HC 1.7.9 repeatedly. It froze at the second loading. Then I killed the process and tried again, and it froze again at the 6th loading.

pinterf
24th April 2016, 07:38
Well, this is a usable report. Thank you. 32 or 64 bit?

MysteryX
24th April 2016, 08:05
32 bit.

I may have a different version of L-SMASH Source but I don't think it will change anything.

pinterf
25th April 2016, 08:05
Prefetch(100) nightly MT stress-test.
15 cycles, w/o problem

Script:
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
SetMemoryMax(6000)
Avisource("Tape02_Hi8.avi").killaudio().assumefps(25,1)
AssumeBFF()
QTGMC(Preset="Fast")
prefetch(100)


Typical output:

AVSMeter 2.2.2 (x64)
AviSynth+ 0.1 (r1849, MT-pfmod, x86_64) (0.1.0.0)

Number of frames: 278762
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 720
Frame height: 576
Framerate: 50.000 (50/1)
Colorspace: YV12

Frames processed: 278762 (0 - 278761)
FPS (min | max | average): 3.365 | 1226976 | 110.3
Memory usage (phys | virt): 4773 | 4950 MiB
Thread count: 918
CPU usage (average): 96%

Time (elapsed): 00:42:06.507

Groucho2004
25th April 2016, 08:24
Prefetch(100) nightly MT stress-test.
15 cycles, w/o problem
That's quite impressive! Nicely done.

Thread count: 918Yikes.

LigH
25th April 2016, 08:29
Avisource("Tape02_Hi8.avi").killaudio()

Maybe easier:

Avisource("Tape02_Hi8.avi", audio=false)

pinterf
25th April 2016, 13:13
OK I did some more testing. I have this script file.


P="Encoder\"
LoadPlugin(P+"LSMASHSource.dll")
LoadPlugin(P+"TimeStretch.dll")
file="INNA - Endless.mkv"
LWLibavVideoSource(file, cache=false)
AudioDub(LWLibavAudioSource(file, cache=false))
ResampleAudio(48000)
TimeStretchPlugin(pitch = 100.0 * 0.98181819915771484)


I drag/drop it into MPC-HC 1.7.9 repeatedly. It froze at the second loading. Then I killed the process and tried again, and it froze again at the 6th loading.
Tried with
- MPC-HC 32 bit 1.7.9 and 1.7.10
- TimeStretchPlugin found here:
http://avisynth.nl/index.php/TimeStretchPlugin#Audio_Filters
linked to here
http://forum.doom9.org/showpost.php?p=1722472&postcount=20
- LSMASHSource.dll
LSMASHSource-AviSynth-plugin-r859-msvc-32bit.7z
and
LSMASHSource-AviSynth-plugin-r877-msvc-32bit.7z
- Avs+ 1841 and 1849 (32 bit)

No freeze here.

Which version of LSMASHSource are you using?
Maybe you could send me the source mkv, or you can trim it if it is too large (and the trimmed version also produces the freeze)

Leinad4Mind
25th April 2016, 16:20
Hi there, I've installed avisynth+. I've windows 7 x64.
I'm trying just to do the basic of the basics. To be able to run FFVideoSource, but I got the message "There is no function".

I got here the ffms2: https://github.com/FFMS/ffms2/releases

If I use the folder plugins, and put the x86 version on it, all runs well.
BUT, if I put the x64 dll on the plugins64, it doesn't work, why? (I am trying to work with the fastest plugins, for the same results)

And I've a clean install, so if I put x86 ffms2 on plugins+, it will work too. But which is the difference between plugins and plugins+?(I presume the + will be faster?) How do I know it will work on plugins+? (just testing it?)
But for 64 bits, I am not able to put this working. If I put only the ffms2 x64 version on the plugins64 or plugins64+ it doesnt work :/
And where can I find plugins for plugins+? And for x64?

Cheers!

qyot27
25th April 2016, 16:43
plugins+ is intended to be for AviSynth+-specific plugins. Currently, there really aren't any because the AviSynth+ API hasn't matured yet and developing plugins against it is still officially discouraged. The plugins built from the AviSynth+ source code are a plausible set to place there, but in the end it really doesn't matter - the reason for the directory separation was for cleanliness (because unlike classic AviSynth, avsplus can use multiple plugin directories), not for some magical purpose.

Leinad4Mind
25th April 2016, 16:49
I see. So we just have the basics plugins that comes with the installer and thats it.
But why does my x64 folder not work? Do I need to do something special?

If I try to "LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\ffms2.dll")" it gaves me error "Cannot load file" -.-

What da hell I'm missing...

pinterf
25th April 2016, 16:54
For x64 plugins you can find a nice collection here:
http://avisynth.nl/index.php/AviSynth%2B#AviSynth.2B_x64_plugins

For exploring dll locations, run avsmeter64 -avsinfo
PluginDir2_5 will tell you where it searches for plugins.

Groucho2004
25th April 2016, 16:59
For x64 plugins you can find a nice collection here:
http://avisynth.nl/index.php/AviSynth%2B#AviSynth.2B_x64_plugins

For exploring dll locations, run avsmeter64 -avsinfo
PluginDir2_5 will tell you where it searches for plugins.
AVSMeter also enumerates plugins in the "plugins+" directory if there is an entry in the registry that points to them.
Here are the registry locations it checks:
PluginDir+ in Software/Avisynth in HKEY_CURRENT_USER (32 and 64 bit registry branch)
PluginDir+ in Software/Avisynth in HKEY_LOCAL_MACHINE (32 and 64 bit registry branch)
PluginDir2_5 in Software/Avisynth in HKEY_CURRENT_USER (32 and 64 bit registry branch)
PluginDir2_5 in Software/Avisynth in HKEY_LOCAL_MACHINE (32 and 64 bit registry branch)

Some of these may never be populated but who knows...

Leinad4Mind
25th April 2016, 17:22
For x64 plugins you can find a nice collection here:
http://avisynth.nl/index.php/AviSynth%2B#AviSynth.2B_x64_plugins

For exploring dll locations, run avsmeter64 -avsinfo
PluginDir2_5 will tell you where it searches for plugins.

Thanks for the info. But the FFMS2 from that link, its from the github, where I download. I've tried the 3 last versions 2.20, 2.21 and 2.22.

Put all the x64 folder dll on the plugins64 folder, and on avspmod I get the error "There is no function". Thats very strange!

Groucho2004
25th April 2016, 17:29
Thanks for the info. But the FFMS2 from that link, its from the github, where I download. I've tried the 3 last versions 2.20, 2.21 and 2.22.

Put all the x64 folder dll on the plugins64 folder, and on avspmod I get the error "There is no function". Thats very strange!
As mentioned, run "avsmeter64 -avsinfo -log" and post the log file.

yup
25th April 2016, 17:31
Hi All!

I am beginer for using Avisynth+, before using Set MT build.
When I switch to Avisynth+ speed drop down from 17 fps to 11 fps.
Please advice.
Script for Set MT build
SetMemoryMax(1536)
SetMTMode(3,8)
Edibob=AVISource("pre14last.avi")# source YUY2 50 fps bobbed
SetMTMode(2)
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize",threads=1).Crop(22,16,-22,-16)
unsharp(varY=465,varC=232,strength=0.3,U=3,V=3,nthreads=1)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709
Script for Avisynth+
SetMemoryMax(1536)
SetFilterMTMode("DEFAULT_MT_MODE",3)
Edibob=AVISource("pre14last.avi")## source YUY2 50 fps bobbed
SetFilterMTMode("DEFAULT_MT_MODE",2)
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
PreFetch(8)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize").Crop(22,16,-22,-16)
unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709")


yup.

Groucho2004
25th April 2016, 17:32
Put all the x64 folder dll on the plugins64 folder, and on avspmod
Is there even a 64 bit version of avspmod?

Leinad4Mind
25th April 2016, 17:35
Here it is:
http://i.imgur.com/4KqtpFB.png

stax76
25th April 2016, 17:37
@Leinad4Mind

StaxRip x64 can teach you much about AviSynth+ x64, especially when you are new to it and have problems to get it running, it includes 24 popular AviSynth+ x64 plugins and a scripting editor to write code or choose filters via menu, the menu can be customized via filter profiles, here is a pastebin (http://pastebin.com/ZFKRuXe2) showing the included profiles.

Groucho2004
25th April 2016, 17:38
OK. Now create a script with FFVideoSource() and run it with AVSMeter64.

Edit: Why do you have two 64 bit ffms DLLs in your plugin directory?

Leinad4Mind
25th April 2016, 17:47
lol forget about the 2 dlls, I was testing old releases, one by one. And I just let 1 dll each time.
I'm not new at this. I know how to deal with avisynth and avspmod and megui. But Its my first time to try to work with avisynth+ x64 plugins. I can work with x86 without problems.
And If I recall correctly some years ago, I used avisynth 2.5.8 64bits without any problem. Dont remember if I used avpsmod, but I guess I was using. And I dont recall to have any kind of problems.

Leinad4Mind
25th April 2016, 17:51
@Leinad4Mind

StaxRip x64 can teach you much about AviSynth+ x64, especially when you are new to it and have problems to get it running, it includes 24 popular AviSynth+ x64 plugins and a scripting editor to write code or choose filters via menu, the menu can be customized via filter profiles, here is a pastebin (http://pastebin.com/ZFKRuXe2) showing the included profiles.


I'll give a shot to your GUI. Some good years ago I didn't like it, but It seems to be evolve a lot. Thanks for the info.

Groucho2004
25th April 2016, 17:53
If I try to "LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\ffms2.dll")" it gaves me error "Cannot load file" -.-

What da hell I'm missing...
That's another thing - why would you use Loadplugin() for a DLL that is already in the auto-load directory? Not that it causes problems but it's redundant.

Leinad4Mind
25th April 2016, 18:02
I know its redundant, but if my autoload directory was not autoloading, I was trying to force to read that dll. But even so, didn't work.
I installed now the staxrip, with it I was able to update the avisynth+ to the latest version (and I tought I was using the last one lol)
This works too with vapoursynth, thats nice. I'll be able to work easely with it. Let's see if I'm getting old to this **** xD

EDIT: Hey stax76, can I load an .avs on staxrip? Because I tried and get the same error "FFVideoSource: Can't open 'C:\file.mkv'"

my avs for test purposes is just: "FFVideoSource("C:\file.mkv")

And lets say I open directly the mkv, how can I create a avs script manually? Any option so I can write like on a text zone? (I saw how to add new filters on the profiles, but this is counter productive ^^' I would prefer to be able to write all the lines at once and preview the result)

stax76
25th April 2016, 18:42
@Leinad4Mind

Opening avs and vpy instead of a media file is supported. I tried a script that has only FFVideoSource in it and it worked fine, did you try if the script generally works by opening it with MPC x64?

StaxRip has a script editor that can be much used like a normal text editor to edit code, the menu has a join option and a code preview so if you really want you can get rid of macros and the split fields, it looks much like notepad and pure AviSynth code then. You loose many integrated features then of course. The easiest way to open the editor is double-clicking the list view.

Leinad4Mind
25th April 2016, 18:47
It works on MPC-HC, but doesnt work on StaxRip. (For simple encodes, or encodes with just gradfun for x264 8 bits, I'll try to use staxrip, but how can I choose the 8bit x264 from the 10bits? I can't find any option for that, sorry for this litlle offtopic)

About the text editor, you mean here, right?
http://i.imgur.com/f3mJvtT.png

pinterf
25th April 2016, 18:49
Hi All!

I am beginer for using Avisynth+, before using Set MT build.
When I switch to Avisynth+ speed drop down from 17 fps to 11 fps.
Please advice.
yup.

Try this one:
SetMemoryMax(1536)
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
Edibob=AVISource("pre14last.avi")## source YUY2 50 fps bobbed
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize").Crop(22,16,-22,-16)
unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709")
Prefetch(8)

Groucho2004
25th April 2016, 18:52
It works on MPC-HC, but doesnt work on StaxRip. (For simple encodes, or encodes with just gradfun for x264 8 bits, I'll try to use staxrip, but how can I choose the 8bit x264 from the 10bits? I can't find any option for that, sorry for this litlle offtopic)

About the text editor, you mean here, right?
http://i.imgur.com/f3mJvtT.png
How about taking this to the appropriate thread?

stax76
25th April 2016, 19:03
@Leinad4Mind

Yes, it's too much of topic here, you can post to the StaxRip x64 thread. StaxRip x64 unlike MPC x64 uses VFW x64 to connect with AviSynth x64 so for testing your system you need VirtualDub x64 which also connects to AviSynth x64 using VFW x64.

Leinad4Mind
25th April 2016, 19:06
OMFG, I found the bug. My Filename was "Lećo.mkv" and it doesn't support the character " ć " LOL After change to Leao StaxRip works great ;)
Failed to load script.

FFVideoSource: Can't open 'C:\Le?o.mkv'
(C:\rei_Source.avs, line 2)

About the topic here, even with Leao.mkv I can't get avspmod working with x64, a pitty.

stax76
25th April 2016, 19:23
It can be represented in ANSI charset and therefore should work with AviSynth (which don't support Unicode), if you like you can post a sample to the StaxRip thread.

Reel.Deel
25th April 2016, 19:32
Is there even a 64 bit version of avspmod?

Indeed there is: http://forum.doom9.org/showthread.php?p=1733655#post1733655

Leinad4Mind
25th April 2016, 19:38
Indeed there is: http://forum.doom9.org/showthread.php?t=153248&page=58#post1733655

I Love you man :P I didn't know about the x64 version.

Now it works! Thanks for all folks! :)

pinterf
25th April 2016, 19:38
It there any specific reason, why Avisynth lacks unicode support?
It's by design or just nobody complained so far?

stax76
25th April 2016, 19:43
here is a thread about it:

http://forum.doom9.org/showthread.php?t=110467

yup
25th April 2016, 20:25
Hi pinterf!

I get error
---------------------------
VirtualDub Error
---------------------------
Avisynth read error:
CAVIStreamSynth: System exception - Access Violation at 0xae1fc65
---------------------------
ОК
---------------------------

previous version work fine.
If I comment line with Colormatrix a get other message
---------------------------
VirtualDub Error
---------------------------
Out of memory (unable to allocate 7116224 bytes)
---------------------------
ОК
---------------------------

yup.

pinterf
25th April 2016, 21:48
Hi pinterf!
previous version work fine.
If I comment line with Colormatrix a get other message
VirtualDub Error
Out of memory (unable to allocate 7116224 bytes)


yup.

What happens if you set default mt mode to 3?
If it works, then one of the filters possibly cannot run in mode 2, only mode 3, (this is serialized mode).

Edit:
For me it works from avsmeter, though max memory consumption is 1860MB (see when set memory max to 2400).
YUY2 conversion inside QTGMC is eating a lot of memory, and speed.
Using SetMemoryMax(1536) it really uses around 1500M but it's not optimal.

mcjordan
26th April 2016, 06:01
Little sample of plugin including (in StaxRip):
Scripting Editor -> Misc ->
Loadplugin("C:\Portable Apps\StaxRip\Apps\Plugins\avs\MSharpen\msharpen.dll")MSharpen(threshold = 10, strength=100, highq=true, mask=false)

LigH
26th April 2016, 08:02
Is there no linebreak in the middle?

stax76
26th April 2016, 13:32
The profile editor supports multiline:

parentMenu | profileName =
Loadplugin("C:\Portable Apps\StaxRip\Apps\Plugins\avs\MSharpen\msharpen.dll")
MSharpen(threshold = 10, strength=100, highq=true, mask=false)

pinterf
26th April 2016, 13:42
@yup

This is my script that worked. I had no YUY2 source so I converted to YUY2 right after the source filter.

SetMemoryMax(2400) # or SetMemoryMax(1536)
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
Edibob=Avisource("dv_avi_sd_test.avi").ConvertToYUY2()
#Edibob=AVISource("pre14last.avi")## source YUY2 50 fps bobbed
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize").Crop(22,16,-22,-16)
unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709")
Prefetch(8)

This is the result after the first 3000 frames


AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frame (current | last): 3349 | 139380
FPS (cur | min | max | avg): 21.09 | 9.361 | 26.31 | 18.52
Memory usage (phys | virt): 1868 | 1894 MiB
Thread count: 67
CPU usage (current | average): 87% | 89%


When I converted the source back to YV12 right after the YUY2 simulated source filter, it became much faster and consumed 1000MB less memory.
Edibob=Avisource("dv_avi_sd_test.avi").ConvertToYUY2().ConvertToYV12()

AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frames processed: 3320 (0 - 3319)
FPS (min | max | average): 5.220 | 52.07 | 31.33
Memory usage (phys | virt): 824 | 844 MiB
Thread count: 69
CPU usage (average): 91%


You can try SetMemoryMax(1000).
It will continously shrink the memory demand, less caching, thus the speed is lower (13.6 vs 18.5 fps) compared to the non-memory limiting version.

AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frames processed: 3270 (0 - 3269)
FPS (min | max | average): 7.503 | 18.69 | 13.63
Memory usage (phys | virt): 1212 | 1250 MiB
Thread count: 67
CPU usage (average): 75%


Two remarks
- SetMemoryMax as we can see is not a 100% limit, setting it to 1000 still uses 1000-1200 MB, minor overshoot is possible.
- Seems that YUY2 is not the optimal format for processing

TheFluff
26th April 2016, 16:42
It there any specific reason, why Avisynth lacks unicode support?
It's by design or just nobody complained so far?

It's the standard Avisynth thing. It didn't support Unicode in 2001, everything must be backwards compatible all the way to 2001 and therefore you can't ever change anything, or if you do you have to jump through a bunch of hoops to make it backwards compatible which makes it so complex that it never gets done. It's not a huge deal, just another one of the countless minor irritations about it. Most people just rename their files if they need to.

real.finder
27th April 2016, 00:30
@yup

This is my script that worked. I had no YUY2 source so I converted to YUY2 right after the source filter.

SetMemoryMax(2400) # or SetMemoryMax(1536)
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
Edibob=Avisource("dv_avi_sd_test.avi").ConvertToYUY2()
#Edibob=AVISource("pre14last.avi")## source YUY2 50 fps bobbed
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize").Crop(22,16,-22,-16)
unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709")
Prefetch(8)

This is the result after the first 3000 frames


AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frame (current | last): 3349 | 139380
FPS (cur | min | max | avg): 21.09 | 9.361 | 26.31 | 18.52
Memory usage (phys | virt): 1868 | 1894 MiB
Thread count: 67
CPU usage (current | average): 87% | 89%


When I converted the source back to YV12 right after the YUY2 simulated source filter, it became much faster and consumed 1000MB less memory.
Edibob=Avisource("dv_avi_sd_test.avi").ConvertToYUY2().ConvertToYV12()

AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frames processed: 3320 (0 - 3319)
FPS (min | max | average): 5.220 | 52.07 | 31.33
Memory usage (phys | virt): 824 | 844 MiB
Thread count: 69
CPU usage (average): 91%


You can try SetMemoryMax(1000).
It will continously shrink the memory demand, less caching, thus the speed is lower (13.6 vs 18.5 fps) compared to the non-memory limiting version.

AVSMeter 2.2.2 (x86)
AviSynth+ 0.1 (r1849, MT-pfmod, i386) (0.1.0.0)

Number of frames: 139381
Length (hh:mm:ss.ms): 01:32:55.240
Frame width: 960
Frame height: 720
Framerate: 25.000 (25/1)
Colorspace: YV12

Frames processed: 3270 (0 - 3269)
FPS (min | max | average): 7.503 | 18.69 | 13.63
Memory usage (phys | virt): 1212 | 1250 MiB
Thread count: 67
CPU usage (average): 75%


Two remarks
- SetMemoryMax as we can see is not a 100% limit, setting it to 1000 still uses 1000-1200 MB, minor overshoot is possible.
- Seems that YUY2 is not the optimal format for processing

yes, YUY2 will be slow because:-

1- more data than yv12

2- processing hack (Interleaved to Planar or reverse) if we have yv16 support for all filters it will be faster and less memory processing

yup
27th April 2016, 19:52
pinterf!
:thanks:
Increasing SetMemoryMax increase fps, when using avsmeter, but during open in VirtualDub I get error, also I am try using ffmpeg for conversion to AVI I see frame with green and pink bars.
All problem gone when Prefetch place after QTGMC call, may be unsharp (when I am replaced nnedi3_rpow2 and unsharp), but not lower (appear color bars in output video).
Folowing script work fine in VirtualDub
SetMemoryMax(2400) # or SetMemoryMax(1536)
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
Edibob=AVISource("pre14last.avi")#.ConvertToYV12(interlaced=false)
#.Trim(0,10000)
Edibob=Edibob.AssumeTFF()
Edibob.SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF()
QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
#QTGMC(Tuning= "DV-SD",preset="Slow", Ediext=Edibob, Edithreads=1, EZDenoise=6, Denoiser="dfttest", ChromaNoise=true, DenoiseMC=true, NoiseTR=2,dct=5, search=5)
unsharp(varY=310,varC=155,strength=0.15,U=3,V=3)
#unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV16(interlaced=false)
Prefetch(8)
nnedi3_rpow2(rfactor=2,nns=2, qual=1, fwidth=1004, fheight=752,cshift="Spline36Resize").Crop(22,16,-22,-16)
#unsharp(varY=465,varC=232,strength=0.3,U=3,V=3)
ConvertToYV12(interlaced=false)
ColorMatrix(mode="Rec.601->Rec.709")
#Prefetch(8)
I am agree that problem may be related with YUY2 colorspace, but my source YUY2 and I want save chroma planes before ConvertToYV12().
yup.

qyot27
27th April 2016, 21:21
Prefetch must be placed at the end of the script. (http://avisynth.nl/index.php/AviSynth%2B#Enabling_MT)

Also, make sure the latest version of the MT modes .avsi file (linked to from here (http://avisynth.nl/index.php/AviSynth%2B#Help_filling_MT_modes)) is in the plugin autoload directory.

ismail0100
28th April 2016, 00:09
Why does not support all character say utf8 etc.

pinterf
28th April 2016, 08:03
here is a thread about it:

http://forum.doom9.org/showthread.php?t=110467
Thanks. Extremely problematic if we want 100% backward compatibility.

LigH
28th April 2016, 09:22
@ ismail0100: Because it seems to be more complicated than expected...

here is a thread about it:

http://forum.doom9.org/showthread.php?t=110467

MysteryX
2nd May 2016, 07:44
OK I'm doing some tests with AVS+.

Here's my script.


P="Encoder\"
LoadPlugin(P+"LSMASHSource.dll")
LoadPlugin(P+"KNLMeansCL.dll")
LoadPlugin(P+"Shaders\Shader.dll")
Import(P+"Shaders\Shader.avsi")
LoadPlugin(P+"nnedi3.dll")
LoadPlugin(P+"FTurn.dll")
Import(P+"edi_rpow2.avsi")
LoadPlugin(P+"svpflow1.dll")
LoadPlugin(P+"svpflow2.dll")
Import(P+"InterFrame2.avsi")
Import(P+"ResizeX.avsi")

SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("LWLibavVideoSource",3)
SetFilterMTMode("LWLibavAudioSource",3)
SetFilterMTMode("KNLMeansCL",3)

#SetMTMode(3,8)
file="F:\NaturalGrounding\2002 Rahtree\Original\Meu-Ayw-Tua-Lae-Tur.mpg"
LWLibavVideoSource(file, cache=false, threads=1)
AudioDub(LWLibavAudioSource(file, cache=false))
Crop(0, 0, -8, -0)
ConvertToYV24()
#SetMTMode(5)
KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0)
#SetMTMode(2)
ConvertToYV12()
SuperRes(2, 0.6, 0, """edi_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)""", MatrixIn="601")
InterFrame(Cores=8, Tuning="Smooth", NewNum=60, NewDen=1, GPU=true)
SuperRes(2, 0.6, 0, """edi_rpow2(2, nns=4, cshift="Bicubic", a1=0, a2=.75, fWidth=1012, fHeight=778, Threads=2)""")
ResizeX(1004, 768, 0, 5, -8, -5, kernel="Bicubic", a1=0, a2=.75)

Prefetch(8)


With AviSynth 2.6 MT

AVSMeter 2.1.6 (x86)
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)

Number of frames: 13726
Length (hh:mm:ss.ms): 00:03:48.767
Frame width: 1004
Frame height: 768
Framerate: 60.000 (60/1)
Colorspace: YV12
Active MT Mode: 2

Frames processed: 338 (0 - 337)
FPS (min | max | average): 2.133 | 1000000 | 10.07
Memory usage (phys | virt): 885 | 1236 MB
Thread count: 311
CPU usage (average): 37%

Time (elapsed): 00:00:33.563


With AviSynth+ MT

AVSMeter 2.1.6 (x86)
AviSynth+ 0.1 (r1847, MT-pfmod, i386) (0.1.0.0)

Number of frames: 13726
Length (hh:mm:ss.ms): 00:03:48.767
Frame width: 1004
Frame height: 768
Framerate: 60.000 (60/1)
Colorspace: YV12

Frames processed: 508 (0 - 507)
FPS (min | max | average): 1.103 | 1000000 | 8.148
Memory usage (phys | virt): 738 | 1109 MB
Thread count: 345
CPU usage (average): 41%

Time (elapsed): 00:01:02.344


I tried it several times. With AVS 2.6, the speed remains at ~10.3fps. With AVS+, it starts at 11 and then drops at 8.8, and dropped all the way to 8fps. There is something causing the speed to drop over time.

MysteryX
2nd May 2016, 07:58
I also tried replacing KNLMeansCL with xNLMeans.

Documentation says: "XNLMeans is a MT_NICE_FILTER for Avisynth_MT or Avisynth+, but without SIMD instructions or GPU acceleration."

This works
SetFilterMTMode("xNLMeans",2)

If I change to this, the script never loads.
SetFilterMTMode("xNLMeans",1)