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: Recovering FLAC's deleted from hard drive (Read 5862 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Recovering FLAC's deleted from hard drive

Hello everyone
some time ago I had - amongst other stuff -  a part of my flac collection  (ca. 200 gb) accidentally deleted from my external hard drive (don't ask how, I "experimented" with some drivers for my VAIO bluetooth and suddenly on opening one, I just noticed files being deleted - just saw as folders disappear one by one in the hard drive window, only managed to plug out the disk to limit my losses).
anyway, I bought a software which I used to recover photos, mp3's, videos in different formats, lots of  kinds of other files/formats and the problem is with the flac files.
first of all, the recovery software sees all the flac's (and other lossless) as "probably overwritten." this is strange because for instance some of the albums were copied to the disk just before the deletion, and generally, this was just a storage disk, not much copy/cut/paste/delete/save was going on there, except from putting the stuff there once and for good.
of course, I know that some of the files must be overwritten, I mean, properly overwritten but my point is, some of the files can't just be overwritten (in terms of how saving on hd works). besides, inside the same music folders where the flacs appear corrupted, there's bunch of other files, like art work for example which are not corrupted and were recoverd completeley.
now, I don't know how about the recovery software seeing the FLAC (and other lossless) files as "probably overwritten" I asked that question to the manufacturer, but haven't got the answer.

SO, my question to you guys is: are FLACS,APE's etc prone to getting corrupted when deleted and recovered? (maybe because of how they're built - MD5, CRC - these are just my guesses) and therefore the damage is permanent? anyone had similiar experience? or is there a way to repair lossless files?

Some details on what I tried:
- any action in foobar (like opening such flac, veryfying integrity) just gives me :(Unsupported format or corrupted file)
- in dbpoweramp try to convert it to wave or test coversion: Information converting to Wave,  md5 did not match decoded data, file is corrupt.
- in dbpoweramp try to convert it to flac: Error input channel count more than FLAC can handle.  [clEncoder::BeginConversion]
- audio tester - 1 file scanned, 1 file failed: (LOST_SYNC @ 0m 00s); the same with FLAC TESTER.
- FLAC FRONTEND: even with the errors option ticked it says: Run-time error '75 path/file access error

also I opened the flacs (but only e few of them, because this is where chinesse begins to me ;-) and simply lost hope ) with hex editor looking for the flac sequence numbers but I couldn't find one proper sequence

  I'll be happy to know if I'm just wasting my time
thx in advance
eveafterdark

Recovering FLAC's deleted from hard drive

Reply #1
of course, I know that some of the files must be overwritten, I mean, properly overwritten
Yes. Deleted files are not normally physically deleted but simply have their allocated space freed to be usable for data from subsequently written files.

Quote
but my point is, some of the files can't just be overwritten (in terms of how saving on hd works). besides, inside the same music folders where the flacs appear corrupted, there's bunch of other files, like art work for example which are not corrupted and were recoverd completeley.
Assuming you mean that they couldn’t be overwritten because of the short space of time between your accidental deletion and attempt to recover them, then do you have any other processes that may have written to the external HD in the interim? If you are really confident that overwriting is highly unlikely, could you try using another program to attempt the recovery? Various free ones exist.

In general, larger files such as those of lossless audio are even more likely to be overwritten, since, upon deletion, they represent larger contiguous areas of free space, which will be preferred by the OS writing subsequent files to avoid fragmentation.

Quote
SO, my question to you guys is: are FLACS,APE's etc prone to getting corrupted when deleted and recovered? (maybe because of how they're built - MD5, CRC - these are just my guesses) and therefore the damage is permanent?
Not any more prone than any other deleted file. I am not aware of the specifics, but freed space will be used by the OS as it sees fit, based upon sizes of blocks, proximity to existing blocks of already present files, etc.

Edit: Well, actually, yes, if you are asking whether encoded/compressed data that relies upon blocks, RLE, etc. is more susceptible to serious/irreparable damage than uncompressed, linearly stored files would be, then that is true. A single byte changed in a compressed stream may damage an entire adjacent region or (I imagine, in extreme circumstances) the entire stream. In contrast, in an uncompressed stream, you could just ignore or amend that byte, and its neighbours would be unaffected.

Quote
anyone had similiar experience? or is there a way to repair lossless files?
Perhaps, although I wouldn’t get your hopes up if it turns out that the files in question were indeed overwritten, as entire parts are likely to have been changed, possibly including quite essential data. You may be able to recover certain spans of files, but I wouldn’t hold your breath that you’ll be able to get (m)any back in their entirety (edit: and regions that you do get back may not be recoverable for playback, anyway). I hope they’re not as badly overwritten as the program suggested, of course.

Recovering FLAC's deleted from hard drive

Reply #2
thanks for your reply db1989
I'll definitely try some other recovery software before I give up completeley (though I don't think they can do much difference?), just waiting for the answer from the manufacturer of my software ( and I chose it despite it's paid because it had very good reviews from professional companies that deal with data recovery.
I think what you wrote about bigger files getting corrupted easier makes perfect sense since even small files like mp3s or photos get corrupted or their content gets mixed.
Also, the thing you added about encoded/compressed data being more easily corrupted is what I originally thought.
Between the saving  and deletion I might have saved some small file (no other processes this was a storage disk used for playback) , for sure I saved  the driver file that caused all the deletion... but as I looked into the recovered flacs it seems that each one of them is corrupted.
The other  thing that keeps me wondering is that I had several of my blue-ray movies ripped, kept in matroska containers on that hd. these files were like 3-5 GB and had gotten deleted too, then recovered. And they're perfect,  as much as I managed to check on them (I watched parts of each movie and they were ok)

Recovering FLAC's deleted from hard drive

Reply #3
I hope you recovered your files to another hard drive so you didn't overwrite portions of the old files with the recovered files. Also, if the FLACs were on your system drive, there's always the possibility that programs in memory were writing temp files to the disk, or the Windows swap file was writing to disk as you were doing your recovery. Hopefully, you still have the original CDs or can re-download the corrupted files.

Next step should be a trip to the nearest Staples. Buy a 3TB WD My Book for $150 and back up all your stuff externally.

Recovering FLAC's deleted from hard drive

Reply #4
Glad to be of some help. Let us know how you get on!

I hope you recovered your files to another hard drive so you didn't overwrite portions of the old files with the recovered files.
Excellent point: thanks for catching that.

Quote
Also, if the FLACs were on your system drive, there's always the possibility that programs in memory were writing temp files to the disk, or the Windows swap file was writing to disk as you were doing your recovery.
I thought about this, but then I saw that the initial post identified the drive as external, and I don’t believe Windows writes to such drives without explicit instruction; also, the newer reply confirms that the drive was (or at least was intended to be) used for storage only.

The seeming lack of reasons for the FLACs to have been overwritten, and the fact that the MKA files seem to have fared better (or not been damaged at all), are quite intriguing. My guess is there must be some reason, as FLAC as a compressed format does not have some peculiar shortcoming, or MKA some huge advantage, that would make the former so much more vulnerable to corruption.

Recovering FLAC's deleted from hard drive

Reply #5
Try this one before you give up, I use for work as well and it always gave great results: http://www.powerdatarecovery.com/index.html

Remember everything you do can overwrite the unused space where the files were, even a simple restart.

Recovering FLAC's deleted from hard drive

Reply #6
Give a try to Photorec. Free and CLI, but very powerful especially for multimedia files.
Of course target the rescued files repository to another drive than the recovering one (in this moment I don't remember if Photorec would even allow you to act differently).
... I live by long distance.

Recovering FLAC's deleted from hard drive

Reply #7
thank you guys.
the disk where the files got deleted is an external HD, and was used to store data and for playback (as I kept archiving stuff, I just saved it to that disk, just added stuff, and did not do much else - of course, there were things I deleted, changed names, etc, sometimes edited and saved, but not that much).
I recovered deleted files straight to my VAIO hd, so no portions of the old files have been overwritten on the external hd. to make it clear - no save/delete/copy/cut etc has been done on the external hd since the deletion.
I willll certainly try out Powerdatarecovery and Photorec, thx for that. also maybe I have to look at RAW recovery, the software I use does this, I just didn't look at it since I got the whole folders tree in the first place.
I also received an answer from the software developer - I asked them if the software may "see" deleted files like flac,ape etc. as 'probably overwritten' because of their specific structure (compressed , MD5 sum, CRC and so on). And the answer is that for such files "correctness" of the "head" is not chcecked /correctness of the file/. (not sure if "head" is a proper word, since it's my translation to ENG, but I think they meant the "beginning" of the file.)    They also said this means that the recovery software simply can not decide whether the files are overwritten or not, so I think this strictly refers to the way data is saved on a hd.
They also suggest to use a  hex editor on the corrupted file and on the original file and compare them.
As I mentioned before I did some hex editor checking because I read about it in other thread (corrupted files due to some bad MM tagging, I think it was some old thread).
But if I got that right though, there shoud be this "fLaC" sequence at the begining of every flac. And the sequence is 66 4C 61 43.
Well, I searched for such a string on a couple of corrupted flac files and I could not find it. I found parts of it , for instance the middle 4C is missing or I got "fL" only
Doesn't this mean such files are definitely lost?

Recovering FLAC's deleted from hard drive

Reply #8
We forgot to ask you what file system you're using for the storage drive. From the utilities you're using, I assume it's NTFS.

As long as you've got your hex editor out, look at the documentation for the FLAC file format and see if there's a pattern to the corrupted bytes (for example, 4C is often missing but the other bytes are correct in the identifier). If you can find a pattern for the damage, running a replace operation might work for at least those files that match the pattern. It's a long shot, but if they're really important files (I hope they're not) it might be worth the time and effort if your forensic utilities can't help.

On the other hand, your time might be better spent scouring eBay or your local thrift shops/used CD stores for replacements. Used CDs, as you know, are very cheap these days. You haven't told us what's in the files you're trying to recover, so I'm just assuming they're either commercial music or legally circulating live shows.