Demuxing AAC audio into an ASF file

Skip to first unread message

Shahar Mor

Mar 29, 2012, 12:41:22 PM3/29/12
Hi all,

I have gone through the forum and seen a similar question (which had a similar description in the beginning), but it had no answer. (

My problem is that I have A/V content encoded as H264 video and AAC audio which I am trying to mux into and ASF container using IWMWriterAdvanced. I use IWMWriterAdvanced::WriteStreamSample() because the data is already compressed. I am using the same code to mux WMV and WMA streams and also H264 and WMA into ASF successfully. The problem is that when I try to put AAC in the file it doesn't play properly.

A few important notes:

* AAC stream is created using MainConcept AAC encoder filter.

* Video plays but audio is either silent or have noise in it. (VLC and WMP)

* The same audio content is playable before I try to mux it into the ASF file. It is decoded using Microsoft DTV-DVD Audio decoder filter (CLSID_CMPEG2AudDecoderDS).

* When I play the ASF file in graphedit:

* When using Microsoft DTV-DVD Audio decoder filter I get the same behavior as in WMP (silence and/or noise).

* When using our own (ffmpeg based) AAC decoder or MainConcept decoder it plays fine.

We need the ASF file to be playable in commercial players (VLC and WMP at least). From my experiments so far it is obvious that all audio data is in the file but for some reason the players are not decoding it properly. I suspect the ASF container to be missing something.

Audio stream part from the profile used by the IWMWriterAdvanced:


<streamconfig majortype="{73647561-0000-0010-8000-00AA00389B71}" streamnumber="1" streamname="en" inputname="Audio connection 01" bitrate="64008" bufferwindow="0" reliabletransport="0" decodercomplexity="" rfc1766langid="en">
<wmmediatype subtype="{00000161-0000-0010-8000-00AA00389B71}" bfixedsizesamples="1" btemporalcompression="0" lsamplesize="0">
<waveformatex wFormatTag="353" nChannels="2" nSamplesPerSec="48000" nAvgBytesPerSec="8001" nBlockAlign="2731" wBitsPerSample="16" codecdata="008800000F0000000000"/>


<streamconfig majortype="{73647561-0000-0010-8000-00AA00389B71}" streamnumber="1" streamname="en" inputname="Audio connection 01" bitrate="64000" bufferwindow="0" reliabletransport="0" decodercomplexity="" rfc1766langid="en">
<wmmediatype subtype="{000000FF-0000-0010-8000-00AA00389B71}" bfixedsizesamples="1" btemporalcompression="0" lsamplesize="40960">
<waveformatex wFormatTag="255" nChannels="2" nSamplesPerSec="48000" nAvgBytesPerSec="8000" nBlockAlign="1" wBitsPerSample="16" codecdata="11900000000000000000"/>

Any thoughts?

Reply all
Reply to author
0 new messages