Test Script For vfx


The following script runs all the functions of the vfx plugin. The source in this script is colorbox of vcm plugin. It can be replaced by any source available to user. Some adjustments to parameters may be required depending upon input frame dimensions.


import vapoursynth as vs
core = vs.get_core()

core.std.LoadPlugin(path=r'.....vfx.dll')
core.std.LoadPlugin(path=r'.....vcm.dll')
# ColorBox can output all YUV formats except half float
ret = core.vcm.ColorBox(format = vs.YUV444PS)
# Added just to include some detail
ret = core.vcm.grid(ret,color=[200, 100,0], bcolor=[0,250,0], vbcolor=[0,0,250])
#ret = core.resize.Bicubic(ret,format=vs.RGB48)
#
ret = core.std.Trim(ret, 1,100)
#ret = core.std.Loop (ret,100)
align = 2
#
bal = core.vfx.Balloon(ret + ret,color =[30,230,0], nhops = 2, light = 0, refl = 0.5, opacity = 0.1)
fin = core.text.Text(bal, "Balloon", align)
#
bub = core.vfx.Bubbles(ret,sx = 0, farx= 600, nbf = 4, life = 50)
fin = fin + core.text.Text(bub, "Bubbles", align)
#
bin = core.vfx.Binoculars(ret, emag = 8)
fin = fin + core.text.Text(bin, "Binoculars", align)
#
con = core.vfx.Conez(ret,ret,vert = 1)
fin = fin + core.text.Text(con, "conez", align)
#
dl = core.vfx.DiscoLights(ret, life = 5, nspots = 2, dim = 0.15, type = 3)
fin = fin + core.text.Text(dl, "DiscoLights", align)
#
fl = core.vfx.Flashes(ret)
fin = fin + core.text.Text(fl, "Flashes", align)
#
fg = core.vfx.FiguredGlass(ret, drop = 1, rad = 40, mag = 8)
fin = fin + core.text.Text(fg, "FiguredGlass", align)
#
len = core.vfx.Lens(ret, rad = 40, mag = 2,x=10,y=10,erad = 100, ex = 600, ey = 460,emag = 8)
fin = fin + core.text.Text(len, "Lens", align)
#
fpt = core.vfx.FlowerPot(ret, x = 10, ex = 440,rise = 400,color = 1, zoom = 3.2)
fin = fin + core.text.Text(fpt, "FlowerPot", align)
#
fog = core.vfx.Fog(ret, fog = 0.1, efog = 0.7, vary = 0.3 )
fin = fin + core.text.Text(fog, "fog", align)
#
lnm = core.vfx.LineMagnifier(ret, vert = 1,lwidth = 80, mag = 6.0,  xy = 64, exy = 400, drop = 0)
fin = fin + core.text.Text(lnm, "LineMagnifier", align)
#
pool = core.vfx.Pool(ret,speed = 4, espeed = 50, amp =10, eamp =40, paint = 1, x = 0, ex = 200, y = 0, ey = 200)
fin = fin + core.text.Text(pool, "Pool", align)
#
rain = core.vfx.Rain(ret, type = 3,etype = 1,slant = 3,eslant = 1,span = 24, opq = 0.5, box = 200)
fin = fin + core.text.Text(rain, "Rain", align)
#
rbw = core.vfx.Rainbow(ret, rad = 140, erad = 240, x = 100, ex = 400, y = 200, ey = 200, lx = 100, elx =200, rx = 540, erx = 540)
fin = fin + core.text.Text(rbw, "Rainbow", align)
#
rip = core.vfx.Ripple(ret)
fin = fin + core.text.Text(rip, "Ripple", align)
#
rkt = core.vfx.Rockets(ret, life = 2, interval = 0.5)
fin = fin + core.text.Text(rkt+ret, "Rockets", align)
#
snw = core.vfx.Snow(ret)
fin = fin + core.text.Text(snw, "Snow", align)
#
sst = core.vfx.SnowStorm(ret, type =[3,3])
fin = fin + core.text.Text(sst, "SnowStorm", align)
#
spr = core.vfx.Sparkler(ret, x = 0, ex = 600, rad = 40, color = 1)
fin = fin + core.text.Text(spr, "Sparkler", align)
#
spl = core.vfx.SpotLight(ret,rad = 64, x=0, y = 0,ex = 600,ey = 400, dim = 0.1, rgb =[255,255,255])
fin = fin + core.text.Text(spl, "SpotLight", align)
#
sfl = core.vfx.SunFlower(ret+ret, gravity = 0.5, persistance = 0.75, rad = 200)
fin = fin + core.text.Text(sfl, "SunFlower", align)
#
swrl = core.vfx.Swirl(ret, q = 4,rad = 400)
fin = fin + core.text.Text(swrl, "Swirl", align)
#fin = core.resize.Bicubic(fin,matrix = 1,format=vs.YUV422P8)
#fin = core.resize.Bicubic(fin,format=vs.YUV422P8)
#ret = core.std.StackHorizontal([ret, ret2])
fin.set_output()