First time ever using InpaintDelogo, finally got it to work but now I am getting strange results for my bmp files.
At first I tried to use Automask but it ended up giving weird results (probably because video is very short, 14 seconds) so then I quickly drew my own mask with GIMP just to test it out, I set automask to 0 and put in my own bmp and it gives this error:
[Attachment 76276 - Click to enlarge]
This error never appears for bmp created by automask, what is wrong?
Here is my custom mask that doesn't work:
[Attachment 76275 - Click to enlarge]
+ Reply to Thread
Results 1 to 12 of 12
-
-
In the gimp bmp export options, twirl open advanced options and checkmark "24bit R8 G8 B8" when saving
-
Thanks, the images work now, but now there is a new issue, the previous mask that I uploaded is working fine, obviously the mask doesn't really fit that well but it is doing what it is supposed to do, so I went into GIMP again and created a better fitting mask:
[Attachment 76278 - Click to enlarge]
And now it gives this weird results:
[Attachment 76277 - Click to enlarge]
Also as another side note, when the mask does work, the colors look very strange and wrong, why is this? how can i make the colors match the video better? Also it seems the bottoms of the letters do not get changed in delogopp window
[Attachment 76279 - Click to enlarge] -
Okay, I figured out how to fix the mask but I'm still getting this weird color correction going on, video is purple-ish on the mask for some reason, also strange shapes on mShow=1? Does it mean anything? My main issue is the colors right now
[Attachment 76288 - Click to enlarge]
[Attachment 76289 - Click to enlarge]
Here are my files for the project: https://pixeldrain.com/u/JMxk1usELast edited by DaintyTurnip39; 19th Jan 2024 at 20:04.
-
In "Show=1" you can see that your mask is not correct, only some dot in the middle, that's because mask in bmp is not full white.
Btw, there is "Show=2" with more complete views of the masks and steps.
This another mask you drew has obviously wrong shape.
Now the basemask looks OK, but you have problems creating the deblending masks, you can see in "alpha" various artifacts, there should be only alpha of the logo in black background.
This is because there is no suitable frames to auto built the correct deblending masks.
You could make it manually in Photoshop, that's in theory, but you won't be able to replicate transparency at the edges, but there is option to inpaint the edges...
In practice there are other ways:
1. Find solid black/dark and solid white/bright frames with logo. Use with "Analyze=-4".
2. Find at least one solid black/dark frame with logo.
3. Get other videos in same resolution with the same logo as many as you can and chain them for analysis.
4. Work on this 14 seconds video and edit masks in ebmp.
Notes:
There are no solid black/dark frames in this video. [actually no any solid frame at all]
Those frames can be from another video with the same logo.
"edit masks in ebmp" -> Parameters for the ebmp masks editing [but that is understandable only for the experts]Last edited by VoodooFX; 19th Jan 2024 at 22:47. Reason: edited "Notes"
-
-
You could make it manually in Photoshop, that's in theory, but you won't be able to replicate transparency at the edges, but there is option to inpaint the edges...
After fiddling with some things I can get some better colors, but the high contrast areas still look pretty bad, for example under the truck in this screenshot.
[Attachment 76309 - Click to enlarge]
Something interesting to note is that I found another video posted by this group where there is a point of the watermark being completely black, is it possible to extract the percent opacity assuming that the watermark is completely white and then apply that to the logo alpha?
[Attachment 76310 - Click to enlarge] -
Those parameters are "only for the experts" for a reason. You won't go anywhere randomly adjusting them, and your questions increase by the geometrical progression...
Your real option here - get exact same logo in the same dimensions in the black background.
Other options are overcomplicated for you [or in general].
Notes:
Your posted video is re-encode.
Even making ideal deblend mask won't guaranty ideal deblend result, because your video quality is not good.
The basemask can be more precise.Last edited by VoodooFX; 20th Jan 2024 at 01:28.
-
This is practically impossible, however, using the video from the last post I can figure out the opacity of the watermark or just guess some random percentages that are multiples of 5, because I doubt much effort was put into these watermarks, and then replace the "logo alpha" with my own custom mask which has everything correct. I am assuming that YAlphaExternal is the function that does this, but whenever I put in a path to a bmp it gives error:
Code:"YAlphaExternal" must be a clip.
Edit: I was actually able to recreate what I had in mind with some more functions, but it's still not looking that great, very lost on what to do at this point, this is essentially the thing that you were saying was my only option right?
[Attachment 76321 - Click to enlarge]
Does this affect the transparencies enough that the watermark is no longer just a white logo with lowered transparency but slightly changed due to compression making deblend impossible?Last edited by DaintyTurnip39; 20th Jan 2024 at 13:39. Reason: Edit
-
-
My original reason for trying out InpaintDelogo was to create a faster and better method of removing transparent logos because I already had a method of doing it that was pretty slow and finnicky. So I tried my older method, of using a .png of the watermark and then multiply it with the original video, and then screen with the watermark again, then merge it back with the original video with difference (I'm not really sure how it works but it usually give pretty good results after changing some of the "Blend" sliders for the merge nodes), and based on the results it rules out this compression making it impossible to deblend that I was talking about.
[Attachment 76352 - Click to enlarge]
Maybe my deblend settings are just bad? Do you think you can try making your own script to see if you can get better results? I have my project files linked a few posts ago. I know that I already have a pretty good watermark removal but I would love to see how you would do it so I can use this tool for future videos. -
I dunno what you do there in those nodes, but I don't see how it can "rule out" that problem.
This not exactly how I would do it, just the quick examples for you:
Code:LWLibAvVideoSource("D:\video_2024-01-20_05-15-18.mp4") n=ImageSource("D:\comeon.bmp").Trim(0,-1).Crop(250,210,-280,-190).ConvertToY.mt_inpand InpaintDelogo(mask=n, Loc="250,210,-280,-190", Analyze=3, Mode="Deblend", Inflate=2, Optimize2=2, dPP=-5, \ YAlphaSolidOuts=0, YColorSolid=235, YOffsetOuts=0, \ YAlphaSolidIns=52, YOffsetIns=0)
Code:LWLibAvVideoSource("D:\video_2024-01-20_05-15-18.mp4") n=ImageSource("D:\comeon.bmp").Trim(0,-1).Crop(250,210,-280,-190).ConvertToY.mt_inpand InpaintDelogo(mask=n, Loc="250,210,-280,-190", Analyze=3, Mode="Deblend", Interp=0, dPP=-5, \ YAlphaSolidOuts=0, YColorSolid=235, YOffsetOuts=0, \ YAlphaSolidIns=52, YOffsetIns=0, \ EdgePP=1)
Result from the first example:
Result from the second example:
Last edited by VoodooFX; 22nd Jan 2024 at 08:51.
Similar Threads
-
Issue with AvsPmod/InpaintDelogo
By Hakunamatata67 in forum SubtitleReplies: 7Last Post: 31st Jul 2023, 08:24 -
[help] InpaintDelogo help
By maudit in forum EditingReplies: 14Last Post: 2nd Sep 2022, 05:04 -
Does bmp png and other uncompressed image files stores data like this?
By Anonymous543 in forum Newbie / General discussionsReplies: 32Last Post: 8th Jun 2022, 10:14 -
InpaintDelogo
By JAX75 in forum Newbie / General discussionsReplies: 39Last Post: 27th Oct 2021, 11:29 -
How To Convert A Single Video Image to PNG/BMP
By cornemuse in forum Video ConversionReplies: 9Last Post: 29th Nov 2019, 11:47