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.
+ Reply to Thread
Results 1 to 9 of 9
-
-
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()
Last edited by jagabo; 26th Jul 2017 at 18:54.
-
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.
-
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. -
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()
-
Try here.
I know I don't have to import .avsi,
And I'm not sure if avsi files belong in the AviSynth plugin folder or VirtualDub plugin folder.
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. -
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. -
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.
-
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
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.
Similar Threads
-
what causes this flickering after encoding?
By zanzar in forum Newbie / General discussionsReplies: 1Last Post: 24th Feb 2016, 14:19 -
DVDR with Lines on Top and Lines on Bottom?
By Disco Makberto in forum MediaReplies: 13Last Post: 14th Feb 2015, 02:34 -
Flickering effect (on/off)
By kj1983 in forum EditingReplies: 9Last Post: 30th Sep 2014, 04:15 -
Aliased edges on video playback after downsizing in AVIDemux
By Dave2ic in forum Video ConversionReplies: 2Last Post: 13th Apr 2013, 04:04 -
Flickering chroma(?) lines in VHS capture
By Tel147 in forum Capturing and VCRReplies: 28Last Post: 3rd Oct 2012, 06:57