After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735208 - omxaacenc needs to provide 'profile' in its srccap
omxaacenc needs to provide 'profile' in its srccap
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
1.2.4
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-22 07:29 UTC by Jun Ji
Modified: 2017-11-29 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxaacenc: also set 'profile' if mpegversion is 4 (1.13 KB, patch)
2017-05-21 16:39 UTC, Julien Isorce
committed Details | Review

Description Jun Ji 2014-08-22 07:29:32 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
Comment 1 Julien Isorce 2017-05-21 16:32:08 UTC
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
Comment 2 Julien Isorce 2017-05-21 16:39:31 UTC
Created attachment 352309 [details] [review]
omxaacenc: also set 'profile' if mpegversion is 4
Comment 3 Julien Isorce 2017-11-29 16:14:41 UTC
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
Comment 4 Tim-Philipp Müller 2017-11-29 16:25:27 UTC
Note that this might not work right in case of HE-AAC, but I don't know if omxaacenc ever outputs HE-AAC anyway.