locked
MediaStreamSource Winrt Raw AAC RRS feed

  • Question

  • Hello,

              i am writing mediastreamsource injecting H.264 stream  for video and AAC for audio, i ma extracting Raw AAC frames from Mp4 file contaier and providing it as sample  whenever Samplerequested callback is triggered, Each AAC stream in mp4 file is 10s long, I am extracting the complete Raw AAC from mp4 and is one sample for Samplerequested operation.

    But my Audio is not playing, 

    below is my descriptor info (for example using sample values)

                uint sampleRate = 48000;
                uint channelCount = 2;
                uint bitRate = 64000;

                // creating the AudioEncodingProperties for the AAC file
                AudioEncodingProperties audioProps = AudioEncodingProperties.CreateAac(sampleRate, channelCount, bitRate);

                // creating the AudioStreamDescriptor for the AAC file
                _AudioDescriptor = new AudioStreamDescriptor(audioProps);

        When i play the ADTS AAC file using mediastreamsource , audio plays with no problems, but with raw AAC it does not play Audio.

    is there anything i need to do for the RAW AAC from Mp4 container before i set it as sample (for like adding headers etc)

    Appreciate your help.

    Cirano

    Monday, November 10, 2014 9:58 AM

All replies

  • I'll ask our media expert to check this out.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, November 10, 2014 7:02 PM