HTML and CSS Reference
Figure 7-6. Robert Reinhardt's chart for optimally sizing video
Reinhardt's findings reveal that video performs best when the frame width and height use multiples of 16. Keep
this in mind when you transcode your next video, and while you can use any width, nonoptimal dimensions can result
in reduced quality and dropped frames and can tax the decoding playback more than necessary. To maintain the best
output, you should always use a width and height in a multiple of 16, 8, or at the very least 4. The lower your multiple
gets, the more that the quality and performance get impacted. A very good tool to bookmark is Reinhardt's video sizer
at http://videorx.com/video-sizer . This tool allows you to plug in your numbers and get instant feedback on how
good or poor your conversion job will end up when using the desired settings. If you're interested in learning more about
encoding, transcoding, and compression techniques, I strongly recommend visiting his site ( http://videorx.com/ ) .
You just learned what you need to know about the codecs for video, so now I will cover the file formats that support
each of these flavors. Container formats, or wrappers , are the file format that video information gets stored into. This
would be your typical MOV, AVI, and FLV file formats. These containers all house encoded video information along
with essential metadata information about the file. Wrappers for video are much like PNG, JPEG, and GIF files for
images. In fact, they're so identical in HTML markup that it's pretty simple to include video in your browser if you
know how to use an img tag.
MP4 is a common web video format for most HTML5 browsers like Apple's Safari, Microsoft's Internet Explorer, and,
currently, Google's Chrome. It is essentially the container format that houses the AVC/H.264 codec, as discussed
in the previous sections. The file extensions can vary for this container type and can include M4P, M4V, and even
Adobe's F4V. Figure 7-7 shows the current browser support at the time of this writing.