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 6th June 2023, 09:21   #2621  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
Quote:
Originally Posted by FTLOY View Post
Well, that's not good

Have you asked on the StaxRip thread ?? (I haven't seen your name there).

Emulgator left an interesting post...

As the suggestions given here, haven't worked either
Hi... Finally I have the SMDegrain Working. I have tried so many times on staxrip 2.19 with all my settings and nothing. After that I copied a clean copy of Staxrip 2.19 in a new directory and I updated EXtools and Avisynth. In the new clean copy of Staxrip the SMDegrain work. Probably there are some personal settings in my Staxrip that create a problem with SMDegrain. Anyway now it work. Now I want to know please if someone know a method to use KTGMC with Staxrip, because I have an RTX3070 but QTGMC is so slow. I have seen that exist KTGMC but how to make it work on Staxrip?
salvo00786 is offline   Reply With Quote
Old 6th June 2023, 10:40   #2622  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
KTGMC need avisynthCuda to work but it's old and dom't update very long
kedautinh12 is offline   Reply With Quote
Old 6th June 2023, 13:01   #2623  |  Link
FTLOY
Friend of a friend..
 
FTLOY's Avatar
 
Join Date: Feb 2023
Posts: 172
Quote:
Originally Posted by salvo00786 View Post
Hi... Finally I have the SMDegrain Working. I have tried so many times on staxrip 2.19 with all my settings and nothing. After that I copied a clean copy of Staxrip 2.19 in a new directory and I updated EXtools and Avisynth. In the new clean copy of Staxrip the SMDegrain work. Probably there are some personal settings in my Staxrip that create a problem with SMDegrain. Anyway now it work. Now I want to know please if someone know a method to use KTGMC with Staxrip, because I have an RTX3070 but QTGMC is so slow. I have seen that exist KTGMC but how to make it work on Staxrip?
Well done.

There must be somehow that you can get QTGMC to run faster..

Never heard of KTGMC, but here's some info:-

https://github.com/nekopanda/AviSynt...ers/wiki/KTGMC

https://github.com/nekopanda/AviSynt...lters/releases

https://forum.videohelp.com/threads/...MC-information

I think you should start asking questions on the StaxRip thread

Last edited by FTLOY; 6th June 2023 at 13:31.
FTLOY is offline   Reply With Quote
Old 6th June 2023, 16:27   #2624  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,041
Quote:
Originally Posted by salvo00786 View Post
I have an RTX3070 but QTGMC is so slow. I have seen that exist KTGMC but how to make it work on Staxrip?
Some time ago I tried to make QTGMC work with DX12-ME builds of post-2.7.45 mvtools - https://github.com/DTL2020/QTGMC . But if you need main (?) part of QTGMC using MCompensate - it still do not have interpolated ovelap (from MDegrainN). So may be not good in quality while running with no-overlap MAnalyse with hardware accelerator (also Win10 or better required).

I think your QTGMC is slow because you use large pel and large overlap settings ? Also may be frame size if 1080 interlaced ? I typically do not read complains for too slow QTGMC because it is simple enough and run good at 202x years CPUs. So the project of making QTGMC working with DX12-ME-capable mvtools builds (and interpolated overlap to MCompensate) was almost stopped because close to no one uses QTGMC (for HD and slow settings). And for old SD it may run already good even with high settings.
DTL is offline   Reply With Quote
Old 7th June 2023, 02:58   #2625  |  Link
fabioseixal
Registered User
 
Join Date: May 2008
Posts: 21
Hello,

I'm probably doing something wrong, but I don't understand why I get "green frames" when using Spresso "Dogway mod in 2022.03.05 Cosmetics".
If I upscale to HD, the issue is solved. So for now I returned back to the old and trusty Didée original function which works well.

Here are some screenshots: https://slow.pics/c/NLBKXy5L
Video Info

Width : 768 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits

Thank You
fabioseixal is offline   Reply With Quote
Old 7th June 2023, 10:45   #2626  |  Link
salvo00786
Registered User
 
Join Date: Feb 2022
Posts: 19
Hi DTL. Thanks for the reply. I was using a long script and one parameter, was very slow. I was using chromanoise and chromamotion, but chromamotion slowed down my qtgmc from 40fps to 2/3fps.

When I use QTGMC Slower the speed is about 40fps. I tried this script for a problematic video
Code:
chroma = checkmate(thr=12,max=25,tthr2=25)
luma   = checkmate(thr=12,max=25,tthr2=0)
fixed  = MergeChroma(chroma, luma)
SetFilterMTMode("DEFAULT_MT_MODE", 2)
QTGMC(preset="Slower", InputType=0, sourceMatch=3, Lossless=2, sharpness=0.2, NoisePreset="Slower", Denoiser="dfttest", ChromaMotion=true, ChromaNoise=true, EZDenoise=2.0, DenoiseMC=true, NoiseDeint="Generate", StabilizeNoise=true, ediThreads=8)
Prefetch(8)
With this script the speed dropped from 40 to 2/3 fps. After some experiments, I found that Chromamotion dropped drastically my speed. Without chromamotion the speed go from 2/3 fps to 28/30 fps with all the other parameters, but after some other experiments, this scripts doesn't resolved my problems with the video.

The script that I found that solved my problems is this

Code:
chroma = checkmate(thr=12,max=25,tthr2=25)
luma   = checkmate(thr=12,max=25,tthr2=0)
fixed  = MergeChroma(chroma, luma)
SetFilterMTMode("DEFAULT_MT_MODE", 2)
QTGMC(preset="Slower", sharpness=0.2, ediThreads=8).QTGMC(Preset="Slower", InputType=1, sharpness=0.2, ediThreads=8)
Prefetch(8)
Running two pass of QTGMC, solved my problems. The speed of my last double pass script is about 26.60 fps that is acceptable.

Last edited by salvo00786; 7th June 2023 at 11:14.
salvo00786 is offline   Reply With Quote
Old 7th June 2023, 12:16   #2627  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
@Dogway
If I denoise pretty heavily with smdegrain/mvtools but need to make it affect brighter areas less, could this be done in a clever way in the prefilter?
Ex_merging with masks and two calls of smdegrain is pretty slow so I would think there is a faster solution.

Edit: prefiltering is mostly for the motion vectors and not for denoise strength I know but details can be affected if the prefilter is too soft. Maybe doing it in prefiltering stage is not the way. Any ideas are very welcomed.

Last edited by anton_foy; 7th June 2023 at 14:07.
anton_foy is offline   Reply With Quote
Old 7th June 2023, 16:23   #2628  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
fabioseixal: Thanks for the report! Fixed
anton_foy: Maybe increase SAD for brighter areas with AddGrainC. A mix of LumaMask, AddGrainC and ex_merge. But maybe better to do afterwards and merge back source clip via LumaMask and ex_merge.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 7th June 2023 at 17:00.
Dogway is offline   Reply With Quote
Old 7th June 2023, 18:02   #2629  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by Dogway View Post
anton_foy: Maybe increase SAD for brighter areas with AddGrainC. A mix of LumaMask, AddGrainC and ex_merge. But maybe better to do afterwards and merge back source clip via LumaMask and ex_merge.
Great thanks! But how do you mean afterwards? Not in the prefilter?
anton_foy is offline   Reply With Quote
Old 7th June 2023, 18:28   #2630  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by anton_foy View Post
Great thanks! But how do you mean afterwards? Not in the prefilter?
Yes:
Code:
src=last
SMDegrain()
ex_merge(src, LumaMask(lo=150, hi=235),luma=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th June 2023, 18:55   #2631  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by Dogway View Post
Yes:
Code:
src=last
SMDegrain()
ex_merge(src, LumaMask(lo=150, hi=235),luma=true)
It is faster than doing the addgrainC-merging on the prefilter?

Did you read DTL's suggestion in the MVTools thread?
Maybe something to implement into smdegrain if it is faster and or better quality?

Last edited by anton_foy; 7th June 2023 at 18:59.
anton_foy is offline   Reply With Quote
Old 7th June 2023, 19:31   #2632  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I read DTL's now, basically my suggestion above(?).
This is basic AviSynth usage, masking, filtering and whatnot.

Post merging is recommended, I don't think it can be merged into an existing expression within SMDegrain, so this should be as fast as it gets. Unless you want to break down the ex_merge call into pieces and turn it into an ex_lutxy() call, but that's advanced.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th June 2023, 20:47   #2633  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 702
Quote:
Originally Posted by Dogway View Post
I read DTL's now, basically my suggestion above(?).
This is basic AviSynth usage, masking, filtering and whatnot.

Post merging is recommended, I don't think it can be merged into an existing expression within SMDegrain, so this should be as fast as it gets. Unless you want to break down the ex_merge call into pieces and turn it into an ex_lutxy() call, but that's advanced.
Yeah okay thanks, I just want to find a way with the least processing time to "pull back" degraining in the brighter areas because this is IMHO possibly the simplest road to a "dynamic degrain" without going through slooow runtime filtering.

Another way is to use averageluma and conditionals but I must do benchmarks and it would not be as seamless as the suggested above. (I am aware it is runtime though)

Edit:
Quote:
so this should be as fast as it gets
You mean below?:
Quote:
src=last
SMDegrain()
ex_merge(src, LumaMask(lo=150, hi=235),luma=true)

Last edited by anton_foy; 7th June 2023 at 22:54.
anton_foy is offline   Reply With Quote
Old 9th June 2023, 12:55   #2634  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
I have tried to reverse the upscaling of an anime, using the values that getnative (python utility) gave me about the source, usually in bicubic parameters.

My intention is to later apply some needi3resize, to have a better 1080p result.

I did tests with DeBicubicResizeMT, Descale and fmtc_resample. I can't get rid of the ghosting close to the edges of the screen that, AFAIK, are a consequence of the bicubic upscaling and minor ones around dark lines.

So, aren't they caused by the upscaling?

Dogway, do you have any hint for me? Is there any function in your plethora of scripts that can help me?

P.S: Something that would *really* work without having to use python and VS to get native resolution would be great too.
__________________
@turment on Telegram

Last edited by tormento; 9th June 2023 at 12:58.
tormento is offline   Reply With Quote
Old 9th June 2023, 18:11   #2635  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by tormento View Post
I have tried to reverse the upscaling of an anime, using the values that getnative (python utility) gave me about the source, usually in bicubic parameters.

My intention is to later apply some needi3resize, to have a better 1080p result.

I did tests with DeBicubicResizeMT, Descale and fmtc_resample. I can't get rid of the ghosting close to the edges of the screen that, AFAIK, are a consequence of the bicubic upscaling and minor ones around dark lines.
I would use getNative only to get the source original resolution but then upscale with something else. needi3resize is a nice fast upscaler but if you have the power to spare I would use an onnx model, in one of my tests for a 90s film I use 2X_DigitalFilmV5_Lite with great results. For the borders I usually crop them or use FillBorders plugin.

nnedi3resize can be a bit soft for textures so if you have some in your source you might want to use a better upscaler for 'flat', not to the extent oh high taps sincs but maybe spline16.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 9th June 2023 at 18:19.
Dogway is offline   Reply With Quote
Old 9th June 2023, 20:10   #2636  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
if you have the power to spare I would use an onnx model
Unfortunately not and that's why I am downsizing to "native".

As I wrote, I have issues with the artifacts that the original upscale caused and I don't know why they don't disappear when downscaling.

Can I bother you, sending some piece of anime where you can see them?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 9th June 2023, 20:39   #2637  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by tormento View Post
As I wrote, I have issues with the artifacts that the original upscale caused and I don't know why they don't disappear when downscaling.

Can I bother you, sending some piece of anime where you can see them?
It's ok. If you can please give me the original resolution that getNative provides. You want to rescale back right?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th June 2023, 12:15   #2638  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
It's ok. If you can please give me the original resolution that getNative provides. You want to rescale back right?
Here is the archive.

It contains a short cut of AnoHana 1st episode and the getnative analysis on a couple of significative frames. There is a doubt about 720p and 960p. I have chosen the 720p as it is the most probable, with b=1, c=0, as they are the values that gives the higher error detection.

Look at the upper border of the sky frame. It has some multiple ghostings and, in a minor way, around the game controller too.

My very simple script is:

PHP Code:
SetMemoryMax()
SetFilterMTMode("DEFAULT_MT_MODE"2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("N:\In\AnoHana\01.dgi")
ConvertBits(16)
fmtc_resample (1280720kernel="bicubic"a1=1a2=0invks=True)
fmtc_bitdepth (bits=10,dmode=8
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 10th June 2023, 22:57   #2639  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I see, so you only want to downscale.
You have to crop to remove the original ringing in the upper and lower frame borders, as well sides for the black.
Code:
crop(2,2,-2,-2)
Or you can use FillBorders plugin instead to fill those areas.

You can also play with crop+dilation:
Code:
crop(2,2,-2,-2)
PadBorders(16,16,16,16,mode="Dilate")
fmtc_resample (1280+20, 720+20, kernel="bicubic", a1=1, a2=0, invks=True)
PadResize(1280,720)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 10th June 2023, 23:01   #2640  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by Dogway View Post
You have to crop to remove the original ringing in the upper and lower frame borders, as well sides for the black.
Isn't inverse kernel supposed to get rid of the upscaling artifacts? AFAIK those ones come from bicubic.
Quote:
Originally Posted by Dogway View Post
You can also play with crop+dilation
Please, explain me the script with crop+dilation.

Anyway, at the end, I would get rid of borders artifacts only but not the ones around the lines.

Am I wrong or once you find native resolution + bicubic parameters, everything should be fixed in the downsized video?
__________________
@turment on Telegram
tormento 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 20:04.


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