Log in

View Full Version : Please suggest a script that will Auto Fix Black & White Levels


VideoFanatic
7th October 2011, 17:04
I have a 1 hour 20 minute 720 x 480 interlaced wrestling video. The video was from a 15 year old VHS tape transferred to DVD. I then demuxed the DVD into an MPEG2 file. I tried MCTemporalDenoise with this script:

McTemporalDenoise(settings="medium", interlaced=true)

However that takes over 24 hours! If I try and output my video without that script it takes about 2 hours.

Is there any way I can just use specific settings of McTemporalDenoise to auto fix the black and white levels or is there another script or plugin that can achieve this?

It must take less than 4 hours.

Mounir
7th October 2011, 18:51
fft3dfilter is not good enough ? with the gpu version you could denoise great and fast imo.

for the black/white levels no idea, i prefer a manual method

VideoFanatic
7th October 2011, 18:54
I couldn't get fft3dfilter to work. Could you please suggest a script for it?

Mounir
7th October 2011, 21:25
Something like that:

fft3dfilter(sigma=2.0,sigma2=4.0,sigma3=7.0,sigma4=8, bt=1, bw=16, bh=16, ow=8, oh=8,plane=1, sharpen=0.0,interlaced=false,dehalo=0.0) # Chroma U
fft3dfilter(sigma=2.0,sigma2=1.5,sigma3=4.0,sigma4=4.0, bt=1, bw=16, bh=16, ow=8, oh=8,plane=2, sharpen=0.0,interlaced=false,dehalo=0.0) # Chroma V
fft3dgpu(bt=3,sigma=1.5,sigma2=1.4,sigma3=2.0,sigma4=9.0,bw=32,bh=32,ow=16,oh=16,sharpen=0,plane=0,mode=1,precision=2,interlaced=false,oldfft=false) # Luma
It's best to filter U,V,Y separately imo

Reuf Toc
7th October 2011, 21:31
Are you sure you need such a strong denoiser (talking about MCTemporalDenoise) ?
Plus, it doesn't have for (main) purpose to correct the black and white level as far as I know.

For level correction, you can try AutoLevels (http://www.thebattles.net/video/autolevels.html).

VideoFanatic
7th October 2011, 21:37
Something like that:

fft3dfilter(sigma=2.0,sigma2=4.0,sigma3=7.0,sigma4=8, bt=1, bw=16, bh=16, ow=8, oh=8,plane=1, sharpen=0.0,interlaced=false,dehalo=0.0) # Chroma U
fft3dfilter(sigma=2.0,sigma2=1.5,sigma3=4.0,sigma4=4.0, bt=1, bw=16, bh=16, ow=8, oh=8,plane=2, sharpen=0.0,interlaced=false,dehalo=0.0) # Chroma V
fft3dgpu(bt=3,sigma=1.5,sigma2=1.4,sigma3=2.0,sigma4=9.0,bw=32,bh=32,ow=16,oh=16,sharpen=0,plane=0,mode=1,precision=2,interlaced=false,oldfft=false) # Luma
It's best to filter U,V,Y separately imo

Thanks, I'll give that a try. How much faster is the GPU version? Will the code you suggested work for that version?

I noticed that you set interlaced to false but my footage is interlaced. Is false correct and why?

VideoFanatic
7th October 2011, 21:56
Are you sure you need such a strong denoiser (talking about MCTemporalDenoise) ?
Plus, it doesn't have for (main) purpose to correct the black and white level as far as I know.

For level correction, you can try AutoLevels (http://www.thebattles.net/video/autolevels.html).

Yes I need a strong denoiser. McTemporalDenoise does fix the black levels as I've tried it.

Have you tried Autolevels yourself. Does it always work on all your videos?

I need something that I can use on all my videos whether they need fixing or not. I don't have the time to manually check which videos need the colours fixed.

I'm not sure but I think I've looked at comments about that Autolovels script as well as others and they seem to say that they don't always work, that's why I was asking about using McTemporalDenoise just for black level correction as I think that always works.

Asmodian
8th October 2011, 00:16
I think it is safe to say that nothing always works.

VideoFanatic
8th October 2011, 15:52
holygamer, see my thread for DenoiseMF for test results. A single replacement of FFT3DFilter to FFT3dGPU is 8x faster on my i7 and video card (5fps and 45 fps). But in a complex script with many filters it will be decreased.

So is that just for denoising or can I just use specific settings to fix black levels. Do I use all that code? It's a bit much to take in!

Mounir
8th October 2011, 17:12
for autolevels (white) there is coloryuv see Here (http://avisynth.org/mediawiki/ColorYUV) but it's not that good as far as i know

Motenai Yoda
11th October 2011, 22:20
You seem to know the right settings to get specific things done quickly. I was wondering if you might also know the answer to my question in this thread about black levels?
[Yoda MODE On]
Limited, dynamic in yv12 colorspace is: To 235 for luma y plane from 16, and to 240 for chroma u e v planes from 16.
On playing, stretched to 0/255, dynamic is.
If you filter expanding the dynamic, anything it will be clipped and you solve not, except losing highlight and shadow details.
On decoder, player and vga driver options instead check.
[Yoda MODE Off]