GNOME Bugzilla – Bug 770455
fdkaacdec: asserts on HE-AAC v2 sample
Last modified: 2016-09-30 07:04:22 UTC
Some more more samples here: https://www2.iis.fraunhofer.de/AAC/stereo.html At least the one named "AOT 29, mixed signalling" just causes the decoder to fail. $ gst-launch-1.0 souphttpsrc location=https://www2.iis.fraunhofer.de/AAC/SBRtestStereoAot5SigusePS.mp4 ! qtdemux ! aacparse ! fdkaacdec ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... gst-launch-1.0: libSBRdec/src/sbrdecoder.cpp:1383: SBR_ERROR sbrDecoder_DecodeElement(HANDLE_SBRDECODER, INT_PCM*, int, const UCHAR*, int, int, int*, int): Assertion `strideOut > 1' failed. Aborted (core dumped)
That would seem like a bug in the library itself, can you report it to Fraunhofer?
Oh indeed, probably actually through google as this lib is from AOSP.. I wonder if I can reproduce this through Android.. as I assume they won't accept the patch otherwise...
Actually, this is a GStreamer bug.. Using the exact same library from ffmpeg decodes the file correctly! Our aacparse doesn't support HE-AAC, so this may be why? With ffmpeg "ffmpeg -c:a libfdk_aac -i 12min-48khz-16bit-2ch-48kbps.aac test.wav" it works fine, with gstreamer, it asserts...
You can create more HE-AACv2 files using ffmpeg, this profile is also missing from our encoder plugin. ffmpeg -i 12min-48khz-16bit-2ch.wav -c:a libfdk_aac -profile:a aac_he_v2 -b:a 48k 12min-48khz-16bit-2ch-48kbps.aac
Created attachment 336181 [details] [review] totally incorrect patch that prevents the crash Disabling AAC_PCM_OUTPUT_INTERLEAVED fixes the problem.. so we may need to leave it off and move the things around ourselves!
(In reply to Olivier Crête from comment #4) > You can create more HE-AACv2 files using ffmpeg, this profile is also > missing from our encoder plugin. Yes, it's trivial to add... except for the missing support for the profile in general which would be needed for proper negotiation via caps :) And adding that requires some research. (In reply to Olivier Crête from comment #5) > Created attachment 336181 [details] [review] [review] > totally incorrect patch that prevents the crash > > Disabling AAC_PCM_OUTPUT_INTERLEAVED fixes the problem.. so we may need to > leave it off and move the things around ourselves! That seems like a bug in the library still. Especially because INTERLEAVED is the default, so it shouldn't even have any effect at all!
The original call is passing 0 though, it's disabling interleaved AFAICT.
Indeed, that should always be 1 instead. Please merge with that change (and fix the GST_ERROR_OBJECT() in the line below while at it)
Pushed: commit 1b0cdcdf3ee83b6293317b7d921a061f8bba8cbf Author: Olivier Crête <olivier.crete@ocrete.ca> Date: Mon Sep 26 11:41:42 2016 +0100 fdkaac: fix mixup setting interleaved output https://bugzilla.gnome.org/show_bug.cgi?id=770455
Created attachment 336256 [details] [review] final fix
Sorry, still doesn't work! $ gst-launch-1.0 filesrc location=12min-48khz-16bit-2ch-48kbps.aac ! aacparse ! fdkaacdec ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... 0:00:00.030299214 13006 0x2120230 ERROR fdkaacdec gstfdkaacdec.c:243:gst_fdkaacdec_handle_frame:<fdkaacdec0> Channel type 0 not supported 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 ... Freeing pipeline ... I created the sample file with: ffmpeg -i 45s-48khz-16bit-2ch.wav -c:a libfdk_aac -profile:a aac_he_v2 -b:a 48k 45s-48khz-16bit-2ch-48kbps.aac Sample file: https://bugzilla.gnome.org/attachment.cgi?id=336277 I also filed tangentially related bug #771994 about our parser not recognizing HE-AACv2 files as such.
Arg, it seems that it's a bug in fdk-aac 1.4 .. maybe we should bump our dep... Buliding against git master hits the next problem that "AOT_MP2_AAC_LC" is not there anymore. Removing that makes the encoder "work" as in avdec_aac can still decode the stream. But this fails "audiotestsrc ! fdkaacenc ! fdkaacdec ! pulsesink"
I fixed that one in https://bugzilla.gnome.org/show_bug.cgi?id=772067
I guess we can close this one again then..