digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   1990 VHS video, TemporalDegrain2 problem and help and verification (https://www.digitalfaq.com/forum/video-restore/11735-1990-vhs-video.html)

FinnTape79 04-11-2021 02:30 PM

1990 VHS video, TemporalDegrain2 problem and help and verification
 
2 Attachment(s)
I moved from Avisynth 32bit to 64bit and i found almost all the necessary functions for this restoration as a 64bit. There is still pixelation in the image and it seems to need more softening, but also considering the details. Dfftest is the main softener but i try to balance between softness and detail. I have problems to get TemporalDegrain2 work. It was my favourite with 32bit environment. TemporalDegrain2 gives a following error: Script error: There is no function named 'neo_fft3d' and it references to TemporalDegrain-v2.3.1 avsi line 286. Any help on this?

I don't have a full frame TBC. Chain is LG RC388 (pretty unused VHS) -> DMR-ES10 -> Philips SAA71... based PCI-capture card.

See the attached samples for fixed versions and here is link for the Huffyuv originals and fixed versions:
https://drive.google.com/drive/folde...MV?usp=sharing

Used functions (64bit):

SetMemoryMax(512) # multithreaded Avisynth only
AviSource("D:\VHS_capture_FFV1_HUFF_ES10\ClassTrip .avi", fourCC="HFYU")
ConvertToYUY2(interlaced=true) # alternative that specifies interlacing
Crop(0, 0, 0, -8) Cnr2(mode="oxx", scdthr=10.0, ln=35, lm=192, un=47, um=255, vn=47, vm=255, log=false, sceneChroma=false)
Cnr2(mode="oxx", scdthr=10.0, ln=35, lm=192, un=47, um=255, vn=47, vm=255, log=false, sceneChroma=false)
ConvertToYV12 # script below this line requires YV12
AssumeTFF()
QTGMC( Preset="Slow", EdiMode="NEEDI3", EdiMaxD=16, TR1=1, TR0=2, TR2=3 )
DeHalo_alpha(rx=1.6, ry=1.8, darkstr=1.0, brightstr=1.0, lowsens=80, highsens=10, ss=1.5)

mdata = DePanEstimate(dxmax=10)
DePanStabilize(data=mdata, initzoom=1, cutoff=0.5, damping=0.5, mirror=15, blur=30, method=1, dymax=18, dxmax=10, zoommax=3.5, rotmax=5.0)
santiag(strh=2,strv=2)
aWarpSharp2(thresh=45, blur=3, type=0, depth=16, chroma=4)
RemoveGrain(mode=2, modeU=2, modeV=2, planar=false)
TTempSmooth(maxr=4, strength=2, lthresh=7, cthresh=8, lmdiff=8, cmdiff=10)
dfttest(sigma=16, tbsize=1)
Sharpen(0.8)
ColorYUV(cont_u=12, cont_v=14) # increase saturation
ConvertToYUY2

Your forum has helped me greatly in this restoration work. I highly appreciate your work

lollo2 04-11-2021 04:19 PM

Quote:

function named 'neo_fft3d'
https://github.com/HomeOfAviSynthPlu...FFT3D/releases
download r10 release

Start with TemporalDegrain2 with postFFT=0, to avoid the usage of dfttest or ff3dfilter in postprocessing, because with the high freq noise they also remove fine details.
If you are not satisfied and wish to remove all remaining noise, you can use postFFT=3 (dfttest) and an appropriate postSigma. (comments in the TD2 avsi script explain its behaviour better than me)

I found that LSFmod after TD2 generally performs an excellent sharpening.

FinnTape79 04-13-2021 02:29 PM

Thanks. I'll try TemporalDegrain2 with postFFT=0 parameter next weekend. DeHalo seems to affect fine detail at least at some level so I need to be careful not to overdo it. Now the grain is ok with static stationary shots but at the times of sideway/up/down movement there's pixelation/harsh surfaces. Heavy camera shake/movement stabilation was also needed.

With a 32bit script, I got a render rate of 0.5 frames per second compared to 64bit 5 to 7 frames per second. Going to 64bit got me from 2,5 days to 7 hours (class trip project, interlaced 25fps -> QTGMC de-interlaced 50fps render, 53 minutes video duration). I'll try to stick with 64bit functions as much as possible.

This is an interesting trip with plenty trial and error type of tasks and training. Typical modern consumer style "Pinnacle Studio" etc video editor has usually one or two usable filters for restoration so they are practically useless. The available resolution/detail is so low that you don't want to lose any more detail than is mandatory.

Next quest is to seek a best solution for hd scaling. A wide range of AI solutions are marketed for the purpose, but apparently free solutions continue to achieve a competitive outcome (especially with low resolution SD material), or at least the difference is not very significant. If you have a link to a good upscale instruction, I'd be happy to accept one. Also the end format for viewer is critical because most of these improvements are very fine and delicate. For that reason i'm using a minimum 32" monitor to spot changes. At the moment my end format is MP4 H.264 and level 14 for quality. Sound is left PCM 48khz 16bit RAW as the capture and no intended re-processing during the process. Need to save the completely raw capture 25fps HUFFYUV master and 50fps fixed master. Fortunately, disk space is quite cheap these days...

Quote:

Originally Posted by lollo2 (Post 76727)
https://github.com/HomeOfAviSynthPlu...FFT3D/releases
download r10 release

Start with TemporalDegrain2 with postFFT=0, to avoid the usage of dfttest or ff3dfilter in postprocessing, because with the high freq noise they also remove fine details.
If you are not satisfied and wish to remove all remaining noise, you can use postFFT=3 (dfttest) and an appropriate postSigma. (comments in the TD2 avsi script explain its behaviour better than me)

I found that LSFmod after TD2 generally performs an excellent sharpening.


lollo2 04-13-2021 03:24 PM

Quote:

Now the grain is ok with static stationary shots but at the times of sideway/up/down movement there's pixelation/harsh surfaces
Choose the best degrainTR parameter: low values=less denois, less impact at scene changes while high values=more denoise, potential small artefact at scene changes

Quote:

If you have a link to a good upscale instruction
I am not a fan of upscale to HD, when I do it I use
Code:

nnedi3_rpow2(rfactor=2, nns=4, qual=2, cshift="Spline36Resize", fwidth=1440, fheight=1080)
and add 2 borders of 240 pixels at left and right.

However, the upscale makes sense only if in the process of upscaling/sharpening in several steps you are able to improve the final results with respect to what can do your hardware (difficult to achieve)
Some reference here:
https://forum.doom9.org/showthread.php?t=174706
https://forum.doom9.org/showthread.php?t=172137


All times are GMT -5. The time now is 01:46 PM

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.