Album Art Mover & Album Art Embedder

This article will introduce AAM and AAE Bash scripts and outline the proper procedures for their use.

What is Album Art Mover? #Top

Album Art Mover is a Bash script that provides a quick way to convert album art images into different formats in bulk while copying them between different directory trees.

What is Album Art Embedder? #Top

Album Art Embedder is a Bash script that provides a quick way to embed album art images in mp3 files.

The Problem #Top

I currently have 24,327 music files in my collection, with 5,794 of those files in the FLAC format and 18,533 files in MP3. To play the music on my various portable devices, the FLAC files need to be converted to MP3 mostly to save space, but also because some devices do not support the format.

foobar2000 handles this task amazingly well.

However, after conversion, none of the files have their associated album art in the album directory. This is the problem.

Music Organization

My music files are organized as follows:
/music/mp3/<artist>/<album> (<year>)/<tracknumber> - <tracktitle>
/music/mp3/The Cardigans/Grand Turismo (1998)/06 - Higher.mp3
/music/mp3/The Cardigans/Grand Turismo (1998)/folder.jpg
/music/FLAC/<artist>/<album> (<year>)/<tracknumber> - <tracktitle>
/music/FLAC/Sheryl Crow/The Globe Sessions (1998)/01 - My Favorite Mistake.flac
/music/FLAC/Sheryl Crow/The Globe Sessions (1998)/folder.jpg
For albums with multiple discs:
/music/FLAC/<artist>/<album> (<year>)/Disc <DISCNUM>/<tracknumber> - <tracktitle>
/music/FLAC/Taylor Swift/Speak Now (2010-10-25)/Disc One/04 - Speak Now.flac
/music/FLAC/Taylor Swift/Speak Now (2010-10-25)/Disc One/folder.jpg
For albums with multiple artists:
/music/FLAC/<album> (<year>)/Disc <DISCNUM>/<tracknumber> - <artist> - <tracktitle>
/music/FLAC/Kong in Concert (2004)/Disc 1/01 - Israfel - Godiva in the Desert (Theme).flac
/music/FLAC/Kong in Concert (2004)/Disc 1/folder.jpg

With album art being in the same folder as the music file with a name of "folder.jpg". Having a filename of "folder.jpg" allows Windows to show the album art from explorer, and foobar2000 and can be configured to show the art with that name as well.

Portable Devices

My devices, include a iAudio XL5 running Rockbox with 64GB CF card, a windows laptop with a 120GB SSD running foobar2000, and a Samsung Galaxy S4 with 32GB SD card using the default android "Music" application. Neither Rockbox nor "Music" recognize a file called "folder.jpg" as album art. Instead Rockbox requires that the album art either be renamed to "cover.jpg", or be embedded in the mp3 file itself. On Android, the "Music" application will only read embedded album art. Windows/foobar2000 requires the album art to be called "folder.jpg"

As my devices all vary in storage size, in format support, and in how album art is supported, when I do the conversion from FLAC to MP3 using foobar2000 I also have foobar2000 change the directory layout a little bit

Music Organization on Portable Devices

Once all FLACs are converted to MP3 and once all the MP3s I want are copied over the final directory structure ends up like this:

/Rating <rating>/<artist>/<album> (<year>)/<tracknumber> - <tracktitle>
/Rating 4/The Cardigans/Grand Turismo (1998)/01 - Paralyzed.mp3

*<rating> is assigned by me on a per-song basis ranges from 1 to 5, stored in the files' ID3 tag.

The Solutions #Top

I wanted to avoid embedding the album art directly into the MP3 files as it is a huge waste of storage space to duplicate image data for each and every song from the same album. But in the end it was the only way to get the Android "Music" application to see the album art, and since Rockbox also supports reading embedded album art, it seems like the best solution.

I still need to keep a copy of the album art in the base directory of each album for Windows to be able to see it on my laptop.

Copying Album Art

The script "Album Art Mover and Converter - With unicode" (long but descriptive filename) was written to take a "best guess" at the correct location to grab the album art from the source file server and copy the album art to the portable device's file structure

Embedding Album Art

"" was written to be run after the Album Art Mover, and will embed any image file called "folder.*" into each mp3 file in the same directory.


The package can be downloaded here. At the moment this package is a bit of mess and this page is mostly for my own reference. My hope is someone else will find the groundwork I've laid here to be useful.

  ./Album Art Mover and Converter - With unicode <Album Art Source> <Album Art Destination>
   ./Album Art Mover and Converter - With unicode /music/ /portableDevice/
  ./ <Album Art Destination>
   ./ /portableDevice/

Known Issues #Top

Album Art Mover will not always copy over the correct album art image if two different artists release discs with the same title. This is due to the logic used in detecting folder names, and it's a small enough issue in my collection that I haven't put the time into fixing it. (patches welcome).

TO DO #Top

Copyright © 2013 Matthew Headlee

Album Art Mover & Album Art Embedder are free software: you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Album Art Mover & Album Art Embedder are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Questions or Feedback? #Top

Contact me