When I play some TuneIn radio programs with Alexa, alexa calls gstreamer to decode these radio programs successfully, but when gstreamer decodes the audio stream of the radio program Maria, the log displays the following error. I adjusted the gstreamer log to the INFO level.
“
0:03:16.177065596 708 0x589320 INFO GST_STATES gstbin.c:2969:gst_bin_change_state_func: child ‘converter’ changed state to 3(PAUSED) successfully
0:03:16.182995979 708 0xa7ae00 WARN audiodecoder gstaudiodecoder.c:3039:_gst_audio_decoder_error: error: decoding error: 8199
0:03:16.185400830 708 0xa7ae00 INFO structure gststructure.c:3051:gst_structure_get_valist: Expected field ‘codec_data’ in structure: audio/mpeg, framed=(boolean)true, mpegversion=(int)2, level=(string)2, profile=(string)lc, rate=(int)44100, channels=(int)2, stream-format=(string)raw;
0:03:16.186273699 708 0xa7ae00 ERROR fdkaacdec gstfdkaacdec.c:135:gst_fdkaacdec_set_format: Raw AAC without codec_data not supported
0:03:16.186905803 708 0xa7ae00 WARN basesrc gstbasesrc.c:2950:gst_base_src_loop: error: Internal data stream error.
0:03:16.187125445 708 0xa7ae00 WARN basesrc gstbasesrc.c:2950:gst_base_src_loop: error: streaming stopped, reason not-negotiated (-4)
0:03:16.177263618 708 0x589320 INFO GST_STATES gstbin.c:2521:gst_bin_element_set_state: current PAUSED pending VOID_PENDING, desired next PAUSED
0:03:16.188099768 708 0x589320 INFO GST_STATES gstbin.c:2638:gst_bin_element_set_state: skipping transition from PAUSED to PAUSED
“
Can anyone help me to solve this problem? Thank you very much.
What is the pipeline used here? As the error suggests, there should be a codec_data field in the caps for raw AAC streams. You’ll have to find out where that’s missing to be added, and why.
Thanks for your reply. I’m a rookie on Gstreamer. Do you mean that code_data might have been lost during the decoding of the audio stream by gstreamer?Or does the original audio stream not contain a codec_data field at all?
To be honest,I am not so clear about the pipeline I used . Could you tell me how to know what pipeline I used in my scenario ? I attached the log of this issue. I am not sure if it possilble to get more details from the log. Hope the log will be helpful for it. Thank you!
Thank you for taking the time to reply to my question! I am still a little bit confused about the codec_data.
Does the filed of codec_data should be included in the “appsrc”, but now it lost or src doesn’t include this filed at all?
Do you mean I should populate this field in the code myself? Do you have any suggestions on how to fix it ? Thank you.
The code that sets up the appsrc element and creates the audio/mpeg, ... caps needs to add a codec_data field to the caps as well.
It’s not entirely clear to me if that’s your code or you’re just using someone else’s code/app, but it needs to be fixed in the code, it’s not something you can easily fix “from the outside”.
Thanks for your reply. I have some questions that are still unclear. Do you mean that the upper level code that calls gstreamer as a decoder will sets up the appsrc element and creates the audio/mpeg? (Under my scenario, the upper level code is alexa).
I am not sure if I understand correctly about this here. If the upper level code just feed the url of radio to gstreamer, it will still sets up the appsrc element and creates the audio/mpeg, ... caps ? Or Gstreamer will parse the url and then decode it?
Where will this step of “sets up the appsrc element and creates the audio/mpeg” happen? In upper level code or in gstreamer?
The fact that there’s an appsrc element makes it likely that the stream is read by the application/library (alexa?) and then the data is passed to GStreamer for decoding.
If GStreamer opened the url itself there wouldn’t be an appsrc.