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 153434 - [PATCH] faac filter cannot create .aac files
[PATCH] faac filter cannot create .aac files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.4
Other Linux
: Normal normal
: 0.8.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-22 13:59 UTC by Sebastien Cote
Modified: 2005-01-07 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Quick fix (3.28 KB, patch)
2004-09-22 14:01 UTC, Sebastien Cote
none Details | Review

Description Sebastien Cote 2004-09-22 13:59:22 UTC
The AAC encoder filter (faac) doesn't generate ADTS so it cannot create .aac
files. In the code, there's a comment about autodetecting if we need it or not
(use ADTS if connecting to the filesink, not when connecting to a qtmux). For
this to work correctly, I think that faac should default to using ADTS and use
raw AAC when its requested in the caps.

Another solution would be to let the user choose what kind of output he wants by
using properties.
Comment 1 Sebastien Cote 2004-09-22 14:01:30 UTC
Created attachment 31831 [details] [review]
Quick fix

Adds the "outputformat" property to let the user choose between ADTS and raw.
Comment 2 Ronald Bultje 2004-09-23 15:13:11 UTC
You're supposed to use it in combination with a qtmux or matroskamux element.
faad doesn't play ADTS/raw files either, so the resulting file would be useless
nonetheless.
Comment 3 Ronald Bultje 2004-09-23 15:17:56 UTC
Oh, wait, I didn't see your update to 148993. If you add a typefind function,
I'm fine with this.
Comment 4 Sebastien Cote 2004-09-23 16:16:57 UTC
In fact, FAAD2 can decode .aac (ADTS) files so you could decode the file without
GStreamer.

I'll look into adding a typefind function to the decoder, I have no idea how
that works.
Comment 5 Ronald Bultje 2004-09-24 15:02:55 UTC
For typefinding, look at gst-plugins/gst/typefind/gsttypefindfunctions.c
Comment 6 Sebastien Cote 2004-09-24 15:23:47 UTC
typefinding for .aac is already included in gst-plugins-0.8.4
Comment 7 Ronald Bultje 2004-10-02 14:16:12 UTC
I kind of dislike this patch. I hope you don't mind me disliking it. ;).

HEre's some random thoughts on what we could do to fix this properly. First,
what do we want? Imo, we'd like the detection of "raw frames or write headers"
to be automated. Raw frames will always be placed in a container, which expects
a caps with a specific mimetype, e.g. audio/mpeg,mpegversion=(int)4. So what you
could do is to make the src template have two caps:
audio/mpeg,mpegversion=(int)4 and application/x-adts-m4a. The ADTS mimetype
should come first, else it won't work! Autofixation will see if the peer pad
accepts either. Container will only accept the second. Filesink will accept both
and thus it'll fixate to the first. Then, in a link function, simply check the
mimetype of the selected (fixated) caps and write headers based on that.

Sorry, long story, but it'll make this automatic and I kind of like that idea.
Comment 8 Sebastien Cote 2004-10-02 14:28:04 UTC
I agree with you and that's why my patch was named quick fix. (The patch is
almost smaller than your explanation for the perfect solution ;-)

I really don't mind if you don't apply the patch, but I don't think I'll have
the time to create the perfect fix soon. In the meantime, I can still generate
.aac files with this patch.
Comment 9 Christian Fredrik Kalager Schaller 2004-12-05 12:07:43 UTC
Ronald what should we do here? Should we apply this patch or not?
Comment 10 Ronald Bultje 2004-12-05 12:24:51 UTC
Feel free to apply. It's not necessarily right, though.
Comment 11 Sebastien Cote 2004-12-05 16:41:51 UTC
It might be better not to apply the patch if we want the problem to be fixed
correctly (and leave the bug open). In the meantime, people who want to create
.aac files can always get the patch here.
Comment 12 Ronald Bultje 2005-01-07 10:15:04 UTC
Since the correct solution will take a while, I've applied it. We don't have a
qtmux element anyway.