VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. Hi,

    So I'm trying to De-interlace a dvd and clean up image as much as possible with some sharpness.
    I tried to start this off with my limited knowledge of Avisynth. Most of it is based on the scripts that I was given help from this Forum previously but i understand that same script wont always be suitable for different videos.

    If anyone can guide me through this it would be much appreciated.

    here is sample of dvd:https://easyupload.io/cjwicq

    this is my script so far:

    a = LWlibavAudioSource("G:\6 directions files\sample\VTS_01_1 T80 2_0ch 256Kbps DELAY -288ms.ac3") # get audio (decompressed to PCM)
    v = Mpeg2Source("G:\6 directions files\sample\VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    import("C:\Users\akuma\AviSynth+\plugins64+\Remove DirtMC.avs")
    Crop(4, 56, -0, -76)
    ColorMatrix(mode="rec.601->rec.709")
    yadif()
    RemoveDirtMC(10, false)
    temporaldegrain2() #or use a simpler (faster) denoiser


    AssumeFPS(24000, 1000, sync_audio=true) # audio sample rate reduced from 48000 to 46080 (lossless)
    SSRC(48000) # convert audio to 48000 Hz samples
    Prefetch(24)
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    this is the same video and script from your other thread.
    What is wrong with the output from this script?
    Quote Quote  
  3. I'm not sure why you're using Yadif. It's a deinterlacer and your sample isn't interlaced.

    Nor am I sure why you're converting to rec.709 as I see no resize to hi-def.

    Also, your white levels should be lowered as they're somewhat blown out
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I used bwdif in my attempt on his previous thread, I chose to interpolate from 1 field,
    the subtitles at the bottom looked clearer this way.
    In the other thread sharc upscaled, but in the script above the OP removed the resize but left the colormatrix command.

    Does this mean the OP doesn't weant to upscale? This is why I posted my question above, it's not clear.
    This is the script I used in the previous thread
    Code:
    function RemoveSpotsMC3x(clip clip, int "limit", bool "_grey")
    {
      _grey = default(_grey, false)
      limit = default(limit, 6)
      i=MSuper(clip,pel=2)
      bvec = MAnalyse(i,isb=false, blksize=8, delta=1, truemotion=true)
      fvec = MAnalyse(i,isb=true, blksize=8, delta=1, truemotion=true)
      backw = MFlow(clip,i,bvec)
      forw  = MFlow(clip,i,fvec)
      clp=interleave(backw,clip,forw)
      clp=clp.RemoveSpots().RemoveSpots().RemoveSpots()   #  <<  original code
    #  clp=clp.RemoveSpots().RemoveSpots()                  #  << remove one call of removespot to make it faster   
      clp=clp.SelectEvery(3,1)
      return clp
    }
    function RemoveSpots(clip input, bool "_grey", int "repmode")
    {
    _grey=default(_grey, false)
    repmode=default(repmode, 16)
    clmode=17
    clensed=Clense(input, grey=_grey, cache=4)
    sbegin = ForwardClense(input, grey=_grey, cache=-1)
    send = BackwardClense(input, grey=_grey, cache=-1)
    alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
    restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
    corrected=RestoreMotionBlocks(clensed, restore, neighbour=input,  alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10,  noisy=12, grey=_grey)
    return corrected
    } 
    
    aud=directshowsource("C:\Users\davex\Desktop\VTS_01_1.mpg",video=no)
    vid=mpeg2source("C:\Users\davex\Desktop\avs_test\cm2.d2v")
    audiodub(vid,aud)
    bwdif(field=0)
    RemoveSpotsMC3x(limit=2)
    mcdegrainsharp(bblur=0.12,csharp=0.36)
    AssumeFPS("ntsc_film", sync_audio=true).ResampleAudio(48000)
    Quote Quote  
  5. Originally Posted by davexnet View Post
    this is the same video and script from your other thread.
    What is wrong with the output from this script?
    It's a different video from other thread.
    Quote Quote  
  6. Originally Posted by manono View Post
    I'm not sure why you're using Yadif. It's a deinterlacer and your sample isn't interlaced.

    Nor am I sure why you're converting to rec.709 as I see no resize to hi-def.

    Also, your white levels should be lowered as they're somewhat blown out
    when i open video on AvsPmod, it looks interlaced. I still need to resize but don't know how to resize it without messing the aspect ratio up.
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Akuma786 View Post
    Originally Posted by davexnet View Post
    this is the same video and script from your other thread.
    What is wrong with the output from this script?
    It's a different video from other thread.
    But the quality looks the same. You haven't said exactly what you're trying to do,
    what criticism you have from the earlier tries, whether you want to upscale, etc.etc.


    We're not mind readers
    Quote Quote  
  8. Hi davexnet, It's a complete different DVD from previous thread. I would like to improve the video quality as much as possible basically (removing dirt and dust) and if upscale is possible too without the picture looking too bad then that too.

    Also I don't know what filters to use to get the best possible improvement in quality. My knowledge of Avisynth is not good.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You can just resize to a 4x3 size, eg. 960x720.
    Here's a sample. Frames per second set to 23.976
    I think the contrast/brightness/gamma could be improved a little more than this
    Image Attached Files
    Quote Quote  
  10. Thank you davexnet. I'll give it a try.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Akuma786 View Post
    Thank you davexnet. I'll give it a try.
    Or you can put in a 16x9 frame and have a small pillar box left and right
    I'll post a sample later.
    Problem is, the image gets softer and softer and what little details
    there are in the source start to vanish. Perhaps some of the other posters will have some ideas.
    Image Attached Files
    Last edited by davexnet; 19th Dec 2024 at 00:38.
    Quote Quote  
  12. Originally Posted by davexnet View Post
    the subtitles at the bottom looked clearer this way.
    In that case, I think I'd use Vinverse instead. It'll only deinterlace what it sees as being interlaced, and not everything.
    Quote Quote  
  13. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by manono View Post
    Originally Posted by davexnet View Post
    the subtitles at the bottom looked clearer this way.
    In that case, I think I'd use Vinverse instead. It'll only deinterlace what it sees as being interlaced, and not everything.
    manono, you're right. I had completely forgotten about it,
    after trying vertical blur and a some other stuff, vinverse was beter.
    Quote Quote  
  14. Originally Posted by davexnet View Post
    Originally Posted by manono View Post
    Originally Posted by davexnet View Post
    the subtitles at the bottom looked clearer this way.
    In that case, I think I'd use Vinverse instead. It'll only deinterlace what it sees as being interlaced, and not everything.
    manono, you're right. I had completely forgotten about it,
    after trying vertical blur and a some other stuff, vinverse was beter.
    I used santiag() in the former thread for basically the same purpose. Don't know why the OP removed it now but deinterlaced, kept the colormatrix but skipped the subsequent upscale.....
    Originally Posted by Akuma786 View Post
    .... My knowledge of Avisynth is not good.
    Keep on learning. It's better than repeating the same or similar problems
    Last edited by Sharc; 19th Dec 2024 at 02:15.
    Quote Quote  
  15. Originally Posted by davexnet View Post
    Originally Posted by Akuma786 View Post
    Thank you davexnet. I'll give it a try.
    Or you can put in a 16x9 frame and have a small pillar box left and right
    I'll post a sample later.
    Problem is, the image gets softer and softer and what little details
    there are in the source start to vanish. Perhaps some of the other posters will have some ideas.
    Thanks, Looks better with some of the dirt removed. I noticed some parts of the hands/ arms missing in some frames in the fight scenes when using RemoveSpotsMC3x(limit=2) in the script so I replaced it with RemoveDirtMC instead and it seems to be better for the fight scenes especially but overall the RemoveSpotsMC3x(limit=2) was better at removing the bigger size dirts on normal paced motions.

    Also i wasn't able to find mcdegrainsharp file anywhere so instead I used santiag(). Can someone help me with getting mcdegrainsharp file please.

    Overall this is what I have so far:

    a = LWlibavAudioSource("G:\6 directions files\VTS_01_1 T80 2_0ch 256Kbps DELAY -288ms.ac3") # get audio (decompressed to PCM)
    v = Mpeg2Source("G:\6 directions files\VTS_01_1.d2v", Info=3) # get video
    AudioDub(v,a) # join audio and video together
    import("C:\Users\akuma\AviSynth+\plugins64+\santiag v1.6.avs")
    import("C:\Users\akuma\AviSynth+\plugins64+\Remove DirtMC.avs")
    Crop(4, 56, -0, -76)
    santiag() #removes the residual combing artefacts
    RemoveDirtMC(20, false) # remove spots (from dust, delamination)

    spline36resize(1200,720) #square pixels
    addborders(40,0,40,0) #pad to 1280x720
    AssumeFPS("ntsc_film", sync_audio=true).ResampleAudio(48000)

    Prefetch(24),

    If anything else can be done to improve on it, please advice me. Thanks
    Quote Quote  
  16. Originally Posted by Akuma786 View Post
    .... My knowledge of Avisynth is not good.
    Keep on learning. It's better than repeating the same or similar problems [/QUOTE]

    Yeah I need to but as I have so many old tapes transfered to DVD in bad condition that need some type of restoration. Thanks
    Quote Quote  
  17. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Here's another try, cleaned up the edges a little more
    Code:
    aud=directshowsource("C:\Users\davex\Desktop\VTS_01_1(1).mpg",video=no)
    vid=mpeg2source("C:\Users\davex\Desktop\avs_test\cm3.d2v")
    audiodub(vid,aud)
    checkmate(thr=8,max=6,tthr2=2)
    vinverse()
    RemoveSpotsMC3x(limit=2)
    crop(8,52,-0,-60)
    levels(0,0.92,255,0,255,coring=true)
    z_ConvertFormat(colorspace_op="470bg:601:170m:full=>709:709:709:full")
    nnedi3_rpow2(2, cshift="spline36Resize", fwidth=1212, fheight=720)
    addgrainc(var=0.6,uvar=0.0)
    sharpen(0.2)
    addborders(34,0,34,0)
    AssumeFPS("ntsc_film", sync_audio=true).ResampleAudio(48000)
    Image Attached Files
    Quote Quote  
  18. Originally Posted by davexnet View Post
    Here's another try, cleaned up the edges a little more
    Code:
    aud=directshowsource("C:\Users\davex\Desktop\VTS_01_1(1).mpg",video=no)
    vid=mpeg2source("C:\Users\davex\Desktop\avs_test\cm3.d2v")
    audiodub(vid,aud)
    checkmate(thr=8,max=6,tthr2=2)
    vinverse()
    RemoveSpotsMC3x(limit=2)
    crop(8,52,-0,-60)
    levels(0,0.92,255,0,255,coring=true)
    z_ConvertFormat(colorspace_op="470bg:601:170m:full=>709:709:709:full")
    nnedi3_rpow2(2, cshift="spline36Resize", fwidth=1212, fheight=720)
    addgrainc(var=0.6,uvar=0.0)
    sharpen(0.2)
    addborders(34,0,34,0)
    AssumeFPS("ntsc_film", sync_audio=true).ResampleAudio(48000)
    Thanks that looks better now. Much appreciated.
    Quote Quote  



Similar Threads

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