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 10th October 2021, 14:26   #521  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,956
Quote:
So how do you test your scripts ?
You could try VirtualDub2, AvsPMod, PotPlayer, MPC-HC, MPC-BE, or other players [not VLC].
Timing, AvsMeter.
__________________
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 10th October 2021, 15:30   #522  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
Ah yes sorry, I use avspmod, but for encoding I simply use a custom bat file.
Quote:
Originally Posted by Boulder View Post
That LFR might be useful as a generic function - do you have plans to put it in ExTools? There are often cases where a high thsad is a must but it smooths the flat, low-frequency surfaces a bit too much.
I don't see it to fit much... if any maybe ex_repair() but it's just a lowpass comparison, for MDegrain I used an alternative (cheaper) because vectors are involved. More interesting would be to have a fast filter where you can convert to frequency domain, filter with any script and convert back. I will post the function here tomorrow (football day today : D)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th October 2021, 15:49   #523  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,127
Quote:
Originally Posted by Dogway View Post
Ah yes sorry, I use avspmod, but for encoding I simply use a custom bat file.

I don't see it to fit much... if any maybe ex_repair() but it's just a lowpass comparison, for MDegrain I used an alternative (cheaper) because vectors are involved. More interesting would be to have a fast filter where you can convert to frequency domain, filter with any script and convert back. I will post the function here tomorrow (football day today : D)
Oh, i know Spain has final match in Nation League today

Last edited by kedautinh12; 10th October 2021 at 16:00.
kedautinh12 is offline   Reply With Quote
Old 10th October 2021, 20:46   #524  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Testing the latest SMDegrain (6.0)
Code:
SMDegrain(tr=3,thSAD=300,contrasharp=30,refinemotion=true)
gives me this error:
Code:
Script error: Convert: Unknown chromaplacement. Line 211.
Yet no problem in 5.8 version.
anton_foy is offline   Reply With Quote
Old 10th October 2021, 20:55   #525  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by anton_foy View Post
Testing the latest SMDegrain (6.0)
Code:
SMDegrain(tr=3,thSAD=300,contrasharp=30,refinemotion=true)
gives me this error:
Code:
Script error: Convert: Unknown chromaplacement. Line 211.
Yet no problem in 5.8 version.
Not sure about those version numbers...3.3.4 is the latest.

Try contrasharp=true. (or false)
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)
TDS is offline   Reply With Quote
Old 10th October 2021, 22:42   #526  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by TDS View Post
Not sure about those version numbers...3.3.4 is the latest.

Try contrasharp=true. (or false)
Sorry I meant the latest version v3.3.4d but nope still the same error without contrasharp.
anton_foy is offline   Reply With Quote
Old 10th October 2021, 23:34   #527  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
@anton_foy: Maybe you need to update avisynth. top_left alignment was added recently.

@TDS: I think what the problem is. RipBot264 doesn't understand 'contrasharp' val type.You should use a maintained program like avspmod, etc, so at least you know that the problem might be elsewhere.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 11th October 2021, 00:08   #528  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by Dogway View Post
@TDS: I think what the problem is. RipBot264 doesn't understand 'contrasharp' val type.You should use a maintained program like avspmod, etc, so at least you know that the problem might be elsewhere.
You might be right, RipBot264 is pretty "closed up" as far as it's internal coding is concerned, but I have learned recently how to add more filters & scripts.

I posted that script you sent me on the RipBot forum, and the dev (Atak) actually replied with a modified script:-

Code:
pre=ex_KNLMeansCL(video,a=2,s=2,d=1,h=7.0,wmode=0)
video=SMDegrain(video,tr=3,thSAD=300,contrasharp=30,prefilter=pre,refinemotion=true)
Quote:
Contrasharp bool (True/False, default False)
Contrasharp int (0-100, default -)
Contrasharpening is a technique that compares the differences between the clip before blurring (original) and after blurring (filtered), and sharpens locally with consequent strength. By default the "sharp" clip is the input, the "after" clip is the denoised clip. Alternately, a "before" clip can be specified with CClip (See Advanced).
True: use Didée's Contrasharpening() function (ContraHD() for HD) which "Sharpens the denoised clip, but doesn't add more to any pixel than what was removed previously." In the practice you will get a slightly sharper result than the source, which is welcome.
An integer: LSFmod() will be used instead. It will be much slower, but maybe better for certain sources. Its value will serve as a contrasharpening multiplier, use one around 50 for similar strength as Contrasharpening(). LSFmod is less-suitable for HD sources.
So this could be done to ALL the pre filters, especially BM3D ??
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)

Last edited by TDS; 15th October 2021 at 04:05.
TDS is offline   Reply With Quote
Old 11th October 2021, 08:25   #529  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,836
Quote:
Originally Posted by kedautinh12 View Post
Oh, i know Spain has final match in Nation League today
And... they've lost to France with a probably offside goal xD
(But yeah, I was watching the game too, so I guess Doom9 stopped for a bit while everyone was watching it xD)
FranceBB is offline   Reply With Quote
Old 11th October 2021, 11:14   #530  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
@TDS: Yes, you can use contrasharp to any filtering that does some blur. probably the issue you are facing is because RipBot parses all the arguments and only accepts one type per argument, in this case bool. This is something you have to discuss with them, try first with another filter that uses "val" type.

Yep, lost to Mbappe offside goal, it reminds me of Henry's hand, or PSG's financial "fair play", anyway Spanish squad is very young many playing for first time. My favourite was Italy, best national team by far in my opinion.

By the way I might upload updated ExTools later today, with a fair amount of improvements.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 11th October 2021, 12:03   #531  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by Dogway View Post
@TDS: Yes, you can use contrasharp to any filtering that does some blur. probably the issue you are facing is because RipBot parses all the arguments and only accepts one type per argument, in this case bool. This is something you have to discuss with them, try first with another filter that uses "val" type.
I don't think I need to do anymore about Contrasharp, I'm happy with "true" or "false". I was actually shocked that I got a reply on the RipBot forum.

So can BM3D be setup like you did with KNLMeansCL ??

Code:
pre=ex_BM3D(video,???????)
video=SMDegrain(video,tr=3,thSAD=300,contrasharp=30,prefilter=pre,refinemotion=true)
I tried a couple of different things, but couldn't get it to work.
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)
TDS is offline   Reply With Quote
Old 11th October 2021, 18:57   #532  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,703
Tried QTGMC with inputtype=2, got error "I don't know what 'fs' means.", pointing to extools.avsi at line 1191 and qtgmc.avsi at line 594.

EDIT: Fixed by adding ', bool "fs"' to ex_GaussianBlur's parameter list, but got the next error: "MergeLuma: Images must have same width and height!" pointing to lines 1189 (extools) and 882 (QTGMC).
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 11th October 2021 at 19:03.
Boulder is offline   Reply With Quote
Old 12th October 2021, 10:24   #533  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
Just updated ExTools to v6.1 ans SimilarityMetrics to v1.2.

@Boulder: Try the new version as the issue was addressed a week ago but hadn't released the update. I will also have a look for the MergeLuma thing. EDIT: fixed now.
@TDS: should be working, at least works here with defaults "ex_BM3D()"
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 12th October 2021 at 10:43.
Dogway is offline   Reply With Quote
Old 12th October 2021, 11:21   #534  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by Dogway View Post
Just updated ExTools to v6.1
@TDS: should be working, at least works here with defaults "ex_BM3D()"
I tried:-
Code:
ex_BM3D(sigma=5,radius=1)
from Line 195.

Didn't work
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)
TDS is offline   Reply With Quote
Old 12th October 2021, 11:28   #535  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
It works for me. It requires Utils-r41 if you are processing chroma. I might remove the dependency soon. Also be sure to have the latest BM3D version.

By the way, here is the feature rich ex_makediff() when using 'aug=true', requires SimilarityMetrics which I also updated today:

__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 12th October 2021 at 11:38.
Dogway is offline   Reply With Quote
Old 12th October 2021, 11:44   #536  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,497
Quote:
Originally Posted by Dogway View Post
New setting which I wanted to add since 7 years ago, 'LFR', it will restore low frequency details, specially useful for TemporalSoften, check the images below.
Is it automatic according to tr or thsad or is there a rule of thumb to enable it?
Quote:
Originally Posted by Dogway View Post
By the way, here is the feature rich ex_makediff() when using 'aug=true', requires SimilarityMetrics which I also updated today
Could you post a sample script? It would be nice to make it accept more than one input clip to see differences with different colors. I often do compressibility checks changing tr and thsad and it would be nice how many details they steal.
__________________
@turment on Telegram

Last edited by tormento; 12th October 2021 at 11:53.
tormento is offline   Reply With Quote
Old 12th October 2021, 12:18   #537  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,351
No, LFR is not automatic since it makes the filter slower (haven't benchamrked though). I would use it always with TemporalSoften, and also with MDegrain if you are using thSAD>500 or tr>4 but these are loose estimations. I would run tests to see the before and after (I use ex_makediff to see better) and check if it recovers enough to be worth it.

ex_makediff() already accepts two clips. Simply call like "ex_makediff(a,b,aug=true,UV=128)".
The clip output corresponds to MAE only, it's not an indication of the numbers, only to know where to look for differences. Although I haven't tested with chroma, only with luma plane, might need to rework a few things.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 12th October 2021, 12:23   #538  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by Dogway View Post
It works for me. It requires Utils-r41 if you are processing chroma. I might remove the dependency soon. Also be sure to have the latest BM3D version.
OK, well, I'll have to check if I have Utils-r41 in the list, and I have trouble finding the latest builds of BM3D are...hint, hint.

Cheers
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)
TDS is offline   Reply With Quote
Old 12th October 2021, 13:11   #539  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,497
Quote:
Originally Posted by Dogway View Post
ex_makediff() already accepts two clips.
I was asking for more than two

I usually launch smdegrain with tr=3,4,5 and thsad=300,400,500 accordingly. Sometimes 6, 600 too. I'd like to look at the differences at the same time.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 13th October 2021, 06:51   #540  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: On a need to know basis.
Posts: 892
Quote:
Originally Posted by Dogway View Post
It works for me. It requires Utils-r41 if you are processing chroma. I might remove the dependency soon. Also be sure to have the latest BM3D version.
I double checked, I DID have Utils-r41, but I obviously forgot something simple, as it is now working

However, when I went to try the CPU "version", it showed an error on line 838, of SMDegrain334d,
Code:
 BM3D_CPU (sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)
which lead me to line 829,
Code:
cd = Default(CUDA,  false)
and I changed the (CUDA,true, to false


So originally you said to change Line 195
Code:
(prefilter== 5) ?  inputP.ex_BM3D(sigma=5,radius=1,CUDA=false,UV=Chr,fulls=fs)
I hope you can follow that...
__________________
Long term RipBot264 user.

RB 1.27.1 (std)
RB 1.27.1 (fully loaded, OOD)
PD 7.5 (new)

Last edited by TDS; 15th October 2021 at 04:03.
TDS is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

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 00:20.


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