View Full Version : Dogway's Filters Packs


Pages : 1 2 3 [4]

tormento
5th September 2024, 21:50
@Dogway

When you have some time, would you please add to your scripts a "modern" version of finedehalo?

It still needs dehalo_alpha.avsi and mt_xxpand_multi.avsi.

Perhaps merging them and updating with latest AVS+ functions could make it a bit faster.

Lucky38
27th September 2024, 07:24
Question:

Why below call for 1080p gives 3-3,5k bitrate

SMDegrain(tr=3, thSAD=500, thSCD2 = 100,truemotion=false, rfilter=3, prefilter=1, search=5, contrasharp=false, LFR=true, DCTFlicker=true)

and below call for 2160p gives 15-16k bitrate

SMDegrain(tr=3, thSAD=500, thSCD2 = 100,truemotion=false, prefilter=1, UHDHalf=false, limit=255, search=5, contrasharp=false, LFR=true, DCTFlicker=true)


X265 config has exaclty the same settings. I know that 4k is 4 time 1080p but i have feeling that SMDegrain reduces grain less for 4k than for 1080p.

DTL
27th September 2024, 18:25
4K naturally have more noise 'per sample' because it gets 4 times less photons per sample from same lit scene (via same aperture lens) and relative photon shot noise is 2 times larger. It also can cause worse motion estimation and higher SAD and lower denoising.
To shoot comparable 4K users need to set 4 times more light per scene (to keep same depth of field from lens) and use camera with same electrons per sample sensor capacity (or something like 4 times per frame reading and 'external accumulation') and externally it is looks like 4 time less ISO sensitivity rating. In that case the 4K digital footage expected to be only 4 times more in comparison with 1080 in data rate (sort of real scene data rate with zero noise).

tormento
28th September 2024, 10:02
4K naturally have more noise 'per sample' because it gets 4 times less photons per sample from same lit scene (via same aperture lens) and relative photon shot noise is 2 times larger. It also can cause worse motion estimation and higher SAD and lower denoising.
Are you suggesting that we should denoise a UHD with the BD version or resizing it as prefilter is enough?

Lucky38
28th September 2024, 19:14
4K naturally have more noise 'per sample' because it gets 4 times less photons per sample from same lit scene (via same aperture lens) and relative photon shot noise is 2 times larger. It also can cause worse motion estimation and higher SAD and lower denoising.
To shoot comparable 4K users need to set 4 times more light per scene (to keep same depth of field from lens) and use camera with same electrons per sample sensor capacity (or something like 4 times per frame reading and 'external accumulation') and externally it is looks like 4 time less ISO sensitivity rating. In that case the 4K digital footage expected to be only 4 times more in comparison with 1080 in data rate (sort of real scene data rate with zero noise).


so is there any suggestion how to properly handle UHD noise?

DTL
29th September 2024, 09:44
Because it typically have more relative noise levels - increase 'denoising' settings like thSAD and tr and also may be double block size (it also may be useful for typically more soft UHD sources but may depend on source sharpness).

tormento
16th October 2024, 14:30
My script

SetMemoryMax()
SetCacheMode(0)
SetFilterMTMode("DEFAULT_MT_MODE", 2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("M:\In\Mobile Suit Gundam - Il contrattacco di Char ~Dynit\contrattacco.dgi",ct=48,cb=48,cl=48,cr=48, dn_enable=3, dn_strength=0.1, dn_cstrength=0.05, dn_quality="best")
DebilinearResizeMT(1598,862,threads=1)
ConvertBits(16)
ConvertFormat(fmt_in="420",fmt_out="444",cs_out="",UVrecon=true)
libplacebo_Deband(iterations=5,temporal=true)
fmtc_bitdepth (bits=10,dmode=3)
Prefetch(2,6)

I get

Script error: There is no function named 'nnedi3_rpow2'.
(D:/Programmi/Media/AviSynth+/plugins64/ResizersPack-12.1~Dogway.avsi, line 786)
(D:/Programmi/Media/AviSynth+/plugins64/ResizersPack-12.1~Dogway.avsi, line 787)
(D:/Programmi/Media/AviSynth+/plugins64/ResizersPack-12.1~Dogway.avsi, line 793)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 962)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 972)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 1323)
(M:\In\Mobile Suit Gundam - Il contrattacco di Char ~Dynit\contrattacco.avs, line 15)

In the TransformsPackMain script:

### ConvertFormat()
###
### Dependencies: AviSynth+ 3.7.3 and over
### ExTools
### GradePack (for show=true or 'sigmoid' scaling)
### MasksPack (for show=true)
### ResizersPack (for show=true or UVRecon=true or NN scalers)
### KNLMeansCL (for UVRecon=true)
### nnedi3(CL) (for UVRecon=true)
### Optional resizer plugins (check links)

From ResizersPack:

# nnedi3resize()
#
# Wrapper for nnedi3wrap() for simplified ____resize() style arguments.
# Performant neural network based upscaler recommended for graphics or textureless images.
# It accepts arbitrary dimension values, not only limited to powers of 2
#
# Dependencies:
# see nnedi3wrap() below

# nnedi3wrap()
#
# Replacement wrapper for nnedi3(), nnedi3_rpow2() and NNEDI3CL() based on 'field' and 'gpuid' values.
# Adds "_rpow2" functionality and its arguments to NNEDI3CL().
# Maintains frame properties when nnedi3() or nnedi3_rpow2() is used.
# Decouples 'rfactor' into 'xfactor' and 'yfactor' and sets new reasonable defaults.
# Finally it automatically fixes center shift for both plugins, set cshift="none" to disable.
#
# Dependencies:
# ExTools
# NNEDI3CL (requires at least AVS+ v3.7.3)
# or
# nnedi3

It should work fine with NNEDI3CL and NNEDI3CL_rpow2 too, right?

Any idea?

Emulgator
16th October 2024, 15:19
DeblockPack 2.8.avsi function oyster_Deringing was throwing error: I don't know what "UV" means.
Added missing line 468:
UV = color ? 3 : 2 # Emulgator 2024 10 16: Missing line added

tormento
16th October 2024, 16:09
DeblockPack 2.8.avsi function oyster_Deringing was throwing error
You aren't answering me, are you?

Emulgator
16th October 2024, 16:12
No, this was just a find to help all Dogway filter users, not connected to your script.

tormento
18th October 2024, 13:17
I am fighting with a hard compromise between denoising and details loss.

Some animation studios, even when producing in digital, add some very fine digital noise to the final product.

These two clips come from a very recent anime.

The first one (https://www.mediafire.com/file/arjq4m0d96z8tf2/Girl_01_14828-14882.mkv/file) is about the details of the garnment of the girl, mostly the knitting close to the hairs and the hood.

https://i.ibb.co/VmvRBjN/Girl-01-14828.png

The second one (https://www.mediafire.com/file/4nu6zolm3y0c3m8/Girl_01_17474-17635.mkv/file) is where you can clearly see the digital noise lurking in the dark. You can see in light scenes too but here is more evident.

https://i.ibb.co/f1r2MBb/Girl-01-17474.png

I have tried many many parameters to delete the noise, preserving the knitting, but it's really hard.

Any help is welcome.

takla
18th October 2024, 13:34
I have tried many many parameters to delete the noise, preserving the knitting, but it's really hard.

Any help is welcome.

Use 2x-LD-Anime-Compact (https://forum.doom9.org/showpost.php?p=1998906&postcount=100)
Should clean it up very nicely. 2x_AniScale2S_Compact_i8_60K should work, too.

Selur
18th October 2024, 13:48
Should clean it up very nicely.
nope,.. https://imgsli.com/MzA4NzI1
I would start with something like mcdegrainsharp and then try to filter flat areas differently using some masking.

tormento
18th October 2024, 14:20
I would start with something like mcdegrainsharp and then try to filter flat areas differently using some masking.
I don't want to put so much effort to manually select filter range and apply different filters to them manually.

I'd like to use a much more replicable and automated process.

tormento
18th October 2024, 14:21
Should clean it up very nicely. 2x_AniScale2S_Compact_i8_60K should work, too.
It completely destroys knittings.

And I doubt it could performe nicely on my 1660 Super too.

What GPU do you have and how many fps can you achieve?

takla
19th October 2024, 00:41
It completely destroys knittings.


Mhh yeah it does.

nope,.. https://imgsli.com/MzA4NzI1


Thank you for posting that comparison. I'd be surprised if there was any solution without trade-offs here. (Without manually masking scenes, ofcourse)


What GPU do you have and how many fps can you achieve?

I don't remember the exact FPS. But I think it was almost realtime, depending on the resolution, on my Radeon RX 6950 XT. Relative performance has my GPU 3 to 4 times faster. BUT if you can find the filter with cuda, that gap should be smaller.

tormento
19th October 2024, 10:55
Thank you for posting that comparison. I'd be surprised if there was any solution without trade-offs here. (Without manually masking scenes, ofcourse)
BM3D did the trick.

Very short script indeed.

Selur
19th October 2024, 21:25
@tormento: Have you tried using simple fft3dfilter? (https://imgsli.com/MzA5NDk4)

tormento
19th October 2024, 22:28
@tormento: Have you tried using simple fft3dfilter? (https://imgsli.com/MzA5NDk4)
Send your script, please.

Selur
20th October 2024, 07:08
I just called FFT3DFilter with the default parameters. (you can tweak the setting for stronger denoising and add deband to add some noise in places that otherwise will might cause banding when encoding with 8bit)
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\LoadDll.dll")
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\FFT3DFilter.dll")
LoadDLL("F:\Hybrid\64bit\Avisynth\avisynthPlugins\libfftw3f-3.dll")
LoadPlugin("F:\Hybrid\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
Import("F:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
# loading source: C:\Users\Selur\Desktop\Girl_01_14828-14882.mkv
# color sampling YV12@8, matrix: bt709, scantyp: progressive, luminance scale: limited
LWLibavVideoSource("C:\Users\Selur\Desktop\Girl_01_14828-14882.mkv",cache=false,format="YUV420P8", prefer_hw=0,repeat=true)
# current resolution: 1920x1080
FFT3DFilter(interlaced=false)
# Converting from 8 to 10bit for encoder
ConvertBits(10)
# setting output fps to 23.976fps
AssumeFPS(24000,1001)
PreFetch(16)
# output: color sampling YV12@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

Cu Selur

tormento
20th October 2024, 10:38
I just called FFT3DFilter with the default parameters.
Someone knows how to extract the noise frequencies from an image and selectively remove them?

I think it would be really useful and fast with postproduction digital noise, if simple enough.

DTL
20th October 2024, 23:14
There were some FFTW-based plugins like DeFreq (?). But it works about good only if you distortion is narrow bandwidth enough (like colour subcarrier). Natural noise is much more complex mixed with useful data and can not be as simply separated. When you run SMDegrain and it blends different frames blocks - it may be equal to special temporal-convolution frequency filter to pass only narrow frequencies and suppress out of band noise. May be same or close idea is implemented in FFT3D plugin via FFT.

tormento
21st October 2024, 10:55
Natural noise is much more complex mixed with useful data and can not be as simply separated.
That is not natural noise.

That anime was 3D rendered and digital noise added later, to simulate film effect. The bandwidth, as far as my eyes can see, is really limited and mostly visible in darker area, even if light ones are mildly affected too.

DTL
21st October 2024, 13:30
Typical examples for narrow band distortions are Aerial interference with analog broadcast or some analog interference at ADC board/device to convert analog to digital. If random special noise is added - it most probable have too wide (flat) spectrum and can not be easily filtered out with narrow band-stop filters.

tormento
24th October 2024, 16:33
Choose what you like. For personal, i prefer DPIR +UniScale CartoonRestore-lite + AnimeJanai's result
Would you please address me to where to download them?

Do you know of some model that can keep 1x scale and deblur/antialiasing, to have some anime restoration instead of scaling?

tormento
29th October 2024, 12:23
Tried to use Oyster_super.

I have to Crop(128,128,-128,-128) and resize because the image become enlarged and corrupted along the sides and doubles.

Plus, the comment says ## Input: 444 YUV/RGB at any bitdepth (output is float) but it needs to be 32 bits.

Anyone else?

takla
29th October 2024, 23:14
LWLibavVideoSource("INPUT.mkv")
ConvertBits(32).ConvertToPlanarRGB()
AItrashHere()

rgr
20th November 2024, 12:28
Has anyone compared Stabilization Tools Pack with Deshaker 3.1?

tormento
21st November 2024, 16:05
The call from xClean (https://github.com/mysteryx93/xClean):

ConvertFormat(cconv, fmt_out="444", kernel_c=chroma, tv_in=!fulls, cplace_in=cplace)

causes

Script error: NNEDI3RESIZE does not have a named argument "src_width"
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 969)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 971)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 972)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 1323)
(D:/Programmi/Media/AviSynth+/plugins64/xClean-beta10~mysteryx93.avsi, line 232)

and I can't sort out the bug in the TransformsPackMain-2.2.1.

Any idea?

tormento
3rd December 2024, 22:59
It happens that anime are getting more and more "clean" in the general appearance but if you zoom in the dark areas you can see lot of "pixel fluctuations", perhaps coming from a poor AVC compression strategy, even from BDs. Sometimes it appears on light areas too but it's more rare.

Wanting to cleanup those lurking pixels without ruining the overall quality what do you suggest me?

I have tried with high tr and thsad numbers but all I obtain is to ruin the details without cleaning up the dark areas.

Someone tried it before?

poisondeathray
4th December 2024, 00:02
It happens that anime are getting more and more "clean" in the general appearance but if you zoom in the dark areas you can see lot of "pixel fluctuations", perhaps coming from a poor AVC compression strategy, even from BDs. Sometimes it appears on light areas too but it's more rare.

Wanting to cleanup those lurking pixels without ruining the overall quality what do you suggest me?

I have tried with high tr and thsad numbers but all I obtain is to ruin the details without cleaning up the dark areas.

Someone tried it before?


Filter the dark areas with stronger filtering than the brighter areas (or no filtering for the bright)

You can use the LumaMask in the MasksPack

tormento
4th December 2024, 00:16
Filter the dark areas with stronger filtering than the brighter areas (or no filtering for the bright)

You can use the LumaMask in the MasksPack


Thank you, nice idea.

And what about “subtle pixel noise” in light areas?

It’s way less noticeable but still there.

The problem is that from film grain noise, digital workflow switches that easily fixable rumor to tiny pixel fluctuations than you can really notice on larger screens.

poisondeathray
4th December 2024, 17:33
Thank you, nice idea.


Not really my idea - people have been doing this for >30 years, pre-avisynth with denoising images. You can find video mask scripts 20 years ago


And what about “subtle pixel noise” in light areas?


Use a "subtle pixel noise filter" for the light areas using the mask



The problem is that from film grain noise, digital workflow switches that easily fixable rumor to tiny pixel fluctuations than you can really notice on larger screens.

Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film

Z2697
4th December 2024, 17:44
Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film

Ray-tracing renderers can produce "real" grians by itself.
And most noises in digital era is added without good reason.

poisondeathray
4th December 2024, 17:55
Ray-tracing renderers can produce "real" grians by itself.


Yes, or not - it depends on the settings

Often the "grain" does not end up look like real film grain, but digital noise - not enough iterations and convergence during render


And most noises in digital era is added without good reason.

Yes, digital acquisition tends to be clean, especially with good lighting. The grain is added in post. "Dark" scenes are often shot brighter, then adjusted to look "dark" in post

But for film, the CG elements have grain emulation to blend into the film as stated above

tormento
4th December 2024, 19:32
Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film
Some full CGI animes start to have good enough quality to be almost on par with drawn ones, i.e. Girls band cry.

The problem is that people are so used to grain that they artificially added it with no apparent reason.

Thus, denoising that digital "pixel fluctuation" makes faint details from CGI to disappear.

I uploaded a small clip (https://forum.doom9.org/showthread.php?p=2008439#post2008439) from that anime, if you are curious to look at what I mean.

Dogway
3rd January 2025, 11:00
@tormento, this is more or less the high freq grain, but I'm not sure you can do something with it.
a=last
STTWM(sw=0,tw=100,aw=100,sthres=0,tthres=2)
ex_makediff(a, metric="none", aug=128, dif=true, show=3)
This a simple filter (or use ex_FluxSmoothT() instead of STTWM):
pre=STTWM(sw=0,tw=100,aw=100,sthres=2,tthres=2).ex_sbr()
SMDegrain(2, 200, mode="RMDegrain", prefilter=pre,RefineMotion=true)
It's going to be hard to protect everything, since there are many low contrast lines, but it does the job.


You can also add some masks to protect details...
dt=ex_edge("kayyali",lo=40)
dtm=dt.ex_expand(2,mode="disk")
em=ex_edge("kroon")
gib=em.ex_expand(2).ex_inflate()


ConvertBits(16)
pre=ex_FluxSmoothST().ex_minblur(1)
msk=ex_logic(dtm,em,"max").ConvertBits(16)
pre=ex_merge(pre,last,msk)
SMDegrain(2, 200, mode="RMDegrain", prefilter=pre,RefineMotion=true)
ConvertBits(8,dither=1)

Dogway
3rd January 2025, 12:05
I'm trying to put Deblock_QED to use in the DeblockPack.avsi and seem to actually have it functioning correctly, but wanted to make sure before I spend time testing it. My script is

Deblock_QED()
ConvertBits(Bits=16)
TemporalDegrain2()
CAS()
Neo_F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0)

I found that putting the Deblock_QED call after converting to 16bits made for LSD flashback-style output; does this mean that it only accepts 8bit input?

Also, while gathering the needed dependencies for Deblock_QED in the DeblockPack.avsi, I encountered the plugin BlockDetect (https://github.com/Asd-g/AviSynthPlus-BlockDetect) and wondered what it does. Well, I can read what it does, but don't understand why it would be used. Thanks.

I tested and Deblock_QED works fine in HBD.
The Deblock dependency has nothing to do with BlockDetect, its Deblock (https://github.com/299792458m/Avisynth-Deblock), here's the avisynth entry page (http://avisynth.nl/index.php/DeBlock). It's basically a deblock filter, Deblock_QED limits the deblocking to the block edges.

Maybe the issue is on the other filters?

tormento
3rd January 2025, 15:02
@tormento, this is more or less the high freq grain, but I'm not sure you can do something with it.
Thank you and welcome back!

Please notice a fix for your scripts here (https://forum.doom9.org/showthread.php?p=2012441#post2012441).

P.S: MysteryX told me that he is not using Windows anymore and is not interested in further development. What about merging its source with ExTools or so?

P.P.S: Would be possible to have motion compensated BM3D_CUDA and KnlMeansCL?

anton_foy
6th January 2025, 18:20
Thank you and welcome back!

Please notice a fix for your scripts here (https://forum.doom9.org/showthread.php?p=2012441#post2012441).

P.S: MysteryX told me that he is not using Windows anymore and is not interested in further development. What about merging its source with ExTools or so?

P.P.S: Would be possible to have motion compensated BM3D_CUDA and KnlMeansCL?

I am maybe wrong but does not knlmeanscl use some kind of motion compensation already? Try it with 'd=12' and see how it acts. BM3D is already using block matching.

tormento
6th January 2025, 20:47
I am maybe wrong but does not knlmeanscl use some kind of motion compensation already? Try it with 'd=12' and see how it acts. BM3D is already using block matching.
You are absolutely right for BM3D, I don't know nlmeans enough to answer you.

My request was originated by the large amount of time and processing required by BM3D for the block matching. I am just curious to know if results could be better or not.

LouieChuckyMerry
26th January 2025, 20:15
I tested and Deblock_QED works fine in HBD.
The Deblock dependency has nothing to do with BlockDetect, its Deblock (https://github.com/299792458m/Avisynth-Deblock), here's the avisynth entry page (http://avisynth.nl/index.php/DeBlock). It's basically a deblock filter, Deblock_QED limits the deblocking to the block edges.

Maybe the issue is on the other filters?

Thanks for your patience, Dogway :) . I've Deblock, DCTFilter, ExTools, and ResizersPack, all the latest x64 versions, but the simple call Deblock_QED results in the error message:

Avisynth open failure: Script error: There is no function named 'Deblock_deblock'... DeblockPack.avsi, line 148.

Any thoughts?

Dogway
28th January 2025, 09:30
I've Deblock, DCTFilter, ExTools, and ResizersPack, all the latest x64 versions, but the simple call Deblock_QED results in the error message:

Any thoughts?

You should test separately to see why does it happen.

Here (https://forum.doom9.org/showthread.php?p=1976974#post1976974)'s the reasoning about the basename for the call.


Basically there are a few Deblock functions, so the basename was to determine from which plugin it came.

Basically load a blocky source and try with this:
Deblock_deblock(quant=24,aOffset=1,bOffset=2)

tormento
28th January 2025, 12:28
You should test separately to see why does it happen.
Please, when you have time, have a look here (https://github.com/Dogway/Avisynth-Scripts/issues/92).

LouieChuckyMerry
30th January 2025, 19:51
You need to download Deblock (https://github.com/299792458m/Avisynth-Deblock/releases) plugin.

The plugin prefix Deblock_ is to not be confused with other Deblock called functions, it was a change in 2014 by GMJCZP.
It shouldn't trigger an error, it doesn't for me. As Reel.Deel stated the plugin should be called Deblock.dll (case insensitive).

Thank you :thanks: . I always name my .dlls and .avsis with the version number and architecture (like Neo_FFT3D__64bit.dll or Neo_F3KDB9_0__64bit.dll) because it helps me keep track of them (and I need all the help I can get, ha ha) and have never had a problem until now. Renaming the Deblock .dll from "Deblock1_3__64bit" to just "Deblock" fixed the problem. Thank you again, be well.

salvo00786
30th March 2025, 10:55
Hi... I have a problem with qtgmc+...

This is my script:
QTGMCp(Preset="Placebo", TR0=2, TR1=2, TR2=0, Rep0=7, Rep1=7, Rep2=7, DCT=5, SourceMatch=3, Lossless=1, MatchPreset="Placebo", MatchPreset2="Placebo", MatchEnhance=1.0, MatchTR2=2, EZKeepGrain=1.0, Sharpness=0.2, Sbb=3, ThSCD1=250, ThSCD2=95, NoiseProcess=0, SMode=2, SLMode=4, Subpel=4, Search=5, PelSearch=7, SearchParam=7, Overlap=8, EdiMode="EEDI3CL+NNEDI3CL", Ediqual=2, ChromaMotion=True, TrueMotion=true, Precise=True, NNeurons=4)

When I use the same script on the old QTGMC with EdiMode="EEDI3+NNEDI3CL" (mix cpu and gpu) and Edithreads=16, I have a speed of 25fps. When I use the complete script on qtgmc+ with EdiMode="EEDI3CL+NNEDI3CL" (total gpu) but without edithreads=16 (because in qtgmc+ edithreads is not accepted), I have 2fps encoding speed.

Yesterday I removed one by one all the setting in my script and I found that this occur only when I use Sourcematch... If delete Sourcematch the speed go at 30fps... Please can you tell me why this occur and can you give me the latest version of qtgmc+ with edithreads? Or do you have some other solution for me?

Also, what are the maximum values for rep0 rep1 and rep2?

Selur
30th March 2025, 11:56
can you give me the latest version of qtgmc+ with edithreads?
https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/QTGMC%2B.avsi, there is no edithreads, it's called Threads here.

Also, what are the maximum values for rep0 rep1 and rep2?
https://github.com/Dogway/Avisynth-Scripts/blob/c6a837107afbf2aeffecea182d021862e9c2fc36/MIX%20mods/QTGMC%2B.avsi#L1599

salvo00786
30th March 2025, 14:57
[QUOTE=Selur;2017056]https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/QTGMC%2B.avsi, there is no edithreads, it's called Threads here.

Yes, I know, but I am searching for an older version of qtgmc+ after 4.0, like 4.0p with edithreads (if exist)

Selur
30th March 2025, 15:26
you can get the older versions on the github page too,....

Dogway
4th April 2025, 22:43
@salvo00786, can you check the speed in qtgmc+ when using full cpu "EEDI3+NNEDI3"?, Try also setting 'Threads' to 16, and then without the setting (defaults).

If it goes slow, then play with the 'Threads' value in this line in ResizersPack.
https://github.com/Dogway/Avisynth-Scripts/blob/c6a837107afbf2aeffecea182d021862e9c2fc36/ResizersPack.avsi#L997

GPU versions ignore 'Threads' as usual. From what I recall mixing cpu and gpu in heavy scripts create some race conditions that harm performance. I typically run GPU when they are like 2 (maybe 3 max) simple filters in line.

Adub
21st April 2025, 18:42
Hello Dogway, thank you so much for your work on ExTools, etc.

I'm currently reading though some of your blurring functions, and I have a few questions just to ensure that I'm understanding things properly.

Looking at your ex_median("smart"), it looks like you're processing a 3x3 grid. You take the average of the surrounding 8 pixels, and then use a sorting network on the same 8 pixels.

What I'm not totally clear on is what's being stored in the "E^ D^ H^" (https://github.com/Dogway/Avisynth-Scripts/blob/master/ExTools.avsi#L4268-L4270) variables near the end.

I see that you are storing some part of the sorting network into these variables and then popping them off the stack before you conduct some squared differences using what's left on the stack and then what's stored in H.

So in short, what do the E, D, and H variables contain, and what's left on the stack that's being used for the first squared difference with the average?

Edit: I *think* D and E hold the 4th smallest/largest pixel values in the 3x3 grid, and the stack and H hold the 3rd smallest/largest pixels, respectively. Do I have that right?

Dogway
22nd April 2025, 03:28
What I'm not totally clear on is what's being stored in the "E^ D^ H^" (https://github.com/Dogway/Avisynth-Scripts/blob/master/ExTools.avsi#L4268-L4270) variables near the end.

I didn't remember but reading through it a bit, if I'm not mistaken, E and D are the "max" and "min" values, so the middle values of the ranking order. There are still two values in the stack, the same middle values but unordered, so H pops out one (doesn't matter which, it's for the variance), and the left one is immediately consumed by the first substraction "leftover-mean-on-the-stack W - dup *"

So the end of the sorting network is like this:

4 3 (unordered)
3 4 (ordered)

Pop 4 (max as E), 3 (min as D), and 3 (unordered, as H), consume 4 for the substraction, then 3 (H now) for the second substraction.

Check davidhorman tool here. https://horman.net/expr_sort.php. Select 8 inputs, then checkboxes for 3 and 4.

EDIT: I see you are making ZSmooth, one the missing pieces of my project was implementing mt_hysteresis (it's very slow), because that needs to be done on a robust language, maybe you can give it a try.

Adub
23rd April 2025, 00:58
Ahhh got it, I was close but a little off the mark. Thank you for the thorough explanation.

The one last thing I'm not sure I understand is the squared difference logic. I understand the order of operations, but it's more of the "why" that I'm lacking depth on. It seems to be a key part of the the "variance" calculation, but I haven't quite groked what its doing yet.

Put another way, what is the motivation for taking the square root of the squared differences and multiplying by 13?

Re: Zsmooth - yup, I'm currently implementing spatial/temporal smoothing/denoising functions there. I haven't seen a need for a hysterisis implementation just yet, as none of the algorithms (so far) have utilized a mask.

Did you mean that a hysterisis implementation would be nice to have in general, or that it would specifically benefit some of your "smoothing" functions in some way?

Dogway
23rd April 2025, 15:27
Its not a strict variance although it's based on it. From the formula it's basically an euclidean distance. The reason I didn't divide by the count, or that I multiplied by 13 was too normalize or saturate the output for a consistent thresholding with the rest of modes. Basically I did the full implementation with variance and from there started optimizing the ops for performance.
The problem with hysteresis is that there exists only one implementation. It's in masktools and it's very slow, pairing that with its huge benefits for refining masks (acts as a smart gap filler) makes it in my view a great candidate for revision. I don't know how the scenario is in vapoursynth but I guess it's much faster there.

Adub
29th April 2025, 01:24
Got it. Thanks again for the clear explanation.

Yeah, Vapoursynth has at least two different implementations of Hysteresis that I'm aware of:
1. https://github.com/vapoursynth/vs-miscfilters-obsolete/blob/master/docs/misc.rst
2. https://github.com/sgt0/vapoursynth-hysteresis

I haven't personally done any performance tests though. If I had to guess, the later is likely the most performant. Might be worth asking if they'll create an Avisynth port at the very least.

Adub
19th June 2025, 15:17
Actually, I think I may have found a bug with the smart median implementations. After implementing a similar approach in Zsmooth, I noticed that dark pixels were getting filtered before light pixels, even on smooth/flat textures.

Looking at the expression, I figured out that taking the difference between the "variance" and the source pixel was the root of the issue. Using grayscale as an example, if the source pixel is brighter, then the difference between the bright pixel and the variance will often exceed the provided threshold.

I simply removed the difference and the filter started smoothing like I expected.

So I think that removing "x - abs" from here is all that's really necessary: https://github.com/Dogway/Avisynth-Scripts/blob/c6a837107afbf2aeffecea182d021862e9c2fc36/ExTools.avsi#L4270

Lucky38
4th September 2025, 20:44
@Dogway


You can also add some masks to protect details...
dt=ex_edge("kayyali",lo=40)
dtm=dt.ex_expand(2,mode="disk")
em=ex_edge("kroon")
gib=em.ex_expand(2).ex_inflate()


ConvertBits(16)
pre=ex_FluxSmoothST().ex_minblur(1)
msk=ex_logic(dtm,em,"max").ConvertBits(16)
pre=ex_merge(pre,last,msk)
SMDegrain(2, 200, mode="RMDegrain", prefilter=pre,RefineMotion=true)
ConvertBits(8,dither=1)[/QUOTE]


can this mask to protect details be used in general, or it is for this specific case...?

Tlen
16th November 2025, 17:40
Hi Dogway,

thank you for your work.

I'm trying to make a bit of temporal degraining and

SMDegrain(tr=1,mode="TemporalSoften")

gives me quite a satisfactionary result.

But it eats a little bit too much grain.

There is a way to loosen it up a little to retain a bit more (like a treshold or something)?

Thank you very much

EDIT:
Found it myself thSAD parameter

hello_hello
25th December 2025, 13:46
Dogway,

if you're still around, I've had a couple of issues with QTGMC+ not de-interlacing anywhere near as well as QTGMC on "problematic" video. Unfortunately at the time I didn't get around to uploading a sample, but today I came across a problematic progressive video that QTGMC+ doesn't cope with well at all (the result is similar to problematic interlaced video). QTGMC cleans it up reasonably well. The zip file I've linked to below contains a small section of the source video (1080p) along with a sample encode with QTGMC and another using QTGMC+. As you can see, the difference is massive. The following is the only line in the script, aside from the FFMS2 source filter.

Either
QTGMC(InputType=1, EzDenoise=1.5, Preset="very slow")
or
QTGMCp(InputType=1, EzDenoise=1.5, Preset="very slow", gpuid=-1)

QTGMC v QTGMCp.zip (https://files.videohelp.com/u/210984/QTGMC%20v%20QTGMCp.zip) (39.6 MiB)

Cheers.

junah
25th December 2025, 18:05
Perhaps try without gpuid=-1 to make comparable examples.

rgr
25th December 2025, 22:17
I noticed a long time ago and mentioned here that QTGMC+ simply works much worse than QTGMC.

hello_hello
26th December 2025, 02:31
Perhaps try without gpuid=-1 to make comparable examples.

I'm pretty sure they're comparable the way they are.

QTGMC+

# Core plugins:
# ResizersPack (for nnedi3=true)
# NNEDI3CL (for nnedi3=true and gpuid=0) (requires at least AVS+ v3.7.3)
# nnedi3 (for nnedi3=true and gpuid=-1)

I noticed a long time ago and mentioned here that QTGMC+ simply works much worse than QTGMC.

It's odd because for fairly good quality video (interlaced or progressive) they seem fairly similar, but I think I'll go back to using the original QTGMC for the moment, just to be safe.

rgr
26th December 2025, 10:24
It's odd because for fairly good quality video (interlaced or progressive) they seem fairly similar, but I think I'll go back to using the original QTGMC for the moment, just to be safe.

I tested it once and found that the + was faster, but too light. It seemed like its filters were much weaker. It's a pity, because at 10 bits it was significantly faster.

hello_hello
26th December 2025, 14:43
The sample I uploaded contains a lot of shimmering, although I'm not sure why (the video is only like that in a few places), so I assume it's QTGMC's shimmer repair doing most of the work stabilizing it, and maybe that isn't working correctly in the QTGMC+ version, or something....

WAusJackBauer
5th January 2026, 14:56
Hello all. I've used this SMDegrain for a while but after updating it, it seems to have changed a bit. I'm looking for recommendations (hopefully from Dogway) on what settings to use as a one size fits all thing even though I know it's better to fine tune settings depending on the source video.

My main priority is minimal ghosting/smearing/artifacts and my second priority is removal of most noise but a slight amount remaining isn't a big problem. The content I encode is raw bluray movies, so the videos are 1920x1080 and they're live action. My settings currently look like this:

SMDegrain(tr=3, thSAD=400, RefineMotion=true, contrasharp=true, plane=4, prefilter=6, chroma=true)

I'm wondering if anyone has any suggestions on different settings to use that would give better results as I don't have a lot of knowledge on the parameters.

DTL
5th January 2026, 19:55
thSAD setting depends only on the relative noise level in your content. It is generally only protection setting from too bad blends and smoothing. The main adjustment of linear temporal nosie reduction is tr-value. To get lowest level of distortions you typically need first select your working tr-value (balance between performance and degrain level) and slowly increase thSAD (from very low values where it is not degrain at all) to adjust balance between degrain and smoothing. If you lucky you have some range of thSAD where degrain already enough and details smoothing is not yet started. If not - you need to adjust thSAD between either better degrain or better details saving.

Some time ago I found there is a simple API call in AVS+ allow to print debug data on output frame - it is very highly wanted feature for adjusting lots of params for mvtools (MAnalyse + MDegrain). But still not used.

TR-9970X
6th January 2026, 01:24
Hello all. I've used this SMDegrain for a while but after updating it, it seems to have changed a bit.

SMDegrain(tr=3, thSAD=400, RefineMotion=true, contrasharp=true, plane=4, prefilter=6, chroma=true)

I'm wondering if anyone has any suggestions on different settings to use that would give better results as I don't have a lot of knowledge on the parameters.

I have one specific question - I recently looked into thSAD and was thinking of changing it to 500 because it removes slightly more noise than 400 which I feel is nicer for some extra noisy scenes but I'm worried that it will cause ghosting/smearing. Is thSAD 500 fine to use for my type of content?

Here's one that use a LOT, but does get changed depending on the footage quality.

video=SMDegrain(video,tr=1,thSAD=100,thSADC=50,contrasharp=true,prefilter="MinBlur3",str=5.0,refinemotion=true)

video=SMDegrain(video,tr=2,thSAD=200,thSADC=100,contrasharp=true,prefilter="MinBlur3",str=5.0,refinemotion=true)

etc, etc

I use RipBot264, but for most other app's, you'd remove the video from the call.

Emulgator
7th January 2026, 02:48
And may I add:
To whom prefilter=6 (KNLMeansCL) is too smeary (to me it was) I can suggest prefilter=8 (BM3D).
Well worth the effort.

TR-9970X
7th January 2026, 02:52
And may I add:
To whom prefilter=6 (KNLMeansCL) is too smeary (to me it was) I can suggest prefilter=8 (BM3D).
Well worth the effort.

I kind of agree. I had forgotten what #6 was.

But doesn't BM3D work best with a hi end nVidia GPU ??

I tried it years ago, and I wasn't impressed, but I think I know why.

Emulgator
7th January 2026, 03:01
Yes, BM3D is resource hungry, RTX3080 here.
BM3D became my choice for the least harming treatment, keeping a filmic impression, subtly improving compressibilty.

tormento
7th January 2026, 13:50
But doesn't BM3D work best with a hi end nVidia GPU ??
1660 Super here. ;)

Remember to disable BM3D fast parameter when used in combination with cpu filter, i.e. almost always.

WAusJackBauer
8th January 2026, 01:02
And may I add:
To whom prefilter=6 (KNLMeansCL) is too smeary (to me it was) I can suggest prefilter=8 (BM3D).
Well worth the effort.

Yeah I heard prefilter 8 was a good one but I have an AMD GPU unfortunately.

I mainly used prefilter 6 because it apparently utilizes a GPU a little bit so it was slightly faster than the others. But if you believe a different prefilter would be better for my content, please let me know :)

TR-9970X
8th January 2026, 01:14
Yeah I heard prefilter 8 was a good one but I have an AMD GPU unfortunately.

I mainly used prefilter 6 because it apparently utilizes a GPU a little bit so it was slightly faster than the others. But if you believe a different prefilter would be better for my content, please let me know :)

That's unfortunate :(

You can use BM3D with a CPU, but what's the point in that.

So what app are you using ??

Have you tried my script suggestion ?

LeXXuz
12th January 2026, 11:23
Yeah I heard prefilter 8 was a good one but I have an AMD GPU unfortunately.


No shame in that. KNLMeansCL is a great denoiser if set up correctly.
I'd pick it over BM3D any day. ;)
And it runs much better on AMD GPUs than on comparable Nvidia cards.

Keep in mind those prefilter presets are merely defaults for different kinds of noise. Those are for people who can barely create their own Avisynth script.
If you want to get the optimum out of SMDegrain, nothing beats your very own prefilter setup.

Just my 2 cents.

tormento
12th January 2026, 14:07
KNLMeansCL is a great denoiser if set up correctly. I'd pick it over BM3D any day. ;)
Let’s agree to disagree ;)

Show me a source and your scripts to prove me that BM3D, especially in temporal+spatial flavor, is worse than klnmeanscl. :)

LeXXuz
13th January 2026, 10:36
Let’s agree to disagree ;)

Show me a source and your scripts to prove me that BM3D, especially in temporal+spatial flavor, is worse than klnmeanscl. :)

Prove? There's nothing to prove here. I said I'd pick NLM over BM3D any day for my personal taste and needs.

Why do you want to do inferior temporal denoising on a clip you'll feed to an excellent temporal denoiser afterwards?

As a standalone filter, I agree with you because KNLMCLs temporal denoising is utter garbage. And that's why I'd never use prefilter-6 setting in SMDegrain.

Let SMDegrain do the temporal denoising and give it a little help with a custom spatial denoiser, if needed.

And here I pick NLM over BM3D because it does a good job in the spatial domain, it is fast and needs way less CPU resources and much less VRAM on AMD.

Which brings me back to my last post where I said it is no shame to have an AMD GPU. OpenCL apps run faster on AMD and need way less VRAM because Nvidia is too dumb to code proper memory management for OpenCL, especially on RTX GPUs.
People complain in NV forums for a long time, but they don't care because they want devs to use CUDA of course.

pwnsweet
26th February 2026, 16:00
Remember to disable BM3D fast parameter when used in combination with cpu filter, i.e. almost always.

What is the reasoning behind this?

tormento
27th February 2026, 13:29
What is the reasoning behind this?
On the majority of computers, the overhead will kill the performance gain, above all when other filters are used too.

Tlen
2nd March 2026, 12:33
I read on the manual regarding planes

Keep in mind that plane=4 (2 and 3 as well) can sometimes create chroma smearing. In such case I recommend denoising chroma planes separately in the spatial domain.

And I saw a post on a blog comparing denoiser where the blogger show a clear example of the problem.

Is this still valid today?
Which are the risky conditions?

Actually I've always used to call 3 times on separate planes, but now I'm in a situation with an extreme grain source, when raising the tr the script doesn't even start being too much articulated with the 3 separate planes.

How can i handle this?
Thanks

Arx1meD
7th March 2026, 11:22
ex_bilateral does not work with different radius and radiusV values.

ex_bilateral(radius=3, radiusV=1)

AviSynth gives an error:
Expr: keyword or variable not found: 'B'
(D:\AviSynth\AviSynth plugins\ExTools.avsi, line 1623)

Does anyone know how to fix it?

Emulgator
12th March 2026, 07:48
I wouldn't attempt to separate chroma planes U,V before denoising.
I am expecting the result to obtain non-matching U,V planes, so more prominent faults.

real.finder
13th March 2026, 23:30
I noticed a long time ago and mentioned here that QTGMC+ simply works much worse than QTGMC.

btw, there are also M_QTGMC https://forum.doom9.org/showthread.php?p=2018905#post2018905 if you have the time and videos to test

Tempter57
14th March 2026, 06:37
btw, there are also M_QTGMC https://forum.doom9.org/showthread.php?p=2018905#post2018905 if you have the time and videos to test

You have specified in the link where DTL uses your version QTGMC.avsi, mvtools2.dll by pinterf and M_QTGMC_old_mvt.avsi on their basis.
Besides it at DTL there is a version QTGMC2.avsi, M_QTGMC.avsi and mvtoos2.dll https://github.com/DTL2020/QTGMC/releases/tag/m_0.2
It will be valid to enter for comparing a script on this basis too.
The result will turn out qualitative, but handling process very slow.

LeXXuz
1st May 2026, 09:25
I just gave QTGMC+ another shot. It still seems broken for me, causing massive artefacts. :(

The old QTGMC is working fine but smoothes the picture way too much for my taste. Tried to set NoiceProcessing=0 but it looks like this has little to no effect.

QTGMC+ lookes much crisper but sadly said artefacts make it unusable.

DTL
2nd May 2026, 06:38
"The old QTGMC is working fine but smoothes the picture way too much for my taste."

If you use 'placebo' preset as base it is recommended to manually switch Search to some of 2,3,4 modes (or may be some DCT-based). In my tests search mode 5 causes significant general frame blurring and I do not know why it is enabled for possibly 'quality' preset placebo. The only idea is to compensate for significant performance drop from other processing steps. But this also causes quality degradation and may destroy the total idea of the 'placebo' preset.

In QTGMC+ I also see all Search modes are 0,2,4 and placebo is 4 too - https://github.com/Dogway/Avisynth-Scripts/blob/c6a837107afbf2aeffecea182d021862e9c2fc36/MIX%20mods/QTGMC%2B.avsi#L260 .

Also with latest updates of QTGMC the new quality options like RefineMotionAll and trymany added and dual refining stages possible (with blksize->blksize/2->blksize/4 spatial refining) - this makes quality of single QTGMC call closer to the old ideas about gathering details from several calls in M_QTGMC script.

Lucky38
6th May 2026, 14:12
Hello
Do you know how to find for each hdr/dovi source white value to be used in below call?

pre = original.DGHDRtoSDR(mode="pq", white=849, gamma=1/2.4, tm=1.0)

SMDegrain(tr=3, thSAD=280, thSCD2=100, limit=140, limitC=120, thSADC=240, prefilter=pre, contrasharp=false)

WAusJackBauer
15th July 2026, 12:32
Hello all. I have an odd problem.

When I do an x264 encode with SMDegrain, it stalls/freezes and does not recover/continue. My total encode time for the movie I'm trying to encode would be about 9 hours, but the stall happens at random times. Sometimes around 25 minutes into the encode, sometimes it's 3 hours into the encode ect ect.

I am using Avisynth+ 3.7.5 with 64bit plugins and I'm using SMDegrain 4.7.0d. My CPU is an AMD Ryzen 7 5700X3D and I've got 32GB of RAM @3200MHz. So far I've tried:

Deleting and replacing SMDegrain and its dependencies. Resetting my BIOS to default settings. (puts my RAM at lower speeds) Putting my fans at the turbo setting instead of the standard setting. Using less demanding x264 settings.

The only thing that I think has changed since I last did a successful encode with SMDegrain is that I have updated my AMD chipset drivers to version 8.05.04.516 from the official AMD website. After thinking it could be as a result of the new drivers, I tried to downgrade and I was able to downgrade some but it did not allow the GPIO2 and PSP drivers to be downgraded.

Anyone else having this problem or does anyone have any ideas about how to resolve it? At this point I'm thinking of reinstalling Windows from scratch but I don't want to if I don't have to.

TR-9970X
15th July 2026, 12:55
Hello all. I have an odd problem.

When I do an x264 encode with SMDegrain, it stalls/freezes and does not recover/continue. My total encode time for the movie I'm trying to encode would be about 9 hours, but the stall happens at random times. Sometimes around 25 minutes into the encode, sometimes it's 3 hours into the encode ect ect.

I am using Avisynth+ 3.7.5 with 64bit plugins and I'm using SMDegrain 4.7.0d. My CPU is an AMD Ryzen 7 5700X3D. So far I've tried:

Deleting and replacing SMDegrain and its dependencies. Resetting my BIOS to default settings. (puts my RAM at lower speeds) Putting my fans at the turbo setting instead of the standard setting. Using less demanding x264 settings.

The only thing that I think has changed since I did a successful encode with SMDegrain is that I have updated my AMD chipset drivers to version 8.05.04.516. After thinking it could be as a result of the new drivers, I tried to downgrade and I was able to downgrade some but it did not allow the GPIO2 and PSP drivers to be downgraded.

Anyone else having this problem or does anyone have any ideas about how to resolve it? At this point I'm thinking of reinstalling Windows from scratch but I don't want to if I don't have to.

What encoding app do you use ??

Are you using the latest x264 ??

WAusJackBauer
15th July 2026, 13:33
What encoding app do you use ??

Are you using the latest x264 ??

A 64bit version of MeGUI. Version 3222 of x264. I've had no problems with it until I updated my chipset drivers.

I've just noticed that MeGUI doesn't update by itself and my version is a full year old. (6.6.6.6 20250)

I'll update it now and see if it makes any difference.

TR-9970X
15th July 2026, 13:45
A 64bit version of MeGUI. Version 3222 of x264. I've had no problems with it until I updated my chipset drivers.

I've just noticed that MeGUI doesn't update by itself and my version is a full year old. (6.6.6.6 20250)

I'll update it now and see if it makes any difference.

Yes, that might help :)

But there must be some way to completely uninstall or remove the chipset drivers.

WAusJackBauer
15th July 2026, 14:44
Yes, that might help :)

But there must be some way to completely uninstall or remove the chipset drivers.

I managed to fully uninstall the drivers. See how I go with an encode overnight

WAusJackBauer
16th July 2026, 02:36
Nope, still failed after only 26 minutes.

TR-9970X
16th July 2026, 04:02
Nope, still failed after only 26 minutes.

Yep, well, that sux!!!

Are you using MeGUI 6666 ?

Is it doing this with any encode, or just the current job ??

When something you've been using without issue for a long time, then all of a sudden, and possibly thru no fault of your own, it shit's itself.

So I guess the next option is a fresh setup, so ALL the stuff you've got on your current setup, goes away :(

If you have a spare drive, you could disconnect your current OS drive, plug the spare it, and do a basic fresh setup on that, and just install enough to try MeGUI again...if that works, then you know what to do, if it doesn't, then you haven't lost anything, except some time.

I should add that I don't & haven't used MeGUI.

avinewbie
16th July 2026, 08:59
Nope, still failed after only 26 minutes.

Worth testing PSU and RAM if not done so

WAusJackBauer
17th July 2026, 04:44
Yep, well, that sux!!!

Are you using MeGUI 6666 ?

Is it doing this with any encode, or just the current job ??

When something you've been using without issue for a long time, then all of a sudden, and possibly thru no fault of your own, it shit's itself.

So I guess the next option is a fresh setup, so ALL the stuff you've got on your current setup, goes away :(

If you have a spare drive, you could disconnect your current OS drive, plug the spare it, and do a basic fresh setup on that, and just install enough to try MeGUI again...if that works, then you know what to do, if it doesn't, then you haven't lost anything, except some time.

I should add that I don't & haven't used MeGUI.

Yes I've been using MeGUI 6.6.6.6 20250 for about a year but I just updated to 6.6.6.6 20260403.

I tested the exact same video file without SMDegrain and it processes at around 25fps which in theory is more demanding than when I have SMDegrain which processes at about 4.9fps. Without SMDegrain the full encode was successful.

I could try moving the video file to my SSD and see if that helps, but I don't think it will.

Emulgator
17th July 2026, 08:31
The higher SMDegrain settings (tr=6 with BM3D) can be very demanding.
Post your script.

WAusJackBauer
17th July 2026, 15:14
The higher SMDegrain settings (tr=6 with BM3D) can be very demanding.
Post your script.
Ah yes I forgot to do that.

SMDegrain(tr=2, thSAD=400, RefineMotion=true, contrasharp=true, plane=4, prefilter=2, chroma=true)

I previously used prefilter=6 but for the sake of playing it safe I switched to 2.

My x264 settings are:

--level 4.1 --preset placebo --tune film --bitrate 4750 --bframes 3 --ref 4 --vbv-bufsize 78125 --vbv-maxrate 62500 --qcomp 0.6 --rc-lookahead 60 --aq-mode 3 --aq-strength 0.95 --merange 32 --me umh

I know it might seem a bit crazy that I'm using the placebo preset but I adjusted some of the more intensive settings that preset puts on.

Keep in mind I used these same settings about 1.5 - 2 months ago and never had an encode fail.

hello_hello
17th July 2026, 17:12
WAusJackBauer,
Try hunting through MeGUI's log file and looking for the command line it uses for encoding. It'll be something like:

Job command line: "C:\Program Files\MeGUI\tools\x264\x264.exe" [--your x264 settings] --output "D:\video.mkv" "D:\Video.avs"

Copy the command line part and run it in a command prompt. That'll make sure MeGUI isn't part of the equation, although I doubt very much it's the problem.
You might need to have Avisynth+ installed rather than MeGUI's portable version.

You could also try the old SMDegrain to see what happens, although it's called NotSMDegrain now, to distinguish it from Dogway's version.
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/NotSMDegrain.avsi
I can't rmember for sure, but it'll probably need the shared functions script.
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

You could also try updating Avisynth+ to a newer pre-release version as there's been a lot of changes and bug fixes.
https://github.com/pinterf/AviSynthPlus/releases/tag/v3.7.6pre-r4604
There's also a r4626 build but it has an AVX512 issue that may or may not affect you, so try r4604.

real.finder
18th July 2026, 02:43
Hello all. I have an odd problem.

When I do an x264 encode with SMDegrain, it stalls/freezes and does not recover/continue.

https://github.com/pinterf/AVSTP/releases/tag/1.0.4.1 (note the linked issue)

WAusJackBauer
19th July 2026, 04:59
https://github.com/pinterf/AVSTP/releases/tag/1.0.4.1 (note the linked issue)

This is driving me crazy. I put this file in my plugins folder and now I get the following error upon starting a video encode.

Process exits with error: 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819)

I put back the old version of the file and I still get the same error. I don't recall changing anything from about 5 days ago when I was able to at least start encodes. If I remove SMDegrain from my script, it works though.

I think I just have to format Windows and start from scratch. Anyone know what's going on with http://avisynth.nl/

It's been down for a while and a lot of plugin information can be found there.

Emulgator
19th July 2026, 10:38
Plugin collision ? Not matching-to-CPU AVS version ?
I just have to format Windows
is not necessary.
Make a folder "plugins_parked" besides "plugins"
Pull all plugins from AviSynth "plugins" into "plugins_parked".
Then pull them back, one by one and restart scripts, simple at first, then more complex...

Hrm.
https://www.reddit.com/r/AMDHelp/comments/1tllg01/fix_for_problem_installing_latest_80504516/?tl=de

WAusJackBauer
19th July 2026, 15:56
Plugin collision ? Not matching-to-CPU AVS version ?

is not necessary.
Make a folder "plugins_parked" besides "plugins"
Pull all plugins from AviSynth "plugins" into "plugins_parked".
Then pull them back, one by one and restart scripts, simple at first, then more complex...

Hrm.
https://www.reddit.com/r/AMDHelp/comments/1tllg01/fix_for_problem_installing_latest_80504516/?tl=de
I have found a solution to fix the error message I was getting!

I did as you recommended and took out all plugins and only put in what was absolutely necessary for SMDegrain (and my specific settings) and it didn't work. I've already forgotten the order of events, but I got a different error message to the one in my last post. Now I got:

0xC0000409 STATUS_STACK_BUFFER_OVERRUN (-1073740791)

Then I realised, I recently opened up an old game that I've had installed on Steam for ages and for some reason it reinstalled Visual C++. It's possible it corrupted it. So I uninstalled both x86 and x64, installed them again, still got the error message.

Then I thought to myself, I updated my plugins recently, I'll try downgrading some of the main ones and see if that works.

It turns out mvtools-2.7.47-with-depans20260424 has been causing the new issue with the 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819) popping up. Anyone know how to contact the person(s) behind MVTools2 so this can be reported?

I've now downgraded to mvtools-2.7.46-with-depans20240503 and I'll do an encode overnight and see if it's successful with the new avstp.dll version. What a mess!

TR-9970X
19th July 2026, 16:08
I have found a solution to fix the error message I was getting!

I did as you recommended and took out all plugins and only put in what was absolutely necessary for SMDegrain (and my specific settings) and it didn't work. I've already forgotten the order of events, but I got a different error message to the one in my last post. Now I got:

0xC0000409 STATUS_STACK_BUFFER_OVERRUN (-1073740791)

Then I realised, I recently opened up an old game that I've had installed on Steam for ages and for some reason it reinstalled Visual C++. It's possible it corrupted it. So I uninstalled both x86 and x64, installed them again, still got the error message.

Then I thought to myself, I updated my plugins recently, I'll try downgrading some of the main ones and see if that works.

It turns out mvtools-2.7.47-with-depans20260424 has been causing the new issue with the 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819) popping up. Anyone know how to contact the person(s) behind MVTools2 so this can be reported?

I've now downgraded to mvtools-2.7.46-with-depans20240503 and I'll do an encode overnight and see if it's successful with the new avstp.dll version. What a mess!

https://www.google.com/url?sa=i&source=web&rct=j&url=https://github.com/pinterf/mvtools/releases&ved=2ahUKEwj-wr7mgd-VAxVygFYBHYfhLyEQy_kOegoIAggACAAIDhAC&opi=89978449&cd&psig=AOvVaw2Md1hq3RFTauGElTssUqSI&ust=1784559895511000

real.finder
19th July 2026, 16:13
This is driving me crazy. I put this file in my plugins folder and now I get the following error upon starting a video encode.

Process exits with error: 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819)

I put back the old version of the file and I still get the same error. I don't recall changing anything from about 5 days ago when I was able to at least start encodes. If I remove SMDegrain from my script, it works though.

if the new AVSTP not work for you then you can report it to pinterf in the github, also you can remove any AVSTP from your plugins folder and script and it should work fine (maybe it will be a bit slower)

WAusJackBauer
20th July 2026, 02:50
The encode has finally worked with SMDegrain!

I don't know if it was from downgrading MVTools2, downgrading my CPU drivers, updating MeGUI or updating AVSTP but at least it works now!

Thank you all for your help!

Emulgator
20th July 2026, 23:25
Could be a good find with the mvtools-2.7.47-with-depans20260424.
It could well be that pinterf's toolchain introduce some incompatibilities for the bleeding edge versions.

You may PM pinterf and tell your findings, he is the authority if it comes to finding and mending such bugs.

(To be working steady on different hardwares I decided to stay away from the bleeding edge AviSynth+ here too,
just keeping some version behind just 3.7.5 for now waiting for jpsdr or qyot27 builds)

WAusJackBauer
11th August 2026, 23:08
if the new AVSTP not work for you then you can report it to pinterf in the github, also you can remove any AVSTP from your plugins folder and script and it should work fine (maybe it will be a bit slower)

I don't fully understand Github but I left a comment here a while back and it hasn't been answered.

https://github.com/pinterf/mvtools/commit/cdf04a5edae37b8891bb46e07593be8c3cca0868

Is there a better way to get in contact with people who upload to Github?

Emulgator
11th August 2026, 23:17
Ferenc (pinterf) is on vacation mode ATM, IIRC. Have patience.

DTL
14th August 2026, 11:02
Is there a better way to get in contact with people who upload to Github?

Better is to create shortest possible script to reproduce the issue if possible with internal sources like BlankClip or ColorBars and create new issue in the plugin repository - https://github.com/pinterf/mvtools/issues