Introduction
Windows Media Audio is Microsoft’s family of audio codecs, introduced in 1999 as a rival to MP3 and played by Windows Media Player. The family includes the standard lossy codec, WMA Pro for multichannel and high-resolution audio, WMA Lossless and WMA Voice. WMA files were common in online music stores of the 2000s, some protected with DRM.
Structure
A .wma file uses Microsoft’s Advanced Systems Format (ASF), the same
container as .wmv video. ASF is made of objects, each a 16-byte GUID and
a 64-bit little-endian size. The file starts with the Header Object, whose GUID begins
with the bytes 30 26 B2 75. It holds further objects: file properties
(duration, packet size), stream properties (the codec and its settings) and content
description (title, author). The Data Object follows with the audio in fixed-size
packets, and an optional Index Object helps seeking.
0Header Object file and stream properties, tagsvaries…Data Object audio in fixed-size packetsvaries…Index Object optional, for seekingvaries
The ASF container is publicly specified; the WMA codecs inside it are not, and are known through reverse engineering. The reference pages cover both:
- ASF objects – the object layout and every object GUID
- Header objects – file and stream properties, codecs, markers, content description and more
- Header extension – extended stream properties, metadata, languages and index parameters
- Data packets – the packet and payload structure of the audio
- Index objects – the seek tables at the end of a file
- WMA codecs – format tags, codec data and superframes
- Attributes and tags – tag value types, attribute names and pictures
Not described
These pages follow Microsoft’s published ASF specification, checked against the open-source parsers hachoir, VLC and FFmpeg. The explorer has no WMA viewer, so a dropped file shows as bytes.
Known, not yet covered
- Reference: the layouts of the Script Command, Content Branding, encryption and signature objects, Group Mutual Exclusion, Bandwidth Sharing, Compatibility, Media Object Index and Timecode Index objects are unconfirmed on the ASF objects page: the specification PDF was not opened, and no parser checks them.
- Reference: the three index layouts other than Simple Index are given from the specification’s published structure only (index objects).
- Reference: the WMA codec’s Huffman tables and block syntax, which are described only by decoder source code (codecs).
- Viewer: there is no WMA plugin: the header objects, data packets and indexes are not read.
Links
Software
- Windows Media Player – Microsoft’s media player, built into Windows (Windows)
- VLC media player – free player for almost any audio or video file (Windows, macOS, Linux, mobile)
- foobar2000 – free music player and converter (Windows, macOS, mobile)
- FFmpeg – command-line tool that converts WMA to other formats (Windows, macOS, Linux)
Developers
- libavcodec – FFmpeg’s codec library, which decodes WMA (C)
Reference
- Overview of the ASF Format – Microsoft’s introduction to the container
- Attribute list – Microsoft’s full list of WM/ tag names
- Advanced Systems Format (ASF) Specification – Microsoft’s published definition of the container