GNOME Bugzilla – Bug 162656
[qtdemux] extracting more metadata from AAC/M4A
Last modified: 2005-01-05 14:57:29 UTC
Hello, Colin (or appropriate Colin stand-in :))! I'm running into a weird display bug with the main library display for rhythmbox. I've only seen it for AAC/M4A-encoded files. This is reproducible every time for me; I'm using Rhythmbox 0.8.8 and gst-plugins 0.8.6 (which includes the faad plugin.) 1. Get an AAC or M4A file with track info (and other info if you like). 2. Add it to Rhythmbox's library. 3. See the lack of track number in the library display. 4. If you got the AAC or M4A off an iPod, even better, because in the iPod library you can see the track number, but in the main library you can't. This is what made me think that this is a Rhythmbox bug, rather than a gst bug. This bug occurs even though the version of FAAD that gst was compiled with on my machine supports track numbers: valinor% faad -i Music/Soundtracks/Hellboy\ \(Extended\)/01\ -\ Oct.\ 7th,\ 1944.m4a *********** Ahead Software MPEG-4 AAC Decoder V2.0 ****************** Build: Dec 24 2004 Copyright 2002-2004: Ahead Software AG http://www.audiocoding.com Floating point version This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ************************************************************************** Music/Soundtracks/Hellboy (Extended)/01 - Oct. 7th, 1944.m4a file info: LC AAC 79.196 secs, 2 ch, 44100 Hz title: Oct. 7th, 1944 writer: Marco Beltrami album: Hellboy (Extended) genre: Soundtrack track: 1 totaltracks: 22 date: 2004 compilation: tempo: 00000 BPM tool: iTunes v4.7, QuickTime 6.5.2 iTunNORM: 0000033E 000002C5 00002926 00002A67 0000F9C4 0000F90C 00008000 00008000 0000EEA0 0000F79C iTunes_CDDB_1: 440C6516+238186+22+150+6093+12953+18236+29198+44543+61319+72578+79792+85433+100646+113245+122389+131893+146531+158889+174387+181117+184463+200456+212186+224802 iTunes_CDDB_TrackNumber: 1 Let me know if I can provide any more information! Happy New Year, -- Ava
This is a gstreamer bug, the ipod source gets its metadata from the ipod database, not from the m4a files.
I'd be happy to solve this. Can you please attach a file so that I'm sure that the file I'm testing with has a track number in its metadata? If you feel unsure because of copyright reasons, feel free to contact me privately.
Hello Ronald, I have sent you email at bitfreak.net with my smallest .m4a file. It's about 716K. Let me know if this was too large and I'll see about getting web space set up. -- Ava
Thanks for the file, it worked fine. This is the tags we currently support: titel: Mechanical Mausoleum album: Hellboy (Extended) In the file, I see: 000021D0 77 75 64 74 61 00 00 09 6F 6D 65 74 61 00 00 00 wudta...ometa... 000021E0 00 00 00 00 22 68 64 6C 72 00 00 00 00 00 00 00 ...."hdlr....... 000021F0 00 6D 64 69 72 61 70 70 6C 00 00 00 00 00 00 00 .mdirappl....... 00002200 00 00 00 00 00 03 28 69 6C 73 74 00 00 00 2C A9 ......(ilst...,. 00002210 6E 61 6D 00 00 00 24 64 61 74 61 00 00 00 01 00 nam...$data..... 00002220 00 00 00 4D 65 63 68 61 6E 69 63 61 6C 20 4D 61 ...Mechanical Ma 00002230 75 73 6F 6C 65 75 6D 00 00 00 26 A9 77 72 74 00 usoleum...&.wrt. 00002240 00 00 1E 64 61 74 61 00 00 00 01 00 00 00 00 4D ...data........M 00002250 61 72 63 6F 20 42 65 6C 74 72 61 6D 69 00 00 00 arco Beltrami... 00002260 2A A9 61 6C 62 00 00 00 22 64 61 74 61 00 00 00 *.alb..."data... 00002270 01 00 00 00 00 48 65 6C 6C 62 6F 79 20 28 45 78 .....Hellboy (Ex 00002280 74 65 6E 64 65 64 29 00 00 00 1A 67 6E 72 65 00 tended)....gnre. 00002290 00 00 12 64 61 74 61 00 00 00 00 00 00 00 00 00 ...data......... 000022A0 19 00 00 00 20 74 72 6B 6E 00 00 00 18 64 61 74 .... trkn....dat 000022B0 61 00 00 00 00 00 00 00 00 00 00 00 12 00 16 00 a............... 000022C0 00 00 00 00 1C A9 64 61 79 00 00 00 14 64 61 74 ......day....dat 000022D0 61 00 00 00 01 00 00 00 00 32 30 30 34 00 00 00 a........2004... 000022E0 19 63 70 69 6C 00 00 00 11 64 61 74 61 00 00 00 .cpil....data... 000022F0 15 00 00 00 00 00 00 00 00 1A 74 6D 70 6F 00 00 ..........tmpo.. 00002300 00 12 64 61 74 61 00 00 00 15 00 00 00 00 00 00 ..data.......... 00002310 00 00 00 34 A9 74 6F 6F 00 00 00 2C 64 61 74 61 ...4.too...,data 00002320 00 00 00 01 00 00 00 00 69 54 75 6E 65 73 20 76 ........iTunes v 00002330 34 2E 37 2C 20 51 75 69 63 6B 54 69 6D 65 20 36 4.7, QuickTime 6 00002340 2E 35 2E 32 00 00 00 A2 2D 2D 2D 2D 00 00 00 1C .5.2....----.... 00002350 6D 65 61 6E 00 00 00 00 63 6F 6D 2E 61 70 70 6C mean....com.appl 00002360 65 2E 69 54 75 6E 65 73 00 00 00 14 6E 61 6D 65 e.iTunes....name 00002370 00 00 00 00 69 54 75 6E 4E 4F 52 4D 00 00 00 6A ....iTunNORM...j 00002380 64 61 74 61 00 00 00 01 00 00 00 00 20 30 30 30 data........ 000 00002390 30 30 43 44 41 20 30 30 30 30 30 38 46 46 20 30 00CDA 000008FF 0 000023A0 30 30 30 33 43 30 41 20 30 30 30 30 32 34 46 43 0003C0A 000024FC 000023B0 20 30 30 30 30 38 44 30 45 20 30 30 30 30 34 41 00008D0E 00004A 000023C0 44 37 20 30 30 30 30 38 30 30 30 20 30 30 30 30 D7 00008000 0000 000023D0 37 46 39 41 20 30 30 30 30 31 35 41 37 20 30 30 7F9A 000015A7 00 000023E0 30 30 30 45 44 33 00 00 00 EC 2D 2D 2D 2D 00 00 000ED3....----.. 000023F0 00 1C 6D 65 61 6E 00 00 00 00 63 6F 6D 2E 61 70 ..mean....com.ap 00002400 70 6C 65 2E 69 54 75 6E 65 73 00 00 00 19 6E 61 ple.iTunes....na 00002410 6D 65 00 00 00 00 69 54 75 6E 65 73 5F 43 44 44 me....iTunes_CDD 00002420 42 5F 31 00 00 00 AF 64 61 74 61 00 00 00 01 00 B_1....data..... 00002430 00 00 00 34 34 30 43 36 35 31 36 2B 32 33 38 31 ...440C6516+2381 00002440 38 36 2B 32 32 2B 31 35 30 2B 36 30 39 33 2B 31 86+22+150+6093+1 00002450 32 39 35 33 2B 31 38 32 33 36 2B 32 39 31 39 38 2953+18236+29198 00002460 2B 34 34 35 34 33 2B 36 31 33 31 39 2B 37 32 35 +44543+61319+725 00002470 37 38 2B 37 39 37 39 32 2B 38 35 34 33 33 2B 31 78+79792+85433+1 00002480 30 30 36 34 36 2B 31 31 33 32 34 35 2B 31 32 32 00646+113245+122 00002490 33 38 39 2B 31 33 31 38 39 33 2B 31 34 36 35 33 389+131893+14653 000024A0 31 2B 31 35 38 38 38 39 2B 31 37 34 33 38 37 2B 1+158889+174387+ 000024B0 31 38 31 31 31 37 2B 31 38 34 34 36 33 2B 32 30 181117+184463+20 000024C0 30 34 35 36 2B 32 31 32 31 38 36 2B 32 32 34 38 0456+212186+2248 000024D0 30 32 00 00 00 59 2D 2D 2D 2D 00 00 00 1C 6D 65 02...Y----....me 000024E0 61 6E 00 00 00 00 63 6F 6D 2E 61 70 70 6C 65 2E an....com.apple. 000024F0 69 54 75 6E 65 73 00 00 00 23 6E 61 6D 65 00 00 iTunes...#name.. 00002500 00 00 69 54 75 6E 65 73 5F 43 44 44 42 5F 54 72 ..iTunes_CDDB_Tr 00002510 61 63 6B 4E 75 6D 62 65 72 00 00 00 12 64 61 74 ackNumber....dat 00002520 61 00 00 00 01 00 00 00 00 31 38 00 00 06 19 66 a........18....f The current code is fairly simplistic (see qtdemux_parse_udta()), we parse nam (song name), art (song artist) and alb (album). Given the above, we could add wrt (artist/writer), trkn (track number - it seems that it consists of two integers, where the first is song number and the second is number of songs on the album), gnre (genre, index no., probably similar to ID3), and day (production date or so - should read the specs on that). The other tags appear to be index numbers for iTunes, we shouldn't care too much about those, I guess.
Neat! I took a look at some of my other .m4a files using hexedit (in particular, I was looking for disk number data). This is for something I've demarked as "Into the West", which is supposed to be disk 3 of the Lord of the Rings album (at least, that's how I tagged it). It looks like you can also grab the disk number (disk) and the group name (grp, and which I've never determined what really meant, as you already have the artist around...) 00007A10 00 24 A9 77 72 74 00 00 00 1C 64 61 74 61 00 00 .$.wrt....data.. 00007A20 00 01 00 00 00 00 48 6F 77 61 72 64 20 53 68 6F ......Howard Sho 00007A30 72 65 00 00 00 2D A9 61 6C 62 00 00 00 25 64 61 re...-.alb...%da 00007A40 74 61 00 00 00 01 00 00 00 00 54 68 65 20 4C 6F ta........The Lo 00007A50 72 64 20 6F 66 20 74 68 65 20 52 69 6E 67 73 00 rd of the Rings. 00007A60 00 00 1A 67 6E 72 65 00 00 00 12 64 61 74 61 00 ...gnre....data. 00007A70 00 00 00 00 00 00 00 00 19 00 00 00 20 74 72 6B ............ trk 00007A80 6E 00 00 00 18 64 61 74 61 00 00 00 00 00 00 00 n....data....... 00007A90 00 00 00 00 02 00 13 00 00 00 00 00 1E 64 69 73 .............dis 00007AA0 6B 00 00 00 16 64 61 74 61 00 00 00 00 00 00 00 k....data....... 00007AB0 00 00 00 00 02 00 03 00 00 00 1C A9 64 61 79 00 ............day. 00007AC0 00 00 14 64 61 74 61 00 00 00 01 00 00 00 00 32 ...data........2 00007AD0 30 30 32 00 00 00 19 63 70 69 6C 00 00 00 11 64 002....cpil....d 00007AE0 61 74 61 00 00 00 15 00 00 00 00 00 00 00 00 1A ata............. 00007AF0 74 6D 70 6F 00 00 00 12 64 61 74 61 00 00 00 15 tmpo....data.... 00007B00 00 00 00 00 00 00 00 00 00 32 A9 74 6F 6F 00 00 .........2.too.. 00007B10 00 2A 64 61 74 61 00 00 00 01 00 00 00 00 69 54 .*data........iT -- Ava
All added. Current state: FOUND TAG : found by element "qtdemux0". title: Mechanical Mausoleum artist: Marco Beltrami album: Hellboy (Extended) track number: 18 track count: 22 genre: Soundtrack