Hi guys,
You know how we load subs where we specify the start and end frame where it should appear.
I want to load images like that...
You see I need to load an image A, then let it stay on the screen while I add image B, and then C all being added say 5 secs after the other...
But when I have to generate this using the Overlay and trim -
e.g:
Overlay(\
Overlay(Main.trim(541,,dash1,40, 350,mode="blend",mask=dash1.ShowAlpha(), opacity=1)\
.trim(601,0),dash2,40, 400,mode="blend",mask=dash2.ShowAlpha(), opacity=1)
it becomes tedious, with lots of repetition of code, cause you have to overlay one image, and use that code and overlay the second image - and it's quite processor intensive... and when you have several images to add (as overlay over a running video) it becomes very annoying....
So is there a way to simply specify start and end frames for an image to appear? like we do for the subs?
Thanks,
Reuben
+ Reply to Thread
Results 1 to 3 of 3
-
-
So just write it as a function that takes the background video, the overlay video, and the starting/ending frame numbers. Here's a standalone example:
Code:function OverlayAt(clip bg, clip ov, int start, int end, int x, int y) { # bg = background clip # ov = overlay clip # start = starting frame for overlay # end = ending frame for overlay beg = bg.Trim(0,start-1) mid = bg.Trim(start,end-1).Overlay(ov, x=x, y=y) end = bg.Trim(end,0) beg + mid + end } Main = ColorBars().Trim(0,499).RGBAdjust(r=0.3,g=0.3,b=0.3) dash1 = ColorBars().Trim(0,499).BilinearResize(128,128) dash2 = dash1.Invert().BilinearResize(128,128).TurnRight() Main OverlayAt(last, dash1, 100, 200, 200, 100) OverlayAt(last, dash2, 150, 250, 250, 150)
<edit>
I modified the script I originally posted, adding parameters to set the x and y positions of the overlay, and smaller overlay images. As you can see, the overlays can overlap both spacially and temporally.
</edit>Last edited by jagabo; 28th Jan 2017 at 08:19.
-
Just a quick question if I may... are you wishing to overlay videos or images over original video? Will they need to be all on screen at once as in different places? Will they ever need to be overlapped like image1=frame 160-180, image2= frame 170-190?
Similar Threads
-
Loading an MP4, MTS, or M2TS in Avisynth
By SameSelf in forum Video ConversionReplies: 2Last Post: 15th Jan 2016, 09:41 -
Problems loading plugins into AVISynth
By bvdd in forum Video ConversionReplies: 51Last Post: 20th Nov 2015, 07:15 -
HELP! MeGUI can't load certain avisynth plugins
By Throw_Hammer in forum Newbie / General discussionsReplies: 3Last Post: 22nd Feb 2014, 17:19 -
Avisynth error when loading a script in virtualdub, please help
By auto7890 in forum EditingReplies: 10Last Post: 28th Nov 2013, 19:48 -
Recurrent Problem loading AVSI scripts with AVISynth
By Sartorius48 in forum Newbie / General discussionsReplies: 37Last Post: 30th Dec 2012, 06:38