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. |
17th July 2012, 17:59 | #1 | Link |
Registered User
Join Date: Jun 2012
Posts: 5
|
how to fix random change of color
the color changes in the video randomly.
once it the color scheme is reddish and a little greenish in the very next frame. eg. screen frame #16984 frame #16985 this change hasn't maintained any numerical series...its completely random. is there any way to fix this any how? i've cut the video and giving a sample clip here... http://www.mediafire.com/?x6nxz6u6fkf65gy now please answer these stupid questions, if u can (i nothing but a newbie...:-P 1. this video is highly deinterlaced, i've tried QTGMC(Preset="Very Slow", SourceMatch=2, Lossless=2, EZKeepGrain=0.5, Sharpness=0.1, Sbb=0) , and has got decent result but it is taking very long time to rip.....is there any better way to deinterlace it? and what are the other problems of this video i should worry about? and the suitable options to tweak it...... thanx in advance |
24th July 2012, 12:40 | #5 | Link | ||
Registered User
Join Date: Mar 2004
Posts: 118
|
You can use MDegrainN from cretindesalpes modified MVTools2 version that's included in his Dither package to average the chroma
over a long sequence of frames. http://forum.doom9.org/showthread.ph...59#post1386559 For removing spots and scratches I would use Didées single frame spot remover (adapted with SelectEvery second frame so that it catches spots that are static over up to four frames) to produce a search clip for MDegrain noise removal on the luma. I recommend using the older 0.5 version of medianblur for the spot remover because the newer versions cause some encoders to crash. Medianblur 0.5 is only available here: http://www.avisynth.org/warpenterpri...l_20041029.zip For the significant spots, scratches and anomalies that remain, you could scroll through the clip in virtualdub and note the bad frame numbers and replace them with interpolated replacement frames using MugFunkys Morph function. The flicker can be greatly reduced with the Flux7framesT function used on the search clip for the MDegrain luma noise removal pass. I had to process your clip in three passes because I have only an old single core processor with no hyper-threading. You may be able to use fewer if you use multi-threading. Here's the script I used on your sample clip. The line of hash-marks indicate the separate passes. Scripts for the functions used follow. Code:
LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\All\mvtools2.6.0.5.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\All\medianblur0.5.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\RemoveGrain1.0\RemoveGrainSSE2.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\RemoveGrain1.0\RepairSSE2.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\MaskTools v2.0a48\mt_masktools-25.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\All\FFT3Dfilter.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\All\NNedi3.dll") LoadPlugin("C:\Program Files\AviSynth 2.56a\plugins\All\VerticalCleanerSSE2.dll") import("C:\Program Files\AviSynth 2.56a\plugins\All\QTGMC-3.32.avsi") import("C:\Program Files\AviSynth 2.56a\plugins\All\Morph.avsi") import("C:\Program Files\AviSynth 2.56a\plugins\All\Flux7framesT.avsi") import("C:\Program Files\AviSynth 2.56a\plugins\All\ContraSharpening.avsi") import("C:\Program Files\AviSynth 2.56a\plugins\All\LimitedSharpenFaster.avsi") mpeg2source("VTS_01_1.d2v",idct=7, info=3) QTGMC(Preset="Very Slow", SourceMatch=2, Lossless=2, EZKeepGrain=0.5, Sharpness =0.1, Sbb=0) SelectEven() ######################################################################## Morph(50,54) Morph(239,241) Morph(265,267) Morph(272,275) Morph(330,334) Morph(338,341) Morph(370,373) Morph(794,798) x=last SelectEvery(2,0)+SelectEvery(2,1) # remove single-frame spots o=last ox=o.width() oy=o.height() osup = o.MSuper(pel=2,sharp=2) bv1 = osup.MAnalyse(isb=true, delta=1,blksize=8,overlap=4,search=4) fv1 = osup.MAnalyse(isb=false,delta=1,blksize=8,overlap=4,search=4) bc1 = o.MCompensate(osup,bv1) fc1 = o.MCompensate(osup,fv1) Interleave(fc1,o,bc1) MedianblurT(0,0,0,1) # you can also use "Clense(reduceflicker=false)" instead SelectEvery(3,1) a=last.Trim(0,428) b=last.Trim(429,857) Interleave(a,b) # remove single-frame spots o2=last ox=o2.width() oy=o2.height() o2sup = o2.MSuper(pel=2,sharp=2) bv1a = o2sup.MAnalyse(isb=true, delta=1,blksize=8,overlap=4,search=4) fv1a = o2sup.MAnalyse(isb=false,delta=1,blksize=8,overlap=4,search=4) bc1a = o2.MCompensate(o2sup,bv1a) fc1a = o2.MCompensate(o2sup,fv1a) Interleave(fc1a,o2,bc1a) MedianblurT(0,0,0,1) # you can also use "Clense(reduceflicker=false)" instead SelectEvery(3,1) Flux7framesT() y=last Sup1=y.MSuper(mt=false) Vec1=MAnalyse(Sup1, delta=3, chroma=true, blksize=8, blksizeV=8, overlap=4, overlapV=4, multi=true, mt=false) x.MDeGrainN( Sup1, Vec1, 3, plane=4, thSAD=400, thSAD2=400, thSADC=400, mt=false) z=last ######################################################################## Sup2=MSuper(mt=false) Vec2=MAnalyse(Sup2, delta=128, chroma=true, blksize=32, blksizeV=32, overlap=16, overlapV=16, multi=true, mt=false) MDeGrainN( Sup2, Vec2, 128, plane=3, mt=false) ContraSharpening(z,x) LimitedSharpenFaster( Smode=3, Lmode=3, ss_x=1.0, ss_y=1.0, strength=60, overshoot=0,soft=40, wide=true, edgemode=0 ) Quote:
Quote:
Code:
# http://forum.doom9.org/showthread.php?t=150299&highlight=contrasharpening FUNCTION ContraSharpening(clip denoised, clip original) { # contra-sharpening: sharpen the denoised clip, but don't add more to any pixel than what was removed previously. # script function from Didee from the VERY GRAINY thread s = denoised.minblur(1,1) # Damp down remaining spots of the denoised clip. allD = mt_makediff(original,denoised) # The difference achieved by the denoising. ssD = mt_makediff(s,s.removegrain(11,-1)) # The difference of a simple kernel blur. ssDD = ssD.repair(allD,1) # Limit the difference to the max of what the denoising removed locally. ssDD = SSDD.mt_lutxy(ssD,"x 128 - abs y 128 - abs < x y ?") # abs(diff) after limiting may not be bigger than before. denoised.mt_adddiff(ssDD,U=2,V=2) # Apply the limited difference. (Sharpening is just inverse blurring.) RETURN (last) } # From Didee's MCBob script function MinBlur(clip clp, int r, int "uv") { uv = default(uv,3) uv2 = (uv==2) ? 1 : uv rg4 = (uv==3) ? 4 : -1 rg11 = (uv==3) ? 11 : -1 rg20 = (uv==3) ? 20 : -1 medf = (uv==3) ? 1 : -200 RG11D = (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20),U=uv2,V=uv2) \ : mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20).removegrain(20,rg20),U=uv2,V=uv2) RG4D = (r==1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.medianblur(2,2*medf,2*medf),U=uv2,V=uv2) \ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U=uv2,V=uv2) DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2) clp.mt_makediff(DD,U=uv,V=uv) return(last) } Last edited by cobo; 26th July 2012 at 17:38. |
||
25th July 2012, 06:39 | #6 | Link | |
Registered User
Join Date: Mar 2004
Posts: 118
|
You could eliminate the need to make a list of frames to replace with the Morph function by denoising the clip directly with the spot removal routine and Flux7T function, instead of using them indirectly to create a search clip for MDegraining the luma. The only objectionable difference I notice is that swiftly moving objects, such as the pointing hand, are not as well reconstructed and may have some color smudging which can be seen stepping through the clip frame by frame, but likely wouldn't be noticeable when playing it.
So then the script would be: Quote:
|
|
|
|