Loading with avisynth

questions about practical use of Neat Video, examples of use
Post Reply
jpsdr
Posts: 219
Joined: Mon Aug 11, 2008 7:33 am

Loading with avisynth

Post by jpsdr »

Is it possible to use differents radius preset filters importing with avisynth ?

I have a video has two very different noise sequences, with the second stronger than the first. The first preset has a temporal radius of 3, the second preset has a temporal radius of 4.

If you're wondering what kind of video can have this, Ray Harryhausen's movies. Special effect scenes have a stronger noise than normal scenes. Difference is so noticeable that you see that you'll have a special in the scene you're watching even before the special effect orcurs... :D

Doing something like that :

Code: Select all

video=whatever source filter (DGIndex,AVISource, etc...)

LoadVirtualDubPlugin("NeatVideo5.vdf", "NeatVideo5", preroll)

a1=trim(video,0,99).NeatVideo5("SampleProfile1.dnp", "SamplePreset1.nfp")
a2=trim(video,100,199).NeatVideo5("SampleProfile2.dnp", "SamplePreset2.nfp")
a3=trim(video,200,299).NeatVideo5("SampleProfile1.dnp", "SamplePreset1.nfp")
a4=trim(video,300,399).NeatVideo5("SampleProfile2.dnp", "SamplePreset2.nfp")
etc...
a1+a2+a3+a4+.....
In that case, what value should i use for preroll ?
NVTeam
Posts: 2560
Joined: Thu Sep 01, 2005 4:12 pm
Contact:

Re: Loading with avisynth

Post by NVTeam »

The last time we checked preroll in Avisynth it didn't work correctly and had no influence on the results. I recommend to try different values of that parameter to see whether it produces any difference at all. If it works, then perhaps something like that could be used:

1. select the maximum required preroll (4 in this case);
2. when you apply the filter to a segment requiring a temporal filter radius of 3, use a bit larger segment, like trim(video,199,299)


Another approach would be to use the weaker filtration over the whole video first (or excluding the special segments) and then additionally clean the segments requiring special treatment.

Alternatively, the Mix with Original option could probably help if you used the largest radius everywhere but compensated its stronger filtration in less noisy segments by using presets with the Mix with Original option enabled.

Hope this helps,
Vlad
jpsdr
Posts: 219
Joined: Mon Aug 11, 2008 7:33 am

Re: Loading with avisynth

Post by jpsdr »

Ok, thanks for your tips. I didn't think of the option of doing 2 passes excluding, because it will require twice the space for storing the intermediate result, like :

Code: Select all

video=whatever source filter (DGIndex,AVISource, etc...) from original source

LoadVirtualDubPlugin("NeatVideo5.vdf", "NeatVideo5", 4)

a1=trim(video,0,99)
a2=trim(video,100,199).NeatVideo5("SampleProfile2.dnp", "SamplePreset2.nfp")
a3=trim(video,200,299)
a4=trim(video,300,399).NeatVideo5("SampleProfile2.dnp", "SamplePreset2.nfp")
etc...
a1+a2+a3+a4+.....
and after

Code: Select all

video=AVISource("Intermediate.avi")

LoadVirtualDubPlugin("NeatVideo5.vdf", "NeatVideo5", 3)

a1=trim(video,0,99).NeatVideo5("SampleProfile1.dnp", "SamplePreset1.nfp")
a2=trim(video,100,199)
a3=trim(video,200,299).NeatVideo5("SampleProfile1.dnp", "SamplePreset1.nfp")
a4=trim(video,300,399)
etc...
a1+a2+a3+a4+.....
Anyway, thanks for these informations, i'll see what i'll do when the time comes.
lansing
Posts: 64
Joined: Sat Apr 21, 2012 6:52 am

Re: Loading with avisynth

Post by lansing »

Just an idea, we can move the “preroll” declaration to the function call instead of at the initial load of the plugin. This way we can have just one plugin load and then we can call it as many times as we want with different settings.

Code: Select all

LoadVirtualDubPlugin("NeatVideo5.vdf", "NeatVideo5", 4) # dummy placeholder for preroll 

clip.NeatVideo5(sample.dnp, sample.nfp, tr=2)
clip2.NeatVideo5(sample.dnp, sample.nfp, tr=4)
Or even better, implicitly included the temporal radius in the preset file so we don’t even need to worry about it.
Post Reply