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: Comparing MP3 files (Read 5528 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Comparing MP3 files

I have many MP3 music files on many different computers and hard drive... mostly from iTunes and aside from the file names and meta data I'm looking for a way to determine if the AAC files are for the same song. BTW I've accumulated all the files on a Mac and would prefer to do the processing there, but I also have access to a PC as well.

My first thought was to take an MD5 hash of the files and compare them, but it turns out that differences in the metadata can cause the MD5 hash to differ between 2 copies of the same song. I also tried to delete all metadata (used id3v2 --delete-all) and then compare the MD5 hashes, but it seems like other info stuffed into the file also causes different MD5 hashes.

So if I could somehow extract the raw MP3 audio data from the file then write it to a temp file and take the MD5 has of that, it should allow me to detect identical files.

I've used a similar approach to compare JPEG files, but I can't seem to find a way to get at the raw MP3 audio data.

Also looking to do the the same to compare AAC files...

Thanks in Advanced
-Greg

Comparing MP3 files

Reply #1
You could decode them to PCM and compare, although this would depend on both files having the same gapless information, which is usually the case.

Comparing MP3 files

Reply #2
He is talking about comparing an mp3 file to an AAC file. The PCMs will never match.

Comparing MP3 files

Reply #3
He is talking about comparing an mp3 file to an AAC file. The PCMs will never match.


no, I'm just talking about comparing like format files... i.e., mp3 to mp3 and aac to aac



 

Comparing MP3 files

Reply #6
Addon for foobar2000 which does SHA-1 hashing of selected files. It hashes the raw decoded PCM data.