Hydrogenaudio Forums

Lossy Audio Compression => MP3 => MP3 - General => Topic started by: hydroplane on 2020-04-02 15:24:54

Title: MP3 CRC/checksum information
Post by: hydroplane on 2020-04-02 15:24:54
this post (https://hydrogenaud.io/index.php?topic=32100.msg279615#msg279615) got me thinking...

i had thought that every audio frame had CRC information added when encoding, but apparently this is not the case since LAME does not enable the -p option by default and, indeed, if i check for a CRC checksum with a tool like MP3 Diags, it seems rare to find one that has a CRC

what i don't understand is why MP3 Diags, or other tools like MP3info, do not see a CRC in a given file, yet mp3sum (https://github.com/okdana/mp3sum) does?

mp3sum seems to be looking at headers and not frames which begs the question of whether there are different methods of storing CRC info used to validate the audio stream where one writes CRCs to a header and another to frames ???
Title: Re: MP3 CRC/checksum information
Post by: hydroplane on 2020-04-03 00:19:36
i got my question answered by the developer of mp3sum - there are indeed (at least) two ways to store CRC checksums for verifying the audio stream; one being in the actual audio frames (a bad idea apparently) and the other being in the "info" header
Title: Re: MP3 CRC/checksum information
Post by: [JAZ] on 2020-04-03 16:10:50
The CRC on MP3 was indeed a per-frame thing, and obviously indicates if that frame is correct, or has been damaged when transmitting.
It is not recommended to use it for stored files, because that means less bits are available to encode audio.

The "info" header is not an mp3 header. I assume he means the LAME "INFO" tag on the ancillary data of the first frame that contains several information like the version a or the gapless playback info.
I don't remember, but it could be that it also contains a whole-file CRC (but I'm unsure right now)
Title: Re: MP3 CRC/checksum information
Post by: hydroplane on 2020-04-05 20:39:45
> The "info" header is not an mp3 header. I assume he means the LAME "INFO" tag ...

yes, correct - that was my mistake

and thanks for your answer
SimplePortal 1.0.0 RC1 © 2008-2020