jmac698
28th December 2010, 12:41
Hello,
I'd like to script a pan/zoom effect across the video, but found I couldn't simply put animate's of different ranges one after the other. How do I accomplish what I intend?
#create demo video
shiftx=0#x<0 is left, dx from MDpan will be opposite to undo it
shifty=0#y<0 is down, dy will have opposite sign
zoom=1
aspect=1#zx/zy
kenburns="zoomshift"
startframe=500
#Sequence 1, pan left
panspeed=50
sxstart=280#maximum right side pan
len=10#in frames
sxend=sxstart-len*panspeed
endframe=startframe+len-1
animate(ws,startframe,endframe,kenburns,zoom*aspect,zoom,sxstart,0,zoom*aspect,zoom,sxend,0)
startframe=endframe+1
#Sequence 2, zoom in
zoomspeed=.05
zstart=1
len=10#in frames
zend=zstart+len*zoomspeed
endframe=startframe+len-1
#Two animates can't combine in sequence like I'd expect
#animate(ws,startframe,endframe,kenburns,zstart*aspect,zstart,sxend,0,zend*aspect,zend,sxend,0)
I intend to pan for 10 frames, then zoom for 10 frames, but the second animate seems to ignore the first one.
I'd like to script a pan/zoom effect across the video, but found I couldn't simply put animate's of different ranges one after the other. How do I accomplish what I intend?
#create demo video
shiftx=0#x<0 is left, dx from MDpan will be opposite to undo it
shifty=0#y<0 is down, dy will have opposite sign
zoom=1
aspect=1#zx/zy
kenburns="zoomshift"
startframe=500
#Sequence 1, pan left
panspeed=50
sxstart=280#maximum right side pan
len=10#in frames
sxend=sxstart-len*panspeed
endframe=startframe+len-1
animate(ws,startframe,endframe,kenburns,zoom*aspect,zoom,sxstart,0,zoom*aspect,zoom,sxend,0)
startframe=endframe+1
#Sequence 2, zoom in
zoomspeed=.05
zstart=1
len=10#in frames
zend=zstart+len*zoomspeed
endframe=startframe+len-1
#Two animates can't combine in sequence like I'd expect
#animate(ws,startframe,endframe,kenburns,zstart*aspect,zstart,sxend,0,zend*aspect,zend,sxend,0)
I intend to pan for 10 frames, then zoom for 10 frames, but the second animate seems to ignore the first one.