Episode: 4115 Title: HPR4115: Tagging music with Beets Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4115/hpr4115.mp3 Transcribed: 2025-10-25 19:48:44 --- This is Hacker Public Radio episode 4,115 for Friday the 10th of May 2024. Today's show is entitled, Tagging Music with Beats. It is hosted by D&T, and is about 19 minutes long. It carries a clean flag. The summary is, some things to know before you use Beats to tag your music. You are listening to a show from the Reserve Q. We are airing it now because we had free slots that were not filled. This is a community project that needs listeners to contribute shows in order to survive. Please consider recording a show for Hacker Public Radio. Hello and welcome to another exciting episode of Hacker Public Radio. I'm here to talk about the command line music tagging application called Beats. If you go to their website, just go to their documentation, beats.read the docs.io. You can read all about it. They call themselves the Music Geeks Media Organizer. I've been using this for tagging music so that I can put it in my personal funk whale server. I've come across a few things and discovered a few things as I used it. I took some notes and I'm here to share them with you. First, in funk whale, it's pretty handy to have the album art, the cover art and stuff. The application just looks a little better and it's easier to spot the thing you're looking for. For that, there are two plugins that you can use with Beats. One is called Fetch Art. That's really the only one you need. It'll download the album art when you import music into your Beats library. Then, the fetch art plugin will just download. I think by default it will save it in the same folder with the name cover.jpg, which for funk whale is good. Funk whale will find that and it will set it as the album art. Another option you have that's more wasteful is the adding as well the plugin embed art. This one will actually embed the album cover in the metadata of each file. Of course, you can tell that that's going to be wasteful because you're going to have multiple copies of that album art. One in each track out of the album where you would only need one copy of it. Apparently, there are some music players, maybe older ones. I don't know that will only show album art if it's embedded in the metadata. That might be a reason for you to do it. I did it because I didn't bother to look up whether funk whale could detect the cover.jpg. I started doing it with the embed art plugin. Now, I have since discovered that it doesn't need it. Maybe I will run through and do a re-import of my entire beats library so that it can strip out the album art. Then just add the cover.jpg file and then push it into the funk whale server again. Maybe I'll do that sometime, I don't know, but it's not a big deal. Let's back up a little. The beats is a command line application you'll go in and you type beat. The actual command is not in plural, it's just beat, be, et. Then you type beat, import, and then your tracks. By default, beats will use a folder called music in your home folder as your library folder. It will copy the files there to that folder. It will also automatically, this is all by default, all this you can change. By default, it will also try to match the album with an album that exists, the release. We should say the release that exists in music brains, the website. Then it will automatically tag your files using that information from music brains. Music brains is like a shared catalog of music information about music releases. It's very good, very complete, has very robust search tools, it's pretty good. It will download all of that stuff, it will tag your files and it will copy the files into your beats library folder. Using a certain kind of a conversion from tag information into folders. There's some other cool stuff it does like, for example, you can say something is a compilation and then it will put any compilations will go in a folder that by default is named compilations and then slash. Compilations inside that compilations folder, you will have a folder with the name of the album. In a lot of cases, that might be tagged as various artists and then you end up with an artist called various artists. That's kind of an alternative to that instead of various artists, it just names it compilations. The first tip was that about the plugins, fetch art and embed art. I'm just going to quickly pull up my beats configuration here. Here we are, it's a YAML file. You just have plugins, colon, and then space separated list of the plugins that you want to use. Here I have fetch art and embed art. I'm going to remove embed art right here as I'm talking to you because I'm not going to use that anymore because I found out that it's not necessary. If you want to look at the settings, it's worth, if you're going to use beats, it's worth having a look at what the default settings are. A handy way to do that is to type beat, config, hyphen, hyphen, default. That will give you basically you can copy all this to your personal beats config, which lives in your home folder.config, beats, config.yaml. You could copy all this into that file and then edit it as you please. These are the default settings, so you don't need to do that. You only need to copy in what you're actually going to change, but it's a handy way to see what the defaults are. I kind of wish more applications did this where you can just say, hey, give me a default config file and then it just spits out all of it for you to look at. Some other changes that I made were just for my purposes for importing a bunch of stuff. I decided to have it instead of copy the files to the library folder. I want to move them there because I have other copies of these files anyway, so it doesn't matter. I'm actually the files that I'm moving in are actually new opus encodes of all my stuff that I had. So, yeah, I'm quick note about that. I looked at this thing, so I found on the internet, I don't even know what this is, but it's xiph.org. It's kind of like a wiki page, and there was a page there called opus recommended settings. I just want to see anybody's recommended bit rates for opus encoding, and then what I decided to go with is any music that I had in MP3. I'm encoding to 96 kilobytes per second, and anything that I had in FLAQ, I'm encoding to 128 kilobytes per second. So, this page here that I'll try to put in the show notes, it says that opus at 128 kilobytes per second is pretty much transparent. It says here for music storage, they have this handy table about what the use case is, how many channels, and then what the bit rate is that they are recommending here, whoever these people are. So, I kind of decided, it says here music storage, music archiving, under music archiving as the use case, it says use FLAQ. And that kind of got me thinking, well, yeah, what is music archiving? Music archiving means, as it says here, if you are archiving audio, use a lossless audio format to prevent generation loss. So, that means is like, you know, when I'm encoding music that I have in MP3 into opus, I'm further compressing something that was already compressed, right? But I don't expect to do that a whole lot, you know, I didn't have to do this with opus, I just decided to do it. I just decided to re-encode into opus to save storage space, but I will never really have to do it. I'm not a music archival person. Let me look this up, I don't know how to pronounce this word, so archivist apparently. It looks like you can pronounce it as archivist or archivist. So, today I'm going to go with archivist. So, I'm not a music archivist, right? So, I just want to have it to listen to it. So, I don't actually have a good reason to keep it to store it in FLAQ, because I don't expect to, you know, 50 years from now, want to re-encode it and, you know, make a new high quality release, not really. I just want to listen to it with my silly little earbuds here. So, that was kind of the reason I decided, you know how to screw that? I'm just going to get rid of all this FLAQ stuff, and I'm going to encode everything in pretty low bit rate, because, you know, I'm not going to complain to anyone if the quality is not perfect. So, this will be all right, it will be worth the space savings. So, yeah, the first thing I did was just re-encode everything into Opus, that made it way, way smaller. It pretty much almost fits just on my phone, all the music that I have. Anyway, so then I started doing this tagging thing, and I found beats to be really good. It's a very fast, it's a good way to just kind of not overdo the whole tagging thing, and just be done with it pretty fast. Okay, so then, yeah, some things that came up, like there were some albums that I had trouble getting it to understand that it was a compilation, so I had to tell it manually. So then the way you do that is, I ran the command beat, space modify, space comp equals one. That's the thing that tells it it's a compilation, it's a kind of its own metadata that it invented, I think. And then, next you do album colon, and then the name of the album, right? In this case, it's an album that was called Akan Kun that I bought in 2005 at the World Social Forum in Brazil, and I've never, I didn't find any reference to this album anywhere. It looks like I might have been the only one that bought it. So meat, so beat modify comp equals one album colon, the name of the album. And here you can see that when you say comp equals one, you're setting that to this, right, with the equals sign. And when you're typing a query, you use the colon symbol album colon something else. If I did like, you know, album equals Akan Kun, and then space comp colon one, then I would be querying for everything that is a compilation in my existing library, and I would be setting all of that to the album for all of that, I'd be setting that to Akan Kun. That's not what I want to do, obviously, right? So that's the modify command. And by default, this will not only change the metadata, but it will also reorganize the files in your library to accommodate the new, you know, to conform to the new metadata that you just set. So that's something you do after you've already imported these files into your beats library. So next I want to tell you about these options, hyphen hyphen flat and hyphen hyphen group hyphen albums. So by default, beats is going to assume when you import new files that each folder represents one album, right? So there are two ways you can override that if you actually have just tracks in one folder that actually make up multiple different albums, you give it the group albums option, then it's going to try to first look at all those files and group them into albums, right? And then the opposite, you don't always need to do this, but sometimes beats has trouble recognizing the multi-disc albums. So what you want to do in those cases is the opposite of the group albums thing. You import the folder that contains the multiple folders that make up the multi-disc album and then tell it hyphen hyphen flat. What that's going to do is going to ignore the folders and just treat all the files in there as if they were in the same folder. If you do that, usually it'll recognize a multi-disc album with no trouble at all. So what I often do is when I'm going to import a folder with a bunch of stuff, I first have a look at it and then I first import each multi-disc album separately to make sure it goes all right and then I import the rest all in one go. So sometimes it fails to recognize the release you want. It gives you some options when it doesn't find a very good match, it'll give you some options also when it finds a match, but the match leads to making a lot of changes to the metadata that's already in the files. It kind of shows you that diff and tells you ask you what to do. So then usually you're just going to say apply. But anyway, so when it gives you multiple release options and none of them are what you're looking for, what's handy to do is just go to the music brains website and use the advanced search there to try to find the release you're talking about. Because a lot of times things are mistagged, people give an album the wrong name and then you can find out what is the right one. You can search by the track name and the track number for example and then it shows you the every release in which that track appears with that track number. So there are very good search tools and then there's a unique ID that identifies each release in music brains and you can find that in the URL when you're looking at a release on the music brains website. Then you can copy that ID and when beats is asking you what to do, you can use the option enter ID and then just just paste in that ID and then it'll say okay and got it. Similarly, you can also if you already have the ID from in the first place, you can just go beat import, hyphen hyphen search, hyphen ID equals then the ID. Then you're importing and you're telling beats exactly what the release is so that it can just pull them out of data from music brains and apply it. Then the other thing is sometimes it'll say it finds the album you're looking for but it says there are like three tracks missing let's say. Then you but you know the tracks are there you look you you know you LS in the directory and you can see the tracks that it's saying are missing right. If that happens you can usually just say okay apply and then you're going to import the the album without those tracks and if you're using the move option rather than copy right then the those tracks that are said to be missing will remain in the folder and then you can just import again and this time beats is is going to look at it and then it's going to say that it's missing the other tracks or it's missing all the tracks right. It might like look at one track at a time and think each track is one album so then it's going to say I found this and it's from this album but it's missing all the other tracks. Then what you can do is you can just say okay let's import it and then it's it's going to want to import this new copy of this album that is missing all but one of the tracks but then it's going to tell you. Hey you already have this album in your library here it is the old version had nine tracks the new version has only one track what do you want to do there's the option to merge them right. So then you'll merge them and you'll end up with what you were looking for. So that's it these are just some things that I've come across using beats for a few days. I've been just kind of going in for like half an hour a day and importing some things into the beats library and then from there pushing them to funk whale over our sink. And so yeah I just came across some of these things and it would have been handy to know them ahead of time it would have taken less trial and error and less redoing some things. So I figured that's a very good opportunity to record a show for Hacker Public Radio. All right so that's it for me thanks for tuning in come back tomorrow for another exciting episode of Hacker Public Radio. Bye. You have been listening to Hacker Public Radio at HackerPublicRadio.org today's show was contributed by a HBR listener like yourself. If you ever thought of recording a podcast and click on our contribute link to find out how easy it really is. Hosting for HBR has been kindly provided by an honesthost.com, the internet archive and our things.net. On the Sadois status today's show is released under Creative Commons Attribution 4.0 International License.