Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: iTunes Match vs original comparison script (Read 3390 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes Match vs original comparison script

Hello all, I've been lurking about here for a while and thought I'd contribute a script I knocked together.

It takes my old mp3s, calculates their DRC using http://www.pitchtech.ch/DRC-Meter/, and then does the same with the 'new' m4a versions. Hopefully it will be of use to some of the folk on here. I use it to find any tracks where the old version is 'better' by being less compressed/loud etc.

Further explanation here: http://www.tristancollins.me/2012/02/22/it...-analysis-tool/

Code: [Select]
#!/bin/sh
# Script to compare my original mp3s to the new 'matched' versions
# Copyright © 2012 W Tristan Collins - All Rights Reserved
# Do what the hell you like with this.
SAVEIFS=$IFS # save the old IFS variable
IFS=$'\n\b' # change IFS to cope with spaces in paths/filenames
oldFILES=source/* # directory of old mp3s
newFILES='/Users/Tristan/Music/iTunes/iTunes Music/*' # iTunes music directory
extension='.mp3' # set the extension we are looking for, in this case mp3
# prepare output file
echo Name,Old Dynamic Compression,New Dynamic Compression > out.csv
echo Name Old New
for file in $oldFILES # for each of the original mp3s
do
oldNAME=`basename $file $extension` # strip the path and extension
newNAMEarray=(`find $newFILES -name $oldNAME\*`) # find the corresponding new file
for i in ${newNAMEarray[*]}
do
# echo "$i" # this is where the comparison could be done
# This is a measure of Dynamic Range Compression
# using [url=http://www.pitchtech.ch/DRC-Meter/index.html]http://www.pitchtech.ch/DRC-Meter/index.html[/url]
# Smaller numbers are better (less obvious compression used)
procold=$(java -jar DRC-Meter/DRC-Meter.jar "$file" | tail -c 5)
procnew=$(java -jar DRC-Meter/DRC-Meter.jar "$i" | tail -c 5)
echo $oldNAME $procold $procnew
echo $oldNAME,$procold,$procnew >> out.csv
done
done
IFS=$SAVEIFS
exit 0

I'm not an expert on these things so would welcome any input or help extending the script further.

Cheers,

Tristan

 

iTunes Match vs original comparison script

Reply #1
Since I had quite a few people visiting my site after I posted this, I thought I'd give you the results after (finally) running the script on my iTunes library.

As far as DRC is concerned (and I am aware of the issues measuring this - I am no expert), and without bother to do any complex statistics (just don't have the time), the output indicates that the 'new' versions supplied by iTunes Match have slightly more DRC (more compressed) than the originals. But this is only slight. The vast, vast majority of the new files are practically identical. There are a few outliers where there are big differences indicating potentially differing sources.

Read more here - http://www.tristancollins.me/2012/06/10/it...alysis-results/

Anyway, I'm happy with iTunes Match.

If anyone has a better way of analysing this please let me know!

Tristan

iTunes Match vs original comparison script

Reply #2
Just checking: did you verify the results of your script with your ears?

iTunes Match vs original comparison script

Reply #3
As far as DRC is concerned (and I am aware of the issues measuring this - I am no expert), and without bother to do any complex statistics (just don't have the time), the output indicates that "the 'new' versions supplied by iTunes Match have slightly more DRC (more compressed) than the originals. But this is only slight. The vast, vast majority of the new files are practically identical. There are a few outliers where there are big differences indicating potentially differing sources.

If the file is in Apple's catalogue, you get whatever version they have through Match. This version does not need to have come from the same master source as your file, so differences to your files are very much expected. This is not a backup solution, but rather an option to access your files from anywhere, just like Google Music offers, too. Though Google to my knowledge just stores your own copies instead of matched ones. For the more illegal crowd, it's also an opportunity to launder pirated music through Apple.
So, the generalization that ""the 'new' versions supplied by iTunes Match have slightly more DRC" is invalid, since the opposite is just as likely. That said the "Mastered for iTunes" program has some traction among known horrible engineers, which could very likely result in a higher abundance of highly DRCd tracks on iTunes.

If the file is not in Apple's catalogue, you should get back your old version through Match.

Anyway, I'm happy with iTunes Match.

That's the most important point. If you fear though that iTunes Match doesn't deliver the quality you have on your CDs, you should probably keep a separate rip of those just in case.
It's only audiophile if it's inconvenient.

iTunes Match vs original comparison script

Reply #4
Just checking: did you verify the results of your script with your ears?


Ha - ears? Nah, it's all about the waveform ;-) Only joking.

The biggest difference to my ears (again, no way an expert but I do hate digital compression artifacts, especially on cymbals) has been in the 128bit, LAME version circa 2000, napster downloaded tracks. So no surprises there. With the tracks I care about I would have always encoded them at 192 (which was a luxury with the storage of mp3 players back in 2000) so the difference is less noticeable to me.

iTunes Match vs original comparison script

Reply #5
If the file is in Apple's catalogue, you get whatever version they have through Match. This version does not need to have come from the same master source as your file, so differences to your files are very much expected. This is not a backup solution, but rather an option to access your files from anywhere, just like Google Music offers, too. Or, for the more illegal crowd, an opportunity to launder pirated music through Apple.
So, the generalization that ""the 'new' versions supplied by iTunes Match have slightly more DRC" is invalid, since the opposite is just as likely. That said the "Mastered for iTunes" program has some traction among known horrible engineers, which could very likely result in a higher abundance of highly DRCd tracks on iTunes.


Yep agreed. This exercise was purely a result of me looking at the waveform of new vs old files and seeing an obvious difference. I then asked myself if the tracks would be subjectively 'better' or 'worse' in a loudness/clipping-type of way. Hence the script.

Partly I was intrigued by how Apple's audio fingerprinting was working; it must allow for slightly differing levels and track lengths.

There is a slight bias in my sample towards less DRC in the Match files but (as you rightly allude to) some of my files were probably sourced by less-than-reputable means whilst some were from my CDs (I remember sitting one summer back in 1998 with my original iMac and my CD collection going through them one by one...). I view Match as simply a labour-saving way of upgrading my rips! Anyhow, it was interesting for me.

That's the most important point. If you fear though that iTunes Match doesn't deliver the quality you have on your CDs, you should probably keep a separate rip of those just in case.


Indeed - if I ever have the time I'll go back and do it properly. If I haven't re-bought them all by then!