Log in

View Full Version : "out of memory" error in virtualdubmod


twelve20
10th May 2007, 11:26
I'm a little new to avisynth, and I posted a thread earlier about how to manually deinterlace after ivtc'ing.. with help from some other members, I was able to learn how to do it, but now I'm seeing an error in vdubmod ("out of memory").. my avisynth script is quite long, since this video (telecined ntsc) had a lot of remaining interlaced frames after ivtc'ing.. I'm using ApplyRange to apply a bob deinterlacer (securebob), and am wondering if there is a workaround to make the script shorter so I can load it in vdubmod.. the first few lines of my script are:

loadplugin("dgdecode.dll")
loadplugin("tivtc.dll")
import("mvbob.avs")
mpeg2source("Green Day - american Idiot.d2v")
tfm(pp=0)
tdecimate()
ApplyRange(0, 0, "securebob")
ApplyRange(4, 4, "securebob")
ApplyRange(8, 8, "securebob")
ApplyRange(12, 12, "securebob")
.......and it goes on

any help would greatly be appreciated :)

foxyshadis
10th May 2007, 13:52
That would definitely do it, since each instance of securebob will use a ton of memory (through eedi2). This is a pretty bizarre script, I'm going to first say that I don't think it's being processed correctly if it has this many combed frames at the end. I doubt it's telecined, or if it is, it's so badly telecined that it needs something else done to it. If you're totally sure, one option is:
tfm(clip2=securebob()).tdecimate()
Which mostly does what yours did but in an automated (but slower) fashion. However, I'd recommend posting a clip so that we can tell what's wrong.

Advice on scripting in general, stickboy makes an ApplyEvery, if it's this regular. If not always, use something like to keep memory use and setup time down:
d=securebob()
ApplyRange(0,0,"d") # also look at JDL_SingleFrame

sh0dan
11th May 2007, 09:10
If it is not exactly every 4 frames, you should use conditionalFilter combined with conditionalReader. I haven't got time for a finished solution, so you have to read on yourself. But the principle is:

global use_secure = false
mpeg2source("Green Day - american Idiot.d2v")
tfm(pp=0)
tdecimate()
org = last
secure = securebob()
ConditionalFilter(org, secure, org, "use_secure", "=" "true")
ConditionalReader("override.txt", "use_secure", false)

Create a file called "override.txt", with following content:
type bool
default false
0 true
4 true
8 true
12 true