VideoHelp Forum
+ Reply to Thread
Page 2 of 4
FirstFirst 1 2 3 4 LastLast
Results 31 to 60 of 98
Thread
  1. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Thanks Jagabo, I'll start a new topic to stop derailing Cholla's topic here.
    Quote Quote  
  2. @lollo,
    The script worked for me with an .avi file.
    It did not work with a .vob file.
    video=AviSource won't open a .vob file.

    This is the funny thing : Using your script with an.avi file fixed the error when I tried the .avs I had for the .vob file.
    I do not know why but no more error with using this code:
    Code:
    v=ffms2("HORSE(01).vob")
    a=LWLibavAudioSource("HORSE(01).vob") 
    AudioDub(v,a)
    TemporalDegrain2(degrainTR=2,grainLevel=2)
    I have not tested yet with the crop & resize code hello_hello posted.
    Or the denoised settings in your script.
    I wanted to try a simple script first then get more complex.
    Quote Quote  
  3. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    I am glad it works. For VOBs do not use AviSource. Now that you have a working environment, upgrade one thing at the time. Maybe start with TD2. Then the dependencies. Then AVS itself if you prefere the “+” and the 64-bit version
    Quote Quote  
  4. @ lollo.
    Or someone else if they know.
    When I add this line of script:
    Code:
    TemporalDegrain2(degrainTR=0,grainLevel=0,postFFT=3,postSigma=1)
    I get this error:
    Avisynth open failure:
    Script error: the named argument "grainLevel" to TemporalDeGrain2 had
    the wrong type
    If I leave out "grainLevel=0" The .avs will load in VDub2.
    The grainLevel options are 0,1,2. All give the same error.

    I changed the line in the script lollo gave me as well as the source filter so it can use a .vob file.
    Quote Quote  
  5. TemporalDegrain2.avsi v 2.6.6 indicates "grainLevel is now interger range 0-2" implying that it was something other than an integer before. So you must have an older version (I have 2.2 archived) where it was a boolian (true or false). You can open TemporalDegrain.avsi in Notepad and see the type of the argument. Or just update to a newer version -- though I don't know if it will run on 32 bit AviSynth.
    Quote Quote  
  6. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    As jagabo already explained, in the TD2 version I added to the package, the variable grainLevel is boolen, while is integer in latest versions:

    Code:
    function TemporalDegrain2 ( clip input, int "degrainTR", int "degrainPlane", bool "grainLevel", ...
    Once you upgrade you'll be able to specify the wished integer value for grainLevel, but as first get familiar with all parameters and options of the in use version.
    Quote Quote  
  7. @ Jagabo,
    You are correct I needed to move to the v2.6.6.
    Even then there are options a 32-bit OS won't or can't do.
    Also the GPU makes a difference in some settings.
    postFFT 2, 4 and 5 are GPU based versions.
    Only 0,1&3 are setting for this. My 32-bit will only work with 0 & 1.
    #3 always gets an error about neo-dfttest.
    I have the .dll it just doesn't work with my OS.

    grainLevel is either 0 or 1 for my OS.
    2 freezes VDub2 & 3 gets an "Out of Memory" error.

    Temporal Degrain v2.6.6 Updated by ErazorTT
    These are in the v.266 options:
    # 3. compare the output on this noisy* patch of your movie with different settings of grainLevel (0 to 3)
    grainLevel (2), if input noise level is relatively low set this to 0, if its unusually high you might need to increase it to 3.

    postFFT (0), if you want to remove absolutely all remaining noise suggestion is to use 1 (ff3dfilter) or for slightly higher quality at the expense of much worse speed 3 (dfttest). 2, 4 and 5 are GPU based versions.

    This is in the changelog for this version:
    Feb 07, 2021: v2.3.0
    grainLevel is now interger range 0-2

    @ lollo,
    You have been a big help to me with the script for LoadDll.
    I did change the source filters so it would do .vob & .m2ts.
    I tries to get it to crop & scale but no luck with that.
    Could be I was trying to degrain at the same time.
    Quote Quote  
  8. @Alwyn
    This is the Jewel.mpg as I PMed about.
    Keep in mind this was recorded from OTA TV to a DVR then dubbed to a DVD.
    Then ripped in DVD format.
    Then converted to .mpg.
    It is also a live performance.
    Image Attached Files
    Quote Quote  
  9. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by cholla View Post
    @ lollo,
    You have been a big help to me with the script for LoadDll.
    I did change the source filters so it would do .vob & .m2ts.
    I tries to get it to crop & scale but no luck with that.
    Could be I was trying to degrain at the same time.
    To validate your enviroment, for cropping start using basic AviSynth Crop(left, top, -right, -bottom) function, and for resizing start using basic Spline36Resize() function.

    Then upgrade to hello_hello scripts if wished.

    Concerning postFFT, it is rarely required. If you need additional denoise, I reccomend KNLMeansCL (a spatial denoiser). You can enable it with postFFT = 4, or call it in stand alone after TD2.
    Quote Quote  
  10. Originally Posted by lollo View Post
    To validate your enviroment, for cropping start using basic AviSynth Crop(left, top, -right, -bottom) function, and for resizing start using basic Spline36Resize() function.
    I get this error in VDub2:
    Avisynth open failure:
    Crop: Destination width is 0 or less.
    This is the script:
    Code:
    a=FFAudioSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex") 
    v=FFVideoSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex")
    Crop(0,42,-0,-46)
    Spline36Resize(720,388)
    # open your file here
    
    # plugins directory
    plugins_dir=".\extFilters\"
    
    	# TemporalDegrain2
    Import(plugins_dir + "TemporalDegrain2.avsi")
    	# RgTools
    loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll")
    	# MaskTools2
    loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")
    	# MVTools
    loadPlugin(plugins_dir + "mvtools-2.7.41-with-depans20200430\x86\mvtools2.dll")
    	# FFT3DFilter
    loadPlugin(plugins_dir + "FFT3dFilter-v2.6\x86\fft3dfilter.dll")
                  #neo_FFT3D_r11
    loadPlugin(plugins_dir + "neo_FFT3D_r11\x86\neo-fft3d.dll")
                  #DFTTest
    loadPlugin(plugins_dir + "dfttest-v1.9.7\x86\dfttest.dll")
    	#neo_DFTTest
    loadPlugin(plugins_dir + "neo_DFTTest-r8\x86\neo-dfttest.dll")
                 # FFTW
    loadDll(plugins_dir + "fftw-3.3.5-dll32\libfftw3f-3.dll")
                 # KNLMeansCL
    loadDll(plugins_dir + "KNLMeansCL_1.1.1e_v20201112\x86\KNLMeansCL.dll")
                         # LoadDll  
    loadPlugin(plugins_dir + "LoadDll\LoadDll.dll")
          
    # denoising
    denoised=v.TemporalDeGrain2(degrainTR=0,postFFT=1,postSigma=1,grainLevel=3,fftThreads=2,postDither=2)
    
    #return(denoised)
    
    stackhorizontal(\
    subtitle(v,"v",size=20,align=2),\
    subtitle(denoised,"denoised",size=20,align=2)\ 
    )
    
    a=FFAudioSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob")
    v=FFVideoSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob")
    AudioDub(a,v)

    Originally Posted by lollo View Post
    Concerning postFFT, it is rarely required. If you need additional denoise, I reccomend KNLMeansCL (a spatial denoiser). You can enable it with postFFT = 4, or call it in stand alone after TD2.
    I added KNLMeansCL to the Load.dll in the avs.
    I did not try to add any settings for it but the postFFT = 4.
    I also removed:Crop(0,42,-0,-46) Spline36Resize(720,388)for this test so it would not stop VDub2 before it got to this error.
    This is the error:
    Avisynth open failure:
    Script error: There is no function named 'KNLMeansCL'
    (.\extFilters\TemporalDegrain2.avsi, line 513)
    (.\extFilters\TemporalDegrain2.avsi, line 450)
    (.\extFilters\TemporalDegrain2.avsi, line 418)
    (C:\Program Files\AviSynth+\plugins+\2example3.avs
    I believe this is a 32-bit problem also unless I need to put the KNLMeansCL.dll in another location also.
    Using the LoadDll.dll I should not need to do that.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Looks like knlmeansCL should be loaded with
    Code:
    Loadplugin(...)
    and for the crop error, include this before the crop(...)
    Code:
    audiodub(v,a)
    Quote Quote  
  12. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    davexnet already highligthed some problems with the script. In general, if you assign a video to a variable, better to stay taht way until the end, and LoadDLL is specific to load DLLs not being AviSynth filters, like libfftw3f-3.dll; AviSynth plugins should be loaded with Loadplugin() and AviSynth functions with Import().

    So your script should resemble to:

    Code:
    a=FFAudioSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex") 
    v=FFVideoSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex")
    
    ...
    
    # cropping
    v_crop=v.Crop(0,42,-0,-46)
    
    # resizing
    v_crop_resized=v_crop.Spline36Resize(720,388)
    
    # denoising
    denoised=v_crop_resized.TemporalDeGrain2(...)
    
    # adding audio from source
    v_restored=audioDub(a,denoised)
    
    return(v_restored)
    Quote Quote  
  13. Or you can just use the implied "last" for a simple linear script like that:

    Code:
    AudioDub(FFVideoSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex"), \ 
             FFAudioSource("C:\Users\USERS\Desktop\4KDL\HORSE(01).vob",cachefile="C:\Users\USERS\Desktop\4KDL\HORSE(01).ffindex"))
    Crop(0,42,-0,-46)
    Spline36Resize(720,388)
    TemporalDeGrain2(...)
    Since there's no explicit "return" at the end the "last" video is returned.
    Quote Quote  
  14. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Yes, for a simple script like this the standard approach not using variables is easier
    Quote Quote  
  15. Even simpler perhaps:
    Code:
    ffms2("HORSE(01).vob",atrack=1)
    Crop(0,42,-0,-46)
    Spline36Resize(720,388)
    TemporalDegrain2(....)
    Note that the current version of ffms2 ignores the pulldown flags and returns the film frames.
    (Assuming that the soft-telecine pattern is not broken).
    Last edited by Sharc; 28th Aug 2024 at 13:39.
    Quote Quote  
  16. Hi All,
    I have been working with the various scripts posted trying to learn.
    I have not got it all down yet.
    The trying & testing is helping me learn more.

    I would like to ask are there settings or options for the KNLMeansCL that I should add to make it work?
    Or does it work with TemporalDeGrain2 & doesn't need any added script ?
    Quote Quote  
  17. KNLMeansCL requires that you have a compatible CPU or GPU with OpenCL installed.

    https://github.com/Khanattila/KNLMeansCL/wiki/Requirements

    Always show your script and the error message it gives you.
    Quote Quote  
  18. Originally Posted by jagabo View Post
    KNLMeansCL requires that you have a compatible CPU or GPU with Open Cl installed.

    https://github.com/Khanattila/KNLMeansCL/wiki/Requirements

    Always show your script and the error message it gives you.
    I used GPU=Z & my GPUs are within the specs.
    I used CPU-Z a my Intel CPU checks within specs.
    I do not know if my AMD CPU is above "AMD 15h (Bulldozer) Family CPU/APU or greater " or not.
    Both PCs are not giving any errors when KNLMeansCL is loaded with "LoadDll" or just in the avisynth plus plugins folder.
    GPU-Z does not put the check mark in Open Cl box but it is in my Windows\System 32 folder.

    I just wanted to know if I need to try some settings like I do with TemporalDeGrain2.
    Or does KNLMeansCL just works well enough with its' default settings?
    Quote Quote  
  19. KNLMeansCL() should work fine with no arguments if you have all the requirements.
    Quote Quote  
  20. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by cholla View Post
    I would like to ask are there settings or options for the KNLMeansCL that I should add to make it work?
    Or does it work with TemporalDeGrain2 & doesn't need any added script ?
    If you use KNLMeansCL in stand-alone mode you can access to all its parameters:

    Code:
    KNLMeansCL (clip, int "d", int "a", int "s", float "h", string "channels", int "wmode", float "wref", clip "rclip", string "device_type", int "device_id", int "ocl_x", int "ocl_y", int "ocl_r", bool "stacked", bool "info", int "mode_9_to_15bits")
    while used embedded in TemporalDegrain2 you have less control:

    a setting with
    Code:
    TemporalDegrain2(postFFT=4, ...)
    calls
    Code:
    DT_KNLMeansCL( postDither > 0 ? in.ConvertBits(16) : in, a=2, d=postTR, h=postSigma, Luma = LumaP, Chroma = ChromaP, device_type="GPU", device_id=devId)
    Quote Quote  
  21. I will just use the KNLMeansCL default for now.
    Quote Quote  
  22. I've been away for a week. Did I miss anything?
    Quote Quote  
  23. I decided to remove this post as the information in it was bad & incorrect.
    I did not want someone to use it since it did not work correctly.
    Last edited by cholla; 3rd Sep 2024 at 16:23. Reason: incorrect script information
    Quote Quote  
  24. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    The script returned right here, the rest of the code had no effect
    Code:
    Crop(58,0,-58,-0)
    resize=Spline36Resize(1920,1080)
    
    return(resize) #  <<<<<<<<<<<<<<
    
    QTGMC( Preset="Slower", NoiseProcess=1, NoiseRestore=0.0, Sigma=4.0, EdiMode="NEEDI3", EdiMaxD=16, TR1=1, TR0=2, TR2=3  )
    Quote Quote  
  25. @ davexnet,
    Should I take out the "return(resize)" Or put it in later.
    Did it use the QTGMC code?
    Quote Quote  
  26. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by cholla View Post
    @ davexnet,

    Did it use the QTGMC code?
    No.
    Just comment it out (Place a # at the start of the line).
    ALso comment out the "return" at the end of the script

    Now the video will process much slower and the noise reduction probably be overkill.

    Does it need qtgmc?
    Quote Quote  
  27. @ davexnet,
    For the
    Does it need qtgmc?
    I don't know I was trying to throw everything at the video to see if the noise or grain would be gone.

    I knew I could comment it out but i removed it instead.
    VDub2 now gets this error when I open the .avs file:
    Image Attached Thumbnails Click image for larger version

Name:	VDUB2 error.jpg
Views:	6
Size:	69.3 KB
ID:	81929  

    Quote Quote  
  28. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Comment out the qtgmc and see if the script will at least run.
    Are you using 32 bit vdub2?

    Doesn't Tempraldegrain2 by itself remove the grain?
    Quote Quote  
  29. Originally Posted by davexnet View Post
    Comment out the qtgmc and see if the script will at least run.
    I already commented out all but the denoiser I'm trying.
    I didn't realize the reason the graining remained was the script was doing the return of resize only.
    So I need to play around with the various denoizers again & see what works.

    Originally Posted by davexnet View Post
    Are you using 32 bit vdub2?
    Yes

    Originally Posted by davexnet View Post
    Doesn't Tempraldegrain2 by itself remove the grain?
    I don't know at this time.
    Quote Quote  
  30. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Cholla, too much processing. It is useless and probably your PC cannot handle it.

    I suspect your source is telecine or progressive, so QTGMC is not needed at all.

    TemporalDegrain2 is probably enough to remove the grain/noise.

    Just if needed, add KNLmeans.

    Code:
    AudioDub(LWlibavAudioSource("C:\Users\Users\Desktop\Final\Horse.m2ts"), \ 
                   LWLibavVideoSource("C:\Users\Users\Desktop\Final\Horse.m2ts"))
    
    # plugins directory
    plugins_dir=".\extFilters\"
    
    	# TemporalDegrain2
    Import(plugins_dir + "TemporalDegrain2.avsi")
    	# RgTools
    loadPlugin(plugins_dir + "RgTools-v1.0\x86\RgTools.dll")
    	# MaskTools2
    loadPlugin(plugins_dir + "masktools2-v2.2.23\x86\masktools2.dll")
    	# MVTools
    loadPlugin(plugins_dir + "mvtools-2.7.41-with-depans20200430\x86\mvtools2.dll")
    	# FFT3DFilter
    loadPlugin(plugins_dir + "FFT3dFilter-v2.6\x86\fft3dfilter.dll")
            #neo_FFT3D_r11
    loadPlugin(plugins_dir + "neo_FFT3D_r11\x86\neo-fft3d.dll")
            #DFTTest
    loadPlugin(plugins_dir + "dfttest-v1.9.7\x86\dfttest.dll")
    	#neo_DFTTest
    loadPlugin(plugins_dir + "neo_DFTTest-r8\x86\neo-dfttest.dll")
           # LoadDll  
    loadPlugin(plugins_dir + "LoadDll\LoadDll.dll")
    	# FFTW
    loadDll(plugins_dir + "fftw-3.3.5-dll32\libfftw3f-3.dll")
     	# KNLMeansCL
    loadPlugin(plugins_dir + "KNLMeansCL_1.1.1e_v20201112\x86\KNLMeansCL.dll")
    
    Crop(58,0,-58,-0)
    
    Spline36Resize(1920,1080)
    
    TemporalDegrain2()
    
    # enable if needed
    #KNLMeansCL()
    Quote Quote  



Similar Threads

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