Log in

View Full Version : InpaintDelogo - advanced logo removal & hardcoded subtitles extraction


Pages : 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22

VoodooFX
8th October 2022, 12:44
Thank you very much.

I will test the temp script and im happy to see that i came with something you can use to get the script better for everyone.

Now you can adjust detection position with DetWinHoPos and use Show=12 for preview.
InpaintDelogo(Loc="60,566,-120,-30", Show=12, DynLocUp=2, DynMask=4, DynTune=170, DynMask4H=150, KillBlobs=-7, KillNoise=5, DetWinHoPos=0.8)

https://thumbs2.imgbox.com/55/de/iAFXeeBj_t.png (https://images2.imgbox.com/55/de/iAFXeeBj_o.png)


Comparison of Extract=1 vs Extract=-1 vs ReExtract=1 [read help about how to setup negative Extract]:

InpaintDelogo(Loc="60,566,-120,-30", Show=4, DynLocUp=2, DynMask=4, DynTune=170, DynMask4H=150, KillBlobs=-7, KillNoise=5,
\ Extract=1, ImgDir="D:\Subs", ImgInflate=1, CorrTh=0.7, DetWinHoPos=0.8)
InpaintDelogo(Loc="60,566,-120,-30", Show=4, DynLocUp=2, DynMask=4, DynTune=170, DynMask4H=150, KillBlobs=-7, KillNoise=5,
\ Extract=-1, ImgDir="D:\Subs", ImgInflate=1, CorrTh=0.7, DetWinHoPos=0.8)
InpaintDelogo(Loc="60,566,-120,-30", Show=4, DynLocUp=2, DynMask=4, DynTune=170, DynMask4H=150, KillBlobs=-7, KillNoise=5,
\ Extract=-1, ReExtract=1, ImgDir="D:\Subs", ImgInflate=1, CorrTh=0.7, DetWinHoPos=0.8)


https://thumbs2.imgbox.com/96/5c/ajkoYSr9_t.png (https://images2.imgbox.com/96/5c/ajkoYSr9_o.png) https://thumbs2.imgbox.com/d1/57/ZtakxOuj_t.png (https://images2.imgbox.com/d1/57/ZtakxOuj_o.png) https://thumbs2.imgbox.com/5e/6f/0Pfa86eS_t.png (https://images2.imgbox.com/5e/6f/0Pfa86eS_o.png)

Test.mkv file: https://drive.google.com/file/d/1Wi-JdltpVPIxd71gq4RlixEwiPnbky02/view?usp=sharing

Zetti
8th October 2022, 12:59
Thank you i will look into it.

VoodooFX
8th October 2022, 14:08
Lol, many new parameters to remember :D
There at the manual's bottom is filter() with all parameters and defaults, I copy/paste from there sometimes.
Anyway, "for the experts only", so you don't need to know them. :D

Btw, I think that v3 crossed some threshold, because avs v3.7.1 just ignores InpaintDelogo filter like it's commented out.



Still looking forward to it. :)
(Not so much on trying to figure out what they do exactly... but some means to tweak deblending... mhh... looks super-delicous.)

Here is a good sample to practice on hard to delogo video -> https://www.youtube.com/watch?v=hSXo5EMY-vA
There is a good quality 2K VP9 stream [not 1080p!], not all download tools can see that 2K stream [use 4KVideoDownloader].


Logo:
https://thumbs2.imgbox.com/92/c1/PL2OGi9Q_t.jpg (https://images2.imgbox.com/92/c1/PL2OGi9Q_o.jpg)

Delogo:
https://thumbs2.imgbox.com/e7/36/LzLp7FKl_t.jpg (https://images2.imgbox.com/e7/36/LzLp7FKl_o.jpg)

kedautinh12
8th October 2022, 14:16
Btw, can new parameters fix my problem??
https://forum.doom9.org/showthread.php?p=1975972#post1975972

kedautinh12
8th October 2022, 15:54
I meet new problem with circle logo
can anyone had suggest when use with InpaintDelogo??
https://imgur.com/gallery/9G8g3Bv
Source: https://drive.google.com/file/d/1tes_A7YPuKTWTJMIbHXMSde2CigJCGgJ/view?usp=sharing
Scripts:
ex_bob(nnedi3=true).SelectEven()
trim(38,6996)
InpaintDelogo(mask="C:\mask2.bmp", Automask=1, aMix=-10, Loc="84,44,-1260,-910", Mode="Inpaint")

kedautinh12
8th October 2022, 16:20
same error with left-bottom
https://imgur.com/gallery/HrQ3Vvg
Script:

ex_bob(nnedi3=true).SelectEven()
trim(224,6871)
InpaintDelogo(mask="C:\mask1.bmp", Automask=1, aMix=-50, Loc="78,916,-1180,-48", Mode="Inpaint")

VoodooFX
8th October 2022, 18:20
same error with left-bottom
https://imgur.com/gallery/HrQ3Vvg
What error? I see expected result of what you are doing.
Logo has shadow, so you are inpainting that shadow over letters.

VoodooFX
8th October 2022, 19:06
Btw, can new parameters fix my problem??
https://forum.doom9.org/showthread.php?p=1975972#post1975972
Split logo at the left and delogo separately.
To delogo at the right you can use ebmp from another video: https://drive.google.com/drive/folders/1QWixC2n9xy6ntt9JYr8FCsl5T3VDZuVl?usp=sharing

kedautinh12
9th October 2022, 01:26
What error? I see expected result of what you are doing.
Logo has shadow, so you are inpainting that shadow over letters.

But how i can erase that remain of black color??

kedautinh12
9th October 2022, 01:28
And can you have other ways to delogo with circle logo??

evafans
9th October 2022, 02:15
Do I need x265vfw if the video is x265?
Will negative "Extract" cause any problems like missing subs?

evafans
9th October 2022, 03:17
when I use reextract, it identifies the subs as trash, extract=1 works fine as usual. I'm sure x264vfw is installed.

plz ignore what I post, I miss the setup guide in the script.

VoodooFX
9th October 2022, 08:20
Do I need x265vfw if the video is x265?
Will negative "Extract" cause any problems like missing subs?
It has nothing to do with your source files, x264vfw is used for the intermediate files.
You can use any codec [which supports Y8] with "FourCC" parameter, but I tested them all [in various colorspaces] and x264 is fastest, actually I didn't tested x265 because I think that it can't be faster than x264.

If you didn't setup your x264vfw codec by my guide then by default it encodes with lossy & slow preset, in lossy mode the masks are damaged = subs are not detected or extracted subs/masks are damaged anyway.

If negative Extract encodes to lossless intermediate file then it will have exactly pixel to pixel same result as positive Extract.

VoodooFX
9th October 2022, 09:06
@kedautinh12
You are trying to delogo dozens of videos at once when you lack basics on things you are doing.
Stop for a second and try to successfully delogo one video after another, when you do that then you'll have more knowledge on next delogo tasks. :)

PS
I get my coffee and I'll look at your ~first video.

kedautinh12
9th October 2022, 09:55
@kedautinh12
You are trying to delogo dozens of videos at once when you lack basics on things you are doing.
Stop for a second and try to successfully delogo one video after another, when you do that then you'll have more knowledge on next delogo tasks. :)

PS
I get my coffee and I'll look at your ~first video.

I tried successful one video but you don't rep it
https://forum.doom9.org/showthread.php?p=1975980#post1975980

And i was successful some video but i don't post here. I just post when it had problems

VoodooFX
9th October 2022, 10:09
I tried successful one video but you don't rep it
I don't see any masks in that post, if you want me look at your script then I can't preview it if you didn't share all relevant files for it.

And there was a video you posted before it, and then Reel.Deel offered a better method for that video [if things fit correctly there]...

kedautinh12
9th October 2022, 10:54
ok, next video i was successful
https://forum.doom9.org/showthread.php?p=1975775#post1975775

Images: https://imgur.com/gallery/SbHQnft

Scripts:

ex_bob(nnedi3=true).SelectEven()
a1=trim(0,76)
b1=trim(77,198).InpaintDelogo(mask="C:\mask1.bmp", Automask=0, aMix=1, Loc="88,864,-980,-64", Mode="Inpaint", Analyze=3)
c1=trim(199,10848).InpaintDelogo(mask="C:\mask1.bmp", Automask=0, aMix=1, Loc="88,864,-980,-64", Mode="Deblend")
d1=trim(10849,10866).InpaintDelogo(mask="C:\mask1.bmp", Automask=0, aMix=1, Loc="88,864,-980,-64", Mode="Inpaint", Analyze=3)
e1=trim(10867,0)
a1++b1++c1++d1++e1

a2=trim(0,45)
b2=trim(46,59).InpaintDelogo(mask="C:\Logo_M-ON_Old.bmp", Automask=0, aMix=1, Loc="1252,878,-90,-64", Mode="Inpaint",Analyze=3)
c2=trim(60,10909).InpaintDelogo(mask="C:\Logo_M-ON_Old.bmp", Automask=0, aMix=1, Loc="1252,878,-90,-64", Mode="Deblend")
d2=trim(10910,10923).InpaintDelogo(mask="C:\Logo_M-ON_Old.bmp", Automask=0, aMix=1, Loc="1252,878,-90,-64", Mode="Inpaint",Analyze=3)
e2=trim(10924,0)
a2++b2++c2++d2++e2

VoodooFX
9th October 2022, 11:37
That video was resolved long time ago, if you are lost in your spam then here is your next relevant post -> https://forum.doom9.org/showpost.php?p=1975905

kedautinh12
9th October 2022, 12:00
That video was resolved long time ago, if you are lost in your spam then here is your next relevant post -> https://forum.doom9.org/showpost.php?p=1975905

But with dynamic part of logo, i successful myself

kedautinh12
9th October 2022, 12:11
I will try that video, just wait :D

kedautinh12
9th October 2022, 14:23
Split logo at the left and delogo separately.
To delogo at the right you can use ebmp from another video: https://drive.google.com/drive/folders/1QWixC2n9xy6ntt9JYr8FCsl5T3VDZuVl?usp=sharing

When i split logo at the left and delogo separately but still small black bar between 2 logo
Frame 1944
https://i.imgur.com/FPm6Srd.png

Images: https://imgur.com/a/0o9F9ZV

Scripts:
ex_bob(nnedi3=true).SelectEven()
trim(165,7898)
InpaintDelogo(mask="C:\mask3.bmp", Automask=0, aMix=-20, Loc="88,862,-980,-142", Mode="Deblend", Analyze=3)
InpaintDelogo(mask="C:\mask4.bmp", Automask=0, aMix=-20, Loc="88,938,-980,-64", Mode="Deblend", Analyze=3)

VoodooFX
9th October 2022, 14:56
That black line is at non mod2 place, so you need use conversion to RGB if you want to split exactly at that black line.

kedautinh12
9th October 2022, 15:42
That black line is at non mod2 place, so you need use conversion to RGB if you want to split exactly at that black line.

Still black bar and i seen blur box covert logo when convert to RGB
frame 1401
https://i.imgur.com/PqOPgU0.png
Images: https://imgur.com/a/cFKRlZR
Scripts:

ex_bob(nnedi3=true).SelectEven()
converttoRGB()
trim(165,7898)
InpaintDelogo(mask="C:\mask3.bmp", Automask=0, aMix=-20, Loc="88,864,-980,-142", Mode="Deblend", Analyze=3)
InpaintDelogo(mask="C:\mask4.bmp", Automask=0, aMix=-20, Loc="88,936,-980,-64", Mode="Deblend", Analyze=3)

kedautinh12
9th October 2022, 16:07
About Right Logo, your .ebmp don't different result with my .ebmp. Still black color beside black bar bottom but i think it's very good when sceen don't have both-top black bar
https://i.imgur.com/JTe4HDD.png
Images: https://imgur.com/gallery/2V8hDLB
Scripts:
ex_bob(nnedi3=true).SelectEven()
trim(45,7957)
InpaintDelogo(mask="C:\mask5.bmp", Automask=0, aMix=1, Loc="1252,878,-90,-64", Mode="Deblend")

VoodooFX
9th October 2022, 16:34
You just converted to RGB and you cut at exactly same [not where letterbox border is] location, how do you expect different result?

Look at my script:

https://thumbs2.imgbox.com/c4/b1/rweTmQFq_t.jpg (https://images2.imgbox.com/c4/b1/rweTmQFq_o.jpg)


#LWLibAvVideoSource("D:\Otome Shinto.ts").TFM() # to lossless
v=LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(178,7791)

logoRGB = v.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")

topDelogo = topLogo.InpaintDelogo( mask="D:\top.bmp", Loc="0,0,0,0", Mode="Deblend", Analyze=2, NoBorderAt="bottom")
botDelogo = botLogo.InpaintDelogo( mask="D:\bot.bmp", Loc="0,0,0,0", Mode="Deblend", Analyze=3)

logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")

v.Overlay(logoYV12, x=78, y=852)
InpaintDelogo( mask="D:\M-On!.1080_1252-878.ebmp", Loc="1252,878,0,0", IntSpd=4)


Masks: https://we.tl/t-0yPMVitm2k

kedautinh12
9th October 2022, 17:12
Wow, very good. Ok, i will check tomorrow :D

VoodooFX
9th October 2022, 19:17
...can you suggest if this can better, VX?
Add Turbo=-1 to all inpaint parts.
Add IntSpd=4 to your left deblend.
Disable Interp [Interp=0] on your right deblend and use M-On!.1080.Small (https://drive.google.com/drive/folders/1QWixC2n9xy6ntt9JYr8FCsl5T3VDZuVl) mask on it.

kedautinh12
10th October 2022, 15:25
You just converted to RGB and you cut at exactly same [not where letterbox border is] location, how do you expect different result?

Look at my script:


#LWLibAvVideoSource("D:\Otome Shinto.ts").TFM() # to lossless
v=LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(178,7791)

logoRGB = v.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")

topDelogo = topLogo.InpaintDelogo( mask="D:\top.bmp", Loc="0,0,0,0", Mode="Deblend", Analyze=2, NoBorderAt="bottom")
botDelogo = botLogo.InpaintDelogo( mask="D:\bot.bmp", Loc="0,0,0,0", Mode="Deblend", Analyze=3)

logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")

v.Overlay(logoYV12, x=78, y=852)
InpaintDelogo( mask="D:\M-On!.1080_1252-878.ebmp", Loc="1252,878,0,0", IntSpd=4)


Masks: https://we.tl/t-0yPMVitm2k

Your script very good but in sceen without black borders still bar but not black bar. I think result better
frame 2029
https://i.imgur.com/uINtbia.png

Edit: And your file Logo .ebmp in right had fix my error. Thanks

VoodooFX
10th October 2022, 16:02
@kedautinh12
Learn to post the frame numbers of your images.

kedautinh12
10th October 2022, 16:29
@kedautinh12
Learn to post the frame numbers of your images.

sr forgot it. edited post

kedautinh12
10th October 2022, 16:39
With your help, i can Delogo left logo is good. Thanks

Scripts for whole video:

ex_bob(nnedi3=true).SelectEven()

a1=trim(0,62)

b=LWLibAvVideoSource("C:\Users\ADMIN\Downloads\Otome Shinto - Ame to Namida to Otome to Taiyaki [1440x1080 h264 M-ON! HD].video-muxed_0.mkv").Trim(63,116)
logoRGB = b.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
topDelogo = topLogo.InpaintDelogo(mask="C:\mask3.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=2, NoBorderAt="bottom", Turbo=-1)
logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")
b1=b.Overlay(logoYV12, x=78, y=852)

c=LWLibAvVideoSource("C:\Users\ADMIN\Downloads\Otome Shinto - Ame to Namida to Otome to Taiyaki [1440x1080 h264 M-ON! HD].video-muxed_0.mkv").Trim(117,126)
logoRGB = c.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")
topDelogo = topLogo.InpaintDelogo(mask="C:\mask3.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=2, NoBorderAt="bottom", Turbo=-1)
botDelogo = botLogo.InpaintDelogo( mask="C:\mask4.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=3, Turbo=-1)
logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")
c1=c.Overlay(logoYV12, x=78, y=852)

d=LWLibAvVideoSource("C:\Users\ADMIN\Downloads\Otome Shinto - Ame to Namida to Otome to Taiyaki [1440x1080 h264 M-ON! HD].video-muxed_0.mkv").Trim(127,165)
logoRGB = d.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")
topDelogo = topLogo.InpaintDelogo(mask="C:\mask3.bmp", Automask=0, Loc="0,0,0,0", Mode="Deblend", Analyze=2, NoBorderAt="bottom", IntSpd=4)
botDelogo = botLogo.InpaintDelogo( mask="C:\mask4.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=3, Turbo=-1)
logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")
d1=d.Overlay(logoYV12, x=78, y=852)

e=LWLibAvVideoSource("C:\Users\ADMIN\Downloads\Otome Shinto - Ame to Namida to Otome to Taiyaki [1440x1080 h264 M-ON! HD].video-muxed_0.mkv").Trim(166,7898)
logoRGB = e.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")
topDelogo = topLogo.InpaintDelogo(mask="C:\mask3.bmp", Automask=0, Loc="0,0,0,0", Mode="Deblend", Analyze=2, NoBorderAt="bottom", IntSpd=4)
botDelogo = botLogo.InpaintDelogo( mask="C:\mask4.bmp", Automask=0, Loc="0,0,0,0", Mode="Deblend", Analyze=3, IntSpd=4)
logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")
e1=e.Overlay(logoYV12, x=78, y=852)

f=LWLibAvVideoSource("C:\Users\ADMIN\Downloads\Otome Shinto - Ame to Namida to Otome to Taiyaki [1440x1080 h264 M-ON! HD].video-muxed_0.mkv").Trim(7899,7913)
logoRGB = f.Crop(78,852,-980,-54).ConvertToRGB24(matrix="Rec709")
topLogo = logoRGB.Crop(0,1,-0,-87).ConvertToYV12(matrix="Rec709")
botLogo = logoRGB.Crop(0,87,-0,-7).ConvertToYV12(matrix="Rec709")
topDelogo = topLogo.InpaintDelogo(mask="C:\mask3.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=2, NoBorderAt="bottom", Turbo=-1)
botDelogo = botLogo.InpaintDelogo( mask="C:\mask4.bmp", Automask=0, Loc="0,0,0,0", Mode="Inpaint", Analyze=3, Turbo=-1)
logoRGB = logoRGB.Overlay(topDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=1)
logoRGB = logoRGB.Overlay(botDelogo.ConvertToRGB24(matrix="Rec709"), x=0, y=87)
logoYV12= logoRGB.ConvertToYV12(matrix="Rec709")
f1=f.Overlay(logoYV12, x=78, y=852)

g1=trim(7914,0)

a1++b1++c1++d1++e1++f1++g1

file: https://drive.google.com/file/d/1bY9QNucEo-F_xJgc6MMChTZNzG9I9pE2/view?usp=sharing

VoodooFX
10th October 2022, 16:42
frame 2029
Try again, I don't see anything like this at this frame. Maybe post timing then...

kedautinh12
10th October 2022, 16:47
Try again, I don't see anything like this at this frame.

i think this error from you and me use different deinterlaced

kedautinh12
10th October 2022, 16:53
i think this error from you and me use different deinterlaced

With tfm() error was gone. thanks.

Edit: I relized your both logo file only use for tfm(), can't use for another Deinterlaced :D

VoodooFX
10th October 2022, 17:07
Only God knows what you are doing there. :D

Reel.Deel
10th October 2022, 17:28
@kedautinh12

Your sources (at least the last 3 samples you've posted) are telecined. There is no need to deinterlace them, unless you want lower quality. Earlier I saw you were using LWLibavVideoSource("source.ts", fpsnum=24000, fpsden=1001) and now ex_bob(nnedi3=true).SelectEven(), I agree with VoodooFX - who knows what you're doing.

kedautinh12
10th October 2022, 17:28
Only God knows what you are doing there. :D

You know, sometime God can't know what i am doing here :D

VoodooFX
10th October 2022, 17:46
You know, sometime God can't know what i am doing here :D
I don't even want to know why you load same video five times in your script [at the top of this page], looks messy...
Let me know when you are on the next video/problem. :)

kedautinh12
10th October 2022, 17:51
Add Turbo=-1 to all inpaint parts.
Add IntSpd=4 to your left deblend.
Disable Interp [Interp=0] on your right deblend and use M-On!.1080.Small (https://drive.google.com/drive/folders/1QWixC2n9xy6ntt9JYr8FCsl5T3VDZuVl) mask on it.

With your help, result better very much, althought it isn't good as Reel.Deel but still very good, thanks
https://imgsli.com/MTI5NDky

Scripts:
a0=trim(0,49)
b0=trim(50,5488).InpaintDelogo(mask="C:\Left_Top_Letter.bmp", Automask=0, aMix=0, Loc="50,40,-1186,-910", Mode="Inpaint", Turbo=-1)
c0=trim(5489,0)
a0++b0++c0

a1=trim(0,53)
b1=trim(54,119).InpaintDelogo(mask="C:\mask6.bmp", Automask=0, aMix=-10, Loc="60,880,-1094,-50", Mode="Inpaint", Analyze=3, Turbo=-1)
c1=trim(120,5477).InpaintDelogo(mask="C:\mask6.bmp", Automask=0, aMix=-10, Loc="60,880,-1094,-50", Mode="Deblend", IntSpd=4)
d1=trim(5478,5491).InpaintDelogo(mask="C:\mask6.bmp", Automask=0, aMix=-10, Loc="60,880,-1094,-50", Mode="Inpaint", Analyze=3, Turbo=-1)
e1=trim(5492,0)
a1++b1++c1++d1++e1

a2=trim(0,25)
b2=trim(26,37).InpaintDelogo(mask="C:\Logo_M-ON_New.ebmp", Automask=0, aMix=0, Loc="1284,904,0,0", Mode="Inpaint", Analyze=3, Turbo=-1)
c2=trim(38,5526).InpaintDelogo(mask="C:\Logo_M-ON_New.ebmp", Automask=0, aMix=0, Loc="1284,904,0,0", Mode="Deblend", Interp=0)
d2=trim(5527,5538).InpaintDelogo(mask="C:\Logo_M-ON_New.ebmp", Automask=0, aMix=0, Loc="1284,904,0,0", Mode="Inpaint", Analyze=3, Turbo=-1)
e2=trim(5539,0)
a2++b2++c2++d2++e2

kedautinh12
10th October 2022, 17:53
I don't even want to know why you load same video five times in your script [at the top of this page], looks messy...
Let me know when you are on the next video/problem. :)

I posted here but you forgot it, #555 and #556
https://forum.doom9.org/showthread.php?p=1976151#post1976151

VoodooFX
10th October 2022, 18:03
With your help, result better very much, althought it isn't good as Reel.Deel but still very good, thanks

I don't need to know about every successful delogo. :)
Told you that myself:
Reel.Deel offered a better method for that video [if things fit correctly there]



I posted here but you forgot it, #555 and #556
I'll take a look at it.

kedautinh12
10th October 2022, 18:24
I don't need to know about every successful delogo. :)

I think you will happy if help other people successful delogo :D

VoodooFX
10th October 2022, 19:14
I meet new problem with circle logo
https://imgur.com/gallery/9G8g3Bv
Source: https://drive.google.com/file/d/1tes_A7YPuKTWTJMIbHXMSde2CigJCGgJ/view?usp=sharing
ex_bob(nnedi3=true).SelectEven()
trim(38,6996)
InpaintDelogo(mask="C:\mask2.bmp", Automask=1, aMix=-10, Loc="84,44,-1260,-910", Mode="Inpaint")


You are using Inpaint when top logo is transparent there and you are not leaving enough space from logo borders in Loc.

Deblend & positive Analyze doesn't build proper alpha on V channel, you can see with Show=2. AMSS0815 is not around anymore to ask why it's like that, probably because there's not much colors in that clip [and I use AVSInpaint in not intended ways], but why then alpha on U is build...
Anyway, use negative Analyze, delogo looks not bad with it [later I'll look if it can be done better]:

#LWLibAvVideoSource("D:\Otome Shinto.ts").QTGMC( Preset="Medium", Sharpness=0.0).SelectEven() # to lossless
LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(48,6990)
InpaintDelogo( mask="D:\mask.bmp", Loc="76,40,-1252,-904", Mode="Deblend", Analyze=-2, dPP=5, IntSpd=4)

#Crop(76,40,-1252,-904) #to take screenshots

Frame 774:

Original vs Yours vs Analyze=2 vs Analyze=-2


https://i.imgur.com/1jE7FyX.png https://i.imgur.com/3uE643k.png https://i.imgur.com/D9Ltq3D.png https://i.imgur.com/PcMvXF4.png

Basemask: https://i.imgur.com/0zWhTWP.png



BOTTOM LOGO:

You didn't created a proper basemask of whole logo.
Automask can't create precise mask for very faint shadow's edges like this, so you need to make a basemask by yourself.
Shadow is transparent and letters are not, so use Both mode [use Show=1 to adjust opaque mask]:

#LWLibAvVideoSource("D:\Otome Shinto.ts").QTGMC( Preset="Medium", Sharpness=0.0).SelectEven() # to lossless
LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(220,6767)

InpaintDelogo( mask="D:\mask2.png", Loc="60,900,-1160,-30", Analyze=3, Mode="Both", oTune=-7, oTinflate=2, dPP=5, IntSpd=4, Turbo=-1)


#Crop(60,900,-1160,-30) # to take screenshots

Frame 1297:

Original vs Yours vs My

https://i.imgur.com/8THKQHQ.png https://i.imgur.com/p9iGTzx.png https://i.imgur.com/K7FFllp.png

Masks: https://we.tl/t-mYhaD6ppsQ

kedautinh12
11th October 2022, 12:57
You are using Inpaint when top logo is transparent there and you are not leaving enough space from logo borders in Loc.

Deblend & positive Analyze doesn't build proper alpha on V channel, you can see with Show=2. AMSS0815 is not around anymore to ask why it's like that, probably because there's not much colors in that clip [and I use AVSInpaint in not intended ways], but why then alpha on U is build...
Anyway, use negative Analyze, delogo looks not bad with it [later I'll look if it can be done better]:

#LWLibAvVideoSource("D:\Otome Shinto.ts").QTGMC( Preset="Medium", Sharpness=0.0).SelectEven() # to lossless
LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(48,6990)
InpaintDelogo( mask="D:\mask.bmp", Loc="76,40,-1252,-904", Mode="Deblend", Analyze=-2, dPP=5, IntSpd=4)

#Crop(76,40,-1252,-904) #to take screenshots

Basemask: https://i.imgur.com/0zWhTWP.png



BOTTOM LOGO:

You didn't created a proper basemask of whole logo.
Automask can't create precise mask for very faint shadow's edges like this, so you need to make a basemask by yourself.
Shadow is transparent and letters are not, so use Both mode [use Show=1 to adjust opaque mask]:

#LWLibAvVideoSource("D:\Otome Shinto.ts").QTGMC( Preset="Medium", Sharpness=0.0).SelectEven() # to lossless
LWLibAvVideoSource("D:\Otome Shinto_lossless.mkv").Trim(220,6767)

InpaintDelogo( mask="D:\mask2.png", Loc="60,900,-1160,-30", Analyze=3, Mode="Both", oTune=-7, oTinflate=2, dPP=5, IntSpd=4, Turbo=-1)


#Crop(60,900,-1160,-30) # to take screenshots

Masks: https://we.tl/t-mYhaD6ppsQ

I think result is good, thanks

VoodooFX
11th October 2022, 13:11
I've fixed positive Analyze delogo, need to do more tests. Do you have other colored logo?

kedautinh12
11th October 2022, 13:52
I've fixed positive Analyze delogo, need to do more tests. Do you have other colored logo?

here:
https://drive.google.com/file/d/1Z8O3IK8vXYsDowfjdGen3c8XxuoiQwwx/view?usp=sharing

VoodooFX
11th October 2022, 14:21
Thanks, but logo there is almost always in a black background, I need video where logo is in various backgrounds, same red logo is OK too.

kedautinh12
11th October 2022, 14:42
Thanks, but logo there is almost always in a black background, I need video where logo is in various backgrounds, same red logo is OK too.

Waiting. I'm uploading more backgrounds for your test :D

kedautinh12
11th October 2022, 15:02
https://drive.google.com/file/d/13i01ajr01NjjtXqMaSeH-HjVW1n91ahH/view?usp=sharing

https://drive.google.com/file/d/1Mz4T2fSuyPeW0UkCFGZ1mVjhtX1p3YcD/view?usp=sharing

https://drive.google.com/file/d/1a-Z5j3ElMqbnKr9Q39EoIlYTBLbqz4hg/view?usp=sharing

kedautinh12
11th October 2022, 16:30
here:
https://drive.google.com/file/d/1Z8O3IK8vXYsDowfjdGen3c8XxuoiQwwx/view?usp=sharing

with this Blue Logo, i can't got logo mask correctly

Top Logo:
trim(0,7362)
InpaintDelogo(mask="C:\mask2.bmp", Automask=1, aMix=0, Loc="100,40,-1666,-904", Mode="Deblend", Analyze=-2, IntSpd=4)
Bottom Credit:
trim(162,7285)
InpaintDelogo(mask="C:\mask2.bmp", Loc="110,820,-1330,-46", Automask=0, aMix=-46, Analyze=3, Mode="Both", IntSpd=4, Turbo=-1)
With bottom credit, i can't create mask cover black shadow like Red Logo