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 715050 - add typefinder for audio/x-audible
add typefinder for audio/x-audible
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal minor
: 1.4.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-23 01:52 UTC by Jonathan Matthew
Modified: 2014-12-12 15:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple audio/audible typefinder (1.71 KB, patch)
2013-11-23 01:52 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2013-11-23 01:52:02 UTC
Rhythmbox users report that audiobook files from audible.com, which are in a proprietary undocumented DRM format, are detected as 'video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, parsed=(boolean)false', after which mpegvideoparse spins trying to decode parts of the file.  GstDiscoverer usually times out after 10 seconds or so of this.

I found this project: http://code.google.com/p/pyaudibletags/ which gives some details on the file header, so I wrote a simple typefinder based on bytes 4-7 which are apparently a format identifier.  I'm not sure how much more we could do.  The first four bytes are apparently supposed to match the file size, so it could possibly check that as well.
Comment 1 Jonathan Matthew 2013-11-23 01:52:59 UTC
Created attachment 261281 [details] [review]
simple audio/audible typefinder
Comment 2 Tim-Philipp Müller 2013-11-23 15:04:50 UTC
Would be great if you could point us to a sample file (or better two) as well.

The media type should probably be audio/x-audible, and maybe we should add a flavor or version field as well.
Comment 3 Sebastian Dröge (slomo) 2013-11-25 10:24:33 UTC
Could also use the STARTS_WITH typefinder registration macro.

Could you provide a sample file that is detected as MP3 so we can also fix the MP3 typefinder?
Comment 4 Jonathan Matthew 2013-11-25 10:37:07 UTC
(In reply to comment #2)
> Would be great if you could point us to a sample file (or better two) as well.

I don't have any myself, but I should be able to get some off friends.
 
> The media type should probably be audio/x-audible, and maybe we should add a
> flavor or version field as well.

I misread something that I thought suggested audio/audible was a registered type. audio/x-audible sounds reasonable.

(In reply to comment #3)
> Could also use the STARTS_WITH typefinder registration macro.

I don't think so - the first 4 bytes are the file size, it's only the second 4 bytes that identify the format.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2014-02-01 21:20:57 UTC
Jonathan, could you get a file. Having the first 1000 bytes would probably be good already.
Comment 6 Tim-Philipp Müller 2014-11-25 09:11:27 UTC
Found a sample at http://samples.mplayerhq.hu/audible/ (and one that we don't recognise):

commit ddda5866c5d2e903234808f7f98b1af51f33b9b6
Author: Jonathan Matthew <jonathan@d14n.org>
Date:   Sat Nov 23 11:36:43 2013 +1000

    typefindfunctions: add audio/audible typefinder
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715050

commit ef23ac5f52c82cc73ebb3d043aa4b0bf313aff15
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Tue Nov 25 01:02:28 2014 +0000

    typefind: improve 'audible' audio typefinder a little
    
    Don't return NEARLY_CERTAIN just based on 4 bytes.
    Also change media type to audio/x-audible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=715050

commit 2c649370ce4cfe134a7dc56f7aa35b55dc304eac
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Tue Nov 25 09:08:18 2014 +0000

    pbutils: add description for audio/x-audible
Comment 7 Tim-Philipp Müller 2014-12-12 15:59:23 UTC
Picked into 1.4 (useful to avoid false-positives).