GNOME Bugzilla – Bug 315550
[typefinding] wrongly identifies non-music files as music files
Last modified: 2005-10-09 18:43:22 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"
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
anyone know how rhythmbox looks if a file is a music file or not?
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" ?
"caps = audio/mpeg, mpegversion=(int)1, layer=(int)1"
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..
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