Saturday, August 14, 2010

A guide to encoding, part five (h264 encoding and profile settings)

Before you can actually start encoding your video, you need to understand a couple of other things about MeGUI. Don't worry, I won't go over everything - that's for you to explore on your own - instead, I will tell you enough to get you going.




First in MeGUI's menu bar, click on "Options", then "Settings". In the first tab, "Main", make sure everything is checked EXCEPT for "Force video file extension for QT Compatibility".


To the next tab, "Extra Config". In the bottom left corner, check "Add Time Position".

In the third and final tab, "External Program Settings", the only thing you need to change is the first one, "neroAacEnc". Remember in part two when I said that optionally you can download Nero's AAC encoder? If you did, look for the file that you downloaded, called neroAacEnc.exe and add it here.


Be sure to click save before you continue.

Now return to the main MeGUI window. If MeGUI didn't already update itself, click on "Options" and then "Update". It will list the newer versions of the files MeGUI uses to run. Click "Update" and let MeGUI install everything (it will also probably restart itself).

Back to the MeGUI main window.

We're about to go on to the hard stuff. Where it says "Encoder Settings", select x264 *scratchpad* from the drop down menu and click "Config".


Thankfully the newest version of MeGUI dumbs things down a little, so things don't look quite as complicated as they once did (if you feel like confusing yourself, click on "Show Advanced Settings" and click through the various tabs).

Anyway, you are greeted with two main selections (under where it says "Modes"), "Targeting Quality" and "Targeting File size". Each has its pros and cons.



Targeting File Size means just that; your encoded video will be whatever file size you want, but be careful - try to be too ambitious in wanting a super small file size and the video quality will suffer (i.e. it will look like crap).

Targeting Quality is what I use 99% of the time. In this mode, you specify the exact quality that you want and MeGUI will make sure that the finished video is at least that quality. However, file size is unpredictable. Sure, you might have a near perfect looking video, but it doesn't matter if it's something huge like 30 GB.

Which setting you use is up to you so I'll explain how to use both.

First, back to Targeting File Size. I believe the default is set to a bitrate of 700. That's way too low for most videos. Remember what I said about this mode being able to have a specific file size? Here is how you calculate that. Close the x264 Config for a second and go back to the main MeGUI window. Click Tools, Bitrate Calculator and something like this should appear.


Now, if you've been following this guide from the beginning (congrats!) and are encoding from an ISO, then most of the settings will be filled out already. Otherwise you'll have to do it yourself.

Over on the right side of the calculator you should see "Calculate By". Click on the bubble next to "Video Bitrate" and type in a number. 2000 is a good starting point for a regular 4 minute PV. After you type in 2000, click anywhere in the bitrate calculator (to lock in your number) and at the bottom of the calculator, you should see a file size. In the case of the S/mileage ISO from earlier, an average bitrate of 2000 yields a file size of 73.92 MB.


Also note that you can do this the other way around as well (it's probably easier anyway). What I mean is, click on the bubble next to "Total File Size". Click on the arrow button to the right and click "Select Size". Type in whatever file size you want your video to be (let's say 60 MB), and click OK. You will now see that the Video Bitrate has been filled in (1574 for the S/mileage ISO) and now all you have to do is type in that bitrate in the x264 config from earlier (or you can just click Apply, to save time).

Finally, is "Targeting Quality". Go back to MeGUI's main window, click config next to the x264 *scratchpad* and the x264 settings appear once again. Select Targeting Quality from the "Modes" drop down menu and now the "Bitrate" setting changes to "Quality" and you are greeted with a two-digit number.

Again, Targeting Quality is for those (like me) who care about quality more than the file size. What you are doing here is selecting a number that represents a specific quality. So how do you know what number to choose? Well, that question can't be answered with one number. Since each video is different, the number you choose will almost always be different. To start you off, try a Quality setting of 24.0.

  • NOTE: Targeting Quality is a bit backwards in the fact that the higher the number, the lower the quality. So, a target quality value of 30 will be much, much lower quality than a value of 18. Personally, I use anywhere from 19 to 25. 18 is the lowest you should go (gives you near perfect quality, but higher filesize) and 26 is the highest. 22.5 is my magic number. I use it whenever I'm not sure what I want.

The last thing you need to know about x264 settings is the "Presets".


You can slide the arrow left or right to choose whats called a preset. The further left you go, the faster x264 will be, but also the lower the quality will be. And likewise, the further right you go, the slower, but also it will be a bit higher quality than normal. Also the further left you go, the higher the filesize will be. A video with a target value of 24.0 encoded at the "medium" preset will always have a lower filesize than the same video with a target value of 24.0 encoded at the "Faster" preset.

For most things, I use "Medium". "Slow" is good if you absolutely want your video to be high quality, but I almost never use it. "Faster" is good if your PC is a bit older and takes a while to encode. The difference between "Medium" and "Faster" isn't that big, so it's a perfectly acceptable option. "Ultra Fast" (the furthest left option) should only really be used for tests and "Very Slow" should really never be used because "Slow" (or if you must, "Slower") is more than enough.

Now that you've read all of that (or just skipped through to the good parts), head on to part six to finally start the actual encoding process and finish up.

0 comments:

Post a Comment