View Single Post
Old 7th September 2015, 13:30   #253  |  Link
YAFU
Registered User
 
Join Date: Aug 2015
Posts: 40
Hello. I've been doing some experiments.
Apparently what mainly produces banding is this line at end in the original script:
Code:
ret = core.fft3dfilter.FFT3DFilter(ret,sigma=2.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.7)
http://www.pasteall.org/60466

I have understood that this line is to reduce fine grain noise, right?
I found a good way for those banding are not very noticeable. Basically, create a lossless video with the original script, but without that line.

Then apply the script to the resulting video, but in superF1 replacing with the values of that line that was removed:
Code:
import vapoursynth as vs
core = vs.get_core()

##
##ffmpeg with ffms2
core.std.LoadPlugin('/usr/lib/x86_64-linux-gnu/libffms2.so.3')
ret = core.ffms2.Source(source='/PATH_TO_VIDEO_HERE/encoded.mkv')
##
input = core.fmtc.bitdepth (clip=ret, bits=8)
 
superF1 = core.fft3dfilter.FFT3DFilter(input,sigma=2.5, bt=5, bw=32, bh=32, ow=16, oh=16, sharpen=0.7)
superF2 = core.mv.Super(superF1, pel=2, sharp=1)
super = core.mv.Super(input)
mvbw3 = core.mv.Analyse(superF2, isb=True, delta=3, overlap=4)
mvbw2 = core.mv.Analyse(superF2, isb=True, delta=2, overlap=4)
mvbw = core.mv.Analyse(superF2, isb=True, delta=1, overlap=4)
mvfw = core.mv.Analyse(superF2, isb=False, delta=1, overlap=4)
mvfw2 = core.mv.Analyse(superF2, isb=False, delta=2, overlap=4)
mvfw3 = core.mv.Analyse(superF2, isb=False, delta=3, overlap=4)
 
ret = core.mv.Degrain3(clip=input, super=super, mvbw=mvbw, mvfw=mvfw, mvbw2=mvbw2, mvfw2=mvfw2, mvbw3=mvbw3, mvfw3=mvfw3, thsad=400)
 
ret.set_output()
Then the noise reduction is similar to original script, but with less banding.
I guess that I've done it can be done from a single script without the intermediate step by creating these first video, but I have no idea about how to create this script. How could I do it?

The noise reduction in the kind of noise that renders from Blender 3D generate using this method/script is amazing.
It is a pity that Fft3d not support 16 bits because the result could be even better. Do you know if that filter is still under development and whether it plans to support 16-bit?

Last edited by YAFU; 7th September 2015 at 13:38.
YAFU is offline   Reply With Quote