Picking a File Format

Your main concern when choosing a file format for either Web audio or Web video is download time — the length of time it takes for a Web site visitor to be able to experience the music or movie. Most people won’t be willing to go make a sandwich to pass the time waiting to hear your favorite song, and even your dearest friends may not be happy about spending all afternoon trying to see the video of your vacation.

Three main factors affect download time: the speed of the network connection, the file size, and whether the file has to completely download in order to start playing. No matter how fast your Web server’s connection is, you have no control over the speed of your visitors’ connections. Thus, the only thing you can really do is modify either the file size or the manner in which the file is displayed.

I deal with file compression in the following section, so now I want to take a look at streaming versus regular files. With a regular file, such as the MP3 format that is so popular for reproducing music, the entire file must be downloaded and then played. With a streaming file, such as Real Audio, the user can hear the first part of the music while the rest of it is still on the way.

In theory, it sounds like a great idea. Sometimes, though, streaming files (whether with video or audio content) can be jerky and aesthetically deficient, especially with slower connections. So you have to decide whether speed of display is more important to you than smoothness of presentation.

Tables 9-3 and 9-4 show some commonly used video and audio file formats, a description of each, and whether the format is streamable.

Table 9-3. Video File Formats
File ExtensionDescriptionStreamable
.aviMicrosoft’s Audio Video Interleave format can be problematic. Although it achieves good quality, various factors can yield a large file size, and it can’t support full-screen movies.Yes
.mov, .qtThe Apple movie format for QuickTime is excellent and has great file compression.Yes
.mpegThe Motion Picture Experts Group format is as popular for video as its MP3 cousin is for audio. With both high file compression and excellent reproduction quality, this is the vehicle of choice for many Webmasters.Yes
.ramThe Real Audio Movie format was the most common form of streaming video, but it lost popularity because it requires the use of a proprietary program, RealPlayer, which is often criticized for carrying too much advertising and being somewhat difficult to use.Yes
.wmvWindows Media Video tends to produce small files of good quality.Yes

Table 9-4. Audio File Formats
File ExtensionDescriptionStreamable
.aiff, .auThese files are mainly used on Macintosh systems. Because the majority of computer users don’t own Macs, think twice before committing to it because your other visitors may or may not be able to use it. File sizes tend to be large.No
.midiThe Musical Instrument Digital Interface is a venerable old music format. So many MIDI files are online that it is impossible to count them, and this format is supported by the vast majority of all music creation programs. Nonetheless, it’s mainly biased toward non-vocal music and thus may have limited utility for Webmasters despite its small file size.No
.mp3This is the king of the audio files. Everybody has heard of — and probably has — songs in MP3 format. Although people may argue that other formats have technical advantages, MP3s are widely supported and are probably instantly playable on almost all your visitors’ systems.Yes
.raThe Real Audio format (from the same folks who brought you streaming video) can create smaller files than many of the others, but at a serious cost in sound quality.Yes
.wavWaveform Audio files are good in that any computer with sound capabilities can play them, but they’re notorious for their large file sizes.No
.wmaWindows Media Audio files are often smaller than MP3s and have very good quality.Yes

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.23.30