Welcome to the new home of my QTGMC deinterlacing tutorial. This post will be updated periodically as new changes happen and new info comes out, or until a better option comes along.
Changes since last post/video:
- I've switched to an entirely 64-bit workflow
- QTGMC has some new requirements
- I've dropped FFMPEG as the recommended rendering program in favor of VirtualDub2
- AVISynth Info Tool is now the recommended way to check and make sure that you've installed AVISynth correctly.
BIG DISCLAIMER: This process may not work, may crash, or may do other things to your system. Virus scan everything you download. It's not a 100% guarantee that you'll avoid getting a malware infection, but it's a lot better than not checking at all.
Follow this tutorial at your own risk.
Also, this tutorial is for Windows 10. Most of the steps work for previous versions of Windows, but may require slight modifications. Users of MacOS and other OSes should look elsewhere.
If you don't have 7-zip already installed, you won't be able to open many of the downloaded archives. The stable, 64-bit version should be fine.
Next, we're going to need to get AVISynth+. You can grab it from here:
Then, we'll need to get all the filters (plugins) needed:
Note: Version 2.40 has been shown to corrupt video frames. Please either use a different version, or use LSMASHSource as linked below.
The deinterlacing plugin of choice. Requires a whole host of additional plugins, of which you will be using the 64-bit versions (if an option is given). For most uses, only the "Core Plugins and scripts" are necessary.
For the "Zs_RF_Shared.avsi" link, right-click on the link and do "Save Link As", or whatever the equivalent is in your browser of choice.
DO NOT forget to download the 32-bit FFTW3 library as well. Without it, QTGMC will not run.
This is like an IDE for AVISynth scripts, and is pretty much essential IMO. Grab the 64-bit version for this tutorial.
When finished downloading, virus scan all the things.
Then, go to the plugins64+ directory for AVISynth+. For example, the default install creates a plugin folder at:
Extract all "x64" versions of the .dll and .avsi files to the plugins directory (if given a choice) from all plugins EXCEPT the fftw-3*.dll archive. If there's a choice between AVX, AVX2 and a version without AVX, you'll need to know what instruction sets your processor supports. CPU-Z or AVISynth Info Tool can tell you this if you're not sure.
Now, open the fftw-3*.dll archive, then (as noted on the QTGMC page) extract the libfftw3f-3.dll file. Make a copy of it and rename it as "FFTW3.dll". Place the files "libfftw3f-3.dll" and "FFTW3.dll" in the SysWow64 folder. Don't ask me why you have to do this, I agree that it seems pointlessly tedious.
Extract the AvsPMod archive to wherever you want to run it from - again, I recommend your user folder.
Making your .avs script
Now that everything's ready, let's go to the directory with your video files and make an .avs script. Right-click anywhere in the directory, select New, then AVISynth Script and rename it however you want. If that option doesn't show up, you can just create a new text file and change the .txt extension to .avs.
Here's my boilerplate .avs script settings for deinterlacing:
SetFilterMTMode ("QTGMC", 2)
The "atrack=1" option for FFMPEGSource selects the track of audio that is passed through during processing. If the default option doesn't give you audio in the results, try "atrack=-1" instead.
a=LWLibavAudioSource(source="yourfile.m2ts", stream_index=-1, cache=true, av_sync=true, rate=0, decoder="")v=LWLibavVideoSource("yourfile.m2ts")AudioDubEx(v,a)
If you need to output 29.97fps (25fps for PAL) rather than 59.94fps (50fps for PAL) at this stage, then add FPSDivisor=2 to the QTGMC command like so:
PS: VirtualDub2 doesn't generate "official" ProRes files, so if it will be the last stop in your export chain, consider using a different workflow if the file is going to a major TV channel. Some channels have reportedly (at least according to editors on Reddit's /r/editors subreddit) said that FFMPEG ProRes files won't pass QC with them.
Optional - Cropping and resizing to HD resolutions
Here's what to add if you want to upscale SD to HD with a center crop:
Note that the numbers in the crop command refer to left,top,right,bottom respectively, and the right and bottom numbers are negative, while the left and top numbers are positive. Don't ask me why AVISynth does this, it just does.
The above settings will give you as close to a 16x9 frame as you can get out of this resolution. Technically, 720x405 is true 16x9, but the chroma subsampling options supported by QTGMC don't like odd numbers, so 720x404 is the closest you can get.
Also, this may crop off more than you want, so feel free to play around with the settings. If you want to frame a different part of the image (like the top or bottom versus the middle), then just adjust the crop numbers accordingly by adding what you subtract from one number to the other, or vice versa. For example, to use just the top part of the frame, you would do:
It has a ton of additional features listed on the wiki page, which you can play around with if the defaults don't work for you.
Optional - FFMPEG
Alternatively, you can extract the archive to somewhere on your system and then set up FFMPEG to run from any directory by adding it to your PATH variable:
- Press the Windows and R keys.
- Type "control sysdm.cpl,,3".
- Click "Run".
- Click on "Environment Variables".
- Select "Path" under "System variables" and click "Edit".
- Go to where you extracted ffmpeg.exe.
- Select and copy the folder's path address from the address bar towards the top of the window.
- Back in the "Edit environment variable" window, click "New" and paste in the folder path. Click OK on all the windows you opened to get here.
ffmpeg -i "videofile.avs" -c:v prores -profile:v 3 -pix_fmt yuv422p10le "output.mov"