cat /dev/random

Friday, September 30, 2005

Music Conversion

Me and Ducore (or Ducore and I)are working on tidying up and standardizing/sychronizing our music libraries, and I figured this would be a good place to brainstorm ideas/get stuff written down so its not just in our heads.

Here is the agreed upon format:

/[music root]/[Artist]/[Album]/[track number (zero padded)] - [Track Name].mp3|ogg

if you dont know the track number or if it is not applicable, then it is "xx"

There are more specifics for special cases that can be added later in comments. Eventually, a document should be written up to capture all of the rules. If I were more proactive and had more time right now, this post would be that document. However, I mainly wanted to use this post to propose a method of automating filename conversion, which Ducore thinks is imprcatical, and I intend to find a method to prove him wrong.

here is my newest idea:

1)use some program (eg, Amarok, rhythmbox, cantus, etc) to determine any tracks that do not have Artist/Album/TrackNumber/TrackName in the id3 tag. use said program to retreive this information from cddb if possible. Also, at this point try to identify duplicates and trash files as much as possible.

2)create a playlist containing only the files that have the aformentioned id3 tags. extract a list of filenames from the playlist file.

3)write a script that will loop through this file list and for each file extract the track name and number using "id3info" and rename the track to "[number] - [name]". We could also be more proactive and move it to the appropriate directory as well, but for teh most part, things should already be in the right place. This removes any reliance on file names already being formatted in any particular way. after this is done, only a relatively (hopefully) small number of files will need to be done by hand.

5 Comments:

  • The problem I see is that some (legally, lets say,) downloaded music files may be named improperly, and not have id3 tag information. I can't name any off hand but I know I've seen them before. The title tends to be the memorable lyrics from the song. In these cases any kind of automation would fail, and it would require direct intervention. I think that the benefits of having all properly named and taged music files outweighs the benefits of having a quick and easy method of cataloging everything.

    By Blogger aducore, at September 30, 2005 at 9:43 AM  

  • I propose a compromise:

    1) develop a script that locates directories that appear to be formatted in one of 3 standards:
    "[track number] [track name]" (iTunes),
    "[track number] - [track name]" (new standard), and
    "[artist] - [album] - [track number] - [track name]" (old standard)
    This should be largely automated but user-verified.

    2) develop a script that converts any of these directories to the standard form.
    This should also be largely automated but user-verified.

    3) develop a script that goes through some online CD database (cddb? freedb?) and retrieves track number and name information for any given album, as well as album lists for any given artist.

    4) use the script in step 3 to populate directories converted in step 2 with any missing information (xx track number).
    Once again, largely automated but user-verified.

    However, recorded concerts, remixes, anything not on an album, and anything improperly named and labeled, all will require some kind of direct intervention. I've seen accoustic versions of songs labled as though they were on an album, even though they were never released on an album. I don't think that anything scripible will be robust enough to handle cases like this. I think that any kind of script will almost certaintly wind up losing information about songs, either through undesired name changes or improper tag edits. Maybe I'm just being overcautious, but I don't like losing information, even if it may be crap information.

    I think that a mixed approach will allow us to ingest a vast majority of our music, while leaving improperly formatted songs untouched.

    By Blogger aducore, at September 30, 2005 at 9:54 AM  

  • Oh, we should also develop some way of signaling that a directory was directly ripped from CD, so that we know that the information there doesn't need to be double-checked in the future, and so that we can know what albums we should actually invest in to have a hard copy. Having the mp3s is fine, but we should really be encoding our songs at a higher bitrate than you commonly see, or using ogg (though my mp3 player only plays mp3s.)

    We can have the whold ogg vs mp3 debate later.

    By Blogger aducore, at September 30, 2005 at 9:57 AM  

  • I was thinking that the number of files that fall into the unscriptable categories you mention would be a significant minority, and could be weeded out for later manual work using one of the programs that I mentioned. However, I have no real basis for that assumption. I do think, no matter what, we will end up with some compromise of scripted versus manual conversion, so this debate is on the right track.

    I never said that we would loose any information. All id3 tags will remain intact with all changes made manually through some sort of GUI so we can be reasonably sure taht we are putting in the right info. I forgot to mention however taht we could use some id3 field taht we either add or edit (depending on whetehr you can add arbitrary fields.... there is at least a "Comment" field we coudl use) to have a record of whether a file had been standardized yet. This field could even contain the old path so that we could fix any mistakes we make.

    I think that in essence, your compromise is almost the same as my idea. My idea would simply weed out files that are totally fubar before running the script so that we would be less likely to hit files that match a regex, but are not in a recognizable format. Your plan is also a bit more restrictive since it relies on proper file name format, and not proper id3 taggage.

    I also think that we should back up our libraries before doing any automated standardizing.

    Finally, we should also think about how to determine what music we dont both have and whether to merge our libraries before or after standardizing. Propbabaly the best way to do it is simply by comparing lists of directories... actualy I think I did that before to determine what I needed to wget from you and it worked pretty well.

    By Blogger Unknown, at September 30, 2005 at 10:41 AM  

  • Hi,

    I keep coming to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]codemill.blogspot.com is filled with quality info. Do you pay attention towards your health?. Let me present you with one fact here. Recent Research points that closely 70% of all United States grownups are either chubby or weighty[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] Hence if you're one of these individuals, you're not alone. In fact, most of us need to lose a few pounds once in a while to get sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? You can easily lose with with little effort. If you improve some of your daily diet habbits then, its like piece of cake to quickly lose weight.

    About me: I am author of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health trainer who can help you lose weight quickly. If you do not want to go under painful training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effortless weight loss.

    By Anonymous Anonymous, at March 21, 2010 at 11:36 PM  

Post a Comment

<< Home