VirtualDub

     With dvupscale.avs customized to suit your needs, open it in VirtualDub. Either run VirtualDub.exe from its directory, or right click the .avs file and choose Open With. Find VirtualDub.exe (not vdub.exe) and you'll be good to go. From now on the right click->Open With menu should show VirtualDub as an option, making access to your AviSynth scripts' output that much more convenient.

     After a few moments the program should start up, with your video displayed in two windows. The left shows the video coming into VirtualDub, right is video as it goes out of VirtualDub. Since we won't be applying any filters in VDub itself, these two remain identical through our procedure. At the bottom of the screen are the transport controls. Stop, Play Input, Play Output, and a series of others that aren't really important for our purposes. Check the VirtualDub help file for details to learn more. All you'll do now is click on the timeline in a few different places to snap the playhead there and see what your video looks like after it's passed through our deinterlacing and scaling tools. You'd do well to find some segments that feature fine detail, and areas that show diagonal lines, they'll help you get a sense of how well TempGaussMC does its job, even when set to its lowest possible quality.

     Once you're satisfied that you like what you see, we can do what we're here for and upscale this clip. With VirtualDub still open, load your script in Notepad if it's not still up. Change the last line back to

SimpleSlugUpscale()

as it was initially. It would have been simpler to have you leave that line the way it was, not bothering with the "low" or "480sq" stuff, but this way you get a little experience with both AviSynth function arguments and a wonderful time saver VirtualDub offers: save your script, switch back to VDub, and hit F2. After a few seconds the video will be updated to reflect the changes you've made. Exceptionally useful, this feature dramatically increases productivity when experimenting with AS script settings.

     Now that that's taken care of, it's time we compress our clip. Up in the menu bar, click Video, then Fast Recompress. VirtualDub used to convert all video input to RGB color space as a matter of course, and Fast Recompress was the only way to avoid forced conversions when they were unnecessary. As per the documentation, however, this has changed in recent releases, and as long as the VirtualDub filter list is empty (Video->Filters or Ctrl+F) video will remain in its original color space (if supported by the selected output codec). Nonetheless, as I understand it Fast Recompress still offers a performance improvement, however slight. With such a slow chain of AviSynth filters, it may not matter, but I like to play it safe.

     Next we set the compression by going to Video->Compression (or Ctrl+P) and choosing "Lagarith lossless codec" from the list. Click the Configure button over on the right and make sure "Always Suggest RGB for Output" is checked. The other three options should be turned off, even multithreading. We're already multithreading by way of AviSynth, we don't want the Lagarith codec itself branching out and potentially causing problems. It hasn't, in my testing, but it also hasn't improved encoding speed when used with multithreaded AviSynth scripts. It may prove to be a useful option to enable when decoding Lagarith files, but during the encode I feel safer leaving it off. I'd recommend setting Mode to "YV12", since the video coming into VDub from AviSynth is in that color space already, and you'll save some storage space that way. "Always Suggest RGB for Output" ensures that the decoder will be able to provide RGB data to whichever media player or other application opens the compressed file.

     That's all there is to it. "OK" your way out of the two dialog boxes and hit F7 on your keyboard. This brings up the Save As AVI dialog, where you can save your video the way you would any other file. Find a convenient location, give the file a name, click OK and off you go! The safest thing to do now is uncheck the two boxes in the Status window, "Show input video" and "Show output video". We don't need VirtualDub trying to draw the result of our script to the screen while it's busy encoding.

     Now it's just a matter of time. Once the video is finished, the Status window will disappear, and you can go find your video in Windows Explorer. You should be able to decode the Lagarith file with any media player that supports VfW codecs (as long as Lagarith is installed on the system being used to view the file), and if my research is accurate a good number of popular video editing programs can import Lagarith AVIs without issue. If yours is among these, you're finished! Have fun experimenting with the script, check the SimpleSlug page for a more in depth look at its various settings, take a look at the troubleshooting section for some useful tips, and please don't hesitate to contact me with any questions or comments!

     But what if your software can't open the video? And even if it can, can't anything be done about the disk space requirements of rendering intermediate files? It turns out there is, in fact, a way to feed the output of your scripts into applications that don't natively support AviSynth. The next page will discuss the "AviSynth Virtual File System" and how it can make your life so much easier.