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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th July 2020, 22:19   #1  |  Link
vigan1
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.
vigan1 is offline   Reply With Quote
Old 8th July 2020, 22:28   #2  |  Link
ChaosKing
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
ChaosKing is online now   Reply With Quote
Old 8th July 2020, 23:39   #3  |  Link
vigan1
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.
vigan1 is offline   Reply With Quote
Old 9th July 2020, 00:42   #4  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by vigan1 View Post
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.
You can use the Vapoursynth Editor, which is included in the fatpack, very easy to see the results.

You can also use the interleave and stack vertical/horizontal functionality of Vapoursynth to make real-time comparisons.
Cary Knoop is offline   Reply With Quote
Old 9th July 2020, 08:35   #5  |  Link
ChaosKing
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 want the portable fatpack to work with vdub, run enable_vfw_support.bat
(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
ChaosKing is online now   Reply With Quote
Old 9th July 2020, 17:55   #6  |  Link
vigan1
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()
Now I have to run the vpy script in Virtualdub2 from "Open Video file".
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.
vigan1 is offline   Reply With Quote
Old 11th July 2020, 11:56   #7  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by vigan1 View Post

Now I have to run the vpy script in Virtualdub2 from "Open Video file".
It should be 32bit processing ? In the github document it said default is 1 (=32bit).
use
clip = mvf.Depth(clip, depth=32)
Quote:
Originally Posted by vigan1 View Post
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 ?
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
ChaosKing is online now   Reply With Quote
Old 11th July 2020, 20:36   #8  |  Link
vigan1
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()
I have this error :
"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.
vigan1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.