Log in

View Full Version : One field interlaced source darker than other


yup
4th March 2015, 07:08
Hi all!

Source is analog capture from VHS. During shooting do not use additional lighting. Problem related with recording head (may be).
Link for source (Ut codec)
https://www.dropbox.com/s/lo768ecaeq2eppl/samplevhs.avi?dl=0
See at priest black wear.
Any suggestions for repairing welcome.

yup.

yup
11th March 2015, 09:44
Hi all!
Help old Reduceflicker.
SetMemoryMax(3072)
SetmtMode(3,8)
AVISource("chapter13.avi")#.Trim(10000,11000)
SetmtMode(2,8)
source=AssumeTFF()
source=source.ConvertToYV16(interlaced=true)
edi=source.nnedi3ocl(field=-2, nns=2, qual=1).ConvertToYUY2(interlaced=false).Interleaved2Planar()
super=edi.MSuper()
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
bc1 = edi.MCompensate(super, backward_vec1, thSAD=1000)
fc1 = edi.MCompensate(super, forward_vec1, thSAD=1000)
bc2 = edi.MCompensate(super, backward_vec2, thSAD=1000)
Interleave(bc2,bc1,edi,fc1)
ReduceFlicker(strength=1, aggressive=false)
SelectEvery(4,2).Planar2InterLeaved().ConvertToYV16(interlaced=false)
ext=last.Crop(16,12,-16,-12)
SetMTMode(1)
AutoAdjust(last,external_clip=ext,auto_gain=true,gain_mode=1,auto_balance=true)
SetMTMode(2)
ConvertToYUY2(interlaced=false)
SeparateFields().SelectEvery(4,0,3).Weave()


Please advice I am right organize motion compensated filtering? For mode=1 Reduceflicker need 2 previous frames and one next.
I am using mode=1 because one use 4 frames (equal quantity even and odd fields) for averaging.
I find strange thing related with dct parameter, depend from version MVTools at dct=5 filtered the same like source. With dct=0, 1 or 6 filter work.

yup.

yup
12th March 2015, 10:17
Hi All!
Problem was related with low thSAD increasing up to 1600 and all mode dct work.
Corrected script
SetMemoryMax(3072)
SetmtMode(3,8)
AVISource("chapter13.avi")#.Trim(10000,11000)
SetmtMode(2,8)
source=AssumeTFF()
source=source.ConvertToYV16(interlaced=true)
edi=source.nnedi3ocl(field=-2, nns=2, qual=1).ConvertToYUY2(interlaced=false).Interleaved2Planar()
super=edi.MSuper()
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=16, overlap=8, chroma=false, dct=5, search=5, badsad=1500)
bc1 = edi.MCompensate(super, backward_vec1, thSAD=16000)
fc1 = edi.MCompensate(super, forward_vec1, thSAD=16000)
bc2 = edi.MCompensate(super, backward_vec2, thSAD=16000)
Interleave(bc2,bc1,edi,fc1)
ReduceFlicker(strength=1, aggressive=false)
SelectEvery(4,2).Planar2InterLeaved().ConvertToYV16(interlaced=false)
ext=last.Crop(16,12,-16,-12)
SetMTMode(1)
AutoAdjust(last,external_clip=ext,auto_gain=true,gain_mode=1,auto_balance=true)
SetMTMode(2)
ConvertToYUY2(interlaced=false)
SeparateFields().SelectEvery(4,0,3).Weave()
Comparing source and filtered I see big difference at edge (bluring). Need add additional masking and merge from source for repairing.
yup.

ChiDragon
13th March 2015, 00:28
I must be blind. I viewed the sample with Bob and I'm not seeing flickering in the video or histogram, besides noise.

scharfis_brain
13th March 2015, 10:58
I can't see any flicker in the source.

yup
14th March 2015, 10:41
ChiDragon and scharfis_brain!
:thanks: for attention.
May be I am wrong identify source problem.
At top source lighting condition better than at bottom and this part have more noise. When I use QTGMC on source clip and see result at 50 Hz I note difference between even and odd frames on static area. When I use before QTGMC script from post #2 result more watchable.
Question I am right organize motion compensated filtering?
yup.

bxyhxyh
14th March 2015, 11:08
Well, I only see dotcrawl-ish noise and rainbow. QTGMC reduces dotcrawl, but it can't get rid of strong ones.
Maybe try dot crawl removers?

yup
15th March 2015, 18:22
Hi All!

One more question, can I use planar=true (hack for planar source in Avisynth 2.58) for MSuper, Mcompensate and Reduceflicker?
I am using last Set build.
I try add this parameter by step, first to MSuper, Mcompensate (no problem) and second to Reduceflicker and get crash.
Or I am go back to YV12?

yup.

LemMotlow
17th March 2015, 17:56
Your sample is low on detail but very high in oversharpening artifacts and grain. I don't see dark or light fields, nor do I see any brightness flicker. But I see dot crawl, oversharpening halos, and sawtoothed, ragged edges. The tape is not tracking properly, or is damaged. There is a lot of noise, so you can expect cleaning it up will reduce detail. You need a better VCR or have your current VCR serviced.

I didn't use any of the methods listed:

Santiag()
ConvertToYV12(interlaced=true)
HQDering()
Crop(12,12,-16,-12)
ColoryUV(off_y=-4)
SmoothTweak(contrast=1.15,saturation=1.1)
SmoothLevels(16,0.95,255,14,255,chroma=200,limiter=0,tvrange=true,smooth=200,dither=100,protect=6)

AssumeTFF().SeparateFields()
ChromaShift(L=-2)
DeHalo_Alpha()
source=last
super = source.MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=8, overlap=4, dct=0)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=8, overlap=4, dct=0)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=8, overlap=4, dct=0)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=8, overlap=4, dct=0)
MDegrain2(source,super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)

TemporalSoften(3,3,8,15,2)
LimitedSharpenFaster(strength=25,edgemode=2)
GradFun2DBmod().AddGrainC(1.0,1.5)
weave()
AddBorders(6,12,6,12)
return last

yup_samplevhs.m2v https://www.mediafire.com/?p3ou11bq1ricbw5

Others might have different ideas. But with decent tracking and without oversharpening, one could use much less filtering and wouldn't have to clean up so much garbage and twitter in the bottom 1/3 of the frames.