View Full Version : Delogo (deblend problem)
color
21st November 2022, 10:33
LINK TO SHORT VIDEO + BMP I USE:
https://sprend.com/download?C=7c82ee2ff2aa411eb45cf27ddd9bf894
I use bmp as Analys and DeBlend
I do use "Sample input" as "All frames - slowest, but most accurate".
I do try changing "DeBlend shift" but nothing works. I have looked in gimp and the text is not 100% white and some "data/image" is behind.
Something else I can do with DeLogo to get it better or is it only "Repair" that works? (looks aweful)
Also. I was thinking is it possible to create a image with alpha and only dark/black color and somehow use it in a transparent to darken the logo so its not visible?
kedautinh12
21st November 2022, 10:37
Do you use InpantDelogo??
color
21st November 2022, 10:49
Do you use InpantDelogo??
Never heard of InpantDelogo, I use this (https://delogo-filter-for-virtualdub.en.softonic.com/).
Is it this you mean? https://forum.doom9.org/showthread.php?t=176860
It seems like InpaintDelogo only blur together the edges not deblend?
EDIT: I saw it has some other options as well. I only get "Incorrect Loc". So don't know what I am doing wrong.
VoodooFX
21st November 2022, 11:20
It seems like InpaintDelogo only blur together the edges not deblend?
But in the first sentence it says that it does deblending.
Where you got "only blur together the edges" impression?
Btw, Vdub Delogo is outdated.
color
21st November 2022, 11:26
But in the first sentence it says that it does deblending.
Where you got "only blur together the edges" impression?
Btw, Vdub Delogo is outdated.
I looked at this as the bottom: https://forum.doom9.org/showthread.php?p=1884254#post1884254
But I saw and updated my post only within 1 minute. :)
VoodooFX
21st November 2022, 11:28
I only get "Incorrect Loc". So don't know what I am doing wrong.
Probably that's because you didn't set Loc coords, that's crop where logo is (leave 10-20 pxs borders around logo).
And edit your bmp, red pixels to full white.
color
21st November 2022, 11:57
Probably that's because you didn't set Loc coords, that's crop where logo is (leave 10-20 pxs borders around logo).
And edit your bmp, red pixels to full white.
InpaintDelogo(mask="C:\1.bmp", Loc=coords, Mode="Deblend")
does not work
VoodooFX
21st November 2022, 12:04
InpaintDelogo(mask="C:\1.bmp", Loc=coords, Mode="Deblend")
does not work
Post your full script.
We are [not] the fortune tellers to know what "does not work" or "coords" means.
color
21st November 2022, 12:10
Post your full script.
We are [not] the fortune tellers to know what "does not work" means.
DirectShowSource("C:\video.mkv")
InpaintDelogo( mask="C:\1.bmp", Loc=coords, Mode="Deblend")
"I don't know what 'coords' means"
kedautinh12
21st November 2022, 12:52
You need set values with Loc. First, you need use InpaintLoc() to choose coords around Logo. Second use InpaintDelogo() to make Logo and delogo. Examples:
https://github.com/Purfview/InpaintDelogo/blob/7d6af71cda7ce493ddfc5f904b9f2548b3138e28/InpaintDelogo.avsi#L196
https://forum.doom9.org/showthread.php?p=1973103#post1973103
VoodooFX
21st November 2022, 13:18
DirectShowSource("C:\video.mkv")
InpaintDelogo( mask="C:\1.bmp", Loc=coords, Mode="Deblend")
"I don't know what 'coords' means"
Coords is short form of coordinates, I meant set coords of your logo to Loc parameter.
For your sample it's:
InpaintDelogo( mask="C:\1.bmp", Loc="1388,944,-280,-24", Mode="Deblend" )
or like this if you want:
coords = "1388,944,-280,-24"
InpaintDelogo( mask="C:\1.bmp", Loc=coords, Mode="Deblend" )
Use Crop(1388,944,-280,-24) to see what those coords means.
Btw, never use "DirectShowSource" filter, it's outdated too.
color
21st November 2022, 13:53
Coords is short form of coordinates, I meant set coords of your logo to Loc parameter.
For your sample it's:
InpaintDelogo( mask="C:\1.bmp", Loc="1388,944,-280,-24", Mode="Deblend" )
or like this if you want:
coords = "1388,944,-280,-24"
InpaintDelogo( mask="C:\1.bmp", Loc=coords, Mode="Deblend" )
Use Crop(1388,944,-280,-24) to see what those coords means.
Btw, never use "DirectShowSource" filter, it's outdated too.
Oh, now I get it, "location" for the logo. I thought it ment it is creating data from the mask. (thanks for having patient with me, my english is not so great)
I do get this error now. Still a bit unshour what is wrong, I have checked so all the required plugins are up to date as well. Or have I missed something?
EDIT: I use latest Avisynt+
https://i.ibb.co/J2y2XBq/Untitled-1.jpg (https://ibb.co/nfnfhgB)
VoodooFX
21st November 2022, 14:09
What is "LSMASHSource2", I've never heard of it?
Try to use normal "LWLibavVideoSource" instead. [Delete the "txt" files created for your mask before doing so]
color
21st November 2022, 14:19
What is "LSMASHSource2", I've never heard of it?
Try to use normal "LWLibavVideoSource" instead. [Delete the "txt" files created for your mask before doing so]
function LSmashSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format", bool "cache")
{
atrack = Default(atrack, -1)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
cache = Default(cache, true)
format = Default(format, "")
video = LWLibavVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden, format=format,
\ cache=cache)
return (atrack==-2) ? video: AudioDub(video,
\ LWLibavAudioSource(path, stream_index=atrack, cache=cache))
}
I got recommended to use this a while ago instead or DSS2.
Oh, I did delete the txt. But now It says "mask is empty". Am I using wrong color?
https://i.ibb.co/X2J1pF5/Untitled-1.jpg (https://imgbb.com/)
VoodooFX
21st November 2022, 14:36
Am I using wrong color?
How anyone can know but only you?
I don't see any colors in your sentences. Probably you are doing there some crazy things... :D
color
21st November 2022, 14:40
How anyone can know but only you?
I don't see any colors in your sentences. Probably you are doing there some crazy things... :D
I ment in the bmp. Sorry, my english is not so good so I have some problem understanding.
EDIT: The mask I used red. I did post the image above in the link, but here it is as well. :)
https://i.ibb.co/rfYjfYw/1.png (https://ibb.co/tPgGPgJ)
kedautinh12
21st November 2022, 14:44
I ment in the bmp. Sorry, my english is not so good so I have some problem understanding.
EDIT: The mask I used red. I did post the image above in the link, but here it is as well. :)
https://i.ibb.co/rfYjfYw/1.png (https://ibb.co/tPgGPgJ)
I think you need use white color with this logo or you can create .bmp mask automatically with automask=1, after you use this mask with automask=0
Ex: https://forum.doom9.org/showthread.php?p=1973103#post1973103
VoodooFX
21st November 2022, 14:53
EDIT: The mask I used red. I did post the image above in the link, but here it is as well. :)
https://i.ibb.co/k6j76jS/1.png
Now I see that it's still red. I saw your first post, that's why in 6th post (https://forum.doom9.org/showpost.php?p=1978852) I wrote that you need to change red to full white.
Btw, InpaintDelogo has automatic mask creation feature, you can activate it like this:
InpaintDelogo( mask="C:\automask.bmp", Loc="1388,944,-280,-24", Mode="Deblend", Automask=1)
This will only create a basemask [bmp], after you got it remove "Automask" to continue with delogo.
color
21st November 2022, 15:00
I think you need use white color with this logo or you can create .bmp mask automatically with automask=1, after you use this mask with automask=0
Ex: https://forum.doom9.org/showthread.php?p=1973103#post1973103
Oh, now something did happen! It was white color not red (I thought it was like virtualdub delogo it uses red, but white worked a lot better). I don't get it to work great, I will try creating a automatically mask instead. It seems like it would work better.
kedautinh12
21st November 2022, 15:06
Oh, now something did happen! It was white color not red (I thought it was like virtualdub delogo it uses red, but white worked a lot better). I don't get it to work great, I will try creating a automatically mask instead. It seems like it would work better.
You need upload result samples. Mr. VX, author's InpaintDelogo will help you to make results better :D
color
21st November 2022, 15:07
Some scenes look awefull (Two above) but the last one is okey.
https://i.ibb.co/NsyvrJP/radera.png (https://imgbb.com/)
kedautinh12
21st November 2022, 15:14
Some scenes look awefull (Two above) but the last one is okey.
https://i.ibb.co/NsyvrJP/radera.png (https://imgbb.com/)
If your logo don't appear in all clip, you can trim only frame have logo appear. After join frame no logo and frame have logo in one
Ex: https://forum.doom9.org/showthread.php?p=1975980#post1975980
color
21st November 2022, 15:20
If your logo don't appear in all clip, you can trim only frame have logo appear. After join frame no logo and frame have logo in one
Ex: https://forum.doom9.org/showthread.php?p=1975980#post1975980
Its only first 270 frames is not vissible so I have used trim(270,11579).
What works "best" on some frames are "Inpaint" and "blend" on some. But Inpaint does look off on some frames.
First looks great, but other two, not so much.
https://i.ibb.co/zfP9R08/radera.png (https://imgbb.com/)
I think I should use different and trim and use what works best for every scen instead as you say. I don't think it will work great on all scenes.
kedautinh12
21st November 2022, 15:29
With Inpant mode you can try with turbo=-1 and with Deblend you can try some values with IntSpd, Interp, dPP
kedautinh12
21st November 2022, 15:37
Or you can try with automask will be better with Analyze
VoodooFX
21st November 2022, 15:45
Some scenes look awefull (Two above) but the last one is okey.
Share the full video of that logo, encode with lossless x264 this script:
LWLibavVideoSource("C:\video.mkv")
Crop(1388,944,-280,-24)
color
21st November 2022, 15:52
With Inpant mode you can try with turbo=-1 and with Deblend you can try some values with IntSpd, Interp, dPP
turbo=-1 did a much better job! I also tried IntSpd, Interp, dPP, but I don't see any difference between the 1-3 value for each also tried all three with deblend.
Or you can try with automask will be better with Analyze
I did use automask. I used my own first but I saw automask did a better jobb.
color
21st November 2022, 16:06
Share the full video of that logo, encode with lossless x264 this script:
LWLibavVideoSource("C:\video.mkv")
Crop(1388,944,-280,-24)
Here you go lossless x264: LINK (https://sprend.com/download?C=65d2c4ec1eac4fac802083bbc6809eb4)
I used ffmpeg -i input -c:v libx264 -preset veryslow -qp 0 output.mkv
VoodooFX
22nd November 2022, 06:57
Looks like video is too low quality to deblend this logo, you've to use inpaint to delogo:
InpaintDelogo(mask="C:\1.bmp", Loc="1388,944,-280,-24", Mode="Inpaint", Turbo=-1)
Btw, logo has fade in/out animations, so you don't want to analyze such frames for deblend.
color
22nd November 2022, 07:17
Looks like video is too low quality to deblend this logo, you've to use inpaint to delogo:
InpaintDelogo(mask="C:\1.bmp", Loc="1388,944,-280,-24", Mode="Inpaint", Turbo=-1)
Btw, logo has fade in/out animations, so you don't want to analyze such frames for deblend.
Oh, i have not noticed more than the beginning.
Well its the highest quality on the image I got and no other source are available. Do you mean it does fade in and out in the video or do you mean in the beginning only?
I think I do a mix in that case.
Edit: mode "both" did work good on some frames "inpaint" and "deblend" did do bad.
kedautinh12
22nd November 2022, 07:24
Oh, i habe not noticed more than the beginning.
Well its the highest quality on the image I got and no other source are available. Do you mean it does fade in and out in the video or do you mean in the beginning only?
I think I do a mix in that case.
Edit: mode "both" did work good on some frames "inpaint" and "deblend" did do bad.
Inpaint work better with solid logo or dynamic logo (fade in, fade out). Deblend work better with transparent logo. You use mode both when your logo has transparent and solid
color
22nd November 2022, 07:29
Inpaint work better with solid logo or dynamic logo (fade in, fade out). Deblend work better with transparent logo. You mode both when your logo has transparent and solid
Oh so it flips between solid and transparent. That I did not notice at all. I will still mix, i have exported inpaint, deblend and both, so i go through frame by frame and use whats best. (Exported to png).
VoodooFX
22nd November 2022, 07:45
Do you mean it does fade in and out in the video or do you mean in the beginning only?
How fade out can be at the beginning? Of course it's at the end.
I think I do a mix in that case.
Yes, maybe Deblend can look better at some few random frames/scenes.
Edit: mode "both" did work good on some frames "inpaint" and "deblend" did do bad.
It's illusion, you just don't understand what is going on in "Both". :)
Don't use it here.
Can you share your ebmp file and the frame numbers where you think that Deblend or Both looks better for you?
color
22nd November 2022, 08:08
How fade out can be at the beginning? Of course it's at the end.
Yes, maybe Deblend can look better at some few random frames/scenes.
It's illusion, you just don't understand what is going on in "Both". :)
Don't use it here.
Can you share your ebmp file and the frame numbers where you think that Deblend or Both looks better for you?
Yes, frame 4011. top "inpaint" bottom "both"
EDIT: I might have used another setting and not same on both like turbo...
https://i.ibb.co/kMFbptb/04011.png (https://imgbb.com/)
VoodooFX
22nd November 2022, 08:46
Yes, frame 4011
Same frame, Inpaint vs Deblend, I don't see how Deblend is worse than "Both":
https://i.imgur.com/3h7jW6H.png
You didn't shared your ebmp file.
VoodooFX
22nd November 2022, 09:02
i go through frame by frame and use whats best. (Exported to png).
You are even more hardcore than me, InpaintDelogo has zillion possible combinations of the parameters to make some specific frame look better. :D
Look, Inpaint [adjusted] vs Deblend:
https://i.imgur.com/aTcSbRe.png
kedautinh12
22nd November 2022, 09:18
I think you need share scripts to help him faster
color
22nd November 2022, 11:03
You are even more hardcore than me, InpaintDelogo has zillion possible combinations of the parameters to make some specific frame look better. :D
Look, Inpaint [adjusted] vs Deblend:
https://i.imgur.com/aTcSbRe.png
yes, but i did try a few. You know what i mean. ;)
I think as kedautinh12, you should share a script. ☺️ Its a bit hard not knowing a lot of english and understanding everything as well.
VoodooFX
22nd November 2022, 11:55
Where is your ebmp file?
InpaintDelogo(mask="C:\1.bmp", Loc="1388,944,-280,-24", Mode="Inpaint", Sharpness=60, preBlur=2.1, postBlur=12.6, Radius=16, oPP=-3, Optimize=0)
Core inpainting parameters: https://github.com/Purfview/InpaintDelogo/blob/7d6af71cda7ce493ddfc5f904b9f2548b3138e28/InpaintDelogo.avsi#L876
I was thinking is it possible to create a image with alpha and only dark/black color and somehow use it in a transparent to darken the logo so its not visible?
Possible: https://github.com/Purfview/InpaintDelogo/blob/7d6af71cda7ce493ddfc5f904b9f2548b3138e28/InpaintDelogo.avsi#L912
color
22nd November 2022, 17:15
Where is your ebmp file?
Lets try again, I did attach file here, but it seems like it didn't want to.
https://sprend.com/download?C=b11d8c8d8e0848e3b3a8d28fc926b9b1
kedautinh12
22nd November 2022, 17:20
Don't up attach file here, you will waiting moderator approval forever :D
color
22nd November 2022, 21:30
Don't up attach file here, you will waiting moderator approval forever :D
Ah, that explain some things. :)
color
23rd November 2022, 09:30
You are even more hardcore than me, InpaintDelogo has zillion possible combinations of the parameters to make some specific frame look better. :D
Look, Inpaint [adjusted] vs Deblend:
https://i.imgur.com/aTcSbRe.png
How did you get deblend so good? Can you share the script?
VoodooFX
24th November 2022, 06:04
How did you get deblend so good? Can you share the script?
Sry for the late answer, I used personal "dev" version, didn't had time for a public release yet, expect it sooner than later... ;)
VoodooFX
24th November 2022, 17:36
On that frame I used something like this [you need to get v3.4 for it to work]:
LWLibAvVideoSource("D:\output.mkv")
Trim(500,11363)
InpaintDelogo(mask="D:\mask.bmp", Loc="1388,944,-280,-24", Mode="Deblend", Analyze=3, Interp=3, IntSpd=4, Optimize=1, dPP=-5, Greyscale=1)
Or you can download ebmp: https://we.tl/t-BSOqlnl5By
You can use ebmp like this:
InpaintDelogo(mask="D:\UCLA.ebmp", Loc="1388,944,-280,-24", Interp=3, IntSpd=4, Optimize=1, dPP=-5, Greyscale=1)
color
25th November 2022, 09:32
On that frame I used something like this [you need to get v3.4 for it to work]:
LWLibAvVideoSource("D:\output.mkv")
Trim(500,11363)
InpaintDelogo(mask="D:\mask.bmp", Loc="1388,944,-280,-24", Mode="Deblend", Analyze=3, Interp=3, IntSpd=4, Optimize=1, dPP=-5, Greyscale=1)
Or you can download ebmp: https://we.tl/t-BSOqlnl5By
You can use ebmp like this:
InpaintDelogo(mask="D:\UCLA.ebmp", Loc="1388,944,-280,-24", Interp=3, IntSpd=4, Optimize=1, dPP=-5, Greyscale=1)
I did update to your new script as well. Thank you. :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.