VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    I have a few-minute-long video recorded with a static camera. Noisy, but I was happy with Neat Video's denoising.
    However, I have seen better results on such videos (where 99% of the image is still) using TemporalDegrain2 (I can't find the thread at the moment).
    So I used:
    Code:
    ffms2("joined.mp4")
    assumefps(30)
    convertbits(10)
    converttoyuv444(matrix="PC.709")
    levels(10,1,900,0,1020,coring=false)
    TemporalDegrain2(degrainTR=4,grainLevel=3,postFFT=3,postSigma=1)
    And I get a "stunning" 0.01fps for 4k footage -- that's several hours for 200 frames! For comparison, Neat Video = 0.30fps.
    Is there any way to speed this up? Am I doing something wrong?
    Quote Quote  
  2. You can try adding prefetch(x) , where x is some number >1 for multithreading. But it will still be slow.

    Neat video should be much faster with a decent GPU

    Is 99% of the image still in the same section of the frame with no change ? If so, crop to the region of interest and process that with the denoiser, composite with a still frame
    Quote Quote  
  3. a. depending on your setup LWLibavVideoSoure with enabled hardware decoding might speed up the decoding of the source
    b. using mulithreading (see: http://avisynth.nl/index.php/SetFilterMTMode; set SetFilterMTMode at the start and Prefetch at the end of the script)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by poisondeathray View Post
    You can try adding prefetch(x) , where x is some number >1 for multithreading. But it will still be slow.

    Neat video should be much faster with a decent GPU

    Is 99% of the image still in the same section of the frame with no change ? If so, crop to the region of interest and process that with the denoiser, composite with a still frame
    Prefetch(4) gave a boost from 0.01fps to 0.05fps Well, still very slow...
    Quote Quote  
  5. Originally Posted by rgr View Post
    Prefetch(4) gave a boost from 0.01fps to 0.05fps Well, still very slow...
    Hey, its a 5x improvement!! That's actually pretty darn good.

    1. Have you tried it with the default settings?

    2. Have you read all the comments in the AVSI file? For instance, it says, "currently just postFFT=0, 1 and 4 are supported for high bit depths." You are using postFFT=3. Not sure what that might do. I only skimmed the AVSI just now, and did verify that the default for DCT in MVTools2 (the one plugin I know very well) is 0. If it gets set to anything other than that, speed can go down to about 10% of what it is at DCT=0.

    3. Try different Prefetch numbers. Try setting it to about 1/3 the number of cores you have. I often get negative speed results when Prefetch > 1/2 number of cores.

    4. What resolution are you feeding it? Try adding a resize to half resolution in each direction as the first line in the script, and then run the script for a minute. See what sort of speed you get. I'm not suggesting that you permanently want to degrade your video, but am merely trying to help pinpoint what factors might affect speed. I have found MVTools2 to be very unforgiving when you feed it really high resolution video.

    What version of MVTool2 are you using? The older the version, the more likely you are to have speed issues.

    [edit]I suggest searching the long TemporalDegrain2 thread at Doom9.org. Someone there posted a much faster version called "Temporaldegrain2_fast". Look for that and see if it is faster, but without compromising the quality.

    https://forum.doom9.org/showthread.php?p=1982594#post1982594
    Last edited by johnmeyer; 22nd Nov 2023 at 18:40. Reason: forgot to add "DCT" in one sentence
    Quote Quote  
  6. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    What computer are you using as in specs?
    I think,therefore i am a hamster.
    Quote Quote  
  7. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Ryzen 4650G (6 cores). Video is 4K.
    Quote Quote  
  8. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by johnmeyer View Post
    [edit]I suggest searching the long TemporalDegrain2 thread at Doom9.org. Someone there posted a much faster version called "Temporaldegrain2_fast". Look for that and see if it is faster, but without compromising the quality.

    https://forum.doom9.org/showthread.php?p=1982594#post1982594
    "RadT = Default(RadT, 1) # Temporal Radius of frame analysis. Value 1 or 2"

    This script seems to have major limitations where I want it to be very powerful.
    Quote Quote  
  9. It is complex script with several different denoisers.

    At least vsTTempSmooth got update in performance using AVX2 in latest builds in Asd-g github in 202x years - recommended to use lastest version.

    Also MAnalyse using dct > 0 (from fftw library) may run significantly slower in comparison with spatial modes (with dct=0).

    If you use Win10 or later and GPU with MPEG-encoder hardware chip with DirectX12 Motion Estimation capable driver you can try mvtools of post-2.7.45 builds (typically blocksize of 8x8 only run stable). https://forum.doom9.org/showthread.php?t=183517 . See examples of hardware accelerated scripts in that thread with optSearchOption=5 or 6. It should support 4K resolution.

    And for possibly much better performance with mvtools only denoise much simple scripts may be tested like EZdenoise.
    Quote Quote  
  10. Originally Posted by rgr View Post
    Prefetch(4) gave a boost from 0.01fps to 0.05fps Well, still very slow...
    Why 4? You have a 6 core, 12 thread CPU. Try 6 to 12. Maybe even more.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I think even a Cray supercomputer would meet its match running Temporaldegrain...
    Quote Quote  
  12. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by rgr View Post
    Prefetch(4) gave a boost from 0.01fps to 0.05fps Well, still very slow...
    Why 4? You have a 6 core, 12 thread CPU. Try 6 to 12. Maybe even more.
    Yes, but then it was consuming all my RAM. In the end, only Prefetch(3) didn't kill the computer. (4k)
    Quote Quote  
  13. Originally Posted by rgr View Post
    I have a few-minute-long video recorded with a static camera. Noisy, but I was happy with Neat Video's denoising.
    However, I have seen better results on such videos (where 99% of the image is still) using TemporalDegrain2 (I can't find the thread at the moment).
    So I used:
    Code:
    ffms2("joined.mp4")
    assumefps(30)
    convertbits(10)
    converttoyuv444(matrix="PC.709")
    levels(10,1,900,0,1020,coring=false)
    TemporalDegrain2(degrainTR=4,grainLevel=3,postFFT=3,postSigma=1)
    And I get a "stunning" 0.01fps for 4k footage -- that's several hours for 200 frames! For comparison, Neat Video = 0.30fps.
    Is there any way to speed this up? Am I doing something wrong?
    Fair warning, I am going to say a bunch of "stupid" things.

    Have you read the guide related to this script:

    http://avisynth.nl/index.php/TemporalDegrain2

    Under Suggested settings for removing the grain, sorted by increasing source grain it lists the following settings for the most grainy sources:

    degrainTR=2,grainLevel=3,postFFT=1,postSigma=value between 0 and 2

    Now compare to your settings:

    degrainTR=4,grainLevel=3,postFFT=3,postSigma=1

    I would also try to use FFT3D directly and eliminate everything else.

    http://avisynth.nl/index.php/FFT3DFilter

    I have always felt that people filter their stuff way too much. To me filters are like spices for food, a bit of salt, some pepper, maybe oregano or something a pinch of something else, and that's it.

    But many people seem to want to add everything in the spice rack and it becomes overpowering.

    Keep it as simple as you can.

    The other thing is you mentioned that when you change the settings your ram usage goes way up. This is a sign that if you intend to do this type of work you need more ram.
    Quote Quote  
  14. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by sophisticles View Post
    The other thing is you mentioned that when you change the settings your ram usage goes way up. This is a sign that if you intend to do this type of work you need more ram.
    After a few attempts with the settings, I stayed with Neat Video. I achieved better denoising using TD2, but at the cost of losing details, especially with moving parts (and I only used degrainTR, the rest at 0).
    Last edited by rgr; 20th Jun 2024 at 17:27.
    Quote Quote  



Similar Threads

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