Sunday 18 March 2012

ASF Files Structure

The Advanced Systems Format (ASF) is the file format used by Windows Media. Audio and/or Video content compressed with a wide variety of codecs can be stored in an ASF file and played back with the Windows Media Player (provided the appropriate codecs are installed), streamed with Windows Media Services or optionally packaged with Windows Media Rights Manager. ASF is an extensible file format designed to store synchronized multimedia data.

The base unit of organization for ASF files is called an object. An ASF file object contains the following data.

DataSize
A GUID that identifies the object128 bits
The size of the object64-bits
Object data. The object data can contain other ASF objectsVaries 


Note  An ASF file object is simply a chunk of data. It is not an object in the computer programming sense.An ASF file contains three types of top-level file objects.


ASF File ObjectDescription
Header ObjectContains information about the ASF file.
Data ObjectContains packets of media data.
Index Object(s)Contains one or more indexes. (Optional.)

The following diagram shows the ASF file structure.

This diagram is not drawn to scale; typically the Data Object comprises most of the file.

Header Object

The Header Object is mandatory and appears at the beginning of every ASF file. It contains global file attributes and information about the streams in the ASF file. This information is used to interpret and play the data in the file.
The Header Object contains several madatory sub-objects:
  • The File Properties Object describes global attributes of the file, such as the file size, play duration, number of data packets, minimum and maximum packet size, and maximum bit rate.
  • The Header Extension Object enables additional functionality to be added to an ASF file while maintaining backward compatibility.
  • The Stream Properties Object describes one stream in the file. An ASF file must contain at least one stream, and therefore at least one Stream Properties Object.
The Header Object can contain additional optional information, including metadata about the file (such as title and author), a list of the codecs used to encode the file, and content protection information.

Data Object

The ASF Data Object contains all of the media data for the ASF file. This object is mandatory and must follow the ASF Header Object.
The Data Object is divided into data packets. Each packet contains data for one or several streams in the file. A data packet contains a data packet header that provides packet parsing information, followed by the payload data—the actual digital media data. All of the data packets have a presentation time associated with it and are arranged in the order received.
Information about the contents of the Data Object, such as the packet size and packet count, is stored in the Header Object.

Index Object

The Index Object is optional and is the last object in the ASF file. An ASF file can contain more than one Index Object. The Index Object provides time-based random access into the ASF Data Object.

No comments:

Post a Comment