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 315550 - [typefinding] wrongly identifies non-music files as music files
[typefinding] wrongly identifies non-music files as music files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.x
Other Linux
: Normal normal
: 0.8.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-08 15:47 UTC by Sebastien Bacher
Modified: 2005-10-09 18:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Sebastien Bacher 2005-09-08 15:47:15 UTC
This bug has been opened here: https://bugzilla.ubuntu.com/show_bug.cgi?id=14913

"In Breezy, when I choose Library->Import Folder and choose a folder (~/tmp) I
get a lot of non-music files added (*.dll,*.a).

https://bugzilla.ubuntu.com/attachment.cgi?id=3601
Screenshot of added folder"
Comment 1 Sebastien Bacher 2005-09-08 15:49:10 UTC
That happens with libgnomevfs-2.a from gnomevfs 2.12.0 by example.

$ gst-typefind-0.8 libgnomevfs-2.a
libgnomevfs-2.a - audio/mpeg, mpegversion=(int)1, layer=(int)1

gstreamer0.8 and gst-plugins0.8 versions are 0.8.11
Comment 2 Luca Ognibene 2005-09-17 13:51:07 UTC
anyone know how rhythmbox looks if a file is a music file or not? 
Comment 3 Luca Ognibene 2005-09-18 09:27:11 UTC
It seems the same as #310060 but for different type of files..
Does gst-launch-0.8 filesrc location="filename" ! typefind ! fakesink finds the
files as audio/something ? Look at the typefindsrc.caps in the output. And "file
filename" ?
Comment 4 Sebastien Bacher 2005-09-18 19:35:49 UTC
"caps = audio/mpeg, mpegversion=(int)1, layer=(int)1"
Comment 5 Luca Ognibene 2005-09-20 18:37:22 UTC
What "file filename" reports? iirc typefind use an algorithm similar to that of
file.. 

To be sure that gstreamer can play something of a file a program can do a
pipeline like:
"source ! typefind ! decodebin or spider ! fakesink" 
then put a probe on the sink of fakesink and see if the callback is called
before EOS.. it should work but maybe it's slower..
Comment 6 Tim-Philipp Müller 2005-10-09 18:43:22 UTC
Part of this is a GStreamer bug, but part of this is also clearly a rhythmbox
bug though (IMHO).

Why does rhythmbox import files it can't get a length for (where the time column
says 'Unknown')? That doesn't really seem right to me. It should probably also
just skip all files that have a length smaller than 2 or 3 seconds, just to weed
out some more files that are most likely false positives.


I've now added typefinding for DLLs/.a files and some more archive formats, that
should at least skip some of the files in the screenshot:

2005-10-09  Tim-Philipp Muller  <tim at centricular dot net>

        * gst/typefind/gsttypefindfunctions.c: (tar_type_find),
        (ar_type_find), (msdos_type_find), (plugin_init):
          Add typefind functions for tar archives, ar archives,
          RAR archives, and ms-dos executables (dlls, exe, etc.).
          Some of these would wrongly be identified as mpeg
          streams of some sort before (#315550).


You might want to file a bug for rhythmbox to improve their importer if they
haven't done that yet.

 Cheers
  -Tim