Cut Lines: Easy H.264 Encoding for the Web
Posted Jan 1, 2009

This month we’ll look at exporting your Final Cut Pro Sequence into an H.264 file for the internet. H.264 is becoming a widely accepted web file format. Even Flash supports H.264 now. It can create nice, small file sizes while retaining a lot of image and sound quality, even when a site converts it to Flash.

I’ll take you through three methods of doing this that are not difficult, starting with the easiest first.

Step 1: Save Your Movie From Final Cut Pro
We’ll begin inside Final Cut Pro. I’ve just finished editing my sequence, and it’s ready for the web. First, I’ll hit Option-R to render everything out.

Next I’ll go to File > Export > QuickTime Movie. There I’ll give it a recognizable name.

Then choose the settings shown in Figure 1 (below). For Setting, choose Current Settings; for Include, select Audio and Video (if you have both). For Markers, select None. Leave Recompress All Frames unchecked, and check Make Movie Self-Contained. Also uncheck Hide Extension. Select a place to store this movie file, and click Save. Quit Final Cut Pro.

Final Cut Pro Save settings

Step 2: Choose Resize, Compression, and Export Settings
Here’s where we get down to business. Trust me—this is a cheat, it’s really easy, and you don’t have to know anything about dimensions or aspect ratios or anything. Open the file you just made in QuickTime Player. (Since you have Final Cut Pro on your system, this is actually QuickTime Pro.) You can do a lot here, but we’ll just stick with making an H.264 version for the web.
First, go to Window > Show Movie Inspector, or press Cmd-I. Here you’ll look at a couple of things. First is Data Size—the size of the file. I have a roughly 8-minute DVCPRO-HD 720p60 file that is currently 2.37GB—way too big to put on the internet.

Next, let’s look at Current Size. I need to watch the first number there, which is the width of the video. If the video is too large for my screen, I’ll hit Cmd-3 or go to View > Fit To Screen. I need to grab the lower right corner of the video’s window and drag it toward the upper left. This will resize your video, keeping the aspect ratio intact. I’ll watch that Current Size width until I get to about 450–500. I personally prefer closer to 450, but widths between 450 and 500 tend to work well for me. It doesn’t matter what format, or if your video is 4:3 or 16:9; so far, we’re doing the exact same thing regardless.

Once I have my video screen sized down properly, I’ll go to File > Export. Set Export to Movie to QuickTime Movie, then click Options. Give your video a recognizable name, and make sure all three sections have check marks: Video, Sound, and Prepare for Internet Streaming. In the Video section, click Settings. Set Compression Type to H.264. In the Motion section, set Frame Rate to 15, Key Frames to Automatic, and check Frame Reordering. In the Data Rate section, Data Rate should be Automatic. In the Compressor section, I never pull the Quality slider above Medium—in fact, I usually leave it between Low and Medium, and I still get great quality video (Figure 2, below). Finally, set Encoding to Best quality (Multi-pass). Click OK.

Apple Compressor settings

Click the Size button, and make sure the size parameter is set to Current Size. I set mine, and it shows that the current size of my video window is 450x253. I’m exporting progressive video here, but if I were exporting interlaced video (NTSC or 1080i), I’d make sure Deinterlace Source Video was checked. Computer screens are progressive display devices, so you want your video deinterlaced. Click OK.

Step 3: Choose Audio Settings
The next step is to go into the Sound section and click on Settings. For Format, choose AAC. For Channels, if it’s mostly music you want to preserve, set it for Stereo (L R). Otherwise, set it to Mono. You’ll still get great quality, and if it’s mostly voice, it won’t come out stereo anyway. Then set Rate to 22.050.

Next, check Show Advanced Settings. Set Quality to Normal, Encoding Strategy to Average Bit Rate, and Target Bit Rate to 40 or 32, as shown in Figure 3 (below). Click OK.

Compressor Sound Settings

Step 4: Prepare and Encode
Finally, set Prepare for Internet Streaming to Fast Start. This will have an effect only if the ISP’s system has QuickTime Streaming Server installed, which most do. Still, much of the video on the web does not actually stream. Most of the rest is progressive download. That means it starts to download, but it also starts to play pretty much right away, appearing to be an actual video stream. But it’s not; it’s just able to play and download into your local cache at the same time. Anyway, set this just in case—it can’t hurt anything. Click OK.

Now we’re ready to encode. Make sure you know where you’re saving this file to, and click Save. That’s it. While the Encoding window shows its progress, you can still play around with the video’s size, play it, start a second Export, or close it. QuickTime Pro Player can do multiple exports at one time, and the export process is not dependent on the video being open in the player. Just don’t quit QuickTime Pro Player, or you’re hosed!

Now, with all the above settings, I exported my 8-minute DVCPRO-HD 720p60 movie that was originally 1280x720 and 2.73GB. What I ended up with was a 450x253 H.264 video file that looks and sounds great and is only 31.9MB in size—much smaller than the 100MB limit of most upload sites—and it’s Flash-compatible (Figure 4, below). That’s about it!

QuickTime Player

Step 5: Create a QuickTime Movie Preset in Compressor
Let’s go one step further. Say we want to do this on a regular basis, and not just for H.264 but for any repetitive transcoding task. Use the workflow I’ve done so far to get your frame sizes, write them down, and open Compressor. In the Setting window, in the Settings tab, highlight the Custom folder, then click the drop-down menu from the plus sign in the upper-right corner (Figure 5, below). Choose QuickTime Movie from the list.

Apple Compressor settings

A new, untitled QuickTime Movie preset shows up in the Custom folder. Make sure it’s highlighted, and go to its properties in the Inspector window. Enable Video and Audio as you need them, and go into the Settings for each and set it up just like we did in our QuickTime Pro cheat previously in this tutorial. Give it a name and description.

Step 6: Enter the Geometry Room
Now here’s the tricky part. While you’re in the Inspector window for your new preset, go to the second button from the right, the Geometry room as we call it. In the drop-down menu in the Dimensions (Encoded Pixels) section, set Frame Size to Custom, and plug in the values you require for width and height. And set the drop-down menu for Pixel Aspect to Default For Size (Figure 6, below).

Inspector

That’s it! You just created a preset you can easily get to in Compressor over and over and over again, without having to set things every time. You now just drag and drop this preset onto your video in the Project window. Easy as that.

Step 7: Create a Droplet
But wait, we’re not done yet, because this deal gets even better! If you order now, we’ll throw in an extra droplet for free! That’s right, for free! (Maybe I watch too much late night TV. But keep reading.)

With your new preset highlighted in the Settings tab, in the top left of the Settings window, the middle button will create a “droplet.” A droplet is an icon that lets you drag and drop files on top of it. It automatically launches the Batch Monitor, and your compression job is automatically working. No need to launch Compressor or anything.

Click that button in the Settings window, and a droplet creation window opens. Give it an appropriate name, choose a location to put it (such as your desktop), and be sure that Hide Extension in the lower left corner is checked (for aesthetic reasons). Then look at the drop-down menu for Choose Destination For Droplet Results. I keep it set to Source. You can also create a folder somewhere for storing all of your final transcodes. This sets the location to which Compressor will write the final files the droplet makes (based on your preset). Click Save.

One warning: The very first time you use a droplet, a window comes up that lets you do one last bit of customizing. In the lower left of that window is a box you can check that will tell Compressor never to bring that window up again. I always check that box. Also, it takes about 10 seconds for a droplet to fire up and work. It’ll show a progress window during that period, so you’ll know it’s working properly.

So, there you go—encoding video for the web in H.264, and three methods to do it. I hope this tutorial helps. As always we appreciate your feedback and tutorial requests for Cut Lines. Just drop us an email. Happy editing!

Ben Balser (benb at bbalser.com) is an Apple Certified Trainer based in New Orleans. Along with training and consulting, he also produces documentaries and educational material, and he designs digital signage systems.