22/03/2009

iPod Classic: not again the composer tag!

GTKpod screenshot
I use to organise my largely classical mp3 library via Amarok: stored in a composer->album directory tree, sorted by composer tag, album art selected by the Amarok Cover Manager. Some folders contain old .m3u playlists.
Results of dumping the whole shebang onto my iPod via gtkpod:
  • Albums accessed by the Composer, Album etc. menus are played alphabetically by their title tags and not by track number (imagine a mass starting with the Agnus Dei).
  • Lots of albums apparently contain double entries.
  • Similarly named albums by different composers are merged (e.g. Faure's and Verdi's Requiems)
  • When I access an album from the cover flow, track numbers are kept. Still, albums are organised by artist, so I have to remember who conducted that damn piano concerto, and whether I didn't put the soloist up front after all.
  • Hardly any covers are transferred (they are mostly in the ~/.kde/share/apps/amarok/albumcovers folder, after all).
So I decided to tweak a copy of my library into iPod compliance with a few scripts and tools.
  1. Export all album art to the mp3 directory. I used the export-amarok-covers python script for that. Note that you have to get python-setuptools (available from packman) to use easy_install.
  2. Remove .m3u playlists. File paths are likely to contain blank spaces, so I did it with
    find . -name '*.m3u' -print0 | xargs -0 rm
    from the mp3 root directory.
  3. Find a nice id3 python lib. python-id3 only supports id3v1; eyeD3 can't edit composer tags. python-mutagen (also available from packman) is documented more or less OK and does what I want.
  4. Tweak the id3 tags: Move the composer tag to artist and include composer and track number in the title tag. Cf. the python script.
  5. For any tag issues not sorted out, get a good editor. mp3tag is self-explanatory and runs great on Wine (not v2.42 though, get 2.39).
  6. Get GTKpod to transfer the album art. Edit->Preferences->Metadata/Track info-> Add cover art using file name template. Set the template to cover.png. I have different versions of GTKpod and one keeps forgetting about the template, so check it before synchronising.
  7. Synchronise and enjoy.


PS: Apparently there is some encoding problem with id3 tags written on a linux machine, e.g. by the python script or amaRoK when you transfer them onto a regular player like my Sansa Clip. Tags are read falsely or not at all which results in jumbled playing orders and no album groupings.
A workaround would be to install mp3tag with wine and let it batch re-encode them.

1 comment:

avocadohead said...

Still tweaking the script a bit ... there will certainly be updates