© 2004 Microsoft Corporation. All rights reserved. Any reproduction, modification, or distribution is
subject to the terms of the End User License Agreement accompanying this specification.
Advanced Systems Format (ASF) Specification
Revision 01.20.03
Microsoft Corporation
December 2004
- Document Revision 01.20.03 - December, 2004 i
© 2004 Microsoft Corporation. All rights reserved. Any reproduction, modification, or distribution is
subject to the terms of the End User License Agreement accompanying this specification.
END USER LICENSE AGREEMENT ......................................................................................................IV
1. INTRODUCTION.......................................................................................................................1
1.1 ABOUT THIS SPECIFICATION ...................................................................................................................2
1.2 CONVENTIONS....................................................................................................................................2
1.3 DOCUMENT ORGANIZATION ....................................................................................................................2
2. FILE FORMAT ORGANIZATION ................................................................................................3
2.1 ASF OBJECT DEFINITION .......................................................................................................................3
2.2 TOP-LEVEL FILE STRUCTURE ...................................................................................................................3
2.3 ASF TOP-LEVEL HEADER OBJECT.............................................................................................................4
2.4 ASF TOP-LEVEL DATA OBJECT ................................................................................................................5
2.5 ASF TOP-LEVEL INDEX OBJECTS ..............................................................................................................5
3. ASF TOP-LEVEL HEADER OBJECT.............................................................................................6
3.1 HEADER OBJECT (MANDATORY, ONE ONLY) ................................................................................................6
3.2 FILE PROPERTIES OBJECT (MANDATORY, ONE ONLY).....................................................................................7
3.3 STREAM PROPERTIES OBJECT (MANDATORY, ONE PER STREAM) .......................................................................9
3.4 HEADER EXTENSION OBJECT (MANDATORY, ONE ONLY) ...............................................................................10
3.5 CODEC LIST OBJECT (OPTIONAL, ONE ONLY) ............................................................................................11
3.6 SCRIPT COMMAND OBJECT (OPTIONAL, ONE ONLY).....................................................................................13
3.7 MARKER OBJECT (OPTIONAL, 0 OR 1).....................................................................................................14
3.8 BITRATE MUTUAL EXCLUSION OBJECT (OPTIONAL, 0 OR 1) ..........................................................................16
3.9 ERROR CORRECTION OBJECT (OPTIONAL, ONE ONLY)..................................................................................17
3.10 CONTENT DESCRIPTION OBJECT (OPTIONAL, ONE ONLY)..............................................................................18
3.11 EXTENDED CONTENT DESCRIPTION OBJECT (OPTIONAL, ONE ONLY)................................................................19
3.12 STREAM BITRATE PROPERTIES OBJECT (OPTIONAL BUT RECOMMENDED, ONE ONLY) ............................................21
3.13 CONTENT BRANDING OBJECT (OPTIONAL, ONE ONLY)..................................................................................22
3.14 CONTENT ENCRYPTION OBJECT (OPTIONAL, 0 OR 1) ..................................................................................23
3.15 EXTENDED CONTENT ENCRYPTION OBJECT (OPTIONAL, 0 OR 1) ....................................................................24
3.16 DIGITAL SIGNATURE OBJECT (OPTIONAL, 0 OR 1)......................................................................................24
3.17 PADDING OBJECT (OPTIONAL, 0 TO MANY)...............................................................................................25
4. OBJECTS IN THE ASF HEADER EXTENSION OBJECT..............................................................26
4.1 EXTENDED STREAM PROPERTIES OBJECT (OPTIONAL, 1 PER MEDIA STREAM) .....................................................26
4.2 ADVANCED MUTUAL EXCLUSION OBJECT (OPTIONAL, 0 TO MANY) ..................................................................30
4.3 GROUP MUTUAL EXCLUSION OBJECT (OPTIONAL, 0 TO MANY) .......................................................................31
4.4 STREAM PRIORITIZATION OBJECT (OPTIONAL, 0 OR 1)................................................................................32
4.5 BANDWIDTH SHARING OBJECT (OPTIONAL, 0 TO MANY) ..............................................................................33
4.6 LANGUAGE LIST OBJECT (OPTIONAL, ONLY 1) ...........................................................................................34
4.7 METADATA OBJECT (OPTIONAL, 0 OR 1)..................................................................................................35
4.8 METADATA LIBRARY OBJECT (OPTIONAL, 0 OR 1) ......................................................................................36
4.9 INDEX PARAMETERS OBJECT (MANDATORY ONLY IF THE INDEX OBJECT IS PRESENT IN FILE, 0 OR 1)........................38
4.10 MEDIA OBJECT INDEX PARAMETERS OBJECT (MANDATORY ONLY IF MEDIA OBJECT INDEX IS PRESENT IN FILE, 0 OR 1)..39
4.11 TIMECODE INDEX PARAMETERS OBJECT (MANDATORY ONLY IF TIMECODE INDEX IS PRESENT IN FILE, 0 OR 1) .........40
4.12 COMPATIBILITY OBJECT (OPTIONAL, ONLY 1)............................................................................................41
4.13 ADVANCED CONTENT ENCRYPTION OBJECT (OPTIONAL, 0 OR 1) ....................................................................42
5. ASF TOP-LEVEL DATA OBJECT ...............................................................................................44
5.1 ASF DATA OBJECT (MANDATORY, ONE ONLY) ...........................................................................................44
- Document Revision 01.20.03 - December, 2004 ii
© 2004 Microsoft Corporation. All rights reserved. Any reproduction, modification, or distribution is
subject to the terms of the End User License Agreement accompanying this specification.
5.2 ASF DATA PACKET DEFINITION..............................................................................................................45
5.2.1 ERROR CORRECTION DATA ...................................................................................................................45
5.2.2 PAYLOAD PARSING INFORMATION...........................................................................................................47
5.2.3 PAYLOAD DATA .................................................................................................................................50
5.2.4 PADDING DATA .................................................................................................................................57
6. ASF TOP-LEVEL INDEX OBJECTS ...........................................................................................57
6.1 ASF TOP-LEVEL SIMPLE INDEX OBJECT (OPTIONAL BUT RECOMMENDED WHEN APPROPRIATE, 1 FOR EACH NON-HIDDEN
VIDEO STREAM) ............................................................................................................................................57
6.2 ASF TOP-LEVEL INDEX OBJECT (OPTIONAL BUT RECOMMENDED WHEN APPROPRIATE, 0 OR 1)................................59
6.3 ASF TOP-LEVEL MEDIA OBJECT INDEX OBJECT (OPTIONAL, 0 OR 1) ...............................................................61
6.4 ASF TOP-LEVEL TIMECODE INDEX OBJECT (OPTIONAL, 0 OR 1) .....................................................................62
7. ASF FEATURE IMPLEMENTATION GUIDELINES.....................................................................64
7.1 BIT RATE AND THE LEAKY BUCKET MODEL .................................................................................................64
7.2 STREAM SELECTION PROCESS................................................................................................................66
7.2.1 DESCRIPTION OF SAMPLE CONTENT ........................................................................................................66
7.2.2 CONTENT AUTHORING ........................................................................................................................66
7.2.3 EXERCISE OF THE STREAM SELECTION PROCESS .........................................................................................68
7.3 PAYLOAD EXTENSION SYSTEMS ..............................................................................................................69
7.3.1 PARSING THE REPLICATED DATA ...........................................................................................................69
7.3.2 STANDARD PAYLOAD EXTENSION SYSTEMS...............................................................................................70
7.4 METADATA ......................................................................................................................................72
7.5 PIXEL ASPECT RATIO ..........................................................................................................................73
8. CONTENT REACH GUIDELINES..............................................................................................73
8.1 HOW TO USE THIS SECTION..................................................................................................................73
8.2 COMPATIBILITY ISSUES .......................................................................................................................73
8.2.1 HEADER EXTENSION OBJECT AND CUSTOM HEADER OBJECTS ..........................................................................73
8.2.2 HANDLING COMPLEX STREAM CONFIGURATIONS .........................................................................................74
8.2.3 MEDIA TYPES OTHER THAN AUDIO, VIDEO, IMAGE AND SCRIPT .......................................................................74
8.2.4 BITRATE MUTUALLY EXCLUSIVE VIDEO STREAMS, DIFFERENT FRAME SIZES .........................................................75
8.2.5 BITRATE MUTUALLY EXCLUSIVE NON-VIDEO STREAMS ..................................................................................75
8.2.6 MULTIPLE INDEPENDENT AUDIO OR VIDEO STREAMS....................................................................................76
8.2.7 UNKNOWN STREAM IDS IN THE PAYLOADS................................................................................................76
8.2.8 MULTI-LANGUAGE PRESENTATIONS.........................................................................................................76
8.2.9 GROUP MUTUAL EXCLUSION..................................................................................................................77
8.2.10 PRESENCE OF STREAM BITRATE PROPERTIES OBJECT ..............................................................................77
8.2.11 CUSTOM TOP-LEVEL OBJECTS............................................................................................................77
8.2.12 INDEX OBJECTS.............................................................................................................................78
8.2.13 DO NOT CREATE CONTENT WITH VARIABLE-SIZE PACKETS .........................................................................79
8.2.14 PACKET SIZE MUST BE UNDER 64 KB ..................................................................................................79
8.2.15 PADDING LENGTH MUST BE ACCURATE .................................................................................................79
8.2.16 ORDERING OF PAYLOADS AND MEDIA OBJECTS IN PACKETS........................................................................80
9. STANDARD ASF MEDIA TYPES...............................................................................................80
9.1 AUDIO MEDIA TYPE ............................................................................................................................80
9.1.1 SPREAD AUDIO .................................................................................................................................81
9.1.2 AUDIO PAYLOAD SIZES........................................................................................................................82
9.2 VIDEO MEDIA TYPE ............................................................................................................................82
9.3 COMMAND MEDIA TYPE .......................................................................................................................84
- Document Revision 01.20.03 - December, 2004 iii
© 2004 Microsoft Corporation. All rights reserved. Any reproduction, modification, or distribution is
subject to the terms of the End User License Agreement accompanying this specification.
9.4 IMAGE MEDIA TYPE ............................................................................................................................85
9.4.1 JFIF/JPEG MEDIA TYPE......................................................................................................................85
9.4.2 DEGRADABLE JPEG MEDIA TYPE............................................................................................................85
9.5 FILE TRANSFER AND BINARY MEDIA TYPES ................................................................................................86
9.5.1 WEB STREAMS..................................................................................................................................87
10. ASF GUIDS .............................................................................................................................88
10.1 TOP-LEVEL ASF OBJECT GUIDS............................................................................................................89
10.2 HEADER OBJECT GUIDS .....................................................................................................................89
10.3 HEADER EXTENSION OBJECT GUIDS ......................................................................................................89
10.4 STREAM PROPERTIES OBJECT STREAM TYPE GUIDS ...................................................................................90
10.4.1 WEB STREAM TYPE-SPECIFIC DATA GUIDS..........................................................................................90
10.5 STREAM PROPERTIES OBJECT ERROR CORRECTION TYPE GUIDS ...................................................................90
10.6 HEADER EXTENSION OBJECT GUIDS ......................................................................................................90
10.7 ADVANCED CONTENT ENCRYPTION OBJECT SYSTEM ID GUIDS .....................................................................91
10.8 CODEC LIST OBJECT GUIDS ................................................................................................................91
10.9 SCRIPT COMMAND OBJECT GUIDS ........................................................................................................91
10.10 MARKER OBJECT GUIDS .................................................................................................................91
10.11 MUTUAL EXCLUSION OBJECT EXCLUSION TYPE GUIDS ............................................................................91
10.12 BANDWIDTH SHARING OBJECT GUIDS................................................................................................92
10.13 STANDARD PAYLOAD EXTENSION SYSTEM GUIDS ..................................................................................92
11. CODEC INFORMATION...........................................................................................................92
11.1 AUDIO CODEC TYPE-SPECIFIC DATA IN ASF ..............................................................................................92
11.1.1 WINDOWS MEDIA AUDIO ................................................................................................................93
11.1.2 GSM-AMR .................................................................................................................................93
11.2 MPEG-4 VIDEO TYPE-SPECIFIC DATA IN ASF ...........................................................................................93
11.2.1 BACKGROUND...............................................................................................................................93
11.2.2 DECODING PROCESS.......................................................................................................................94
11.2.3 DECODING MP4S HEADER INFORMATION.............................................................................................95
12. REVISION HISTORY ..............................................................................................................96
- Document Revision 01.20.03 - December, 2004 iv
© 2004 Microsoft Corporation. All rights reserved. Any reproduction, modification, or distribution is
subject to the terms of the End User License Agreement accompanying this specification.
End User License Agreement
Microsoft Advanced Systems Format (ASF) Specification version 1.2
IMPORTANT—READ CAREFULLY: This Microsoft Agreement (“Agreement”) is a legal agreement between you
(either an individual or a single entity) and Microsoft Corporation (“Microsoft”) for the version of the Microsoft
specification identified above which you are about to download (“Specification”). By downloading, copying, or
otherwise using the Specification, you agree to be bound by the terms of this Agreement. If you do not agree to the
terms of this Agreement, do not download, copy or otherwise use the Specification.
The Specification is owned by Microsoft or its suppliers and is protected by copyright laws and international copyright treaties, as
well as other intellectual property laws and treaties.
The capitalized terms used in this Agreement are defined as follows:
� “Advanced Systems Format” or “ASF” means version 1.2 of the extensible file storage format developed by or for
Microsoft for authoring, editing, archiving, distributing, streaming, playing, referencing, or otherwise
manipulating content.
� “Necessary Claims” means any and all claim(s), but only such claim(s), of a patent or patent application that
(a) are owned, controlled, or sublicensable (without payment of royalties to an unaffiliated third party) by
Microsoft now or at any future time; and (b) are necessarily infringed by implementing ASF as set forth in the
Specification. Notwithstanding the foregoing sentence, Necessary Claims do not include any claims: (i) to any
enabling technologies that may be necessary to make or use any product or portion thereof that includes ASF (e.g.,
enabling semiconductor manufacturing technology, compiler technology, object oriented technology, operating
system technology, protocols, programming interfaces, etc.); or (ii) covering the implementation of other
specifications, technical documentation or technology merely referred to in the Specification.
� “Windows Media Codecs” means all versions of the audio, video, and data compression/decompression algorithms
(“codecs”) that have a ASF Codec Description that begins with “Windows Media” or “Microsoft”. Windows
Media Codecs includes, but is not limited to, the “Windows Media Audio” codecs, “Windows Media Video”
codecs, and “Microsoft MPEG-4” codec.
All other initially capitalized terms have the meanings assigned to them elsewhere in this Agreement.
1. LICENSE.
(a) Specification. Provided you comply with all terms and conditions of this Agreement, including without limitation
Section 2 below, Microsoft grants you the following limited, non-exclusive, world-wide, royalty-free, non-assignable,
nontransferable, non-sublicenseable license during the Term (defined below), under any copyrights owned or
licensable by Microsoft without payment of consideration to unaffiliated third parties, to: (i) reproduce and internally
use a reasonable number of copies of the Specification in its entirety as a reference for the sole purpose of
implementing ASF in your hardware, application, or utilities (your “Solutions”); (ii) reproduce and internally use
your implementations of ASF made pursuant to the terms of this Agreement (your “Implementations”) in source
code form solely for internal development and testing of your Solutions, and (iii) reproduce and have reproduced in
object code form only, your Implementations and distribute, directly and indirectly, your Implementations (only in
object code form) solely as part of and for use with your Solutions.
(b) Necessary Claims. Provided you comply with all terms and conditions of this Agreement, including without
limitation Section 2 below, Microsoft grants you the following limited, non-exclusive, world-wide, royalty-free,
non-assignable, nontransferable, non-sublicenseable license during the Term under its Necessary Claims to make, use
and distribute in object code form (in accordance with the distribution criteria set forth in Section 1(a)(iii) above) your
Implementations that fully comply with the Specification.
(c) Reserved Rights. The foregoing license is applicable only to the version of the Specification which you are about to
download. This Agreement does not grant you any rights to any additional versions of or extensions to the
Specification. Microsoft and its suppliers retain title and all ownership rights to the Specification and the
information contained therein. All rights not expressly granted are reserved to Microsoft. Microsoft may have
patents or pending patent applications, trademarks, copyrights, trade secrets or other intellectual property rights
covering the subject matter in the Specification. The furnishing of this Specification does not give you any license