Welcome Guest ( Log In | Register )

Corrupted FLAC fixed after conversion
post Nov 21 2012, 23:40
Post #1

Group: Members
Posts: 1171
Joined: 11-February 12
Member No.: 97076

It happened few times that I had corrupted FLACs, probably 3-4 files in my entire library. One day I converted them to WAV then reconverted back to FLAC, the audio CRC ended up to be the same but the FLAC was no longer corrupted. Is this a real way to fix the corrupted FLAC? Why wasn't the WAV corrupted like the FLAC originally was?

This post has been edited by eahm: Nov 21 2012, 23:49
Go to the top of the page
+Quote Post
Start new topic
post Nov 22 2012, 22:15
Post #2

Group: Members
Posts: 1995
Joined: 30-November 06
Member No.: 38207

No, I think the damage is permanent. Just like a scratch in a recording from a vinyl; you have copied it with the scratch sound, but encoded it to a new file. The new file cannot tell whether the scratch was supposed to be there, all it knows is that the file integrity is OK (meaning, it contains what it was fed, which includes the scratch).

My best guess is as follows:

Checksum #1 was created from a best-effort decoding of a damaged file.
That best-effort decoding is encoded to a new file.
That new file decodes to the same thing as the best-effort of the first one. Only now it does not warn, because it does not know that it was fed a damaged audio stream.

One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
post Nov 22 2012, 22:56
Post #3

Group: Members
Posts: 423
Joined: 16-December 10
From: Palermo
Member No.: 86562

If I'm not wrong, metaflac --show-md5sum option shows md5 checksum of full input data stream at encode time. If something went wrong during or after encoding and musical data are corrupted, comparing this value with an md5 of the decoded wav (which as Porcus said must be considered decoder's best effort to recover original data) will result in a mismatch.
I guess that's what foo_verifier does.

Edit: of course a new FLAC file which uses the newly decoded wav as input stream will hold the new md5 value and next test will not fail.

This post has been edited by Nessuno: Nov 22 2012, 23:05

... I live by long distance.
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 29th December 2014 - 16:24