VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. I'm trying to reencode a cartoon from a dvd, but the ugly lines are driving me crazy. I'm not good at Avisynth scripts, but I use Handbrake and Hybrid. Hybrid detects the video as interlaced: bottom field first, but it doesn't look interlaced to me. I've tried several deinterlacers, detelecine, and antialiasing filters, but nothing seems to fix ugly lines. Any ideas?

    I've uploaded a 10 second clip from the DVD to MakeMKV where you can clearly see the flickering/aliased lines.
    Image Attached Files
    Quote Quote  
  2. QTGMC(InputType=2) is designed for this. It won't be perfect but it will be much better. Adding Santiag() (antialiaser) after that will clean it up a bit more.

    Code:
    Mpeg2Source("clip1.d2v")
    TDecimate()
    QTGMC(InputType=2)
    Santiag()
    And if you're a real glutton for punishment add QTGMC(InputType=1) to the end of that script:
    Image Attached Files
    Last edited by jagabo; 26th Jul 2017 at 18:54.
    Quote Quote  
  3. Wow, that looks good. I can't seem to get it to work in Hybrid. And I get an error when I try to load the script in VirtualDub. I'm still just starting out learning how to use scripts. Do I need certain plugins? I tried googling TDecimate plugin, but just found a dead link. And I'm not familiar with d2v. Is that a necessary format? I tried FFmpegSource2("clip.mkv") instead.
    Quote Quote  
  4. If you're going to try and clean up anime you have to learn some AviSynth. There is no other way.

    TDecimate is part of the TIVTC set of filters. QTGMC needs a bunch of stuff. hello_hello, who spends time here, has a package with all needed filters. A D2V is a DGIndex project file. It comes with the DGMPGDec package. Get it and read the 3 very importantant included docs as they will go a very long way towards getting you started working on DVDs in AviSYnth.

    Oh, and Santiag can be found HERE. None of the filters jagabo used are included in the basic AviSynth installation.
    Quote Quote  
  5. I haven't found that package of filters you mentioned. I managed to get the video to load in VirtualDub using FFmpegSource2("clip.mkv"), but I'm having an issue with QTGMC(InputType=2). When I include that part, I get an error unable to open.

    I've removed the paths, but here is my code. Am I missing something? I tried to include all of required plugins that I could see. I know I don't have to import .avsi, but it wasn't working either way. And I'm not sure if avsi files belong in the AviSynth plugin folder or VirtualDub plugin folder. I currently have everything in the AviSynth plugin folder.

    Code:
    LoadPlugin("ffms2.dll")
    LoadPlugin("mvtools2.dll")
    LoadPlugin("RgTools.dll")
    LoadPlugin("TIVTC.dll")
    LoadPlugin("masktools2.dll")
    LoadPlugin("nnedi3.dll")
    LoadPlugin("PlanarTools.dll")
    import("QTGMC.avsi")
    import("SMDegrain v.3.1.2d.avsi")
    import("santiag.avs")
    FFmpegSource2("clip.mkv")
    TDecimate()
    QTGMC(InputType=2)
    Santiag()
    Quote Quote  
  6. Originally Posted by tom_nito View Post
    I haven't found that package of filters you mentioned.
    Try here.

    I know I don't have to import .avsi,
    You have it as an AVSI and not an AVS? I can't really help with that particular problem as I load everything using complete paths. You might give that a try for your QTGMC. And you have all the other required filters?

    And I'm not sure if avsi files belong in the AviSynth plugin folder or VirtualDub plugin folder.
    If you want them to autoload you put them in the AviSynth plugins folder. The VDub one is for VDub filters. But if you use a complete path, you can stick it anywhere you like.

    I don't think any of those lines before your source filter are doing anything at all, because those DLLs and functions aren't in the same folder as your video. But I could be wrong, I suppose, as I don't do it that way.
    Quote Quote  
  7. I finally got the script working. I had to uninstall and reinstall AviSynth several times. I'm unclear if I should be using 32-bit or 64-bit plugins for 32-bit AviSynth if I have Windows 64-bit. And I couldn't find info on which masktools2 and nnedi3 DLLs I should use since there are even more choices. For fftw, I thought about installing 64-bit since it's going in my system folder, but dfttest seemed to specifically mention 32-bit, so that's the one I installed.

    Is there a quality in output difference between 32-bit and 64-bit plugins, or is it just a speed and memory difference?

    I think I figured out how to use the script in Hybrid, so I thankfully don't have to figure out how to encode it through script. And I messed around a little with MeGUI.
    Quote Quote  
  8. Everything in the chain must be 32 bit, or everything must be 64 bit (aside from the OS). So 32 bit AviSynth + 32 bit filters + 32 bit editor/encoder. The 32 bit environment is basically a separate virtual computer in your 64 bit computer/OS. There's no quality difference between them, not much speed difference, just memory availability.
    Quote Quote  
  9. I was getting out of sync audio using the same code in Hybrid with the internal deinterlacer set to None. I think something internal was forcing it to run at 30p instead of 24p. So this is the code I jerry-rigged together, and it seems to be working. I use TIVTC in the built-in settings, which properly sets the FPS to 24p and then run the custom script after deinterlacing.

    Code:
    SetMemoryMax(768)
    SetMTMode(5,4) # change MT mode
    LoadPlugin("LoadDll.dll")
    LoadPlugin("TIVTC.dll")
    LoadPlugin("unblock.dll")
    LoadDll("LIBFFT~1.DLL")
    LoadCPlugin("ffms2.dll")
    # loading source: title01.mkv
    #  input luminance scale tv
    FFVideoSource("title01.mkv",cachefile="mkv_a493c66c6ff56d3856996c95f4bebf3b_8480_1_0.ffindex")
    # deinterlacing
    SetMTMode(2) # change MT mode
    AssumeBFF()
    TFM(mChroma=true)
    TDecimate(mode=1,cycleR=1,cycle=5)
    
    # CUSTOM SCRIPT PART - position: cropping - START
    function croppingCustom(clip clp) {
      last=clp
      import("santiag.avs")
      SetMTMode(2)
      AssumeBFF()
      QTGMC(Preset="Slower", InputType=2, ediThreads=2)
      Santiag()
    }
    # CUSTOM SCRIPT PART - position: cropping - END
    
    croppingCustom() #loading custom script content
    # filtering
    return last
    Attached is the result. It takes about 30-40 minutes for a 22 minute 480p video. Does it look okay? Yours looked a little better, but it might just be because the picture is smaller, so the imperfections are less noticeable.

    I tried including daa antialiasing too to see if it would remove some of the lingering aliasing, but the video came out weird. I also tried including QTGMC(InputType=1) at the end, but it seemed to cause some sort of choppy ghosting.
    Image Attached Files
    Quote Quote  



Similar Threads