INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Upgrading music files, preserving tag info. How?  (Read 2067 times)

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Upgrading music files, preserving tag info. How?
« on: January 22, 2012, 04:09:42 pm »

My music contains custom fields like Sub Genre and several Rating fields. I've spent a horrible amount of time on this and have to preserve it.

I've started using an application that makes updating my library to better quality a lot easier. But this would in most cases just use the same Album directory and overwrite the current files. In the case of different naming on the files, there will be duplicates, and when it's MP3 to FLAC upgrade there will be lots of duplicates.

I do not think this will wipe any data in MC, but I would like to ask you guys if you have some ideas how to do this with the least possible work as well as saving all my tags. I would also like to preserve the Number Plays count as well as Last Date Played if it's possible and easy. Any help would be great!
Logged
- I may not always believe what I'm saying

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Upgrading music files, preserving tag info. How?
« Reply #1 on: January 22, 2012, 04:24:07 pm »

Mr H, if you need to preserve a field, create custom field: "your field"_bup as in backup, copy your data to that field and it will be secure
Logged
MT5FR

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Upgrading music files, preserving tag info. How?
« Reply #2 on: January 22, 2012, 10:21:35 pm »

I've started using an application that makes updating my library to better quality a lot easier.

It's not clear what this means. If it means literally turning over control of replacing media files to this application, files with different names (including all those upgraded from MP3 to FLAC) will have to be re-tagged. It's difficult to imagine how that makes things easier. What wrong with the process often mentioned method described here?
Logged

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Upgrading music files, preserving tag info. How?
« Reply #3 on: January 23, 2012, 03:01:27 am »

It would be very automatic, yes. So you have little control of the end result. If the file names vary, you'll end up with some duplicates. And that will take some time to remove from MC. Thanks for the link. I'll try this methods later on. I think I'll end up doing it in batches. Redirecting the application to put the files in a temp directory, and do some manual work.

Would it not be sweet if MC could have a re-rip mode which monitors the folders for file changes and merges files if there is duplicates with a high similarity in file names. Might not be the easiest thing to code though.
Logged
- I may not always believe what I'm saying

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Upgrading music files, preserving tag info. How?
« Reply #4 on: January 23, 2012, 11:18:32 am »

I went through and "upgraded" many of my existing long-term MP3s in my Library to FLAC a little while back.  I had a very large set of MP3 files in my library from way back in the day when a 100GB drive was a monster.  Because of old-school space constraints (that were no longer an issue) many of my very old files (circa 1998/1999-ish, mostly) were ripped at 128k CBR MP3 (by Real Jukebox mostly, I believe), back when I did my "first round" of ripping from my CD library.  Over this past summer, I went through and re-ripped most of these discs (the ones I still had) to FLAC or very high quality MP3s.

Here's the basic process I used:

Re-Ripping to MP3

This is a slightly easier process than re-ripping to FLAC, so I'll start with it.  I did this, mostly, one album-at-a-time.  In a few cases, where I ripped a bunch of stuff from the same artist (my entire nine inch nails collection, for example), I was able to combine the procedure and do a whole artist at a time, but you have to be careful not to mess it up.  It is absolutely a very good idea to make a manual Library Backup before you start this process, just in case.

0. Make sure Auto-Import is disabled in MC for the process.  Auto-Import WILL get in the way of this, so it is essential to ensure that it is turned off.
1. Set up MC to rip to a Temp location (M:\temp\rip\ in my case), and set my ripping folder naming structure so that it will match my main library file structure exactly (so the output file names will match the existing file names perfectly).
2. Rip the files to the new MP3s.  This creates "duplicates" in my library, one in the M:\audio\music directory (the old, bad ones) and the new ones in the M:\temp\rip\ directory.
3. Switch to a view that shows these files together (browse to find the Artist\Album is usually the easiest way), and make sure they are all tagged identically and that the filename structure matches identically (except for the rip location prefix, of course).  This was actually quite easy to do, since the normal sorting in the view made them line up with each other.  Basically, I just had to make sure the files were named the same way.  This amounted to making sure that "Oh! Darling" by The Beatles wasn't called "Oh Darling" instead in the new ripped version, and fixing it if they didn't match.
4. If needed, I did a Rename Move and Copy on the newly ripped files, keeping them in M:\temp\rip.  The goal is to get the filenames to match exactly, so that you can just replace the old ones with the new ones via Windows Explorer and have the new ones overwrite the old ones.
5. Then, when you're sure everything is "good" I did a Locate -> On Disk (External) to both to pop up Windows Explorer windows showing both the new files and the old files.
6. I then removed the "new files" from MC's Library completely.  This was easy to do in that same view:  I just sorted them by [Filename], then selected all of the M:\temp\ ones and deleted them (but not from disk).
7. I then moved the files from the M:\temp\rip\ directory (the whole folder) over to M:\audio\music\.  This replaced the old files on disk.
8. Now, the files in MC's Library actually point to the new, higher quality files, but it doesn't know it yet, and the tags are out of "sync" (not the main ones that are used for naming, but the other stuff like [Number of Plays] and [Date Imported] and whatnot).
9. Then, I selected the files (still open in the view in MC from above) and did Library Tools -> Update Tags (from Library).  This synced the Library Data from MC back out to the actual in-file tags on disk for the new files.  Make sure to pick the right tool!  You want to update the TAGS, not the Library in this step.  If you do the reverse, then MC will replace all of the old tag data in your Library with the tag contents from the files themselves (which will be all brand-new).  If you mess this up, your only option is to restore a MC Library Backup and start over.
10. Then, I did Library Tools -> Analyze Audio (making sure to uncheck the skip already analyzed files option).  This corrects the reported bitrate, file size, and audio analysis details for the files, so that they actually match the files on disk.
11. Lastly, I did Library Tools -> Update Library (from Tags).  This was probably unnecessary because of the Analyze Audio step, but I did it anyway for good measure.

There, then you have replaced the files on disk while preserving the important file tags.  An annoying process, to be sure, but we don't have any automated way to replace files on disk built-in to MC, so that's the best you can do.  For the vast majority of re-ripped albums, this was a very quick process.  So long as your [Name] tagging data isn't heavily customized from what YADB finds, it shouldn't be too troublesome (those [Names] matched correctly far more than they were mismatched).

Re-Ripping to FLAC

This process followed exactly the same procedure as described above, except that I ripped to FLAC, up until step 4.

4. In this case, after I was sure the tag data that would be used to rename the files matched exactly, including commas, dashes, colons, and whatever else weird might be in the names of the songs, I did a Rename, Move, and Copy on the new FLAC files to move them right next to the existing MP3s (this was easy, I just used my existing "music" renaming preset).  This resulted in the folder where the original MP3s lived containing both the original source files, and the new FLAC files, right next to one another, named IDENTICALLY except for the file extension.
5. Do a Locate -> On Disk (External) to pop up a Windows Explorer view of those files, and just make sure that everything looks right.  Each file should have the "original" MP3, with a "new" FLAC right next to it.
6. I then removed the "new files" from MC's Library completely.  This was easy to do in that same view:  I just sorted them by [File Type] (instead of Filename since they are all in the same place now), then selected all of the FLAC ones and deleted them (but not from disk).
7. Then, select all of the remaining files listed in MC for that album, and do Rename, Move, and Copy on them.
8. Change the Rename tool's mode to Update Database to point to the new location mode.  This is essential!
9. In the bottom of the Rename tool's dialog, use the Find & Replace, enter .mp3 in the top box, and then .flac in the bottom box.  When you run this, it will change the extensions in the Library from MP3 to FLAC without messing with the files on disk at all (assuming you did change the mode in step 8 above).  Make sure none of the other options in the Rename tool are enabled.  You just want to change the [Filename] tag in the MC library for all of those files to make them point at the new FLAC files instead of the MP3 files.
10. Run the Rename tool.  This will fix MC's library to be pointing at the FLAC files.  You can then delete the old MP3 versions out of Windows Explorer.
11. Complete steps 9-11 in the procedure above.  This will "fix" the files' tags, and also fix the MC Library to "know" that the files are now FLAC files, have the right File Size and bitrate characteristics, and reanalyze the new versions (the results did change, I verified it).

It is an annoying and slow process, but one you can accomplish without too much trouble if you are systematic about it.  I tended to rip 5-10 discs at a time, and then get them all renamed/fixed, and then rip some more.  It took quite a few days to update the 2-3K files I wanted to re-rip (or re-buy, the same exact process works if you are downloading the new versions from Amazon or some other source instead, which I did for things were my original source discs were missing or damaged), but I got through it in one piece.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Upgrading music files, preserving tag info. How?
« Reply #5 on: January 23, 2012, 11:53:57 am »

The part of matching the filenames can be easier. You can simply use the track number (or the combination of the track number and the disc number) as the "Filename (name)" field value.

I.e.:

1. Back up everything (this should be obvious)
2. Disable auto-import
3. Rename the old files. Use the rule: [Track #] ...or something like [Disc #] - [Track #] if necessary. Of course each album must be in a separate folder, but that is probably already the case.
4. If the format and thus the filename extension changes too, do a find & replace operation to rename the old files with the temporarily incorrect filename extension.
5. Use the same naming system for the new files (but of course do not change the filename extensions). Do this outside your main MC library. If you use MC for this task, create and load a new library for ripping or renaming the new files. You can trash this library later.
6. Replace the old files with the new files outside MC. The track number based filenames will always match.
7. Do: "Update tags from library". The advantage of this is that the new files do not need to have correct tags (or tags at all). If your new files actually have more correct metadata than the library you can skip this step. The file tags will be imported in the next step.
8. Do: "Update library from tags" to fix the file format data in the database.
8. Rename the files using your preferred naming rule.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Upgrading music files, preserving tag info. How?
« Reply #6 on: January 23, 2012, 12:32:20 pm »

The part of matching the filenames can be easier. You can simply use the track number (or the combination of the track number and the disc number) as the "Filename (name)" field value.

True, true.

I didn't do this because I wanted to take the time to make sure the [Name] tag on the files, both new and old, were set how I wanted them to be.

Since these were all old files, many of them had been artificially truncated way back in the day.  For example, one of my big sets of Artists I re-ripped to FLAC was all my old Pink Floyd stuff.  Since they'd all been ripped in my "first round" of ripping 12+ years ago, at some point in time, the [Name] tags (and others) got truncated:  "One of These Days (I'm Going To Cut You Into Little Pieces)" was just "One of These Days (I'm Gon", or something like that, and I had many other similar naming issues.

Alex's suggestion would be easier if you are absolutely positive that your existing [Name] tag data is perfect in every way.  For me, in many cases, the "right" choice was what MC grabbed from YADB, not what was already there, so fixing it manually made more sense.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Upgrading music files, preserving tag info. How?
« Reply #7 on: January 23, 2012, 12:35:16 pm »

7. ...If your new files actually have more correct metadata than the library you can skip this step. The file tags will be imported in the next step.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Upgrading music files, preserving tag info. How?
« Reply #8 on: January 23, 2012, 12:41:07 pm »

Yeah, like I said... That makes more sense.  It isn't the way I chose to do it, but I was being meticulous, and wanted to go through them all.

I had LOTS of [Name] errors in those old files.  Well over 30% needed to be renamed to match YADB not the existing data.  Being able to see them side-by-side, and not having to switch my renaming presets made a lot of sense.  Plus, for some of them, I may have had two or three copies of songs with different bitrates and names and whatnot (my old stuff was a mess, part of the reason for sorting it out).  Renaming to [Track #].mp3 would have been dangerous, because I could have ended up with a bunch of duplicate [Track #] fields overwriting things or adding (1) to the filenames.

Keeping everything JUST as it was already, and only renaming the new files, allowed me to be much "safer" in the process.  My existing name structure was [Track #] - [Name].mp3, so I had to conform the new files to that.

Totally agreed, though, if you want to be quicker, and you're positive your existing file tags are "good" (but the files themselves need replaced) then go with Alex's modification to my workflow instead.

My situation wasn't so clean because I had 12+ years of ignored cruft in many of those files.  :-\

It is fixed now though!
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Upgrading music files, preserving tag info. How?
« Reply #9 on: January 23, 2012, 02:41:19 pm »

Thanks a lot for the in-depth info guys. I'll have a crack at this in a few days.
Logged
- I may not always believe what I'm saying

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Upgrading music files, preserving tag info. How?
« Reply #10 on: January 23, 2012, 02:52:02 pm »

It sure would be a nice feature to be able to select an ordered list of existing tracks, Edit > Copy Tags, select a new ordered set of tracks, and then an Edit > Paste Tags.
Logged
The opinions I express represent my own folly.

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: Upgrading music files, preserving tag info. How?
« Reply #11 on: January 23, 2012, 03:02:54 pm »

That would be great, yes. I imagine a sort of split view with drag and drop ordering and copying of all tags from one window from another one. It would simplify a lot :)
Logged
- I may not always believe what I'm saying

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Upgrading music files, preserving tag info. How?
« Reply #12 on: January 23, 2012, 03:26:18 pm »

It sure would be a nice feature to be able to select an ordered list of existing tracks, Edit > Copy Tags, select a new ordered set of tracks, and then an Edit > Paste Tags.

I've often thought that.

Or, maybe, just a "upgrade media wizard" type of system where you could easily remap an existing file to point at a new file (with the ripping step part built-in too if possible) preserving all tags that make sense to preserve.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up