Lately I got into Avisynth and VapourSynth and managed to get both installed and working on windows. My goal was to try and repair a progressive video that was already deinterlaced but now has pretty serious combing artifacts. I don’t have access to the original interlaced source.
Here is an example of what is going on:
[Attachment 56701 - Click to enlarge]
This helped a bit at the cost of some details.Code:Spline36Resize(width, height/2).Spline36Resize(width,height)
What functions could I use to try to fix this?
+ Reply to Thread
Results 1 to 7 of 7
-
Last edited by dabbdubb; 8th Jan 2021 at 15:04.
-
-
You can keep more detail by masking parts of the frame that don't appear to have comb artifacts (ie, areas without comb artifacts are not resized so they keep all their vertical resolution). But yes, a sample is required.
-
Try this script, i used it with a similar source some time ago. Not great but better than nothing (requires RTstats, Gscript,nnedi3_resize16_v3.3.avsi
function AltHzLineMask(clip v)
{
Subtract(v, v.blur(0.0, 1.0).Sharpen(0.0, 0.6))
ConvertToRGB32()
GeneralConvolution(0, "
0 8 8 8 0
-0 -8 -8 -8 -0
0 8 8 8 0
-0 -8 -8 -8 -0
0 8 8 8 0")
ConvertToYV24()
mt_lut("x 125 - abs")
mt_binarize(6) # threshold, adjust to source
mt_inpand()
mt_expand()
mt_expand(chroma="-128")
}
##################################################
LWLibavVideoSource(source="Video.MOV")
#ConvertToYV12(interlaced=true)
src = last
# build a mask of areas where there is combing
ConvertToYV24() # convert to YV24 so we can specify an odd height
Spline36Resize(width,431) # found experimentally
converttorgb32()
AltHzLineMask()
mask = Blur(1.0).BilinearResize(src.width, src.height).ConvertToYV12()
# blur the comb artifacts by downscaling, then upscaling
src
Spline36Resize(width, 240)
Spline36Resize(width,1080)
# overlay the blurred image only where there are comb artifacts
Overlay(src, last, mask=mask)
spline36resize(720,480) # resize for dvd size
qtgmc("slower",inputtype=1,border=true,denoiser="d fttest",edithreads=2)
*** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE -
LOL. I thought that looked familiar: https://forum.videohelp.com/threads/397137-Badly-deinterlaced-video?highlight=althzlin...sk#post2582506
-
Last edited by dabbdubb; 3rd Feb 2021 at 17:55.
-
I got it to work with small adjustments:
- I used an older version of QTGMC because the latest one kept throwing an error when it didn’t know what to do with AvsPlusVersionNumber() even though SMDegrain version was > v3.1.2.101s. It worked with QTGMC-3.32.avsi, could probably use up to v3.361s if I searched for it.
- Removed the DVD resize as I didn’t need it.
- Changed second(first in main) call to Spline36Resize to Spline36Resize(width, 240)
- Changed third (second in main) call to Spline36Resize to Spline36Resize(width,480) since that is the height of my video.
- Lowered mt_binarize(6) to mt_binarize(1)
Here are the results:
The script did work better than what I was originally doing with just resizing it vertically (below).
Code:Spline36Resize(width, height/2).Spline36Resize(width,height)
Original video first, simple resize second, with jagabo's script third:
[Attachment 57158 - Click to enlarge]
[Attachment 57156 - Click to enlarge]
[Attachment 57157 - Click to enlarge]
I guess the only way to fix it would be to obtain original DVD with interlaced video, unless they already scrapped that and only sell deinterlaced.
Similar Threads
-
Ghosting/Combing after detelecine
By anoli3 in forum Video ConversionReplies: 5Last Post: 14th Nov 2019, 17:39 -
How to keep interlaced footage interlaced converting from AVI to MP4?
By kodec in forum Video ConversionReplies: 23Last Post: 1st Jul 2019, 09:36 -
help for combing/etc from progressive video
By spiritgumm in forum RestorationReplies: 10Last Post: 6th Nov 2017, 16:50 -
Easiest free way to convert 25fps interlaced to 50fps de-interlaced?
By Gibson's Squares in forum MacReplies: 2Last Post: 25th Jul 2017, 08:06 -
Capturing interlaced video as interlaced - Is it possible
By jvid in forum Capturing and VCRReplies: 5Last Post: 16th May 2017, 22:07