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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#781 | Link | |
Registered User
Join Date: Apr 2023
Posts: 60
|
Quote:
Honestly I think the upscaled version would have been better but the AVS plugin can't seem to open that (maybe 12GB is too big) and always says it cannot find the find somehow. I tried to create the mask manually by using the SVG version of the logo, dunno if you can get a better result automatically. https://i.imgur.com/PpdLlG1.png I think it would be actually cool if there was a function where you can pass an svg logo as an rgument and it looks for the logo within the frame and automatically scale it perfectly to fit and then generates a mask. |
|
![]() |
![]() |
![]() |
#782 | Link | |
Registered User
Join Date: Feb 2007
Posts: 128
|
Quote:
I once tried to inpaint a UHD Video with a really big logo. No way to get a good result with default settings - the noise in the inpainted corner was way too distracting. But the result was ok when I downsized the video to 480p, and inpainted the logo with Sharpness=1. It was superblurry of course but also calm so that it didn't distract and still way better than with the original logo. But there was no way to reproduce the same thing directly in the UHD source. In the UHD video Sharpness=1 didn't create anyway near the same amount of blur as it did in 480p. dPP/oPP couldn't compensate for that. Last edited by katzenjoghurt; 19th May 2023 at 20:13. |
|
![]() |
![]() |
![]() |
#785 | Link |
Registered User
Join Date: Feb 2007
Posts: 128
|
I'll chime in, even if I only have a mediocre solution for you.
1) Get a better version of that video from here: https://assets14.ign.com/videos/zenc...26343076-w.mp4 (It's a 817MB file with a 5000kbps encoding rather than your 3000kbps clip) 2) It's actually pretty tricky to create a proper mask due to (I guess) a) encoding artifacts b) very transparency parts of the logo c) hard enbedded subtitles overlapping with the logo at times - InpaintDelogo will add them to the mask So I selected only parts where the subtitles aren't overlapping with the logo. Code:
Trim(0,340) + Trim(1235,3662) + Trim(4152,4684) + Trim(4982,6685) + Trim(7068,8111) + Trim(8344,8878) \ + Trim(9325,9495) + Trim(10091,10560) + Trim(10815,11348) + Trim(11603,13157) + Trim(13328,14477) \ + Trim(14605,16117) + Trim(16372,17713) + Trim(17884,18756) + Trim(18927,19991) + Trim(20779,22674) \ + Trim(22993,25399) + Trim(25591,26293) + Trim(26655,27336) + Trim(27741,30147) + Trim(34852,35022) InpaintDelogo(mask="V:\Logos\Test\IGN.bmp", Loc="1572, 906, -20, -60", Mode="Deblend", Automask=1, Analyze=3) Here's the resulting mask: https://i.ibb.co/RSWVvc0/IGN.png 3) The deblending analysis I did with these parameters: Code:
InpaintDelogo(mask="V:\Logos\Test\IGN.bmp", Loc="1572, 906, -20, -60", Mode="Deblend", Automask=0, Analyze=-2, Deep=5, Optimize2=2, Interp=0) Due to that overlapping, interpolation would also warp the subtitles in a pretty nasty way. So I disabled it with Interp=0. But (also) due to that more remains of the logo are visible, especially whenever the background is rather bright. We can't fight it with more blurring (by going to lover dPP levels) as that would also blur the subtitles. ![]() ![]() Check it out for yourself. Download the mask above, reconvert it to bmp and try these lines: (edit: trims added) Code:
Trim(0,340) + Trim(1235,3662) + Trim(4152,4684) + Trim(4982,6685) + Trim(7068,8111) + Trim(8344,8878) \ + Trim(9325,9495) + Trim(10091,10560) + Trim(10815,11348) + Trim(11603,13157) + Trim(13328,14477) \ + Trim(14605,16117) + Trim(16372,17713) + Trim(17884,18756) + Trim(18927,19991) + Trim(20779,22674) \ + Trim(22993,25399) + Trim(25591,26293) + Trim(26655,27336) + Trim(27741,30147) + Trim(34852,35022) InpaintDelogo(mask="V:\Logos\Test\IGN.bmp", Loc="1572, 906, -20, -60", Mode="Deblend", Automask=0, Analyze=-2, Deep=5, Optimize2=2, Interp=0) Hope that helps. Last edited by katzenjoghurt; 30th May 2023 at 09:15. |
![]() |
![]() |
![]() |
#786 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
@katzenjoghurt Nice result!
I see you used negative Analyze, were results with positive worse?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
![]() |
![]() |
![]() |
#787 | Link |
Registered User
Join Date: Feb 2007
Posts: 128
|
Hey VoodooFX,
I find Analyze=-2 (or -1), Deep=5 still useful in many cases. Please never remove it. ![]() Here it helps with the IGN icon. Source: ![]() Analyze=3: ![]() Analyze=2: ![]() Analyze=-2: ![]() Last edited by katzenjoghurt; 29th May 2023 at 20:51. |
![]() |
![]() |
![]() |
#788 | Link |
Registered User
Join Date: Apr 2023
Posts: 60
|
Thanks for the great work. Is it normal that you still get a sign on the bottom right corner? https://imgur.com/a/pCZfds7
My code looks like this: Code:
LWLibAvVideoSource("D:\Z_DELOGO\IGN.mp4") InpaintDelogo(mask="D:\Z_DELOGO\IGN.bmp", Loc="1572, 906, -20, -60", Mode="Deblend", Automask=0, Analyze=-2, Deep=5, Optimize2=2, Interp=0) |
![]() |
![]() |
![]() |
#789 | Link | |
Registered User
Join Date: Feb 2007
Posts: 128
|
Quote:
I edited it. The "signs" are the result of InpaintDelogo analyzing frames where the subtitles overlap with the logo. With the Trims these frames will be skipped. 1) Add the Trims 2) delete the old created .ebmp deblend files or add ReAnalyze=1 for one run 3) The "signs" should be gone now. 4) Remove the Trims. Oh. I just wasn't aware that InpaintDelogo happily accepts pngs. Last edited by katzenjoghurt; 30th May 2023 at 09:20. |
|
![]() |
![]() |
![]() |
#790 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
Strange, negative Analyze should be useful only in very rare cases like in some very short clips.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
![]() |
![]() |
![]() |
#791 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
Here are my results on that 480MB zzz.mp4 file.
Getting a basemask with Automask: Code:
LWLibAvVideoSource("D:\zzz.mp4") InpaintDelogo(mask="D:\mask.bmp", Loc="1570, 904, -28, -58", Analyze=-4, Automask=1, aMix=3) Getting a deblend mask [no need for trims with Analyze 1/-1] and delogo: Code:
LWLibAvVideoSource("D:\zzz.mp4") InpaintDelogo(mask="D:\mask.bmp", Loc="1570, 904, -28, -58", Mode="Deblend", Analyze=1, dPP=-5) ![]() 2) Delogo Analyze=1 ![]() 3) Delogo Analyze=-1, Deep=5: ![]() In #3 there are less artifacts on that circle at the left but rest looks a bit worse than 2. Actually negative Analyze looks worse than positive, that artifacts reduction comes from deblend iteration aka Deep [which is not implemented for positive Analyze].
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 31st May 2023 at 05:23. |
![]() |
![]() |
![]() |
#793 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
I didn't see it useful anywhere with positive Analyze and in general it's a nonsensical "hack".
EDIT: Just tested now, AnalyzeTh=45 produced similar reduction on artifacts on that circle without making worse the rest of deblend like Deep: Code:
LWLibAvVideoSource("D:\zzz.mp4") InpaintDelogo(mask="D:\mask.bmp", Loc="1570, 904, -28, -58", Mode="Deblend", Analyze=1, AnalyzeTh=45, dPP=-5) ![]()
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 31st May 2023 at 01:09. Reason: Typo: was Analyze instead of AnalyzeTh |
![]() |
![]() |
![]() |
#795 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
But that's what YOU should tell us.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
![]() |
![]() |
![]() |
#796 | Link |
Registered User
Join Date: Apr 2023
Posts: 60
|
Quote:
The logo is basically the same, just a bit smaller, so I thought the same rules would work fine. |
![]() |
![]() |
![]() |
#797 | Link | |
Banana User
Join Date: Sep 2008
Posts: 920
|
Quote:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 11th June 2023 at 14:36. |
|
![]() |
![]() |
![]() |
#798 | Link |
Registered User
Join Date: Apr 2023
Posts: 60
|
Code:
# Here you import your video: LWLibAvVideoSource("D:\Z_DELOGO\b\copy.mp4") # Here I located logo coords [+20 pixels from logo edges]: #Crop(1650,50,190,180) # Here we do delogo [first run with Automask=1 to get a basemask automatically, then set it to 0 to do analyze and delogo] InpaintDelogo(Loc="1650,50,190,180", mask="D:\mask.bmp", Automask=1, aMix=-2, NoBorderAt="top", AnalyzeTh=30, mode="Deblend", dPP=-5, Interp=3, Optimize2=2) |
![]() |
![]() |
![]() |
#799 | Link |
Banana User
Join Date: Sep 2008
Posts: 920
|
You don't need NoBorderAt on this video. And you are analyzing frames without logo and frames with logo fade in/out animations, exclude those parts of video with Trim().
On frames with logo animation use mode=Inpaint.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
![]() |
![]() |
![]() |
Tags |
delogo, hardsubs, ocr, remove, watermark |
Thread Tools | Search this Thread |
Display Modes | |
|
|