Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AAC Media Types

This topic describes how to specify the format of an Advanced Audio Coding (AAC) stream in Media Foundation.

Two subtypes are defined for AAC audio:

SubtypeDescriptionHeader
MFAudioFormat_AACRaw AAC or ADTS AAC. mfapi.h
MEDIASUBTYPE_RAW_AAC1Raw AAC. wmcodecdsp.h

 

MFAudioFormat_AAC

For this subtype, the media type gives the sample rate and number of channels prior to the application of spectral band replication (SBR) and parametric stereo (PS) tools, if present. The effect of the SBR tool is to double the decoded sample rate relative to the core AAC-LC sample rate. The effect of the PS tool is to decode stereo from a mono-channel core AAC-LC stream.

This subtype is equivalent to MEDIASUBTYPE_MPEG_HEAAC, defined in wmcodecdsp.h. See Audio Subtype GUIDs.

MEDIASUBTYPE_RAW_AAC1

This subtype is used for AAC contained in an AVI file with the audio format tag equal to WAVE_FORMAT_RAW_AAC1 (0x00FF).

For this subtype, the media type gives the sample rate and number of channels after the SBR and PS tools are applied, if present.

The following media type attributes apply to AAC audio.

AttributeDescription
MF_MT_MAJOR_TYPE Major type. Must be MFMediaType_Audio.
MF_MT_SUBTYPE Audio subtype. Refer to the previous description for details.
MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION

Audio profile and level.

The value of this attribute is the audioProfileLevelIndication field, as defined by ISO/IEC 14496-3.

If unknown, set to zero or 0xFE ("no audio profile specified").

MF_MT_AUDIO_AVG_BYTES_PER_SECOND Bit rate of the encoded AAC stream, in bytes per second.
MF_MT_AAC_PAYLOAD_TYPE

Payload type.

Applies only to MFAudioFormat_AAC.

MF_MT_AAC_PAYLOAD_TYPE is optional. If this attribute is not specified, the default value 0 is used, which specifies the stream contains raw_data_block elements only.

MF_MT_AUDIO_BITS_PER_SAMPLE Bit depth of the decoded PCM audio.
MF_MT_AUDIO_CHANNEL_MASK Assignment of audio channels to speaker positions.
MF_MT_AUDIO_NUM_CHANNELS

Number of channels, including the low frequency (LFE) channel, if present.

The interpretation of this value depends on the media subtype, as described previously.

MF_MT_AUDIO_SAMPLES_PER_SECOND

Sample rate, in samples per second.

The interpretation of this value depends on the media subtype, as described previously.

MF_MT_USER_DATA

The value of this attribute depends on the subtype:

  • MFAudioFormat_AAC: Contains the portion of the HEAACWAVEINFO structure that appears after the WAVEFORMATEX structure (that is, after the wfx member). This is followed by the AudioSpecificConfig() data, as defined by ISO/IEC 14496-3.
  • MEDIASUBTYPE_RAW_AAC1: Contains the AudioSpecificConfig() data.

 

Related topics

Audio Media Types
Media Type Attributes
MPEG-4 Support in Media Foundation
IMFMediaType

 

 

Community Additions

ADD
Show:
© 2015 Microsoft