Katie Boundary
13th March 2015, 02:54
How does setmemorymax work when I'm importing literally dozens of scripts into Premiere? Do I have to set each individual script to use less than 3% of available memory? Can I just set a memory max for one of them because there's only one instance of AVIsynth running? Or what?
StainlessS
13th March 2015, 03:09
Each script instance has its own script environment and so all scripts individually loaded (avoided the 'Import' word) into Premiere will require
a SetMemoryMax() call to set limit for each script. (any scripts Imported into another script, just become part of the initial script).
class IScriptEnvironment {
public:
...
...
virtual int __stdcall SetMemoryMax(int mem) = 0;
...
...
}
EDIT: I take it you mean loaded (rather than import) lots of scripts into premiere. (If single script that Imports other script then single
SetMemoryMax is all that is required in main script before Imports).
EDIT:
Not sure, but if left to default settings then I think each script would set its own SetMemoryMax on script open (before
frame serving starts), with all setting max to about the same value (based on free memory and max 512MB limit [after v2.57]).
As each frame is 'pulled' through the [premiere] filter graph, it [each script] will do its own caching and memory will be consumed.
Memory will be consumed most by the first script in premiere order leaving less for the remaining scripts. The 2nd script will only
start consuming cache memory when first script is fully processed and Avisynth will probably not release that as I know of no
OS call to ask for memory back again, even though script 1 would no longer need cache frames [unless Premiere closes scripts
when redundant].
At some point, memory may be exhausted and may result in an 'out-of-memory folks' type error.
It might well not be a problem if Premiere opens and closes scripts/clips on demand rather than all at once.
Avisynth suffers out of memory errors if trying to open more than about 28 clips simultaneously (varies a little with source filter) and
does not seem to matter if you have loads of RAM, more a system resources problem, perhaps premiere deals with that by
opening/closing source clips on demand.
Is an interesting question, perhaps you would like to post what does happen if you try with defaults (especially if using
some heavy duty temporal processing scripts).
Perhaps there is an Avisynth Wizard that could give a better answer, I just muggle my way through.
EDITED:
EDIT: If you merely want to concatenate ranges, eg differing filters affecting different ranges of frames from same clip then you could do
worse than looking at ClipClop() plug:- http://forum.doom9.org/showthread.php?t=162266&highlight=clipclop
Example ClipClop usage script using NickNames:
Avisource("D:\avs\test.avi")
ORG=Last
V1 = FFT3DFilter(Plane=0,Sigma=1.6) # Light Luma
V2 = FFT3DFilter(Plane=0,Sigma=2.0) # Med Luma
V3 = FFT3DFilter(Plane=0,Sigma=4.0) # High Luma
V4 = FFT3DFilter(Plane=3,Sigma=1.6) # Light Chroma
V5 = FFT3DFilter(Plane=3,Sigma=2.0) # Med Chroma
V6 = FFT3DFilter(Plane=3,Sigma=4.0) # High Chroma
V7 = FFT3DFilter(Plane=4,Sigma=1.6) # Light Luma+Chroma
V8 = FFT3DFilter(Plane=4,Sigma=2.0) # Med Luma+Chroma
V9 = FFT3DFilter(Plane=4,Sigma=4.0) # High Luma+Chroma
V10= FlipHorizontal() # Flip-H
V11= FlipVertical() # Flip-V
V12= Invert() # Invert
NickNames =""" # Psuedonyms for clips (EDIT: clip index)
L0 = 1 # Light Luma
L1 = 2 # Med Luma
L2 = 3 # High Luma
C0 = 4 # Light Chroma
C1 = 5 # Med Chroma
C2 = 6 # High Chroma
LC0 = 7 # Light Luma + Chroma
LC1 = 8 # Med Luma + Chroma
LC2 = 9 # High Luma + Chroma
FH = 10 # Flip-H
FV = 11 # Flip-V
INV = 12 # Invert
"""
SCMD=""" # Clip editing commands in string, can also use commands in file
C0 0,99 # Light Chroma frames @ 0 -> 99
L0 100,-200 # Light Luma frames @ 100, 200 frames ie frames 100->299
INV 300,399 # Invert 300->399
L0 400,499 # Light Luma frames 400->499
FH 500,599 # Flip-H 500->599
LC2 600,699 # High Luma + Chroma
C1 800 # Med Chroma, Single frame
1 900,999 # Light Luma, We used the clip number instead of a NickName
FV 1000,1099 # Flip-V
LC1 2000,0 # Med Luma + Chroma, 2000 -> lastframe
"""
SHOW=True
ClipClop(ORG,V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,scmd=SCMD,nickname=NickNames,show=SHOW)
Any frames not replaced come from ORG source clip.
ClipClop() overhead is about equivalent to a single trim/splice. To trim/spice lots of ranges from different clips, see Prune().
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.