GNOME Bugzilla – Bug 607848
typefind wrong classifies mp4 file as mp3
Last modified: 2010-01-24 20:10:20 UTC
The file is 800megs, so I can't upload it... but here's a typefind debug log.. I should also mention that mplayer correctly recognizes it as a mp4 file. tester@TesterBox ~/collabora/gst-plugins-base $ GST_DEBUG=*typefind*:5 gst-launch-0.10 -v filesrc location=/home/tester/down/file.mp4 ! typefind ! fakesink |head -n 20 (gst-plugin-scanner:26966): GLib-GObject-WARNING **: cannot register existing type `GstQueue2' (gst-plugin-scanner:26966): GStreamer-CRITICAL **: gst_element_register: assertion `g_type_is_a (type, GST_TYPE_ELEMENT)' failed Setting pipeline to PAUSED ... 0:00:00.529553994 26964 0x6070b0 DEBUG typefind gsttypefindelement.c:635:gst_type_find_get_extension:<typefindelement0> finding extension of file://%2Fhome%2Ftester%2Fdown%2Ffile.mp4 0:00:00.529630591 26964 0x6070b0 DEBUG typefind gsttypefindelement.c:651:gst_type_find_get_extension:<typefindelement0> found extension mp4 0:00:00.531378121 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/png with the first 8 bytes of data 0:00:00.531932760 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:823:mp3_type_frame_length_from_header: mp3typefind: calculated mp3 frame length of 384 bytes 0:00:00.532012741 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:826:mp3_type_frame_length_from_header: mp3typefind: samplerate = 48000 - bitrate = 128 - layer = 3 - version = 3 - channels = 2 0:00:00.532064260 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:948:mp3_type_find_at_offset: found 1. header at offset 44 (0x2C) 0:00:00.532112760 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:823:mp3_type_frame_length_from_header: mp3typefind: calculated mp3 frame length of 384 bytes 0:00:00.532162348 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:826:mp3_type_frame_length_from_header: mp3typefind: samplerate = 48000 - bitrate = 128 - layer = 3 - version = 3 - channels = 2 0:00:00.532210600 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:948:mp3_type_find_at_offset: found 2. header at offset 428 (0x1AC) 0:00:00.532260128 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:823:mp3_type_frame_length_from_header: mp3typefind: calculated mp3 frame length of 384 bytes 0:00:00.532307751 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:826:mp3_type_frame_length_from_header: mp3typefind: samplerate = 48000 - bitrate = 128 - layer = 3 - version = 3 - channels = 2 0:00:00.532357090 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:948:mp3_type_find_at_offset: found 3. header at offset 812 (0x32C) 0:00:00.532405318 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:823:mp3_type_frame_length_from_header: mp3typefind: calculated mp3 frame length of 384 bytes 0:00:00.532453819 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:826:mp3_type_frame_length_from_header: mp3typefind: samplerate = 48000 - bitrate = 128 - layer = 3 - version = 3 - channels = 2 0:00:00.532504086 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:948:mp3_type_find_at_offset: found 4. header at offset 1196 (0x4AC) 0:00:00.532552922 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:823:mp3_type_frame_length_from_header: mp3typefind: calculated mp3 frame length of 384 bytes 0:00:00.532601498 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:826:mp3_type_frame_length_from_header: mp3typefind: samplerate = 48000 - bitrate = 128 - layer = 3 - version = 3 - channels = 2 0:00:00.532650172 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:948:mp3_type_find_at_offset: found 5. header at offset 1580 (0x62C) 0:00:00.532699077 26964 0x6070b0 INFO typefindfunctions gsttypefindfunctions.c:976:mp3_type_find_at_offset: audio/mpeg calculated 99 = 100 * 5 / 5 * (10000 - 44) / 10000 0:00:00.532778219 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-amr-nb-sh with the first 5 bytes of data 0:00:00.532790032 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-amr-wb-sh with the first 7 bytes of data 0:00:00.532816889 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-imelody with the first 13 bytes of data 0:00:00.532851328 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/gif with the first 4 bytes of data 0:00:00.533992586 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:1830:mpeg4_video_type_find: Found 6 pictures, vios: 1, vos:1, vol:0 0:00:00.534042177 26964 0x6070b0 DEBUG typefindfunctions gsttypefindfunctions.c:1915:h264_video_type_find: good 0 bad 1 0:00:00.534064363 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type video/x-vcd with the first 12 bytes of data 0:00:00.534161801 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/msword with the first 8 bytes of data 0:00:00.534173216 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/octet-stream with the first 8 bytes of data 0:00:00.534184298 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/pdf with the first 5 bytes of data 0:00:00.534228502 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/vnd.rn-realmedia with the first 4 bytes of data 0:00:00.534249202 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-bzip with the first 3 bytes of data 0:00:00.534260800 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-compress with the first 2 bytes of data 0:00:00.534271945 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-gzip with the first 2 bytes of data 0:00:00.534289010 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-pn-realaudio with the first 4 bytes of data 0:00:00.534301146 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-rar with the first 4 bytes of data 0:00:00.534318894 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/zip with the first 4 bytes of data 0:00:00.534334633 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-ay with the first 8 bytes of data 0:00:00.534346171 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-gbs with the first 4 bytes of data 0:00:00.555550879 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-gym with the first 4 bytes of data 0:00:00.555624659 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-kss with the first 5 bytes of data 0:00:00.555683829 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-nist with the first 4 bytes of data 0:00:00.555737375 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-nsf with the first 5 bytes of data 0:00:00.555793556 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-sap with the first 12 bytes of data 0:00:00.555870600 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-spc with the first 27 bytes of data 0:00:00.555887410 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-vgm with the first 4 bytes of data 0:00:00.555897627 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-voc with the first 8 bytes of data 0:00:00.555907697 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-w64 with the first 4 bytes of data 0:00:00.555965023 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/vnd.adobe.photoshop with the first 10 bytes of data 0:00:00.555979531 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/x-jng with the first 8 bytes of data 0:00:00.556014769 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/x-sun-raster with the first 4 bytes of data 0:00:00.556029046 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/x-xcf with the first 8 bytes of data 0:00:00.556039218 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type image/x-xpixmap with the first 9 bytes of data 0:00:00.556084970 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type video/x-flv with the first 3 bytes of data 0:00:00.556096720 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type video/x-mng with the first 8 bytes of data 0:00:00.556107312 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type video/x-ms-asf with the first 16 bytes of data 0:00:00.556117421 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type video/x-mve with the first 26 bytes of data 0:00:00.556130201 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type application/x-executable with the first 4 bytes of data 0:00:00.556145631 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3447:start_with_type_find: trying to find mime type audio/x-sid with the first 4 bytes of data 0:00:00.562666196 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:2014:mpeg_video_stream_type_find: Found 0 pictures, seq:1, gop:0 0:00:00.562810284 26964 0x6070b0 DEBUG typefindfunctions gsttypefindfunctions.c:3403:xdgmime_typefind: Got mimetype 'video/mp4' 0:00:00.562819372 26964 0x6070b0 LOG typefindfunctions gsttypefindfunctions.c:3415:xdgmime_typefind: Ignoring audio/video mime type 0:00:00.562957664 26964 0x6070b0 INFO typefind gsttypefindelement.c:167:gst_type_find_element_have_type:<typefindelement0> found caps audio/mpeg, mpegversion=(int)1, layer=(int)3, probability=99 /GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, layer=(int)3 Pipeline is PREROLLING ...
Is this a regression in latest GIT or is it the same with last releases?
Could you put a hexdump of the first 128bytes or so (like the first 10 lines of hexdump -C) ?
Could you next time please attach debug log output instead of dumping it into the message field? :) Please do: $ head --bytes=999k foo.mp4 > head-foo.mp4 and attach that (assuming gst-typefind head-foo.mp4 shows the same problem).
Created attachment 152108 [details] head of the file Its not a regression. I had the same problem with 0.10.24. Attaching the first megabyte of the file.
This detects it correctly now but that first MB can't be played. Maybe something needs to be fixed in qtdemux too or 1MB wasn't enough to play this file :) Please test and file a new bug if it doesn't work commit 1ae783dafc90c554961d819aedf91baa9d207d87 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Sun Jan 24 20:46:58 2010 +0100 typefindfunctions: Add typefinder for ISO MP4 files Fixes bug #607848.
I dont have the file with me.. but over ssh, it seems to play fine in playbin2 with the new patch.
Cool, thanks for confirming. Still, a bit worrying that it failed before, you'd think there'd be some lower-probability typefind code path that works for unexpected ftyps..