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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#41 | Link |
|
Registered User
Join Date: Sep 2019
Posts: 4
|
Dear StainlessS. Sorry to revive such an old thread. I need to ask if can you give me please an example of MCDegrain to denoising an interlaced source, but with a prefiltered clip for more reliable motion estimation. I need to make some DVD's
Thank you. |
|
|
|
|
|
#42 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
I totally dislike Interlaced stuff and always deinterlace, others would likely be better source of advise here.
If was me, then deinterlace using least denoise (whatever args give least denoise for eg QTGMT), to doublerate. Apply McDegrain to result and then re-interlace. Boulder gave good args for little denoising something like this [excluding Preset, and NoisePreset, Code:
QTGMC(Preset="Medium",NoisePreset="Faster",SourceMatch=2, Lossless=2, EZKeepGrain=0.4, Sharpness=0.1, tr2=0) # After Presets, from Boulder Code:
Deint.SeparateFields.SelectEvery(4,0,3).Weave # Singlerate Re-Interlacing : EDIT: BFF maybe SelectEvery(4,1,2).Weave
__________________
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; 30th March 2021 at 15:41. |
|
|
|
|
|
#43 | Link |
|
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,783
|
There is always this old chestnut. You'll find it on the AVISynth Wiki:
ApplyInterlacedFilter Code:
#This applies any filter to an interlaced source. The filter can be used for both spatial filters, like Blur and temporal filters like TemporalSoften.
#Example of usage
#AviSource("file.avi")
#ApplyInterlacedFilter(last, "blur(1.5)")
function ApplyInterlacedFilter(clip v1, string filter)
{
v2 = separatefields(v1)
selecteven(v2)
even = Eval(filter)
selectodd(v2)
odd = Eval(filter)
interleave(even,odd)
return weave()
}
Last edited by johnmeyer; 30th March 2021 at 15:54. Reason: added link |
|
|
|
|
|
#44 | Link | |
|
Registered User
Join Date: Sep 2019
Posts: 4
|
Quote:
|
|
|
|
|
|
|
#45 | Link | |
|
Registered User
Join Date: Sep 2019
Posts: 4
|
Quote:
|
|
|
|
|
|
|
#46 | Link |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
For interlaced HDTV (currently produced) I use mvtools with high enough tr :
Code:
tr=12 fields=AssumeTFF().SeparateFields() super=MSuper(fields,pel=1) multi_vec=MAnalyse (super, multi=true, delta=tr, overlap=4) MDegrainN(fields,super, multi_vec, tr, thSAD=250, thSAD2=180) Weave() thSAD and thSAD2 - to be adjusted for the noise amount in the input. Too low do not touch noise, too high start to smooth low-contrast details. For newer HDTV cams it is about 250, for old more noisy it may be 400 and more. thSAD2 typically 1/2..2/3 of thSAD I think. With finally coded MDegrainN() function it starts to be very good and easy to use tool. Last edited by DTL; 30th March 2021 at 20:03. |
|
|
|
|
|
#47 | Link | |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
Quote:
At least after non-linear deint, the process of interlacing like Code:
SeparateFields.SelectEvery(4,0,3).Weave If interlaced content was conditioned by high$$$$ pro/broadcast-graded video camera it is not easy to do same quality level 'interlaced-progressive-interlaced' conversion with freeware tools. Simple processing of separated fields as frames give acceptable result though may be a bit degrade vertical resolution. Last edited by DTL; 30th March 2021 at 20:26. |
|
|
|
|
|
|
#48 | Link | |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,407
|
EDIT:
Quote:
Here latest McDegrain() on-line ver$:- https://forum.doom9.org/showthread.p...03#post1926403 Can call McDegrain(bblur=0.6) [default=0.0, as Didee original] to use same pre-filter blur as McDegrainSharp(). EDIT: If you change tm=false [truemotion], then also set Glob=true [default is currently same as tm, maybe it should always be true]. EDIT: Might also like to play with one of these experimental funcs:- https://forum.doom9.org/showthread.p...74#post1932874
__________________
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; 30th March 2021 at 21:47. |
|
|
|
|
|
|
#49 | Link | |
|
Registered User
Join Date: Sep 2019
Posts: 4
|
Quote:
Obviously, when fields=AssumeTFF().SeparateFields(), deltas becomes evens: backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct) forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct) backward_vec4 = super.MAnalyse(isb = true, delta = 4, overlap=overlap, dct=dct) forward_vec4 = super.MAnalyse(isb = false, delta = 4, overlap=overlap, dct=dct) I'm not sure if MdegrainN's delta parameter gets evens values too i have the doubt, since many scripts i've seen are not made for interlaced. Thus, i modified directly Mdegain2i2, and set specifically those values for delta, and added a prefilter. It seems to work ok, results are better now (thsad lowered to 200, before prefilter was 300, and even denoises better) Sorry, i didn't mention before that i don't want to deinterlace. Now, my question is, if you have a better recomendation for a prefilter than "pre=fluxsmootht(3).removegrain(11)", (this is the example for smdegrain, but i don't use smdegrain anymore, since it stops working randomly in my system and some black blotchers appear, but classic Mdegrain works flawlessly, so i tend to prefer the original scripts) Thank you
|
|
|
|
|
|
|
#50 | Link |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
" an example for Mdegrain in case of interlaced stuff.
Obviously, when fields=AssumeTFF().SeparateFields(), deltas becomes evens: backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)" It is old very large and not user-friendly syntax for initial degarin2/3/4/5/6 functions. Later the lovely MDegrainN function was coded finally in mvtools and you no more need to type awful number of strings for every tr-param value. Also looks MAnalyse was modified to use multi=true and gives required multi-frames vec data for MDegrainN. MAnalyse->multi When set to true, MAnalyse generates the motion vectors for all the reference frames −delta…−1 and +1…+delta. The resulting clip is made of single MAnalyse results interleaved in the delta order −1, +1, −2, +2, …, −delta, +delta, where negative values indicate backward searchs. This order is similar to the motion vector parameters in MDegrain3. The output clip is intended to be used directly in MDegrainN. "Mdegain2i2" tr=2 is too few for great results I think. I usually use something like 10..20+. And above script is for interlaced processing - in and out. Last edited by DTL; 2nd April 2021 at 08:30. |
|
|
|
|
|
#52 | Link | |
|
Registered User
Join Date: Jul 2018
Posts: 1,480
|
Quote:
With large enough tr values it is even become visible sometime how static areas become noise-free but moving areas still noisy. Though noise at moving areas is less visible. For photon-shot noise each doubling number of processed images lowers noise to -3 dB I think. So for visible noise level lowering if is required to double or better quadruple tr param value. So degrain 2/3/4/5/6 is too limited in processing num of frames and can provide only about -6..8 dB (about 2 times in amplitude) less noise level. Last edited by DTL; 2nd April 2021 at 08:52. |
|
|
|
|
|
|
#53 | Link | |
|
Registered User
Join Date: May 2006
Posts: 4,083
|
Quote:
|
|
|
|
|
|
|
#54 | Link |
|
Registered User
Join Date: Mar 2011
Posts: 5,062
|
I tried the following idea, just to see....
A = Last B = A.Bob(0.0, 1.0) C = B.SeparateFields() D = C.SelectEvery(4, 0) E = C.SelectEvery(4, 3) F = Interleave(D, E).Weave() return F As best as I can tell, clips A & F above would be identical. So.... 1. A low quality PAL source deinterlaced with Yadif and upscaled to 1080p for a look-see. Yadif(Mode=1).CropResize(1920,1080, 20,0,-20,0, InDAR=20.0/11.0) ![]() 2. SMDegrain in interlaced mode, followed by the same de-interlacing and upscaling. SMDegrain(Interlaced=true) Yadif(Mode=1).CropResize(1920,1080, 20,0,-20,0, InDAR=20.0/11.0) ![]() 3. I was expecting this to look a fair bit better than SMDegrain in interlaced mode, but there wasn't a lot in it. It's followed by Yadif de-interlacing and then it's upscaled again. A = Last B = A.Bob(0.0, 1.0).SMDegrain().ComplementParity() C = B.SeparateFields() D = C.SelectEvery(4, 0) E = C.SelectEvery(4, 3) Out = Interleave(D, E).Weave() return Out.Yadif(Mode=1).CropResize(1920,1080, 20,0,-20,0, InDAR=20.0/11.0) ![]() Maybe not for every frame, but I think #3 usually had a very slight edge over #2, although it doesn't seem worthwhile. I might find something more grainy later and try again. I didn't try for perfect denoising, or even good denoising. I just wanted to see if bobbing first might make a difference. 4. While I was at it... just for fun.... bobbing with QTGMC, then re-interlacing. A = Last B = A.QTGMC(EzDenoise=1.5) C = B.SeparateFields() D = C.SelectEvery(4, 0) E = C.SelectEvery(4, 3) Out = Interleave(D, E).Weave() return Out.Yadif(Mode=1).CropResize(1920,1080, 20,0,-20,0, InDAR=20.0/11.0) ![]() 5. And just because.... a progressive output from QTGMC. No need for Yadif on playback this time. QTGMC(EzDenoise=1.5) CropResize(1920,1080, 20,0,-20,0, InDAR=20.0/11.0)
Last edited by hello_hello; 7th April 2021 at 19:00. |
|
|
|
|
|
#55 | Link |
|
Registered User
Join Date: Aug 2017
Location: Italy
Posts: 147
|
For my scripts I follow the recommendation given here https://forum.doom9.org/showthread.php?t=86394 and experimented that the best result when applying spatio-temporal or motion compensated filters to interlaced materials is obtained after double rate deinterlacing (I reinterlace back at the end).
This example uses RemoveDirtMC, MVDegrainMulti and sharpen as filtering; since then I moved to TemporalDegrain2 and LSFmod (and lossless nnedi3(field=-2) deinterlacing), but it shoud also give an idea (over-sharpened to highlight the difference) original s-vhs capture https://forum.doom9.org/attachment.p...3&d=1617876847 mode A: just filtering without deinterlacing https://forum.doom9.org/attachment.p...4&d=1617877002 mode B: SeparateFields() / SelectEven().<filtering> / SelectOdd().<filtering> / Interleave() / Weave() https://forum.doom9.org/attachment.p...5&d=1617877091 mode C: <Bobbing deinterlacer> / <filtering> / SeparateFields() / SelectEvery(4,0,3) / Weave() Bob version https://forum.doom9.org/attachment.p...6&d=1617877195 QTGMC version https://forum.doom9.org/attachment.p...7&d=1617877254 Last edited by lollo2; 8th April 2021 at 11:28. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|