GNOME Bugzilla – Bug 715050
add typefinder for audio/x-audible
Last modified: 2014-12-12 15:59:23 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.
Created attachment 261281 [details] [review] simple audio/audible typefinder
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.
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?
(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.
Jonathan, could you get a file. Having the first 1000 bytes would probably be good already.
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
Picked into 1.4 (useful to avoid false-positives).