Getting Started with Avisynth

Turn your PC into a video powerhouse

Making the Edits

Now we open the skeleton script with AvsP:

Avisynth

You'll see that the variables in the template have been filled in with actual values derived by DGIndex from the input file. A time-saver, as promised. But wait! We're not ready to run this script yet.

Those functions in the first two lines aren't native to Avisynth. They're external functions, and Avisynth won't have a clue what to do with them. The AvsP Help menu brings up a manual of all Avisynth's commands and functions.

Fixing this is very simple. From the DGMPGDec sub-directory inside Video Tools, drag out the file called DGDecode.dll and dump it inside the Avisynth plugins sub-directory. That takes care of the MPEG2Source. Do the same thing with NicAudio.dll from the NicAudio directory. Any external plugin that's moved into the Avisynth plugins directory will be automatically loaded every time Avisynth is restarted.

Once that's done, re-open the script file in AvsP. Now we can press the 'Show Frames' button: that discreet, up-pointing triangle down in the left hand corner. It swivels to point downwards, and we get....

Avisynth

At this point we can use the Left and Right cursor keys to step forward or back frame by frame, or use the double-arrows next to the 'Show Frames' triangle to do the same thing. The Up and Down cursor keys move us with in steps of one second, and the PageUp, PageDown keys navigate in one-minute steps. We can use this to find the first ad break, which is where AvsP starts to do its magic.

Converting Cuts to Dissolves

The author of AvsP, the mysterious Qwerpoi <qwerpoi.avsp@gmail.com> - alas he seems to be uncontactable these days - once wrote me a macro to speed up the conversion of cuts to dissolves:

entry = avsp.GetTextEntry('Select and copy the trim commands here:')
splitentry = entry.split('++')
if len(splitentry) == 2:
 newString = 'Dissolve(%s, %s, 25)' % (splitentry[0], splitentry[1])
 avsp.InsertText(newString, pos=None)



Biting the hand that feeds IT © 1998–2018