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 18th September 2020, 17:46   #41  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
I know, I wasn't complaining, I was just pointing out that I had the very same issues you had on some scenes, that's all.
Anyway, I'll provide the script if it helps others.
FranceBB is offline   Reply With Quote
Old 18th September 2020, 18:15   #42  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by FranceBB View Post
I know, I wasn't complaining, I was just pointing out that I had the very same issues you had on some scenes, that's all.
Anyway, I'll provide the script if it helps others.
Got it. Thanks!
johnmeyer is offline   Reply With Quote
Old 18th September 2020, 18:26   #43  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Just noticed, mistake in docs [fixed]
Code:
    Tm,      TrueMotion Default True. Some folk swear truemotion=false is better.    # Was False
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 20th September 2020, 05:16   #44  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
I was able to eliminate a lot of the rainbows in the clip provided in a thread over at Videohelp. This post shows the SpotlessS script I used, along with one "before/after" snapshot:

https://forum.videohelp.com/threads/...=1#post2595644
johnmeyer is offline   Reply With Quote
Old 20th September 2020, 05:51   #45  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by johnmeyer View Post
I was able to eliminate a lot of the rainbows in the clip provided in a thread over at Videohelp. This post shows the SpotlessS script I used, along with one "before/after" snapshot:

https://forum.videohelp.com/threads/...=1#post2595644
Can you try ASTDR derainbow??
https://github.com/realfinder/AVS-St...0up/ASTDR.avsi
kedautinh12 is online now   Reply With Quote
Old 20th September 2020, 16:37   #46  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by kedautinh12 View Post
I'll try to remember to do that when I get back to my office computer tomorrow. I really only wanted to kill the rainbows, but not do any denoising, and SpotlessS uses a function which desnoises as well as averages. I'll let you know if it works.
johnmeyer is offline   Reply With Quote
Old 20th September 2020, 16:38   #47  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
John, you posted on VideoHelp, non current script,

Code:
   RadT     = Default(RadT,2)                              # Temporal radius. (MCompensate arg)
    ThSAD    = Default(ThSAD,10000)   # SAD threshold at radius 1 (Default Nearly OFF).
    ThSAD2   = Default(ThSAD2,10000)                        # Setting lower, sets SAD thresold to limit blurring effect of more distant reference frame BAD matching blocks. (MCompensate arg)
should be (and for good reason)
Code:
   RadT     = Default(RadT,1)                              # Temporal radius. (MCompensate arg)
    ThSAD    = Default(ThSAD,10000)   # SAD threshold at radius 1 (Default Nearly OFF).
    ThSAD2   = Default(ThSAD2,ThSAD)                        # Setting lower, sets SAD thresold to limit blurring effect of more distant reference frame BAD matching blocks. (MCompensate arg)
Changing ThSAD also changes default ThSAD2.

We dont really want gazllions of versions of the function floating about, there are already more than enough official ones.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 20th September 2020, 19:24   #48  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by StainlessS View Post
John, you posted on VideoHelp, non current script, <snip>

We dont really want gazllions of versions of the function floating about, there are already more than enough official ones.
Sorry about that. I don't think it will make any difference, since I fed my own numbers into the script so the new presets in your current version will be overridden.
johnmeyer is offline   Reply With Quote
Old 8th January 2021, 18:37   #49  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Update SpotLess(), v1.06, see 1st post.

Code:
    v1.01, Remove RadT Max check. Add MSuper(hpad=16,vpad=16). Add BlkSz arg.
    v1.02, Add some stuff.
    v1.03, Frame size auto config of args removed (found instances where caused problems). Added Glob and bBlur args.
    v1.04, Script breaking changes, I guess is more flexible if can also set ThSAD, inserted ThSAD 3rd arg. RadT now default 1, was 2, dont over denoise unless requested.
    v1.05, Additional checks on args.
    v1.06, Glob Default true, Almost always better.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 8th January 2021, 19:36   #50  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Dont know if this is of any use at all (I usually like to get rid of interlacing).

Code:
Function SpotLessI(clip c,String "Bobber",int "RadT",int "ThSAD",int "ThSAD2",int "pel",bool "chroma", int "BlkSz",Int "Olap",bool "tm",Bool "glob",Float "bBlur") {
/*
    SpotLess use on Interlaced material.
    Input requires correct parity, use AssumeTFF/AssumeBFF before use.
    RadT etc applied to Bobbed fields rather than frames, Might want to use at least RadT=2 (default is 1).
*/
    c
    Bobber = Default(Bobber,"Bob")      # Your Favourite Bob deinterlacer whotsit
    Last.Eval(Bobber)
    SpotLess(RadT,ThSAD,ThSAD2,pel,chroma,BlkSz,Olap,tm,glob,bBlur)
    SeparateFields.SelectEvery(4,0,3).Weave
    Return Last
}
Have I done it correctly, any comments and testing welcome.
If is of value, I'll add to main script, otherwise if no response I'll give it a miss.

EDIT: Or any suggestions on single/doublerate use (maybe skip last step SeparateFields.weave).
EDIT: Or could use above as a template.
EDIT: Possibly of best use where original clip was progressive with noise before artificial conversion to Interlaced.

EDIT: Alternative.
Code:
Function SpotLess2i2(clip c,int "RadT",int "ThSAD",int "ThSAD2",int "pel",bool "chroma", int "BlkSz",Int "Olap",bool "tm",Bool "glob",Float "bBlur") {
/*
    SpotLess use on Interlaced material, fields filtered separately.
    Input requires correct parity, use AssumeTFF/AssumeBFF before use.
*/
    c
    e=Separatefields.SelectEven.AssumeFrameBased.SpotLess(RadT,ThSAD,ThSAD2,pel,chroma,BlkSz,Olap,tm,glob,bBlur)
    o=Separatefields.SelectOdd.AssumeFrameBased.SpotLess(RadT,ThSAD,ThSAD2,pel,chroma,BlkSz,Olap,tm,glob,bBlur)
    Return interleave(e.AssumeFieldBased,o.AssumeFieldBased).Weave
}
__________________
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; 8th January 2021 at 20:03.
StainlessS is offline   Reply With Quote
Old 10th January 2021, 14:02   #51  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
That is actually correct.
You're bobbing, filtering, dividing in fields, so that's alright.
By the way, I would encourage users to do it themselves rather than relying on it 'cause it's definitely gonna work for truly interlaced sources which will be bobbed to 59.940p or 50p, however, on telecined sources it will make the temporal prediction of MVTools useless, besides, even with truly interlaced sources, with Bob, fields would jump "up-down-up-down" making it harder to analyze and filter, so it's always better to let users handle it (hoping they'll use something decent as a deinterlacer and that they're aware of their source).
As to the alternative, again, you're right, as you're filtering each field separately and then putting them back together.
The second approach is probably the safest and I prefer it more than bobbing and re-interlacing.


Well done, Stainly, you're really following the government advice:


Last edited by FranceBB; 10th January 2021 at 14:05.
FranceBB is offline   Reply With Quote
Old 11th January 2021, 03:43   #52  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Cheers FaB, tanks for feedback.
I'll not bother adding to base script then.

EDIT: By the way, Bobber default of "Bob" is only because its a builtin filter, I would not recommend it.
__________________
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; 12th January 2021 at 15:49.
StainlessS is offline   Reply With Quote
Old 12th January 2021, 13:00   #53  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
FranceBB, now that poster is brilliant !
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 25th January 2021, 22:13   #54  |  Link
piscator
Registered User
 
Join Date: Dec 2002
Location: N/A
Posts: 185
Quote:
NOT FOR cartoon/anime, live video only, sorry.
What limitations are there that it should not work so great for cartoons? I have some DVDs with old children cartoons from 1956+ (Mole TV series, children cartoon) which I am trying to clean up. I have been looking for a bit to clean the spots and scratches (black and white, some quite large) from it and SpotLess works great on it Thanks, StainLessS!
piscator is offline   Reply With Quote
Old 25th January 2021, 22:36   #55  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanks for the feedback piscator,
MvTools motion compensation type stuff dont usually work to well on anime.
Did you use any non default args ? [maybe large block size, which I thought might help].
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 25th January 2021, 23:56   #56  |  Link
piscator
Registered User
 
Join Date: Dec 2002
Location: N/A
Posts: 185
I just used default arguments.
Perhaps it works so well because this cartoon is quite 'static'. The background is usually completely fixed with sometimes a bit of panning /zooming on it. So, it is all really quite slow / limited motion.
piscator is offline   Reply With Quote
Old 26th January 2021, 00:04   #57  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
static background might help,
anyways glad you are happy.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 26th January 2021, 10:26   #58  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
That's because cartoons / anime are generally not with the real framerate.
I mean, if you go through an anime encoded at 23.976fps, you'll almost definitely find repeated frames, but it's not a mistake, they're there by purpose as whoever animated it (I mean the studio) wasn't really able to deliver so many frames per seconds in terms of each individual character moving a part of the body etc. These repeated frames don't generally work well with MVTools, hence the assumption that it might not work for anime.
In your case it worked absolutely fine, so don't get me wrong, you might be lucky and have it working perfectly fine, but generally speaking, MVTools doesn't like non-live contents.

Quote:
Originally Posted by Emulgator View Post
FranceBB, now that poster is brilliant !
Ehehehe thanks
FranceBB is offline   Reply With Quote
Old 26th January 2021, 23:27   #59  |  Link
piscator
Registered User
 
Join Date: Dec 2002
Location: N/A
Posts: 185
Quote:
I mean, if you go through an anime encoded at 23.976fps, you'll almost definitely find repeated frames
Thanks, I can understand why that would make it more difficult. My source was just 25fps interlaced. And the motion is so slow, that when dropping half of the frames, you barely see a difference

I encoded this source for fun on crf 30 (x265, Ultralow) and it looks the same as on higher bitrates. But degraining, descratching and removing the spots make it much better.
piscator is offline   Reply With Quote
Old 26th January 2021, 23:51   #60  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 234
An idea:
Maybe possible to
-drop the dups, log it, maybe in StainlessS' database thing
-removedirt/spotless
-take the logged dups in another clip
-removedirt these
-bring everything together again
Could be a cleaning-chance for old anime
Frank62 is offline   Reply With Quote
Reply

Tags
denoise, despot, prefilter

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 16:50.


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