1/*.mp3" ) # print the first element of filez: glob ( "/media/user/My Passport/ID3/1994 - Punk-O-Rama vol. We first want to extract the file paths for the mp3s in our compilation album folder, which we’ll store in an object called “ filez”: 2 # extract the file names (including folders)įilez = glob. # load the libraries that we'll useįrom mutagen.mp3 import MP3 from mutagen.easyid3 import EasyID3 import mutagen.id3 from mutagen.id3 import ID3, TIT2, TIT3, TALB, TPE1, TRCK, TYER import glob import numpy as np Let’s first import the libraries that we’ll use, including a number of sub-routines from the mutagen library, which will allow us to read and edit mp3 meta-data (e.g. I put together my approach based on this very helpful StackOverflow response, which describes the basics of editing ID3 tags in Python using the mutagen library.
Other software is available for this purpose, but I thought it would be an interesting problem to solve using Python. In the end, I wasn’t able to edit all the tags in the proper way using this program.
I’ll mention that I first tried to fix the ID3 tags via Windows Media Player, but found the program extremely difficult to use for this purpose. While we are at it, we will also make sure that the songs are given the appropriate track number in the ID3 tag. Therefore, if we set the ‘albumartist’ tag (and the ‘album’ tag) to be identical for all songs on the compilation album, Google Play should be able to recognize the songs as belonging to the same album, and group them in the same album folder within the app. It’s doing this on the assumption that there might be multiple albums by different artists that shouldn’t be merged.” If this does not exist, it looks for ‘ARTIST.’ If you have a compilation album… and no ALBUMARTIST tag is set, it will split the album into as many copies as there are different artists. What meta-data does Google Play use to assign songs to albums?Īccording to this helpful Reddit post, Google Play first “looks for the ‘ALBUMARTIST’ tag first.
ID3 tags are meta-data associated with mp3’s which allow “ information such as the title, artist, album, track number, and other information about the file to be stored in the file itself.” Essentially, the meta-data associated with the mp3 files on the compilation were originally set in such a way that the Google Play app could not figure out that all the songs belong on the same album. The heart of the problem, as mentioned above, is the ID3 tags attached to the mp3’s themselves. The end result was that, in the Google Play music app on my phone, the songs were represented in a number of different album folders, making it necessary to constantly switch between them if I wanted to listen to the compilation from front-to-back. Much to my dismay, the ID3 tags were formatted in such a way that Google Play did not recognize the 16 songs as belonging to the same album.
I put the album on my phone in order to listen to it via Google Play, the built-in mp3 player on the Android system. I was given a compilation album (the first volume of the Punk-O-Rama series) in mp3 format. The goal will be to harmonize meta-data for all mp3 files which belong to a single album. Specifically, I’ll be using Python to edit the meta-data (e.g., the ID3 tags, which contain information on the artist, album, song, etc.) attached to mp3 files. In this post, we’ll still be dealing with data, but less on the analysis side and more on the management side. Typically, on this blog I write about data analysis. Google 'lossy audio compression' to learn more.In this post, I’d like to do something a little bit different. The MP3 format always loses some of the audio quality. I strongly recommend you do not use any file that was once an MP3 on a CD you want to release for sale. There are DDP checking programs that can verify the details are right. Reaper can output this type of file, but there is a lot of tedious detail work required, and one mistake can result in hundreds of copies of an unplayable CD. If, instead, you want to have a company (such as CD Baby) print a bunch of copies, Google for the DDP, which is a standard way to upload CD data to a CD printing company.
You can probably find a free program for this with a Google search. There are a number of CD burning programs that allow entering CD-TEXT data and burn it to disk. Rendering to 16 bit WAV will remove the MP3 tags.Īudio CDs do not support any metadata except for a poorly defined standard called CD-TEXT, where song titles pop up on (some) CD players.