These objects sit inside the Header
Object. Offsets below start after the common 24-byte object header. A file must have a
File Properties Object and one Stream Properties Object per stream; the others are
optional. GUIDs are in the
table of objects. Strings are UTF-16
little-endian, usually with a terminating zero. See
ASF objects for which layouts are
unconfirmed.
File Properties Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | file ID | a GUID that identifies the file |
| 16 | 8 | file size | in bytes |
| 24 | 8 | creation date | 100-nanosecond units since 1 January 1601 |
| 32 | 8 | data packets count | |
| 40 | 8 | play duration | 100-nanosecond units |
| 48 | 8 | send duration | 100-nanosecond units |
| 56 | 8 | preroll | milliseconds to buffer before playing; play duration includes this |
| 64 | 4 | flags | bit 0 broadcast, bit 1 seekable, the rest reserved |
| 68 | 4 | minimum data packet size | |
| 72 | 4 | maximum data packet size | the same as the minimum: packets are all one size |
| 76 | 4 | maximum bit rate | bits a second |
In a broadcast file (flag bit 0), the file size, creation date, packet count and durations are not valid.
Stream Properties Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | stream type | a media-type GUID |
| 16 | 16 | error correction type | a GUID |
| 32 | 8 | time offset | added to every timestamp |
| 40 | 4 | type-specific data length | |
| 44 | 4 | error correction data length | |
| 48 | 2 | flags | bits 0–6 stream number (1 to 127), bit 15 encrypted content |
| 50 | 4 | reserved | |
| 54 | varies | type-specific data | for audio, a WAVEFORMATEX structure |
| … | varies | error correction data |
WAVEFORMATEX for audio streams
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 2 | codec ID | the format tag of the WMA codec |
| 2 | 2 | channels | |
| 4 | 4 | samples per second | |
| 8 | 4 | average bytes per second | the bit rate divided by 8 |
| 12 | 2 | block alignment | the codec’s packet size |
| 14 | 2 | bits per sample | |
| 16 | 2 | codec-specific data size | |
| 18 | varies | codec-specific data | see WMA codecs |
Codec List Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | reserved | Reserved 2 GUID |
| 16 | 4 | codec entries count | |
| 20 | varies | codec entries | as follows |
| Size | Field | Meaning |
|---|---|---|
| 2 | type | 1 video, 2 audio, FFFF unknown |
| 2 | name length | in characters |
| varies | name | the codec’s name, UTF-16 |
| 2 | description length | in characters |
| varies | description | UTF-16 |
| 2 | information length | in bytes |
| varies | information | codec-specific data, for audio a format tag |
Script Command Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | reserved | a reserved GUID |
| 16 | 2 | commands count | |
| 18 | 2 | command types count | |
| 20 | varies | command types | each a 2-byte name length, in characters, and a UTF-16 name |
| … | varies | commands | each a 4-byte presentation time in milliseconds, a 2-byte index into the command types, a 2-byte name length and a UTF-16 name |
Marker Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | reserved | a reserved GUID |
| 16 | 4 | markers count | |
| 20 | 2 | reserved | 0 |
| 22 | 2 | name length | in bytes |
| 24 | varies | name | the marker list’s name, UTF-16 |
| … | varies | markers | as follows |
| Size | Field | Meaning |
|---|---|---|
| 8 | offset | byte offset of the packet in the data object |
| 8 | presentation time | 100-nanosecond units |
| 2 | entry length | of this marker’s remaining fields |
| 4 | send time | milliseconds |
| 4 | flags | reserved |
| 4 | description length | in characters |
| varies | description | UTF-16 |
Bitrate Mutual Exclusion Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | exclusion type | an exclusion GUID |
| 16 | 2 | stream numbers count | |
| 18 | 2 each | stream numbers | streams of which only one is played at a time |
Error Correction Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 16 | error correction type | a GUID |
| 16 | 4 | data length | |
| 20 | varies | data |
Content Description Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 2 | title length | in bytes |
| 2 | 2 | author length | |
| 4 | 2 | copyright length | |
| 6 | 2 | description length | |
| 8 | 2 | rating length | |
| 10 | varies | title, author, copyright, description, rating | each in UTF-16, in this order |
Extended Content Description Object
Holds name-and-value tags. Its fields and the value types are on the attributes page.
Content Branding Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | banner image type | 0 none, 1 bitmap, 2 JPEG, 3 GIF |
| 4 | 4 | banner image size | |
| 8 | varies | banner image data | |
| … | 4 + varies | banner URL | a length, then ASCII |
| … | 4 + varies | copyright URL | a length, then ASCII |
Stream Bitrate Properties Object
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 2 | bitrate records count | |
| 2 | 6 each | records | 2 bytes of flags (bits 0–6 stream number) and a 4-byte average bit rate |
Encryption and signature objects
| Object | Fields, in order |
|---|---|
| Content Encryption | secret data length (4), secret data, protection type length (4), protection type (DRM), key ID length (4), key ID, license URL length (4), license URL (ASCII) |
| Extended Content Encryption | data size (4), data |
| Digital Signature | signature type (4, value 2), signature data length (4), signature data |
The contents of the encrypted data and the licences are Microsoft’s DRM and are not publicly documented.
Padding Object
Reserves space in the header so tags can grow without rewriting the file. Its bytes have no meaning.