Bulk change library files from mp3 to m4a

Let's say I want to substitute all the songs in 4 of my total 5 playlists (old 128kbps mp3 at the moment) with better, newer versions (q0.55 aac).
I wouldn't like to loose all the datas such as stars, number of listened times, last played data and so on.
How could I substitute the files other than manually editing the xml iTunes library by hand (and that sounds bad) for over than a thousand file?

Ibook 12'' 1.33ghz and MBP 15'' 2.2ghz, Mac OS X (10.4.11), Waiting for Nehalem...

Posted on Jan 5, 2010 9:27 AM

Reply
28 replies

Jan 6, 2010 2:43 AM in response to flapane

Since you have ALAC (Apple Lossless Audio Codec), itunes can use that.
I thought your first post said you had FLAC (Free Lossless Audio Codec) files.....that isn't the same as ALAC.



+I think that I'll have to manually substitute every song (weird, boring, tiring, but it seems like there won't any other way).+
Yes, since you do not have the physical CDs.
If you had the CDs, you could re-rip them using itunes and then itunes would ask about replacing the files.

Jan 6, 2010 2:53 AM in response to Katrina S.

Sorry, but I don't understand why:
The library has this kind of entries:
<key>Play Count</key><integer>4</integer>

Why shouldn't be imported? That would be nonsense to me.

I'm not sure if you understood well what I'm trying to say.
Let's make an example:
<key>1149</key>
<dict>
<key>Track ID</key><integer>1149</integer>
<key>Name</key><string>Esquadros</string>
<key>Artist</key><string>Adriana Calcanhotto</string>
<key>Album Artist</key><string>Adriana Calcanhoto</string>
<key>Composer</key><string>Adriana Calcanhotto</string>
<key>Album</key><string>Perfil Serie</string>
<key>Genre</key><string>Brazilian Music</string>
<key>Kind</key><string>File audio MPEG</string>
<key>Size</key><integer>3039848</integer>
<key>Total Time</key><integer>188342</integer>
<key>Track Number</key><integer>5</integer>
<key>Year</key><integer>2003</integer>
<key>Date Modified</key><date>2007-01-11T14:23:02Z</date>
<key>Date Added</key><date>2006-09-18T20:31:18Z</date>
<key>Bit Rate</key><integer>128</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Play Count</key><integer>4</integer>
<key>Play Date</key><integer>3307048306</integer>
<key>Play Date UTC</key><date>2008-10-16T23:31:46Z</date>
<key>Skip Count</key><integer>6</integer>
<key>Skip Date</key><date>2009-07-03T00:19:28Z</date>
<key>Artwork Count</key><integer>1</integer>
<key>Persistent ID</key><string>E8896D4F7802E1CA</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string> file://localhost/D:/Altro/MP3/Canzoni%20Brasiliane%20e%20%20Animazione%20Estate/ Adriana%20Calcanhotto%20-%20Esquadros.mp3</string>
<key>File Folder Count</key><integer>3</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>

becomes:

<key>1149</key>
<dict>
<key>Track ID</key><integer>1149</integer>
<key>Name</key><string>Esquadros</string>
<key>Artist</key><string>Adriana Calcanhotto</string>
<key>Album Artist</key><string>Adriana Calcanhoto</string>
<key>Composer</key><string>Adriana Calcanhotto</string>
<key>Album</key><string>Perfil Serie</string>
<key>Genre</key><string>Brazilian Music</string>
<key>Kind</key><string>File audio MPEG</string>
<key>Size</key><integer>3039848</integer>
<key>Total Time</key><integer>188342</integer>
<key>Track Number</key><integer>5</integer>
<key>Year</key><integer>2003</integer>
<key>Date Modified</key><date>2007-01-11T14:23:02Z</date>
<key>Date Added</key><date>2006-09-18T20:31:18Z</date>
<key>Bit Rate</key><integer>128</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Play Count</key><integer>4</integer>
<key>Play Date</key><integer>3307048306</integer>
<key>Play Date UTC</key><date>2008-10-16T23:31:46Z</date>
<key>Skip Count</key><integer>6</integer>
<key>Skip Date</key><date>2009-07-03T00:19:28Z</date>
<key>Artwork Count</key><integer>1</integer>
<key>Persistent ID</key><string>E8896D4F7802E1CA</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string> file://localhost/D:/Altro/MP3/Canzoni%20Brasiliane%20e%20%20Animazione%20Estate/ Adriana%20Calcanhotto%20-%20Esquadros.m4a</string>
<key>File Folder Count</key><integer>3</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>

Unless every file has a md5 hash (omg, it's only music 🙂 ), I don't see why it shouldn't work.

Jan 6, 2010 3:10 AM in response to flapane

OK, go ahead and edit the XML file and import it, and you'll see what I mean about getting duplicates.


iTunes uses the ITL file as its database. You cannot directly edit the ITL file.
So be sure to make a backup copy of your ITL file before you start fiddling around, so you can get things back.
Anyway, as soon as you open itunes, it will overwrite your edits unless you get rid of the ITL file by damaging it somehow - like renaming it.



You can close itunes, edit the XML, damage the ITL file, and see if that does what you want.
I think itunes might crash due to bad data in the kind, size, & bit rate fields, but go ahead!

Jan 6, 2010 11:07 AM in response to Katrina S.

Ok, what sounds weird is that exporting COUNTER/LAST PLAYED/ADDED DATE, as you said, is useless, so why did Apple decide to operate in this way, including those datas in the xml exported library, if they would be useless on a fresh installation-other computer-newly imported library?
I understand that the problem occurs only when you EDIT the xml file (ie. changing the extensions?), but I really don't like this behaviour.
I would like to be free to mess around with an exported library.

I don't understand what should happen if you try to import this library on a new computer.
There shouldn't be any ITL file there, so what would happen?

Jan 6, 2010 11:22 AM in response to Chris CA

Just trying to be in an average user shoes, who probably doesn't even know where that folder is (that doesn't sound very "think different" to me, but that's off topic and a personal tought 🙂 ).
Unfortunately your answer leads to the conclusion that I'll have to manually substitute every file in this way:
-delete the mp3
-try to play it: iTunes will ask to localize the file
-localize the new, m4a version
-go to step 1 for i<=num totalsongs
-take an aspirine

Jan 6, 2010 11:35 AM in response to flapane

Have a look at these...
-> iTunes Track CPR v1.3
"This script attempts to locate the files of so-called "dead tracks"--iTunes tracks designated with (!)--that you assume are not actually missing but are still located in the iTunes Music folder in their "iTunes File Order" (Music -> Artist -> Album -> file.xxx). Any correct files found will be added to iTunes and will replace the "dead track" in each playlist it appears in (except Smart Playlists). Most tag data will also be rescued."

-> Bring Out Yer Dead v1.1
"This script applet will allow you to select a "dead" file track in iTunes (designated with the (!)) and attempt to locate a file using Spotlight that corresponds to the selected track's Song Name, Artist, and Album, and then allow you to replace the "dead track" with a file from the search results. All tag data is preserved from the original track selected and copied to the newly added track."

Start off with just one album first and see if these will do the job.
Move the files from one album in the iTunes music folder to a folder on the desktop (don't delete them).
Put your AAC songs in there.
Select the songs in iTunes then run one of the scripts above.

Jan 7, 2010 12:26 AM in response to flapane

I don't understand what should happen if you try to import this library on a new computer.
There shouldn't be any ITL file there, so what would happen?


There HAS to be an ITL file. iTunes can't run without it.


If it can't find one, it creates a new blank one.
So if you damaged the existing ITL file, you can try to import the edited XML file.
By damage,I mean open the ITL file in WordPad, hit ctl-A and delete everything, and save it. It will have zero bytes, but it will exist, so itunes won't create a new one.


You went through all the trouble to re-rip your CDs and now there is even more work!
I still don't think it's going to work properly by just changing the file extension in the XML file. Your new files are going to be a much bigger size, a completely different format, than what the XML is telling itunes they are.

Jan 7, 2010 3:45 AM in response to flapane

@ChrisCA
Thanks, I'll have a look at those script in the local noon, let's hope it could ease the pain.

@Katrina S.
I am not very masochistic, but it's too late now, I hadn't much spare time to work with the physical cd's in these Xmas holidays, so the only option seemed to be: "rip losslessy (N.B I don't rip the whole medias, but only the tracks I enjoy) and then we'll see what to do"

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Bulk change library files from mp3 to m4a

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.