The Music Library Management blog has moved!

Please visit:
http://www.blisshq.com/music-library-management-blog/
and update your bookmarks.

Showing posts with label automatic. Show all posts
Showing posts with label automatic. Show all posts

Monday, 17 May 2010

Easy FLAC to MP3 mirroring with mp3fs

Storing music in FLAC format is an excellent choice. It's higher quality than MP3 and, importantly, is 'lossless' which means you can always convert it to another format. Not all players support it though, so sometimes you need to have your same music in a different format. How do you accomplish this while not wasting time or storage space? mp3fs is a fully automatic and storage efficient way of keeping a copy of your FLAC library in MP3 format.

What are the other options for converting from FLAC to MP3? First, it can be done manually on a file by file or bulk basis. Some converters (or 'transcoders') work with a GUI while some work on the command line. Examples of both are dBpoweramp Music Converter and flac2mp3.

There are two problems with the manual approaches:
  1. They have to be run each time your music library changes, because they are manual. This can be mitigated by running the job periodically
  2. They use more storage space, because a separate copy of your FLACs in MP3 format are kept
Instead, on my Linux home server, I use mp3fs. mp3fs represents your FLAC folders as MP3 folders. You simply point mp3fs at your FLAC directory and tell it where the resulting MP3 files should end up. No MP3 files are created as such, it just looks like they are.

First decide where you want your mp3s to be stored. Let's say you want them stored in /mnt/music/mp3. This should be an empty directory. Now, choose your FLAC directory. Let's say this is /mnt/music/flac:

gravelld@gravelld-laptop:~$ ls /mnt/music/flac
Alison_Balsom Mint Royale Oasis Suede Various
Louis_Armstrong Nelly_Furtado Pendulum The_Chemical_Brothers

Meanwhile:

gravelld@gravelld-laptop:~$ ls /mnt/music/mp3
gravelld@gravelld-laptop:~$

Nothing in there yet! So, let's weave some mp3fs magic:

sudo mp3fs /mnt/music/flac,192 /mnt/music/mp3

Now:

gravelld@gravelld-laptop:~$ ls /mnt/music/mp3
Alison_Balsom Mint Royale Oasis Suede Various
Louis_Armstrong Nelly_Furtado Pendulum The_Chemical_Brothers

And interestingly:

gravelld@gravelld-laptop:~$ sudo ls /mnt/music/mp3/Oasis/Definitely\ Maybe
01-Rock 'N' Roll Star.mp3 07-Bring It On Down.mp3
02-Shakermaker.mp3 08-Cigarettes & Alcohol.mp3
03-Live Forever.mp3 09-Digsy's Dinner.mp3
04-Up In The Sky.mp3 10-Slide Away.mp3
05-Columbia.mp3 11-Married With Children.mp3
06-Supersonic.mp3 cover.jpg

These are FLAC files stored in the FLAC directory, but now they appear to be MP3 files too. The important bit here is that these MP3 files are not actually stored on the hard disk. Rather, each time you access the MP3 directory or files therein, mp3fs mimics the directory structure or creates the MP3s on-the-fly. This means:
  1. You don't need to tell mp3fs when the music library has changed
  2. There's no extra storage space required to store your MP3 mirror of your FLAC files
Some people say "storage is cheap". I agree, but your time isn't. Storing two separate trees of music is duplication and therefore imposes a management cost. It's not just adding music either, it's deleting it and modifying it too that would, with a manual solution, require a rebuild of your MP3s.

That is how I mirror my FLACs to MP3s on my Linux home server, and I haven't had to think about it again since.

Monday, 26 April 2010

Bulk resizing album art

Size matters. Some MP3 players don't show album art if it's too large. Some music lovers don't want album art that is too small.

If you have a large music collection, resizing album art can be a pain. You may have hundreds or thousands of albums for which the album art must be resized. Resizing all of those images is bad enough, but if the art is embedded in your music files you also need to extract the art from each track, resize it and then re-embed it. This is a tedious, time consuming task.

Resizing album art with bliss is simple. bliss is rule based, so with the album art rule you specify the constraints your album art should obey. Let's try an example where we shrink art to be no bigger than 300x300 pixels.

The bliss UI shows that our collection's art is currently compliant:
Here I've exposed the '(why?)' link for each of the top albums, to show the current size of my album art.

Now I set a rule that art should be no larger than 300x300 pixels. (bliss adds 10%, by the way, to make sure slightly larger art is not ignored when searching for alternative art).
We click 'Apply rule' to... apply the rule. bliss starts working through my music collection, resizing art that is over 300x300 pixels in size. Once complete, all art is reported as compliant:
Bulk resizing of album art with bliss is easy. Just set the size constraints and you're done. Changed your mind? Change the setting again, one click is all it takes. This is the power of rule based music management.