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 30th December 2021, 15:33   #301  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 91
Quote:
Originally Posted by VoodooFX View Post
But since your last post there is nothing changed in Inpaint mode that would visually impact it. Can you post comparison examples what is "better" now?
Then maybe I'm just lucky. I just don't see that "emboss" like effect anymore when inpainting logos in UHD clips that was plagueing me here.
I'd need to recheck with those clips I posted.

Quote:
Originally Posted by VoodooFX View Post
Without samples of video and script I can't help you. Maybe video is overcompressed + logo is hardly transparent, maybe you are doing something wrong.
You should analyze whole video where logo is, not some parts.
Ok... here's a test video.
https://1drv.ms/v/s!ArUJrXgYajLogqYA...U1Ivw?e=mF1wgP

Area I chose for the mask:


Logo mask (only cropped the relevant upper right part here for this post)


Result:







Invoked with no additional params.
1) Create Mask:
Code:
InpaintDelogo(mask="V:\Logos\UHD-Test.bmp", Loc="3366,50,-110,-1934", Mode="Deblend", Automask=1)
2) Deblend:
Code:
InpaintDelogo(mask="V:\Logos\UHD-Test.bmp", Loc="3366,50,-110,-1934", Mode="Deblend", Automask=0)

Quote:
Originally Posted by VoodooFX View Post
Analyze when you create the base mask [with Automask=1] and Analyze for actual delogo with Deblend does the two different things, for Deblend it creates Alpha/Color masks.
Analyze=2 is default, no need to add it to a script then.
Btw, Analyze options are the different frame selection methods, and if you ran same option before with Automask=1 then the frame selection result is reused when Analyze runs again for Alpha/Color masks.
Analyze=1 should be more precise, but usually you won't see a difference, in some rare cases it can be helpful.
Ahhh.
Okay... so Analyze = 1 may be used for the (first) deblend run then. Thx!
katzenjoghurt is offline   Reply With Quote
Old 30th December 2021, 17:53   #302  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Your video has color matrix BT.709 instead of BT.2020, maybe it has to do something with the problem, I dunno, maybe original blending is just damaged here.

EDIT:
Your sample looks like re-encode, share only original video.

Last edited by VoodooFX; 30th December 2021 at 18:03.
VoodooFX is offline   Reply With Quote
Old 6th January 2022, 17:03   #303  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 341
Is there any chance of getting the 2.x versions to work with Avisynth+ 3.7.0? Not only am I concerned about the previously reported MeGUI problem with 2.x, but the 2.x versions do not seem to work in AvsPmod (probably due to the use of 3.7.0). AvsPmod also no longer functions when using Prefetch with most Avisynth+ 3.7.1 versions, which is another reason for me to not use Avisynth+ above 3.7.0.

Last edited by Danette; 6th January 2022 at 17:21.
Danette is offline   Reply With Quote
Old 6th January 2022, 18:53   #304  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
What MeGUI problem?
Try older AvsPmod till it is fixed, or 32bit one.
VoodooFX is offline   Reply With Quote
Old 6th January 2022, 19:18   #305  |  Link
Danette
Registered User
 
Join Date: Apr 2013
Posts: 341
Looks like that MeGUI problem was assigned to the portable Avisynth+ version, which I don't use. However, I installed Avisynth+ 3.7.1, after reading that post, and that's when I ran into the InpaintDelogo/Prefetch AvsPmod problem. I think I will have to wait for the AvsPmod problem to be fixed (if it is), as I am already using an older 32-bit version of it (2.7.0.0). In the meantime, InpaintDelogo 1.48 is certainly fully acceptable, from my perspective.
Danette is offline   Reply With Quote
Old 8th February 2022, 04:27   #306  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Trying to deblend a logo with my manually created mask using the following command:

InpaintDelogo( mask="C:\path\to\LogoMask3840x2160pBW.bmp", Automask=0, Loc="0,0,-0,-0", Analyze=3, Mode="Deblend")

but the result is rather weird:



What parameters should I adjust?

Source video: https://filetransfer.io/data-package/jcs1FMaL#link
Mask: https://filetransfer.io/data-package/EUIMIWSJ#link
puregreen is offline   Reply With Quote
Old 8th February 2022, 11:00   #307  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
That video is just 12 seconds of static scene where logo is not in solid background. There is nothing to build a deblending mask from.

You need at least one frame with logo in dark solid background and one frame with logo in bright solid background.
Or you need much longer video than this to try anything.

EDIT:
Actually, "Analyze=-4" can create the deblend masks from one frame with logo in dark solid background.

Last edited by VoodooFX; 9th February 2022 at 08:43.
VoodooFX is offline   Reply With Quote
Old 8th February 2022, 11:25   #308  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Inpaint doesn't look bad, if you can find good inpainting settings for that big "A" at the left.

Downscaled example:

VoodooFX is offline   Reply With Quote
Old 9th February 2022, 01:18   #309  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Quote:
Originally Posted by VoodooFX View Post
That video is just 12 seconds of static scene where logo is not in solid background. There is nothing to build a deblending mask from.

You need at least one frame with logo in dark solid background and one frame with logo in bright solid background.
Or you need much longer video than this to try anything.
I thought all I need is a black and white (logo in white) mask and then it can be used for all other videos of the same frame size. That's why I made that mask (https://filetransfer.io/data-package/EUIMIWSJ#link) from another video where the logo was on solid black background. So... I was completely wrong? I guess I just don't quite understand how deblending works then
puregreen is offline   Reply With Quote
Old 9th February 2022, 06:52   #310  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
I thought all I need is a black and white (logo in white) mask and then it can be used for all other videos of the same frame size. That's why I made that mask (https://filetransfer.io/data-package/EUIMIWSJ#link) from another video where the logo was on solid black background. So... I was completely wrong? I guess I just don't quite understand how deblending works then
Black and white mask is just a basemask, when you have it then "Analyze" runs to create Alpha/Color deblend masks, and that A/C masks filename would look like this:
"LogoMask3840x2160pBW.bmp_InpaintDelogo2_1010-900-990-900_A3.ebmp".
Basemask and deblend masks can be reused on other videos with same logo.

Basemask is enough only for "Inpaint" mode.

Last edited by VoodooFX; 15th February 2022 at 00:57.
VoodooFX is offline   Reply With Quote
Old 9th February 2022, 07:48   #311  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
from another video where the logo was on solid black background.
You can try old Deblend 'manual' method[s] on that "another video", those methods produce lower quality deblend but don't need many frames to analyze, actually "Analyze=-4" can create the deblend masks from one frame.

Try this [replace '000' with proper frame number]:
InpaintDelogo( mask="C:\LogoMask3840x2160pBW.bmp", Loc="1010,900,-990,-900", Analyze=-4, FrB=000, Mode="Deblend")

And for the example above you can finetune these parameters [here with defaults]:
Interp=2, dPP=3, Inflate=1 [These are like postprocess effects]
FrS=0, Deep=3 [These influence the deblend masks creation]

If you want to compare the deblend masks/methods or see a pure deblend effect, then turn off "Interp" and "dPP".

PS:
Another possibility is to join hundreds of those videos in Avisynth and create the deblend masks from that.

Last edited by VoodooFX; 9th February 2022 at 08:28.
VoodooFX is offline   Reply With Quote
Old 10th February 2022, 02:44   #312  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Quote:
Originally Posted by VoodooFX View Post
Basemask and deblend masks can be reused on other videos of the same frame size and same logo.
How to re-use them? If I set Analyze to 0, I get the "File 'Script.avs' does not have a video stream" error... Or if the files are present, it won't re-analyze anything even if analyze parameters are set?

Last edited by puregreen; 10th February 2022 at 03:15.
puregreen is offline   Reply With Quote
Old 10th February 2022, 03:30   #313  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Quote:
Originally Posted by VoodooFX View Post
You can try old Deblend 'manual' method[s] on that "another video", those methods produce lower quality deblend but don't need many frames to analyze, actually "Analyze=-4" can create the deblend masks from one frame.

Try this [replace '000' with proper frame number]:
InpaintDelogo( mask="C:\LogoMask3840x2160pBW.bmp", Loc="1010,900,-990,-900", Analyze=-4, FrB=000, Mode="Deblend")

And for the example above you can finetune these parameters [here with defaults]:
Interp=2, dPP=3, Inflate=1 [These are like postprocess effects]
FrS=0, Deep=3 [These influence the deblend masks creation]

If you want to compare the deblend masks/methods or see a pure deblend effect, then turn off "Interp" and "dPP".

PS:
Another possibility is to join hundreds of those videos in Avisynth and create the deblend masks from that.
Ohh... Looks like the logo has shadows At least it's visible on a solid white background but more likely it's there on a dark one too, it's just hard to notice it.

Here's a video with both black (frame 001) and white (frame 055) background: https://filetransfer.io/data-package/wHl0HYcU#link
puregreen is offline   Reply With Quote
Old 10th February 2022, 04:26   #314  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
How to re-use them? If I set Analyze to 0, I get the "File 'Script.avs' does not have a video stream" error... Or if the files are present, it won't re-analyze anything even if analyze parameters are set?
Just change video to another in script and thats it.
There is no Analyze=0 option for user to select, looks like that after v2.00 I forgot to add error on it [EDIT: I didn't forgot, the error assert is there], but from the manual it should be clear.
Why you need to re-analyze if you want re-use same masks?

PS
And you are selecting non existent "0" option to "not-analyze" when you want to analyze? I'm a bit confused.

Last edited by VoodooFX; 11th February 2022 at 19:19.
VoodooFX is offline   Reply With Quote
Old 10th February 2022, 18:48   #315  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
Ohh... Looks like the logo has shadows At least it's visible on a solid white background but more likely it's there on a dark one too, it's just hard to notice it.

Here's a video with both black (frame 001) and white (frame 055) background: https://filetransfer.io/data-package/wHl0HYcU#link
Didn't had time to look at it in the morning.
I see there are good white frames, so use Analyze=-3 method.
I've removed logos with such faint shadows before, and there are bunch of settings to deal with them. Most likely that Automask won't pick up very transparent parts like this shadow, so you need to create a base mask in photoshop including that shadow too.

PS:
Maybe later this evening I'll give this video a try.
VoodooFX is offline   Reply With Quote
Old 11th February 2022, 01:50   #316  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Quote:
Originally Posted by VoodooFX View Post
And you are selecting non existent "0" option to "not-analyze" when you want to analyze? I'm a bit confused.
No, I thought setting it to "0" would protect the existing ebmp files from re-analyzing but turned out it's not needed because it doesn't re-analyze if the files already exist :-)

I'm getting pretty good results after generating a deblending mask from the black frames. The only thing left is dealing with the shadow somehow...
puregreen is offline   Reply With Quote
Old 11th February 2022, 02:24   #317  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
I'm getting pretty good results after generating a deblending mask from the black frames. The only thing left is dealing with the shadow somehow...
I've no idea what you are doing there, post your script and basemask.
I wrote one post above yours what to do...
VoodooFX is offline   Reply With Quote
Old 11th February 2022, 03:23   #318  |  Link
puregreen
Registered User
 
Join Date: Jan 2022
Posts: 13
Quote:
Originally Posted by VoodooFX View Post
I've no idea what you are doing there, post your script and basemask.
I wrote one post above yours what to do...
I did this:

Code:
InpaintDelogo( mask="C:\LogoMask3840x2160pBW.bmp", Loc="1010,900,-990,-900", Analyze=-4, FrB=001, Mode="Deblend")
It works fine on the parts where the shadow is not visible.

I tried making a base mask with the shadow: https://filetransfer.io/data-package/3kaMyxIQ#link

...and tried using it with the script:

Code:
InpaintDelogo( mask="C:\LogoMask3840x2160pShadow.bmp", Loc="1010,900,-990,-900", Analyze=-3, FrB=001, FrW=055, Mode="Deblend")
...but it doesn't help with the shadow.
puregreen is offline   Reply With Quote
Old 11th February 2022, 03:34   #319  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Quote:
Originally Posted by puregreen View Post
I tried making a base mask with the shadow: https://filetransfer.io/data-package/3kaMyxIQ#link
It's not a black/white mask. Whole logo must be white.

EDIT:
Quote:
Originally Posted by puregreen View Post
FrB=001, FrW=055.
You don't need to add zeros in front of numbers.

Last edited by VoodooFX; 11th February 2022 at 03:42.
VoodooFX is offline   Reply With Quote
Old 11th February 2022, 14:39   #320  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 580
Did you re-encoded those videos in your posts?
Btw, there is the error assert for "Analyze=0", probably because of soft you use you don't see Avisynth errors.

Here I tried to delogo, shadow is perfectly deblended, good result, no need for any PP:

Code:
InpaintDelogo( mask="D:\Mask.bmp", Loc="920,810,-910,-820", Analyze=-3, FrB=0, FrW=51, FrS=1, Deep=1, Interp=0, dPP=0, Mode="Deblend")
Mask:


Before:

After:


Before:

After:


EDIT:
I was about to test Makki's delogo, but I remembered that there you can't create lgd from few frames...

Last edited by VoodooFX; 11th February 2022 at 15:50.
VoodooFX is offline   Reply With Quote
Reply

Tags
delogo, hardsubs, ocr, remove, watermark

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 02:24.


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