Hello,
I have been going through the threads in this forum such as these and I ran into an issue. I have a series of videos with "Fashion" logo in the middle [file: Lagerfeld FW10 - odd logo in the middle.mp4], but it seems to be multiple shades so I am not certain to what I should set the reference to, please. Is it possible to remove this or is this hopeless case? For this particular video, i was able to find another video without logo (if that can help create a reference watermark) [file: Lagerfeld FW10 - no logo but LQ.mp4], but for other videos i have, i only have watermarked versions and would love to remove them, please.
Thank you
+ Reply to Thread
Results 1 to 23 of 23
-
-
-
Technically you can perform temporal average of long sequence (ideally whole length) so if logo is static then it can be extracted (you can decompose video with some wavelet plugin similar to https://docs.gimp.org/2.10/en/plug-in-wavelet-decompose.html or use some high pass filter or even manually unify it with some image editor) - after extracting logo you can try to invert it so it should be canceled.
-
-
As usual, i gave it a go and something horrible came out.. I was thinking that since i have one video with watermark and another one without watermark, I could have just subtracted them but instead i have created something horrible...
Code:Overlay(file1, file2, x=0, mode="difference", opacity=1)
-
-
-
Video quality is too bad, like most youtube videos. Even in those black frames image is missing pieces...
-
thank you, Voodoo. I will try to do temporal thingy as per pandy's comment and maybe that could enable the removal of watermark.
Meanwhile, there are 3 other videos with different (and easier) semi-transparent watermark. I installed inpaint_delogo plus all the plugins, but i get following error that it doesnt recognize DistanceFunction. Do you know which plugin am I missing? Nothing comes up when i look it up, please.
I think i should get those done by myself, i just need to get the script running, please. -
-
So it's a hopeless case?
I think i found the issue at the link below.. i installed AvsInPaint.dll and now working on debugging the mask... Is this looking better?
http://forum.doom9.net/showthread.php?p=1893934 -
-
-
?!? this is basic math - video (all changes) is noise from static perspective - averaging motion improve signal (static logo) to noise (motion video) ratio
Code:@setlocal @set FFMPG=%CD% @set PATH=%FFMPG%;%PATH% @set filename=%1 @echo "%filename%" @set fa=256 @set /a fb=%fa%/2 @ffplay -loop 0 -hide_banner -v 32 -stats -an -sn -i %filename% -vf scale=iw/2:-1:sws_flags=spline,tblend=all_mode=average,decimate=cycle=2,tmix=frames=%fa%:weights="1",select='not(mod(n\,%fb%))',tblend=all_mode=average,format=pix_fmts=gray @endlocal @pause
-
-
Most likely that you are doing something wrong.
I can't tell what without the full avs script and video/mask samples.
yes, i was aware that I didnt share any info. I was trying to go through your manual, learn how it works and debug it myself so i dont post every step on the forum and spam people. I had a lovely evening going through your manual last night (doesn't mean I'm much smarteryoure definitely smarterer). But at least i gave it a try
This different watermark is from website video (not youtube), so good news, its not compressed.
I was able to do Loc function:
Code:InpaintLoc(file1,loc = "180,240,-180,-240")
It seems i dont understand the Inpaint function properly (still studying).
It does quite okay inpainting when i do "Inpaint" mode. But my watermark is transparent, not opaque. So when i switch to "Deblend", i just get no removal and odd squares on edges... I must do something wrong.
Code:InpaintDelogo(mask="C:\0 Temp\Download\Watermark Pond5.bmp", Automask=0, aMix=0, Loc="180,240,-180,-240", Mode="Inpaint")
Code:InpaintDelogo(mask="C:\0 Temp\Download\Watermark Pond5.bmp", Automask=0, aMix=0, Loc="180,240,-180,-240", Mode="Deblend")
-
oh, this is very intriguing.. I never used gimp but if i can do it via avisynth/ffmpeg, i could try to export it based on your code provided. to be honest, i have nothing to lose and even partial removal can help. I'll go through the code when i have time and apply it (this weekend/next week). thank you for your help
-
But compression errors are averaged 512 times or more i.e. minuscule when compared to video signal.
And no, it is not animated as it is static and ALL motion is averaged. ideally if all frames are counted in and averaged then it will provide lowest possible error.
Later you can extract static part from residual background using 'wavelet decomposition' plugin in GIMP so you will get close to perfect static watermark so it can be subtracted from video.
It would be nice if ffmpeg could be equipped with such decomposition so layers laid in various frequency scales can be processed independently.
ffmpeg offer possibility to mix (filter 'blend') two videos - using averaged version of video and subtracting it with itself can be quick workaround. -
Strongly disagree.
Wrong semantics... I would use "close to highest possible". Did you actually check that watermark? Try your theory on it.
Sounds simple in theory, not so simple in practice. Why you don't make a script on your method?
EDIT:
I don't need to reinvent the wheel, I already wrote a humongous script with over 120 parameters to cover ~every logo possible...
If you think that you can improve anything on deblending then write a script with your method instead on theorizing on it.Last edited by VoodooFX; 5th Jan 2024 at 04:34.
-
Last edited by VoodooFX; 5th Jan 2024 at 06:30.
-
If watermark logo is NOT blurred then it is STATIC.
In terms of signal processing this is lowest possible error as error is anyway unavoidable but averaging minimize it to lowest possible level.
https://4nsi.com/optimizing-image-signal-to-noise-ratio-using-frame-averaging/
And yes, I actually checked this watermark and discovered error in 'tmix' filter (if more than 256 frames is averaged then internal bitdepth [my assumption 8 bit] is not enough and error is obviously visible - possible problem with autoscale - have no time to raise this in ffmpeg bug tracker - for maximum 1024 frames allowed by 'tmix' filter at least 2 bits more are required than currently implemented). Of course using more frames produce lower error (for 256 frames error is approx 6.25% where for 1024 it will be 3.125% - if ALL frames could be used and averaged then error will be approx 1.34%).
I don't need such functionality and this method is useful only for case with static logo. Separation logo from low freq residual is additional step - mentioned GIMP 'wavelet decompose' filter as i use this filter frequently to separate residual error from for example photographed documents where illumination of page is not linear and not regular - works quite well so this step is verified.
Good for you but no need to be mean - as i've wrote previously - averaging can be used to extract static from dynamic part - there is no magic there and i don't pretend to be some inventor of new magical method - coherent sampling is very similar principle. -
-
On sample provided by OP watermark logo is not blurred after average operation i.e. it is STATIC.
Yes, i never claimed that average remove watermark logo - purpose of averaging is STATIC watermark logo EXTRACTION (as a series of steps) so STATIC watermark logo can be used with for example inpainting technique - in case where logo can't be extracted traditionally average may help.
Hope this is clear now - apologies for my english if you had different impression.
Similar Threads
-
Help removing transparent watermark
By yang111213 in forum RestorationReplies: 6Last Post: 13th Jan 2023, 03:00 -
For $$ - Remove semi-transparent logo from video
By gestalt21 in forum EditingReplies: 21Last Post: 20th May 2022, 12:21 -
Help removing transparent watermark
By sammy919 in forum RestorationReplies: 2Last Post: 11th Dec 2020, 01:42 -
removing border from logo with transparent
By vanhoa in forum EditingReplies: 0Last Post: 12th Oct 2019, 09:26 -
I have a problem removing transparent logo in avisynth using "delogo"
By TeNSoR in forum Newbie / General discussionsReplies: 11Last Post: 8th Jan 2019, 16:30