HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: shitdarling on 2024-04-25 19:32:28

Title: Can ALAC/m4a detect file corruption?
Post by: shitdarling on 2024-04-25 19:32:28
I have found amount of article, and know that flac/ape/tak can check audio integrity with inner crc info and outter md5.
ALAC/m4a is also open. But its format is so complicated (so many "box" type with different meta info), and I try to find crc or md5
in the format  structure detail description, and cant find them.

I have tried use an hex editor directly change some random bytes in middle of the alac file.
First time I change 2 position, [foobar 2000 - verify integrity] says it's ok. So the check tool cant detect this change.
Second time I change 2 more position, and this time the tool report :
"Reported length is inaccurate : 4:25.653333 vs 4:25.560454 decoded
Error: Decoding error: Unsupported format or corrupted file, frame: 2112 of 2861".

May there anyone know much about ALAC/m4a structure could tell me :
Can ALAC/m4a detect file corruption? (with inner metadata like crc/md5?or other mechanism?) O:)
Title: Re: Can ALAC/m4a detect file corruption?
Post by: Porcus on 2024-04-25 19:36:32
I tested some of it: https://hydrogenaud.io/index.php/topic,122094

I did get some error reported (Reply #9) - when I destroyed a frame header.
Title: Re: Can ALAC/m4a detect file corruption?
Post by: shitdarling on 2024-04-26 06:27:12
I found this

https://wiki.hydrogenaud.io/index.php?title=Lossless_comparison (which's reference is [2014]this post (https://hydrogenaud.io/index.php/topic,33226.msg862031.html#msg862031)
we can see that ALAC dont support error handling

but in hex chenged test, It indeed can detect some error if you change the metadata.
Title: Re: Can ALAC/m4a detect file corruption?
Post by: Peggyooney on 2024-05-03 07:50:43
I found this

https://wiki.hydrogenaud.io/index.php?title=Lossless_comparison (which's reference is [2014]this post (https://hydrogenaud.io/index.php/topic,33226.msg862031.html#msg862031)
we can see that ALAC dont support error handling

but in hex chenged test, It indeed can detect some error if you change the metadata.

Can you show me the steps to change the data?
Title: Re: Can ALAC/m4a detect file corruption?
Post by: Porcus on 2024-05-03 08:42:26
Simple corruption test: https://hydrogenaud.io/index.php/topic,122094.msg1007969.html#msg1007969
That particular reply was for lossies, but I did similar to ALAC (/TTA, which you don't want to use either).