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 11th September 2015, 22:34   #1  |  Link
beastbg8
Registered User
 
Join Date: Jan 2015
Posts: 5
Masking a logo

Hello. I have two sources of the same video with logos on different places.

I'm trying to mask the logo from source 1 with the logoless region of source 2. Any ideas how to do it properly?

Last edited by beastbg8; 11th September 2015 at 22:46.
beastbg8 is offline   Reply With Quote
Old 12th September 2015, 03:54   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 1,985
My NLE is Vegas, and it is a snap to do what you want using that application. It has masking built in, and you can interactively build the mask, feather the edges, etc. You can also adjust the color and gamma of your two captures which, I assume, do not match. Your two captures also may not align, and may have a slightly different magnification, or maybe even a slightly different aspect ratio.

I would never, ever consider doing this in AVISynth because you are really going to need to have interactive feedback about all the things I just mentioned.

This is not idle speculation on my part. About a year ago I was given the task of taking a pristine Canadian film, which only had a French audio channel, and was unavailable with either English audio or English subtitles, and cut into that video hard-coded subtitles from an old VHS transfer of the same film. It was a labor of love for a sick next-door neighbor and took several hours of work, with a lot of hand-tweaking. But it worked, and worked well.

I've also done work for a sports film collector, combining several sources together, some of which have "bugs" (logos) and others of which do not. That's the exact same problem you are trying to solve.
johnmeyer is offline   Reply With Quote
Old 12th September 2015, 05:53   #3  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
If the logos are static, you can draw a mask in your image editor of choice to cover the logo in the first source, give it a bit of blur to smoothen the transition, then use mt_merge to blend accordingly. However, as johnmeyer has also mentioned, you do need to make sure the sources align more or less perfectly and have the same colours.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 12th September 2015, 06:19   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,145
Not that hard although, as said, the two videos have to be aligned correctly. So some cropping and/or resizing might be needed. If they already align, then so much the better. If the colors/levels/brightness/contrast/saturation aren't identical then some tweaking there might be called for as well. Otherwise, make the mask, allowing for some feathering so they blend into each other better. If for example, the logo is in the upper right corner of Video1.avi, something like this (I am enclosing a JPG because of the smaller size):

A=AVISource("Video1.avi")
B=AVISource("Video2.avi")
Mask=ImageSource("Logo.bmp")
Overlay(A,B,0,0,Mask)
Attached Images
 

Last edited by manono; 12th September 2015 at 06:21.
manono is offline   Reply With Quote
Reply

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 20:28.


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