Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 976  / 3 Years ago, thu, october 7, 2021, 10:37:31

My music collection has grown to now approx. 4000 files over the years. They mostly consist of mp3 downloaded from different online shops at various bitrates, mp3 ripped from CDs I own, and DRM-free m4a files from iTunes.



In case this matters, I made quite some effort to have my files orderly saved with the following pattern:



/shared/music/artist/album/track# title.mp3


Now I plan to upload these to a cloud music service (I was thinking of Google Play). I understand that these services are capable of not actually uploading the music data from my files but rather just provide a link to songs they already have on their servers.



This is fine as because of limited bandwith, and because of a possible violation of copyright laws in my country I do not want my music files to be uploaded anywhere.



Also I do not want my files to end up like this:



/artist/album/track# title1.mp3
/artist/collection/sometrack# title2.mp3
/artist/best_of/yetanothertrack# title3.mp3
/artist/bonusalbum_from_japan_only/specialtrack# title4.mp3


How would I have to prepare my music collection to be properly recognized by the service? What applications are available to aid me in doing so?


More From » music

 Answers
7

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.


[#32531] Friday, October 8, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
initiallartebeest

Total Points: 24
Total Questions: 118
Total Answers: 105

Location: Venezuela
Member since Thu, Jul 15, 2021
3 Years ago
;