Log in

View Full Version : Restore old vhs


algia
17th April 2021, 10:52
Hi all,
I'm trying restore old vhs and this is the code I used


clip="C:\Users\alojal\Desktop\sample disk\ZIA ROSA\ZIAROSA-IN\zia rosa.mov"
video=FFMpegSource2(clip, atrack=-1).Crop(240,18,-240,-18).ConvertToYV12(interlaced=true)
FFMpegSource2(clip, atrack=-1)
Crop(24,18,-24,-18)
AssumeBFF()
QTGMC(preset="slow",FpsDivisor=2,ChromaMotion=false,border=true,ChromaNoise=true,DenoiseMC=true,NoiseDeint="Generate",StabilizeNoise=true,GrainRestore=0.0,Sharpness=2)
RemoveDirt(limit=10,_grey=false)
ConvertToRGB(matrix="Rec601", interlaced=false)
GamMac(LockChan=1,LockVal=130,RedMul=1,GrnMul=1,BluMul=0.9,Show=false,Verbosity=2,hith=0.5,loth=0.5,th=1,scale=2)
ConvertToYV12(interlaced=false)
FFT3DFilter(sigma=8, beta=1.0, plane=4, bw=16, bh=16, ow=8, oh=8, bt=3, kratio=3.0, sharpen=1.0, scutoff=0.3, svr=1.0, smin=4.0, smax=30.0, measure=true, interlaced=false, wintype=0, degrid=1.0, dehalo=1.0, hr=2.0, ht=50.0)
ChromaShiftSP(2,4)
DeHalo_Alpha(rx=2.0, ry=2.0, darkstr=1.0, brightstr=1.0, lowsens=50, highsens=50, ss=1.5)
LSFmod(defaults="slow", strength=39, kernel=12, preblur="OFF", secure=false, Szrp=2, Spwr=4, SdmpLo=4, SdmpHi=48, overshoot=1, undershoot=1, overshoot2=2, undershoot2=2, soothe=true, keep=20, edgemode=0, show=False, screenW=720, screenH=576)

StackHorizontal(video,last)
return last


after GamMac I see light blu haloing around the hair and in the wall
I would like, more shapness and some suggestion
thank you in advance

https://www.mediafire.com/view/tnrzk53q6dzbw38/ZIROS.png/file

Arx1meD
24th April 2021, 16:06
You need a color denoiser. Try using one of these: Veed, Cnr2 or CCD (Camcorder color denoise for VirtualDub).
As for me CCD gives the best result.
For example:
LoadVirtualDubPlugin("...\ccd_32bit.vdf", "ccd", 0)
ConvertToRGB()
AddBorders(10,0,0,0) #The source frame size (height and width) must be a multiple of 16.
ccd(30,1)
Crop(10,0,0,0)
ConvertToYV12()
Or try:

MiniDeen(radiusY=1, radiusUV=2, thrY=1, thrUV=20, y=2, u=3, v=3)
f3kdb(preset="medium/nograin", sample_mode=2)

Sharc
25th April 2021, 08:11
Also, you may want to try MCDegrainSharp. It denoises and fixes other typical VHS issues without requiring tons of settings and tweaks. The defaults are good for most cases in my experience.

Mounir
26th April 2021, 10:05
you're doing it wrong to begin with

You should crop only at the end of the script especially if you deinterlace right after

avisource()
assumetff (or bff) # TFF for vhs unless you have captured in DV !!
qtgmc("fast")
selecteven()
~Other filters~
crop()

lollo2
26th April 2021, 11:36
You should crop only at the end of the script espcially if you're deinterlace right after

Am I wrong or I read something different here?

https://forum.doom9.org/showthread.php?p=690659#post690659

What is right?

StainlessS
26th April 2021, 11:56
You should use eg AssumeTFF() if necessary, as AssumeBFF() is the default.
Almost always TFF in PAL land, when interlaced, if PAL BFF interlaced, then problably done in error.

If cropped off part contains valid image, then may be useful to crop later and so
have a bit more image to use during deinterlace, however I would mostly crop first.
I'm not saying that Mounir is wrong, but perhaps he/she can give a reason for crop last.

EDIT: As your crop is left only (not top nor bottom) I dont see it making much difference,
although if crop first, then must comply with vertictal interlaced cropping restrictions due to
colorspace (chroma granularity) and interlacing. [ie multiples of 4 where interlaced YV12]
If cropping first makes you lose some image due to crop restrictions on interlaced,
might then be better to crop last. (So I would say not a concrete rule either way).