PDA

View Full Version : duplicating frames


coordz
6th May 2008, 15:41
I've got a short set of images (flickbook style animation) that I want to serve as an AVI. I used

ImageSource("shark_%04d.tif", 1, 20, 25)

but the animation was too fast. To slow the animation down I used

ImageSource("shark_%04d.tif", 1, 20, 25).ChangeFPS(250).AssumeFPS(25)

which almost works except the first frame is duplicated 5 times, the intermediate frames 10 times and the last frame 15 times. This means when the animation loops the animation isn't quite steady. How can I get avisynth to duplicate every frame 10 (or however many) times and have the FPS set to 25?

TIA

roozhou
6th May 2008, 17:24
why not set fps to 2.5?

try
ImageSource("shark_%04d.tif", 1, 20, 2.5)

thetoof
6th May 2008, 17:28
You could set another end time... if you want to duplicate every frame 10 times with the settings you gave, use a end time of 200 instead of 20.

coordz
6th May 2008, 20:33
why not set fps to 2.5?

try
ImageSource("shark_%04d.tif", 1, 20, 2.5)
The final AVI is going to be used in a PAL production so I want 25 real images per second rather than fiddling with the framerate.

@thetoof How do I do that? You mean if I set a negative start frame and an end frame beyond the real end then avisynth will duplicate the frames? Could you give an example script?

:thanks:

Wilbert
6th May 2008, 22:57
How can I get avisynth to duplicate every frame 10 (or however many) times and have the FPS set to 25?
ImageSource("shark_%04d.tif", 1, 20, 25).AssumeFPS(25).SelectEvery(1,1,1,1,1,1,1,1,1,1,1)

should do the trick (duplicate 10 times), but there should be a smarter way.

thetoof
7th May 2008, 04:20
My suggestion was just... bad, sorry. Here's a somewhat better one.
The following is still not elegant, but it should do the trick (repeat every image 10 times).
ImageSource("1.tif", end = 10)
ImageSource("2.tif", end = 10)
ImageSource("3.tif", end = 10)
ImageSource("4.tif", end = 10)
ImageSource("5.tif", end = 10)
ImageSource("6.tif", end = 10)
ImageSource("7.tif", end = 10)
ImageSource("8.tif", end = 10)
#etc.(since you only have 20 images, it shouldn't be too long to copy-paste and change 1 value per line)
assumefps(25)

stickboy
7th May 2008, 04:28
Was this bug with ChangeFPS never fixed?

Well, you could use the RepeatEveryFrame function from my ApplyEvery plug-in (http://www.avisynth.org/stickboy/).

coordz
7th May 2008, 12:10
I went with

ImageSource("shark_%04d.tif", 1, 20, 25).SelectEvery(1,0,0,0,0,0,0,0,0,0,0).AssumeFPS(25)

as I didn't want to cut'n'paste. Note the AssumeFPS moved to the end of the line and zeroes to include first frame correctly.

@stickboy good plug-ins :) I'll be adding them to my toolbox.