QTGMC DVD Encoding Guide Version 0.2 (2/2018)
Total Page:16
File Type:pdf, Size:1020Kb
QTGMC DVD Encoding Guide version 0.2 (2/2018) Written by LeoBloom for Empornium. Feel free to share. This work is licensed under a Creative Commons Attribution 4.0 International License. Version history: 0.2, 2/2018: Added detailed software and plugin installation instructions 0.1, 12/2017: Initial release 1 Contents Contents ............................................................................................................................................2 Background .......................................................................................................................................3 Why should I go through all this trouble, it’s just porn ........................................................................3 Required and recommended Software ...............................................................................................4 Required software/scripts: ....................................................................................................................... 4 Recommended software/scripts: ............................................................................................................. 4 Software installation notes ....................................................................................................................... 5 Avisynth plugin installation notes ............................................................................................................. 6 List of installed plugins after correct installation ...................................................................................... 7 Ripping scenes from the DVD image and making them AviSynth readable ...........................................8 Creating and tuning AviSynth scripts ................................................................................................ 15 Encoding and Muxing ....................................................................................................................... 18 Other QTGMC and AviSynth parameters ........................................................................................... 21 Flickering at top/bottom ......................................................................................................................... 21 Keeping original frame rate .................................................................................................................... 21 Sharpening .............................................................................................................................................. 21 Adjusting the color balance .................................................................................................................... 21 Retaining more noise .............................................................................................................................. 22 Removing noise ....................................................................................................................................... 22 Using QTGMC with progressive material ................................................................................................ 22 Detelecining/Inverse telecining .............................................................................................................. 22 Final Checks before Release ............................................................................................................. 24 Summary: Workflow and final words of wisdom ............................................................................... 24 Useful Batch Scripts and Commands ................................................................................................. 25 DGIndex_all ............................................................................................................................................. 25 Create_avs .............................................................................................................................................. 25 Masterbatch (test encodes) .................................................................................................................... 26 Masterbatch ............................................................................................................................................ 26 Make_mono_and_keep_AC3 ................................................................................................................. 26 mkvmerge_all_from_vob ........................................................................................................................ 26 Possible improvements and alternative routes to QTGMC ................................................................. 27 Further reading ................................................................................................................................ 27 Acknowledgements.......................................................................................................................... 28 2 Background Traditional CRT TVs used to display 60 half-images per second (USA/NTSC, 50 per second in Europe/PAL). As DVDs were introduced in the late 1990s, long before affordable LCD TVs were available, the vast majority of DVDs adheres to this standard and encodes its content as half images. 50% of the stored movie frames contain the odd lines, and 50% contain the even lines – the movie is interlaced. Assembling these alternating half images into full images is called deinterlacing and is necessary if the material is to be displayed on a non-CRT display. This deinterlacing process turns out to be surprisingly difficult, and most freely available encoding software like Handbrake gets it wrong. The results are left- over combing artifacts and/or aliasing (jagged diagonal lines) as well as shimmer around moving objects. The aim of this guide is to show how to deinterlace properly with much improved image quality using an algorithm called QTGMC. This algorithm substantially increases image quality through motion compensated temporal averaging of the images and eliminates the above-mentioned artifacts. QTGMC is written in AviSynth, a simple scripting language for video editing. The concept of a scripting language may be intimidating, but it is actually very easy to use, thanks to a great editor called AvsPmod. With it, one can preview in real time the effects of changes in the script. Why should I go through all this trouble, it’s just porn You are going to watch your favorite porn clips many more times than your favorite movies. It is worth putting some effort into making your favorite scenes as good looking as they can possibly get. Of course, all methods described here also work just as well for mainstream movies. 3 Required and recommended Software This guide is for Windows 7-10. QTMGC should be possible on Linux and OS X as well, using alternative software (see page 27) or windows emulation/WINE, but that is beyond my expertise. All software listed here is freeware. Required software/scripts: FFmpeg (for encoding, 32 bit version): https://ffmpeg.org/download.html AviSynth (32 bit version, for running QTGMC): https://sourceforge.net/projects/avisynth2/ QTGMC and required scripts: http://avisynth.nl/index.php/QTGMC DGIndex and DGDecode plugins: http://avisynth.nl/index.php/DGDecode DVD Shrink: https://www.videohelp.com/software/DVD-Shrink MKVToolNix: https://www.fosshub.com/MKVToolNix.html VOB Merge: https://www.videohelp.com/software/VOBMerge (2.55 unofficial is much better than 2.52) AvsPmod: https://github.com/AvsPmod/AvsPmod/releases Recommended software/scripts: DVD Decrypter: https://www.videohelp.com/software/DVD-Decrypter Mediainfo: https://mediaarea.net/en/MediaInfo/Download Avidemux: http://avidemux.sourceforge.net/ Sed: http://gnuwin32.sourceforge.net/packages/sed.htm LSFmod (for AviSynth): http://avisynth.nl/index.php/LSFmod TIVTC/TDecimate: http://avisynth.nl/index.php/TIVTC/TDecimate Decomb: http://avisynth.nl/index.php/Decomb 4 Software installation notes Some software is installed with installers, most is just unzipped from folders. I recommend creating a new directory in C:\ called “Software” or something similar, and extract these zip files there, into a sensible folder name. It is also possible to put these files into the Windows Program Files (x86) directory, but this is less advisable from a security point of view. Installation instructions: Avisynth: Default install, use 32 bit version DVDShrink: Default install VOBmerge: Extract into a folder, e.g. c:\software\vobmerge AvsPmod: Extract into a folder, e.g. c:\software\AvsPmod DGIndex: Extract into a folder, e.g. c:\software\DGIndex. One DLL file needs to be copied to the Avisynth plugin folder, see below. FFmpeg: Use 32 bit version. Extract into a folder, e.g. c:\software\ffmpeg . Put the bin folder with the executables (e.g.c:\software\ffmpeg\bin) into the system environment PATH variable. Guide for setting environment variables: https://www.computerhope.com/issues/ch000549.htm 5 Avisynth plugin installation notes The process of installing these plugins is cumbersome indeed, so here are precise instructions. Make sure you only install the 32 bit (also sometimes called x86 or Win 32) versions of the plugins. Accidentally installing 64 bit versions seems to be the most common mistake. Almost all AviSynth plugins go into this folder: C:\Program Files (x86)\AviSynth\plugins . This includes dll files and text files with the .asvi or .asv ending. All plugins listed on the QTGMC webpage need to be in that