How does ASF relate to AVI?

ASF replaces AVI. This replacement will not occur overnight, of course. But before long, AVI will have been completely superceded by ASF.

ASF is a direct extension of AVI. Like ASF, AVI is a file format. But AVI was developed before the advent of today's Internet. AVI stands for Audio Video Interleave. The main purposes of AVI are for storing digital video, and for playing back that video from a local source such as a hard disk or a CD-ROM.

The Internet did two things to shake up the soft and cushy world of AVI. First, the Internet presented a standard blank palette -- the HTML page -- that invited creative types to think of ways to fill it up. Video is only one element that can be placed on a page. There are many others -- text, markers into the video, graphics, and animation. All of these things can be synchronized to create a presentation more powerful and effective than a video-only presentation.

Secondly, the Internet moved the storage site for the video from a local source to a remote server accessible over network pipes. Now, instead of travelling through an internal data bus to get to the client display, video had to negotiate the Internet. It was like going from a short drive down a freshly paved, wide-open, eight-lane tollroad, to an all-night roadtrip down a series of highways and biways, pot-holed city streets, gravel roads, and, as often as not, finishing up on a dirt path.

Put simply, AVI was not developed to handle synchronized multimedia or to navigate the skinny precarious network pipes that characterize Internet and intranet multimedia today. In contrast, these new realities directly informed the modifications and extensions to AVI which were included in ASF.

This is not to say that ASF is unsuitable for local playback. It is. ASF is designed in a modular way. Take what you need and leave the rest behind. For video-only content that is to be played only locally, an ASF file could be generated which would look not that different from a corresponding AVI file in terms of overall structure and size. But the true power of ASF lies in generating multimedia content files that can be delivered in any and all environments -- local, intranet, and Internet.

AVI and ASF files share a similar fundamental structure. Each is composed of a collection of basic building blocks (objects, in the case of ASF). The basic building block for each file type contains an identifier (GUIDs for ASF), a size field, and a data field. In addition, ASF files and AVI files are each composed of a header section, followed by a data section, and concluded, optionally, with an index section. The header sections of each begin with a file properties basic building block, followed by one stream properties building block for every stream type in the data section. Finally, ASF and AVI each support certain core media types.

That's it for similarities. From this point on, ASF and AVI are different. It is these differences that make ASF ideal for streaming synchronized multimedia and that, in turn, AVI unsuitable for it.

Objects versus Chunks.

The first significant difference between ASF and AVI concerns the basic building blocks of each. Recall from earlier (What does ASF look like under the hood?) that the basic building block of an ASF file is an object, and that objects are like Legos. The basic building block for an AVI file is the chunk. Objects are to chunks what Legos are to those older, cheaper toy bricks that your parents played with when they were kids. Even though your parents insisted that the cheap toy bricks were just as good as Legos, you knew better. The cheap toy bricks didn't stick together properly like Legos, and unlike Legos, they had no hope of surviving a chewing by your dog. In the same way, chunks do not readily fit into the world of object-oriented programming, while objects do. Moreover, chunks were not designed to traverse network pipes like those of the Internet, as objects were.

Whereas ASF objects use a GUID for the identifier, AVI chunks use something called a FOURCC (a four-character code). If GUIDs are like social security numbers without the government (see What does ASF look like under the hood?), then FOURCCs are like social security numbers, period. That is, FOURCCs need to be registered with a central authority. This is very inefficient in the fast moving world of the Internet, in which new media and object types are created at a blinding pace.

In addition, the size field in an AVI chunk is 4 bytes in length, as opposed to the ASF object size field, which is 8 bytes in length. Recall that the data in an ASF file is stored as a series of data packets contained within the data field of the data object. Thus, all of the multimedia data in an ASF file must fit within a single object. The same is true for the top-level AVI data chunk. With a size field of 8 bytes, an ASF file can store hours upon hours of video content. AVI, on the other hand, is limited to storing videos shorter than a feature length Hollywood movie. It is safe bet that Hollywood will like ASF better than AVI.

Multimedia Streaming Optimizations.

In addition to differing with respect to the structure of their basic building blocks, ASF and AVI also differ with respect to particular features provided to optimize streaming and playback. ASF provides many such features; AVI provides none. In What makes ASF good?, we looked at the specific features that make ASF optimal for streaming synchronized multimedia. For the most part, ASF implements these features through the optional header objects, and through the header of the data packets. (See What does ASF look like under the hood?) AVI provides none of these optional header objects. Similarly, whereas ASF stores the multimedia data in a series of intelligent data packets the headers of which store rich information for optimizing streaming, AVI stores this data in dumb chunks that contain no such information.

The case of video illustrates why ASF is far superior to AVI. For example, AVI locks in the frame rate of video. Frame rate is the rate at which the frames of the video change. In the world of the Internet, many network pipes are skinny, and the degree to which they are congested varies over time. These conditions make maintaining a fixed frame rate impracticable. ASF, which was designed with the Internet in mind, allows for variable-frame-rate video.

Moreover, AVI supports only video and audio as core media types, and makes no provision for extending AVI to support additional media types. ASF, in contrast, provides seven different core media types, including video and audio, and provides for extending this set.

In sum, AVI was a fine multimedia format in its day, adequately serving its purpose in the pre-Internet world. However, the Internet represents a new day. That day belongs to ASF.

 

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.