MeGUI/Tools/AviSynth Script Creator
Basic input and processing.
?
Video Input: Load the video source you want to use
as input.
?
Re-open original video player: Reopen MeGUI's
video preview window.
?
Video DAR: Set the input
DAR. MeGUI mostly detects
this correctly.
?
Clever (TM) Anamorphic Encoding: Checking this box will enable
anamorphic
encoding.This is for 16:9 (squished )features and ensures the aspect ratio choice
selection at the last step is accurate. It is usaully safe to leave this off for 4:3 features.
There are four methods to encode anamorphic video with MeGUI:
?
Resize to mod16: Video is cropped as
requested, then resized to
mod16 dimensions.
?
Overcrop to achievemod16: Video is cropped by at least the requested numbers. Extra
cropping is done so the final video is mod16. Recommended as the extra picture
that may be cropped is usually not noticeable compared to the compression
efficiency impact noticed by stray black bars and a non-mod16 size.
?
Encode non mod16: Video is cropped
as requested, then resized as requested.
?
Undercrop to achievemod16: Video is cropped less than requested numbers. Less
cropping is done so the final video is mod16. Not reccomended as it may leave
black bars which will hurt compression efficiency.
?
AVS Profile: You can load an
Avisynth profile. AVS profiles are templates used
when by the AVS Script Creator. Their use should be reasonably self-explanatory if you
know enough to touch them.
?
Crop: 'Cut' the sides off the input video, in case there are black borders. MeGUI will
graphically the cropping if the video preview window has not been updated since it was
opened.
?
Resize: Resize the video. Resizing is only allowed to multiples of 16, and when reducing
the resolution.
Filters
Deinterlacing and other filtering
?
Deinterlacing: Choose what deinterlacing (if any)
should be applied.
? If you know the video type already, set the
'Source Type' and choose appropriate
deinterlacing.
? If you don't know the video type, click
'Analyse' (make sure 'source is anime' is ticked if appropriate). MeGUI will make a
(virtually always) accurate guess as to the source type and suggest filtering. If for
some stange reason you find the auto guess was wrong, try increasing the movie
analysis percentage from 1% to 5%. This helps cover more of the movie and gives
better odds of catching that 'odd' scene.
MEGUI IS USUALLY RIGHT SO DON'T
CHANGE IT UNLESS YOU ARE SURE IT IS WRONG.
?
Resize Filter: Choose the resizer algorithm. Generally, spline36 is a good choice.
?
Noise Filter: The noise filter adds one of four predefined noise reducing scripts to the
AVS file. The noise reductions go all the way from undot() to Convolution3D("movielq").
Most progressive movies should at the most have minimal noise removal enabled. It is
ALMOST (for you 400x zoom people...) visually indistinguishable and helps improve
compression efficiency. Hybrid movies can benefit from medium noise removal as it helps
ensure any stray lines from TIVTC are removed and also retains a majority of the source
detail. A example of a heavy noise movie would be saving priva(you know the rest...)
If
in doubt stick with minimal noise.
?
MPEG2 Deblocking: Should only be enabled for very blocky MPEG-2 sources, which
generally means not on DVDs, such as the following:
?
Colour Correction: Automatically added with .d2v sources. Colour correction for DVDs and other MPEG2 files ensures the video has the right colours. Safe to leave enabled 99%
of the time.
?
Framerate: Required only if MeGUI cannot auto-detect it.
? Vertical Flip
Manual Script Editing
Options on all pages
The options down the bottom of every page:
?
On save close and load to be encoded: When this
is checked, immediately after saving the AVS creator
will be closed and the AVS loaded into MeGUI ready for
you to set up video encoding options.
?
Preview: Clicking this will refresh the video preview
window. Be aware this causes a problem when cropping, as detailed above.
?
Save: Saves the AVS.
MeGUI’s Avisynth Creator
First, start MeGUI and go to Tools -> AVS Script Creator. You will see a window like the one
pictured below. This is the main window were the magic starts brewing!

Right away, I’m sure many of you can already guess what most of this is for. For those of you
who can’t, or those of you who just feel like reading something here is an explanations of each
option:
?
Video Input
Yep, you guessed it. You select the input file here. You can select pretty much anything from a
vob to an avi to an mkv here. Once you have selected your desired file, you should receive a preview window of your input clip. You can close it if you want, or just move it out of the way.
?
Input DAR
This little box just shows the input Display Aspect Ratio of your source. Useful for those of you
who know what that means, but not a big deal for those of you who don’t.
?
Clever (TM) Anamorphic Encoding
Ah, one of the sweet features of MeGUI. This little box simplifies encoding anamorphic clips
immensely. It offers 5 drop-down options:
1. Resize to mod16: Pretty simple. When creating an anamorphic video, this will force
any output video to be mod-16 compliant. This means that the width and height will
both be equally divisible by 16. No remainder. So, if you do any cropping (usually of
black bars) and your cropped output is not mod-16, MeGUI will automatically resize to
mod-16 for you, fixing any funky problems.
2. Overcrop to mod16: Again, a pretty simple idea. This is similar to #1, but instead of
resizing after you have finished your cropping, this option will increase your crop values
to result in a mod-16 output. This is my personal favorite, as I usually prefer to lose a
little bit of the perimeter of the image instead of resizing the whole output. Saves time
and results in a better quality output.
3. Encode non mod16: This is almost like turning off Clever Anamorphic Encoding option
in the first place. The main difference is that the output DAR (Display Aspect Ratio,
remember?) is still signaled to the encoder (which is a good thing). In fact, that
signaling is often the most important part. If the signaling is not sent to the encoder,
your encodes will not playback their proper aspect ratio, thus defeating the whole
purpose of anamorphic encoding. Every option in the Clever Anamorphic Encoding
drop-down will signal the aspect ratio, so you don’t have to worry about that.
4. Crop mod4 horizontally: All this option really does is make sure that any cropping you
do is mod-4 with respect to the width. So, say if you crop 3 pixels from the right of your
source video, then this option sees that 3 is not mod-4, and crops an extra pixel from
the right to make it safely mod-4.
5. Under crop to mod16: This acts similar to Overcrop to mod16, just in reverse. So
essentially, after you have finished cropping, if your crop values are not mod-16,
MeGUI will decrease your cropping values to reach a mod-16 value. Get it?
?
Avisynth Profile
This is a quick selection box for loading your favorite Avisynth profile. If you click on the
“Config” button, you can see what I am talking about. It’s a pretty self explanatory little setup,
but if you guys want me to write up a post about it, I would be more than happy too. Just let me
know in the comments section. You can usually leave this option alone if you don’t know what
it is or how to use it.
?
Crop
Ah yes, this little option. Well it’s this really new-fangled uber-delta-super cool way to…crop.
Okay, you get it. Each box represents the number of pixels to be cropped from the top, left,
right, and bottom of your source video. If you have the preview window open (and if you don’t,
just press the “Re-open original video player” button), you can get a live preview of your
cropping values. Freakin’ awesome, ain’t it? For those of you who are super lazy, you can
even use the “Auto Crop” button to automatically detect and crop black bars from your source
video (which are most often seen in DVD sources). Just be sure to check that the “Auto Crop”
didn’t crop too much of your source, as it can screw up a little some times (hey, it ain’t exactly
a perfect science, so give it a break). Although in all honesty, it’s pretty accurate about 95% of
the time.
?
Resize
And here you get to transmorgify your video to what ever resolution you like!! (Queue evil
laugh). Okay seriously, you can use this option to resize your video to another output
resolution if you are so inclined. Most of the time I don’t use this (you all know how I feel about
resizing), but if you are encoding for an iPod for example, this little option can be dead useful!
It will even “suggest” a mod16 resolution for you if you are so inclined (I’m usually not, but who
cares). Use it if you want to, otherwise keep it disabled.
?
Apply Auto Preview
You need this checked if you are going to be live-previewing your cropping/resizing like I
talked about earlier. It’s usually on by default, so only turn it off if you don’t want it. It’s a pretty
harmless option, so don’t fret over it too much.
Filters
Look at all o’ them cool options! Let’s start at the top shall we!
?
MPEG2 Source / AVI Source / DSSource / DGx Source
Right oh! These tabs at the very top act on a per-source-filter basis. It should be pretty self explanatory actually. For the most part, the defaults are fine. For example, I always leave Color Correction on, but leave Mpeg2 Deblocking off (which is default anyways). When
dealing with AVI’s or MKV’s/MP4’s, you may want to look at the AVI Source / DSSsource tab
if you are having trouble loading your file correctly. Again, all options should be pretty self
explanatory. The one exception is the Prefer DSSource2… option. This is used when you
have Haali’s Media Splitter installed, and want a frame accurate DirectShow source with no
audio. Actually, I would recommend DSSource2 in that instance as it can really help with sync
issues, or when dealing with Variable Frame Rate material.
?
Deinterlacing
Admittedly one of the cooler features of MeGUI is it’s “automagic” deinterlacing routine. What
this do-hickey does is analyse your input file for interlacing patterns, and suggest proper
Deinterlacing/DeIVTCing techniques. I have to disclaim, however, that it isn’t always 100%
accurate. Obviously, the best option is to analyze your source material by hand, but who has
time to do that? Usually MeGUI’s recommendations are pretty spot on (except when dealing
with really tricky material), and should work fine in most cases. Just test the output script first
by playing it and see if the output has any artifacts or anything of that sort before encoding.
Most people just use the big rosy Analyse button, but if you happen to know the source type
and field order, you can greatly speed up the process. Of course, if you already do know these
tidbits of info, then chances are you already know how to handle the deinterlacing/deIVTCing
process yourself.
One last note, don’t forget to check the “Source is Anime” checkbox before you press
Analyse when dealing with anime content. Otherwise, you run the risk of getting some
really false readings when you analyze your material.
?
Resize Filter
This is where you can select your resizing filter. If you know what your doing (or even if you
don’t), you can use this drop down box to select your preferred resizer. The defaults are just
fine, but play around with the options if you have some time to find something you like. I’m a
little partial to Spline64resize myself.
?
Noise Filter
Again, pretty self explanatory. I don’t use this option that much, as I prefer to select my own denoiser (since I have tested so many and know which ones I like). You are more than
welcome to give the four options a spin for yourself. You can even see which denoiser is used
for which setting by selecting a particular profile and then clicking on the Edit tab and looking
at the denoiser line.
?
Subtitles
Use this option if you want to “hardcode” or “burn in” your subtitles into your source material.
Useful for encoding videos for devices that don’t support soft subtitles, such as an iPod or your
grandmother’s ancient PC.
tab shows what your final script will look like. You can edit each line by hand if you so desire,
or leave it right at default. Each line is labeled corresponding to its function in the script, so it
should be very clear.
?
Load DLL
Use this button to navigate to a desired plugin for direct loading into the script. You will know
what this is if you know about plugin loading in Avisynth. Otherwise, don’t stress over it. It’s
just a “Make your life slightly easier when scripting” option.
Examples of external plugins include RemoveGrain.dll, awarpsharp.dll,
mvtools2.dll, fft3dfilter.dll, etc… But Avisynth plugins are for another tutorial.
And so we have come to the end! You can either save your script and get encoding, or give it
one last preview before your done! It’s your choice! Happy encoding!