Re: Protecting audio files from bit rot?
Reply #84 – 2016-08-23 09:26:07
FWIW, this thread says foobar can also check MP3 frame CRCs:https://hydrogenaud.io/index.php/topic,68536.0.html This is imperfect since you could still have truncations of the file (whole frame deleted) that might be missed, but it would notice minor errors or bit flips, at least assuming you have the CRC option enabled when encoding files. I'd like to point out a few facts about MP3 CRC that seem to be largely unknown to the general public. Source:http://www.mp3-tech.org/programmer/docs/mp3_theory.pdf This field will only exist if the protection bit in the header is set and makes it possible check the most sensitive data for transmission errors. Sensitive data is defined by the standard to be bit 16 to 31 in both the header and the side information. If these values are incorrect they will corrupt the whole frame whereas an error in the main data only distorts a part of the frame. A corrupted frame can either be muted or replaced by the previous frame. tl;dr You can flip bytes in MP3 file with a hex editor and most of the time CRC checks will not detect audible defects; they safeguard only a specific small part of each MP3 frame. The MP3 CRC field is meant for preventing massive audible distortion when streaming over an unreliable medium, not for detecting storage errors. On top of that, working on frame basis, they do nothing about protecting the file as a whole, against truncation or insertion of unwanted data.