View Full Version : Avisynth+
wonkey_monkey
18th July 2017, 20:55
Just out of curiousity, if this okay to ask here - as a quick straw poll, which would people prefer vis a vis Avisynth+: existing plugins updated to x64, or existing plugins updated to handle the new colourspaces?
DJATOM
18th July 2017, 23:26
x64 ports preferred. Although I'd like to have eedi3 with 16-bit and AVX2 support.
burfadel
19th July 2017, 12:21
x64 ports would be a lot more useful. I guess in general, and especially looking forward, colourspace support is irrelevant if you can't use the 32-bit filter in your 64-bit script.
Reel.Deel
19th July 2017, 13:54
x64 ports preferred. Although I'd like to have eedi3 with 16-bit and AVX2 support.
Ditto, according to cretindesalpes eedi3 is 16-bit ready. This has been the case since late 2013.
The SSE2 code is 16-bit ready, although the glue code to pass stack16 clips hasn’t been implemented yet. It will probably come in a next update.
qyot27
19th July 2017, 18:55
At least judging by the changes made to AviSynth+ itself in order to work on 64-bit, doing so would generally make the code more portable and easier to maintain, which is always a good thing. All the new pixel formats are much more purpose-oriented, and adding them after doing the work to make the plugins 64-bit compatible would be more efficient.
Metal
22nd July 2017, 14:41
New release with TemporalSoften fix.
Thanks to Sharc for the report (https://forum.doom9.org/showthread.php?p=1810075#post1810075).
Download Avisynth+ r2508-MT (https://github.com/pinterf/AviSynthPlus/releases/tag/r2508-MT)
20170629 r2508
- Fix TemporalSoften: threshold < 255 (bug exists probably since r1576)
Hello
I have a problem, could you please help me solve it?
When ever I try to install any Avisynth + other than version r1576 i get this error message http://imgur.com/1xkIhGL
I tried to locate the folder, but it didn't work even when I installed r2294 I got the same error!
LigH
22nd July 2017, 14:48
Do you possibly mix up 64 bit DLL and 32 bit system folder? Which Windows version do you have? Which file manager do you use? (If it's anything else than Windows Explorer: A 32-bit version of a custom file manager won't have access to the 64-bit system area.) In general: More facts! More details! More quotes of error messages!
P.S.: I guess it's time to build a recent installer again. Moving DLL's manually into sensitive areas is not everyone's favourite challenge. The Avisynth Universal Installer (https://forum.doom9.org/showthread.php?t=172124) (run "as Administrator") would be a helpful alternative; unfortunately you have to edit it correctly to maintain plugin paths, or possibly copy all your plugins around, so it's not really straightforward and easy-to-use either for people with less experience. Handling paths with spaces and even parentheses is tricky in Batch.
Metal
22nd July 2017, 15:00
Do you possibly mix up 64 bit DLL and 32 bit system folder? Which Windows version do you have? Which file manager do you use? (If it's anything else than Windows Explorer: A 32-bit version of a custom file manager won't have access to the 64-bit system area.) In general: More facts! More details! More quotes of error messages!
No, I checked again and again I followed the instructions very well, but it didn't work!
Even with a normal installer by Groucho2004 which I got from here: http://avisynth.nl/index.php/Avisynthplus/Downloads
won't work :( only r1576 works.
I'm on windows server 2012 64-bit and I'm using windows explorer.
LigH
22nd July 2017, 15:10
Then, next steps: download and unpack AVSMeter (https://forum.doom9.org/showthread.php?t=173259&highlight=avsmeter), and check
AVSMeter.exe -avsinfo
AVSMeter64.exe -avsinfo
AVSMeter.exe yourscript.avs
AVSMeter64.exe yourscript.avs
for error messages. I guess "the specified module" which is missing may be the Microsoft Visual C++ Runtime in the required version.
Metal
22nd July 2017, 15:39
Then, next steps: download and unpack AVSMeter (https://forum.doom9.org/showthread.php?t=173259&highlight=avsmeter), and check
AVSMeter.exe -avsinfo
AVSMeter64.exe -avsinfo
AVSMeter.exe yourscript.avs
AVSMeter64.exe yourscript.avs
for error messages. I guess "the specified module" which is missing may be the Microsoft Visual C++ Runtime in the required version.
Yes!!! Finally!!!
Thank you so much LigH, I updated the Microsoft Visual C++ Runtime and it worked.
edcrfv94
23rd July 2017, 15:13
Maybe auto one processes for each C/C++ filter(auto switch 32bit if 64bit not available) and auto adjustment prefetch and keep frames cache, can temporarily solve the multi-threaded problem until a new method appears.
colorbars(width = 1920, height = 1080, pixel_type = "yv12")
src = last
mcdn = src.kf_MCDegrainN(clip c, int "tr")
rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames
function kf_MCDegrainN(clip c, int "tr")
{
tr = default(tr, 6)
super = MSuper(levels=0)
multi_vec = MAnalyse(super, multi=true, delta=tr)
c.MDeGrainN(super, multi_vec, tr)
return last
}
colorbars(width = 1920, height = 1080, pixel_type = "yv12")
src = last
#1 processes prefetch 16 keep 14
#export last, src
#pass
mcdn = src.kf_MCDegrainN(clip c, int "tr")
function kf_MCDegrainN(clip c, int "tr")
{
tr = default(tr, 6)
super = MSuper(levels=0)
#2 processes prefetch 14 keep 12
#export super
#pass last, c
multi_vec = MAnalyse(super, multi=true, delta=tr)
#3 processes prefetch 12 keep 10
#export multi_vec
#pass last, c, super
c.MDeGrainN(super, multi_vec, tr)
#4 processes prefetch 10 keep 8
#export last
#pass
return last
}
rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames
#5 processes prefetch 8 keep 6
#export last
MP_Pipeline cann't pass audio, just for example.
MP_Pipeline("""
SetMemoryMax(500)
colorbars(width = 1920, height = 1080, pixel_type = "yv12")
src = last
### export clip:src
### prefetch: 14,12
### ###
SetMemoryMax(500)
c = src
super = MSuper(levels=0)
### export clip:c, super
### pass clip:src
### prefetch: 12,10
### ###
SetMemoryMax(500)
multi_vec = MAnalyse(super, multi=true, delta=tr)
### export clip:multi_vec
### pass clip:src, c, super
### prefetch: 10,8
### ###
SetMemoryMax(500)
mcdn = c.MDeGrainN(super, multi_vec, tr)
### export clip:mcdn
### pass clip:src
### prefetch: 8,6
### ###
SetMemoryMax(500)
rfs(src, mcdn, mappings="[1000 2000] [3000 4000]") #Remap Frames
""")
real.finder
23rd July 2017, 15:31
MP_Pipeline cann't pass audio, just for example.
yes, Unfortunately
I wish someone did these changes https://github.com/SAPikachu/MP_Pipeline/issues/1#issuecomment-269108878
real.finder
13th August 2017, 05:18
hi pinterf
when you back can you check this (https://forum.doom9.org/showpost.php?p=1714618&postcount=1045), I didn't note it before since I use mpp(MP_Pipeline) most of the time and by using mpp it seems to work!
edit: this one too https://forum.doom9.org/showpost.php?p=1789860&postcount=2709 since you will touch the autoload things
edit2: this one too https://forum.doom9.org/showthread.php?p=1814912#post1814912
junh1024
25th August 2017, 09:36
Really, how hard is it 2 make SSRC accept int16 in? Most of the audio tools (DAWs, VSTs, outside of avs) I use happily do format/bitdepth conversions silently.
fenarinarsa
1st September 2017, 12:02
Hello everyone,
Since AVS+ 2502 the AddAutoLoadDir behavior changed.
Before this version, I could add 32bits and 64 bits DLLs (in two different folders) and AviSynth would load the correct ones depending on the environment it's working on. Because I currently must use an old x86 software and ffmpeg x64 at the same time from the same script.
Now it fires an error (cannot load DLL...) and stops there.
That a real issue for me since I generate an AVS+ script that should work in 32bits *and* 64bits and that I don't use the AVS+ default plugins dir (we have in-house developments).
In other word, this change in behavior breaks everything that was working quite well until now :)
I looked for a way of having conditionnal loading, but I couldn't find a variable that returns the current environment. Another way would be to add an optional argument to AddAutoLoadDir like "errors=false".
Am I missing something there ?
BTW I'm the technical director of a cable/DSL French TV channel and we've been using AviSynth and AVS+ for 9 years to generate our on-air & VOD/catch-up video graphics :)
I must say you're doing an awesome work. Last year I was thinking about ditching AVS because we had a lot of issues relating to memory management, HD, ffmpeg and QuickTime, but AVS+ saved it :)
demo => http://www.youtube.com/watch?v=ZbHMMxTcgec
Groucho2004
1st September 2017, 12:21
Since AVS+ 2502 the AddAutoLoadDir behavior changed.
Before this version, I could add 32bits and 64 bits DLLs (in two different folders) and AviSynth would load the correct ones depending on the environment it's working on. Because I currently must use an old x86 software and ffmpeg x64 at the same time from the same script.
I guess you can blame me (https://forum.doom9.org/showthread.php?p=1808210#post1808210) for this since I suggested to pinterf to add a check for the correct bitness of plugins in the auto-load directories.
A possible solution for this could be to modify the AddAutoLoadDir() functionality so the bitness check is omitted on the script level. This way, only the "hard coded" auto-load directories to which the registry entries point will be checked.
pinterf
1st September 2017, 13:30
I looked for a way of having conditionnal loading, but I couldn't find a variable that returns the current environment. Another way would be to add an optional argument to AddAutoLoadDir like "errors=false".
Am I missing something there ?
Sorry for the inconvenience.
From version r2487 there is a new script function:
int GetProcessInfo([int type = 0])
Without parameter or type==0 the current bitness of Avisynth DLL is returned (32 or 64)
With type=1 the function can return a bit more detailed info:
-1: error, can't establish
0: 32 bit DLL on 32 bit OS
1: 32 bit DLL on 64 bit OS (WoW64 process)
2: 64 bit DLL
Usage:
LoadPlugin(GetProcessInfo == 32 ? "This32.dll" : "This64.dll")
Groucho2004
1st September 2017, 13:54
Usage:
LoadPlugin(GetProcessInfo == 32 ? "This32.dll" : "This64.dll")I don't think this is exactly what he's looking for, he want's to use auto-load. However, something like this maybe:
(GetProcessInfo == 32) ? AddAutoLoadDir("32BitplugsDir") : AddAutoLoadDir("64BitplugsDir")
fenarinarsa
1st September 2017, 15:05
I don't think this is exactly what he's looking for, he want's to use auto-load. However, something like this maybe:
(GetProcessInfo == 32) ? AddAutoLoadDir("32BitplugsDir") : AddAutoLoadDir("64BitplugsDir")
Thanks a lot! That's what I was looking for.
I read a few months ago that a function to return the bitness was added, but I couldn't find it in the documentation.
So it works now, time to deploy r2508 :D
BTW I still didn't activate MT because I found some bugs. I suppose I can do bug reports here ? (it usually takes time because I do full reports with sample files)
pinterf
1st September 2017, 15:11
Yes, we all like well documented bug reports :) Thanks.
tebasuna51
2nd September 2017, 14:43
Last OT posts moved to https://forum.doom9.org/showthread.php?t=174847
Atak_Snajpera
3rd September 2017, 17:25
I must be doing something wrong because I don't see any change with or without Prefetch(8). Speed,number of threads and memory consumption is identical.
script
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")
#VideoSource
video=DirectShowSource("E:\_Video_Samples\mkv\drive_video_10min.mkv",audio=false).ConvertToYV12(matrix="rec709")
#Crop
video=Crop(video,0,140,-0,-140)
#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)
return video
prefetch(8)
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 14751
Length (hh:mm:ss.ms): 00:10:15.117
Frame width: 1920
Frame height: 800
Framerate: 23.981 (10000/417)
Colorspace: YV12
Frame (current | last): 144 | 14750
FPS (cur | min | max | avg): 1.985 | 1.946 | 4.142 | 2.407
Memory usage (phys | virt): 287 | 336 MiB
Thread count: 37
CPU usage (current | average): 8% | 6%
Time (elapsed | estimated): 00:01:00.231 | 01:42:07.361
without prefetch
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 14751
Length (hh:mm:ss.ms): 00:10:15.117
Frame width: 1920
Frame height: 800
Framerate: 23.981 (10000/417)
Colorspace: YV12
Frame (current | last): 144 | 14750
FPS (cur | min | max | avg): 1.981 | 1.945 | 4.097 | 2.401
Memory usage (phys | virt): 287 | 336 MiB
Thread count: 37
CPU usage (current | average): 7% | 6%
Time (elapsed | estimated): 00:01:00.384 | 01:42:22.926
TheFluff
3rd September 2017, 17:36
You have "return video" above prefetch in the filter chain. I think prefetch actually kinda is a pseudo-filter of its own, so it might matter - not sure though.
Atak_Snajpera
3rd September 2017, 17:41
I think prefetch actually kinda is a pseudo-filter of its own, so it might matter - not sure though.
Yes! You are right! Prefetch acts like filter so this works now
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")
#VideoSource
video=DirectShowSource("E:\_Video_Samples\mkv\drive_video_10min.mkv",audio=false).ConvertToYV12(matrix="rec709")
#Crop
video=Crop(video,0,140,-0,-140)
#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)
video=prefetch(video,8)
return video
Groucho2004
4th September 2017, 10:07
@Mod
Posts #3576 and onwards should be moved to the fft3dfilter thread (https://forum.doom9.org/showthread.php?t=174347).
tebasuna51
4th September 2017, 20:42
Posts moved.
MysteryX
5th September 2017, 05:54
With the latest version of Avisynth+, I'm still unable to open script files names containing international character in MPC-HC; but the same files open fine in VirtualDub.
I thought this had been solved? Here's an example of file name: おどるポンポコリン.mp4
Groucho2004
5th September 2017, 07:20
With the latest version of Avisynth+, I'm still unable to open script files names containing international character in MPC-HC; but the same files open fine in VirtualDub.
I thought this had been solved? Here's an example of file name: おどるポンポコリン.mp4Not sure why your example has a .mp4 extension but opening a script "おどるポンポコリン.avs" works fine in mpc-hc even without switching the locale to Japanese. This is on XP.
Atak_Snajpera
5th September 2017, 15:20
Source: 3840x2160 AVC
CPU: E5-2690 (8C/16T)
RAM: 64 GiB
OS: Win7 x64
Avisynth+: r2508 x86
#MT
Import("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\Scripts\MTmodes.avs")
#VideoSource
video=DirectShowSource("E:\_Video_Samples\mp4\UHD_0035.MP4",audio=false).ConvertToYV12(matrix="rec709")
#Resize
video=Spline36Resize(video,1920,1080).Sharpen(0.2)
#Denoise
Loadplugin("C:\Users\Dave\Documents\Delphi_Projects\RipBot264\_Compiled\Tools\AviSynth plugins\mvtools\mvtools2.dll")
super=MSuper(video,pel=2)
fv1=MAnalyse(super,isb=false,delta=1,overlap=4)
bv1=MAnalyse(super,isb=true,delta=1,overlap=4)
fv2=MAnalyse(super,isb=false,delta=2,overlap=4)
bv2=MAnalyse(super,isb=true,delta=2,overlap=4)
video=MDegrain2(video,super,bv1,fv1,bv2,fv2,thSAD=400)
#Prefetch
video=Prefetch(video,X)
#Return
return video
I wonder why performance drops so heavily when process uses more than 2000 MiB of memory?
8 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.581 | 472300 | 10.53
Memory usage (phys | virt): 1609 | 1800 MiB
Thread count: 45
CPU usage (average): 52%
Time (elapsed): 00:00:39.880
-------------------------------------------------------
14 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.181 | 566759 | 12.38
Memory usage (phys | virt): 1784 | 1984 MiB
Thread count: 51
CPU usage (average): 89%
Time (elapsed): 00:00:33.925
-------------------------------------------------------
15 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.196 | 472300 | 7.495
Memory usage (phys | virt): 1826 | 2016 MiB
Thread count: 52
CPU usage (average): 57%
Time (elapsed): 00:00:56.034
-------------------------------------------------------
16 Threads
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.170 | 566760 | 6.253
Memory usage (phys | virt): 1850 | 2045 MiB
Thread count: 53
CPU usage (average): 39%
Time (elapsed): 00:01:07.169
StainlessS
5th September 2017, 16:17
Atak_Snajpera,
What happens if you get virtual memory use over 2048MiB ?
MysteryX
5th September 2017, 16:22
Not sure why your example has a .mp4 extension but opening a script "おどるポンポコリン.avs" works fine in mpc-hc even without switching the locale to Japanese. This is on XP.
Sorry I meant "おどるポンポコリン.avs" :) I'm using Windows 10 x64. Anything I could look for to debug the issue?
Groucho2004
5th September 2017, 16:30
Sorry I meant "おどるポンポコリン.avs" :) I'm using Windows 10 x64. Anything I could look for to debug the issue?Maybe this (https://en.wikipedia.org/wiki/Help:Multilingual_support_(East_Asian)#Windows_10) could be the problem?
Edit: Alternatively, change the system locale to Japanese and check if you still can't load the file in mpc-hc.
Atak_Snajpera
5th September 2017, 16:56
Atak_Snajpera,
What happens if you get virtual memory use over 2048MiB ?
Speed progressively drops after 2000 MiB mark. AVS meter silently crashes or terminates around 3.5 GiB (around 32 bit memory limit) . Speed drops to 0.5 fps before silent crash.
StainlessS
5th September 2017, 17:19
I've always thought that there was something not quite right with either avs or windows use of pagefile (dont know which).
EDIT: What do the 'big guns' think could be wrong ?
Groucho2004
5th September 2017, 17:37
Speed progressively drops after 2000 MiB mark. AVS meter silently crashes or terminates around 3.5 GiB (around 32 bit memory limit) . Speed drops to 0.5 fps before silent crash.There have been a lot of improvements regarding exception handling in AVSMeter since 2.2.6. This won't prevent the crash but it might provide more info as to where it occurs.
Atak_Snajpera
5th September 2017, 18:24
More data but this time on nice graph
http://i.cubeupload.com/0bq5xY.png
There have been a lot of improvements regarding exception handling in AVSMeter since 2.2.6. This won't prevent the crash but it might provide more info as to where it occurs.
Just generic Access Violation after 3.5 GiB mark
http://i.cubeupload.com/6BfsAZ.png
LigH
6th September 2017, 09:51
Well, you used AVSMeter 2.6.2 (x86), so, a 32-bit process.
AVSMeter64 will run a 64-bit process.
Yet ... if you have LAA binaries, utilizing above 2.0 and up to 3.5 GB RAM should not cause so much speed penalty, that's a different issue (bold guess: maybe using a plugin which is not really LAA compatible, thus system calls occur a lot to try to prevent issues?).
Groucho2004
6th September 2017, 10:29
Well, you used AVSMeter 2.6.2 (x86), so, a 32-bit process.
AVSMeter64 will run a 64-bit process.
Yet ... if you have LAA binaries, utilizing above 2.0 and up to 3.5 GB RAM should not cause so much speed penalty, that's a different issue (bold guess: maybe using a plugin which is not really LAA compatible, thus system calls occur a lot to try to prevent issues?).
I'm a bit puzzled by your post. What makes a plugin LAA compatible? LAA only applies to the calling executable (AVSMeter, x264, VDUB, ...). Setting that linker flag in Avisynth.dll or plugins is pointless.
I have no idea why Avisynth+ doesn't exit gracefully with a proper out of memory message, I guess it's a plugin misbehaving in combination with multi-threaded AVS+.
LigH
6th September 2017, 10:44
I'm sorry about my lack of in-depth knowledge here ... long ago, I read a brief remark about compilers or linkers abusing the most significant bit of addresses (which will be unused in a 32-bit process environment) as a behavioral flag, which I did not understand in detail, but since then I am unsure if there might be code – even in a DLL – which might rely on this bit serving as a flag, rather than being ignored. Very vague, I know. But some people use strange memory addressing trickery. I would not be able to exclude this as "half-wit nightmares", unless pointed to a convincing reason why I don't need to bother. :o
On the other hand, I can easily imagine issues regarding threading, despite the list of default plugin functions threading modes being so much tuned already.
Groucho2004
6th September 2017, 13:21
I'm sorry about my lack of in-depth knowledge here ... long ago, I read a brief remark about compilers or linkers abusing the most significant bit of addresses (which will be unused in a 32-bit process environment) as a behavioral flag, which I did not understand in detail, but since then I am unsure if there might be code – even in a DLL – which might rely on this bit serving as a flag, rather than being ignored. Very vague, I know. But some people use strange memory addressing trickery. I would not be able to exclude this as "half-wit nightmares", unless pointed to a convincing reason why I don't need to bother. :o
Don't sell yourself short, there are indeed risks involved (https://stackoverflow.com/questions/2288728/drawbacks-of-using-largeaddressaware-for-32-bit-windows-executables) although I think that following simple coding guidelines should avoid these.
pinterf
6th September 2017, 15:50
@Atak_Snajpera: could you please put this line at the beginning of the script?
SetLogParams("log.txt", LOG_DEBUG)
Then look into the generated file. When there are a lot of messages for shrinking caches, it can cause heavy slow down.
And another question: what are your speed numbers when you specify e.g. SetMemoryMax(2000) or SetMemoryMax(3000)?
Atak_Snajpera
6th September 2017, 17:17
@Atak_Snajpera: could you please put this line at the beginning of the script?
SetLogParams("log.txt", LOG_DEBUG)
Default
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MSuper() by script.
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MAnalyse() by script.
---------------------------------------------------------------------
WARNING: Caches have been shrunk due to low memory limit. This will probably degrade performance. You can try increasing the limit using SetMemoryMax().
---------------------------------------------------------------------
WARNING: A plugin or the host application might be causing memory leaks.
2000
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MSuper() by script.
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MAnalyse() by script.
---------------------------------------------------------------------
WARNING: Caches have been shrunk due to low memory limit. This will probably degrade performance. You can try increasing the limit using SetMemoryMax().
---------------------------------------------------------------------
WARNING: A plugin or the host application might be causing memory leaks.
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.397 | 472295 | 12.13
Memory usage (phys | virt): 2686 | 2880 MiB
Thread count: 53
CPU usage (average): 87%
Time (elapsed): 00:00:34.632
3000
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MSuper() by script.
---------------------------------------------------------------------
INFO: Ignoring unnecessary MT-mode specification for mvtools2_MAnalyse() by script.
---------------------------------------------------------------------
WARNING: A plugin or the host application might be causing memory leaks.
AVSMeter 2.2.6 (x86)
AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
Loading script...
Number of frames: 420
Length (hh:mm:ss.ms): 00:00:14.014
Frame width: 1920
Frame height: 1080
Framerate: 29.970 (5000000/166833)
Colorspace: YV12
Frames processed: 420 (0 - 419)
FPS (min | max | average): 0.300 | 472295 | 13.40
Memory usage (phys | virt): 2627 | 2819 MiB
Thread count: 53
CPU usage (average): 92%
Time (elapsed): 00:00:31.334
What is max safe value for SetMemoryMax in 32 bit? 3500 or 4000?
Groucho2004
6th September 2017, 17:24
@Atak_Snajpera
Which version of mvtools2 are you using?
Atak_Snajpera
6th September 2017, 17:27
http://i.cubeupload.com/4QiaRv.png
Groucho2004
6th September 2017, 17:35
You might get some speedup by using the latest version from pinterf.
pinterf
7th September 2017, 07:50
You might get some speedup by using the latest version from pinterf.
Yes, there were many fixes and changes since mvtools2 2.7.13.22 and the latest 2.7.22 probably fixes this one as well:
"WARNING: A plugin or the host application might be causing memory leaks."
I'd say the safe limit is 3000, but you have to experiment. AviSynth+ maintains its own memory consumption (frames, caches) internally but cannot count with a situation when a plugin is allocating so much memory that the total consumption is over limit.
Atak_Snajpera
7th September 2017, 08:20
Your version of mvtools2 solves performance drop after 2000 MiB mark. I don't even have to specify SetMemoryMax values at all :)
Atak_Snajpera
7th September 2017, 16:59
Simple question. Which one is better?
#Prefetch
video=Prefetch(video,16)
#Triming
video=Trim(video,0,1771)
or
#Triming
video=Trim(video,0,1771)
#Prefetch
video=Prefetch(video,16)
Groucho2004
7th September 2017, 17:36
Simple question. Which one is better?
#Prefetch
video=Prefetch(video,16)
#Triming
video=Trim(video,0,1771)
or
#Triming
video=Trim(video,0,1771)
#Prefetch
video=Prefetch(video,16)
Whatever gives you more performance and/or less memory usage. AVSMeter is your friend. :)
It may not matter at all.
MysteryX
8th September 2017, 19:16
This isn't working with Avisynth 2.6
if (!vi.IsY() && !vi.Is420() && !vi.Is422() && !vi.Is444() && !vi.IsRGB())
env->ThrowError("ConvertToShader: Source format is not supported.");
Is420 returns false, but IsYV12 works. I made sure to update headers to the latest version.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.