hello i tried to understand how to use this script to hide the logo of a tv channel i tried to understand i can't do it
+ Reply to Thread
Results 1 to 30 of 40
Maybe show us the script you're trying and any error messages, together with a short video from your source. I use that filter regularly.
What you linked is a different use for the filter, for extracting hardcoded subs.
How is anyone going to help you without seeing your script?
I didn't even understand how it works
You don't have to understand how the script works to upload it to the forum for people to see it.
i'm doing something wrong i think
InpaintDelogo( Automask=1, aMix=0, Loc="100,100,-100,-100",Mode="Deblend",Analyze=1, FrB=0, FrW=0, FrS=0)
Last edited by JAX75; 25th Oct 2021 at 13:15.
That's your entire script?
I updated my comment
Best would be asking at a place where a dev of a tool resides. I arrived here accidentally from google...
It looks like random copy/paste from examples, it can't work and reasons why - you can read in the error messages.
You can read the help about parameters inside InpaintDelogo.avsi (it's just a text file, you can open it with any text reader).
That kind of logo like in your video sample should go away without a trace.
I've never had any luck using Deblend mode. Maybe VoodooFX (the developer. Nice to see you here!) can provide a better script. This is what I used:
#######################use traditional crop and add 10 pixels on all sides########
\ Automask=0, aMix=0, Loc="1694,60,-110,-948",
\ Analyze=1, Fr1=0, Fr2=0, FrS=0)
First I made a mask ("D:\Test Files\Logo.bmp") provided below. Then I encoded the video (also provided below). Getting rid of the other round logo would be similar.
Yes, I did something similar, just enough to get it working.
To create the mask I used this, using frames 1 and 146 for a dark and bright area surrounding the logo:
Your InpaintDelogo version is very outdated, there is no Fr1 & Fr2 parameters anymore.
"Fr1=0, Fr2=0, FrS=0" <- They don't do anything in your script.
Your script can be reduced to: InpaintDelogo( mask="D:\Test Files\Logo.bmp", Loc="1694,60,-110,-948" )
Your shared "Logo.bmp" is not a mask, did you mixed up files?
OK, let's start. You can remove 80% of these logos without any plugin:
LWLibavVideoSource("D:\Iv.mkv") Crop(156,0,-186,-0) AddBorders(156,0,186,0)
To do 'Deblend' you need to get good alpha/color masks, in this short sample I don't see qood dark/bright frames to analyze, full video or better samples are needed.
Anyway we can use something for example. [ @JAX75 Those below Deblend settings are not good! ]
Mask and one output frame are in the attachments. [127th frame, selected frame where inpaint artifact is visible.]
c=LWLibavVideoSource("D:\Iv.mkv").crop(156,0,-186,-0) out1=c.InpaintDelogo(mask="D:\Mask2.bmp", Loc="1538,60,-0,-948") out2=c.InpaintDelogo(mask="D:\Mask2.bmp", Loc="1538,60,-0,-948", Mode="Deblend", dPP=5, Analyze=4, FrW=54, FrS=2) Stackvertical( \ c.crop(1400,40,-0,-928).AddBorders(0,2,0,0,$F0F080).Subtitle("Original"), \ out1.crop(1400,40,-0,-928).AddBorders(0,2,0,0,$F0F080).Subtitle("Inpaint"), \ out2.crop(1400,40,-0,-928).AddBorders(0,2,0,0,$F0F080).Subtitle("Deblend"))
Last edited by VoodooFX; 26th Oct 2021 at 02:56.
hello thank you for your help I admit that I am lost with the avs script
so the solution is to create a Mask ?
And I completely forgot about cropping away the black (followed by adding it back if wanted) to completely remove the circle logo and much of the other one. Stupid!
PhotoFiltre is a free and very good one, if you don't already have one. The crop numbers can be acquired in several ways. One is to open the video in VDub2 and use its crop filter to get your logo location.
InpaintLoc() is like Crop() [and u can use Crop() too to determine the logo coordinates], "100,100,-100,-100" are "Left,Top,-Right,-Bottom" in pixels, "0,0,-0,-0" doesn't crop anything. Change some numbers and look at video what is going on.
About AviSynth's internal functions you can read on AviSynth website, for example: http://avisynth.nl/index.php/Crop
I use PhotoShop to do mask, sometimes "Automask=1" parameter. About every parameter you can find out in the manual.
Should I add error on such 'natural' masks!?
So you don't want those frames to be processed with InpaintDelogo here.
You can isolate frames from processing with Trim() - http://avisynth.nl/index.php/Trim .
Let's assume you have one ad in video that starts at frame 121 and ends at frame 254.
Trim() use example:
# Split video:
# Then join video back:
Last edited by VoodooFX; 26th Oct 2021 at 05:11.
Mask looks good. You see result of the base mask creation, not the delogo results. The top image is mask, the bottom image is from what it was created.
Now you need to turn off Automask=0 to proceed setting for delogo.
Wasn't that clear from the manual? :
# Int "Automask" :
# 0 - Off (default).
# 1 - On. Generates the base mask. Script doesn't do anything else when "On"!
You can right click on AvsPmod' video preview and press "Save image as...". Script is better to share as text [do Copy/Paste].
Last edited by VoodooFX; 27th Oct 2021 at 05:52.
Mask is not covering whole logo, see dark edges around, you can try inflate the base mask a bit with "Inflate=2".
Probably that won't be enough and you would need to create a fatter base mask with higher aMix setting.
Btw, you can use Show=1 to show more steps of what is going on.
Create a fatter base mask, then use "Inflate=2" and "Show=1" for delogo, then post a screen of what you get.