In the past few weeks I have watched several professionally produced online videos – great productions, great lighting, great talent, great content – and terrible online video encoding. The #1 problem by far was uploading interlaced video to online video host sites – please don’t do that!
The result is a comb-like effect on vertical and diagonal lines that are moving in the video! It’s ugly! And not necessary!
When television was standardized a really long time ago, the image was sprayed onto the TV screen with an electron gun that scanned from one side to the other horizontally. But rather than paint every line on the screen, the system was designed to paint every other line. A complete image requires two passes – first to paint the odd lines and then to paint the even lines. Thanks to the persistence of phosphor (stuff on the back of the glass that glows when hit by electrons), and the speed of the scanning (half of the image is painted in 1/60th of a second so the full image is produced in 1/30th of a second – well, almost – its actually 29.97 frames per second) – what you see on the TV, together with how your eyes work, produces a clean image.
Computer screens, and most new TVs, display the entire image all at once – none of this interlace stuff – using a technique called progressive imaging.
The problem is that most consumer video cameras shoot only interlaced mode video, and even though professional cameras can shoot progressive images directly, many still shoot in interlaced mode – and these interlaced images do not map well to the progressive display computer world. This results in horizontal streaks – similar to the teeth of a comb – on vertical and diagonal lines.
The simplest solution is to choose a de-interlace option when you prepare your video output file, prior to uploading.
I do most of my video editing on a Mac using Final Cut Pro. In Final Cut Pro and Final Cut Express, there are built-in options to de-interlace – but at least on my versions, they de-interlace by simply throwing away half of the interlaced lines and doubling what is left! The result is half the vertical resolution. In a lot of cases (such as small video viewer on the screen) that can be okay. But for full screen viewing – Ick. I believe my copy of Adobe Premiere does the same thing – throwing away half the lines (but probably worth a test to make sure.) I also need to check Windows Movie Maker again – but I suspect it also does cheap de-interlacing.
Final Cut Pro/Final Cut Express Deinterlacing – and MPEG Streamclip
Using FCP or FCE, I output the entire video as a Quicktime Reference file (which is pretty fast), and then drag that to the input window of a great utility called MPEG Streamclip (available for Windows and Mac). Select File | Export to MPEG4 … from the menu bar, and then check the box labeled “Deinterlace Video”, click on Make MP4 and let it rip. MPEG Streamclip uses a “smart” de-interlacing algorithm to produce very good quality de-interlacing.
Depending on my goals for the video, I typically encode at 1 to 2 Mbps. You can set the maximum data rate in the Export to MPEG4 box. If you encode at 1.5 Mbps, then YouTube will provide a “high quality” 640 x 480 streaming version. If you encode HD/HDV at 2 Mbps or faster and resize to 1280 x 720 (you need to choose that option in the dialog box), YouTube will provide an HD streaming video.
MPEG Streamclip works with many file types – and has a very good and very fast encoder for MPEG4. For most clips, single pass MPEG4 is fine, but there is an option for two pass encoding and it does make for better compression, but only a little bit.
If you have a problem with the file type not being recognized, you might go back to the beginning and export your video file as a DV video (same as on the camera), or HDV (same as on the camera, assuming your system has the proper “codecs” installed for this) or worst case, output as a Photo JPEG file (a sequence of 30 images per second). The latter produces very large files but does produce the cleanest result if you are super picky (but rarely necessary for online videos).
There are many other tools too – probably the best is dvfilm – which is intended for converting video to film. This utility is available only for Windows (or an older version for the G4/G5 Mac). I’ve done a lot of de-interlace tests and comparisons and dvfilm does the best of all that I have looked at. But for most things, its only a little better than MPEG Streamclip.
Using a Smart De-Interlace Plugin
If you use FCP or FCE, there is a free plugin from TMTS that also performs smart de-interlacing. Its pretty good, although not quite as good as MPEG Streamclip. But it has the advantage that you can de-interlace in the editing timeline. After dropping the TMTS smart de-interlacing on to a clip, you will need to re-render to see the final results. (Note – in a few unusual cases, I have found that TMTS de-interlacer can produce some poor quality de-interlacing – so do check your video for quality when done.)
Another useful tool for quickly de-interlacing and MPEG4 encoding is Turbo T.264. This USB hardware dongle is available only for the Mac – but performs hardware encoding. When I’m in the field and need to get a video uploaded quickly from my notebook, I use the T.264 encoder. This also does a very good job of smart de-interlacing – and encodes video at typically 1x to 1.5x normal speed. That is to say, a ten minute video clip will encode to MPEG4 in 7 to 10 minutes or so depending on whether I am working with SD or HDV.
Progressive mode in the camera
The best option, if available to you, is to use the progressive mode in your camera (again, if your camera has progressive mode). This way there is no interlacing and you can edit and encode directly to your output file. This will produce the best results overall, and saves time since you won’t have to de-interlace in software. You can ignore the entire de-interlacing issuing all together!
If your camera does not have a progressive mode, you might, in some situations, be able to use a little trick to simulate progressive mode: if your camera permits setting a shutter speed, set the shutter speed to 1/30th of a second. On many cameras this ends up recording a progressive image. The slower shutter speed may cause some blurring on fast moving subjects but for many scenes, no one will notice whether it was shot at 1/30th or 1/60th of a second.
What ever you do, please de-interlace or otherwise we all suffer the jaggies during camera pans and moving action in your video!