Megui H.264 Conversion Guide
Updated: 07/06/2007 09:24 AM

MeGUI is one of the newer tools that has been designed with H.264 encoding in mind, while supporting other types of conversion, such as XviD. This guide shows you how to encode a H.264 (MP4) using MeGUI from a DVD as the primary example (instructions for converting other types of video files are also included).
This guide is aimed at intermediate users, basically users that are familiar with DVD conversion/backup and want to experiment with H.264 and MeGUI. As such, basic knowledge of DVD ripping and conversion is required, although brief instructions will be provided in any case.
Software you'll need (all freeware):
AVI-Mux_GUI.zipNeroDigitalAudio.zip

Show details for Step 1: InstallationStep 1: Installation

Show details for Step 2: DVD RippingStep 2: DVD Ripping

Show details for Step 3: D2V CreatorStep 3: D2V Creator

Hide details for Step 4: AviSynth Script CreatorStep 4: AviSynth Script Creator

This step will use MeGUI's AviSynth Script Creator tool to create an AviSynth script. If you followed Step 3, the AviSynth Script Creator tool should already be started with the D2V file created loaded. Otherwise, you'll need to load the media file you want to convert into the "Video Input" section.
AviSynth is able to open almost any video file that you are able to play with a Directshow based multimedia player, such as Media Player Classic or Windows Media Player. You may need to select the "All Files" option when opening the file to be able to see it (eg. FLV files). In most cases, you'll need to install a video codec, an audio codec and a splitter filter for the format you wish to convert.

For example, if you want to convert FLV files using MeGUI, you will first need to make sure you have the required video, audio and splitter filters to make FLV files playable in Windows Media Player. Instructions on how to do this can be found in the FLV playback section of our YouTube, Google Video Download and DivX Conversion Guide.

The "Input DAR" is the aspect ratio of the input video. In most circumstances, it should be automatically set for you. Anamorphic DVDs will be set to "ITU 16:9", for example.
Press the "Auto Crop" button to remove the black bars from the input video if it has any (most widescreen DVDs will).
Next, check the "Suggested Resolution" checkbox and change the resolution to one that you require. For DVD conversion onto a single CD (700 MB) using H.264, you can get away with using the maximum resolution (720x***). If you have specific requirements, such as conversion to iPod/PSP compatible files, please make sure the resolution you select matches your playback device's capabilities.
MeGUI: AviSynth Script Creator


Click on the "Filters" tab. For films on DVDs, you usually do not need to run a deinterlacing analysis. If the content you have is TV based, then you might need to click on the "Analysis" button to see if the video requires de-interlacing. Select "Source is Anime" if that's what you have.
MeGUI: AviSynth Script Creator
Again, if you followed my advice for keeping the resolution for DVD sources, then you don't need either the resize of the noise filters. Otherwise, if you chose to reduce the resolution, then you can choose how the resize will look like ("Bicubic (Neutral)" is recommended as a middle of the road choice). If the source has lots of noise, you can choose to enable the noise filter and choose how much noise is present in your source. The other options can be left alone ("Colour Correction" is automatically checked for D2V input sources).
If your source is not DVD, then you can click on the "Edit" tab and edit the AviSynth script manually to enable audio (you don't need to do this with DVD sources if you have followed this guide, since we have already demuxed the audio using D2V Creator). Simply change the "audio=false" entry to "audio=true".
MeGUI: AviSynth Script Creator


Make sure the "On save close and load to be encoded" option and press the "Save" button to save the AviSynth script (by default, in the same directory as the D2V file, the filename is not important). Don't worry too much about the AviSynth Script Creator tool's preview window - it can be a little buggy where cropping and resizing and concerned. After saving, the AviSynth file should be loaded automatically into MeGUI - MeGUI's preview window does work fine and please make sure the video looks alright, especially for DVD sources with cropping/resize.


Hide details for Step 5a: Video Encoding Options MP4Step 5a: Video Encoding Options MP4

We'll now set up the H.264 encoding options in the x264 encoder. This step has the most options to configure, and too many to cover in this guide alone. What I'll recommend is to use one of Sharktooth's profiles, and if you need further explanation of the options, refer to our x264 Options Explained article.
In the MeGUI "Input" section, select "x264" as the "Codec" and "MP4" as the "Container".
MeGUI: Video

For the "Video Profiles" option, select one of the x264 encoding profiles so we don't have to manually configure all the settings (unless you want to , then click on the "Config" button to do so). A full explanation of what each profile is used for can be found on the official forum thread for the profiles. For compatibility, I recommend using the CE profiles, particularly the "CE-QuickTime" profile (this will make the MP4 file playable in Apple QuickTime 7 or newer). The "CE-Baseline" profile is also fully QuickTime compatible, but uses less advanced features (and so will be faster during encoding at the expense of some quality).


Show details for Step 5b: Video Encoding Options XVIDStep 5b: Video Encoding Options XVID

Show details for Step 6: Audio Encoding OptionsStep 6: Audio Encoding Options

Show details for Step 7: AutoEncode and starting the encodingStep 7: AutoEncode and starting the encoding


Hide details for MeGUI Custom x264/AVC video profiles. (Updated: 2006-12-21)MeGUI Custom x264/AVC video profiles. (Updated: 2006-12-21)

Instructions

Install MeGUI and let the autoupdate run, it will automatically fetch the profiles from the autoupdate server or if you prefer get the profiles archive (below) and use the MeGUI Import Profiles option to import them.
Once imported you will find the profiles in the "Video Profiles" drop down list. Before starting encoding set the bitrate or quantizer (manually or thru the calculator) and adjust the inloop filter accordingly to your needs/taste: keep it 1;1 or higher for anime/toons (max 3;3) and not higher than x264 defaults (0;0) for movies.

Profiles for maximizing Quality and hit a desired bitrate/filesize (2 or more passes, SLOW encoding, High Profile)

HQ-Slow
: Pretty slow but not much. Quality is near the best.
HQ-Slower
: Slower than HQ-Slow but it tries to squeeze some more compression thru the use of more reference frames.
HQ-Slowest
: Same as HQ-Slower with more reference frames.
HQ-Insane
: All settings maxed out.

Profiles for Common Encoding (2-passes)

CE-Highprofile
: Common settings using high profile options (not compatible with QuickTime)
CE-Mainprofile
: Common settings using main profile options (not compatible with QuickTime)
CE-QuickTime
: Common settings for QuickTime 7 compatibility.
CE-Baseline
: Common settings using baseline profile options (100% compatible with QuickTime 7)

Profiles for maximizing Speed and hit a desired bitrate/filesize (1-pass)

1P-Maxspeed
: Everything disabled for max encoding speed (good for live capturing).
1P-Intermediate
: Intermediate settings for average speed and final quality.
1P-Goodquality
: Settings for good quality with 1 pass.

Profiles for constant Quality/Quantizer (1-pass)

CQ-Lossless
: Lossless encoding.
CQ-ASP_Q2_equiv
: Almost the equivalent of MPEG-4 ASP Q2 encoding.
CQ-ASP_Q2_eq(crf)
: Same as above but with "constant quality" (constant rate factor).

Profiles for Anime/Toons (2 passes)

AE-Standard
: 2 passes, Main Profile, standard quality.
AE-Goodquality
: Slower than AE-Standard, High Profile, higher quality.
AE-Maxquality
: Slowest mode with maxed out settings, best quality.

Profiles for Consoles and Portable Devices

PD-PSP
: Profile for Sony PSP playback.
PD-Xbox_Hires
: Profile for MS XBOX and higher than 512pixels resolution (latest XBMC is needed).
PD-Xbox_LoRes
: Profile for MS XBOX and lower than 512pixels resolutions (latest XBMC is needed).
PD-iPod
: Profile for iPod Video based on Arstechnica settings.
PD-iPod 5.5G
: Profile for the new iPod 5.5G.

Profiles for HD-DVDs

SA-HD-DVD
: First EXPERIMENTAL Profile for HD-DVD.


Url to this pages:
http://nade.dk/web/nade/site.nsf/FramesetHP?readform&wmain=files/Megui