I'm Brazilian, so sorry for my English.
I want to remove a watermark from a video. I have two sources. The first one has the watermark on the right, the second one has the watermark on the left, as shown below:
In Sony Vegas, I have merged the two videos, using the second one as the main source, trying to remove the watermark using the first one. That's what I get:
Nothing complex here. Of course I have to correct brightness, color, etc, in order to have a better result. But even doing so, the result is not as smooth as I expect. Does anyone have any suggestion to balance the two sourcer in terms of brightness, contrast, color, etc? Thanks!
+ Reply to Thread
Results 1 to 30 of 36
-
-
Look for the "Bezier Masking" tool. It's inside the "Pan/Crop" tool. You simply draw a mask where you want it. You also have to color match the images.
This example clearly illustrates the logo removed. But the images are not color matched so you can see the work area as a brighter rectangle.
Last edited by budwzr; 27th Feb 2015 at 00:26.
-
You have other problems than color and levels matching - the aspect ratio and field of view is different . So in some other frames the "patch" won't match even if you matched the color & levels, because the frames aren't aligned
And are you sure you want to do it that way ?
Source 1 looks better in terms of quality & detail, but Source 2 has a larger field of view. Source 2 looks like a bad upscale or poorly resized
I would probably try to align them (it's going to be a non centered, non linear resize), and take Source 1 as the main source (since it looks better in terms of details), and fill in the periphery and cover the right logo with Source 2 -
Agreed. No problem in using Source 1 as the main source, since both sources are already aligned.
But is there any automatic tool that could match the colour of the two sources? I have tried to do this manually, and I can get a good result, but one always can notice that annoying rectangle if looks closer. -
Yes there are automatical tools that match color. eg. RE:Vision Effects Re:Match. It's also available for Vegas
http://www.revisionfx.com/products/rematch/
A free method would be colourlike() in avisynth
You don't want to match 1 to 2 either, in terms of color or levels, because they are wrong (low contrast, wrong levels)
But as mentioned above, you have more problems than just color and levels. They might be temporally aligned (same frames), but they are not spatially aligned
Do you have a short sample video of both ? -
Yes I do.
Source 1:
https://www.youtube.com/watch?v=iZ6MC7OFUSk
Source 2:
https://www.youtube.com/watch?v=n8LomfRcHJw -
preferably a non re-encoded sample . Cut directly from source. Youtube will re-encode it. You can upload directly here (push the upload files button)
-
Last edited by smrpix; 27th Feb 2015 at 09:31.
-
Is that The Beatles before they came to America? Or the Monkees?
-
-
<edit>
Note that I used the videos downloaded from youtube because I did this before virguloso provided his mpg sources.
</edit>
Just feather the edges or the overlay mask. I didn't even bother to match levels and colors but you can barely see the overlay most of the time. Note that the clear image did not extend all the way to the edge of the frame so a little bit of the logo is still visible at the far left.
Code:v1 = ffVideoSource("source1.mp4").BilinearResize(456,342).ConvertToRGB().AddBorders(82,9,102,9).ConvertToYV12() v2 = ffVideoSource("source2.mp4") omask = ImageSource("mask.png").ConvertToYV12(matrix="pc.601") Overlay(v2,v1,mask=omask) Crop(74,0,-86,-0)
Last edited by jagabo; 27th Feb 2015 at 11:26.
-
EDIT: Here we go, I got it. Just needs Pan/Crop adjustment to line up. Here's the project file. http://files.videohelp.com/u/135518/Untitled.veg. Use the samples you posted as the missing media.
First get the Pan/Crop correct, then adjust the timing, then adjust Brightness/Contrast, and voila?
Last edited by budwzr; 27th Feb 2015 at 11:33.
-
I have it very close now. Here's the updated Vegas File http://files.videohelp.com/u/135518/Untitled_2.veg. You should be all set. Just fine tune the Brightness/Contrast I already set up. You might have to keyframe a little.
Last edited by budwzr; 27th Feb 2015 at 11:53.
-
I got the MPG 2 files and adjusted my script:
Code:v1 = Mpeg2Source("source1.d2v").Trim(7,0) v2 = Mpeg2Source("source2.d2v").BicubicResize(720,576, 0.33, 0.33, 95,15, 514, 546).ColorYUV(gain_y=67, off_y=-2, cont_u=-50, cont_v=20).ColorYUV(off_y=27).ColorYUV(off_y=-27) omask = ImageSource("omask.png").ConvertToYV12(matrix="pc.601").Blur(1.0).Blur(1.0).Blur(1.0) Overlay(v2,v1,mask=omask)
The patch is nearly invisible now. -
Nice work jagabo. Very clean. I was unable to get a clean box using Vegas. So you fuzzed the edge of the box and used a resize filter during rerender to clean it up?
Can you lay it out in NLE terms? For us that don't code?Last edited by budwzr; 27th Feb 2015 at 13:03.
-
Last edited by jagabo; 27th Feb 2015 at 13:09.
-
I overlaid the two videos, scaled appropriately, changed the contrast, gamma and pedestal values, masked the left logo and cropped the crap. Here is the first song, with legal levels and I removed the color noise.
vid.mp4
I am not really a Pink Floyd fan but I like this song:
-
Last edited by budwzr; 27th Feb 2015 at 13:49.
-
Very impressive jagabo! Unfortunately, I can't run your script. I got the message: "I don't know what "omask" means". Do you know how to fix this? It is not a problem with the omask.png file, I've already checked that.
-
-
I still can't run it. I'm new with avisynth. Seems that v1 and v2 are correctly loaded. The problem is with omask. Is that what are you suggesting me to do?:
Code:v1 = Mpeg2Source("source1.d2v").Trim(7,0) v2 = Mpeg2Source("source2.d2v").BicubicResize(720,576, 0.33, 0.33, 95,15, 514, 546).ColorYUV(gain_y=67, off_y=-2, cont_u=-50, cont_v=20).ColorYUV(off_y=27).ColorYUV(off_y=-27) return(omask) omask = ImageSource("omask.png").ConvertToYV12(matrix="pc.601").Blur(1.0).Blur(1.0).Blur(1.01,mask=omask)
-
nice work jagabo
It looks like the part of the script is cut off, at least in firefox. There is a bug with the code boxes and displaying text on this message board, at least on some versions of browsers
It looks like this to me for jagabo's last line
omask = ImageSource("omask.png").ConvertToYV12(matrix="pc. 601").Blur(1.0).Blur(1.0).Blur(1.01,mask=omask)
omask = ImageSource("omask.png").ConvertToYV12(matrix="pc. 601").Blur(1.0).Blur(1.0).Blur(1.01,mask=omask
But I think it should be
omask = ImageSource("omask.png").ConvertToYV12(matrix="pc. 601").Blur(1.0).Blur(1.0).Blur(1.0)
overlay(v2,v1,mask=omask)
Not to take anything away from jagabo, but you should be able to get similar results in vegas (or any NLE) by aligning the frame and matching the waveform and RGB histogram
EDIT: even when I refresh the browser, the text in the quote or code boxes get mashed up. Even the matrix is abbreviated, missing lettersLast edited by poisondeathray; 27th Feb 2015 at 19:51.
-
-
And source 2 isn't as "bad" quality wise as your initial screenshot suggested
-
Last edited by budwzr; 27th Feb 2015 at 21:42.
-
Yes, I though it was in interesting little project. I posted the script to show it could be done fairly well with these clips. I hoped it would provide hints that be useful in Vegas.
Note that the color/levels adjustments I made were adequate for removing the logo because of the limited colors that appeared in that area. If a wider range of colors had appeared there the match wouldn't have been close enough:
The left 2/3 of that image has the original colors of sourc1.mpg. The right 1/3 has the colors of source2.mpg after my adjustments.Last edited by jagabo; 28th Feb 2015 at 08:40.