Log in

View Full Version : Flicker Transition & Cut Up Post Effect for DVD slideshow GUI


tin3tin
11th March 2012, 08:15
Two new addons for DVD slideshow GUI:

Flicker Transition
http://www.youtube.com/watch?v=Ug_yfYb6A74
loadplugin("gscript.dll")
#at=colorbars().trim(0,100)
#bt=colorbars().trim(0,100).invert()
#ft=25
flicker(at,bt,ft)
function flicker(at,bt,ft)
{
rvt=at.trim(at.framecount-(int(ft/4)),at.framecount)+blankclip(at,int(ft/2)-1,color=$00000000)+bt.trim(0,int(ft/4))
rat=at.trim(0,-1)
GScript("""
while (rat.framecount < ft) {
point1=rand(rvt.framecount-(rat.framecount),seed=false)
rat=rat+rvt.trim(point1+(rat.framecount),(rand(3,seed=false)+1)*-1)
}
""")
return rat.trim(0,ft-1)
}

Cut Up Post Effect
http://www.youtube.com/watch?v=Dy2ULLuKOJ0
loadplugin("gscript.dll")
random(last)
function random(at)
{
rvt=at
ft=at.framecount
rat=at.trim(0,-1)
GScript("""
while (rat.framecount < ft) {
point1=rand(rvt.framecount,seed=false)
rat=rat++rvt.trim(point1,(rand(15,seed=false)+1)*-1)
}
""")
return rat.trim(0,ft-1)
}


One more slide show with a dark and David Lynch like feel to it:
http://www.youtube.com/watch?v=x-YOhrW00EE

tin3tin
25th March 2012, 12:56
A teaser video for an imaginary ebook created in Avisynth script with DVD slideshow GUI:
http://www.youtube.com/watch?v=yx3QzSPqr4U
Photos by Leslie Jones
Music by MFTU with samples of 'New Orleans' by Bobby Hackett
http://soundcloud.com/a-smile/jazz

tin3tin
4th April 2012, 19:47
How do I get the rand function to come up with new values each time it is adressed?
(I would like to get a different video each time the script is run, and right now they are the same)

loadplugin("gscript.dll")
random(last)
function random(at)
{
rvt=at
ft=at.framecount
rat=at.trim(0,-1)
GScript("""
while (rat.framecount < ft) {
point1=rand(rvt.framecount,seed=false)
rat=rat++rvt.trim(point1,(rand(15,seed=false)+1)*-1)
}
""")
return rat.trim(0,ft-1)
}

Guest
4th April 2012, 19:54
Initialize rand at the first call only with a different seed, i.e., set seed = true:

Rand ([int max] [, bool scale] [, bool seed]): returns random integer between 0 and max.
defaults: max = 32768, scale = TRUE, seed = FALSE
Scale = FALSE, modulus mode, (Rand(32768)%limit)
Seed = TRUE, use time as seed

tin3tin
4th April 2012, 20:14
Cool using a rand(seed=true) before the Gscript loop does the trick. Thank you!

loadplugin("gscript.dll")
rand(seed=true)
random(last)
function random(at)
{
rvt=at
ft=at.framecount
rat=at.trim(0,-1)
GScript("""
while (rat.framecount < ft) {
point1=rand(rvt.framecount,Scale = FALSE,seed=false)
rat=rat++rvt.trim(point1,(rand(19,Scale = FALSE,seed=false)+1)*-1).Subtitle(string(point1))
}
""")
rat.trim(0,ft-1)
return rat
}