Log in

View Full Version : 100 frames fast slideshow


djembe
31st July 2012, 06:56
i've got an animation consisting of 100 frames. not enough to last more then few seconds. i would like to turn it into a fast slideshow, say, 1frame per second. each frame crossfading into another. i don't want motion estimation like mvtools, just frames fading into each other. and i have no time to do it manually in premiere. may avisynth help? desired output is an avi file ofcourse.

jmac698
31st July 2012, 08:13
Something like this should help (untested)

anim=...
anim=anim.assumefps("ntsc_video")
slowfps=anim.framerame*30#1fps
v1=anim.changefps(slowfps)
v2=v1.trim(15)#.5 second offset
dissolve(v1,v2)

Didée
31st July 2012, 09:48
Dissolve it is not. That will only fade the first picture.

In fact it's a bit tricky with just Avisynth internal filters. Temporalsoften is the one, but alas it's limited to a temporal window of max. [n-7,n+7] frames.

# Read files "000.jpg" to "099.jpg"

ImageSource("E:\%03d.jpg", 0, 99)
converttorgb32()

# E.g.: 12-frames-crossfade at 24fps (50% raw frame presentation time, 50% fading time)
# AssumeFPS(1)
# ChangeFPS(24)
# temporalsoften(6,255,255)


# E.g.: 24-frames-crossfade at 24fps (0% raw framepresentation time, 100% fading time)
# AssumeFPS(1)
# ChangeFPS(12)
# temporalsoften(6,255,255)
# ChangeFPS(24)
# Merge(SelectEvery(1,-1))


For long fading times - perhaps even [much] longer than 1 second - it is easier to use "BlendFPS" from mg262's "motion.dll". ("Motion_06Dec05B.dll")

LoadPlugin("Motion_06Dec05B.dll")

ImageSource("E:\%03d.jpg", 0, 99)

# AssumeFPS(1)
# BlendFPS(24,aperture=1)

Or, for example, a 5-seconds-fading with a longer non-blended presentation time :

# AssumeFPS(1)
# BlendFPS( 24*5, aperture = 24*5 - 12) # 5 seconds fading, minus/including 12 frames non-blended presentation
# AssumeFPS(24)

Gavino
31st July 2012, 10:07
Another approach, using GScript and Dissolve:
anim = ...
anim.AssumeFPS(1).ChangeFPS(45) #repeat each frame 45 times (1 sec + 0.5 sec overlap)
vid = Trim(15, -30) # first second
GScript("""
for (f=45, Framecount-45, 45) {
next = Trim(f, -45) # next second, incl overlap
vid = Dissolve(vid, next, 15)
}
""")
return vid.AssumeFPS("ntsc_video")

djembe
31st July 2012, 10:55
thank you, Didée. works fine. the code i used:



LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\Motion_12Dec05.dll")

ImageSource("C:\Documents and Settings\Ja\Moje dokumenty\3dsmax\renderoutput\city%04d.jpg", 1, 100)
converttorgb32()

# E.g.: 24-frames-crossfade at 24fps (0% raw framepresentation time, 100% fading time)
AssumeFPS(1)
BlendFPS( 24*2, aperture = 24*2 - 12) # 2 seconds fading, minus/including 12 frames non-blended presentation
AssumeFPS(24)



and the result: http://www.youtube.com/watch?v=rW9iJwwKVFY

djembe
31st July 2012, 11:09
another example:


LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\Motion_12Dec05.dll")

ImageSource("C:\Documents and Settings\Ja\Moje dokumenty\3dsmax\renderoutput\city%04d.jpg", 1, 100)
converttorgb32()

# E.g.: 24-frames-crossfade at 24fps (0% raw framepresentation time, 100% fading time)
AssumeFPS(1)
ChangeFPS(12)
temporalsoften(6,255,255)
ChangeFPS(24)
Merge(SelectEvery(1,-1))


http://www.youtube.com/watch?v=wi2AvdW-Bww