How do I prepare my music for syncing with a cloud service?
Testing with Google Music, I realized that it's all about the ID3 tag. Whatever you put there, Google uses it. it doesn't matter what the name of your files are, it's all about the ID3. Even if you have songs where the Artist and Album Artist are different, Google will display both correctly without any confusion. I suggest that you organize your music exactly the way you want it. It seems that Google is following the ID3 standard pretty good, so as long as you also follow that standard your fine.
I also have a similar structure and I'm pretty obsessed on how my music should be organized, not only file names, but also the metadata.
I use two programs to achieve this: for a few changes to a few files, use kid3-qt. It doesn't have any dependencies on kde and it's the best ID3 tag software in Ubuntu. You have many options to tag your data from the file name or vice-versa. You can see all the ID3 tags (because software as easytag hide the ones they don't know). You can even select the version of ID3 and text encoding, so you're whole collection is standard. I used ID3v2.4 with UTF8. You can install kid3-qt here: http://apt.ubuntu.com/p/kid3-qt
For your case, I recommend using a script and use eyeD3 for it. It uses python and has amazing capabilities, and can access almost any tag in ID3. You can use eyeD3 directly from the command-line but I find it more powerful when you create a script with python. You can install eyeD3 by clicking here: http://apt.ubuntu.com/p/eyed3
The webpage has sample python scripts on how to use it in a script. I'm posting an example script that puts all the artist, album, track# and title in the ID3 following the format of your music directory. It saves the tag in ID3v2.4 with UTF8 encoding You should run the script in your root music folder (/shared/music/).
#! /usr/bin/python
import fnmatch
import os
import eyeD3
audiofile = eyeD3.Tag()
for root, dirnames, filenames in os.walk('.'):
# Linking of ID3 tags and fixing Images
for file in fnmatch.filter(filenames, '*.mp3'):
# Splits the directory name
dirSplit = root.split('/')
fileSplit = file.split(' ',1)
# Linking of tags
audiofile.link(root + "/" + file, eyeD3.ID3_V2)
audiofile.setTextEncoding(eyeD3.UTF_8_ENCODING)
print fileSplit[0]
# Setting the Artist, album, number and title
audiofile.setArtist(dirSplit[1])
audiofile.setAlbum(dirSplit[2])
audiofile.setTrackNum([fileSplit[0]])
audiofile.setTitle(fileSplit[1])
audiofile.do_tdtg = 0 # set to not use the TDTG frame
audiofile.update(eyeD3.ID3_V2_4,0)
You can use this script as a starting point and maybe read the full filename and directory and use it to tag each one of your file exactly the way you want. If you're not as obsessive as I am with metadata, kid3-qt with the option to set the metadata as the file structure (and you can set the structure exactly how you want it) will work perfectly. BTW, you can also use eyeD3 to batch remove ID3V1.1 which I find it extremely annoying since it's such an old standard that lacks many features and people and devices should stop using it completely.
I would do two things. Because your directory structure is so neat (compliment) I would use this structure to a) put as much information as possible in the actual file name and b) put that information in the tags.
You could rename your files artist-album-track. You could also write a bash script to rename them based on your directory structure. If you have the right ID3 1.x tags, you can use mp3info to extract the data and use it in a bash script to rename your files according to their tags to achieve a similar result.
If you want to, you could even use your directory structure to add the album and artist tags in your files. Again you can use mp3info here:
mp3info is a utility used to read and modify the ID3 tags in MPEG layer 3 (MP3) files. It can also (optionally) display various technical attributes of the MP3 file.
Personally I like mp3tag. It can edit all the tags with a lot of helpful functions. It can also rename files according to their metadata and even extract metadata from file names. It is a windows program but it runs flawlessly with wine
.
If you want a Linux native program try easytag
. It seems to have similar functionality but I've never tried it myself. It should be installable using apt-get
or the software center.