Windows Media Profiles
Before a media file can be encoded using Windows Media, the codecs must be configured with a set of parameters that tell them what kind of compression to apply, the relationships of the streams (audio and video, for example), how to share limited bandwidth, and so forth. In the Windows Media Format SDK, these parameters are grouped together into an object called a profile, which is translated into the header of an ASF file that has had the profile applied to it. Profiles are needed because of the increasingly large number of possible combinations of audio encoding, video encoding, and script encoding, all of which must be grouped into a logical and internally consistent whole.
Profiles are container-driven; they describe the qualities of the streams in their compressed state. A high-end profile can specify better-than-DVD quality for streaming high-definition video, and the low-end profiles can create files suitable for streaming audio-video over a 28.8-Kbps modem connection. (Profiles can be stored in XML files, which have the .PRX extension, but you never work with the XML files directly in your application; you always work with profile objects using the methods of the Windows Media Format SDK.)
A profile must specify all compression settings. The audio encoding parameters include settings such as bit rate, bandwidth, and constant or variable bit-rate encoding. (Variable bit-rate encoding allows the bits per second used to encode a stream to fluctuate based on the compressibility of that sample of a stream; variable bit-rate encoding takes longer, but it generally leads to higher fidelity at a given bit rate.) Video encoding parameters include settings for image width and height, frame rate, variable or constant bit rate, buffer size (how many seconds of preroll to have on hand when playing the video), and keyframe interval. Windows Media allows very fine control of each of these settings. The video bit rate, for example, can be tuned in integer units all the way from 1 bit per second to many gigabits per second. The encoder will match the requirements spelled out in the profile as closely as possible.