![]() |
VHS to x.264 restore produces strange 'moire' on horizontal lines.
5 Attachment(s)
Hello! :tiphat:
I too got a task to restore 50 or so VHS tapes with precious family memories.:wink2: They are mostly in fairly bad shape to begin with and capturing them with cheap old VCR and even cheaper easycap device doesn't do them any good either. However, this is what I have to work with and in last few months I got my workflow process down to this; 1. Capture with AmaRecTV 2.31 with lossless UtVideo (YUV422 BT.601 VCM) codec. (Virtualdub never gave me good enough AV sync, no matter what setting I tried...) 2. Export sound to .wav and remove hiss/hum with Goldwave v6.31. (I use clipboard sample from the beginning or end of the tape) 3. AviSynth Script with help of AvsPmod 2.51 (Trim to separate clips, Crop to remove black borders and dirty tape head part at the bottom, Deinterlace with QTGMC 3.357 script to improve footage and convert to progressive, FadeIn/Out) Code:
SetMemoryMax(4000) # I have Win10 x64 and 16GB and these settings works best for me.The final result will mostly be played on PC and I plan to delete lossless captures and keep only these mkv files for archival purposes. The challenge I am facing ATM is 'moire effect' (not sure how to call it, but it reminds me at moire from the old days of CRT monitors =)) If You check source.avi and encode.mkv, You will notice it appearing over the stack of plates (plates.mkv) or skirt of a girl (skirt.mkv). Source AVIs doesn't have it. Plates or dress don't flicker at all. I tested different QTGMC presets with some other random settings from QTGMC manual and I also tried different x264 encoding presets, but this moire just doesn't go away. I suspect it is introduced by QTGMC, but I really don't know anymore how to fix this, neither if it is fixable at all? My wife says 'leave it' but after all the time spent on this, learning the ropes, it really annoys me. :unsure: Any insights what is causing this or how to fix it would be greatly appreciated! :congrats: |
4 Attachment(s)
Quote:
Quote:
Quote:
Quote:
Quote:
I made extensive notes in the script for the skirt.avi sample, so I'll post that first. Twitter and aliasing aren't the only faults, as there are some bad dropouts and ripples. Red contrast is too wide for the video to handle, so the girl's face and details get wiped out under the red lights. I included code to work with unsafe video levels and other such problems. In the plates.avi sample, fixing mixed color sources and bad clipping during the capture is possible only to a slight degree. On top of that I'm stuck working with a Dell laptop temporarily. Dell makes the worst laptop screens in the world, so color correction and inspecting for proper nosie reduction is very limited for the time being. Laptops are a disaster checking for noise and color correction is limited. Laptops are disastrous for video work anyway, but this will have to do until some home reconstruction in finished. Meanwhile this Dell doesn't have a/v muxing softare, so the attached samples are m2v encoded with the HCenc encoder and no audio. The script I used for skirts.avi: Code:
vid=AviSource("E:\forum\faq\umetnic\skirt.avi")Code:
AviSource("drive:\path\to\plates.avi") |
[EDIT]
Oops! Spotted a script error, one of those infamous typos. In my previous post you'll see this code in the script for the plates.avi sample: Code:
ConvertToYUY2(interlaced=false)Code:
ConvertToYUY2(interlaced=false) |
WOW, @Sanlyn! I could Hug U right now!:beer:
I read many of your quality replies on this forum but still didn't dare to hope I would also get one. Please allow a few days to comprehend and test/apply everything You wrote and I'll come back with my new findings/results. :wave: |
2 Attachment(s)
Gosh. Thank you, but with a little experimentation we might get slightly better results. This time I'm posting a 640x480 progressive square-pixel version as 50fps mp4. I still think MPEG2 looks a bit cleaner, but it can't be posted on the internet and can't be encoded as square-pixel. Resizing both width and height for square pixel does have a price in the moire pattern, but it still looks slightly cleaner to me than the earlier version.
The script below is a little different. Note that ReplaceFramesMC works OK to repair some bad dropouts, but the frames it replaces have no audio, so you get choppy audio at the repair points. The "aud" variable in the script below saves the original audio at 50fps after running QTGMC, then restores it near the end of the script. If you save the audio at an earlier point as in the earlier script for interlaced video, the earlier audio runs at the 25fps frame rate. Code:
Import("drive:\path\to\Avisynth plugins\RemoveDirtMC,avs") #<-- change path for your system. |
Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.