Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
8th July 2020, 22:19 | #1 | Link |
Registered User
Join Date: Jul 2020
Posts: 28
|
Looking for BM3D denoise for virtualdub2
Hello. I am looking for a BM3D plugin or a way to use it on virtualdub2 at deepcolor (higher than 8-bit).
Can you help me. Is there a way to denoise with BM3D method and preview the results on vdub2 ? Thank you. |
8th July 2020, 22:28 | #2 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Vapoursynth has a BM3D (32 bit depth) plugin and you can open vpy (vapoursynth scripts) in vdub2.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
8th July 2020, 23:39 | #3 | Link |
Registered User
Join Date: Jul 2020
Posts: 28
|
Thank you so much. Can I preview the result in virtualdub2 with this method ?
If you could also point me toward a tutorial on using vpy scripts on virtualdub it would be helpful. Thank you. EDIT: I downloaded the FATPACK, I will try to learn it. |
9th July 2020, 00:42 | #4 | Link | |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Quote:
You can also use the interleave and stack vertical/horizontal functionality of Vapoursynth to make real-time comparisons. |
|
9th July 2020, 08:35 | #5 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Simple example
Code:
import vapoursynth as vs import mvsfunc as mvf core = vs.core #core.max_cache_size = 8000 # uncomment this and give VS as much ram as possible, 8000 = 8gb clip = core.lsmas.LWLibavSource(source=r"E:\folder\xyz.mp4") clip = mvf.BM3D(clip, sigma=5.0, profile1="fast", radius1=1) # radius > 1 => temporal denoising (V-BM3D (spatial-temporal denoising) clip.set_output() (If you move or rename the folder it won't work anymore, then you you'd need to re-run the bat file) https://github.com/HomeOfVapourSynth...vsfunc.py#L700
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
9th July 2020, 17:55 | #6 | Link |
Registered User
Join Date: Jul 2020
Posts: 28
|
Ok thanks a lot guys. So it creates a variable, I should not move the folder.
I just ran the "enable_vfw_support.bat" from the "extras" folder. Now I create a text file copy the code below and call it "BM3D.vpy" Code:
import vapoursynth as vs import mvsfunc as mvf core = vs.core #core.max_cache_size = 8000 clip = core.lsmas.LWLibavSource(source=r"C:\videos\cfhdstock10bit422.avi") clip = mvf.BM3D(clip, sigma=5.0, profile1="fast", radius1=1) # radius > 1 => temporal denoising (V-BM3D (spatial-temporal denoising) clip.set_output() It should be 32bit processing ? In the github document it said default is 1 (=32bit). EDIT : it works perfectly, thank you so much all of you. The only problem (but it's the normal behaviour) it's that I do have 2 preview in virtualdub2, but both are the Vapoursynth output video. Is there a way to have a before (left) and after vapoursynth (right) preview in virtualdub2 ? Thank you guys I am happy with the results of vapoursynth ! What is the best denoiser you recommend ? Last edited by vigan1; 9th July 2020 at 22:29. |
11th July 2020, 11:56 | #7 | Link | ||
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Quote:
clip = mvf.Depth(clip, depth=32) Quote:
Code:
clip = core.lsmas.LWLibavSource(source=r"C:\videos\cfhdstock10bit422.avi") source = clip clip = mvf.Depth(clip, depth=32) clip = mvf.BM3D(clip, sigma=5.0, profile1="fast", radius1=1) clip= core.std.StackHorizontal([clip.text.Text("Denoised"), mvf.Depth(source, depth=32).text.Text("Source")]) # or use this instead for comparison # clip=core.std.Interleave([clip.text.Text("Denoised"), mvf.Depth(source, depth=32).text.Text("Source")]) clip.set_output() There is no best denoiser, however there are some good (and faster) denoisers such as: - MCTemporalDenoise - SMDegrain - knlmeans Code:
import havsfunc as haf #see doc https://github.com/HomeOfVapourSynthEvolution/havsfunc/blob/master/havsfunc.py clip = haf.MCTemporalDenoise(clip, settings="medium")
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
||
11th July 2020, 20:36 | #8 | Link |
Registered User
Join Date: Jul 2020
Posts: 28
|
Hi, when I run your script in virtualdub2, I get an error :
Avisynth open failure: Python exception: name 'core' is not defined EDIT : I uderstand my mistake, yet when I use this code: Code:
import vapoursynth as vs import mvsfunc as mvf core = vs.core #core.max_cache_size = 8000 clip = core.lsmas.LWLibavSource(source=r"C:\videos\cfhdstock10bit422.avi") source = clip clip = mvf.Depth(clip, depth=32) clip = mvf.BM3D(clip, sigma=5.0, profile1="fast", radius1=1) clip= core.std.StackHorizontal([clip.text.Text("Denoised"), mvf.Depth(source, depth=32).text.Text("Source")]) # or use this instead for comparison # clip=core.std.Interleave([clip.text.Text("Denoised"), mvf.Depth(source, depth=32).text.Text("Source")]) clip.set_output() "VFW module doesn't support YUV422PS32 output" Maybe Virtualdub2 is 16bit max ? Thank you. EDIT 2: It worked perfectly on Vapoursynth preview, I will use this for the time being. thank you. Last edited by vigan1; 12th July 2020 at 16:07. |
Thread Tools | Search this Thread |
Display Modes | |
|
|