correct way to decode AAC?

Adams, Bruce (KMLWG) Bruce.Adams at KantarMedia.com
Mon May 21 17:37:53 UTC 2018


Hi,
     What is the correct way to decode aac audio from an mpeg TS?
I have a pipeline like this:

>gst-launch-1.0 -v filesrc location=multi.ts ! tsparse ! tsdemux program_number=17540 ! aacparse ! faad ! audioconvert ! audioresample ! audio/x-raw, rate=8000, channels=1 ! wavenc ! filesink location=cbbc.wav
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/MpegTSParse2:mpegtsparse2-0.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstTSDemux:tsdemux0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
failed delayed linking some pad of GstTSDemux named tsdemux0 to some pad of GstAacParse named aacparse0
^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

So I tried just saving the raw AAC to a file and converting that as an experiment:

>gst-launch-1.0 -v filesrc location=multi.ts ! tsparse ! tsdemux program_number=17540 ! audio/mpeg ! filesink location=cbbc.aac

>mediainfo cbbc.aac
General
Complete name                            : cbbc.aac
Format                                   : LATM
File size                                : 2.38 MiB
Overall bit rate mode                    : Variable

Audio
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 spf)
Compression mode                         : Lossy

This audio file plays fine in for example VLC

However I cannot decode it:

>gst-launch-1.0 -v filesrc location=cbbc.aac ! aacparse ! faad ! audioconvert ! audioresample ! audio/x-raw, rate=8000, channels=1 ! wavenc ! filesink location=cbbc.wav
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAacParse:aacparse0.GstPad:src: caps = audio/mpeg, framed=(boolean)true, mpegversion=(int)4, rate=(int)48000, channels=(int)2, stream-format=(string)loas
ERROR: from element /GstPipeline:pipeline0/GstAacParse:aacparse0: Internal data stream error.
Additional debug info:
gstbaseparse.c(3608): gst_base_parse_loop (): /GstPipeline:pipeline0/GstAacParse:aacparse0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

What am I missing here?

Regards,

Bruce.


Kantar Disclaimer<http://www.kantar.com/disclaimer.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180521/273fb24e/attachment.html>


More information about the gstreamer-devel mailing list