I have this fragment, from a video obtained from a DVD from a few years ago, but it is impossible for me to achieve a clean and deinterlaced image of it.
[Attachment 78978 - Click to enlarge]
[Attachment 78979 - Click to enlarge]
[Attachment 78980 - Click to enlarge]
[Attachment 78981 - Click to enlarge]
fragment
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 32
Thread
-
-
Here's my go! I like that hqdn Dave.
AVISynth code:
Code:LWLibavVideoSource("H:\Videohelp\DMForever98\VTS_27_1 videohelp.mkv") ConvertToYV12(interlaced=true) AssumeTFF() QTGMC(preset="Fast", EdiThreads=8) srestore() hqdn3d(6.5)
-
-
It's not "killing" anything, Sharc. The strings are better-off for hqdn. As for the floor, I'm not looking at the floor. Everything's a tradeoff.
-
Look at the strings to the right of the thumb, around frame 130. 3 strings celarly visible in the left picture, while almost gone on the right picture. Not sure which filter contributed most to the smoothing, I didn't check.
Similar with other low-contrast details. Tradeoff, yes. Not to critizise or prefering anything, just a hint. -
You can always use HQDN3d with a lower setting; it's all a compromise.
I just found a strength of 6.5 seemed to be OK for that video with the guys and gals dancing in the desert
from a couple of days ago.
I gravitate towards this kind of relatively fast filter because my PC is old and slow! -
-
-
It doesn't blame anyone for what I think is the fault of the original video, but there is some reason why the fps are slower or the image looks strange after deinterlacing, obviously taking out the original slow motion effects. I feel that in some parts it slows down and speeds up or there are strange movements, but in general it is a slow video (after deinterlacing) is there a way to solve it?
Last edited by DMFOREVER98; 10th May 2024 at 15:27.
-
I used AviSynth:
Code:LWLibavVideoSource("DMForever98\VTS_27_1 videohelp.mkv") AssumeTFF() QTGMC(preset="fast") SelectEvery(4, 0, 1, 3) z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:l=>rgb:709:709:f") Rife(gpu_thread=1, model=8, sc=true, sc_threshold=0.12) z_ConvertFormat(pixel_type="YUV420P8", colorspace_op="rgb:709:709:f=>709:709:709:l") SelectEvery(6, 0, 2, 3, 4) prefetch(8)
You will probably find that the phase of the duplicate/out-of-place frame will vary later in the video (ie instead of being the third frame of the four it may switch to another). If that's the case you'll have to modify the code to account for that. -
@Sharc, what actual code did you use for your MCDegrainSharp example in post #9?
Last edited by Alwyn; 11th May 2024 at 00:33.
-
You will probably find that the phase of the duplicate/out-of-place frame will vary later in the video (ie instead of being the third frame of the four it may switch to another). If that's the case you'll have to modify the code to account for that.users currently on my ignore list: deadrats, Stears555
-
Attempt with M_QTGMC + Deblock. Though I am stll not understand why increasing TR2 to max (6) makes close to no more denoise but restores more details. And Deblock only slightly fix blockiness and acts as some visible full-frame denoiser.
Lots of scene changes and at each scene change original MPEG (2 ?) encoder makes lots of distortions. It can not be good handled by simple thSAD-based MDegrain. I think better to test some denoise AI like TopazVEAI after deinterlace.
Also added Nyx1 model processed for attempt to denoise in Topaz VEAI (no Deblock in AVS). It still left many blocks from MPEG2 - looks like special anti-blockiness AI model also required.Last edited by DTL2023; 11th May 2024 at 09:24.
-
I ended up with custom selective deblock function (by testing each frame vs blockiness thr), so I can use very strong effect only to the worst frames.
For the rest it's just usual mvtools based denoiser (with some prefilter/masking thou)
As forsmoother motion
Code:assumebff.qtgmc(preset="fast").selecteven crop(12,0,-12,-8) Deblock2 (selective=true, info=1, thr=1.88, dstr=40) Denoiser_vhs (blocksize=8, tr=2, dct=0)
-
I haven't looked at the original video, but I've skimmed through the fixes people have tried.
After recovering the video with SRestore, if there are duplicates, but also some obvious drops, I did create a script to fix that:
Automatically fix dups followed (eventually) by drops -
-
-
Last edited by Sharc; 11th May 2024 at 17:31.
-
@Buzz1891, do you have a source for Deblock2? I can't find it anywhere.
-
It's custom script function:
Code:function Deblock2 (clip c, bool "selective", int "info", float "thr", string "algo", int "dstr", bool "mc", int "thSAD", int "dct") { selective = default (selective, false) global info = default ( info, 0 ) global thr = default ( thr, 1.9 ) global algo = default ( algo, "h264") global dstr = default ( dstr, 25 ) dct = default ( dct, 0 ) thSAD = default ( thSAD, 400 ) mc = default ( mc, true ) c BlockDetect() if (selective==true) { ScriptClip(""" blockiness = (propGetAny("blockiness_y")*2 + propGetAny("blockiness_u") + propGetAny("blockiness_v"))/4 badflag = blockiness > thr ? true : false if (info==1) {subtitle(string(badflag) + string(blockiness) +"("+ string(thr)+")")} fixed = simpleD () ConditionalFilter(last, fixed, last, "badflag", "==", "true", false) """) } else { simpleD () } #algo=algo, dstr=dstr if (mc==true) { addborders(8,8,16,8) bs = 8 tr = 1 mt=false sc_full = MSuper(hpad=0,vpad=0) sc_ds = BicubicResize (width/2,height/2).MSuper(hpad=0,vpad=0) mv_ds = sc_ds.MAnalyse (multi=true, delta=tr, dct=dct, blksize=bs, mt=mt) mv_dsr = sc_ds.MRecalculate (mv_ds, tr=tr, dct=dct, blksize=bs/2, overlap=bs/4, thSAD=150, mt=mt) mv = mv_dsr.MScaleVect(2) MDegrainN (sc_full, mv, tr, thSAD=thSAD, thSAD2=400, limit=10, mt=mt) crop(8,8,-16,-8) } return last } function simpleD (clip c) { #, string "algo", int "dstr" c if (algo=="pp7") { vsDeblockPP7(qp=dstr,mode=2) } if (algo=="h264") { h0 = height() Deblock (quant=dstr, aOffset=0, bOffset=0, planes="yuv") diff = h0 - height() (diff > 0 ) ? crop(0,0,0,-diff) : last } }
-
@Buzz1891, thanks, now stuck on "Denoiser_vhs". There is a reference to it on Gleitz in 2008 but nowhere else.
-
That's also custom script. I did shared it but not here, and it's not visible to google, because it's sort of all-in-1 package (hopefully)adapted for beginners
https://www.youtube.com/watch?v=2NilYO-9YvM (download links is in the video description there)
The code of Denoiser_vhs function:
Code:function Denoiser_VHS (clip c, int "blocksize", int "dct", int "tr", bool "force8bit") { blocksize = default ( blocksize, 16) dct = default ( dct, 0 ) tr = default ( tr, 9 ) force8bit = default ( force8bit, false) force8bit ? c.ConvertBits(8, dither=1) : c fc = D() ### filtered clip to be used along with mask in the next stage #return fc if ( true ) { [* selective denoise via masks. Set to 'false' to disable *] m_fpx = mt_motion (thY1=7, thY2=7, thT=25, chroma="-128") ### flickering pixels m_edges = mt_edge (mode="prewitt", thY1=35, thY2=85, chroma="-128") ### edges to substract m_motion = mt_logic (m_edges, m_fpx, mode="andn") ### flick px minus edges m_shadows = mt_binarize (threshold=70, upper=true, chroma="-128") ### shadows mask m_combined = mt_logic(m_motion, m_shadows, mode="or") ### combined 3-in-1 mask mt_merge (fc, m_combined, luma=true) } ### merge of source and fc via created mask Prefetch(4,4) ### it's placed here specifically to make fft3dfilter work ~2x faster [* To see the mask uncomment the line below *] #return m_fpx #return m_edges #return m_motion #return m_shadows #return m_combined #return last #### Filtering options, for info about parameters check documentation folder function A (clip c) {c.RemoveGrain(7)} ### rg modes by strength: [0,1,2,7,8,22,17,12,19] function B (clip c) {c.vsDegrainMedian(5,5,modeY=2)} function C (clip c) {c.FluxSmoothT(7)} function D (clip c) {c.FFT3Dfilter (wintype=1, bt=2, sigma=2, sigma2=2, sigma3=8.0, sigma4=5.0, beta=2, plane=0, ncpu=2)} function E (clip c) {c.neo_vd (threshold=3, method=1, nsteps=5, y=2,u=3,v=3, percent=70)} function F (clip c) {c.hqdn3d (ls=0,cs=0, lt=6,ct=3, y=3,u=3,v=3)} [* Next parameters have major influence on result: tr - Temporal radius in frames. Larger radius => less grain. But also slower and less sharp. Reasonable range: [1..6] bs - Block size. Larger blocks are faster, but also less accurate. Most used sizes: [8,12,16,24,32,48,64] thSAD - Larger means stronger filtering. But too large values can produce ghosting/blur (Default is 400). thSAD2 - Soft threshold for the furthest frames. Setting thSAD2 < thSAD allows large temporal radius and good efficiency while reducing the risk of blurring *] mt=false tr=tr bs=blocksize thSAD=1000 thSAD2=200 scaleCSAD=0 limit=255 if ( Fmod(bs, 8) > 0 ) { overlap=2 } else { overlap=bs/4 } AddBorders(8,8,16,8) pre = B() sc_full = pre.MSuper(hpad=0,vpad=0, mt=mt) tmp = pre.BicubicResize (width/2,height/2) emask = tmp.mt_edge (mode="prewitt", thY1=25, thY2=25, chroma="-128") if ( true ) { pre_ds = mt_merge (tmp, RemoveGrain(tmp,0), emask, luma=true).vsDegrainMedian(5,5,modeY=2) sc_ds = pre_ds.MSuper (hpad=0,vpad=0, mt=mt) mv_ds = sc_ds.MAnalyse (multi=true, delta=tr, blksize=bs, mt=mt, scaleCSAD=scaleCSAD, dct=dct) mv_dsr = sc_ds.MRecalculate (mv_ds, tr=tr, blksize=bs/2, overlap=overlap, thSAD=100, mt=mt, scaleCSAD=scaleCSAD, dct=dct) mv = mv_dsr.MScaleVect(2) MDegrainN (sc_full, mv, tr, thSAD=thSAD, thSAD2=thSAD2, limit=limit, mt=mt) } Crop(8,8,-16,-8) #### Optional post-denoise sharpening #CAS(0.5) }
-
Slightly different interpolating approach
Code:ffms2("VTS_27_1 videohelp.mkv") assumeTFF() QTGMC(preset="fast") Selectevery(4,1,3) #25fps #25->50 interpolation: z_ConvertFormat(pixel_type="RGBPS", colorspace_op="709:709:709:l=>rgb:709:709:f") RIFE(gpu_thread=1, model=28, fps_num=50000, fps_den=1000, sc=true, sc_threshold=0.12) z_ConvertFormat(pixel_type="YUV420P8", colorspace_op="rgb:709:709:f=>709:709:709:l")
Similar Threads
-
[VSDC Video Editor] Transforms do not work correctly when exporting video.
By shibata33 in forum Newbie / General discussionsReplies: 1Last Post: 29th Jul 2024, 13:47 -
Can you provide a clean image for this video?
By DMFOREVER98 in forum RestorationReplies: 6Last Post: 5th Feb 2023, 02:27 -
Avisynth+ - > Clean up an old analog video
By banaguitar in forum RestorationReplies: 12Last Post: 10th Sep 2022, 12:34 -
Why is OBS the superior, the state of art Video Capture Software?
By Truthler in forum CapturingReplies: 74Last Post: 27th Dec 2020, 03:40 -
LAV Video Decoder - How To Use Correctly?
By vanbrocklin in forum Newbie / General discussionsReplies: 0Last Post: 14th Jan 2020, 22:08