Encoding H.264 QuickTime For The Web with Compressor

For those Final Cut Studio users who are new to the world of video encoding for the Web, I've written a step-by-step guide for encoding H.264 QuickTime with Compressor. Originally intended for the ScreenLight Help files, I thought it would be a good idea to post it here for general consumption. If anyone out there has a trick or two they would like to tell us about, feel free to add it to the comments.

Export Your Movie From Final Cut Pro

First we'll need a file to encode, so let's start by exporting a video from Final Cut. We'll want to export a Reference Movie, so Control-Click your sequence in the Browser and choose Export > QuickTime Movie....


This will open the Save Dialogue Box. Navigate to the folder of your choice. We will be keeping all the settings at their defaults, and the only selection we need to consider is whether or not to make the movie Self-Contained. Choosing to make the movie Self-Contained or not won't effect the output quality, it just determines how the source media is connected to the video. A Self-Contained Movie has the advantage of being able to playback even if your media is offline, since it is indeed "self-contained" (as the name blatantly suggests). But the file size of a Self-Contained Movie is much bigger and it takes longer to export that a Non Self-Contained Movie, which is why I prefer that Make Movie Self-Contained is NOT checked.


Create a Custom H.264 QuickTime Setting in Compressor

Open Compressor and click on the Settings Tab in the Settings Window. We are not going to make a custom setting from scratch, but rather simply change some of the settings in an existing preset. Navigate to Apple>Formats>QuickTime>QuickTime H.264. With the QuickTime H.264 preset selected, click the Duplicate Selected Setting button near the top of the window. This will create a copy of the "QuickTime H.264" preset and place it in the Custom folder. It's this copy of the preset that we will apply out custom settings to.


Select this preset copy, then go to Window > Show Inspector. This will open the Inspector Window. The default view of the Inspector Window is the Summary. This is where we will give our preset copy a new name.


Now we can customize the settings. Click the Encoder icon to switch to the Encoder window. The first thing we want to do is select the Streaming Setting. Drop down and select "Fast Start". If you leave the default setting at None and you are delivering on the web via progressive download, your video will have to completely download before playback begins. If you have a large file, the end user may wait several minutes staring at a buffer animation before anything happens. If you set it to "Fast Start", the video will start playing right away, depending on the speed of the end user's connection.


Now let's set our Video and Audio Settings. Click the Video: Settings button. The Video Compression Settings window will open up. Set_ Compression Type_ to H.264. Set the Frame Rate to 30fps if your editing in NTSC, or 25 if PAL. Setting the Data Rate involves some calculated guesswork - this setting determines not only the image quality of the video, but the file size. The higher the Data Rate the better the quality - but higher data rates mean bigger file sizes. There's no point jacking up the data rate to get pristine quality if most internet connections will choke while trying to play the video. If you are making a video that you will be posting for a few colleagues you know for a fact had high speed connections, then go nuts. If your video is intended for a larger audience and you have no idea what kind if connection they have, then you'll have to be more modest. There are a few safe assumptions you can make: anybody out there still living in a dial-up world is probably not watching video on-line; most people who watch video online probably have fair to good high-speed connections, so we'll play to the middle here. I'll make it 1500 kbits/sec. Lastly, make sure you select "Best Quality (Multi-pass)". Click "OK".


Back in the Encoder window, click the Audio: Settings button. The Sound Settings window will open up. First, make sure the frequency is set to 44.100kHz. Then set the Target Bit Rate. Like the Video Data Rate, Audio Bit Rate also effects file size, but to a much lesser extent.  Your choices range from 64 kbps (not so hot) to 320 kbps (best). I like to split the difference and go with 192kbps. Click "OK".


Next we will set the Frame Controls. This step is important if you are using interlaced source material. Interlaced video is great for good old fashioned TV, but bad for web video, so will want to deinterlace our video. Back in the Inspector window, click the Frame Controls icon. When the Frame Controls _window opens, you will notice that most of the settings are grayed-out and you can't change any of the fields. That's because the _Frame Controls field is set to "Off". Click the little clog icon to the right and you will be able to set it to "On". Now the fields are no longer grayed-out and you can make changes. Set the Output Fields to "Progressive" and Deinterlace to "Better (Motion adaptive)".


Finally, we will set the Frame Size of the video. Click the Geometry icon in the Inspector. Your desired Frame Size will vary depending on how you plan to deploy the video. You may be putting it into an existing web page with only limited space, or you may have free range. In any event, most video codecs looks best when the dimensions of the video are multiples of 16, and QuickTime is no exception. Multiples of 8 and 4 will work as well, but 16 is ideal. This chart will save you from doing the math:


For the purposes of this tutorial, I will chose the maximum size for SD NTSC video: 640 x 480. Set Pixel Aspect to "Square".


Click "Save". Your new custom preset is ready to go.

Encode Your Video with Your New Custom H.264 QuickTime Preset

Drag and Drop you Reference movie into the Compressor batch window Drag your custom setting and drop it into the target window. You may want to change the destination for the encoded file (it defaults to "Source", which is whatever folder your reference movie is in. I have a folder called "Encodes" on my desktop that all my encodes go to.


That's it. You can close Compressor even though the compression is underway. Open you the Batch Monitor in your Utilities folder to monitor the encoding progress.