View Full Version : one frame (picture)each 24 frames
arturjose
27th November 2006, 16:08
how to add/join one frame (picture) each 24 frames automatically?
Virtualdub can made this ?
thank you
mitsubishi
27th November 2006, 16:51
Hi, if I understand you right, you can do this with an Avisynth script
ImageSource("image.png", end=24,fps=24)
Or if you mean 24 different numbered images like this
ImageSource("image%d.png", start=1,end=24,fps=24)which will make image1.png to image24.png into a video.
DarkZell666
27th November 2006, 16:54
Do I understand you are trying to convert a video's framerate from 24fps to 25fps (or from 25 to 24 ?) vdub can do this using the "Video > Frame rate" options.
I might have misinterpreted what you said so please be more precise. Why do you want to do this ?
Edit: @mitsubishi: I think he want's to take 24 frames from a video file, insert an external image, take 24 next frames from video file, insert next external image, etc ...
The question is: why ? :)
arturjose
27th November 2006, 17:05
thank you :
Ex.
24 frames + 1 External picture + 24 frames + 1 external picture.............
the help from mitsubishi result, to do this ?
thank you
:)
Inventive Software
27th November 2006, 18:08
You want to add an external picture each 24 frames, basically? I'm not sure AviSynth or VirtualDub can do this, short of you doing it manually. How long is the movie in frames?
arturjose
27th November 2006, 18:12
four or five minutes, thank you inventive
Inventive Software
27th November 2006, 19:02
You should be able to get away with that manually, if it's 4 or 5 minutes.
foxyshadis
27th November 2006, 19:57
Look up the documentation on avisynth's Interleave. Combined with imagesource it should give you what you need.
mitsubishi
27th November 2006, 23:57
I tried interleave, but it seems there's no way of specifying number of frames, if you do repeat video 24 times, followed by a image it just gives the same frame 24 times.
Baring in mind I've never written a function yet in Avisynth I thought I'd give it a crack as a learning exercise I got this to work:
image = ImageReader("image.png", end=3).converttoyv12()
video = DirectShowSource("videoclip.mpg", audio = false).BilinearResize(640,480)
position = -25
function AddImages(video,image,position)
{
position = position + 25
return (video.FrameCount() - position > 24) ? video.Trim(position, position+24) + image.AssumeFPS(video.framerate()).Trim(1,1) + AddImages(video, image, position) : video.Trim(position, 0)
}
Addimages(video,image,position)
This will replace every 25th frame with the image, is that how you want it to work. It won't work an avi it seems, it just closes the player...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.