digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Compositing two videos vertically? (https://www.digitalfaq.com/forum/video-restore/7118-compositing-two-videos.html)

premiumcapture 03-26-2016 11:21 AM

Compositing two videos vertically?
 
Hello,

With Avisynth, what would be the best way to composite a top and bottom portion of a frame between two identical copies of a video? One video's tape is damaged where a portion below has a line for about 20 minutes and another video has a different portion damaged above.

Thanks

lordsmurf 03-27-2016 01:10 AM

This is my before/after script. It makes side-by-side or top/bottom before/after clips. But you can use it here.

Code:

clip1=AVISource("c:\.avi")
clip2=AVISource("c:\.avi",false).Trim(10,0)

clip1=ConvertToYUY2(clip1)
clip2=ConvertToYUY2(clip2)

# left/right 640x480 source
#StackHorizontal(clip1.crop(0, 0, -320, -0), clip2.crop(320, 0, 0, -0))

# left/right 720x480 source
#StackHorizontal(clip1.crop(0, 0, -360, 0), clip2.crop(360, 0, 0, 0))
#StackHorizontal(clip2.crop(0, 0, -360, 0), clip1.crop(360, 0, 0, 0))

# top/bottom - 640x480 and 720x480 source
#StackVertical(clip1.crop(20, 0, 0, -240), clip2.crop(14, 240, -6, 0))
#StackVertical(clip2.crop(0, 0, -20, -240), clip1.crop(6, 240, -14, 0))

# left/right 720x480 source side-by-side
#StackHorizontal(clip1.crop(0, 0, 360, 0), clip2.crop(360, 0, 0, 0))
#StackHorizontal(clip2.crop(0, 0, 0, 0), clip1.crop(0, 0, 0, 0))
#spline36resize(640,480)
#spline36resize(960,360)

Notes:
false = no audio
trim = frames not in sync between before and after, so I needed to adjust it

You need to uncomment what's needed. Probably just the top/bottom. I can access this on the share drive, but not test it right now. So hopefully that'll be enough to get you going.

Is that what you want?
A script to replace top with file A, while bottom is still file B?


All times are GMT -5. The time now is 12:35 AM

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.