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 10th October 2022, 16:39   #581  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
With your help, i can Delogo left logo is good. Thanks

Scripts for whole video:
Quote:
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/1bY9...ew?usp=sharing

Last edited by kedautinh12; 10th October 2022 at 16:46.
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 16:42   #582  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
Quote:
Originally Posted by kedautinh12 View Post
frame 2029
Try again, I don't see anything like this at this frame. Maybe post timing then...

Last edited by VoodooFX; 10th October 2022 at 16:47.
VoodooFX is offline   Reply With Quote
Old 10th October 2022, 16:47   #583  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
Try again, I don't see anything like this at this frame.
i think this error from you and me use different deinterlaced
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 16:53   #584  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by kedautinh12 View Post
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

Last edited by kedautinh12; 10th October 2022 at 16:58.
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 17:07   #585  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
Only God knows what you are doing there.
VoodooFX is offline   Reply With Quote
Old 10th October 2022, 17:28   #586  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,655
@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.
Reel.Deel is offline   Reply With Quote
Old 10th October 2022, 17:28   #587  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
Only God knows what you are doing there.
You know, sometime God can't know what i am doing here
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 17:46   #588  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
Quote:
Originally Posted by kedautinh12 View Post
You know, sometime God can't know what i am doing here
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.
VoodooFX is offline   Reply With Quote
Old 10th October 2022, 17:51   #589  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
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 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:
Quote:
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 is offline   Reply With Quote
Old 10th October 2022, 17:53   #590  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
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.p...51#post1976151
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 18:03   #591  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
Quote:
Originally Posted by kedautinh12 View Post
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:
Quote:
Originally Posted by VoodooFX View Post
Reel.Deel offered a better method for that video [if things fit correctly there]


Quote:
Originally Posted by kedautinh12 View Post
I posted here but you forgot it, #555 and #556
I'll take a look at it.
VoodooFX is offline   Reply With Quote
Old 10th October 2022, 18:24   #592  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
I don't need to know about every successful delogo.
I think you will happy if help other people successful delogo
kedautinh12 is offline   Reply With Quote
Old 10th October 2022, 19:14   #593  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
Quote:
Originally Posted by kedautinh12 View Post
I meet new problem with circle logo
https://imgur.com/gallery/9G8g3Bv
Source: https://drive.google.com/file/d/1tes...ew?usp=sharing
Code:
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]:

Code:
#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




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]:

Code:
#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



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

Last edited by VoodooFX; 10th October 2022 at 22:39.
VoodooFX is offline   Reply With Quote
Old 11th October 2022, 12:57   #594  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
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]:

Code:
#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]:

Code:
#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
kedautinh12 is offline   Reply With Quote
Old 11th October 2022, 13:11   #595  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
I've fixed positive Analyze delogo, need to do more tests. Do you have other colored logo?
VoodooFX is offline   Reply With Quote
Old 11th October 2022, 13:52   #596  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
I've fixed positive Analyze delogo, need to do more tests. Do you have other colored logo?
here:
https://drive.google.com/file/d/1Z8O...ew?usp=sharing

Last edited by kedautinh12; 11th October 2022 at 13:56.
kedautinh12 is offline   Reply With Quote
Old 11th October 2022, 14:21   #597  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 920
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.
VoodooFX is offline   Reply With Quote
Old 11th October 2022, 14:42   #598  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by VoodooFX View Post
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

Last edited by kedautinh12; 11th October 2022 at 15:28.
kedautinh12 is offline   Reply With Quote
Old 11th October 2022, 15:02   #599  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
https://drive.google.com/file/d/13i0...ew?usp=sharing

https://drive.google.com/file/d/1Mz4...ew?usp=sharing

https://drive.google.com/file/d/1a-Z...ew?usp=sharing
kedautinh12 is offline   Reply With Quote
Old 11th October 2022, 16:30   #600  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,085
Quote:
Originally Posted by kedautinh12 View Post
with this Blue Logo, i can't got logo mask correctly

Top Logo:
Quote:
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:
Quote:
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
kedautinh12 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 00:21.


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