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 308980 - gst-typefind incorrectly identifies m4a files encoded with faac
gst-typefind incorrectly identifies m4a files encoded with faac
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.9
Other Linux
: Normal normal
: 0.8.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-24 22:47 UTC by Chris Ouch
Modified: 2005-07-01 17:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
mp4 file (535.85 KB, application/octet-stream)
2005-06-25 07:05 UTC, Chris Ouch
Details

Description Chris Ouch 2005-06-24 22:47:00 UTC
Please describe the problem:
Files encoded using faac version 1.24 or 1.24+ fail to be recognized as
audio/x-m4a.  Instead, the files are shown to be video/quicktime.  The file
plays fine using totem-gstreamer, but does not load into rhythmbox.

Steps to reproduce:
1. encode the wav file using the faac encoder with the options -w -o file.m4a
file.wav -q 130 --mpeg-vers 4 --no-midside --artist artist --album album --title
title --track track --genre genre --year 1999
2. run gst-typefind file.m4a
3. 


Actual results:
file.m4a - video/quicktime


Expected results:
should output

file.m4a - audio/x-m4a

Does this happen every time?
Yes

Other information:
Here's the output when using the following command:
gst-launch-0.8 -v filesrc location=file.m4a ! spider ! osssink
RUNNING pipeline ...
/pipeline0/filesrc0.src: caps = application/octet-stream
/pipeline0/spider0/sink_ident.sink: caps = application/octet-stream
/pipeline0/filesrc0.src: active = TRUE
/pipeline0/spider0/sink_ident.sink: active = TRUE
/pipeline0/spider0/sink_ident.src: active = TRUE
/pipeline0/spider0/src_0.sink: active = TRUE
/pipeline0/spider0/src_0.src: active = TRUE
/pipeline0/osssink0.sink: active = TRUE
/pipeline0/filesrc0.src: caps = video/quicktime
/pipeline0/spider0/sink_ident.sink: caps = video/quicktime
/pipeline0/spider0/sink_ident.src: caps = video/quicktime
/pipeline0/spider0/qtdemux0.sink: caps = video/quicktime
/pipeline0/spider0/qtdemux0.sink: active = TRUE
/pipeline0/spider0/qtdemux0.audio_00: active = TRUE
/pipeline0/spider0/qtdemux0.audio_00: caps = audio/mpeg, mpegversion=(int)4,
rate=(int)44100, channels=(int)2
/pipeline0/spider0/faad0.sink: caps = audio/mpeg, mpegversion=(int)4,
rate=(int)44100, channels=(int)2
/pipeline0/spider0/faad0.sink: active = TRUE
/pipeline0/spider0/faad0.src: active = TRUE
/pipeline0/spider0/src_0.src: caps = audio/x-raw-int, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >,
endianness=(int)1234
/pipeline0/osssink0.sink: caps = audio/x-raw-int, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >,
endianness=(int)1234
/pipeline0/spider0/faad0.src: caps = audio/x-raw-int, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >,
endianness=(int)1234
/pipeline0/spider0/src_0.sink: caps = audio/x-raw-int, signed=(boolean)true,
width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT >,
endianness=(int)1234
Comment 1 Chris Ouch 2005-06-24 22:57:34 UTC
Correction, running Gstreamer 0.8.9
Comment 2 Ronald Bultje 2005-06-25 04:00:38 UTC
Please attach the file.
Comment 3 Chris Ouch 2005-06-25 06:50:33 UTC
Figured it out.  Apparently the file type ID header file for faac encoded files
wrapped within the mp4 header is "ftypmp42".

Don't know if this is the correct way to edit it, but I added the following
patch.  (probably not in correct patch format)

--- gsttypefindfunctions.c	2005-06-25 00:37:04.825190208 -0500
+++ gsttypefindfunctions.c	2005-06-25 01:36:13.128766072 -0500
@@ -964,6 +964,9 @@
   if (data && memcmp (data, "ftypM4A ", 8) == 0) {
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, M4A_CAPS);
   }
+  if (data && memcmp (data, "ftypmp42", 8) == 0) {
+    gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, M4A_CAPS);
+  }
 }
 
 /*** application/x-3gp *********************************************/
Comment 4 Chris Ouch 2005-06-25 07:05:35 UTC
Created attachment 48309 [details]
mp4 file

Here's the m4a file created with faac using the options mentioned above,
especially the -w option which wraps the raw aac in a mp4 header.
Comment 5 Chris Ouch 2005-06-25 07:11:18 UTC
Opps, its not a Gstreamer core bug, but rather a bug in gst-plugins

in /gst/typefind/.

Sorry for the initial confusion it may have caused.
Comment 6 Ronald Bultje 2005-07-01 17:42:07 UTC
Applied differently, thanks.