Both WMA and WMV extensions uses ASF structure to store audio and video data including additional information about them. In fact there is no WMA extension that is only ASF file.
The ASF specification is available at
Windows Media. You can read this specification to find out every thing about WMA and WMV files.
ASF made of objects. In fact ASF is object that contains sub objects. Each object have it own structure. As an example there is an object contains file properties and another contain audio data. Every objects have a GUID as identifier. ASF files starts with special GUID that uses as ASF file indicator. GUID is 128 bits length. Every objects starts with GUID and follow by size of object. The data part of object have it own structure.
There is an object named "Content Description Object" the table below is structure of this object:
Field name | Field type | Size (bits) |
Object ID | GUID | 128 |
Object Size | QWORD | 64 |
Title Length | WORD | 16 |
Author Length | WORD | 16 |
Copyright Length | WORD | 16 |
Description Length | WORD | 16 |
Rating Length | WORD | 16 |
Title | WCHAR | Varies |
Author | WCHAR | Varies |
Copyright | WCHAR | Varies |
Description | WCHAR | Varies |
Rating | WCHAR | Varies |
As you can see in the table, ASF structure used 16bit number for length of strings. This technique used every time that ASF needs to store strings (Differ from string storage in ID3 tagging). And everywhere ASF use unicode encoding for strings (In ID3 string encoding is custom).
As it's clear "Content Description Object" is not enough to store file information. There is too many thing such as picture that's not supported in "Content Description Object". There is another object to store other information. In fact "Content Description Object" is for basic information of file and "Extended Content Description Object" used for more descriptions. This is the structure of this object:
Field name | Field type | Size (bits) |
Object ID | GUID | 128 |
Object Size | QWORD | 64 |
Content Descriptors Count | WORD | 16 |
Field Name | Field Type | Size (bits) | Descriptor Name Length | WORD | 16 | Descriptor Name | WCHAR | varies | Descriptor Value Data Type | WORD | 16 | Descriptor Value Length | WORD | 16 | Descriptor Value | See text | varies |
|
As any other objects this object starts with ObjectID and Size. Indicate number of Descriptors that object contains and then for each descriptor have Descriptor structure. Descriptors can contains Strings, Digits, Binary data or any other types.
Professional Tag Editor supports "Content Description", "Extended Content Description", "Branding Object". To see how Professional Tag Editor reads and write ASF information take a look at How it works (WMA).