spektant
13th February 2011, 01:00
Hi, I am new to this forum and Avisynth so I might be wrong but for me merging 2 frames with equal size never works. I have similar code this one is for simplicity -
SetMTMode(2,0)
video = DirectShowSource("D:\some_clip.avi")
frame1 = video
frame2 = video
frame1=Crop(frame1,0,0,28,0,false).AddBorders(0,0,28,0)
frame2=Crop(frame2,28,0,0,0).AddBorders(28,0,0,0)
Merge(frame1,frame2, weight=0.50)
Error says - Merge: Images must have same width and height
If you do the math lets say my clip is 625x352. What my code does (or I think it does) is crop 28 pixels from right part of frame 1 and add 28 pixels black border on their place. Same on frame2 but this time on the left side.
math says - 625-28+28=625 both for frame 1 and 2 , but merge fails due to some reason, and my width should be equal indeed.
SetMTMode(2,0)
video = DirectShowSource("D:\some_clip.avi")
frame1 = video
frame2 = video
frame1=Crop(frame1,0,0,28,0,false).AddBorders(0,0,28,0)
frame2=Crop(frame2,28,0,0,0).AddBorders(28,0,0,0)
Merge(frame1,frame2, weight=0.50)
Error says - Merge: Images must have same width and height
If you do the math lets say my clip is 625x352. What my code does (or I think it does) is crop 28 pixels from right part of frame 1 and add 28 pixels black border on their place. Same on frame2 but this time on the left side.
math says - 625-28+28=625 both for frame 1 and 2 , but merge fails due to some reason, and my width should be equal indeed.