I am looking for some basic Avisynth+ scripts, utilizing QTGMC, to deinterlace certain (non telecined) .mkv DVD rips. Most of these are of the late 80's and 90's era, think "back to the future". Trying to get some ideas to play around with and learn; yet save time on the trial and error.
Am currently using a basic "Fast" QTGMC preset and I'm definitely losing sharpness. There are just so many additional options that I dont know where to begin.
Yes, I understand the difference between interlaced and telecined videos, and for the subject of this post, I'm asking about interlaced. And I would not be asking if these videos could play without interlacing artifacts on the local devices connected to my media server (.Onn player connected to TV for example).
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 13 of 13
			
		- 
	
- 
	There are thousands of threads here about QTGMC. Just do a search. Or post a particular sample (the source, not deinteralced or re-encoded) that's giving you problems. 
- 
	Here's a photo of my display playing on the Onn direct play through a gigiabit LAN of the .mkv ripped directly from the disk 
 
 
 [Attachment 85458 - Click to enlarge]
 
 Format : Matroska
 Format version : Version 2
 File size : 4.27 GiB
 Duration : 1 h 54 min
 Overall bit rate mode : Variable
 Overall bit rate : 5 351 kb/s
 Frame rate : 29.970 FPS
 Encoded date : 2025-02-13 01:35:46 UTC
 Writing application : MakeMKV v1.17.9 win(x64-release)
 Writing library : libmakemkv v1.17.9 (1.3.10/1.5.2) win(x64-release)
 
 Video
 ID : 1
 ID in the original source medium : 224 (0xE0)
 Format : MPEG Video
 Format version : Version 2
 Format profile : Main@Main
 Format settings : CustomMatrix / BVOP
 Format settings, BVOP : Yes
 Format settings, Matrix : Custom
 Format settings, GOP : M=3, N=15
 Format settings, picture structure : Frame
 Codec ID : V_MPEG2
 Codec ID/Info : MPEG 1 or 2 Video
 Duration : 1 h 54 min
 Bit rate mode : Variable
 Bit rate : 5 154 kb/s
 Maximum bit rate : 9 641 kb/s
 Width : 720 pixels
 Height : 480 pixels
 Display aspect ratio : 4:3
 Frame rate mode : Constant
 Frame rate : 29.970 (30000/1001) FPS
 Standard : NTSC
 Color space : YUV
 Chroma subsampling : 4:2:0
 Bit depth : 8 bits
 Scan type : Interlaced
 Scan order : Top Field First
 Compression mode : Lossy
 Bits/(Pixel*Frame) : 0.498
 Time code of first frame : 00:00:00:00
 Time code source : Group of pictures header
 GOP, Open/Closed : Open
 GOP, Open/Closed of first frame : Closed
 Stream size : 4.11 GiB (96%)
 Language : English
 Default : No
 Forced : No
 Original source medium : DVD-Video
- 
	It is playing through a plex app. I can look at the decoder, but I believe it's android based. 
 
 TFF/BFF is all ok. I'm asking about a good basic deinterlacing script. I certainly understand the concern to not deinterlace at all, but that is something else i'm looking at.
 
 Yes, thousands of threads but I have yet to find a basic script. I mean, you look at all of the "similar threads" and theres nothing there. I've come up with the following on my own but dont quite have the hours to compare and contrast. Feels like i'm reinventing the wheel here that someone else probably already has a go-to script for most interlaced dvd's.
 
 deinterlaced=video_org_crop.AssumeTFF().QTGMC(pres et="fast", EdiThreads=3)
 deinterlaced=video_org_crop.AssumeTFF().QTGMC(Pres et="Medium", SourceMatch=2, TR2=2 )
 deinterlaced=video_org_crop.AssumeTFF().QTGMC(pres et="fast", SourceMatch=3, Lossless=2, MatchEnhance=0.75, EdiThreads=3)
 deinterlaced=video_org_crop.AssumeTFF().QTGMC(pres et="slow", matchpreset="slow", matchpreset2="slow", sourcematch=3, tr1=2, tr2=1, NoiseTR=2, sharpness=0.1)Last edited by jeby1980; 13th Feb 2025 at 16:50. 
- 
	Something like this is sufficient for most videos: 
 Be sure not to resize before deinterlacing. If you crop before deinterlacing be sure to crop by even values on the vertical axis. Otherwise you will reverse the field order. Some source filters don't handle MPEG 2 video in MKV properly. And loss of sharpness isn't the usual complaint about QTGMC -- too much sharpening is. Post your entire script.Code:LWlibavVideoSource("filename.mkv") QTGMC()
 
 Thin horizontal lines are sometimes confused with interlacing and blurred (or moire) by QTGMC. Lossless mode can sometimes prevent that. But you get less effective deinterlacing elsewhere -- typically seen buzzing edges.
 
 
 
 There's no way Back to the Future was shot as interlaced video. Maybe you have a PAL/NTSC conversion?Last edited by jagabo; 13th Feb 2025 at 17:48. 
- 
	SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) 
 
 video_org=FFmpegSource2("xxxxxxxxx.mkv", atrack=-1)
 
 deinterlaced=video_org.AssumeTFF().QTGMC(preset="f ast", EdiThreads=3)
 
 return(deinterlaced)
 prefetch(10)
- 
	
- 
	path = "K:\Videos\" 
 filename = "YourFilename.avi"
 # Spline and Lanzcos are the best resizers (and avoid bilinear)
 # Spline 64 or Lanzcos best for upscaling
 # bicubic for downscaling
 # SetFilterMTMode("QTGMC", 2)
 FFmpegSource2( path + filename , atrack = 1)
 ConvertToYV12(interlaced = true)
 # AssumeBFF()
 # FPSDivisor 1=double rate; 2=single rate
 QTGMC(Preset="Slower", Edithreads=4)
 # Crop(0 , 0 , -2 , -2)
 # BicubicResize (640,480)
 # LanczosResize(720,540,taps=4)
 # BilinearResize(640,480)
 Spline64Resize(720,540)
 # Prefetch()
 # Trim(0, 3597) # 1 minute @59.94 fps
 # Version()
- 
	Nice, thanks. 
 
 As an aside, when you run this in virtualdub, what do you usually set the video compression as? Leave it (Uncompressed RGB/YCbCr) and then encode it in handbrake with h.264/h.265 perhaps?
- 
	Yes ... VirtualDub2_v2.2 works extremely well for this. Or you can simply specify the avs script using ffmpeg in command line mode within a .BAT file, which is what I do. 
 
 For example
 REM SVT-AV1 for 60 second clip.
 ffmpeg -i Filename.avs -t 00:01:00 -c:v libsvtav1 -preset 4 -crf 21 -c:a libopus -b:a 192k Filename.mkv
Similar Threads
- 
  Deinterlacing Source in AvisynthBy bit.whisperer in forum Video ConversionReplies: 16Last Post: 25th Jan 2024, 20:34
- 
  (Noob) Deinterlacing issue with early 2000s DVD-Rip | AviSynth + QTGMCBy expo_ in forum Newbie / General discussionsReplies: 19Last Post: 18th Dec 2023, 05:13
- 
  Bob deinterlacing in AviSynth without doubling the frame-rate?By orion44 in forum Video ConversionReplies: 11Last Post: 6th Dec 2021, 01:44
- 
  AviSynth Script for Only Deinterlacing Combed Lines (MeGUI)By AOmundson in forum Video ConversionReplies: 9Last Post: 15th Mar 2021, 15:04
- 
  Best AVISynth+ settings for deinterlacing these DVDs?By Xandros in forum Video ConversionReplies: 2Last Post: 15th Jun 2020, 04:34


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote