Advanced Systems Format (ASF) Specification

Revision 01.20.03

Microsoft Corporation

December 2004

 

 

 

 

 

 

 

 


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

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

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

 


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 to these patents, trademarks, trade secrets, copyrights, or other intellectual property rights, except as specifically set forth in Sections 1(a) and 1(b) above.

2.         DESCRIPTION OF ADDITIONAL LIMITATIONS.   Without limiting the conditions set forth in Section 1 above, your rights under Section 1 are expressly conditioned upon your compliance with each of the following limitations:

(a)       You may not alter or remove any copyright, trademark or other protective notices or legends from any copy of the Specification.

(b)       You may not provide, publish or otherwise distribute the Specification to any third party.  Further, you shall use commercially reasonable efforts to ensure that the use or distribution of your Solutions, including your Implementations as incorporated into your Solutions, shall not in any way disclose or reveal the information contained in the Specification.

(c)       Your Implementations as incorporated into your Solutions must implement the Specification in its entirety. By way of clarification of the foregoing, you are not required to implement any portion of the Specification that is identified as “optional”.  However, if you elect to implement a portion of the Specification that is identified as optional, you must also implement that optional portion of the Specification in its entirety.

(d)       Your Solutions shall not circumvent or compromise the protection of content protected with Microsoft's digital rights management.

(e)       To promote interoperability with legacy and future solutions built on Windows Media technologies, Microsoft recommends that your Solutions follow these guidelines: (i) if your Solutions save to permanent storage, write to a network, or otherwise export content compressed with Windows Media Codecs, such content should be contained within ASF and (ii) if your Solutions create ASF files, or register for any file types or MIME types associated with ASF files, your Solutions should adhere to the ASF file naming and registration conventions posted on the http://go.microsoft.com/fwlink/?LinkId=11652 web site.

(f)        For a variety of reasons, including without limitation, because you do not have the right to sublicense the Necessary Claims, your license rights to the Specification are conditioned upon your not creating or distributing your Implementations in any manner that would cause ASF (whether embodied in your Implementation or otherwise) to become subject to any of the terms of an Excluded License.  An “Excluded License” is any license that requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software be (x) disclosed or distributed in source code form; (y) licensed for the purpose of making derivative works; or (z) redistributable at no charge; 

3.         TERM.  The term of this Agreement (“Term”) commences upon your downloading of the Specification and expires without notice on January 1, 2012, unless terminated sooner as provided in Section 4. After the expiration or termination of the Term, you must cease creating any new Implementations.  If you have complied with the terms and conditions of this Agreement and Microsoft has not terminated this Agreement as provided in Section 4, you may continue to exercise the license rights granted herein after the expiration of the Term, including the right to use a reasonable number of copies of the Specification, subject to the conditions and restrictions herein and solely to the limited extent needed to (i) continue to distribute your Solutions containing your Implementations where such Solutions were first commercially released in a general, non-beta form during the Term (“Legacy Solutions”) and (ii) develop bug fixes and provide product support for your Legacy Solutions.   You may not continue to exercise the license rights granted herein after the expiration of the Term (i) if Microsoft has terminated this Agreement as provided in Section 4 or (ii) if you do not continue to comply with any of the conditions and restrictions herein that were applicable to your exercise of the license rights during the Term.

4.       TERMINATION.  Without prejudice to any other rights, Microsoft may terminate this Agreement if you fail to comply with any of the terms and conditions of this Agreement (“Termination for Cause”).  Immediately following a Termination for Cause, you must destroy all copies of the Specification in your possession or under your control and cease any further distribution of your Solutions that use or incorporate Implementations.

5.         SUPPORT.  Microsoft is not obligated to provide technical or other support for the Specification. You are responsible for any and all maintenance, end-user support, technical support and updates for your Solutions.

6.         EXPORT RESTRICTIONS. You acknowledge that the Specification is subject to U.S. export jurisdiction.  You agree to comply with all applicable international and national laws that apply to the Specification, including the U.S. Export Administration Regulations, as well as end-user, end-use and country destination restrictions issued by U.S. and other governments. For additional information on exporting Microsoft products, see http://www.microsoft.com/exporting/.

7.         DISCLAIMER OF WARRANTIES.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE TO YOU THE SPECIFICATION (AND ALL INTELLECTUAL PROPERTY THEREIN), AND ANY (IF ANY) SUPPORT SERVICES RELATED TO THE SPECIFICATION ("SUPPORT SERVICES") AS IS AND WITH ALL FAULTS; AND MICROSOFT AND ITS SUPPLIERS HEREBY DISCLAIM WITH RESPECT TO THE SPECIFICATION AND SUPPORT SERVICES ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES OR CONDITIONS OF OR RELATED TO:  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS, WORKMANLIKE EFFORT AND LACK OF NEGLIGENCE.  ALSO THERE IS NO WARRANTY, DUTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NONINFRINGEMENT.  THE ENTIRE RISK ARISING OUT OF USE OF THE SPECIFICATION (AND ALL INTELLECTUAL PROPERTY THEREIN) AND ANY SUPPORT SERVICES REMAINS WITH YOU.

8.         EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGESTo the maximum extent permitted by applicable law, in no event shall Microsoft or its suppliers be liable for any special, incidental, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits or confidential or other information, for business interruption, for personal injury, for loss of privacy, for failure to meet any duty including of good faith or of reasonable care, for negligence, and for any other pecuniary or other loss whatsoever) arising out of or in any way related to the use of or inability to use the specification, any intellectual property therein, the provision of or failure to provide Support Services, or otherwise under or in connection with any provision of this AGREEMENT, even in the event of the fault, tort (including negligence), strict liability, breach of contract or breach of warranty of Microsoft or any supplier, and even if Microsoft or any supplier has been advised of the possibility of such damages.

9.         LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS AGREEMENT AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SPECIFICATION OR U.S.$5.00.  THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.

10.      APPLICABLE LAW.  This Agreement is governed by the laws of the State of Washington.

11.     ENTIRE AGREEMENT.  This Agreement is the entire agreement between you and Microsoft relating to the Specification and it supersedes all prior or contemporaneous oral or written communications, proposals and representations with respect to the Specification.

 

Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Corporation, One Microsoft Way, Redmond, WA 98052-6399.


1.     Introduction

Advanced Systems Format (ASF) is an extensible file format designed to store coordinated  digital media data. It supports data delivery over a wide variety of networks and is also suitable for local playback.

 

ASF was designed with the following goals:

 

·         To support efficient playback from digital media servers, HTTP servers, and local storage devices.

·         To support scalable digital media types such as audio and video.

·         To permit a single digital media composition to be presented over a wide range of bandwidths.

·         To allow authoring control over digital media stream relationships, especially in constrained-bandwidth scenarios.

·         To be independent of any particular digital media composition system, computer operating system, or data communications protocol.

 

Each ASF file is composed of one or more digital media streams. The file header specifies the properties of the entire file, along with stream-specific properties. Digital media data, stored after the file header, references a particular digital media stream number to indicate its type and purpose. The delivery and presentation of all digtial media stream data is aligned to a common timeline.

 

The ASF file definition includes the specification of commonly used media types. If an implementation supports media types from within this set of standard media types, then that media type must be supported in the manner described in this document if the resulting content is to be considered “content compliant” with the ASF specification.

 

ASF supports the transmission of “live content” over a network. Live content refers to digital media content, which may or may not ever be recorded upon a persistent medium (for example, a disk, CD, DVD, and so on). This use explicitly and solely means that information describing the digital media content must have been received before the digital media data itself is received (in order to interpret the digital media data), and that this information must convey the semantics of the ASF Header Object. Similarly, the received data must conform to the format of the ASF Data Packets. No additional information should be conveyed. Specifically, this use explicitly does not refer to or contain any information about network control protocols or network transmission protocols. It refers solely to the order of information arrival (header semantics before data) and the data format.

 

A partially downloaded ASF file may still be perfectly functional. As long as the required header objects and some complete set of the data objects are available, it is possible to seek to any position (backward and forward) within the partially downloaded file. Seeking in an ASF file does not require the use of an index object; however, many implementations will require the index in order to gain efficient access to the data.

 

ASF is a digital media presentation file format. It supports live and on-demand digital media content. ASF files may be edited, but ASF is specifically designed for streaming and/or local playback.

 

1.1    About this specification

This specification is intended to be compatible with previous versions of the ASF Specification.  The format defined herein is an extension of the format defined in previous versions of this specification and is not a new format. Content created according to this specification should be compatible with earlier implementations of ASF (subject to some issues that are outlined in section 8).

 

 

1.2    Conventions

In this document the following conventions are used:

 

·         "Shall" or “must” indicates a mandatory requirement

·         "Should" indicates a recommended, but optional, course of action

·         "May" indicates an optional course of action

 

All structure definitions assume 1-byte packing.

 

All references to Unicode strings imply NULL terminated strings unless otherwise indicated. The term “WCHAR” is used to indicate Unicode characters. ASF uses UTF-16, little endian, and the Byte-Order Marker (BOM) character is not present.

 

Fields marked “reserved” indicate that reading implementations should ignore the value but that writing implementations must set the value to whatever value is indicated in the specification for that field.

 

The following basic data types are used in this document. 

 

Type

Size (bits)

Signed

BYTE

8

no

WCHAR

16

no

WORD

16

no

DWORD 

32

no

QWORD 

64

no

GUID

128

no

 

 

1.3    Document organization

·         Section 1 provides an introduction to ASF and how to navigate this document.

 

·         Section 2 provides a high-level overview of the ASF file format organization.

 

·         Sections 3 and 4 define the various objects that comprise the ASF Header Object.

 

·         Section 5 describes the organization of the ASF Data Object.

 

·         Section 6 documents the internals of the ASF top-level index objects.

 

·         Section 7 documents various features of ASF and how to use them.

 

·         Section 8 details how to create content that is compatible with many existing ASF reading implementations; this concept is referred to as “content reach.”

 

·         Section 9 lists and describes standard ASF media types.

 

·         Section 10 contains a list of the ASF GUIDs used throughout this document.

 

·         Section 11 contains detailed information for specific codec data in ASF.

 

 

2.     File format organization

This section provides a high-level overview of the ASF file format organization.

 

 

2.1    ASF object definition

The base unit of organization for ASF files is called the ASF object. It consists of a 128-bit GUID for the object, a 64-bit integer object size, and the variable-length object data. The value of the object size field is the sum of 24 bytes plus the size of the object data in bytes. The following diagram illustrates the ASF object structure:

 

All ASF objects and structures (including data packet headers) are stored in little-endian byte order (the inverse of network byte order). However, ASF files can contain digital media stream data in either byte order within the data packets.

 

 

2.2    Top-level file structure

ASF files are logically composed of three types of top-level objects: the Header Object, the Data Object, and the Index Object(s). The Header Object is mandatory and must be placed at the beginning of every ASF file. The Data Object is also mandatory and must follow the Header Object. The Index Object(s) are optional, but they are useful in providing time-based random access into ASF files. When present, the Index Object(s) must be the last object in the ASF file. The following diagram illustrates the top-level ASF file structure:

Implementations shall ignore any standard or non-standard object that they do not know how to handle. New top-level objects should be added only between the Data Object and Index Object(s).

 

 

2.3    ASF top-level Header Object

The role of the Header Object is to provide a well-known byte sequence at the beginning of ASF files (the ASF_Header_Object GUID) and to contain all the information that is needed to properly interpret the information within the data object. The Header Object can optionally contain metadata such as bibliographic information.

 

Of the three top-level ASF objects, the Header Object is the only one that contains other ASF objects. The Header Object may include a number of standard objects including, but not limited to:

 

·         File Properties Object. Contains global file attributes.

·         Stream Properties Object. Defines a digital media stream and its characteristics.

·         Header Extension Object. Allows additional functionality to be added to an ASF file while maintaining backward compatibility.

·         Content Description Object. Contains bibliographic information.

·         Script Command Object. Contains commands that can be executed on the playback timeline.

·         Marker Object. Provides named jump points within a file.

 

Note that objects in the Header Object may appear in any order.

 

The complete list of header objects defined by this specification can be found in sections 3 and 4.

 

To be valid, the Header Object must contain a File Properties Object, a Header Extension Object, and at least one Stream Properties Object.

 

 

2.4    ASF top-level Data Object

The Data Object contains all the digital media data for an ASF file. This data is stored in the form of ASF Data Packets. For the context of this specification, Data Packets are stored with a fixed length. Each Data Packet contains data for one or several digital media streams. Data Packets are sorted within the Data Object based on the time when they should be delivered (send time). This sorting results in an interleaved data format.

 

 

2.5    ASF top-level index objects

There are two varieties of index objects: the Simple Index Object and the Index Object (of which there are a few varieties).

 

The Simple Index Object contains a time-based index of the video data in an ASF file. The time interval between index entries is constant and is stored in the Simple Index Object. For each video stream in an ASF file, there should be one instance of the Simple Index Object. The order in which those instances appear in the file is significant. The order of the Simple Index Objects should be identical to the order of the video streams based on their stream numbers. As described in detail in section 8.2.12, these objects need to be the last top-level objects in the file.

 

The category Index Object refers to the Index Object, the Media Object Index Object, and the Timecode Index Object, whose formats are all similar. The Index Object, like the Simple Index Object, indexes by time with a fixed time interval, but is not limited to video streams. The Media Object Index Object is a frame-based index that facilitates seeking by frame (or object number). The Timecode Index Object facilitates seeking by timecode in content that contains timecodes (see section 7.3.2.1).

 

 

 

3.     ASF top-level Header Object

This section defines the various objects that comprise the ASF Header Object. Of the objects listed in this section, those described in sections 3.1 through 3.12 were also described in previous versions of this specification.             

 

 

3.1    Header Object (mandatory, one only)

The Header Object is a container that holds any combination of the standard objects listed in the following sections. A File Properties Object, a Header Extension Object and at least one Stream Properties Object are required to be present. Implementations shall ignore any objects that they do not understand.

 

The Header Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD 

64

Number of Header Objects

DWORD 

32

Reserved1

BYTE

8

Reserved2

BYTE

8

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Header Object. This field shall be set to ASF_Header_Object.

Object Size

Specifies the size of the Header Object. This includes the sum of 24 bytes plus the size of the objects contained in the Header Object. Valid values are at least 30 bytes.

Number of Header Objects

Specifies the number of objects contained within the Header Object, not including this one. In addition, the Header Extension Object (sections 3.4 and 4) is counted as exactly one object regardless of the number of subobjects contained within it.

Reserved1

This field must be set to the value 0x01. ASF parsers may safely ignore this value.

Reserved2

This field must be set to the value 0x02. If the this value is different when read, the application should fail to source the content.

 

 

3.2    File Properties Object (mandatory, one only)

The File Properties Object defines the global characteristics of the combined digital media streams found within the Data Object.

 

The File Properties Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

File ID

GUID

128

File Size

QWORD

64

Creation Date

QWORD

64

Data Packets Count

QWORD

64

Play Duration

QWORD

64

Send Duration

QWORD

64

Preroll

QWORD

64

Flags

DWORD

32

 

Broadcast Flag

 

1 (LSB)

 

Seekable Flag

 

1

 

Reserved

 

30

Minimum Data Packet Size

DWORD

32

Maximum Data Packet Size

DWORD

32

Maximum Bitrate

DWORD

32

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the File Properties Object. This field shall be set to ASF_File_Properties_Object.

Object Size

Specifies the size, in bytes, of the File Properties Object. Valid values are at least 104 bytes.

File ID

Specifies the unique identifier for this file. The value of this field shall be regenerated every time the file is modified in any way. The value of this field shall be identical to the value of the File ID field of the Data Object.

File Size

Specifies the size, in bytes, of the entire file. The value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1.

Creation Date

Specifies the date and time of the initial creation of the file. The value is given as the number of 100-nanosecond intervals since January 1, 1601, according to Coordinated Universal Time (Greenwich Mean Time). The value of this field may be invalid if the Broadcast Flag bit in the Flags field is set to 1.

Data Packets Count

Specifies the number of Data Packet entries that exist within the Data Object. The value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1.

Play Duration

Specifies the time needed to play the file in 100-nanosecond units. This value should include the duration (estimated, if an exact value is unavailable) of the the last media object in the presentation. The value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1.

Send Duration

Specifies the time needed to send the file in 100-nanosecond units. This value should include the duration of the last packet in the content. The value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1. Players can ignore this value.

Preroll

Specifies the amount of time to buffer data before starting to play the file, in millisecond units. If this value is nonzero, the Play Duration field and all of the payload Presentation Time fields have been offset by this amount. Therefore, player software must subtract the value in the preroll field from the play duration and presentation times to calculate their actual values.

It follows that all payload Presentation Time fields need to be at least this value.

 

Flags

The flags are stored in Least Significant Byte (LSB) order.

Broadcast Flag (bit 0)

Specifies, if set, that a file is in the process of being created (for example, for recording applications), and thus that various values stored in the header objects are invalid. It is highly recommended that post-processing be performed to remove this condition at the earliest opportunity.

Seekable Flag (bit 1)

Specifies, if set, that a file is seekable. Note that for files containing a single audio stream and a Minimum Data Packet Size field equal to the Maximum Data Packet Size field, this flag shall always be set to 1. For files containing a single audio stream and a video stream or mutually exclusive video streams, this flag is only set to 1 if the file contains a matching Simple Index Object for each regular video stream (that is, video streams that are not hidden according to the method described in section 8.2.2).

 Reserved (bits 2 – 31)

Remaining 30 reserved flags shall be set to 0.

 

Minimum Data Packet Size

Specifies the minimum Data Packet size in bytes. In general, the value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1. However, for the purposes of this specification, the values for the Minimum Data Packet Size and Maximum Data Packet Size fields shall be set to the same value, and this value should be set to the packet size, even when the Broadcast Flag in the Flags field is set to 1.

Maximum Data Packet Size

Specifies the maximum Data Packet size in bytes. In general, the value of this field is invalid if the Broadcast Flag bit in the Flags field is set to 1. However, for the purposes of this specification, the values of the Minimum Data Packet Size and Maximum Data Packet Size fields shall be set to the same value, and this value should be set to the packet size, even when the Broadcast Flag field is set to 1.

Maximum Bitrate

Specifies the maximum instantaneous bit rate in bits per second for the entire file. This shall equal the sum of the bit rates of the individual digital media streams. It shall be noted that the digital media stream includes ASF data packetization overhead as well as digital media data in payloads. Only those streams that have a free-standing Stream Properties Object in the header shall have their bit rates included in the sum; streams whose Stream Properties Object exists as part of an Extended Stream Properties Object in the Header Extension Object shall not have their bit rates included in this sum, except when this value would otherwise be 0.

 

 

3.3    Stream Properties Object (mandatory, one per stream)

The Stream Properties Object defines the specific properties and characteristics of a digital media stream. This object defines how a digital media stream within the Data Object is interpreted, as well as the specific format (of elements) of the Data Packet itself (for more information, see section 5.2).

 

Whereas every stream in an ASF presentation, including each stream in a mutual exclusion relationship, must be represented by a Stream Properties Object, in certain cases, this object might be found embedded in the Extended Stream Properties Object (section 4.1). See section 8.2 for situations in which that should occur.

 

The Stream Properties Object is represented using the following structure.

 

Field Name

Field Type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Stream Type

GUID

128

Error Correction Type

GUID

128

Time Offset

QWORD

64

Type-Specific Data Length

DWORD

32

Error Correction Data Length

DWORD

32

Flags

WORD

16

 

Stream Number

 

7 (LSB)

 

Reserved

 

8

 

Encrypted Content Flag

 

1

Reserved

DWORD

32

Type-Specific Data

BYTE

varies

Error Correction Data

BYTE

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Stream Properties Object. The value of this field shall be set to ASF_Stream_Properties_Object.

Object Size

Specifies the size, in bytes, of the Stream Properties Object. Valid values are at least 78 bytes.

Stream Type

Specifies the type of the stream (for example, audio, video, and so on). Use one of the GUIDs defined in section 10.4. Any streams with unrecognized Stream Type values should be ignored.

Error Correction Type

Specifies the error correction type used by this digital media stream. For streams other than audio, this value should be set to ASF_No_Error_Correction. For audio streams, this value should be set to ASF_Audio_Spread. The possible GUIDs are defined in section 10.5, and the standard error correction schemes are described in section 9.1.

Time Offset

Specifies the presentation time offset of the stream in 100-nanosecond units. The value of this field is added to all of the timestamps of the samples in the stream. This value shall be equal to the send time of the first interleaved packet in the data section. The value of this field is typically 0. It is non-zero in the case when an ASF file is edited and it is not possible for the editor to change the presentation times and send times of ASF packets. Note that if more than one stream is present in an ASF file the offset values of all stream properties objects must be equal.

Type-Specific Data Length

Specifies the number of bytes in the Type-Specific Data field.

Error Correction Data Length

Specifies the number of bytes in the Error Correction Data field.

Flags

The flags are stored in LSB order.

 

Stream Number (bits 0-6)

Specifies the number of this stream. 0 is an invalid stream. Valid values are between 1 and 127. The numbers assigned to streams in an ASF presentation may be any combination of unique values; parsing logic must not assume that streams are numbered sequentially.

Reserved (bits 7-14)

These bits are reserved and should be set to 0.

Encrypted Content Flag (bit 15)

Specifies, if set, that the data contained in this stream is encrypted and will be unreadable unless there is a way to decrypt the stream.

Reserved

This field is reserved and should be set to 0.

Type-Specific Data

Specifies type-specific format data. The structure for the Type-Specific Data field is determined by the value stored in the Stream Type field. The structure for the Type-Specific Data field for standard ASF media types is detailed in section 9.

Error Correction Data

Specifies data specific to the error correction type. The structure for the Error Correction Data field is determined by the value stored in the Error Correction Type field. For example, an audio data stream might need to know how codec chunks were redistributed, or it might need a sample of encoded silence. For detailed information, see section 9.1.

 

 

3.4    Header Extension Object (mandatory, one only)

The Header Extension Object allows additional functionality to be added to an ASF file while maintaining backward compatibility. The Header Extension Object is a container containing 0 or more additional extended header objects. Extended header objects should conform to the ASF Object Structure (per section 2.1). For more information, see section 8.2.1.

 

The Header Extension Object is represented using the following structure.

 

Field Name

Field Type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Reserved Field 1

GUID

128

Reserved Field 2

WORD

16

Header Extension Data Size

DWORD

32

Header Extension Data

BYTE

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Header Extension Object. The value of this field shall be set to ASF_Header_Extension_Object.

Object Size

Specifies the size, in bytes, of the Header Extension Object. The value of this field shall be set to 46 bytes.

Reserved Field 1

This value shall be set to ASF_Reserved_1 as defined in section 10.6.

Reserved Field 2

This value should be set to 6.

Header Extension Data Size

Specifies the number of bytes stored in the Header Extension Data field. This value may be 0 bytes or 24 bytes and larger. It should also be equal to the Object Size field minus 46 bytes.

Header Extension Data

Specifies an array of bytes containing additional extended header objects. This data should be interpreted as 0 or more extended header objects stored consecutively within the array of bytes. No empty space, padding, leading, or trailing bytes are allowed.

 

 

3.5    Codec List Object (optional, one only)

The Codec List Object provides user-friendly information about the codecs and formats used to encode the content found in the ASF file. The Codec List Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Reserved

GUID

128

Codec Entries Count

DWORD

32

Codec Entries

See below

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Codec List Object. The value of this field shall be set to ASF_Codec_List_Object.

Object Size

Specifies the size, in bytes, of the Codec List Object. Valid values are at least 44 bytes.

Reserved

Reserved. This field shall be set to ASF_Reserved_2 as defined in section 10.8.

Codec Entries Count

Specifies the number of entries listed in the Codec Entries field.

Codec Entries

Codec Entries are described in the following table.

Field Name

Field Type

Size (bits)

Type

WORD

16

Codec Name Length

WORD

16

Codec Name

WCHAR

varies

Codec Description Length

WORD

16

Codec Description

WCHAR

varies

Codec Information Length

WORD

16

Codec Information

BYTE

varies

 

The fields are defined as follows:

Type

Specifies the type of the codec used. Use one of the values in the following table.

Values

Meaning

0x0001

Video codec

0x0002

Audio codec

0xFFFF

Unknown codec

Codec Name Length

Specifies the number of Unicode characters stored in the Codec Name field.

Codec Name

Specifies an array of Unicode characters that contains the name of the codec used to create the content.

Codec Description Length

Specifies the number of Unicode characters stored in the Codec Description field.

Codec Description

Specifies an array of Unicode characters that contains the description of the format used to create the content.

Codec Information Length

Specifies the number of bytes stored in the Codec Information field.

Codec Information

Specifies an opaque array of information bytes about the codec used to create the content. The meaning of these bytes is determined by the codec.

 

 

3.6    Script Command Object (optional, one only)

The Script Command Object provides a list of type/parameter pairs of Unicode strings that are synchronized to the ASF file’s timeline. Types can include URL or FILENAME values. Other type values may also be freely defined and used. The semantics and treatment of this set of types are defined by the local implementations. The parameter value (referred to as Commands in the follwoing table) is specific to the type field. You can use this type/parameter pairing for many purposes, including sending URLs to be launched by a client into an HTML frame (in other words, the URL type) or launching another ASF file for the chained continuous play of audio or video presentations (in other words, the FILENAME type). This object is also used as a method to stream text, as well as to provide script commands that you can use to control elements within the client environment.

 

The Script Command Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Reserved

GUID

128

Commands Count

WORD

16

Command Types Count

WORD

16

Command Types

See below

varies

Commands

See below

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Script Command Object. The value of this field shall be set to ASF_Script_Command_Object.

Object Size

Specifies the size, in bytes, of the Script Command Object. Valid values are at least 44 bytes.

Reserved

Reserved. This field shall be set to ASF_Reserved_3 as defined in section 10.9.

Commands Count

Specifies the number of Command structures in the Script Command Object.

Command Types Count

Specifies the number of Command Type structures in the Script Command Object.

Command Types

The structure of each Command Type entry is shown in the following table.

Field name

Field type

Size (bits)

Command Type Name Length

WORD

16

Command Type Name

WCHAR

varies

 

Command Type Name Length

Specifies the number of Unicode characters that are found within the Command Type Name field.

Command Type Name

Specifies the name of a type of command. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Commands

The structure of each Command entry is shown in the following table.

Field name

Field type

Size (bits)

Presentation Time

DWORD

32

Type Index

WORD

16

Command Name Length

WORD

16

Command Name

WCHAR

varies

 

Presentation Time

Specifies the presentation time of the command, in milliseconds.

Type Index

Specifies the type of this command, as a zero-based index into the array of Command Types of this object.

Command Name Length

Specifies the number of Unicode characters that are found within the Command Name field.

Command Name

Specifies the name of this command. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

 

 

3.7    Marker Object (optional, 0 or 1)

The Marker Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Reserved

GUID

128

Markers Count

DWORD

32

Reserved

WORD

16

Name Length

WORD

16

Name

WCHAR

varies

Markers

See below

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Marker Object. The value of this field shall be set to ASF_Marker_Object.

Object Size

Specifies the size, in bytes, of the Marker Object. Valid values are at least 48 bytes.

Reserved

Reserved. This field shall be set to ASF_Reserved_4 as defined in section 10.10.

Markers Count

Specifies the number of Marker structures in the Marker Object.

Reserved

Specifies a reserved field. This field shall be set to 0.

Name Length

Specifies the number of bytes that are found within the Name field.

Name

Specifies the name of the Marker Object. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Markers

The structure of each Marker entry is shown in the following table.

Field name

Field type

Size (bits)

Offset

QWORD

64

Presentation Time

QWORD

64

Entry Length

WORD

16

Send Time

DWORD

32

Flags

DWORD

32

Marker Description Length

DWORD

32

Marker Description

WCHAR

varies

 

The fields are defined as follows:

Offset

Specifies a byte offset into the Data Object to the actual position of the marker in the Data Object. ASF parsers must seek to this position to properly display data at the specified marker Presentation Time.

Presentation Time

Specifies the presentation time of the marker, in 100-nanosecond units.

Entry Length

Specifies the length in bytes of the Send Time, Flags, and Marker Description Length fields, and the number of bytes stored in the Marker Description field. (Note that the last version of this specification allowed for this field to optionally include some padding bytes at the end of the Marker entry in addition to the sizes of the aforementioned fields. This was not correct; the value of this field needs to be exactly the size of the Send Time, Flags, and Marker Description Length fields plus the number of bytes stored in the Marker Description field.)

Send Time

Specifies the send time of the marker entry, in milliseconds.

Flags

Flags are reserved and should be set to 0.

Marker Description Length

Specifies the number of WCHARs that are found within the Marker Description field (including the nul-terminating character, if present). (Note that the last version of this specification indicated that this value is equal to the number of bytes that are found within the Marker Description field. This was not correct; this value is the number of WCHARs.)

Marker Description

Specifies an array of WCHARs containing a description of the marker entry. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

 

3.8    Bitrate Mutual Exclusion Object (optional, 0 or 1)

The Bitrate Mutual Exclusion Object identifies video streams that have a mutual exclusion relationship to each other (in other words, only one of the streams within such a relationship can be streamed at any given time and the rest are ignored). One instance of this object must be present for each set of objects that contains a mutual exclusion relationship. All video streams in this relationship must have the same frame size. The exclusion type is used so that implementations can allow user selection of common choices, such as bit rate.

 

The Bitrate Mutual Exclusion Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Exclusion Type

GUID

128

Stream Numbers Count

WORD

16

Stream Numbers

WORD

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Mutual Exclusion Object. The value of this field shall be set to ASF_Bitrate_Mutual_Exclusion_Object.

Object Size

Specifies the size, in bytes, of the Bitrate Mutual Exclusion Object. Valid values are at least 42 bytes.

Exclusion Type

Specifies the nature of the mutual exclusion relationship. Use one of the GUIDs defined in section 10.11.

Stream Numbers Count

Specifies the number of video streams listed in the Stream Numbers field.

Stream Numbers

Specifies the list of mutually exclusive video stream numbers. Valid values are between 1 and 127 as defined in the Stream Properties Object.

 

 

3.9    Error Correction Object (optional, one only)

The Error Correction Object defines the error correction method. This enables different error correction schemes to be used during content creation. The Error Correction Object contains provisions for opaque information needed by the error correction engine for recovery. For example, if the error correction scheme were a simple N+1 parity scheme, then the value of N would have to be available in this object.

 

Note that this does not refer to the same thing as the Error Correction Type field in the Stream Properties Object. Rather, this object indicates the error correction scheme used for the ASF packets as described in section 5.2.1.

 

The Error Correction Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Error Correction Type

GUID

128

Error Correction Data Length

DWORD

32

Error Correction Data

BYTE

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Error Correction Object. The value of this field shall be set to ASF_Error_Correction_Object.

Object Size

Specifies the size, in bytes, of the Error Correction Object. Valid values are at least 44 bytes.

Error Correction Type

Specifies the type of error correction.

Error Correction Data Length

Specifies the length, in bytes, of the Error Correction Data field.

Error Correction Data

Specifies data specific to the error correction scheme. The structure for the Error Correction Data field is determined by the value stored in the Error Correction Type field.

 

 

3.10    Content Description Object (optional, one only)

The Content Description Object lets authors record well-known data describing the file and its contents. This object is used to store standard bibliographic information such as title, author, copyright, description, and rating information. This information is pertinent to the entire file.

 

The Content Description Object is represented using the following structure.

 

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

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Content Description Object. The value of this field shall be set to ASF_Content_Description_Object.

Object Size

Specifies the size, in bytes, of the Content Description Object. Valid values are at least 34 bytes.

Title Length

Specifies the number of bytes that comprise the title information stored in the Title field.

Author Length

Specifies the number of bytes that comprise the author information stored in the Author field.

Copyright Length

Specifies the number of bytes that comprise the copyright information stored in the Copyright field.

Description Length

Specifies the number of bytes that comprise the description information stored in the Description field.

Rating Length

Specifies the number of bytes that comprise the rating information stored in the Rating field.

Title

Specifies an array of WCHARs that contains the title information. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Author

Specifies an array of WCHARs that contains the author information. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Copyright

Specifies an array of WCHARs that contains the copyright information. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Description

Specifies an array of WCHARs that contains the description information. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

Rating

Specifies an array of WCHARs that contains the rating information. Whereas it is highly recommended that this string include a nul-terminator, the nul-terminator may not be present.

 

 

3.11    Extended Content Description Object (optional, one only)

The Extended Content Description Object lets authors record data describing the file and its contents that is beyond the standard bibliographic information such as title, author, copyright, description, or rating information. This information is pertinent to the whole file. Each Content Descriptor stored in this object uses a name/value pair metaphor.

 

For more information about what types of attributes belong in the Extended Content Description Object, see section 7.4.

 

The Extended Content Description Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Content Descriptors Count

WORD

16

Content Descriptors

See text

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Extended Content Description Object. The value of this field shall be set to ASF_Extended_Content_Description_Object.

Object Size

Specifies the size, in bytes, of the Extended Content Description Object. Valid values are at least 26 bytes.

Content Descriptors Count

Specifies the number of entries in the Content Descriptors list.

Content Descriptors

The structure of each Content Descriptor entry is shown in the following table.

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

 

The fields are defined as follows:

Descriptor Name Length

Specifies the size, in bytes, of the Descriptor Name field.

Descriptor Name

Specifies an array of Unicode characters that contains the name of the descriptor.

Descriptor Value Data Type

Specifies the type of data stored in the Descriptor Value field. The types are defined in the following table.

Value

Type

Descriptor value length

0x0000

Unicode string

varies

0x0001

BYTE array

varies

0x0002

BOOL

32

0x0003

DWORD

32

0x0004

QWORD

64

0x0005

WORD

16

Descriptor Value Length

Specifies the number of bytes stored in the Descriptor Value field. For sizes, see the table in the Descriptor Value Data Type section.

Descriptor Value

Specifies the value for the Content Descriptor field. The type for this value is determined by the Descriptor Value Data Type field.

 

3.12    Stream Bitrate Properties Object (optional but recommended, one only)

The Stream Bitrate Properties Object defines the average bit rate of each digital media stream. It is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Bitrate Records Count

WORD

16

Bitrate Records

See below

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Stream Bitrate Properties Object. The value of this field shall be set to ASF_Stream_Bitrate_Properties_Object.

Object Size

Specifies the size, in bytes, of the Stream Bitrate Properties Object. Valid values are at least 26 bytes.

Bitrate Records Count

Specifies the number of records listed in the Bitrate Records field.

Bitrate Records

The structure of each Bitrate Record entry is shown in the following table.

Field name

Field type

Size (bits)

Flags

WORD

16

 

Stream Number

 

7 (LSB)

 

Reserved

 

9

Average Bitrate

DWORD

32

 

The fields are defined as follows:

Flags

The flags are stored in LSB order.

 

Stream Number (bits 0-6)

Specifies the number of this stream described by this record. 0 is an invalid stream. Valid values are between 1 and 127.

Reserved (bits 7-15)

These bits are reserved and should be set to 0.

Average Bitrate

Specifies the average bit rate of the stream in bits per second. This value should include an estimate of ASF packet and payload overhead associated with this stream.

 

3.13    Content Branding Object (optional, one only)

The Content Branding Object stores branding data for an ASF file, including information about a banner image and copyright associated with the file. It is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Banner Image Type

DWORD

32

Banner Image Data Size

DWORD

32

Banner Image Data

BYTE

varies

Banner Image URL Length

DWORD

32

Banner Image URL

char

varies

Copyright URL Length

DWORD

32

Copyright URL

char

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Content Branding Object. The value of this field shall be set to ASF_Content_Branding _Object.

Object Size

Specifies the size, in bytes, of the Content Branding Object. Valid values are at least 40 bytes.

Banner Image Type

 

Specifies the type of data contained in the Banner Image Data. Valid values are 0 to indicate that there is no banner image data; 1 to indicate that the data represent a bitmap; 2 to indicate that the data represents a JPEG; and 3 to indicate that the data represents a GIF. If this value is set to 0, then the Banner Image Data Size field must be set to 0, and the Banner Image Data field must be empty.

 

Banner Image Data Size

 

Specifies the number of bytes in the Banner Image Data field.

 

Banner Image Data

 

This field contains the entire banner image, including the header for the appropriate image format.

 

Banner Image URL Length

 

Specifies the number of bytes in the Banner Image URL field.

 

Banner Image URL

 

Contains an ASCII (not WCHAR) string. If present, it is a link to more information about the banner image.

 

Copyright URL Length

 

Specifies the number of bytes in the Copyright URL field.

 

Copyright URL

 

Contains an ASCII (not WCHAR) string. If present, it is a link to more information about the copyright for the content.

 

3.14    Content Encryption Object (optional, 0 or 1)

The Content Encryption Object lets authors protect content by using Microsoft® Digital Rights Manager version 1. It is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Secret Data Length

DWORD

32

Secret Data

BYTE

varies

Protection Type Length

DWORD

32

Protection Type

char

varies

Key ID Length

DWORD

32

Key ID

char

varies

License URL Length

DWORD

32

License URL

char

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Content Encryption Object. The value of this field shall be set to ASF_Content_Encryption_Object.

Object Size

Specifies the size, in bytes, of the Content Encryption Object. Valid values are larger than 40 bytes.

Secret Data Length

Specifies the number of bytes stored in the Secret Data field.

Secret Data

Specifies an array of bytes containing secret data.

Protection Type Length

Specifies the length in bytes of the Protection Type field.

Protection Type

Specifies a nul-terminated array of ASCII characters (not WCHARs) describing the type of protection mechanism used. The value of this field shall be set to “DRM”.

Key ID Length

Specifies the length in bytes of the Key ID field.

Key ID

Specifies a nul-terminated array of ASCII characters (not WCHARs) describing the key ID used.

License URL Length

Specifies the length in bytes of the License URL field.

License URL

Specifies a nul-terminated array of ASCII characters (not WCHARs) containing the URL from which a license to manipulate the content can be acquired.

 

3.15    Extended Content Encryption Object (optional, 0 or 1)

The Extended Content Encryption Object lets authors protect content by using the Windows Media Rights Manager 7 Software Development Kit (SDK). It is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Data Size

DWORD

32

Data

BYTE

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Extended Content Encryption Object. The value of this field shall be set to ASF_Extended_Content_Encryption_Object.

Object Size

Specifies the size, in bytes, of the Extended Content Encryption Object. Valid values are larger than 24 bytes.

Data Size

Specifies the length, in bytes, of the data contained in the Data field.

Data

Specifies an array of bytes required by the DRM client to manipulate the protected content.

 

3.16    Digital Signature Object (optional, 0 or 1)

The Digital Signature Object lets authors sign the portion of their header that lies between the end of the File Properties Object and the beginning of the Digital Signature Object. It is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Signature Type

DWORD

32

Signature Data Length

DWORD

32

Signature Data

BYTE

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Digital Signature Object. The value of this field shall be set to ASF_Digital_Signature_Object.

Object Size

Specifies the size, in bytes, of the Digital Signature Object. Valid values are larger than 32 bytes.

Signature Type

Specifies the type of digital signature used. This field shall be set to 2.

Signature Data Length

Specifies the number of bytes stored in the Signature Data field.

Signature Data

Specifies an array of bytes containing the digital signature.

 

3.17    Padding Object (optional, 0 to many)

The Padding Object is a dummy object that is used to pad the size of the Header Object. This object enables the size of any object stored in the Header Object to grow or shrink without having to rewrite the entire Data Object and Index Object sections of the ASF file. For instance, if entries in the Content Description Object or Extended Content Description Object need to be removed or shortened, the size of the Padding Object can be increased to compensate for the reduction in size of the Content Description Object. The ASF file can then be updated by overwriting the previous Header Object with the edited Header Object of identical size, without having to move or rewrite the data contained in the Data Object. Playback applications shall simply ignore Padding Objects. The Padding Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Padding Data

BYTE

varies

 

The fields are defined as follows:

 

Object ID

Specifies the GUID for the Padding Object. The value of this field shall be set to ASF_Padding_Object.

Object Size

Specifies the size, in bytes, of the Padding Object. Valid values are at least 24 bytes.

Padding Data

Specifies an array of bytes used for padding purposes. The length of the padding object data is calculated as Object Size – 24 bytes ( sizeof( Object ID ) + sizeof( Object Size ) ). As the name implies, the Padding Data field contains padding instead of meaningful data and shall always be ignored.

 

4.     Objects in the ASF Header Extension Object

This section describes objects that, if present, must be embedded in the Header Extension Object as described in section 2.3. Custom ASF objects with user-defined meanings can be added to the Header Extension Object in addition to the objects in this list, but there is no guarantee of interoperability between implementations for those objects.

 

Note that objects defined in section 3 may appear in the Header Extension Object, so reading implementations should be able to understand those objects from within this object as well.  However, a writing implementation should not, in general, place objects from section 3 into the Header Extension Object, except when it wants to hide these objects from earlier reading implementations. For a discussion of when this is appropriate, see section 8.2.1.

 

4.1    Extended Stream Properties Object (optional, 1 per media stream)

The Extended Stream Properties Object defines additional optional properties and characteristics of a digital media stream that are not described in the Stream Properties Object.

 

Typically, the basic Stream Properties Object is present in the Header Object, and the Extended Stream Properties Object is present in the Header Extension Object. Sometimes, however, the Stream Properties Object for a stream may be embedded inside the Extended Stream Properties Object for that stream. This approach facilitates the creation of backward-compatible content and is appropriate for some of the scenarios discussed in section 8. 

 

This object has an optional provision to include application-specific or implementation-specific data attached to the payloads of each digital media sample stored within a Data Packet. This data can be looked at as digital media sample properties and is stored in the Replicated Data field of a payload header. The Payload Extension Systems fields of the Extended Stream Properties Object describes what this data is and is necessary for that data to be parsed, if present.

 

The Extended Stream Properties Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Start Time

QWORD

64

End Time

QWORD

64

Data Bitrate

DWORD

32

Buffer Size

DWORD

32

Initial Buffer Fullness

DWORD

32

Alternate Data Bitrate

DWORD

32

Alternate Buffer Size

DWORD

32

Alternate Initial Buffer Fullness

DWORD

32

Maximum Object Size

DWORD

32

Flags

DWORD

32

 

Reliable Flag

 

1 (LSB)

 

Seekable Flag

 

1

 

No Cleanpoints Flag

 

1

 

Resend Live Cleanpoints Flag

 

1

 

Reserved Flags

 

28

Stream Number

WORD

16

Stream Language ID Index

WORD

16

Average Time Per Frame

QWORD

64

Stream Name Count

WORD

16

Payload Extension System Count

WORD

16

Stream Names

See below

varies

Payload Extension Systems

See below

varies

Stream Properties Object

See below

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Extended Stream Properties Object. The value of this field shall be set to ASF_Extended_Stream_Properties_Object.

Object Size

Specifies the size, in bytes, of the Extended Stream Properties Object. Valid values are at least 88 bytes. If there is a Stream Properties Object embedded in this object, then the size of the Stream Properties Object must be included in this value.

Start Time

Specifies the presentation time of the first object, indicating where this digital media stream starts within the context of the timeline of the ASF file as a whole. This time value corresponds to presentation times as they appear in the data packets (adjusted by the preroll). This field is given in units of milliseconds and can optionally be set to 0, in which case it will be ignored.

End Time

Specifies the presentation time of the last object plus the duration of play, indicating where this digital media stream ends within the context of the timeline of the ASF file as a whole. This time value corresponds to presentation times as they appear in the data packets (adjusted by the preroll). This field is given in units of milliseconds and can optionally be set to 0, in which case it will be ignored.

Data Bitrate

Specifies the leak rate R, in bits per second, of a leaky bucket that contains the data portion of the stream without overflowing, excluding all ASF Data Packet overhead. The size of the leaky bucket is specified by the value of the Buffer Size field. This field must be non-zero. For more information about leaky buckets, see section 7.1.

Buffer Size

Specifies the size B, in milliseconds, of the leaky bucket used in the Data Bitrate definition.

Initial Buffer Fullness

Specifies the initial fullness, in milliseconds, of the leaky bucket used in the Data Bitrate definition. This is the fullness of the buffer at the instant before the first bit in the stream is dumped into the bucket. Typically, this value is set to 0. This value shall not exceed the value in the Buffer Size field.

Alternate Data Bitrate

Specifies the leak rate RAlt, in bits per second, of a leaky bucket that contains the data portion of the stream without overflowing, excluding all ASF Data Packet overhead. The size of the leaky bucket is specified by the value of the Alternate Buffer Size field. This value is relevant in most scenarios where the bit rate is not exactly constant, but it is especially useful for streams that have highly variable bit rates. This field can optionally be set to the same value as the Data Bitrate field.

Alternate Buffer Size

Specifies the size BAlt, in milliseconds, of the leaky bucket used in the Alternate Data Bitrate definition. This value is relevant in most scenarios where the bit rate is not exactly constant, but it is especially useful for streams that have highly variable bit rates. This field can optionally be set to the same value as the Buffer Size field.

Alternate Initial Buffer Fullness

Specifies the initial fullness, in milliseconds, of the leaky bucket used in the Alternate Data Bitrate definition. This is the fullness of the buffer at the instant before the first bit in the stream is dumped into the bucket. Typically, this value is set to 0. This value shall not exceed the value of the Alternate Buffer Size field.

Maximum Object Size

Specifies the maximum size of the largest sample stored in the data packets for a stream. A value of 0 means “unknown”.

Flags

The flags are stored in LSB order.

Reliable Flag

Specifies, if set, that this digital media stream, if sent over a network, must be carried over a reliable data communications transport mechanism. This should be set for streams that cannot recover after a lost media object.

Seekable Flag

This flag should be set only if the stream is seekable, either by using an index object or by estimating according to bit rate (as can sometimes be done with audio). This flag pertains to this stream only rather than to the entire file.

No Cleanpoint Flag

Specifies, if set, that the stream does not contain any cleanpoints. A cleanpoint is any point at which playback could begin without having seen the previous media objects. For streams that use key frames, the key frames would be the cleanpoints.

Resend Live Cleanpoints Flag

Specifies, if set, that when a stream is joined in mid-transmission, all information from the most recent cleanpoint up to the current time should be sent before normal streaming begins at the current time. The default behavior (when this flag is not set) is to send only the data starting at the current time. This flag should only be set for streams that are coming from a “live” source.

Reserved Flags

Specifies reserved flags. Shall be set to 0.

AverageTime Per Frame

Specifies the average time duration, measured in 100-nanosecond units, of each frame. This number should be rounded to the nearest integer. This field can optionally be set to 0 if the average time per frame is unknown or unimportant. It is recommended that this field be set for video.

Stream Number

Specifies the number of this stream. 0 is an invalid stream number (that is, other Header Objects use stream number 0 to refer to the entire file as a whole rather than to a specific media stream within the file). Valid values are between 1 and 127.

Stream Language ID Index

Specifies the language, if any, which the content of the stream uses or assumes. Refer to the Language List Object description for the details concerning how the Stream Language ID Index and Language ID Index fields should be used. Note that this is an index into the languages listed in the Language List Object rather than a language identifier.

Stream Name Count

Specifies how many Stream Names are present. Each stream name instance is potentially localized into a specific language. The Language ID Index field indicates the language in which the Stream Name has been written in Unicode characters. This shall be set to 0 if there are no Stream Names, in which case the Stream Names field should be omitted.

Payload Extension System Count

Specifies how many Payload Extension Systems there are for this stream. This shall be set to 0 if there are no Payload Extension Systems, in which case the Payload Extension Systems field should be omitted.

Stream Names

The structure of each Stream Name entry is shown in the following table.

Field name

Field type

Size (bits)

Language ID Index

WORD

16

Stream Name Length

WORD

16

Stream Name

WCHAR

varies

 

where the Stream Name Length field indicates the number of valid bytes that are found within the Stream Name field.

Payload Extension Systems

Payload extensions provide a way for content creators to specify kinds of data that will appear in the payload header for every payload from this stream. This system is used when stream properties must be conveyed at the media object level. The Replicated Data bytes in the payload header will contain these properties in the order in which the Payload Extension Systems appear in this object. A Payload Extension System must appear in the Extended Stream Properties Object for each type of per-media-object properties that will appear with the payloads for this stream. For more information, see section 7.3.

Payload extension systems are described in the following table.

Field name

Field type

Size (bits)

Extension System ID

GUID

128

Extension Data Size

WORD

16

Extension System Info Length

DWORD

32

Extension System Info

BYTE

varies

 

The fields are defined as follows:

Extension System ID

Specifies a unique identifier for the extension system. Five standard GUIDs are defined in section 10.13, although custom extension system types can be defined as well.

Extension Data Size

Specifies the fixed size of the extension data for this system that will appear in the replicated data alongside every payload for this stream. If this extension system uses variable-size data, then this should be set to 0xffff. Note, however, that replicated data length is limited to 255 bytes, which limits the total size of all extension systems for a particular stream.

Extension System Info Length

Specifies the length of the Extension System Info field. This field shall be set to 0 if there is no value in the Extension System Info field.

Extension System Info

Specifies additional information to describe this extension system (optional).

Stream Properties Object

Specifies an optional Stream Properties Object. For more information, see the beginning of this section.

 

4.2    Advanced Mutual Exclusion Object (optional, 0 to many)

The Advanced Mutual Exclusion Object identifies streams that have a mutual exclusion relationship to each other (in other words, only one of the streams within such a relationship can be streamed—the rest are ignored). There should be one instance of this object for each set of objects that contain a mutual exclusion relationship. The exclusion type is used so that implementations can allow user selection of common choices, such as language. This object must be used if any of the streams in the mutual exclusion relationship are hidden according to the manner described in section 8.2.2. For more details about scenarios in which you should use this object, see section 8.2.

 

The Advanced Mutual Exclusion Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Exclusion Type

GUID

128

Stream Numbers Count

WORD

16

Stream Numbers

WORD

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Advanced Mutual Exclusion Object. The value of this field shall be set to ASF_Advanced_Mutual_Exclusion_Object.

Object Size

Specifies the size, in bytes, of the Advanced Mutual Exclusion Object. Valid values are at least 42 bytes.

Exclusion Type

Specifies the nature of the mutual exclusion relationship. Use one of the GUIDs defined in section 10.11.

Stream Numbers Count

Specifies the number of streams listed in the Stream Numbers field. This value should be at least 2.

Stream Numbers

Specifies the list of mutually exclusive stream numbers. Valid values are between 1 and 127.

 

4.3    Group Mutual Exclusion Object (optional, 0 to many)

The Group Mutual Exclusion Object is used to describe mutual exclusion relationships between groups of streams. This object is organized in terms of “records,” each containing one or more streams, where a stream in record N cannot coexist with a stream in record M for N != M (however, streams in the same record can coexist). This mutual exclusion object would be used typically for the purpose of language mutual exclusion, and a record would consist of all streams for a particular language.

 

The Group Mutual Exclusion Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Exclusion Type

GUID

128

Record Count

WORD

16

Records

See below

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Group Mutual Exclusion Object. The value of this field shall be set to ASF_Group_Mutual_Exclusion_Object.

Object Size

Specifies the size, in bytes, of the Group Mutual Exclusion Object. Valid values are at least 42 bytes.

Exclusion Type

Specifies the nature of the mutual exclusion relationship. Use one of the GUIDs defined in section 10.11.

Record Count

Specifies the number of entries in the Records list. This value should be at least 2.

Records

The structure of each Record entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Count

WORD

16

Stream Numbers

WORD

varies

The fields are defined as follows:

Stream Count

Specifies the number of streams in this record. Must be at least 1.

Stream Numbers

Specifies the stream numbers for this record. Valid values are between 1 and 127.

 

For an example regarding the use of the Group Mutual Exclusion Object, see section 7.2.

 

4.4    Stream Prioritization Object (optional, 0 or 1)

The Stream Prioritization Object indicates the author’s intentions as to which streams should or should not be dropped in response to varying network congestion situations. There may be special cases where this preferential order may be ignored (for example, the user hits the “mute” button). Generally it is expected that implementations will try to honor the author’s preference.

 

The priority of each stream is indicated by how early in the list that stream’s stream number is listed (in other words, the list is ordered in terms of decreasing priority).

 

The Mandatory flag field shall be set if the author wants that stream kept “regardless”. If this flag is not set, then that indicates that the stream should be dropped in response to network congestion situations. Non-mandatory streams must never be assigned a higher priority than mandatory streams.

 

The Stream Prioritization Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Priority Records Count

WORD

16

Priority Records

See below

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Stream Prioritization Object. The value of this field shall be set to ASF_Stream_Prioritization_Object.

Object Size

Specifies the size, in bytes, of the Stream Prioritization Object. Valid values are at least 26 bytes.

Priority Records Count

Specifies the number of entries in the Priority Records list. This value should be at least 2.

Priority Records

Priority Records are listed in order of decreasing priority. The structure of each Priority Record entry is shown in the following table.

Field name

Field type

Size (bits)

Stream Number

WORD

16

Priority Flags

WORD

16

 

Mandatory Flag

 

1 (LSB)

 

Reserved Flags

 

15

 

The fields are defined as follows:

Stream Number

Specifies the stream number. Valid values are between 1 and 127.

Mandatory flag

Specifies, if set, that the stream is mandatory.

Reserved flags

Specifies reserved flags. Shall be set to 0.

 

For an example using the Stream Prioritization Object, see section 7.2.

 

4.5    Bandwidth Sharing Object (optional, 0 to many)

The Bandwidth Sharing Object indicates streams that share bandwidth in such a way that the maximum bandwidth of the set of streams is less than the sum of the maximum bandwidths of the individual streams. There should be one instance of this object for each set of objects that share bandwidth. Whether or not this object can be used meaningfully is content-dependent.

 

The Bandwidth Sharing Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Sharing Type

GUID

128

Data Bitrate

DWORD

32

Buffer Size

DWORD

32

Stream Numbers Count

WORD

16

Stream Numbers

WORD

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Bandwidth Sharing Object. The value of this field shall be set to ASF_Bandwidth_Sharing_Object.

Object Size

Specifies the size, in bytes, of the Bandwidth Sharing Object. Valid values are at least 50 bytes.

Sharing Type

Specifies the type of sharing relationship for this object. Two types are predefined: ASF_Bandwidth_Sharing_Partial, in which any number of the streams in the relationship may be streaming data at any given time; and ASF_Bandwidth_Sharing_Exclusive, in which only one of the streams in the relationship may be streaming data at any given time. For these GUID values, see section 10.12.

Data Bitrate

Specifies the leak rate R, in bits per second, of a leaky bucket that contains the data portion of all of the streams, excluding all ASF Data Packet overhead, without overflowing. The size of the leaky bucket is specified by the value of the Buffer Size field. This value can be less than the sum of all of the data bit rates in the Extended Stream Properties Objects for the streams contained in this bandwidth-sharing relationship. For more information about leaky buckets, see section 7.1.

Buffer Size

Specifies the size B, in bits, of the leaky bucket used in the Data Bitrate definition. This value can be less than the sum of all of the buffer sizes in the Extended Stream Properties Objects for the streams contained in this bandwidth-sharing relationship.

Stream Numbers Count

Specifies the number of entries in the Stream Numbers list. This value should be at least 2.

Stream Numbers

Specifies the list of digital media stream numbers in a bandwidth sharing relationship. Valid values are between 1 and 127.

4.6    Language List Object (optional, only 1)

The Language List Object contains an array of Unicode-based language IDs. All other header objects refer to languages through zero-based positions in this array.

 

The Language List Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Language ID Records Count

WORD

16

Language ID Records

See below

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Language List Object. The value of this field shall be set to ASF_Language_List_Object.

Object Size

Specifies the size, in bytes, of the Language List Object. Valid values are at least 26 bytes.

Language ID Records Count

Specifies the number of entries in the Language ID Records list.

Language ID Records

The structure of each Language ID Record entry is shown in the following table.

Field Name

Field Type

Size (bits)

Language ID Length

BYTE

8

Language ID

WCHAR

varies

 

The fields are defined as follows:

Language ID Length

Specifies the size, in bytes, of the Language ID field.

Language ID

Specifies the Language ID string, identifying a language supported in the file. It is strongly recommended that the strings stored in the Language List Object be compliant with RFC-1766 for specifying languages.

 

Note that other objects refer to the Language List Object by means of their own Language List ID Index fields. The value in the Language ID Index field explicitly provides an index into the Language ID Records structure in order to identify a specific language. The first entry into this structure has an index value of 0 (zero). Index values that are greater than the number of entries within the Language ID Records structure are interpreted as signifying the default language for the system (on the Windows operating system, this would correspond to the LCID returned by IMultiLanguage->GetRfc1766FromLcid(GetUserDefaultLCID() ).

 

The first entry (entry 0) in the Language List Object is the default language, and systems should exhibit a preference for that language when no other has been explicitly specified. Language applies both to objects that specify a language and to objects that do not have a provision for specifying language.

 

4.7    Metadata Object (optional, 0 or 1)

The Metadata Object permits authors to store stream-based metadata in a file. 

 

This object supports the same types of metadata information as the Extended Content Description Object except that it also allows a stream number to be specified. For more information about what types of attributes belong in the Metadata Object, see section 7.4.

 

The Metadata Object is represented using the following structure.

 

Field name

Field type

Size (bits)

Object ID

GUID

128

Object Size

QWORD

64

Description Records Count

WORD

16

Description Records

See below

varies

 

The fields are defined as follows:

Object ID

Specifies the GUID for the Metadata Object. The value of this field shall be set to ASF_Metadata_Object.

Object Size

Specifies the size, in bytes, of the Metadata Object. Valid values are larger than 26 bytes.

Description Records Count

Specifies the number of entries in the Description Records list.

Description Records

The structure of each Description Record entry is shown in the following table.

Field name

Field type

Size (bits)

Reserved (Must Be Zero)

WORD

16

Stream Number

WORD

16

Name Length

WORD

16

Data Type

WORD

16

Data Length

DWORD

32

Name

WCHAR

varies

Data

See below

 

 

The fields are defined as follows:

Reserved (Must Be Zero)

This field must contain