Starduster
7th August 2010, 21:52
I'm trying to join a .swf to a video and then another .swf. Each .swf is supposed to display for 5 seconds. When I play the output, the images display then blank, then display, over and over for 5 seconds. .jpg's and .gif's are ok. I took the "Loop()" out of the following code and they don't flash, but they are only displayed for a split second.
Can anyone tell me how to make each .swf display for the given time?
picsrc="slide1.swf"
picsrc2="slide2.swf"
vidsrc="ET_AppShare1.avi"
t=5.0 #[time in sec]
vd=DirectShowSource(vidsrc)
fc=Round(t*FrameRate(vd))
LoadVFAPIPlugin("swf.vfp","SWFSource")
fv=SWFSource(picsrc).flipVertical.AssumeFPS(vd).Loop().Trim(0,fc-1).ConvertToRGB32()
fa=Tone(length=t, type="Silence", samplerate=AudioRate(vd), channels=AudioChannels(vd))
AudioDubEx(fv,fa)
vasr=float(vd.Height)/float(vd.Width)
pasr=float(fv.Height)/float(fv.Width)
nW=round(vd.Width*(vasr/pasr))
xx=(vd.Width-nW)
Spline36Resize(nW, vd.Height).AddBorders(xx/2,0,xx/2,0)
p1 = last
fv=SWFSource(picsrc2).flipVertical.AssumeFPS(vd).Loop().Trim(0,fc-1).ConvertToRGB32()
fa=Tone(length=t, type="Silence", samplerate=AudioRate(vd), channels=AudioChannels(vd))
AudioDubEx(fv,fa)
Spline36Resize(nW, vd.Height).AddBorders(xx/2,0,xx/2,0)
p1 ++ vd ++ last
Can anyone tell me how to make each .swf display for the given time?
picsrc="slide1.swf"
picsrc2="slide2.swf"
vidsrc="ET_AppShare1.avi"
t=5.0 #[time in sec]
vd=DirectShowSource(vidsrc)
fc=Round(t*FrameRate(vd))
LoadVFAPIPlugin("swf.vfp","SWFSource")
fv=SWFSource(picsrc).flipVertical.AssumeFPS(vd).Loop().Trim(0,fc-1).ConvertToRGB32()
fa=Tone(length=t, type="Silence", samplerate=AudioRate(vd), channels=AudioChannels(vd))
AudioDubEx(fv,fa)
vasr=float(vd.Height)/float(vd.Width)
pasr=float(fv.Height)/float(fv.Width)
nW=round(vd.Width*(vasr/pasr))
xx=(vd.Width-nW)
Spline36Resize(nW, vd.Height).AddBorders(xx/2,0,xx/2,0)
p1 = last
fv=SWFSource(picsrc2).flipVertical.AssumeFPS(vd).Loop().Trim(0,fc-1).ConvertToRGB32()
fa=Tone(length=t, type="Silence", samplerate=AudioRate(vd), channels=AudioChannels(vd))
AudioDubEx(fv,fa)
Spline36Resize(nW, vd.Height).AddBorders(xx/2,0,xx/2,0)
p1 ++ vd ++ last