Video Compression Series (Pt.1)

In this series I will discuss the art of compressing video for Internet delivery. I will break this up into small chunks so as not to bore you too much. So lets start off with what compression is and why we need it in the first place.

You need to email a video clip to a colleague for feedback on a product ad you are editing and want to see what parts can be cut while still keeping the flow. The current run time is 4 minutes and you need to end up with a :30 spot. You export the video from your NLE (Non-Linear Editor) of choice and discover that your email client tells you to get lost. The file size is too large, coming in at a whopping 2GB. What do you do now? OK, you think “I’ll just ZIP the file” that’s compression right?. After your computer chews on it for a few minutes you end up with a .zip file about the same size as you started with. Now you’re screwed right? Nope, I got your back. What you need is to actually compress the bits in the video and audio tracks of your file instead of archiving it, and there are a few ways in which this can be done.

The first way is quick & dirty. These days all NLE systems can export a compressed file. Check the help section or dig through the “File” menu. In Final Cut Pro v.7 (for example) it’s called Export Using QuickTime Conversion. This will bring up the standard QuickTime export dialogue (familiar if you’ve ever exported from QuickTime before). Currently, the most widely used “standard” compression that renders the best quality while lowering the file size is a codec called H.264. I will need to edit this blog post soon because in the world of compression, codecs change all the time and I already know H.265 is on it’s way shortly which promises to keep the same quality with half the file size of the H.264 algorithms.

NOTE: Follow along using the map image below. Keep in mind this process pops up 5 different dialog boxes that overlap each other. You will be bouncing back and forth between a few of them.


Step 1: choose QuickTime Movie (that makes a .mov file) from the Format drop down list below the file browser and in the new dialog (Step 2) make sure Video is checked and click the “Settings…” button. Yet another dialog opens. Step 3: choose “Compression Type: H.264″ from the codecs list. In the Motion section choose the frame rate you edited your clip at. Do NOT change the frame rate!! I find it best to select Custom and type in the frame rate. For 30fps we will typing 29.97 and 24fps is 23.98. For now leave the rest at Automatic and High Quality settings. I will go over Data Rates and Key Frames later. As for the Multi-pass and Single-pass in the Quality section just choose single-pass. Multi-pass may create a better visual quality but at the expense of longer processing time. Step 4: After clicking OK in step 3 we are back at step 2 dialog. This time click the “Size…” button and in the new dialog for Dimensions: choose Custom and type the width and height of your desired output file. Although you can output the same frame size as your original, that’s not ideal for just making a viewing file. You want the files size to be as small as possible so in addition to compressing in H.264 we will also make the physical picture size smaller. This will in turn further reduce the overall size of the compressed file. Since my original file is 1920×1080 with an aspect ratio of 16:9 I will go with my output file as 640×360, keeping the same aspect ratio. Even though the aspect ratio is the same, you should go ahead and check the “Preserve aspect ratio using: Letterbox” just in case. It won’t hurt. My original file is 23.98fps, 1080p so I will leave the Deinterlace Source Video unchecked. Finally, we are in the home stretch. Clicking OK will bring you back to step 2 dialog again. There is one more thing we need to pay attention to. Audio! It is just as important. We can compress the audio as well. So, make sure the Sound checkbox is ticked and click the “Settings…” button to bring up Step 5: Sound Settings dialog. Change Format to AAC audio codec, Channels: Stereo (L, R), change Rate to 44.1 kHz and Target Bitrate to 256kbps. Click OK and also click OK on step 2 dialog and then in the first dialog, use the file browser to navigate to where you wish to save to. Name your file by adding the frame size_h264 at the end for organization purposes. All done!

 

Next week I will explain in more detail some of what we just accomplished. I will go over file containers and the codecs they hold. I will also go over some stand-alone compression programs available and how you can squeeze better quality out of your final video that will be seen by millions (you hope) of people online.

label,

About the author