Log in

View Full Version : This script doesn't work...


iradic
18th February 2004, 11:26
When I load this script in vdubmod it says 352x288...

Need some help to solve this...

script:
-------
# SOURCE
video=mpegsource("C:\TV-CAP\capture.mpg", 156506)

# CROPPING
crop(video,8,6,336,276)

Undot()

# DENOISING: little noise
Temporalsoften(2,3,3,mode=2,scenechange=6)
mergechroma(blur(1.3))
FluxSmooth(5,7)

# RESIZING: soft-bicubic
BicubicResize(320,240,0.333,0.333)

# TRIM
f_num=framecount(video)-4500
trimed=trim(video,1,f_num)

# SELECT RANGE = 1 %
sel_range(trimed,1)

function sel_range(clip c, float percent)
{
frange=floor(250./(percent/100.))
return SelectRangeEvery(c, frange, 250)
}
---------------

What should I change to make this work?
Thanks...

Leak
18th February 2004, 11:37
Originally posted by iradic
When I load this script in vdubmod it says 352x288...

What should I change to make this work?


# RESIZING: soft-bicubic
BicubicResize(320,240,0.333,0.333)

# TRIM
f_num=framecount(video)-4500
trimed=trim(video,1,f_num)


Well, you're resizing your video (that's stored in the implicit "last" variable) up there, then re-use the original video that was stored in the "video" variable. Either you put a "video=" in front of the BicubicResize, or you use "last" instead of "video" at the TRIM part - still, it's never a bad idea to explicitely store results in a variable, as relying on the "last" variable can get confusing if you tinker around a lot.

np: Tura - Letter (Plaid - Trainer)

iradic
18th February 2004, 12:20
original:
------------
trimed=trim(video,1,f_num)

changed:
------------
trimed=trim(last,1,f_num)

Thanks for help...