AAC not played - No Sound output

Ashwini Sharma ak.ashwini at gmail.com
Mon Jul 25 05:51:24 PDT 2011


Hi All,

  I am adding the ADTS header infront of the raw AAC frame and decoding it.

Now I see that the frames are being written to Alsasink, but there is no
sound output actually.

The "*snd_pcm_writei*" function in "*gst_alsasink_write*" returns same
number as input. Can someone point me in the right direction to get the
Audio output.

Regards,
Ashwini

On Fri, Jul 22, 2011 at 11:07 AM, Balakrishnan Natarajan <
balakrishnan.2005 at gmail.com> wrote:

> The Elementary AAC can be playable only if it contains ADTS header.
>
> So verify if your demuxer gives you the Elementary AAC stream with ADTS
> header.
>
> You can verify this by playing with tools like foobar or winamp.
>
> Once you have verified this may be you need to aacparse plugin to extract
> the ADTS header and pass it to the ffdec_aac plugin
> through the codec-data caps field while negotiation.
>
> Regards
> Bala
>
>
>
>
> On Thu, Jul 21, 2011 at 11:44 AM, <
> gstreamer-devel-request at lists.freedesktop.org> wrote:
>
>> Send gstreamer-devel mailing list submissions to
>>
>>        gstreamer-devel at lists.freedesktop.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>
>>        http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> or, via email, send a message with subject or body 'help' to
>>        gstreamer-devel-request at lists.freedesktop.org
>>
>> You can reach the person managing the list at
>>        gstreamer-devel-owner at lists.freedesktop.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of gstreamer-devel digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Re: AAC not played - Error from decoder (ffdec_aac)
>>      (Sudarshan Bisht)
>>   2. Re: AAC not played - Error from decoder (ffdec_aac)
>>      (Sudarshan Bisht)
>>   3. Re: AAC not played - Error from decoder (ffdec_aac)
>>      (Ashwini Sharma)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 21 Jul 2011 08:23:47 +0300
>> From: Sudarshan Bisht <bisht.sudarshan at gmail.com>
>> Subject: Re: AAC not played - Error from decoder (ffdec_aac)
>> To: Discussion of the development of and with GStreamer
>>
>>        <gstreamer-devel at lists.freedesktop.org>
>> Message-ID:
>>        <CACdEgVYk7woyv+sO3DQcu3W86EkysYwoY60HhX=Rm6TA=
>> QFeeA at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Yes you can insert missing header to raw aac data by writing your own
>> plugin, and place it before decoder plugin.  But you need to have certain
>> information for header e.g. sampling frequency, channels, profile etc ,
>> and
>> all this you suppose to get from demuxer.
>>
>>
>>
>>
>> On Thu, Jul 21, 2011 at 7:43 AM, Ashwini Sharma <ak.ashwini at gmail.com
>> >wrote:
>>
>> > HI Sudarshan,
>> >
>> > Adding aacparse didn't help. I get the parse error from aacparse.
>> >
>> > In my case, the file is read and demuxed by an application, which then
>> > gives the audio stream data to my pipeline (which consists of aapsrc !
>> > decoder ! alsasink ) for decoding and rendering.
>> >
>> > I am able to play ac3 and mp3. But AAC i am having failure still. I
>> tried
>> > your inputs, but to no results.
>> >
>> > Can't there be case that we provide the missing header data to ffdec_aac
>> > thru some means..... any inputs please.
>> >
>> > Rgds,
>> > Ashwini
>> >
>> > On Wed, Jul 20, 2011 at 8:19 PM, Sudarshan Bisht <
>> > bisht.sudarshan at gmail.com> wrote:
>> >
>> >> If you want to play it dynamically then you don't need to mux it again,
>> >> maybe you can use aacparse between demuxer and aac decoder plugin.
>> >>
>> >>
>> >>
>> >> On Wed, Jul 20, 2011 at 4:06 PM, Ashwini Sharma <ak.ashwini at gmail.com
>> >wrote:
>> >>
>> >>> Hi Sudarshan,
>> >>>
>> >>> Thanks for your input.
>> >>>
>> >>> Can I play the AAC data dynamically, as suggested by you, instead of
>> >>> saving it into file.
>> >>>
>> >>> Like mux the incoming AAC data buffer and then decode it at the same
>> >>> time?
>> >>>
>> >>> rgds,
>> >>> -Ashwini
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Jul 20, 2011 at 5:59 PM, Sudarshan Bisht <
>> >>> bisht.sudarshan at gmail.com> wrote:
>> >>>
>> >>>>
>> >>>> Demuxer outputs raw aac data, it does not have any header(ADIF/ADTS)
>> >>>> thats why you get that error message.
>> >>>>
>> >>>> To get the correct playable file, you again need to mux this raw aac
>> >>>> data using qtmux and then you get .m4a file.   And to play this .m4a
>> file
>> >>>> you need to have qtdemux in your pipeline if you don't use
>> >>>> decodebin2/playbin2.
>> >>>>
>> >>>> I hope this will help you.
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>   On Wed, Jul 20, 2011 at 1:52 PM, Ashwini Sharma <
>> ak.ashwini at gmail.com
>> >>>> > wrote:
>> >>>>
>> >>>>>   Hi All,
>> >>>>>
>> >>>>> I have a demuxed audio stream (AAC encoded). When I try to play, i
>> get
>> >>>>> an error "FFMpeg can not decode AAC data"
>> >>>>>
>> >>>>> The details are as follows:
>> >>>>>
>> >>>>> I have a video file which contain mpeg4 video and AAC audio. I Demux
>> >>>>> the file into Audio and video files. When i play the demuxed audio
>> it fails.
>> >>>>>
>> >>>>> But when i reapeat the same test for AC3 or MP3 audios, it works
>> fine.
>> >>>>>
>> >>>>>
>> >>>>> I think there is some mistake on my part when playing the AAC file.
>> >>>>> Someone please provide your inputs in getting it to play.
>> >>>>>
>> >>>>> Any help is greatly appreciated.
>> >>>>>
>> >>>>> -Ashwini
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> gstreamer-devel mailing list
>> >>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Regards,
>> >>>>
>> >>>> Sudarshan Bisht
>> >>>>
>> >>>> _______________________________________________
>> >>>> gstreamer-devel mailing list
>> >>>> gstreamer-devel at lists.freedesktop.org
>> >>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>
>> >>>>
>> >>>
>> >>> _______________________________________________
>> >>> gstreamer-devel mailing list
>> >>> gstreamer-devel at lists.freedesktop.org
>> >>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> Sudarshan Bisht
>> >>
>> >> _______________________________________________
>> >> gstreamer-devel mailing list
>> >> gstreamer-devel at lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>
>> >>
>> >
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >
>> >
>>
>>
>> --
>> Regards,
>>
>> Sudarshan Bisht
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110721/a85c1666/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Thu, 21 Jul 2011 09:09:18 +0300
>> From: Sudarshan Bisht <bisht.sudarshan at gmail.com>
>> Subject: Re: AAC not played - Error from decoder (ffdec_aac)
>> To: Discussion of the development of and with GStreamer
>>
>>        <gstreamer-devel at lists.freedesktop.org>
>> Message-ID:
>>        <CACdEgVbocRsfvXpG+ZO2sBODaLoouU3a=
>> jiKU4ffWj_Ouq-3pQ at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Or you can do same in your application also, then no need to write a
>> plugin.
>>
>>
>>
>> On Thu, Jul 21, 2011 at 8:23 AM, Sudarshan Bisht
>> <bisht.sudarshan at gmail.com>wrote:
>>
>> > Yes you can insert missing header to raw aac data by writing your own
>> > plugin, and place it before decoder plugin.  But you need to have
>> certain
>> > information for header e.g. sampling frequency, channels, profile etc ,
>> and
>> > all this you suppose to get from demuxer.
>> >
>> >
>> >
>> >
>> > On Thu, Jul 21, 2011 at 7:43 AM, Ashwini Sharma <ak.ashwini at gmail.com
>> >wrote:
>> >
>> >> HI Sudarshan,
>> >>
>> >> Adding aacparse didn't help. I get the parse error from aacparse.
>> >>
>> >> In my case, the file is read and demuxed by an application, which then
>> >> gives the audio stream data to my pipeline (which consists of aapsrc !
>> >> decoder ! alsasink ) for decoding and rendering.
>> >>
>> >> I am able to play ac3 and mp3. But AAC i am having failure still. I
>> tried
>> >> your inputs, but to no results.
>> >>
>> >> Can't there be case that we provide the missing header data to
>> ffdec_aac
>> >> thru some means..... any inputs please.
>> >>
>> >> Rgds,
>> >> Ashwini
>> >>
>> >> On Wed, Jul 20, 2011 at 8:19 PM, Sudarshan Bisht <
>> >> bisht.sudarshan at gmail.com> wrote:
>> >>
>> >>> If you want to play it dynamically then you don't need to mux it
>> again,
>> >>> maybe you can use aacparse between demuxer and aac decoder plugin.
>> >>>
>> >>>
>> >>>
>> >>> On Wed, Jul 20, 2011 at 4:06 PM, Ashwini Sharma <ak.ashwini at gmail.com
>> >wrote:
>> >>>
>> >>>> Hi Sudarshan,
>> >>>>
>> >>>> Thanks for your input.
>> >>>>
>> >>>> Can I play the AAC data dynamically, as suggested by you, instead of
>> >>>> saving it into file.
>> >>>>
>> >>>> Like mux the incoming AAC data buffer and then decode it at the same
>> >>>> time?
>> >>>>
>> >>>> rgds,
>> >>>> -Ashwini
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Wed, Jul 20, 2011 at 5:59 PM, Sudarshan Bisht <
>> >>>> bisht.sudarshan at gmail.com> wrote:
>> >>>>
>> >>>>>
>> >>>>> Demuxer outputs raw aac data, it does not have any header(ADIF/ADTS)
>> >>>>> thats why you get that error message.
>> >>>>>
>> >>>>> To get the correct playable file, you again need to mux this raw aac
>> >>>>> data using qtmux and then you get .m4a file.   And to play this .m4a
>> file
>> >>>>> you need to have qtdemux in your pipeline if you don't use
>> >>>>> decodebin2/playbin2.
>> >>>>>
>> >>>>> I hope this will help you.
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>   On Wed, Jul 20, 2011 at 1:52 PM, Ashwini Sharma <
>> >>>>> ak.ashwini at gmail.com> wrote:
>> >>>>>
>> >>>>>>   Hi All,
>> >>>>>>
>> >>>>>> I have a demuxed audio stream (AAC encoded). When I try to play, i
>> get
>> >>>>>> an error "FFMpeg can not decode AAC data"
>> >>>>>>
>> >>>>>> The details are as follows:
>> >>>>>>
>> >>>>>> I have a video file which contain mpeg4 video and AAC audio. I
>> Demux
>> >>>>>> the file into Audio and video files. When i play the demuxed audio
>> it fails.
>> >>>>>>
>> >>>>>> But when i reapeat the same test for AC3 or MP3 audios, it works
>> fine.
>> >>>>>>
>> >>>>>>
>> >>>>>> I think there is some mistake on my part when playing the AAC file.
>> >>>>>> Someone please provide your inputs in getting it to play.
>> >>>>>>
>> >>>>>> Any help is greatly appreciated.
>> >>>>>>
>> >>>>>> -Ashwini
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> gstreamer-devel mailing list
>> >>>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>> --
>> >>>>> Regards,
>> >>>>>
>> >>>>> Sudarshan Bisht
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> gstreamer-devel mailing list
>> >>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> gstreamer-devel mailing list
>> >>>> gstreamer-devel at lists.freedesktop.org
>> >>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>> --
>> >>> Regards,
>> >>>
>> >>> Sudarshan Bisht
>> >>>
>> >>> _______________________________________________
>> >>> gstreamer-devel mailing list
>> >>> gstreamer-devel at lists.freedesktop.org
>> >>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>
>> >>>
>> >>
>> >> _______________________________________________
>> >> gstreamer-devel mailing list
>> >> gstreamer-devel at lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>
>> >>
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Sudarshan Bisht
>> >
>>
>>
>>
>> --
>> Regards,
>>
>> Sudarshan Bisht
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110721/b84ec3ee/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Thu, 21 Jul 2011 11:44:37 +0530
>> From: Ashwini Sharma <ak.ashwini at gmail.com>
>> Subject: Re: AAC not played - Error from decoder (ffdec_aac)
>> To: Discussion of the development of and with GStreamer
>>
>>        <gstreamer-devel at lists.freedesktop.org>
>> Message-ID:
>>        <
>> CAO7aZcewG58jLm1TKRK_rDki01cUfH_hAqAe0qEu9q2OB+qs8g at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Hi,
>>
>> Can you please tell me how to contruct the header from the given data,
>> i.e.
>> sampling frequency, channels, profile etc
>>
>> Thanks,
>> Ashwini
>>
>> On Thu, Jul 21, 2011 at 11:39 AM, Sudarshan Bisht <
>> bisht.sudarshan at gmail.com
>> > wrote:
>>
>> > Or you can do same in your application also, then no need to write a
>> > plugin.
>> >
>> >
>> >
>> > On Thu, Jul 21, 2011 at 8:23 AM, Sudarshan Bisht <
>> > bisht.sudarshan at gmail.com> wrote:
>> >
>> >> Yes you can insert missing header to raw aac data by writing your own
>> >> plugin, and place it before decoder plugin.  But you need to have
>> certain
>> >> information for header e.g. sampling frequency, channels, profile etc ,
>> and
>> >> all this you suppose to get from demuxer.
>> >>
>> >>
>> >>
>> >>
>> >> On Thu, Jul 21, 2011 at 7:43 AM, Ashwini Sharma <ak.ashwini at gmail.com
>> >wrote:
>> >>
>> >>> HI Sudarshan,
>> >>>
>> >>> Adding aacparse didn't help. I get the parse error from aacparse.
>> >>>
>> >>> In my case, the file is read and demuxed by an application, which then
>> >>> gives the audio stream data to my pipeline (which consists of aapsrc !
>> >>> decoder ! alsasink ) for decoding and rendering.
>> >>>
>> >>> I am able to play ac3 and mp3. But AAC i am having failure still. I
>> tried
>> >>> your inputs, but to no results.
>> >>>
>> >>> Can't there be case that we provide the missing header data to
>> ffdec_aac
>> >>> thru some means..... any inputs please.
>> >>>
>> >>> Rgds,
>> >>> Ashwini
>> >>>
>> >>>   On Wed, Jul 20, 2011 at 8:19 PM, Sudarshan Bisht <
>> >>> bisht.sudarshan at gmail.com> wrote:
>> >>>
>> >>>> If you want to play it dynamically then you don't need to mux it
>> again,
>> >>>> maybe you can use aacparse between demuxer and aac decoder plugin.
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Wed, Jul 20, 2011 at 4:06 PM, Ashwini Sharma <
>> ak.ashwini at gmail.com>wrote:
>> >>>>
>> >>>>> Hi Sudarshan,
>> >>>>>
>> >>>>> Thanks for your input.
>> >>>>>
>> >>>>> Can I play the AAC data dynamically, as suggested by you, instead of
>> >>>>> saving it into file.
>> >>>>>
>> >>>>> Like mux the incoming AAC data buffer and then decode it at the same
>> >>>>> time?
>> >>>>>
>> >>>>> rgds,
>> >>>>> -Ashwini
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> On Wed, Jul 20, 2011 at 5:59 PM, Sudarshan Bisht <
>> >>>>> bisht.sudarshan at gmail.com> wrote:
>> >>>>>
>> >>>>>>
>> >>>>>> Demuxer outputs raw aac data, it does not have any
>> header(ADIF/ADTS)
>> >>>>>> thats why you get that error message.
>> >>>>>>
>> >>>>>> To get the correct playable file, you again need to mux this raw
>> aac
>> >>>>>> data using qtmux and then you get .m4a file.   And to play this
>> .m4a file
>> >>>>>> you need to have qtdemux in your pipeline if you don't use
>> >>>>>> decodebin2/playbin2.
>> >>>>>>
>> >>>>>> I hope this will help you.
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>   On Wed, Jul 20, 2011 at 1:52 PM, Ashwini Sharma <
>> >>>>>> ak.ashwini at gmail.com> wrote:
>> >>>>>>
>> >>>>>>>   Hi All,
>> >>>>>>>
>> >>>>>>> I have a demuxed audio stream (AAC encoded). When I try to play, i
>> >>>>>>> get an error "FFMpeg can not decode AAC data"
>> >>>>>>>
>> >>>>>>> The details are as follows:
>> >>>>>>>
>> >>>>>>> I have a video file which contain mpeg4 video and AAC audio. I
>> Demux
>> >>>>>>> the file into Audio and video files. When i play the demuxed audio
>> it fails.
>> >>>>>>>
>> >>>>>>> But when i reapeat the same test for AC3 or MP3 audios, it works
>> >>>>>>> fine.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> I think there is some mistake on my part when playing the AAC
>> file.
>> >>>>>>> Someone please provide your inputs in getting it to play.
>> >>>>>>>
>> >>>>>>> Any help is greatly appreciated.
>> >>>>>>>
>> >>>>>>> -Ashwini
>> >>>>>>>
>> >>>>>>> _______________________________________________
>> >>>>>>> gstreamer-devel mailing list
>> >>>>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>>>
>> >>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> Regards,
>> >>>>>>
>> >>>>>> Sudarshan Bisht
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> gstreamer-devel mailing list
>> >>>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> gstreamer-devel mailing list
>> >>>>> gstreamer-devel at lists.freedesktop.org
>> >>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>> --
>> >>>> Regards,
>> >>>>
>> >>>> Sudarshan Bisht
>> >>>>
>> >>>> _______________________________________________
>> >>>> gstreamer-devel mailing list
>> >>>> gstreamer-devel at lists.freedesktop.org
>> >>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>>
>> >>>>
>> >>>
>> >>> _______________________________________________
>> >>> gstreamer-devel mailing list
>> >>> gstreamer-devel at lists.freedesktop.org
>> >>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Regards,
>> >>
>> >> Sudarshan Bisht
>> >>
>> >
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Sudarshan Bisht
>> >
>> > _______________________________________________
>> > gstreamer-devel mailing list
>> > gstreamer-devel at lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>> >
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110721/ad4b4e23/attachment.htm
>> >
>>
>> ------------------------------
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> End of gstreamer-devel Digest, Vol 6, Issue 50
>> **********************************************
>>
>
>
>
> --
> - bala
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110725/fc3f40e7/attachment.htm>


More information about the gstreamer-devel mailing list