So I am trying to remove the logo from this clip that I have. Luckily I have two different captures, each one with a logo in a different place.
I am trying to remove it by using Mask/Layer, extracting a small part of the logo-less part of one video and stamping it on the other. This of course won't blend in perfectly, which gives me a few ideas:
1. Use a mask that's not rectangular in shape. With an irregular shape it's harder to spot the difference.
2. Blend the surrounding area where I performed this "surgery" with Mask/Layer
3. Add noise/blur to the surrounding area, although this won't look very good because it's a 720p video.
I am sure this has been attempt before, does anyone have ideas/pointers or links to threads discussing this?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 14 of 14
Thread
-
-
If they are identical captures without frame drops, and clean signal (noiseless), then it should blend in perfectly
What is causing it to "not blend in" ? is it noise? or something else ? Can you post a sample or screenshots ?
You can feather a mask (which is basically your #2+3 combined), but if the limiting factor is noise, this won't help -
I do this sort of thing with some frequency. For example, I recently had a video with a godawful logo smack dab in the middle:
I wanted it for both YouTube and for a DVD project I was making. The logo remover could only blur it:
So I found a video of the same song on YouTube, a video inferior in every way except it didn't have a logo. I cut out a small piece of it and overlaid it on top of mine:
And here's the YouTube result.
http://www.youtube.com/watch?v=PO_fvT3GlDs
In spite of my best efforts to match the levels, brightness, and contrast of the 2 videos, I couldn't make it work quite right. I didn't (and still don't) know how to feather the edges, so you can sort of tell that the middle rectangle doesn't exactly match the rest of it. It's still way better than that horrible logo. pdr, how do you blend the edges? The AviSynth script goes something like:
A=LogoVideo
B=NoLogoVideo
B=B.Crop(to the dimensions you want)
Overlay(A,B,X=,Y=)#X and Y being the location where the logo is to go.
Hmmm... I don't know how to put the pics where I want them. Top to bottom they're Original, Blurred Delogo, Final.Last edited by manono; 8th Feb 2011 at 03:37.
-
Hehe, you might be surprised. Here's an outstanding Kathak performance from Satyajit Ray's Jalsaghar (The Music Room):
http://www.youtube.com/watch?v=UWXoX-gSiCo
The dancing starts at about the 45 second mark. -
Last edited by jagabo; 8th Feb 2011 at 08:13.
-
Wouldn't the mask be better with a white-to-black gradient on the side too?
Otherwise you will still see an abrupt transition there (unless the strip is the entire clip width).
The inner white rectangle should be the same size as the logo frame, so the overlay clip needs to be slightly bigger than the original attempt (ie include more of the non-logo clip).
One way to construct such a mask in Avisynth is to create the black and white rectangles with BlankClip, overlay the inner white rectangle on top, then blur the result. -
Thanks for your help, the both of you. And maybe pfxz will benefit. OK, I know how to create a black rectangle slightly larger than the original rectangle, and how to overlay a somewhat smaller white rectangle in the middle. I know how to blur the entire thing to blend between white and black. But I have next to no understanding of alpha blending. The Overlay page at the AviSynth site has an example I don't quite understand that goes something like this (edited to suit this example):
Mask = C.ShowAlpha("RGB").ConvertToYUY2.
\ ColorYUV(Levels="TV->PC")
Overlay(A,B, Mask,X=,Y=)X and Y being the location coordinates
And that's it?
A=the 'original' video with the logo still there.
B=the rectangle of new logoless video.
C= the black and white somewhat larger rectangle.
Somehow I have a feeling that's not quite right, if for no other reason than the Mask coordinates should be slightly different than the B coordinates.Last edited by manono; 8th Feb 2011 at 20:08.
-
If I can suggest a slightly different approach:
I would generate a mask layer the same dimensions as your video in your image editor (photoshop, gimp, etc....) . White is "see-through" or the "cut out area".
1) This way you don't have to worry about x,y positions, and you can adjust the amount of blur right in avisynth, using avsp to increase or decrease instead of having to go back & forth to your image editor.
2) You don't have to use alpha channel either using this method; "white" in the mask becomes the alpha, and the blurred edges are % of transparency (so 50% white would be 50% transparent)
3) You can use non "rectangle" shapes a lot easier
a=original video
b=mask layer, and you can blur this
e.g.
b=imagesource("mask.png").converttoyv12().gaussian blur(5)
c=layer that you want to appear through the mask
Overlay(a,c, mask=b)
If you wanted to increase the blur, adjust it in the gaussianblur(x) , (or replace it with whatever blur algorithm you want)Last edited by poisondeathray; 8th Feb 2011 at 20:01.
-
Thanks! Sounds a bit easier for the clueless like me. Make the mask the same size as the source video. And it has to be a PNG, right? pfxz asked the same question at Doom9 and the first response is similar to yours, poisondeathray, except he reversed the black and white:
http://forum.doom9.org/showthread.php?t=159416 -
actually it doesn't matter if it's png, but png is lossless so it's a good choice. I'm pretty sure white is "see through" , I'll double check - eitherway it's quite simple to invert a mask
when you use the other method with alpha channel , then you need png with alpha (RGBA instead of just RGB)
I'll post an example for the benefit of others that aren't too familiar with avisynth -
Yes, white is "see through".
So I heard purple lipstick is all the rage these days...
Original Layer
Mask Layer
Layer to Show through
Result1 without blur (notice the hard edge)
Result2 with gaussianblur(1) (softer lips, yummier)
a=ImageSource("1 original.png").converttoyv12()
b1=ImageSource("2 mask.png").converttoyv12()
b2=ImageSource("2 mask.png").converttoyv12().gaussianblur(1) #white is "see through"
c=ImageSource("3 purple.png").converttoyv12()
Overlay(a,c, mask=b2)
For those unfamiliar with avisynth:
b1 is the mask plain, b2 is the mask with the blur, if you wanted to feather the mask more, just increase the value
In this example, converttoyv12() is only needed because the gaussianblur requires YUV colorspace ; Overlay will work with RGB as well ; you can mix & match actually
I uploaded the files in a zip file in case the imagehost goes down, and people can play with the script
Apparently there is a way to adjust the mask size using masktools in avisynth to increase/decrease , mt_expand or something like that.... I'm not sure how to do that, maybe jagabo or gavino knowsLast edited by poisondeathray; 8th Feb 2011 at 20:40.
Similar Threads
-
replicate dirt on logo removal
By mathmax in forum EditingReplies: 26Last Post: 11th Oct 2011, 17:35 -
2 audio sources at the same time
By daveealex in forum DVD & Blu-ray PlayersReplies: 1Last Post: 17th Apr 2011, 22:38 -
LOGO removal from WIdescreen black bar
By CBrianA in forum EditingReplies: 2Last Post: 6th Feb 2010, 09:10 -
Good Results on Video to Photo Logo Removal?
By Disco Makberto in forum EditingReplies: 28Last Post: 14th Dec 2009, 19:40 -
Removal of TV logo from VOB files?
By guy24s in forum EditingReplies: 6Last Post: 16th Nov 2009, 22:25