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. |
15th September 2021, 08:35 | #21 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
Edit: So, I got curious and learned how to make an ldg file. Downloaded the English version of aviutl (v1.14), loaded the avs script into it, selected the "logo analysis" tool, set start/end markers for a set of frames that I thought would be good to analyze (~1500 frames). Then drew a rectangle around the logo with a few extra pixels for padding, set the threshold to 128 and started to analyze the logo. Saved the ldg file and loaded it into AviSynth+. Not bad .... Here's the ldg file: test 1280x720-128.lgd And script used was: Code:
LSMASHVideoSource("899.mp4") DelogoHD(logofile="test 1280x720-128.lgd") Last edited by Reel.Deel; 15th September 2021 at 08:40. |
|
16th September 2021, 05:45 | #26 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
Edit: You may want to look at different threads here on how to that. There are various options, for example you can use ffmpeg/x264 directly as they accept an avs script. Or you can use VirtualDub2 to export your video. But that is outside of the scope of this thread, if you wish you can open a thread in the newbies section or the AviSynth usage section and we'll help you out Last edited by Reel.Deel; 16th September 2021 at 06:33. Reason: reply to post below |
|
17th September 2021, 00:34 | #28 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Last edited by VoodooFX; 17th September 2021 at 00:37. |
|
17th September 2021, 03:23 | #29 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
I made another lgd using the range 985-12872 (which I believe was the range on the original ldg but not as long) and got the same results as first lgd. You mentioned that you used aviutl directly, when I tried that I also got bad results. Not sure If I did something wrong or what but when I loaded the avs script onto aviult I got the good results from the lgd. Second lgd: test2 1280x720-30.lgd Settings: I read on a few sites that the threshold at default value (30) is a good value so I left it alone, on the first lgd I set it to 128. |
|
17th September 2021, 09:06 | #30 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Did you installed some filter for avs loading, I don't see anything for avs in the pack? That threshold I imagine is max value between min-max luminance, or something similar, so you don't need to select the frame ranges manually. I think similar feature could be added to InpaintDelogo. EDIT: Found how to produce it: "Y" must be odd, if you set it to even then all good again. Here how the bug looks (top right corner): Last edited by VoodooFX; 17th September 2021 at 09:57. |
|
17th September 2021, 09:58 | #31 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
I did install an updated version of LogoScan but that was after I made the first successful lgd. https://github.com/emako/Delogo-Aviutl ----- One thing I wish DelogoHD had would be the ability to output just a black and white mask padded to the width and height of the input clip. DelogoHD seems to affect some areas just below below the logo. With a mask that can be easily fixed and even do some additional denoising just on the logo area. Although, there's already a script (LogoNR) that does denoising on the logo area by cropping, filtering and then overlaying the result onto the clip. Edit: Well scratch that idea, AddlogoHD can be used with the same lgd to add the logo onto a blankclip to create a logo mask. Cool stuff Edit: You know I was actually thinking the same. With the bad lgd I tried moving the mask in DelogoHD +/- 1 pixel and it would always off. I just did not try to find out what caused it. Nice find VoodooFX. Maybe I will write a small tutorial on how to create an lgd file since it's very simple to do and produces very nice results. Last edited by Reel.Deel; 17th September 2021 at 10:21. |
|
17th September 2021, 11:01 | #32 | Link | ||
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Quote:
Here InpaintDelogo for comparison: InpaintDelogo( mask="d:\mask.bmp", \ Automask=0, aMix=2, Loc="1124,24,-52,-636", \ Mode="Deblend", Analyze=3, FrB=12369, FrW=8993, FrS=3, \ Inflate=2, Deep=0, IntSpd=2, Interp=1, dPP=2) Just the first frames I found, these are too bright and too dark frames I think, should be better with less bright/dark ones (mind FrS if you'll try other frames). First run with Automask=1 to generate b/w mask, then set back to 0. Set Interp and dPP to 0 to see pure deblending. Last edited by VoodooFX; 17th September 2021 at 11:05. |
||
17th September 2021, 11:15 | #33 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Just a source filter for FlashBang's video in post #20.
Code:
LSMASHVideoSource("899.mp4") I might of been mistaken, with my original lgd I saw that it affected slightly other areas below the logo. But looking at it again with the updated lgd I can't really spot it anymore. I compared against: Code:
src = LSMASHVideoSource("899.mp4") delogo = DelogoHD(src, logofile="test2 1280x720-30.lgd") mask = Blankclip(src, color_yuv=$000000).AddlogoHD(logofile="test2 1280x720-30.lgd").mt_binarize(1) mt_merge(src, delogo, mask, u=3, v=3, luma=true) Will try it out tonight. It's 5am here and time to get some sleep |
17th September 2021, 20:47 | #34 | Link | ||
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Quote:
Btw, those "bad" lgds are actually good in AviUtl, but gets borked in DelogoHD. |
||
18th September 2021, 15:47 | #35 | Link |
Registered User
Join Date: Aug 2021
Posts: 10
|
I found delogo filter for aviutl : https://github.com/emako/Delogo-Aviutl/releases/tag/r1
|
18th September 2021, 22:30 | #36 | Link | |||
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
Threshold parameter in LogoScan: Threshold value to determine if the background is a single color. The higher the value, the more lenient the judgment. Quote:
Quote:
|
|||
19th September 2021, 22:43 | #37 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Bugfix for lgds with odd "pos Y" values: https://github.com/HomeOfAviSynthPlu...ogoHD/releases
Last edited by Reel.Deel; 19th September 2021 at 22:46. |
19th September 2021, 22:53 | #38 | Link |
結城有紀
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
|
A few tips.
1. Pick videos that have clean flat areas around logo positions. 2. Make sure you only include frames that have the logo. Don't include CMs that don't have logo on it. 3. Better use mod4 or at least mod2 (even numbers) for positions and sizes, for better compatibility. 4. Leave about 3 pixels around logo when choosing the boxed area. 5. Threshold, the lower the cleaner but you get fewer samples, the higher the worse but you get more samples. Pick wisely. For animes or clean source, 20 should be a good balanced number. For real life content, 30 is good. If the source has too few samples, increase to 40 or 50. 6. If you scanned a logo and would like to exhibit it on my website you can email to i(at)i.wtf and attach your lgd files. |
|
|