25.3. Video File Formats
As with audio, in the early days of the Web, adding video to a web page meant using one of the currently available video formats (such as QuickTime or AVI) and linking it to a page for download. The evolution of streaming media has changed that, and now adding video content like movie trailers, news broadcasts, even live programming to a web site is much more practical and widespread.
This section looks at the video formats that are most common for web delivery.
25.3.1. QuickTime Movie (.mov)
QuickTime is a highly versatile and well-supported media format. While originally developed as a video format, it has evolved into a container format capable of storing all sorts of media (still images, audio, video, Flash, and SMIL presentations). For the complete list of file formats supported by QuickTime, see http://www.apple.com/quicktime/specifications.html.
QuickTime, a system extension that makes it possible to view audio/video information on a computer, was introduced by Apple Computer in 1991. Although developed for the Macintosh, it is also supported on PCs via QuickTime for Windows. QuickTime has grown to be the industry standard for multimedia development, and most hardware and software offer QuickTime support. Both Netscape Navigator 3.0+ and Internet Explorer 3.0+ come with QuickTime plug-in players, so the majority of web readers are able to view QuickTime movies right in the browser.
QuickTime movies can be streamed using a number of streaming server packages, including Apple's QuickTime Server for Mac OS X or its open source Darwin Streaming Server for Unix. To give the illusion of streaming from an HTTP server (pseudo-streaming), create FastStart Quicktime movies, which begin playing right away and continue playing as the file downloads.
126.96.36.199. Creating QuickTime movies
You can take care of rudimentary video editing, such as deleting and rearranging, right in Apple's free QuickTime Player. The QuickTime Pro version ($29.95) offers more features and is sufficient for most basic tasks. For advanced video editing, use a professional video editing tool such as Adobe Premier or AfterEffects (most video editors support QuickTime). You may also use a file converter, such as Cleaner from Terran Interactive (http://www.terran.com) to convert existing files to QuickTime format.
Other video editing applications for the Mac include iMovie (which ships free on newer Macintoshes) and Final Cut Pro, a more professional video editing program.
An important step to remember when saving a movie is to make it self-contained. This process resolves all data references and prepares the file to go out on the Internet on its own. You will also be asked to pick a codec (QuickTime supports several). Cinepak is a good general purpose codec; Sorenson is more efficient but not as well supported.
188.8.131.52. Reference movies
Another interesting feature of Version 2.0 and higher of the QuickTime plug-in is its support for reference movies. Reference movies are used as pointers to alternate versions (or "tracks") of a movie, each optimized for a different connection speed. When a user downloads the reference movie, the plug-in ensures that the best track for the current connection speed is played.
You could also save a version of your movie that doesn't use the Sorenson codec in the reference file. This movie will play for users who don't have the latest plug-in version, ensuring backwards compatibility.
184.108.40.206. For more information
The process for adding QuickTime to a web page is discussed later in this chapter.For general information on QuickTime, see Apple's site at http://www.apple.com/quicktime/.For complete information on all aspects of QuickTime creation and delivery, I recommend the book QuickTime for the Web: A Hands-On Guide for Webmasters, Site Designers, and HTML Authors by the folks at Apple Computer, Inc. (Morgan Kaufmann, 2000). It is an excellent reference if you are serious about QuickTime for adding multimedia elements to your site.
The following summarizes the QuickTime format:
25.3.2. RealMedia (.rm)
RealMedia is the industry standard streaming media format. RealNetworks (which used to be Progressive Networks) first launched its streaming video capabilities in Version 3.0 of its RealMedia line of products (of which RealAudio is the star component). RealMedia files (.rm) are viewed using RealPlayer 3 and higher. The wide distribution of RealPlayer and a proven track record of effective playback have made RealNetworks' products the de facto standard for adding streaming media to a web site.
The components of the RealMedia system (RealPlayer for playback, RealServer for serving simultaneous streams, and RealProducer for creating .rm files) are the same as for RealAudio. The descriptions of each component as discussed in Chapter 24, "Audio on the Web" apply to video as well. RealMedia movies are encoded using a proprietary codec built into RealProducer and RealPlayer.
The following summarizes the RealAudio format:
25.3.3. Windows Media (.wmv or .asf)
Windows Media is the new standard for audio and video, created by Microsoft and therefore very closely integrated with the Windows OS. The Windows Media Player is capable of playing Microsoft's proprietary Windows Media Video (.wmv) and Advanced Streaming Format (.asf ), as well as a number of other formats such as AVI, MPEG, MP3, and QuickTime.
The Windows Media system is also comprised of Windows Media Server (which runs only on Windows NT/2000) and tools for creating .wmv and .asf files (Windows Media Author and Windows Media Encoder, which are both Windows only). These components, as well as the methods for adding Windows Media to a web page, are discussed in Chapter 24, "Audio on the Web".
Windows Media movies are encoded using the proprietary Windows Media Video codec (currently in Version 8) designed especially for the Windows Media system. Users must have the Windows Media Player 8 in order to play movies encoded with the Version 8 codec. Use Version 7 if you don't want to force your users to upgrade (or if the processing power of your PC cannot handle the demands of the Version 8 encoder).
For more information about Window Media, visit Microsoft's site at http://www.microsoft.com/windows/windowsmedia/.
The following summarizes the Windows Media format:
25.3.4. AVI (.avi)
AVI (which stands for Audio/Video Interleaved) was introduced by Microsoft in 1992 as the standard movie format to work with its Video for Windows (VFW) multimedia architecture for Windows 95. The AVI format has been replaced by the more robust Windows Media as the standard media format for Windows. Macintosh users can view AVI files using the QuickTime player. In AVI files, the audio and video information is interleaved every frame, which in theory produces smoother playback.
With the growing (and well-deserved) popularity of streaming media systems, AVI movies are not as common as they once were for web distribution. More often, they serve as the high-quality source file for the video which is then converted into a more web-friendly format.
The following summarizes the AVI format:
25.3.5. MPEG (.mpg or .mpeg)
MPEG is a set of multimedia standards created by the Moving Picture Experts Group. It supports three types of information: video, audio, and streaming (which, in the context of MPEG compression, is synchronized video and audio). MPEG was initially popular as a web format because it was the only format that could be produced on the Unix system.
MPEG files offer extremely high compression rates with little loss of quality. They accomplish this using a lossy compression technique that strips out data that is not discernible to the human ear or eye.
There are a number of MPEG standards: MPEG-1 was originally developed for video transfer at VHS quality; MPEG-2 is a higher-quality standard that was developed for television broadcast; other MPEG specs that address other needs (such as MPEG-4 and -7) are currently in development. MPEGs can be compressed using one of three schemes, Layer-I, -II, or -III. The complexity of the coding (and therefore the processor power needed to encode and decode) increases at each level. Due to this complexity, you need special encoding tools to produce MPEG videos.
MPEG-1 (which uses the .mpg or .mpeg suffix) is the most appropriate format for web purposes. MPEG-2 files are rare except in broadcast studios and on DVDs and are not well suited for web delivery.
To learn more about MPEG, visit the MPEG web site (http://www.mpeg.org).
The following summarizes the MPEG movie format:
Copyright © 2002 O'Reilly & Associates. All rights reserved.