INTERACT FORUM

Please login or register.

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

Author Topic: Verification of MP3 files: How to?  (Read 2017 times)

hsc

  • Regular Member
  • Recent member
  • *
  • Posts: 31
  • Change this by choosing profile
Verification of MP3 files: How to?
« on: March 07, 2006, 10:05:54 am »

Hi,

I'm looking for an easy method to validate the integrity of mp3s, preferably from inside Media Center (native or plugin).
    The background: After upgrading my PC with an additional HD I nearly lost the content of a complete old IDE disk, because of a bad IDE cable. Checkdisk was able to repair the filesystem and reported only data from 3 different Albums were lost. Later I found some additional files which seem now to have 0 bytes as filesize (about 16). What I'm now worried about is that there might be truncated files as well.
  The integrity of my APE files could be easily checked and to speed this up for the next time I converted all my APEs to 3.99. By doing this I found 2 additional files (out of 10k files) which might have been currupted by an earlier HW issue. Once I know which files are bad, I can easily restore them from my backup, so that is not the problem.  The problem is how to validate the MP3 files.
  It would be great to have the possiblity to compute a checksum just for the audio data of the mp3 file like doing Audio Analysis and adding the result to a custom tag. Of course in addition a verification function is also needed.   
  Any thoughts are welcome,

Horst
Logged

LonWar

  • Citizen of the Universe
  • *****
  • Posts: 2874
Re: Verification of MP3 files: How to?
« Reply #1 on: March 07, 2006, 12:00:50 pm »

I'm not sure if there is a way to do that... But if the corrupted file displays as 1kb, then couldn't you do a search for *.mp3 in explorer and then sort by file size?

I had some problems with a similar thing with jpg's, And they all showed as 1kb...


Just a thought.
Logged
-

hsc

  • Regular Member
  • Recent member
  • *
  • Posts: 31
  • Change this by choosing profile
Re: Verification of MP3 files: How to?
« Reply #2 on: March 09, 2006, 03:27:23 am »

I'm not sure if there is a way to do that... But if the corrupted file displays as 1kb, then couldn't you do a search for *.mp3 in explorer and then sort by file size?

I had some problems with a similar thing with jpg's, And they all showed as 1kb...

I already did the search for files <= 1kb and it turned out that the few 1kb mp3 files were all ok.

My point was more that I now want to put some mechanism in place which can tell me in the future if the audio portion of the mp3 files have been changed by some accident (e.g. HW problem, stupid user, virus etc.). Very much like the verify functionality for APE files. Maybe a plugin could be written to do this, but so far I'm still searching for a tool which will compute a MD5 checksum for only the audio part of the MP3 file.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Verification of MP3 files: How to?
« Reply #3 on: March 09, 2006, 03:39:01 am »

Maybe a plugin could be written to do this, but so far I'm still searching for a tool which will compute a MD5 checksum for only the audio part of the MP3 file.
MP3 Book helper can do this, alternatively i think King had made a plugin that could calculate this, not sure if its still active in 11.1.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20056
Re: Verification of MP3 files: How to?
« Reply #4 on: March 09, 2006, 05:20:36 am »

Quote
i think King had made a plug-in that could calculate this

Yes, but i did not continue to play with it.

It made a copy of the file, then it removed the id3 tags, then it could create a md5 of the data. it then would put that into a field and you could compare it to see if it has changed from a older scan if you wanted to.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re: Verification of MP3 files: How to?
« Reply #5 on: March 09, 2006, 06:52:00 am »

Going forward, you can use fsum to create a master list of MD5 hashes for your music folders.
fsum.exe "D:\Documents\Music\" /T:R /O /R

Then when you want to find changed/corrupt files, you can run it again in check mode against the master list.

fsum.exe "D:\Documents\Music\" /C:Diff.txt /T:R /R /V

I do this monthly before backing up my music. I want to see if what is on the hard drive is different than what is on the backup. Then I can investigate before I backup.

Once upon a time I had backed up (and overwritten) corrupt files.
Logged

hsc

  • Regular Member
  • Recent member
  • *
  • Posts: 31
  • Change this by choosing profile
Re: Verification of MP3 files: How to?
« Reply #6 on: March 09, 2006, 06:54:00 am »

Yes, but i did not continue to play with it.

It made a copy of the file, then it removed the id3 tags, then it could create a md5 of the data. it then would put that into a field and you could compare it to see if it has changed from a older scan if you wanted to.

Such a plugin would be perfect. King, was there any technical reason to stop working on this? Did you use any existing mp3 code libraries for parsing the mp3 files?
Logged

hsc

  • Regular Member
  • Recent member
  • *
  • Posts: 31
  • Change this by choosing profile
Re: Verification of MP3 files: How to?
« Reply #7 on: March 09, 2006, 07:08:48 am »

Going forward, you can use fsum to create a master list of MD5 hashes for your music folders.
fsum.exe "D:\Documents\Music\" /T:R /O /R

Then when you want to find changed/corrupt files, you can run it again in check mode against the master list.

fsum.exe "D:\Documents\Music\" /C:Diff.txt /T:R /R /V

I do this monthly before backing up my music. I want to see if what is on the hard drive is different than what is on the backup. Then I can investigate I backup.

Once upon a time I had backed up (and overwritten) corrupt files.


Thanks, I will give it a try. BTW, which fsum version do you use? I just installed version 2.51 and it does not seem to have the /T:R and /V options.
Logged

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re: Verification of MP3 files: How to?
« Reply #8 on: March 09, 2006, 10:52:28 am »

Thanks, I will give it a try. BTW, which fsum version do you use? I just installed version 2.51 and it does not seem to have the /T:R and /V options.
Sorry, the name you want is this. The executable is fsum

FastSum - MD5 Checksum Utility v1.9.0.149
http://www.fastsum.com/download/fsum-setup.exe
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20056
Re: Verification of MP3 files: How to?
« Reply #9 on: March 09, 2006, 06:08:19 pm »

the problem with this is it takes into the account that the tags change.

what should happen is you have two MD5 check-sums

one with and one without tags.

if the data in the tags change you will know that the tags have changed and that may change any time a tag is updated. this is really not too useful. unless you want to monitor the file for any changes.

the other one is no matter if the tags change the media data md5 should never change unless it re-encoded.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up