I'm having trouble creating a gstreamer pipeline that can decode aac streams. I'm using decodebin
as the decoder element to keep things as simple as possible. When I push in an aac
stream I get the following errors:
0:00:00.243017793 27632 0x556cf6291de0 INFO GST_STATES gstelement.c:2675:gst_element_continue_state:<avdec_aac0> completed state change to PAUSED
0:00:00.243028893 27632 0x556cf6291de0 INFO GST_STATES gstelement.c:2575:_priv_gst_element_state_changed:<avdec_aac0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.243047154 27632 0x556cf6180830 INFO GST_BUS gstbus.c:588:gst_bus_timed_pop_filtered:<bus1> we got woken up, recheck for message
0:00:00.243865043 27632 0x556cf6291de0 INFO libav :0:: Audio object type 0
0:00:00.243878963 27632 0x556cf6291de0 INFO libav :0:: is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
0:00:00.243901033 27632 0x556cf6291de0 WARN decodebin gstdecodebin2.c:2523:connect_pad:<audiodecoder> Couldn't set avdec_aac0 to PAUSED
...
0:00:00.246185892 27632 0x556cf6291de0 WARN decodebin gstdecodebin2.c:4678:gst_decode_bin_expose:<audiodecoder> error: no suitable plugins found:
Couldn't set avdec_aac0 to PAUSEDCouldn't set avdec_aac_fixed0 to PAUSEDCouldn't set faad0 to PAUSED
0:00:00.246190073 27632 0x556cf6180830 INFO GST_BUS gstbus.c:588:gst_bus_timed_pop_filtered:<bus1> we got woken up, recheck for message
0:00:00.246205032 27632 0x556cf6291de0 INFO GST_ERROR_SYSTEM gstelement.c:2140:gst_element_message_full_with_details:<audiodecoder> posting message: Your GStreamer installation is missing a plug-in.
0:00:00.246253922 27632 0x556cf6291de0 INFO GST_ERROR_SYSTEM gstelement.c:2167:gst_element_message_full_with_details:<audiodecoder> posted error message: Your GStreamer installation is missing a plug-in.
I confirmed the gstreamer plugin is installed via:
gst-inspect-1.0.exe | grep aac
(gst-inspect-1.0:13248): GStreamer-WARNING **: 14:46:08.791: Failed to load plugin 'C:\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0\gstwavpack.dll': The specified module could not be found.
This usually means Windows was unable to find a DLL dependency of the plugin. Please check that PATH is correct.
You can run 'dumpbin -dependents' (provided by the Visual Studio developer prompt) to list the DLL deps of any DLL.
There are also some third-party GUIs to list and debug DLL dependencies recursively.
audioparsers: aacparse: AAC audio stream parser
libav: avdec_aac: libav AAC (Advanced Audio Coding) decoder
libav: avdec_aac_fixed: libav AAC (Advanced Audio Coding) decoder
libav: avdec_aac_latm: libav AAC LATM (Advanced Audio Coding LATM syntax) decoder
libav: avenc_aac: libav AAC (Advanced Audio Coding) encoder
libav: avmux_adts: libav ADTS AAC (Advanced Audio Coding) muxer (not recommended, use aacparse instead)
mediafoundation: mfaacenc: Media Foundation Microsoft AAC Audio Encoder MFT
typefindfunctions: audio/aac: aac, adts, adif, loas
voaacenc: voaacenc: AAC audio encoder
I'm having this trouble in both windows and linux. On windows I installed the complete install for the runtime and development builds for gstreamer, and I'm using the latest 5.0 complete builds linked to from ffmpeg's website.
On ubuntu I've done:
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav libgstrtspserver-1.0-dev libges-1.0-dev libssl-dev ffmpeg faad
I'm still coming up empty.
What am I missing?
This seems to have been caused by my incorrect unwrapping of the FLV data from the incoming RTMP packets. While I unwrapped the audio FLV tag, I did not unwrap the AACAAUDIODATA.AACPacketType
byte. Thus my sequence header and audio packets were prepended with a 0
or 1
bytes that could not be read. The hint for this was seeing libav :0:: Audio object type 0
as well as comparing the codec data in gstreamer caps in the log output compared to doing a straight gstreamer filesrc
pipeline.