Automatic tagging 30k+ MP3s with Discogs information
Hi everyone,
I've been tasked with tagging 30,000+ files with correct artist, album, title, genre, release year, and cover art. Most of this information is already present in the folder and filenames, but there's very little ID3 tag data. My goal is to automate this process by querying Discogs.com based on the available information and automatically tagging the files when the returned data meets certain quality criteria. I'll handle any exceptions manually using tools like Mp3tag and MusicBrainz. I'm planning to build a custom application for the automated traversal and tagging, and I'll be using VB6 on a set of Windows 11 PCs.
I'd love to benefit from the experience of others. I've searched the forum for relevant code and ideas, but haven't found much.
If you have any experience with this type of project, I'd really appreciate your input on the following:
1) Discogs API Interaction: What's the best way to make HTTP requests to the Discogs API from VB6? Are there any recommended libraries, methods, sample projects? I'll need to handle authentication and rate limiting.
2) JSON Parsing: The Discogs API returns data in JSON format. I need a reliable and easy-to-use JSON parsing library for VB6. Any recommendations? Examples of how to use it to parse the Discogs API response would be fantastic.
3) General Best Practices: Any tips for handling the Discogs API responses, dealing with potential errors, and structuring the data in my VB6 application would be greatly appreciated.
I already have libraries for reading/writing ID3 v1 and 2.3 tags.
Thanks in advance!
Re: Automatic tagging 30k+ MP3s with Discogs information
Why reinvent the wheel?
https://en.wikipedia.org/wiki/EasyTag
EasyTag has access to the CDDB, so there is that
Re: Automatic tagging 30k+ MP3s with Discogs information
Don't think CDDB has cover art, which is almost the most important for my employer. CDDB focuses on CD releases primarily. In this collection there's probably 20%* releases before the 80s. In general, I think quality is assessed to be higher from Discogs. These are some of the reason why we landed on Discogs as source. But thank you, Zvoni, for makinging us question if Discogs was overkill. CDDB would probably work fine for a big chunk of the collection.
*: It's actually more like 36% :- /
Re: Automatic tagging 30k+ MP3s with Discogs information
Couldn't resist and had to ask how I could automate this with a tool. Here's what I found (but haven't checked yet):
(Source: ChatGPT Feb 2025)
Here’s a step-by-step guide using Mp3tag to standardize your MP3 filenames and set ID3 v2.3 tags, including album art:
1. Set ID3 v2.3 Tag Format
a. Click Tools > Options > Tags > Mpeg.
b. Under "Write", select: ID3v2.3 UTF-16 (or ISO-8859-1 for better compatibility with older devices).
c. Click OK.
2. Load All MP3 Files
a. Open Mp3tag.
b. Click File > Add Directory… and select the top-level folder (e.g., the folder containing "A" to "Z" and "0-9").
c. Mp3tag will scan and load all MP3 files.
3. Extract Metadata from Folder Structure
Since your structure follows: .\Letter\Artist\YYYY - Album\Artist - Title.mp3
You can extract tags using:
a. Select all files (Ctrl + A).
b. Click Convert > Filename - Tag (Alt + 2).
c. Enter this format string: .\%artist%\%year% - %album%\%artist% - %title%
d. Click OK – this fills in Artist, Title, Year, and Album tags.
4. Standardize Filenames
a. Click Convert > Tag - Filename (Alt + 1).
b. Use this format: %artist% - %title%
c. Click OK – this renames all files to "Artist - Title.mp3".
5. Fetch and Apply Album Art
a. Select all files (Ctrl + A).
b. Click Tag Sources > Discogs / MusicBrainz.
c. Follow the prompts to match albums and apply covers.
d. If necessary, manually add album art:
- Right-click the cover area (bottom-left corner).
- Select Add Cover… and choose an image file.
e. Click Save (Ctrl + S).
6. Save Changes
Press Ctrl + S to save all modified tags.
Done! Your files now have standardized names and complete ID3 v2.3 tags.
My remark, not ChatGPT's: This might work, if only track titles always are correct (and I know that they are pretty bad :- ). But then again, if titles are pulled from the source, how does it match that with a bad filename (this is where our "... when the returned data meets certain quality criteria" comes into play). I'm way ahead of myself here. Let's solve 1, 2 and 3 in my initial post first.
Re: Automatic tagging 30k+ MP3s with Discogs information
There's VB6 mp3 id3 classes, but none of the ones I've seen support cover art. I tried to add it myself without success. Couldn't figure it out.. had everything right for the APIC info according to docs. But you can do it easy via the Windows property system, see here; I don't know if that alone covers all the id3 tags you need but see if that single method does... Others can advise you better on the querying discogs part... I've only written code to automate info and art for tv (thetvdb) and movies (tmdb).