Digital Video Overview

Digital video has a long and tortured history on the web. When it first arrived, the best results were reserved for those with T1 lines, cable modems, or DSL lines. If you used a dial-up service, a video window of 80 by 60 (or smaller) was the norm, and even then, the wait for the movie to download was a long one. The situation is a bit different today as bandwidth costs continue to fall. At the same time, the compression technology in the area of streaming has dramatically improved.

Even so, the creation of digital video is technically challenging and time-intensive when it comes to creating web content. The time required to produce a professional-grade digital video from the second the artist draws the storyboard on paper to the delivery of the FLV is measured in weeks or months, not days or hours.

Video in Flash MX 2004

Flash MX supports the following formats, providing the QuickTime 4 Player (or better) is installed on your Windows or Macintosh machine:

  • Audio Video Interleaved (.avi): The .avi format is supported on both platforms, though the AVI format is a bit volatile on a Macintosh.

  • Digital Video (.dv): The .dv format is supported by both platforms, and this format is the standard for digital video cameras.

  • Motion Pictures Expert Group (.mpg or .mpeg): MPG or MPEG files are the most commonly used files for streaming video through a web browser.

  • QuickTime (.mov): The .mov file is supported on both platforms, and it should come as no surprise to discover that it's the Macintosh standard.

  • Windows Media File (.wmv, .asf): This Windows-only format is available only if you have installed DirectX 7 or later.

Frame Size

If you need full screen, full motion playback of a video, the only tool in the Studio available to you is Director MX. Even then, web playback of video of these dimensions is not recommended. In fact, don't do it.

The physical size of a video on the web is small for obvious reasons. A 320x240 video requires significantly more bandwidth and load time than one that is 160x120. When deciding the frame size of a digital video, it is best to "fall in love with the user" and not to "fall in love with the technology." Though bandwidth is readily available in North America and Europe, there are still a lot of people around the world using a dial-up connection…and paying for the time online.

Movie Length

Bottom line? Long videos have a larger file size and bandwidth requirement than short ones. Your audience will vote with its mouse if it has to wait an inordinate amount of time for a compressed video to load and play. If they decide to wait, long videos that experience a streaming lag?the playback head catches up with the stream?playback will be interrupted, and the experience will be less than pleasant.

The new capability in Flash MX 2004 to link to a video and stream it from the server goes a long way toward addressing this frustration. Still, when it comes to the web, the shorter the video, the better.

Frame Rate

Frame rate is essentially the speed at which the video plays. On a television, the rate is 29.97 frames per second (the NTSC standard), which is unacceptably high for web playback. In Flash, the movie plays at the frame rate?12 to 15 frames per second?set for the Flash movie. If you have a video where there is relatively no change in the background?a newscaster?then you can get away with a rate as low as 10 frames per second or lower.

Compression

When the students of one of the authors first experience digital video, they are simply astounded that the file size of an uncompressed video is measured in terms of gigabytes and not megabytes or kilobytes. This is why digital video needs to be compressed.

In Flash, the Spark codec uses temporal compression. When it compresses the movie, it ignores individual frames and looks instead at the changes between the frames. The frames are the key frames and the frames between them are the "difference" or "delta" frames. Delta frames are significantly smaller than the key frames because, in very basic terms, the pixels that don't change between the key frames are removed. The result is a significant reduction in file size. The downside is that it follows the first rule of digital media physics, which states, "For every action, there is an equally opposite and ugly implication." In the case of video compression, finding the proper balance between image and sound quality and file size is a time-consuming process.

When you play your video through the web using Flash, the Spark codec inside the Flash Player decompresses the movie. This is important to know. By having this capability built into the .swf, the load on the user's processor and demand on RAM is significantly reduced.

Data Rate

Data rate is not how fast the video plays. This is the speed at which the information passes from the modem to the computer's processor. Depending upon the connection, this rate can vary anywhere from 1.5 Kbps to 50 Kbps.

The biggest mistake you can make is to set the data rate too high. There is a point Sorenson calls the "quality ceiling," where, regardless of data rate, the quality is the same. In Flash, due to its use of the Spark codec, this ceiling is achieved at lower data rate than you might expect.

To calculate the data rate, use this formula from the Sorenson people:

Data rate = width x height x Frame rate / 48000.

For example, a 320x240 video with a frame rate of 12 frames per second should have a data rate of 19.2 Kbps.