@ lollo,
I was surprised when the code with too much processing seemed to work.
I thought it would have crashed.
I'm still new to using avisynth script & I put a return in the wrong place.
That's just part of learning.
I got an error trying KNLMeansC & I will try to produce the error later.
Right now I'm testing with just TemporalDegrain2 & I will see where that goes.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 61 to 90 of 98
Thread
-
-
As davexnet explained, your code (after the first return(…)) was not executed
-
I often use QTGMC as a denoiser. TemporalDegrain2 is based on QTGMC's denoising (or it at least started out that way).
To use QTGMC as a denoiser for progressive content you have to run it in progressive mode.
QTGMC(InputType=1, EzDenoise=2.0) is somewhere to start.
There's speed presets for the denoising much like the speed presets for de-interlacing if that's easier than fiddling with individual settings.
The effectiveness of a denoiser is often dependent on the type of video and/or type of noise, in ways I've long ago given up trying to understand, but more often than not I'll compare several denoising filters and use whichever one works best for that particular video.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I wouldn't bother with all the loadplugin lines in your script. Just stick all the plugins and avsi functions in the plugins folder and let them auto-load.
Using Avisynth plus 64 bit, I put the dlls in the plugins64+ folder and all the functions in the plugins64 folder, just to make it a little easier to find one of them if I need to.
Currently there's 130 dlls in plugins64+ and 211 scripts in plugins64. Only once has auto-loading caused a problem for me. I think at the time one particular dll was misbehaving, but that was so long ago I can't remember any details.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
-
I got avusynth to work on the video.
The denoising was not as much as I wanted.
If I could have used some higher settings in TemporalDeGrain2 It would have done more denoising.
I could not go over degrainTR=0 even 1 got an error message
Cannot start video compression:
An unknown error occurred (may be corrupt data),
(error code -100)
Code:a=LWLibavAudioSource("C:\Users\User\Desktop\Final\Horse.m2ts") v=LWLibavVideoSource("C:\Users\user\Desktop\Final\Horse.m2ts") v_crop=v.Crop(58,0,-58,-0) v_crop_resized=v_crop.Spline36Resize(1920,1080) v_1=v_crop_resized.TemporalDeGrain2(degrainTR=0,grainLevel=1,postFFT=11,postSigma=2,fftThreads=2) v_1=audioDub(a,v_1) return(v_1)
@ lollo,
I'm sure you will see the similarity to the script you posied in #42.
I did this without the load plugins but I'm sure it would have worked with them.
@ hello_hello,
I probably will give QTGMC a try.
I'm also going to use what Sharc did & try hqdn3d & ffmpeg nr= again.
I deleted the video where that was done. I want to compare the results.Last edited by cholla; 3rd Sep 2024 at 17:12.
-
QTGMC uses FFT3DFilter and dfttest as denoisers (as TemporalDegrain2)
You can skip hqdn3d -- it works, but it's mediocre.
You'll get better results by denoising before resize.
And degrainTR=0 gives poor denoising.
Use postFFT=3 (dfttest is better). -
-
I'm not wanting to be argumentative over something trivial, however.....
"TemporalDegrain2 is based on QTGMC's denoising....."
I was under the impression TemporalDegrain2 was virtually a new function with not much more than the name in common with the original version, but maybe that's not completely accurate.Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
With TR=0 (temporal radius) TemporalDegrain2() is simply a 2D noise reduction filter (not a motion compensated 3D filter). With film grain (and other random frame-to-frame noise) you need a motion compensated temporal filter to reduce heavy noise without obliterating detail.
Last edited by jagabo; 5th Sep 2024 at 11:43. Reason: fixed quoting
-
These are optional and additional post processing features, not TemporalDegrain2 core.
Code:#################################################################################### # Temporal Degrain v2.6.7 Updated by ErazorTT # # # # Function v1.23 by Sagekilla, idea + original script created by Didee # # # # Works as a simple temporal degraining function that'll remove # # MOST or even ALL grain and noise from video sources, # # including dancing grain, like the grain found on 300. # # Also note, the parameters don't need to be tweaked much. # # # # Required plugins: # # neo_fft3d: https://github.com/HomeOfAviSynthPlusEvolution/neo_FFT3D/releases # # MaskTools2: https://github.com/pinterf/masktools/releases # # MVtools2 (mt_*): https://github.com/pinterf/mvtools/releases # # rgTools (RemoveGrain,Repair): https://github.com/pinterf/RgTools/releases # # # # Optional plugins: # # neo_dfttest: https://github.com/HomeOfAviSynthPlusEvolution/neo_DFTTest/releases # # FFT3DGPU: https://github.com/pinterf/FFT3dGPU/releases # # KNLMeansCL: https://github.com/pinterf/KNLMeansCL/releases # # BM3D: https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7 # # + https://github.com/Dogway/Avisynth-Scripts/blob/master/ExTools.avsi # # + https://github.com/Dogway/Avisynth-Scripts/blob/master/ResizersPack.avsi # # + https://github.com/Dogway/Avisynth-Scripts/blob/master/TransformsPack.avsi # # HQdn3D: https://github.com/Asd-g/AviSynth-hqdn3d/releases # # old FFT3DFilter: https://github.com/pinterf/fft3dfilter/releases # # old dfttest: https://github.com/pinterf/dfttest # ####################################################################################
-
-
-
Also not too bad, but much faster than TD2, something like
Code:ffms2("Horse.m2ts",atrack=1) MCDegrainSharp(frames=2).KNLMeansCL(h=1.8)
-
@Sharc,
A lot to respond to this day & I will start with your post.
"The Horse Soldier" is the first video I have ever attempted to denoise.
I have worked with the DVD version & the earlier blu ray version.
I posted this before that my 32-bit W7 can not do KNLMeansCL.
I tested again to make sure with the code you posted in #74 except since I did not have MCDegrainSharp.
I left it out.
This is the even simpler script I used:
Code:ffms2("C:\Users\users\Desktop\Final\Horse.m2ts",atrack=1) KNLMeansCL(h=1.8)
Avisynth open failure:
KNLMeansCL: fatal error!
(oclUtilsGetPlaformDeviceDs: OCL_UTLS_UNKNOWN_ERROR)
(C:\Program Files\AviSynth+\plugins+\1Test.avs, line 2)
Unfortunately my BD player or TV will not play High@L5 but will play up to High@L4.1.
I can convert it but I have not done that yet.
I have a question about:
Is this the way it should be done ?
The information I had was the bars should be removed because there was no need to denoise them.
But I did not see anything about denoising before resizing before rgr's post. -
Apparently I missed this, sorry.
I tested again to make sure with the code you posted in #74 except since I did not have MCDegrainSharp.
I left it out.
The video you posted "horseMC.mp4" looked denoised fairly well on my PC.
Unfortunately my BD player or TV will not play High@L5 but will play up to High@L4.1. -
So far the only QTGMC that I tested & it worked was the
Typical AVISynth+QTGMC script
This is the code:
Code:SetFilterMTMode ("QTGMC", 2) AviSource("amarec.avi") ConvertToYV12(interlaced=true) AssumeTFF() QTGMC(preset="Fast", EdiThreads=8) Prefetch(2)
The setting Sharc posted using hqdn3d with nr= in ffmpeg worked fairly well but the peoples' features were a bit soft.
I doubt that would hurt anything but you are the first I have seen post it in this topic.
My OS errors is I use a higher setting.
When I place "postFFT=3" in the TemporalDegrain2 line of code I get this error:
Avisynth open failure:
System exception - Illegal Instruction
(C:/Program Files/AviSynth+/plugins+/TemporalDegrain2.avsi, line 424)
(C:\Program Files\AviSynth+\plugins+\4example4.avs, line 5)
(postFFT == 0) ? (postDither > 0 ? in.ConvertBits(16) : in) : \
(postFFT == 1) ? neo_fft3d ( postDither > 0 ? in.ConvertBits(16) : in, y=LumaP?3:2, u=ChromaP?3:2, v=ChromaP?3:2, sigma=postSigma, bt=postTD, ncpu=fftThreads, bw=postBlkSz, bh=postBlkSz ) : \
(postFFT == 11)? FFT3DFilter( postDither > 0 ? in.ConvertBits(16) : in, plane=postPlane, sigma=postSigma, bt=postTD, ncpu=fftThreads, bw=postBlkSz, bh=postBlkSz ) : \
(postFFT == 2) ? FFT3DGPU( postDither > 0 ? in.ConvertBits(16) : in, plane=postPlane, sigma=postSigma*2/3, bt=postTD, precision=2, mode=1, bw=postBlkSz, bh=postBlkSz ) : \
(postFFT == 3) ? neo_dfttest( postDither > 0 ? in.ConvertBits(16) : in, y=LumaP?3:2, u=ChromaP?3:2, v=ChromaP?3:2, sigma=postSigma*4, tbsize=postTD, dither=dftDither, threads=fftThreads, sbsize=postBlkSz, sosize=postBlkSz*9/12, slocation=dftsfile) : \
(postFFT == 13)? dfttest( postDither > 0 ? in.ConvertBits(16) : in, Y=LumaP, U=ChromaP, V=ChromaP, sigma=postSigma*4, tbsize=postTD, threads=fftThreads, dither=dftDither, sbsize=postBlkSz, sosize=postBlkSz*9/12, sfile=dftsfile ) : \
(postFFT == 4) ? DT_KNLMeansCL( postDither > 0 ? in.ConvertBits(16) : in, a=2, d=postTR, h=postSigma, Luma = LumaP, Chroma = ChromaP, device_type="GPU", device_id=devId) : \
(postFFT == 5) ? DT_BM3D( postDither > 0 ? in.ConvertBits(16) : in, radius=postTR, sigma=postSigma, chroma=ChromaP, CUDA=cuda, device_id=devId ) : \
(postFFT == -1)? HQDn3D( postDither > 0 ? in.ConvertBits(16) : in, 0,0,4,1, u=ChromaP?3:2, v=ChromaP?3:2) : NOP()
postFFT=13 is dfttest -
@ Sharc,
The MCDegrainSharp worked OK by itself.
I will add some of the other denoisers to it but it removed a lot of the noise.
The hqdn3d with nr= for example.
The settngs lowered.
If that is too soft or seems to do only a little I will try something else. -
-
Glad that MCDegrainSharp worked for you. You can increase the noise reduction by setting MCDegrainSharp(frames=3). If you use -nr of x264 I wouldn't go higher than ~200.
Personally I am hesitant with too much denoising only because of the noisy sky scenes at the beginning. I don't like wax doll faces of people for example. -
yeah I was surprised at that too. I haven't got into vapoursynth at all,
I guess if I search out the "getting started" topics I could give it a go. The main reason
I haven't bothered yet - my PC is old, no dedicated GPU -
To be correct I'm using avisynth plus now.Unless you mean avisynth plus.
There are people like me that are just learning to use avisynth plus.
When you did the ffmpeg code for hqdn3d with nr= for denoising the values were 15 for all 4 of the hqdn3d settings & nr=1000.
Later you posted that was an extreme use.
I probably would have halved it but no problem trying less like nr=200.
Same here that & I like Windows 7.
For many plugins avisynth + works with 32-bit Windows 7.
Just not every plugin & lower settings for some plugins.
I can live with that for my use & needs .
Which are usually not that much. -
-
Anything in mind jagabo? I see MCDegrainSHarp was mentioned, that's new to me.
I occasionally run the 32 bit system myself, but less and less these days. I found that all but the simplest scripts
run out of memory quickly, seems like a limit of the addressing scheme of the 32 bit environment, Vs. any
consequence of the amount of RAM installed (just a guess) -
Yes, that's one of the OP's main problems. He can monitor memory usage with Task Manager to verify this.
By default, 32 bit Windows only allows 2GB for any one program. If you switch on the large memory setting it allows up to about 3 to 3.5 GB depending on what hardware is installed. -
-
@ Sharc,
As far as I'm concerned MCDegrainSharp does a good job on the Horse video.
There is some noise in the horse running scene sky but very little & almost no noise in the sky behind the men.
I'm still playing with some filters but overall I believe MCDegrainSharp does the job.
Jagabo posted these:
I searched MCDegrainSharp & it is supposed to be temporal & spatial.
Does it do what jagabo is posting ?
I found this one but I can't figure out how to use it:
https://forum.doom9.org/showthread.php?t=139766
The "interleaved comparison" horseMC_test.mp4 " plays in a pausing slow motion on my PC & BD player.
Probably because of the pausing but the sky was noisier also. -
Similar Threads
-
the strange virtualdub2 errors in 32 and/or 64 bit versions.
By roeselpi in forum EditingReplies: 6Last Post: 11th May 2023, 06:18 -
Using Avisynth+ with Virtualdub2
By stymie in forum Video ConversionReplies: 7Last Post: 5th Feb 2021, 18:17 -
How to install the nnedi3 plugin into Virtualdub2 and Avisynth?
By Guernsey in forum Newbie / General discussionsReplies: 7Last Post: 25th Apr 2020, 04:27 -
Add exteneral encoder errors on VirtualDub2
By hintlou in forum Newbie / General discussionsReplies: 2Last Post: 29th Feb 2020, 05:41 -
Avisynth+ not refreshing in VirtualDub2
By Chief Mouse in forum Video ConversionReplies: 2Last Post: 6th Sep 2019, 16:18