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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st October 2020, 18:17   #81  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by StainlessS View Post
Not sure but I think that ExInpaint is less temporally stable than AvsInpaint, better for still image but not video.
so that mean ExInpaint use temporal dimension (The previous and next frame)? in stab3 using stab3(mirror=15,FillBorder=2,use_exinpaint=true) will give better stability than stab3(mirror=15,FillBorder=2) (which use AvsInpaint)
__________________
See My Avisynth Stuff

Last edited by real.finder; 21st October 2020 at 20:31. Reason: update link for stab3 that fix use_exinpaint
real.finder is offline   Reply With Quote
Old 21st October 2020, 18:35   #82  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,765
I think that ExInpaint is purely spatial, it predicts missing parts based on spatial structure elsewhere in the same image.
If video, then spatial predictions can be quite a lot different to adjacent frames [but indiviual frames, might look good].

I've no idea what Stab() does.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd October 2020 at 13:21.
StainlessS is offline   Reply With Quote
Old 21st October 2020, 19:00   #83  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by StainlessS View Post
I've no idea what Stab() does.
http://avisynth.nl/index.php/Stab

it made black borders by default, so the Stab2 and Stab3 has some solutions for it
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 22nd October 2020, 13:18   #84  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Quote:
Originally Posted by real.finder View Post
hi,

what about make the mask parameter as val? so user can feed it with any mask clip to allow moving logo mask

also is ExInpaint instead of AvsInpaint will be better? from what I see ExInpaint is faster and give better output in some usages
What I have seen from examples, ExInpaint is good for the images, that would make it bad for video. I could add separate function for it, for images.

Not sure what the use scenario would be with "val". Is there new code for an object tracking or an object recognition? How is that half python Avisynthtrackin code? Anyone tried it? Can it be incorporated to something useful?

I remember trying Stab, but couldn't manage to get the results, so dunno what it actually does...
VoodooFX is offline   Reply With Quote
Old 22nd October 2020, 13:47   #85  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,765
I tried Avisynthtrackin a little bit,
[original StarWars] on C3PO walking towards camera alone over the sand dunes.
Worked reasonably well, but IIRC required occasional user nudge/tweak to keep it working.
For above to have worked, it must continuously vary tracking stuff as C3PO got bigger and bigger as well as moving in frame.

Probably too much bother to be useful though.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 22nd October 2020 at 17:03.
StainlessS is offline   Reply With Quote
Old 22nd October 2020, 14:04   #86  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by VoodooFX View Post
What I have seen from examples, ExInpaint is good for the images, that would make it bad for video. I could add separate function for it, for images.

Not sure what the use scenario would be with "val". Is there new code for an object tracking or an object recognition? How is that half python Avisynthtrackin code? Anyone tried it? Can it be incorporated to something useful?

I remember trying Stab, but couldn't manage to get the results, so dunno what it actually does...
val in avs is not new, with it you can make the parameter accept any type of things, you can see how SMDegrain deal with prefilter parameter for example
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 22nd October 2020, 14:06   #87  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
While I'm at this thread, one comparison for the history; somewhere here in forum is semi-manual "Delogo" avs script which was aiming to do better than vdub plugin, I didn't tried it (don't like manual scripts), but from examples I have seen it did better job than other methods at the time. Here few comparison screenshots:

Original:


DeLogo (avs script):


InpaintDelogo:


Original:


DeLogo (avs script):


InpaintDelogo:
VoodooFX is offline   Reply With Quote
Old 22nd October 2020, 16:44   #88  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Quote:
Originally Posted by real.finder View Post
val in avs is not new, with it you can make the parameter accept any type of things, you can see how SMDegrain deal with prefilter parameter for example
I meant what to do with those "any type of things"?
VoodooFX is offline   Reply With Quote
Old 22nd October 2020, 18:56   #89  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by VoodooFX View Post
I meant what to do with those "any type of things"?
as I said "so user can feed it with any mask clip to allow moving logo mask" since now it only accept image mask path

and maybe I will add InpaintDelogo to stab3 since ExInpaint crash in x64 after refresh in avspmod and AvsInpaint give flickering borders

test codes
Code:
last.ExInpaint(FillBorders_stabi(pad=2,maskonly=true,thr=30).mt_expand(U=-255,v=-255))
last.InpaintLogo(FillBorders_stabi(pad=2,maskonly=true,thr=30).mt_expand())
so maybe your script will help if it work with mask clip
__________________
See My Avisynth Stuff

Last edited by real.finder; 22nd October 2020 at 19:04.
real.finder is offline   Reply With Quote
Old 22nd October 2020, 20:29   #90  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Ah, that's why. I would look into it if there was generally working script/plugin for an actual moving logo detection/tracking. Filling borders doesn't give an incentive when that's not a small tweak.
Script is using same AvsInpaint, I wouldn't expect different results. How wide those borders are and why not cut them off?
VoodooFX is offline   Reply With Quote
Old 22nd October 2020, 21:22   #91  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by VoodooFX View Post
Ah, that's why. I would look into it if there was generally working script/plugin for an actual moving logo detection/tracking. Filling borders doesn't give an incentive when that's not a small tweak.
Script is using same AvsInpaint, I wouldn't expect different results. How wide those borders are and why not cut them off?
for moving logo, I think if the move not random then user can make mask using http://avisynth.nl/index.php/Animate and the logo

the borders width depend on the shaking fix and the stab settings, cut them off not always a good idea especially when you deal with 480p input that you have to cut the black borders in it and then use stab(), and it's worst if it have a big black borders up and down (16:9 in 4:3)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 25th October 2020, 22:14   #92  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Quote:
Originally Posted by StainlessS View Post
I tried Avisynthtrackin a little bit,
[original StarWars] on C3PO walking towards camera alone over the sand dunes.
Worked reasonably well, but IIRC required occasional user nudge/tweak to keep it working.
For above to have worked, it must continuously vary tracking stuff as C3PO got bigger and bigger as well as moving in frame.

Probably too much bother to be useful though.
If it can track an object with the changing shapes, then it should track movement of the static shape object much better, no? What if such object jumps long distances? I personally don't have time to test it, left comment there https://forum.doom9.org/showthread.p...10#post1926710, maybe someone interested in such logos will give it a go.

Somewhere I've seen that you wrote some motion blending script to isolate a moving logo, did you tried to adapt it to InpaintDelogo? Every time I look at the code of ID it makes my head spin for a bit...
How reliable such isolation is?

Quote:
Originally Posted by real.finder View Post
...it's worst if it have a big black borders up and down (16:9 in 4:3)
That's way beyond of practical use. Imo practical threshold would be somewhere bellow ~20px.

Now I'm trying to remove a static animated logo, a running timer, that would be a bias to what you are asking for.

Last edited by VoodooFX; 25th October 2020 at 22:28.
VoodooFX is offline   Reply With Quote
Old 26th October 2020, 01:11   #93  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by VoodooFX View Post

That's way beyond of practical use. Imo practical threshold would be somewhere bellow ~20px.

Now I'm trying to remove a static animated logo, a running timer, that would be a bias to what you are asking for.
indeed, but I didn't mean that, I was mean after crop them and use stab

and thanks about trying support it
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 2nd November 2020, 19:24   #94  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Quote:
Originally Posted by real.finder View Post
and thanks about trying support it
I started tinkering around it; so you want to supply there a whole clip aka dynamic mask or just a one frame mask?

There is lots of changes accumulated in the script over the year, I'll publish it after I'll add all new stuff to the manual.
I hate writing manuals, but there is no point releasing without them...

Last edited by VoodooFX; 2nd November 2020 at 19:34.
VoodooFX is offline   Reply With Quote
Old 2nd November 2020, 21:06   #95  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,359
Quote:
Originally Posted by VoodooFX View Post
I started tinkering around it; so you want to supply there a whole clip aka dynamic mask or just a one frame mask?

There is lots of changes accumulated in the script over the year, I'll publish it after I'll add all new stuff to the manual.
I hate writing manuals, but there is no point releasing without them...
supply a whole clip aka dynamic mask, or it's will be better if both
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 5th November 2020, 18:36   #96  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Added support for dynamic/static mask clips, just need to optimize the script for the dynamic clips.

I noticed that multi-threading now works, it runs x3-x4 faster with Prefetch(4), not sure why, is it because some changes in new LSMASH indexer or AVS+ 3.5?
VoodooFX is offline   Reply With Quote
Old 6th November 2020, 00:15   #97  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 866
Quote:
Originally Posted by VoodooFX View Post
Added support for dynamic/static mask clips, just need to optimize the script for the dynamic clips.

I noticed that multi-threading now works, it runs x3-x4 faster with Prefetch(4), not sure why, is it because some changes in new LSMASH indexer or AVS+ 3.5?
Where your download link new ver??
kedautinh12 is offline   Reply With Quote
Old 6th November 2020, 14:31   #98  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
Encountered some weird random bug (LSMASH 20200728 + AVS+ 3.4 r2923), first I thought that's some frame inaccuracy but probably it's bug in AVS+/Overlay or AVSinpaint, need to investigate it more. Is there some script/plugin which would compare frames from two separate video files (expected to be identical) and return frame numbers of not identical frames? Or any ideas how to do such comparison?

Quote:
Originally Posted by kedautinh12 View Post
Where your download link new ver??
It will be posted when it's ready.

Last edited by VoodooFX; 8th November 2020 at 01:57.
VoodooFX is offline   Reply With Quote
Old 8th November 2020, 01:46   #99  |  Link
VoodooFX
Banana User
 
VoodooFX's Avatar
 
Join Date: Sep 2008
Posts: 386
No ideas how to make such comparison, that would really help to pin point the bug?

Here I made another run with few steps on the output to see more what is going on and accidentally noticed this on one frame ("before" bug was different and much severe):
Proper:

Bug:


Here it didn't influenced much the end result (left/bottom), but how in the hell top/right corner mask is red, feathered and "12" visible when it goes through Greyscale.Levels(127,1,128,0,255)...

Last edited by VoodooFX; 8th November 2020 at 01:50.
VoodooFX is offline   Reply With Quote
Old 8th November 2020, 02:35   #100  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,771
Quote:
Originally Posted by VoodooFX View Post
Is there some script/plugin which would compare frames from two separate video files (expected to be identical) and return frame numbers of not identical frames? Or any ideas how to do such comparison?
WriteFileIf with a runtime function expression like lumadifference . But there was some bugs in avs+ 3.x with this. It works in 2.6 classic. There was some discussion about this somewhere IIRC. Not sure what changed or what the exact syntax change was

Something like this works in avs+ 2.6 classic
Code:
.
.
.

Subtract(clip1,clip2)
WriteFileIf (last,  "log.log",  "LumaDifference(clip1, clip2)>0", "current_frame", """ ":" """, "AverageLuma")
Other approaches would be psnr . You can print out per frame PSNR in ffmpeg (should be infinity for identical frames), but that prints out every frame value. Maybe some spreadsheet or grep function to reduce to only different frames

Last edited by poisondeathray; 8th November 2020 at 02:38.
poisondeathray is offline   Reply With Quote
Reply

Tags
delogo, hardsubs, ocr, remove, watermark

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.