GNOME Bugzilla – Bug 735208
omxaacenc needs to provide 'profile' in its srccap
Last modified: 2017-11-29 16:25:27 UTC
My device is QC msm89x6 and my report would be simply stated as below, gst-launch-1.0 filesrc location=[.wav] ! wavparse ! omxaacenc ! aacparse ! audio/mpeg,stream-format=adts ! filesink loc ation=[.aac] currently makes a file that can't be identified by 'gst-typefind' but that says 'FAILED: unknown error'. (I found that the output can be playable if it has been wrapped by 'qtmux'.) To make the output get a correct adts header, 1. It needs to set and add to the srccap 'profile' in addition to the 'base-profile'. Adding the attribute make the element create a correct adts header. 2. Currently, gstomxaacenc.c just gives the default value to certain attributres of OMX_AUDIO_PARAM_AACPROFILETYPE in gst_omx_aac_enc_set_format. However, in my case, I have to set nSampleRate and nChannel rather than the nBitRate that gets a default value. Thanks Jun
For 1. I think gstomxaacenc.c should set both 'profile' and 'base-profile' when version 4 like done by gst_codec_utils_aac_caps_set_level_and_profile (see https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/pbutils/codec-utils.c#n441). Which is used by all gstreamer aac encoders (avenc_aac, voaacenc, faac). For 2. I think it is now fixed by https://cgit.freedesktop.org/gstreamer/gst-omx/commit/omx/gstomxaacenc.c?id=4e01a6f7b12c4e32ee3b406b53143fa515c96680
Created attachment 352309 [details] [review] omxaacenc: also set 'profile' if mpegversion is 4
Comment on attachment 352309 [details] [review] omxaacenc: also set 'profile' if mpegversion is 4 commit 63644639180aa180df293ab4471367bb034660bc Author: Julien Isorce <jisorce@oblong.com> Date: Sun May 21 17:34:51 2017 +0100 omxaacenc: also set 'profile' if mpegversion is 4 Like done by gst_codec_utils_aac_caps_set_level_and_profile which is called by avenc_aac, ffaac and voaacenc. https://bugzilla.gnome.org/show_bug.cgi?id=735208
Note that this might not work right in case of HE-AAC, but I don't know if omxaacenc ever outputs HE-AAC anyway.