Customize x264 Profiles with MeGUI

AVC video encoding gets more popular every day. From Mobile phones to Blu-ray players, its advantage in both efficiency and overall image quality compared to the older MPEG-2 and MPEG-4 ASP (DivX, Xvid, Nero Digital, etc,...) makes it an obvious choice for nearly any type of video, whether destined for playback on a computer or any type of hard drive or DVD based player.

The only problem with all that flexibility is the complexity that necessarily comes with it. If you want to take advantage of x264, probably the best open source AVC encoding solution, you probably won't want to spend hours poring over documentation for each little setting you may need to use, but at the same time you don't want to miss out on any of its features. That's where profiles come in.

MeGUI Profiles

One of the most powerful and popular programs that uses x264 to encode AVC video is MeGUI. While it's a top notch program with a well designed GUI which gives you access to nearly every setting and option imaginable, perhaps the best contribution of its developers is the XML encoder profiles used to store settings. Rather than simply having a list of predefined settings for various purposes, they can be created by anyone and shared with everyone. Settings that might once have taken hours search message boards to find are now often an MeGUI update away.

So What Are Profiles?

Each profile is essentially a list of instructions for a program like MeGUI or AutoMKV to use when encoding with a command line encoder like x264. Some of these instructions correspond directly to x264 command line encoder (CLI) options. A line reading true will result in a command line with the --b-pyramid option. Others give general instructions, like 4, which instruct MeGUI to perform 1 pass with the option --pass 1, a second with --pass 2, and perhaps one or more in between the two using the --pass 3 option. Some values, like the number of B frames, are intended to be left alone by most users while others, like quantizer and bitrate, commonly change from one job to the next.

Using Profiles Outside MeGUI

The MeGUI developers' decision to use XML for their encoder instructions means they're easy to adopt for other programs. However, just because another program can read the options in a MeGUI profile doesn't mean all the data will be used. Likewise, developers can extend the profiles to support additional instructions, including some that may not even apply to other software. If you want to add options to the XML files generated by MeGUI you can simply open an existing profile from the appropriate program, as well as your new profile and copy from one to the other.

Why Use Custom Profiles?

So if there are so many prebuilt profile already available in MeGUI (or other programs) why should you bother with your own? That depends on a number of things. The first answer would be maybe you don't need to. If you find yourself selecting one of the provided profiles, setting the bitrate or quality, and leaving everything else as-is with no changes you may not have any custom settings to save. But if you find yourself frequently using the same set of non-standard options, or even a few common sets of non-standard options, you might benefit from saving them in descriptively named profiles (like TV_Caps-720p.xml or DVD-Fullscreen), so you don't have to worry about whether you remembered to check all the necesssary boxes and set all the required numbers.

What We'll Be Covering

Rather than looking at the XML files themselves, we'll leave that for MeGUI to handle. Instead we'll be using MeGUI's interface and saving to new XML files. We also won't be discussing every setting available. Since we have the luxury of starting with the existing list of profiles, it shouldn't be any problem to find something that's similar to what want. Some settings should be left alone most of the time, so we won't need to even discuss them here. Instead we'll try look at options that you're likely to be changing already (through the GUI), and might benefit from changing permanently in a profile of your own.

Never Edit Original Profiles

As you learn how to make changes to profiles you may be tempted to "update" the existing profiles. Resist that urge. You should always save your custom settings to a profile of your own. Otherwise you might find them updated for you, losing your changes.

Required Software

MeGUI is a front end, or GUI, for encoding MPEG-4 video using XviD or x264, as well as a variety of audio formats. MeGUI can be used to convert nearly any source to a MKV or MP4 file which can be played on a large number of consumer electronics devices ranging from mobile phones to the latest generation of DVD players. MeGUI stores encoder settings in XML files, which it can both read and edit. You can find detailed instructions for installation in our guide titled MeGUI Installation and Configuration

Other Software Supporting MeGUI Profiles

AutoMKV is another GUI that automates encoding with XviD and X264, and even Windows Media Video 9 (which VC-1 is based on). Since many of AutoMKV's x264 setting are profile based, with no GUI controls for changing them, you may find it useful to tweak your profiles with MeGUI for easier control over AutoMKV's automation. Although installation is very straight forward you can get help in our guide titled AutoMKV Installation and Configuration.

Continued On Page 2

Next we'll start looking at MeGUI's x264 Profiles. If you haven't already, start MeGUI, make sure x264 is the selected Codec, and pick the Profile of your choice if you have one. Otherwise you can stick with the default profile. Once you have your profile selected, click the Config button and continue to the next page.