Slashdot Mirror


Using CDDB to Fill ID3 Information in Existing MP3s?

masonbrown asks: "I've got about 2000 songs in my MP3 collection, using iTunes on the Mac. I'd love to fill in the empty ID3 tags such as Album Title, Date, etc. automatically from something like CDDB. Is there any way to automate this after the song is already in MP3 format (like going by Artist and Song Title)?"

30 of 68 comments (clear)

  1. Probably not by XoXus · · Score: 2

    I'd have to say no, at least with the current CDDB. Albums are non-uniquely identified by Artist and Title; for example, I have two versions of "US Forces" by Midnight Oil, from different albums. How is it going to be possible to distinguish between them without examining the audio data?

  2. mp3 butler by eyez · · Score: 3, Interesting

    A long time ago I wrote a program which can, Among other things, re-tag mp3s based on the filename. This isn't exactly CDDB, but it's a start.

    It's a perl program, so it Should run on OS X without modification, so long as you've got it's perl module requirements taken care of.

    The program is called The MP3 Butler, and you can get it from http://babblica.net/mp3butler.

    --
    get 0wned. irc.w30wnzj00.com
    1. Re:mp3 butler by 0x0d0a · · Score: 2

      Hmm. I've been working on a perl scrip that does heuristic name detection based on the filename, the id3 tags and (not yet in) the freedb info. Unfortunately, last I looked the freedb protocol specified searching as a valid operation, but when I tried sending the command, the freedb server spat back "not implemented yet".

  3. musicmatch by Polo · · Score: 2

    Ok, so it's not Linux, but Musicmatch Jukebox has a feature called supertagging.

    It takes the song title and does a fuzzy search and can fill in the ID3 tags. It can scan it from the filenames only, or from an existing tag. If your tags are nonexistent or screwed up, you can fix them. It can even fill in Album art and so forth. It's not completely automatic, but it is automated.

    I kind of grudgingly like musicmatch, even though they must never have scanned in their CD collection with it. I mean, why do I have to click on the mouse for every single CD in my collection. Why not have a feature to start ripping the moment you insert a CD and eject it when it's done? Bozos.

  4. AppleScript by medcalf · · Score: 2

    You could script it with AppleScript, since you can set track properties and can do Internet connections, presuming that CDDB has some useful interface for scripting.

    --
    -- Two men say they're Jesus. One of them must be wrong. - Dire Straits
  5. Tag&Rename does this by Alrescha · · Score: 3, Informative

    Tag & Rename is a relative cheap program for mass editing of ID3 tags. One of it's many features is that if you have a directory that contains all of the tracks of one album, in order, it will go to CDDB and retrieve the album/track information. It will of course create ID3 tags from this information if you desire.

    The user interface takes a little getting used to, and it's a Windows program, and it's payware, but I had to respond to all the folks who say "it can't be done". Tag&Rename does it.

    http://www.softpointer.com/tr.htm

    A.

    --
    ...bringing you cynical quips since 1998
  6. CDDB? Shouldn't we be using freedb instead? by WIAKywbfatw · · Score: 5, Insightful

    Unless you've been living in a cave for the past two years you'd know that CDDB has been hijacked by Gracenote who've turned what was a nice, cooperative development, steadily built up by thousands of unpaid users into a private, commercial venture.

    Nowadays, if you're developing commercial software that accesses the CDDB database you have to pony up licensing fees or look elsewhere.

    That elsewhere is freedb. Check it out and use it instead of using CDDB.

    --

    "Accept that some days you are the pigeon, and some days you are the statue." - David Brent, Wernham Hogg
    1. Re:CDDB? Shouldn't we be using freedb instead? by tswinzig · · Score: 3, Insightful

      Unless you've been living in a cave for the past two years you'd know that CDDB [cddb.com] has been hijacked by Gracenote who've turned what was a nice, cooperative development, steadily built up by thousands of unpaid users into a private, commercial venture

      And who provided the service of hosting this data and providing network access to it all these years, for free? Gracenote.

      I'm so sick of this B.S. argument, "they hijacked our data!"

      1. It's not your data, it belongs to the songwriters and record companies. You just re-typed it, big frigging deal.

      2. You provided a service to Gracenote -- you retyped the information. In exchange, you were provided a service by Gracenote, free access to their index of CD information. On average, I would wager people took WAY more than they gave.

      It's fine to promote a free service like freedb. I use it. But please for chrissakes stop complaining about gracenote, they didn't hijack anything!

      --

      "And like that ... he's gone."
    2. Re:CDDB? Shouldn't we be using freedb instead? by Lars+-1 · · Score: 3, Informative

      Whether of not Gracenote hijacked anything depends on you point of view.

      IIRC, the whole thing went like this:

      Ti Kan and Steve Scherf defined the protocol and made a server. People started to contribute the data. At some point, Ti Kan (I might be mistaken in this) started to commercialize the service, either by selling the data to a company, or by founding a company himself. Gradually, the new company started bugging makers of mp3-software to only include support for cddb, thus practicing unfair methods to support cddb. The methods included things like "either you only support cddb, or you will not support cddb at all."

      So the service started as free, then turned into a commercial service. At the same time, the free service was hindered.

      About that It's not your data, it belongs to the songwriters and record companies. You just re-typed it, big frigging deal.:

      Again, this depends on you view. Of course, you're just writing down information which others have written. The point is that the value of the data consists not of the information itself, but of the availability through a service like freedb/cddb. Thus Gracenote did hijack the data. Not the contents, but the value. The value is the time of the thousands of people who typed in the information.


      Lars

    3. Re:CDDB? Shouldn't we be using freedb instead? by dubl-u · · Score: 2

      Yep! Had I known up front I was giving a marketable asset to MBA-wielding jerkos for free, that would have been swell.

      As it is, I now just use freedb. They continue to be what I thought cddb was all along.

    4. Re:CDDB? Shouldn't we be using freedb instead? by tswinzig · · Score: 2

      Again, this depends on you view. Of course, you're just writing down information which others have written. The point is that the value of the data consists not of the information itself, but of the availability through a service like freedb/cddb. Thus Gracenote did hijack the data. Not the contents, but the value. The value is the time of the thousands of people who typed in the information.

      The value is also the bandwidth, processing, and man power it took to make CDDB work -- how much did you pay for that?

      --

      "And like that ... he's gone."
    5. Re:CDDB? Shouldn't we be using freedb instead? by tswinzig · · Score: 2

      I don't think the data belongs to the songwriters or the record companies. The data is facts about the album ("this is the list of song titles" vs "this list of song titles is a creative work"). Facts don't belong to anyone.

      The song list on a CD is an original work consisting of: original song names (usually) in an original order, for the purpose of describing an original set of music. The song titles are just as much a part of the art as the lyrics of the song.

      I'm not saying CDDB/FreeDB is illegal, since I feel these can be used in the context of 'fair use.' However, that does not change the fact that the artist or record company owns that original work, and therefore the only service you are providing is to transcribe the text for cddb/freedb.

      The point being: you're not "creating" any content for CDDB, you're just "porting" it. In return you were able to download information from CDDB.

      --

      "And like that ... he's gone."
  7. easy, assuming the MP3s are whole ripped albums by tristan-b · · Score: 2, Informative

    iTunes does have the ability to fill in missing information in some situations. For example, if you have an entire CD you ripped while offline, select the tracks and select "Get CD Track Names" from the Advanced menu. Everything from CDDB will be filled in, even if the songs still have "track1" etc as their names. Not sure if it can account for songs ripped from another encoder/incomplete albums.

  8. Use MP3 Rage by sekalreed · · Score: 2, Informative

    MP3 Rage will allow you to not only get info from CDDB for already ripped MP3s, but handle all sorts of other tagging and renaming. Check it out

    --
    -ds
  9. This is the answer; mod it up by 90XDoubleSide · · Score: 2

    You can select any or all tracks you have ripped using iTunes and use the Get CD Track Names on them at any time. In iTunes 3 with the Keep iTunes Music Folder Organized option it will even update the file names and folder names and structure with the new information instantly.

    --
    "Reality is just a convenient measure of complexity" -Alvy Ray Smith
  10. Only 2000? by teridon · · Score: 4, Informative

    You probably want to use Applescript for this. Check out this page for a buttload of iTunes applescripts. For example the "Get CDDB Track Names" script will tag the selected tracks in iTunes with info from a CDDB webpage (that you searched for). And you can use the built-in applescripts to search the CDDB.

    But honestly, with only 2000 songs, it would probably be less work to do it yourself, especially if you can use iTunes multiple-edit mode on tracks from the same album.

    --
    I hold it, that a little rebellion, now and then, is a good thing. -- Thomas Jefferson
  11. Re:Can't do it.... yet it's done by wdr1 · · Score: 3, Informative

    Sure, you aren't going to get every invalid version, but who wants that anyway? For clean rips, you should be able to narrow the range down a lot. No, it won't be one-to-one like a CD, but that's okay too.

    For someone who's done it already, check out MoodLogic. Hooks in with winamp too.

    -Bill

    --
    SlashSig Karma: Excellent (mostly affected by moderatio
  12. Use madtime and score the results by Ben+Jackson · · Score: 2

    I wrote an ugly perl script that does this. It's based on the ideas from mp3cdd (you might be able to find this by searching google).

    First you find all of the track lengths and build a fake TOC, assuming a 2 second lead-in. mp3cddb used file length and bitrate to guess the length. If you use VBR (or even ABR) this isn't accurate enough, so you need madtime from libmad. Feed this to CDDB (get the mod from CPAN).

    You'll get a ton of results. Some will be totally unrelated, and some will be crap (all uppercase, all lowercase, genre missing, etc). Write a scoring function that weights all of the factors you care about, and then factor in the "distance" of the actual tracklists from your actual tracklists. Total time differences in seconds, or root mean squared differences, whatever gets good results. Pick the best.

    Sanitize the result if you are using the CDDB info as a filename.

    Now rename and mp3info your tracks from the data.

  13. Re:you should know how it works by GMontag451 · · Score: 3, Informative
    CDDB works by doing a simple lookup of the CD's ID (burned in ) and then querys the CDDB database for what it thinks should the track names and other info

    Um... no. There is no "CD ID number" burned into every CD. CDDB works by assuming that the track lengths are unique to a CD, which almost always works. That is why if you have the MP3s and you burn them to a CD, you can sometimes get CDDB to recognize it. Of course, that only works if all the different people you got your MP3s from ripped them with the same conventions, i.e. do you include the song gap, and if so, at the beginning or the end, etc.

  14. Re:you should know how it works by nathanh · · Score: 5, Informative
    CDDB works by doing a simple lookup of the CD's ID (burned in )

    What total rot. There's no such thing as a "CD ID". The CDDB ID is a one-way hash of the track lengths. Here is a comment from a script I wrote a few years ago.

    # The cddb disc id looks like this: sum the digits of each track's
    # starting point in seconds, shove that in the high byte; find the
    # total _playing_ time (subtract leadins) and put into the 2nd and
    # 3rd bytes; put the number of tracks in the low byte. The playing
    # time can't exceed approx 80 mins, so it will never overflow. The
    # summation of digits can overflow so the specs require the modulo
    # 255 first (not bitwise-and like you'd expect, weird huh).

    It might be possible to create a CDDB ID from a full album of MP3s. But I think there's no hope if you have random MP3s from incomplete albums.

  15. Re:Also by Gordonjcp · · Score: 2

    If you look in the "Tips-HOWTO", near the end, you'll see a pair of scripts, one spread over several lines, one a single line, that converts all the files in a directory to lowercase. In fact, here's the second one:
    ---- snip ----
    for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr '[A-Z]' '[a-z]'`; done;
    ---- snip ----

    See how it uses tr to convert a range of characters? You can add any list of characters you like there. You can find out how to get your special characters by saying "man tr" at your prompt. As for finding out the codes for the characters, there you may need to do a bit of digging. Or you could copy and paste.

    Hope this gets you somewhere. I find it useful just for lowercasing filenames brought across from DOS and Windows disks, and of course you can replace the "tr" bit with other commands.

  16. Mp3Tagger by DeadSea · · Score: 2
    The information that CDDB uses is not stored with the mp3s. It does some calculation of the track lengths. You would have to have all the mp3s of the album including silent tracks as mp3s and the mp3s would have to have the the exactly right length, which I doubt that the mp3 format does.

    Chances are that you have you songs named in Album-Artist-Song.mp3, Album/Artist-Song.mp3, or Album/Artist/Song.mp3 format. I wrote a program called Mp3Tagger that can import this mp3 name information into the ID3 tag. (It can also go the other way and rename an mp3 based on id3 tags.) It runs on Windows, Linux, and Mac OS X among others.

  17. Yes! by pudge · · Score: 2

    If you have a directory of MP3s that 1. is an album and 2. are in order, then you can use a program in the MP3::Info module distribution to do this. I've used it many times. Meng Weng Wong wrote the program, I wrote the module, and it's on the CPAN.

    I think by default the program doesn't actually write the ID3 info to the MP3 file, but it's a simple edit to make that happen. You also need the CDDB module from the CPAN.

  18. Re:Also by Apreche · · Score: 2

    yeah, that would help me a lot. If I understood what that crazy command meant at all. Tell me how to do it in windows 2000, the os I use when not coding. Large crazy commands like that, which nobody understands are the reason that linux will never win the desktop. As far as I'm concerned, linux is good for coding, because it has all the good text editors and the free compilers and the nice terminal windows. I haven't seen anything else linux does better. Especially audio.

    --
    The GeekNights podcast is going strong. Listen!
  19. Re:Also by Gordonjcp · · Score: 2

    Simple. You can't. There is no way to do that in Windows 2000.

    Well, that's a little harsh. You could install Cygwin and run it under bash. But it sounds like you're too lazy to do that.

  20. Re:Also by belroth · · Score: 2
    yeah, that would help me a lot. If I understood what that crazy command meant at all. Tell me how to do it in windows 2000, the os I use when not coding.
    OK, so learn what shell scripts are then, and a few basic commands.
    You could do this in a nix or you can install some software on your W2K box,e.g. Cygwin or some of the Window ports of nix commands.
    As far as I'm concerned, linux is good for coding, because it has all the good text editors and the free compilers and the nice terminal windows. I haven't seen anything else linux does better. Especially audio.
    Being able to do things like write the above script I found pretty useful. I develop on windows for a living and having Cygwin, emacs and t.h.e. make my life so much easier. When I have to view every line which contains a certain string in all files with the same suffix in a folder tree it takes about 5 minutes to run in cygwin. Windows 'find' or 'search' command (depending on version) doesn't cut it.
    E.G. to find all lines in all files *.bar in the tree starting at c:\dev which contain the string 'foo', and where 'foo' and 'bar' may be in any combination of upper and lower case, and where the C drive is mounted as /mnt/c and you want the reults in a file (myoutput.file) with the filename, line number and line contents, you can use
    find /mnt/c/dev -name '*.[Bb][Aa][Rr]' -exec grep -H -n -i 'foo' {} >> myoutput.file \;
    Of course you need to wipe the output file first, anyone know how to do this in windows without cygwin?

    If all you want to do is surf the web then windows is OK (use Opera emulating IE), but then so is Linux (use Opera emulating IE). There are more games for windows and I can't run my excel/access vba apps on linux, but apart from that....

    --
    I hereby inform you that I have NOT been required to provide any decryption keys.
  21. Re:A common mistake by Sabriel · · Score: 3, Insightful
    But then some yutz comes along and, like a fresh-hatched cuckoo, opens his mouth wide and peeps, "Gimme! Gimme! Gimme!" Thanks, but I have no particular interest in feeding leeches.
    The dude asked for help. If you can't or won't help, leave it at that. Ranting at him for being a sheep not only doesn't help him, it hurts you. Someday you might need a wool coat to help keep out the cold.
    If you want to understand the preceding command, RTFM. And if you want to accomplish this task on Windows 2000, pay somebody. Linux is an OS for builders, for creators, for makers of things. Windows is an OS for consumers. If you want to act like a consumer, then get out that credit card.
    Windows is an OS for people who are builders, creators and makers of things IN FIELDS OTHER THAN PROGRAMMING! There are plenty of folks too busy working at their own specialties to learn ours, from farmers to firefighters. The "but it is so simple for ME" attitude is one more reason why Linux is having such a hard slog at displacing Windows.
  22. Sure, I do this all the time by treat · · Score: 3, Informative

    Using a program called "mp3ascd" to generate the CDDB ID, and another program called "rebot" to do the renaming based on the ID. (Both found on freshmeat). Not the best software in the world, and I had to make a shell script to glue them together. But it is entirely possible.

  23. music recognition? by TheTomcat · · Score: 2

    A couple years ago, I played with some software that would recognize a tune by analysing the actual music data. I can't remember what it was called, and I only had limited success with it, but I did have some success.

    I'd like to play with said software again to see if it has matured.. Anyone know what it might be called?

    S

    1. Re:music recognition? by chrissam · · Score: 2, Informative

      I've used a program called ID3Man which does just this. I don't know if it's the same on you used -- probably not, since these guys have only been around for a year or so. My experience with ID3Man was mixed -- it's great for "popular" albums which have made it into their database, but the less volume-selling stuff like some classical and jazz are less well-recognized by their system. Definitely worth a look though.

      --
      Is it okay to cry "Movie!" in a crowded firehouse? --Steve Martin