VideoHelp Forum
+ Reply to Thread
Page 3 of 4
FirstFirst 1 2 3 4 LastLast
Results 61 to 90 of 98
Thread
  1. @ 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.
    Quote Quote  
  2. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    As davexnet explained, your code (after the first return(…)) was not executed
    Quote Quote  
  3. 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.
    Quote Quote  
  4. 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.
    Quote Quote  
  5. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by hello_hello View Post
    I often use QTGMC as a denoiser. TemporalDegrain2 is based on QTGMC's denoising (or it at least started out that way).
    No. The original TemporalDegrain is a Dideč's idea to remove "dancing" grain as present in "300" movie.

    Then in TemporalDegrain2 ErazorTT update the motion vectors estimation using the (excellent) modules as in QTGMC.
    Quote Quote  
  6. 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)
    This is the script with the one number change & it works with no error.
    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.
    Quote Quote  
  7. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    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).
    Quote Quote  
  8. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by hello_hello View Post
    LibavSource3
    av_sync, layout; seek_mode, dr, dominance <-- Where is that from?
    Quote Quote  
  9. Originally Posted by lollo View Post
    Originally Posted by hello_hello View Post
    I often use QTGMC as a denoiser. TemporalDegrain2 is based on QTGMC's denoising (or it at least started out that way).
    No. The original TemporalDegrain is a Dideč's idea to remove "dancing" grain as present in "300" movie.

    Then in TemporalDegrain2 ErazorTT update the motion vectors estimation using the (excellent) modules as in QTGMC.
    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.
    Quote Quote  
  10. Originally Posted by cholla View Post
    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)
    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
    Quote Quote  
  11. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by rgr View Post
    QTGMC uses FFT3DFilter and dfttest as denoisers (as TemporalDegrain2)
    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                                  #
    ####################################################################################
    Originally Posted by hello_hello View Post
    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.
    Correct.
    Quote Quote  
  12. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by lollo View Post
    Originally Posted by rgr View Post
    QTGMC uses FFT3DFilter and dfttest as denoisers (as TemporalDegrain2)
    These are optional and additional post processing features, not TemporalDegrain2 core.
    Yes.
    I should have written that in postprocessing TD2 offers the same as QTGMC -- fft3dfilter/dfttest. (However, dftest is also a temporal denoiser)
    Quote Quote  
  13. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by rgr View Post
    Originally Posted by lollo View Post
    Originally Posted by rgr View Post
    QTGMC uses FFT3DFilter and dfttest as denoisers (as TemporalDegrain2)
    These are optional and additional post processing features, not TemporalDegrain2 core.
    Yes.
    I should have written that in postprocessing TD2 offers the same as QTGMC -- fft3dfilter/dfttest. (However, dftest is also a temporal denoiser)
    Not really. TemporalDegrain2 does its own denoise/degrain. If wished, an additional denoise step can be performed in postprocessing by TD2 itself without calling supplementary code (but with the disadvantage of not having full control of the parameters, as already said)
    Quote Quote  
  14. Also not too bad, but much faster than TD2, something like
    Code:
    ffms2("Horse.m2ts",atrack=1)
    MCDegrainSharp(frames=2).KNLMeansCL(h=1.8)
    Image Attached Files
    Quote Quote  
  15. @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)
    This is the error:
    Avisynth open failure:
    KNLMeansCL: fatal error!
    (oclUtilsGetPlaformDeviceDs: OCL_UTLS_UNKNOWN_ERROR)
    (C:\Program Files\AviSynth+\plugins+\1Test.avs, line 2)
    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.
    I can convert it but I have not done that yet.

    I have a question about:
    Originally Posted by rgr View Post
    You'll get better results by denoising before resize.
    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.
    Quote Quote  
  16. Originally Posted by cholla View Post
    @Sharc,
    I posted this before that my 32-bit W7 can not do KNLMeansCL.
    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.
    Attached the MCDegrainSharp script. You can use it without the subsequent KNLMeansCL. Not as sophisticated as TD2 but it may serve the purpose.

    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.
    Attached the version which your TV should play.
    Image Attached Files
    Quote Quote  
  17. Originally Posted by hello_hello View Post
    QTGMC(InputType=1, EzDenoise=2.0) is somewhere to start.
    So far the only QTGMC that I tested & it worked was the
    Typical AVISynth+QTGMC script
    from Alwyn's tutorial.
    This is the code:
    Code:
     SetFilterMTMode ("QTGMC", 2)
    AviSource("amarec.avi")
    ConvertToYV12(interlaced=true)
    AssumeTFF()
    QTGMC(preset="Fast", EdiThreads=8)
    Prefetch(2)
    I will test the code you posted but I have not got to it yet.

    Originally Posted by rgr View Post
    You can skip hqdn3d -- it works, but it's mediocre.
    The setting Sharc posted using hqdn3d with nr= in ffmpeg worked fairly well but the peoples' features were a bit soft.

    Originally Posted by rgr View Post
    You'll get better results by denoising before resize.
    I doubt that would hurt anything but you are the first I have seen post it in this topic.

    Originally Posted by rgr View Post
    And degrainTR=0 gives poor denoising.
    My OS errors is I use a higher setting.

    Originally Posted by rgr View Post
    Use postFFT=3 (dfttest is better).
    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)
    This is the information I have from Selur's website:
    (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=3 is neo_dfttest
    postFFT=13 is dfttest
    Quote Quote  
  18. @ 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.
    Quote Quote  
  19. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by cholla View Post
    Originally Posted by rgr View Post
    And degrainTR=0 gives poor denoising.
    My OS errors is I use a higher setting.
    Avisynth is an oldie. I don't think anyone would bother with it anymore.
    Quote Quote  
  20. Originally Posted by cholla View Post
    @ 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.
    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.
    Quote Quote  
  21. Originally Posted by rgr View Post
    Avisynth is an oldie. I don't think anyone would bother with it anymore.
    Wow. I am speachless.
    Quote Quote  
  22. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Sharc View Post
    Originally Posted by rgr View Post
    Avisynth is an oldie. I don't think anyone would bother with it anymore.
    Wow. I am speachless.
    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
    Quote Quote  
  23. Using AviSynth is fine. But all the development is now with 64 bit AviSynth+. You have to give up on the old AviSynth.
    Quote Quote  
  24. Originally Posted by rgr View Post
    Avisynth is an oldie. I don't think anyone would bother with it anymore.
    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.

    Originally Posted by Sharc View Post
    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.
    I don't like wax doll faces of people for example.
    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.

    Originally Posted by davexnet View Post
    The main reason I haven't bothered yet - my PC is old, no dedicated GPU
    Same here that & I like Windows 7.

    Originally Posted by jagabo View Post
    Using AviSynth is fine. But all the development is now with 64 bit AviSynth+. You have to give up on the old AviSynth.
    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.
    Quote Quote  
  25. Originally Posted by cholla View Post
    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 .
    No you can't. Not if you're going to denoise that Horse clip. You absolutely must use a motion compensated 3D noise reduction filter. Otherwise you're just wasting your time and destroying your video.
    Quote Quote  
  26. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by cholla View Post
    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 .
    No you can't. Not if you're going to denoise that Horse clip. You absolutely must use a motion compensated 3D noise reduction filter. Otherwise you're just wasting your time and destroying your video.
    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)
    Quote Quote  
  27. Originally Posted by davexnet View Post
    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
    Yes, that's one of the OP's main problems. He can monitor memory usage with Task Manager to verify this.

    Originally Posted by davexnet View Post
    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)
    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.
    Quote Quote  
  28. Originally Posted by jagabo View Post
    Originally Posted by cholla View Post
    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 .
    No you can't. Not if you're going to denoise that Horse clip. You absolutely must use a motion compensated 3D noise reduction filter. Otherwise you're just wasting your time and destroying your video.
    If MCDegrainSharp works for @cholla's W7/32 system he may get away with it. Attached an interleaved comparison.
    Image Attached Files
    Quote Quote  
  29. @ 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:
    Originally Posted by jagabo View Post
    With film grain (and other random frame-to-frame noise) you need a motion compensated temporal filter to reduce heavy noise without obliterating detail.
    Originally Posted by jagabo View Post
    You absolutely must use a motion compensated 3D noise reduction filter.
    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.
    Quote Quote  
  30. Originally Posted by cholla View Post
    I searched MCDegrainSharp & it is supposed to be temporal & spatial.
    Does it do what jagabo is posting ?
    Yes. The MC in the name stands for Motion Compensated. If you look at the script it uses MVTools for the motion compensation.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!