hi,
I'm trying to remove a logo again.. this time I can't even finish the process...
this is the first frame of the video: https://www.dropbox.com/s/t21vm5s6k04qc7r/1st%20frame.png?dl=0
this is the script I'm using:
Code:LoadPlugin("C:\PATH\MeGUI-2913-64\tools\ffms\ffms2.dll") FFVideoSource("C:\PATH\MKV\1080i 50 fps TS file in mkv container - cutted.mkv", fpsnum=25, fpsden=1, threads=1) crop(58, 0, -58, -2) bbmod(0,2,2,2,128,8) #InpaintLoc(Loc="1576,858,-16,-64") #InpaintDelogo(mask="C:\PATH\.mask\mask.bmp", Automask=1, Loc="1576,858,-16,-64", Analyze=3) InpaintDelogo(mask="C:\PATH\.mask\mask.bmp", Loc="1576,858,-16,-64", Mode="Deblend") #SelectRangeEvery(800,20) #Prefetch(7)
the first time I used Analyze=2, it was fast enough, but the mask wasn't not so good.
so I restarted all and using Analyze=3, I got a much better mask, after 3h 20 min.
here masks comparison: https://www.dropbox.com/sh/hm7fyezlc3fqm70/AACRhg9hw7hzzZZ9CX55vIGua?dl=0
at this point I have activated the 3rd line, with "Deblend" and it started creating a txt file in the mask folder, this one:
https://www.dropbox.com/s/ezo8e8llu3g1ket/mask.bmp_InpaintDelogo2_1576-858-16-64_A2-16.txt?dl=0
after many hours I'm still wating for the avisynth process to stop, the txt file above is no longer updated,
but I see another txt file now in the script folder, this one:
https://www.dropbox.com/s/om9r1du03zwgzi4/Dummy_InpaintDelogo2_1576-858-16-64_A2-16.txt?dl=0
this file too seems no longer updated despite the process is still running and using some cpu..
please help, I didn't use inpaintdelogo many times but I remember that it wasn't so slow. is it stucked?
is the second time I try it today, spending hours but it seems it always get stucked..
what I'm doing wrong?
mediainfo of the source video: it has about 165k frames, which they are all doubled.
Code:General Complete name : C:\PATH - cutted.mkv Format : Matroska Format version : Version 4 File size : 2.84 GiB Duration : 1 h 50 min Overall bit rate : 3 692 kb/s Writing application : Lavf58.76.100 Writing library : Lavf58.76.100 ErrorDetectionType : Per level 1 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference : 4 frames Format settings, GOP : M=4, N=24 Codec ID : V_MPEG4/ISO/AVC Duration : 1 h 50 min Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 FPS Standard : Component Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
-
Last edited by maudit; 29th Aug 2022 at 00:44.
-
Both masks are practically same, in Analyze2mask there is only one pixel "less" at some places, such difference doesn't matter.
For Automask there is aMix parameter, changing it won't trigger re-analyze, probably aMix=1 in your Analyze=2 run would make it look like with Analyze=3 and aMix=0 [0 is aMix default].
What is strange that analyze is so slow for you, I just checked my CPU benchmarks with yours, your CPU is 3 times faster...
Btw, for such white one color logo you can use Analyze=-4 to make a basemask, it's instant fast, you just need to find a black/dark frame.
at this point I have activated the 3rd line, with "Deblend" and it started creating a txt file in the mask folder, this one:
https://www.dropbox.com/s/ezo8e8llu3g1ket/mask.bmp_InpaintDelogo2_1576-858-16-64_A2-16.txt?dl=0
after many hours I'm still wating for the avisynth process to stop, the txt file above is no longer updated
When at the top in txt file you see "# Total frames to analyze: 28060" - that means that search for the suitable frames is finished and now runs analysis of those frames.
but I see another txt file now in the script folder, this one:
https://www.dropbox.com/s/om9r1du03zwgzi4/Dummy_InpaintDelogo2_1576-858-16-64_A2-16.txt?dl=0
this file too seems no longer updated despite the process is still running and using some cpu..
Are you sure it wasn't created in some run before?
Absence of "# Total frames to analyze" in it suggests that it's in progress or some run was canceled. [EDIT: it shouldn't be in progress here]Last edited by VoodooFX; 29th Aug 2022 at 07:18.
-
thanks for the answer, I'm not sure I've understood everything..
I now have the cpu busy, but as soon as possible I'll retry, but pls give me the exact command sequence I have to use.
here's the first 10min sample, I could give you a longer file or even the complete video if needed.
https://www.dropbox.com/s/7xhf8bcyacm133c/first%2010%20min%20sample.mkv?dl=0 -
Then ask what you don't understand.
Your script is OK, just that you could set "Deblend" when running Automask.
Probably don't encode with Prefetch when Mode="Deblend", probably would be slower than without it.
10 mins sample test with Analyze=3 and your "mask.bmp":
Took 5:30 to create deblending masks, it would take 60 mins on whole video, so your "3h 20 min" looks very slow, maybe something to do with AMD CPU... [doubt that bbmod() is that slow]
Code:LWLibAvVideoSource("D:\first 10 min sample.mkv") Crop(58, 0, -58, -2) InpaintDelogo( mask="D:\mask.bmp", Loc="1576,858,-16,-64", Mode="Deblend", Analyze=3 )
PS:
I looked at your Automask temp images [it's same as alpha in deblending masks], there are some imperfections in "1" in the alpha mask from Analyze2, so Analyze3 would be better.
Your Analyze3 alpha vs your Analyze2 alpha:
Actually I got very good deblending masks just from that 10 mins sample, you can use them if you want: https://we.tl/t-OheGUfMNx1
And I noticed a red dot logo in some frames, you can remove it with "Inpaint".Last edited by VoodooFX; 29th Aug 2022 at 11:20.
-
-
I didn't understand the part when you talk about aMix and re-analyze:
"For Automask there is aMix parameter, changing it won't trigger re-analyze, probably aMix=1 in your Analyze=2 run would make it look like with Analyze=3 and aMix=0 [0 is aMix default]."
what are the process steps?
1 - set the area with LOC
2 - create those two images (alpha and deblend) with automask=1
3 - create the txt file
then what? it should be all.. or not?
about analyze 2vs3, yes I was talking about that "big" dark imperfection in the "1", and also other few ones, analyze=3 is better.
I don't care if it's slow, i can wait 3h, the important thing is remove the logo in the best possible way. the problem is that after another 4h for create the txt file, it didn't stop.
now I really can't do nothing, cause of busy cpu, but I will do it, trying again putting "deblend" in the second line, maybe moving bbmod at the end... i don't know..
about the video, I know it's upscaled but I have to post it in thay way, with HD res.
regarding the framerate, i'm quite sure, it's 50i, like all other DVB-T PAL stuffs that I record.
if you open the sample with vdub2 for example, you will count 30k frames and you'll see every frame is shown two times.
also if you open it in mpc-hc and moving frame to frame with CRTL+arrow, you'll see the next frame shadow.
ok the delogo works well on still images, but I've often seen artifacts when playing videos, on scenes and background colors changes.
yes I know that parental guide non-trasp red circle, it's only few secs at the beginning, if all will be good I'll look into it too.Last edited by maudit; 29th Aug 2022 at 11:44.
-
I meant that analysis won't run again if you change aMix setting.
No, Automask is to create only the basemask [AKA bmp mask, and it's not called "deblend" mask], it does nothing else.
Temp bmp image is there for aMix parameter and the basemask is created from this temp image.
No. Deblending masks are in ebmp file, it's created after you have the basemask. Txt file contains list of the suitable frames to analyze, it can be created or not, depends from selected Analyze method.
Then you can encode.
I thought that you meant the basemask. Because in your shared script you are running Analyze=2...
It stops only after analysis is finished and the deblending masks are created AKA ebmp file [there are multiple masks inside one file].
Txt file is created when the first suitable frame is encountered, and scan for the suitable frames is finished when you see the total frames at the top in it, then actual analysis of those frames starts. [so both txt and ebmp were created in 5 mins on your sample]
regarding the framerate, i'm quite sure, it's 50i, like all other DVB-T PAL stuffs that I record.
if you open the sample with vdub2 for example, you will count 30k frames and you'll see every frame is shown two times.
also if you open it in mpc-hc and moving frame to frame with CRTL+arrow, you'll see the next frame shadow.
vdub2 shows it improperly.
What you see is called the poor deinterlace.Last edited by VoodooFX; 29th Aug 2022 at 14:05.
-
checking it better you're right, this file has different mediainfo framerate from others I met till now.
even if at the end they look made in the same way to me.
the usual recordings are described like this:
Code:Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 50.000 FPS Original frame rate : 25.000 FPS Standard : Component Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First
now about the inpaintdelogo..
in order to save some time can I use the 3 files I already have, I mean:
mask.bmp
mask_AutomaskTemp_A3.bmp
mask.bmp_InpaintDelogo2_1576-858-16-64_A2-16.txt
if I keep them in the mask folder, can I proceed with the following command only:
InpaintDelogo(mask="C:\PATH\.mask\mask.bmp", Loc="1576,858,-16,-64", Mode="Deblend")
or have I to restart from scratch?
the above line will create the ebmp file?
anyway.. I'll try soon, the cpu job is ending... -
Yes, you can re-use them, you can even re-use them on another video with same logo.
"mask_AutomaskTemp_A3.bmp" is not needed for you anymore, it's temp file to create "mask.bmp".
If you wrote that you understand that "analyze=3 is better", then why you want to run "Analyze=2" [it's default]?
If you want to save time then I've shared ebmp masks for you in some post above.
To answer your PM:
No, I don't offer the private lessons, you can ask in forums.
Don't expect to "fully understand" InpaintDelogo soon, understanding will come slowly with practice. Anyway, I doubt that anyone but me understands it entirely.
It's not that kind of plugin where you can fully understand it by doing few delogos and skipping basics of video/delogo/Avisynth, so focus on the basics.
More stuff from PM:
I'm going trying to use those 2 bmp and the txt file again, trying to figure out how to create the ebmp.Last edited by VoodooFX; 29th Aug 2022 at 20:37.
-
how is it possible if another video has different crop?
also the logo can be moved by them, the red dot is not always the same color dimension and position and appear always or sometime.
"mask_AutomaskTemp_A3.bmp" is not needed for you anymore, it's temp file to create "mask.bmp".
If you wrote that you understand that "analyze=3 is better", then why you want to run "Analyze=2" [it's default]?
If you want to save time then I've shared ebmp masks for you in some post above.
To answer your PM:
No, I don't offer the private lessons, you can ask in forums.
Don't expect to "fully understand" InpaintDelogo soon, understanding will come slowly with practice. Anyway, I doubt that anyone but me understands it entirely.
It's not that kind of plugin where you can fully understand it by doing few delogos and skipping basics of video/delogo/Avisynth, so focus on the basics.
the real problem is "to pratice" with a thing that takes 12h every try.
i don't skip anything, i have the basic of video and avisynth and i used your plugin more than few times.
another problem is to explain well our knowledge, certains don't even try it, my goal was to understand this tool and translate it for other people.
but no matter-
More stuff from PM:
I'm going trying to use those 2 bmp and the txt file again, trying to figure out how to create the ebmp.
There is nothing to figure out, ebmp is created automatically on the first run.
anyway now i restart from scratch.Last edited by maudit; 30th Aug 2022 at 04:53.
-
For ebmp what matters is same Loc dimensions and logo position in it. I don't see how "red dot" is related to this, it's not present in your masks.
The basemask would need to be created new if logo changes position.
If you don't specify Analyze then Analyze=2, because it's default.
To what language do you want to translate it?
Why would you want to waste your time for no reason, instead you could run tests on a short sample to find why it's 12 times slower for you, when your CPU is 3 times faster.Last edited by VoodooFX; 30th Aug 2022 at 05:56.
-
To what language do you want to translate it?
Why would you want to waste your time for no reason, instead you could run tests on a short sample to find why it's 12 times slower for you, when your CPU is 3 times faster.
also I'm unsuccesfully trying to delete that red dot, using a larger LOC: 1948 instead of 1976.
reading the instructions i should use "Both" but it doeasn't fully delete it , instead "Inpaint" does.
i doubt my cpu is 3 time faster than something. -
Send me link if you do it, I'll add it to the manual.
I already wrote that the 10 mins sample produces very good deblending masks, and shared the script with ebmp. You are struggling for few days on the 5 mins task...
That red dot is not part of the same logo, and it's there only for few seconds, you need to use another instance of InpaintDelogo, and limit it to the range of affected frames.
That's what benchmarks say, and that performance I would expect vs 10 years older CPU.
Measure decoding performance with AVSMeter, commandline example:
Code:AVSMeter.exe script.avs -range=1,5000
Code:LWLibAvVideoSource("D:\first 10 min sample.mkv")
Then you can measure Analyze 2 and 3, rename or copy bmp to another folder so it wouldn't be picking up existing txt/ebmp.
[Probably you can't measure that with with AVSMeter, use a timer]
Code:LWLibAvVideoSource("D:\first 10 min sample.mkv") Crop(58, 0, -58, -2) InpaintDelogo( mask="D:\mask.bmp", Loc="1576,858,-16,-64", Mode="Deblend", Analyze=2 )
Code:LWLibAvVideoSource("D:\first 10 min sample.mkv") Crop(58, 0, -58, -2) InpaintDelogo( mask="D:\mask.bmp", Loc="1576,858,-16,-64", Mode="Deblend", Analyze=3 )
What program do you use to open avs scripts? -
when I will fully understand how the plugin works, I'll do it.
ok, maybe you're right, 10 mins are enough, anyway I preferred to use the mask generated with a full analysis this time,
I've encoded it, using ebmp created with these lines:
#InpaintLoc(Loc="1576,858,-16,-64")
#InpaintDelogo(mask="C:\PATH\.mask\mask.bmp", Automask=1, Loc="1576,858,-16,-64", Analyze=3)
InpaintDelogo(mask="C:\PATH\.mask\mask.bmp", Loc="1576,858,-16,-64", Analyze=3, Mode="Deblend")
the result is almost perfect, anyway much better than what I expected.
ok I got it now, I should have to try it, but not this time, I don't know how to do it, I have to think about it.
this time, those few seconds of the red dot are not a big problem.
avspmod, but I do not wanna try to do a benchmark right now.
concluding, thanks for having clarified some things I didn't get.
the logo has been removed pretty well.
I've saved ebmp with LOC dimensions, so maybe the next time I'll try to use it for another movie with same logo.
I'll probably open new thread in the future in order to understand how to deal with parental guide colored non-trasparent dots that stay always on the screen and about to deal with logos that are out of the crop for a half.
the no logo sample: https://www.dropbox.com/s/3rmym04163j7q78/no%20logo%20sample.mkv?dl=0
the logo shadow is barely visible in some situation, moving scenes, if you know what you are searching for, but probably nobody will notice it.
so thank you very much for your availability, I'm fine for the moment.Last edited by maudit; 31st Aug 2022 at 20:07.
-
It's simple, use Trim(). As you are done with this video then I'll not bother to write an example, ask again if you can't figure it out in the future.
Dimensions are kinda in there already, you can get dimensions by pasting Loc into Crop(), an offset from the logo edges you've used is more important to remember.
Yep, very good. I can't see any trace of logo in your sample, probably in some moving scenes there are compression artifacts because of bit-startvation, so there will be some artifacts from deblending as details like this logo are not properly encoded there.
Similar Threads
-
Remove tv logo with InpaintDelogo
By _Donnie in forum EditingReplies: 5Last Post: 7th Jun 2022, 08:18 -
Problem with script "InpaintDelogo"
By kenator18 in forum EditingReplies: 13Last Post: 17th May 2022, 14:26 -
InpaintDelogo
By JAX75 in forum Newbie / General discussionsReplies: 39Last Post: 27th Oct 2021, 11:29