View Single Post
Old 7th April 2010, 23:20   #1  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
SimpleSlugUpscale - Scaling helper script, arbitrary size and PAR input/output

Latest release (currently 1.13)

SimpleSlugUpscale is a QTGMC-based helper script for AviSynth 2.5.x, designed to ease the process of cropping, scaling, and/or letter/pillar/windowboxing clips from one size and shape to another, while taking pixel and display aspect ratios into account.

There are no requirements for progressive input, but interlaced footage needs QTGMC and its dependencies, all of which are linked from that thread. I've also prepared a brief tutorial on the use of SimpleSlug for upscaling, but it's mainly for people unfamiliar with Avisynth.

Full documentation is available in the script itself, but the basics are as follows:

1.) If your input is progressive, set prog=true
2.) If your input is widescreen NTSC DV, widescreen PAL DV, or 1440x1080 HD with a DAR of 16:9, set widein=true
3.) Set size to one of the presets from the following list:

Code:
name		dimensions				PAR	interlaced?

deint		same as input				same	no
square		square pixel equivalent of input	1:1	no
480sq		640x480					1:1	no
360sq		640x360					1:1	no
DVfullpNTSC	720x480					10:11	no
DVfulliNTSC	720x480					10:11	bottom field first
DVfullpPAL	720x576					12:11	no
DVfulliPAL	720x576					12:11	bottom field first
DVwidepNTSC	720x480					40:33	no
DVwideiNTSC	720x480					40:33	bottom field first
DVwidepPAL	720x576					16:11	no
DVwideiPAL	720x576					16:11	bottom field first
720p		1280x720				1:1	no
1080pana	1440x1080				4:3	no
1080iana	1440x1080				4:3	top field first
1080psq		1920x1080				1:1	no
1080isq		1920x1080				1:1	top field first
So, if you have progressive, anamorphic input, and you want 1920x1080p output, you'd use this:

Code:
SimpleSlugUpscale(prog=true,widein=true,size="1080psq")
To get a look at the default settings in action, see this NTSC DV original scaled up to 720p: http://www.gyroshot.com/files/simple...e-defaults.mp4 Compressed with x264 revision 1745, 32 bit, 8 bit depth from x264.nl, using --preset slower --tune fastdecode --keyint 300 --sar 1:1.

On top of that, here are some sample frames (from footage I shot or generated myself, and all hosted on my own webspace) to give you an idea of what can be achieved with SSU:









To give a little background on the origin of this thing, I've been a member of the DV Info Net forums since 2003, and in the past few years the subject of SD to HD upscaling has occasionally cropped up. With more and more people getting into HD video production, now and then someone would find themselves needing to stick an old SD clip into an HD project, and they weren't always elated with the results. Having spent several years toying with Avisynth in my spare time, and having discovered the wonder of TempGaussMC, I took the opportunity in one of those discussions to recommend that combination for the task of deinterlacing and upconversion, and I walked another member through the process of installing all the software and piecing together a script.

When the subject came up again in February 2010, I started preparing an updated, better informed, much cleaner and hopefully more understandable tutorial, and swiftly realized how complicated the whole thing was to explain. I thought a script to take care of as many of the details as possible would be a good idea, hence SimpleSlug. "Simple" for the few adjustments necessary to get usable results, "Slug" to reinforce the lengthy nature of the processing involved.

I finally got around to starting a thread here with the release of version 0.7g, and since then have produced a few more revisions. Over that time the script has inched away from being a DV-to-HD upscaling script and closer to being a general purpose resizing assistant. My choice of default deinterlacer (now QTGMC with the advent of all -Vit-'s handy presets), and default settings, is still based primarily on my testing with DV sources being scaled to 720 output, but the script handles a bunch of other things, too.

I can't pretend to be an expert, and though I've done my best to keep this script clean and offer a set of useful features, I'm certainly not averse to suggestions or corrections. That goes for both the script and the tutorial, which I tried to write as an accurate, but relatively simple way for people who aren't Avisynth gurus to get some use out of QTGMC and the scaling algorithms AS offers.

Please, by all means, feel free to offer ideas for improvements, or let me know that I've done something exceptionally stupid. I have a way of turning everything I do into a Rube Goldberg contraption, and I've already done some real bonehead things in earlier revisions of the script, so I won't be surprised to find yet another way I've taken the long way around in accomplishing some goal. Check the bottom of the script's page to find old versions and you'll be able to see what changes I've made so far; if nothing else I hope this script and its predecessors (the following posts refer variously to versions 0.7g onward) prove useful to learn from.

Last edited by Robert Martens; 14th August 2013 at 00:57.
Robert Martens is offline   Reply With Quote