Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th September 2012, 16:25   #1  |  Link
mariasx
Registered User
 
Join Date: Sep 2012
Posts: 4
Overlay with video where mask is grayscale video

Is it possible to overlay video with mask in grayscale?

I have not working code:

Code:
clip1 = AviSource("d:\Dropbox\video\under.avi")
clip2 = AviSource("d:\Dropbox\video\over.avi")
maskclip=AviSource("d:\Dropbox\video\mask.avi").ConvertToRGB32
Overlay(clip1, clip2, mask=ShowAlpha(maskclip))
Thanks a lot
mariasx is offline   Reply With Quote
Old 12th September 2012, 18:04   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
If mask.avi is not already RGB32, then ConvertToRGB32 will simply add an all-black alpha layer.

Probably what you want is simply:
Code:
clip1 = AviSource("d:\Dropbox\video\under.avi")
clip2 = AviSource("d:\Dropbox\video\over.avi")
maskclip=AviSource("d:\Dropbox\video\mask.avi")
Overlay(clip1, clip2, mask=maskclip)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 13th September 2012, 10:34   #3  |  Link
mariasx
Registered User
 
Join Date: Sep 2012
Posts: 4
I re-encoded maskclip with Virtual Dub using (Uncompressed RGB/YCbCr) and now it works great.

Thanks a lot, you are my personal hero :-)
mariasx is offline   Reply With Quote
Reply

Tags
mask, overlay

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.