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. |
12th November 2022, 18:17 | #21 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
I'm glad you like it and improved the overall speed. Here's a more tweaked script, I got rid of the superfluous denoising step and other things like use NNEDI3CL and neo_fft3d. I also incorporated the upscale, I used NNEDI3CL for that, not SuperRes (didn't check the differences) but the source has very low detail so I don't think the difference will be night and day. z_ConvertFormat resizes to the final size, converts it to YUV420, corrects the shift caused by NNEDI3 upscaling and also changes the Colorimetry all in one go . Script now also needs LSFplus.
I don't know the quality of your other tapes but this one here works well for low quality VHS with chroma bands and very noisy. Definitely overkill for higher quality footage. Enjoy, and if you come across another hard to denoise clip, please share Code:
FFVideoSource("tape 37-trim.mkv") Crop(8,0,-6,-16) ConvertBits(10) Levels(20, 1, 1045, 0, 1023, coring=false, dither=true) Tweak(hue=-3, coring=false, dither=true) ConvertBits(8) src = last NNEDI3CL(3) o = last mds().Spline36Resize(o.width(),o.height()/2/4*4) mds().Spline36Resize(o.width(),o.height()/6/4*4) mds().Spline36Resize(o.width(),o.height()) o.MergeChroma(last) nostripes2 = last.MinBlur(1).LSFplus(ss_x=1.0, ss_y=1.0, strength=100, soft=100, overshoot=5) srchbase = neo_fft3d(nostripes2,sigma=6, sigma2=4, sigma3=3, sigma4=2, bt=5, bw=16, bh=16, ow=8, oh=8).FluxSmoothT() pre = MergeLuma(srchbase, o, weight=.25) QTGMCp(src, EdiExt=pre) NNEDI3CL(1, dh=true, dw=true) NNEDI3CL(1, dh=true, dw=true) NNEDI3CL(1, dh=true, dw=true) z_ConvertFormat(2880, 2160, pixel_type="YV12", colorspace_op="470bg:601:170m:full=>709:709:709:full", \ resample_filter="bicubic", filter_param_a=-0.5, filter_param_b=0.25, src_left=-3.5, src_top=-3.5) # helper function: vertical-only MinBlur with vertical radius 2 function mds(clip clp) { a = clp.mt_luts(clp,mode="median",pixels="0 -2 0 -1 0 0 0 1 0 2",Y=2,U=3,V=3) b = clp.mt_convolution("0 1 0","1 2 1",y=2,U=3,V=3).mt_convolution("0 1 0","1 2 1",Y=2,U=3,V=3) aD = mt_makediff(clp,a,Y=2,U=3,V=3) bD = mt_makediff(clp,b,Y=2,U=3,V=3) DD = mt_lutxy(aD,bD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",Y=2,U=3,V=3) clp.mt_makediff(DD,Y=2,U=3,V=3) return(last) } |
12th November 2022, 18:24 | #22 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
RD,
Not sure of your intent there, but mds().Spline36Resize(o.width(),o.height()/2/4*4) is same as mds().Spline36Resize(o.width(),o.height()/2) as intended ? maybe something like mds().Spline36Resize(o.width(),Round(o.height()/2.0/4.0)*4)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
12th November 2022, 18:31 | #23 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
StainlessS, it's a copypasta from a script from Didée, I didn't dare to challenge his logic
Edit: to below - Round() would work, the script is meant for progressive video so mod2 should be enough. Last edited by Reel.Deel; 12th November 2022 at 19:21. |
12th November 2022, 18:34 | #24 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I bet it should have been as suggested (or eg Int() instead of round), same for the 6/4/4.
EDIT: Whether or not you should use Round() or Int(), it is intended that result height should be mod4. [suggest Round()]
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 12th November 2022 at 18:43. |
12th November 2022, 19:46 | #25 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
and then to reduction to 1/6 size (mod4). Then resize back to original height. So downsize to 1/12 height, then back up. I imagine that the big DD had reason for double downsize, and maybe even the modulo stuff between and ending. (dont think anything to do with Progressive/Interlaced) Code:
mds().Spline36Resize(o.width(),o.height()/2/4*4) # /2 mds().Spline36Resize(o.width(),o.height()/6/4*4) # /6 : total /12 mds().Spline36Resize(o.width(),o.height()) # back to original so maybe Code:
mds().Spline36Resize(o.width(),Round(o.height()/2.0/4)*4) # /2 mds().Spline36Resize(o.width(),Round(o.height()/6.0/4)*4) # /6 : total /12 mds().Spline36Resize(o.width(),o.height()) # back to original Code:
mds().Spline36Resize(o.width(),(o.height()/2/4)*4) # /2 mds().Spline36Resize(o.width(),(o.height()/6/4)*4) # /6 : total /12 mds().Spline36Resize(o.width(),o.height()) # back to original
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 12th November 2022 at 20:02. |
|
12th November 2022, 20:21 | #26 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
|
|
13th November 2022, 02:29 | #27 | Link |
Registered User
Join Date: Dec 2019
Posts: 68
|
Thanks for the updated script.
I tried it on one of my typical VHS captures. VCR set to norm. Relatively low noise to begin with but I do want to slightly denoise before scaling. Not sure what I prefer. Source: Old script: New script (with RF's first settings, modified) New script #2 (with RF's second settings, modified) ] No scaling applied yet. All look clean though. I'll send a sample once I'm off work. If only I could improve text clarity to make it on-par with the source. Last edited by ENunn; 13th November 2022 at 02:51. |
13th November 2022, 17:32 | #28 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Do you have the edit switch on your VCR turned on? Those captures look pretty soft to me.
If your are unfamiliar with the edit switch, consult your VCR's manual to see the settings they recommend for dubbing to another tape deck. You want to use those settings. Turning that switch ON turns OFF the built-in noise filtering. You do NOT want the VCR to filter noise because it kills details in order to reduce all those little dots. You will never get back that detail once lost. Once you have your capture, the digital noise filters available today are 100x better than the simple analog circuits used in a VCR. The final result will be more detailed and better in every way. |
13th November 2022, 19:01 | #29 | Link | |
Registered User
Join Date: Dec 2019
Posts: 68
|
Quote:
I'll take your word for it though :P I'll do a capture with Edit on and try it out. Last edited by ENunn; 13th November 2022 at 19:49. |
|
13th November 2022, 20:41 | #30 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
You are absolutely correct: setting that switch to Edit will make the picture noisier. If you were just watching the video on your TV, that might be what you want, but it is not what you want when digitizing video.
To convince yourself, capture a scene which has a lot of detail (leaves, grass, striped shirt, a shag rug, etc.). Do that with Edit on and then do it again with Edit off. Then do an A/B between your videos while they are running (I do this by putting them above each other in my NLE and then muting/unmuting one track). You can also look at stills captured from each. Ignore the noise, but look at the detail. You should be able to resolve more detail, and even the detail that is already there should reveal more information when Edit is on (i.e., noise reduction is turned off). There are dozens of AVISynth plugins that can very effectively remove most of the noise without killing the detail. The VCR approach is to just apply a low pass filter which removes the noise and also the details. It has no way to "look" at pixels (because there are no pixels in analog video) and then compare those pixels from one frame to the next, something a temporal denoiser does. It is this frame-to-frame comparison that permits a digital temporal denoiser to get rids of all those dancing dots without removing detail. BTW, a similar comment applies to removing noise with AVISynth: resist the urge to get rid of ALL the noise because if you do that, you often remove detail. Remember, "NR" stands for noise reduction, not noise removal. |
14th November 2022, 02:43 | #31 | Link |
Registered User
Join Date: Dec 2019
Posts: 68
|
Thanks for the help John! I did my first edit mode transfer in a long time, results do look nice, albeit very noisy.
I ran the capture through the script, there's definitely a difference but I do want a little better. Original: RealFinder's settings (modified by me): There's definitely a difference, but I dunno if it's on-par with what my VCR can do. At least detail isn't lost :P When I try to modify fft3dfilter, MSuper, and mdegrain2, nothing seems to happen. I do want the noise reduced to the point that detail isn't lost. Last edited by ENunn; 14th November 2022 at 02:46. |
14th November 2022, 07:46 | #35 | Link | |
Registered User
Join Date: Dec 2019
Posts: 68
|
Yeah, I used it before I went with SMDegrain. Really slow.
Got it. Quote:
It's true, they're the exact same person!!!!!!! It's true!!!1one |
|
15th November 2022, 00:21 | #36 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
RF and I are most definitely not the same person lol
I took a look at your second sample, and in terms of noise it's much better than the first sample. The luma channel has much less noise and no crosshatch patterns. But the chroma is still noisy, not the same as before but enough to use the same script as post #21. I only made one change: Code:
pre = MergeLuma(srchbase, o, weight=.75) # was .45 Here are the results:Images are 2x point resampled and crop, levels, tweak, and upscaling parts of script were commented out. By the way, I think I recognize some of those commercials. Definitely the Neutrogena one. I used to watch WGN in my younger days |
25th November 2022, 22:17 | #37 | Link | |
Registered User
Join Date: Dec 2019
Posts: 68
|
Sorry for the late response.
Quote:
Original: Script: I posted another screenshot of the "problem", screenshot 4 on post 27. Here's a sample. It's probably not that big of a deal though. I just saw it and it looked a tad off to me. |
|
28th November 2022, 19:18 | #38 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,545
|
If you consider the brighter, but narrow red stripes weighed into it seems resonable.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
|
|