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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd April 2023, 20:51   #2421  |  Link
Lan4
Registered User
 
Join Date: Dec 2022
Posts: 64
LSFplus is currently not available in SharpenersPack. It should be?

Last edited by Lan4; 23rd April 2023 at 20:54.
Lan4 is offline   Reply With Quote
Old 23rd April 2023, 22:41   #2422  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Lan4 View Post
LSFplus is currently not available in SharpenersPack. It should be?
LSFPlus is separate. As noted in overview of sharpeners package.
LeXXuz is offline   Reply With Quote
Old 24th April 2023, 13:14   #2423  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
I'm lacking a few presets, specially on the 50 and 200 range which would be more subtle but you can check Vision3 5219, if it's too slow (because of grain small size) try 5218 or play with 'size' and also 'str' if you want it more subtle.

To avoid banding you need to run FGP in HBD as well.

By the way, just refactored FastLineDarkenMOD(), now it's 7% faster in 8-bit and +29% in HBD.
Can I select a preset with custom parameters, f.e.
Code:
FilmGrainPlus(preset="Vision3 5219 500T", sharpness=0.5)
or would that be ignored?
LeXXuz is offline   Reply With Quote
Old 24th April 2023, 15:48   #2424  |  Link
madey83
Guest
 
Posts: n/a
Hi,

Could you please explain when and which one mfilters i should use in SMDegrain.
Are there any examples to show use cases of each?

What is the value of using them in SMDegrain?
  Reply With Quote
Old 24th April 2023, 19:59   #2425  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Quote:
Originally Posted by LeXXuz View Post
Can I select a preset with custom parameters, f.e.
Code:
FilmGrainPlus(preset="Vision3 5219 500T", sharpness=0.5)
Sure, you can override them, is it not working or something?

Quote:
Originally Posted by madey83 View Post
Could you please explain when and which one mfilters i should use in SMDegrain.
Are there any examples to show use cases of each?

What is the value of using them in SMDegrain?
'mfilter' argument you mean? That's called motion filter because the filter you pass there is applied typically on motion areas where motion block matching failed. The typical usage is to use spatial filters so you get two perks, a smoother less artifacty output and compressibility.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 24th April 2023, 21:49   #2426  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by Dogway View Post
Sure, you can override them, is it not working or something?
No, all good. Just wanted to make sure as I had a hard time to spot the subtle difference over a remote session. But the filesize was noticeable smaller in the end between the default preset setting and custom setting with only 50% of sharpness.
LeXXuz is offline   Reply With Quote
Old 25th April 2023, 05:27   #2427  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 195
Topaz Video Enhance AI alternatives

@ Dogway, (or anyone)

I hope this isn't off topic too much, and I apologize if a similar question has been asked.

But are there filters / scripts in your "arsenal" that could do an equivalent "job" as Topaz ??

I have tried Topaz on several old crappy video's, and I'm not convinced

If you Google this topic, there are mentions that AVS can do as good a job, with appropriate scripts & plugins, etc.

So I thought I'd ask...
FTLOY is offline   Reply With Quote
Old 25th April 2023, 07:51   #2428  |  Link
madey83
Guest
 
Posts: n/a
Quote:
Originally Posted by Dogway View Post
'mfilter' argument you mean? That's called motion filter because the filter you pass there is applied typically on motion areas where motion block matching failed. The typical usage is to use spatial filters so you get two perks, a smoother less artifacty output and compressibility.
this is what i got from first page:

ex_FluxSmoothST()- Spatio-Temporal minimum change between weighted blur and median. Uses ex_FluxSmoothT() and its spatial equivalent ex_MinBlur()

is it mean that these two are the only spatial filters?

Have you got few examples how to use them and which is better? Or maybe there are betters - could you please provide names?
  Reply With Quote
Old 25th April 2023, 08:56   #2429  |  Link
SkilledAbbot
Registered User
 
SkilledAbbot's Avatar
 
Join Date: Sep 2002
Location: Nagano, Japan
Posts: 25
Hello Forum,

It's been a while since I've used avisynth, and now I am currently reinstalling everything. I'm not very technical but I really enjoyed LSF decades ago and now I am trying to re-implement it to no avail.
Have no idea where I am wrong. Is there are tutorial for newbies like me with step by step setup for these filters? My script and error are pasted below. Thank you.

Quote:
Import("E:\GameCap\Scripts\functions\ExTools.avs")
Import("E:\GameCap\Scripts\functions\SMDegrain.avs")
Import("E:\GameCap\Scripts\functions\ResizersPack.avs")
Import("E:\GameCap\Scripts\functions\SharpenersPack.avs")
Import("E:\GameCap\Scripts\functions\GradePack.avs")
Import("E:\GameCap\Scripts\functions\FilmGrain+.avs")
Import("E:\GameCap\Scripts\functions\MasksPack.avs")
Import("E:\GameCap\Scripts\functions\NNEDI3CL_rpow2.avs")
Import("E:\GameCap\Scripts\functions\ScenesPack.avs")
Import("E:\GameCap\Scripts\functions\TransformsPack-Main.avs")
Import("E:\GameCap\Scripts\functions\TransformsPack-Models.avs")
Import("E:\GameCap\Scripts\functions\TransformsPack-Transfers.avs")
Import("E:\GameCap\Scripts\functions\LSFplus.avs")



DirectShowSource("E:\GameCap\Videos\test.mp4", audio=false)

LSFplus()

https://imgur.com/a/D6yyOOj
__________________
---

My Photo Blog
SkilledAbbot is offline   Reply With Quote
Old 25th April 2023, 09:03   #2430  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
@madey83: I made tons of spatial filters, for example at least half of ex_median() modes are spatial. Also the SMDegrain prefilters are mostly spatial, so you got ex_minblur() which is pretty nice, ex_KNLMeansCL(), ex_DGDenoise(), ex_BM3D(), DFTTest() but also other ones in ExTools like ex_bilateral(), ex_smartblur() or STTWM(). Then in yugefunc you got ex_guidedblur() and ex_ANguidedblur(). It depends how much you want to denoise and how much you want to protect. For instance is it's blocking and not noise what covers motion areas you'd also could run Deblock_QED(). Depending on what you need I can recommend ex_minblur(), ex_median("IQMV"), ex_median("smart"), ex_KNLMeansCL()/ex_DGDenoise() and ex_BM3D().

@FTLOY: You mean like AI upscaling? I think the best is to actually use upscaling models like the ones here. I asked him to add a few ones optimized for live action so probably he will add those when he finds some time. Other than that I made deep_resize() as a performant approach for upscaling, it's not bad at all and it's fast. Aside form the default NNEDI3 you can also try other kernels for 'edge' argument like FCBI, SuperResXBR, Waifu2x, RAVU, FSR1 or FSRCNN. I look forward to do some AI based restorations when I install Win10, but probably not in AviSynth.

@SkilledAbbot: Install latest version here. Search for AviSynth+ 3.7.3 test 9, but before that use an installer version even if it's a bit older, and then manually replace files with 'test 9' ones. Also give a look at Asd-g repo and install some of his plugins, they are very useful and at times needed, also pinterf repo for the most up-to-date common plugins. And use FFMS2 loader or GPU based DGDecNV for frame properties support, might fail otherwise.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 25th April 2023 at 22:29.
Dogway is offline   Reply With Quote
Old 25th April 2023, 09:22   #2431  |  Link
SkilledAbbot
Registered User
 
SkilledAbbot's Avatar
 
Join Date: Sep 2002
Location: Nagano, Japan
Posts: 25
LSFplus

Quote:
Originally Posted by Dogway View Post

@SkilledAbbot:
Install latest version here. Search for Avisynth+ 3.7.3 test 9. Also give a look at Asd-g repo and install some of his plugins, they are very useful and at times needed, also pinterf repo for the most up-to-date common plugins. And use FFMS2 loader or GPU based DGDecNV for frame properties support, might fail otherwise.
Thank you for quick reply. I want to double check, "3.7.3 test9" does not have '+' next to the name. Is that the one?
__________________
---

My Photo Blog
SkilledAbbot is offline   Reply With Quote
Old 25th April 2023, 09:27   #2432  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
He might have forgotten, the current branch since a few years now is all + based. Also if you use AvsPmod the current updated branch is gispos', you can find here.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 25th April 2023, 10:01   #2433  |  Link
madey83
Guest
 
Posts: n/a
[QUOTE=Dogway;1986223]@madey83: I made tons of spatial filters, for example at least half of ex_median() modes are spatial. Also the SMDegrain prefilters are mostly spatial, so you got ex_minblur() which is pretty nice, ex_KNLMeansCL(), ex_DGDenoise(), ex_BM3D(), DFTTest() but also other ones in ExTools like ex_bilateral(), ex_smartblur() or STTWM(). Then in yugefunc you got ex_guidedblur() and ex_ANguidedblur(). It depends how much you want to denoise and how much you want to protect. For instance is it's blocking and not noise what covers motion areas you'd also could run Deblock_QED(). Depending on what you need I can recommend ex_minblur(), ex_median("IQMV"), ex_median("smart"), ex_KNLMeansCL()/ex_DGDenoise() and ex_BM3D().


thank you so much.
  Reply With Quote
Old 27th April 2023, 13:50   #2434  |  Link
SkilledAbbot
Registered User
 
SkilledAbbot's Avatar
 
Join Date: Sep 2002
Location: Nagano, Japan
Posts: 25
@Dogway: Works like a charm and looks beautiful. Thank you!




Quote:
Originally Posted by Dogway View Post
@SkilledAbbot: Install latest version here. Search for AviSynth+ 3.7.3 test 9, but before that use an installer version even if it's a bit older, and then manually replace files with 'test 9' ones. Also give a look at Asd-g repo and install some of his plugins, they are very useful and at times needed, also pinterf repo for the most up-to-date common plugins. And use FFMS2 loader or GPU based DGDecNV for frame properties support, might fail otherwise.
__________________
---

My Photo Blog
SkilledAbbot is offline   Reply With Quote
Old 30th April 2023, 15:52   #2435  |  Link
Lan4
Registered User
 
Join Date: Dec 2022
Posts: 64
Questions about SharpenersPack. I'm interested in non-linear sharpness. In other words, strong for small differences, and not strong for large differences.

1) ex_unsharp has no non-linear sharpening options. But if I increment str and safe=true, will those be non-linear sharpening actions?

2) The threshold in ex_unsharp seems to work in the opposite way. What if we use minus values of threshold?

3) A more complex problem that I've caught a few times. Just to clarify, I'm using the Staxrip app for Avisynth. I use FineSharpPlus and DetailSharpen filters. The same parameter of non-linear sharpness gives exactly the opposite result. First they sharpen, and then something happens and they start blurring the image. Could this theoretically happen?
Lan4 is offline   Reply With Quote
Old 1st May 2023, 01:55   #2436  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
I don't know how it is in StaxRip but DetailSharpen doesn't have non-linear modifier, only 'pow' which is analogous to FineSharpPlus' 'pstr'. Both act in the same way as I could check and in the range recommended in the function definitions.

FineSharpPlus in this case is a superior non-linear sharpener as I ported its portion from LSFplus, but it doesn't have all the bell and whistles of the later, so probably you might want to use LSFplus instead.

What you look after (strong on small diffs) is actually the opposite of the implemented non-linear modes. You are looking then into LSFplus' edgemode=2, this will sharpen non-edges only but applied through an edge mask though.

If you want a manual and non-linear sharpening you can also use ex_guidedblur(), which is a non-linear blurring filter.
Code:
src = last
rad = 1
bl  = ex_guidedblur(rad)

ex_lutxy(bl,"x y - x +")

ex_clamp(src,bl,last) # limiter (might clamp small diffs though)
ex_unsharp() with safe=true is only for ringing, it will still sharpen edges. I found that threshold works bad with safe=true, but in any case they kinda null each other so can you can safely turn safe=false and turn up threshold, no more than 40 or so. Threshold works as a passthough to the unsharpened version, I noticed that after a certain value it starts to blur instead so I might fix that.

Finally you can also use ex_limitdif() as used in deep_resize():

Code:
ex_limitdif(flat, edge, thr=thr, elast=ela, UV=1)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 1st May 2023 at 02:10.
Dogway is offline   Reply With Quote
Old 1st May 2023, 04:50   #2437  |  Link
Lan4
Registered User
 
Join Date: Dec 2022
Posts: 64
LSFplus is too heavy for my needs. FineSharpPlus, DetailSharpen or ex_unsharp are lighter and faster.

Quote:
DetailSharpen doesn't have non-linear modifier
I thought so because the script itself says:
sstr (float) - strength of non-linear sharpening.
power (float) - exponent of non-linear sharpening.


Quote:
Threshold works as a passthough to the unsharpened version, I noticed that after a certain value it starts to blur instead
I see that the threshold of ex_unsharp always blurs. so I asked about the possibility of minus threshold values.

Quote:
Both act in the same way as I could check and in the range recommended in the function definitions.
purely theoretically, there may be a possibility of such a bug that the parameter values ​​give the opposite effect? to further understand if my computer is not working properly with the filters, or if the Staxrip application is not working properly.
Lan4 is offline   Reply With Quote
Old 1st May 2023, 12:16   #2438  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
LSFplus in 'LSF' mode and without supersampling is rather fast I'd say.

What I meant with DetailSharpen is that you can't change the non-linearity, you can change its power but not its shape.

I will have a look at ex_unsharp threshold issue* in the meantime try some of the above suggestions. You can also pass ex_unsharp through an edge mask. I guess your goal is for texture sharpness which that will suffix.

*I didn't find any change on negative values
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 1st May 2023, 20:24   #2439  |  Link
Lan4
Registered User
 
Join Date: Dec 2022
Posts: 64
I didn't find negative ex_unsharp threshold values. I meant is it possible to make negative values. And would this be a texture sharpening solution (more so than edge sharpening)?
Lan4 is offline   Reply With Quote
Old 1st May 2023, 20:39   #2440  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
ex_unsharp() is a plain unsharp mask so I don't want to add non-linear sharpening aside from the bundled anti-ringing 'safe' option.
It is easy to mask out edges as I explained above:

With an edge mask:
Code:
msk=ex_edge("frei-chen")
ex_unsharp(2.0, Fc=1920, safe=true)
ex_merge(src,msk)
Using ex_limitdif():
Code:
ex_unsharp(2.0, Fc=1920, safe=false)
ex_limitdif(src,thr=1.5,elast=4.0)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs


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 21:33.


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