INTERACT FORUM

Please login or register.

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

Author Topic: Feature Request: Audio File Integrity CHecker  (Read 777 times)

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1476
Feature Request: Audio File Integrity CHecker
« on: February 14, 2021, 09:23:07 pm »

Reviving this old post:  https://yabb.jriver.com/interact/index.php/topic,120813.msg835292.html#msg835292

I found a bunch of corrupted audio files on one of my hard drives not sure how it happened but I had about 30-50 files out of thousands which couldn't play and were without tags.  Fortunately this was isolated to an external drive out of 4-5 backups I also have on other PCs. It also seems to be specific to audio files as I also had a bunch of other files which all seem ok... 

I thought the external hard drive was bad but SMART Status was fine, Windows Check Disk could not find errors and WD diagnostics reported the drive was working fine.  The only thing I can think of is my son disconnected it without ejecting at one point...

I used MP3 tag to find most of them as they didn't have tags but the tool that was the most helpful was the File Integrity checker component in Foobar.  I scanned my entire library and not only did it find a few more bad files which had a lot of bad frames but I also found a few more files with only a few bad frames that would play just fine but only had one or two very subtle glitches.  Those files were ripped either accurately with dBpoweramp or with MCs SecureRip.  So those glitches were introduced at one point by something...Tag edition? Lyric addition? I don't know)...This part is scary.  Most of these bad files however had a similar Modified Date so whatever did it it seems like it happened on that date.  Those files still import fine in MC and are not considered bad.  So I have 30 or so ALAC files that got corrupted by the external drive plus another 20 or so with minor glitches plus 186 mp3 files  which I don't really care about and were most likely always bad.

I also had thousands of ALAC files reporting the file length was inaccurate. The audio is fine and just reconverting ALAC->ALAC in MC fixed this issue.  I realise JRiver can't have all the bells and whistles but since a lot of us are paranoid about the quality of their audio such a tool to report on file integrity would be great!

I will definitely pay a closer look at my files as I always synchronise my library between hard drives especially for Lyrics updates... Something messed up my files and I hope it won't happen again...Wondering if I shouldn't go back to FLAC which has Error Handling...

Thx
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42383
  • Shoes gone again!
Re: Feature Request: Audio File Integrity CHecker
« Reply #1 on: February 16, 2021, 12:25:20 pm »

I run Verify on my Monkey's Audio collection often.  It's just an MD5 read so is really fast.

MP3 doesn't have anything like that unfortunately.
Logged
Matt Ashland, JRiver Media Center

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1476
Re: Feature Request: Audio File Integrity CHecker
« Reply #2 on: February 16, 2021, 03:01:33 pm »

I run Verify on my Monkey's Audio collection often.  It's just an MD5 read so is really fast.

MP3 doesn't have anything like that unfortunately.

Can this be done on other Lossless codecs such as FLAC or ideally ALAC?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Feature Request: Audio File Integrity CHecker
« Reply #3 on: February 16, 2021, 03:18:36 pm »

FLAC has MD5 checksums for the decoded data, not sure about MP3.

Would it be possible to compute and store in a Field the MD5 for the entire file (regardless of format), excluding the Tag blocks? This could then also be used for Video/Picture/Data files.

This would not so much detect if the file is corrupt, but would at least detect if the file was changed...
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Feature Request: Audio File Integrity CHecker
« Reply #4 on: February 16, 2021, 03:36:45 pm »

I don't want to sound like I'm opposed to having an integrity checker, it would be nice.  But not as nice as some people might think.

Although md5 is "fast" on a file, a smallish file, it is NOT fast on 10,000 or 50,000 files.

Hashing just the the audio part of the file is good for avoiding the problem caused by tag changes, but it will not make the process of "check all my audio files" appreciably faster.

With even moderately sized libraries, this will not be a fast or lightweight process, even though it might have value.  It will be slow and take a long time to run, which will discourage people from using it.

Computing the checksum when the file is read for playback would be relatively painless, but by that point you probably know anyway if the file has been corrupted.
Logged

imeric

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1476
Re: Feature Request: Audio File Integrity CHecker
« Reply #5 on: February 16, 2021, 04:00:36 pm »

I don't want to sound like I'm opposed to having an integrity checker, it would be nice.  But not as nice as some people might think.

Although md5 is "fast" on a file, a smallish file, it is NOT fast on 10,000 or 50,000 files.

Hashing just the the audio part of the file is good for avoiding the problem caused by tag changes, but it will not make the process of "check all my audio files" appreciably faster.

With even moderately sized libraries, this will not be a fast or lightweight process, even though it might have value.  It will be slow and take a long time to run, which will discourage people from using it.

Computing the checksum when the file is read for playback would be relatively painless, but by that point you probably know anyway if the file has been corrupted.

I don't really care how long it takes as long as it can validate the audio integrity within the container.  This would be run weekly or monthly just to ensure files are ok.

Looks like how it's done by the foobar checker is sufficient.  It does take about 5-10 hours for close to 50 000 files.  It could be implemented via a check box in the file import option or a right click under the Library tools...   
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7812
  • Autumn shade...
Re: Feature Request: Audio File Integrity CHecker
« Reply #6 on: February 16, 2021, 04:02:34 pm »

If such a thing is added, hopefully the feature itself along with the storing of the MD5 tag is made optional.
Logged
I don't work for JRiver... I help keep the forums safe from "male enhancements" and other sources of sketchy pharmaceuticals.

Windows 11 24H2 Update 64-bit + Ubuntu 24.10 Oracular Oriole 64-bit | Windows 11 24H2 Update 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 33 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Feature Request: Audio File Integrity CHecker
« Reply #7 on: February 16, 2021, 04:05:54 pm »

If such a thing is added, hopefully the feature itself along with the storing of the MD5 tag is made optional.
Agreed.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: Feature Request: Audio File Integrity CHecker
« Reply #8 on: February 16, 2021, 06:21:52 pm »

It should be possible for a third party program to do this, using MCWS.
Logged

newsposter

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 789
Re: Feature Request: Audio File Integrity CHecker
« Reply #9 on: February 16, 2021, 08:40:05 pm »

implemented along with a strong caution that the integrity checking can take a very very long time......
Logged

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: Feature Request: Audio File Integrity CHecker
« Reply #10 on: February 16, 2021, 09:07:33 pm »

Thats why i am sitting on FreeNAS  ... checksum is part of the OS ... though if you copy already corrupted file to it, it wont detect it - all it does is prevent bit rot.
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)
Pages: [1]   Go Up