View Full Version : vdm crashes while converting long avisynth script...


Heini011
12th January 2004, 13:06
Hi folks,

i use virtualdubmod 1.5.4.1 and avisynth 2.53 as frameserver under win me. while trying to convert the following script with vdm to xvid 1.0 beta 3, vdm crashed randomly. but (at least) 2 times just at position a (see at trim in script).

i came to the same result with virtualdub 1.5.10.

my system: amd athlon xp at 1850 mhz, nforce 2, 256 mb ram

i have already lowered the cpu- and ram-clock without success.

any ideas?

greetings, Heini011.

---

LoadPlugin("C:\Programme\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\undot.dll")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\Deen.dll")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\Vaguedenoiser")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\UnFilter")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\FluxSmooth.dll")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\VSFilter.dll")

LoadPlugin("C:\Programme\AviSynth 2.5\LoadPlugInEx2.dll")
LoadPlugin("C:\Programme\AviSynth 2.5\plugins\DustV5.dll")


#SetMemoryMax(128)

function hq_filter(clip c) {
c=UnFilter(c,5,5)
c=FaeryDust(c,8)
c=Undot(c)
c=ConvertToYV12(c)
c=FluxSmooth(c,2,-1)
c=deen(c,"a3d",1,3,5,3)
c=crop(c,2,14,716,548).BicubicResize(720,378,0,0.5)
return c
}

function mq_filter(clip c) {
c=FaeryDust(c,8)
c=Undot(c)
c=ConvertToYV12(c)
c=FluxSmooth(c,2,-1)
c=deen(c,"a3d",2,4,7,3)
c=crop(c,2,14,716,548).BicubicResize(720,378,0,0.5)
return c
}

function lq_filter(clip c) {
c=PixieDust(c,6)
c=Undot(c)
c=ConvertToYV12(c)
c=FluxSmooth(c,6,-1)
c=deen(c,"a3d",3,4,7,4)
c=crop(c,2,14,716,548).BicubicResize(720,378,0,0.5)
return c
}

function vlq_filter(clip c) {
c=PixieDust(c,8)
c=Undot(c)
c=ConvertToYV12(c)
c=FluxSmooth(c,7,-1)
c=VagueDenoiser(c,threshold=1.0,method=1,nsteps=7,chroma=true)
c=deen(c,"a3d",3,5,9,5)
c=crop(c,2,14,716,548).BicubicResize(720,378,0.2,0.4)
return c
}


mpeg2source("E:\VIDEO\video.d2v",cpu=4)

ConvertToYUY2()

trim(0, .. ).Tweak(sat=0.94,coring=false) + \
trim(..,..).Tweak(sat=0.96,coring=false) + \
trim(..,..).Tweak(sat=0.94,coring=false) + \
trim( a ,..).Tweak(sat=0.90,coring=false).ConvertToRGB().RGBAdjust(1,1,0.92,1).ConvertBackToYUY2() + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false).ConvertToRGB().RGBAdjust(1,1,0.92,1).ConvertBackToYUY2() + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false).ConvertToRGB().RGBAdjust(1,1,0.93,1).ConvertBackToYUY2() + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.88,bright=-9,cont=1.04,hue=-4,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.88,bright=-12,cont=1.04,hue=-3,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.96,bright=-18,cont=1.12,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.88,bright=-8,cont=1.12,hue=-4,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.90,bright=-6,cont=1.10,coring=false) + \
trim(..,..).Tweak(sat=0.90,coring=false) + \
trim(..,..).Tweak(sat=0.82,coring=false) + \
trim(..,..).Tweak(sat=0.94,coring=false) + \
trim(..,..).Tweak(sat=0.82,coring=false) + \
trim(..,..).Tweak(sat=0.92,coring=false) + \
trim(..,..).Tweak(sat=0.82,coring=false) + \
trim(..,134000).Tweak(sat=0.94,coring=false)


# trim(b,e) -> trim( b-4 , e+2 ).filter().trim( 4 , -(e-b+1) )
# trim(u,v).filter().trim( 4 , -(v-u-5) )

trim(0,..).hq_filter().trim(0,..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).mq_filter().trim(4,-..) + \
trim(..,..).vlq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).mq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).mq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).mq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,..).lq_filter().trim(4,-..) + \
trim(..,..).hq_filter().trim(4,-..) + \
trim(..,0).lq_filter().trim(4,-..)


FadeOut2(40)

AddBorders(0,34,0,36)

VobSub("E:\VIDEO\VTS_01_0")

Leak
12th January 2004, 14:24
Originally posted by Heini011
i use virtualdubmod 1.5.4.1 and avisynth 2.53 as frameserver under win me. while trying to convert the following script with vdm to xvid 1.0 beta 3, vdm crashed randomly. but (at least) 2 times just at position a (see at trim in script).

any ideas?


Yeah - you're creating waaay too many instances of all kinds of filters, I'd say.

Each time you use trim(...).???_filter(), you're creating new instances of any filters that are used in your filter functions, which probably makes AviSynth run out of memory from time to time.

Do something like this:


hq=hq_filter()
mq=mq_filter()
lq=lq_filter()
vlq=vlq_filter()

hq.trim(...) + \
hq.trim(...) + \
lq.trim(...) + \
mq.trim(...) + \
lq.trim(...) +
...


(I think you'll catch my drift...)

This way, each filter is only instantiated once, but it should still produce the same results.

np: Jah Wobble & The Invaders Of The Heart - They Came With A Swagger (English Roots Music)

Didée
12th January 2004, 14:41
Furthermore, you are calling the Dust filters several times in your script.

This is a no-go: you can only have *one* instance of Dust in your script. One instance, and not more than that :(
If you try more than one instance, you either get a black screen (lucky case), or maybe even a crash ...

- Didée

Heini011
13th January 2004, 20:54
Hi,

@Leak:

yes, you're right. this has solved the problem. avisynth is now faster and has just finished the first pass without any problem.

you are my redeemer! http://www.kkforum.de/smilies/huldigung.gif


@Didée:

>you can only have *one* instance of Dust in your script.
>If you try more than one instance, you either get a black
>screen (lucky case), or maybe even a crash ...

there seems to be an still luckier case: everything works perfectly. my video looks great at all scenes!

greetings, Heini011.


---

working script modification:

...
hq=hq_filter()
mq=mq_filter()
lq=lq_filter()
vlq=vlq_filter()

hq.trim(0,..).trim(0,..) + \
lq.trim(..,..).trim(4,-..) + \
mq.trim(..,..).trim(4,-..) + \
vlq.trim(..,..).trim(4,-..) + \
hq.trim(..,..).trim(4,-..) + \
lq.trim(..,..).trim(4,-..) + \
...