VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. 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:
    Image
    [Attachment 56701 - Click to enlarge]


    Code:
    Spline36Resize(width, height/2).Spline36Resize(width,height)
    This helped a bit at the cost of some details.

    What functions could I use to try to fix this?
    Last edited by dabbdubb; 8th Jan 2021 at 15:04.
    Quote Quote  
  2. Originally Posted by dabbdubb View Post
    What functions could I use to try to fix this?
    It's hopeless. It was resized vertically before being deinterlaced.

    But, you should post a link to 10 seconds of the video and not a picture.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. 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)

    Image Attached Thumbnails Click image for larger version

Name:	2pac.jpg
Views:	75
Size:	111.2 KB
ID:	56795  

    *** DIGITIZING VHS / ANALOG VIDEOS SINCE 2001**** GEAR: JVC HR-S7700MS, TOSHIBA V733EF AND MORE
    Quote Quote  
  5. Originally Posted by themaster1 View Post
    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)

    Thanks for this, and to you jagabo for authoring it. I am installing dependencies now and will give it a try. I don’t wish to upload my source because it is copyrighted and NSFW at the same time But I can send it to PM if you wish to see what I am working with.
    Last edited by dabbdubb; 3rd Feb 2021 at 17:55.
    Quote Quote  
  6. 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)
    But ultimately, the source is too far ruined to really fix it well. I’ll see what I can get out once I run it through VEAI. I appreciate the effort it went into it because it did objectively improve the video, no doubt.

    Original video first, simple resize second, with jagabo's script third:
    Image
    [Attachment 57158 - Click to enlarge]

    Image
    [Attachment 57156 - Click to enlarge]

    Image
    [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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!