Disable all checksum verification in flac/metaflac

"Manuel Bertsch" <[email protected]> Thu, 29 Jun 2023 22:28:39 +0200
Newsgroups gmane.comp.audio.compression.flac.devel
Message-ID <[email protected]>
This is a multipart message in MIME format.

--===============3802872562102431215==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0025_01D9AAD9.0F1ACCA0"
Content-Language: de

This is a multipart message in MIME format.

------=_NextPart_000_0025_01D9AAD9.0F1ACCA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello all,

=20

I=92m trying to use flac and metaflac as tooling to analyze the =
generated FLAC
files of a new encoder implementation. However, while my own third-party
decoder can handle the output just fine, flac, metaflac, and other tools
discard the output since the frame checksum (footer CRC-16) is invalid. =
This
is expected, since I have no checksum generation implemented apart from =
the
frame header checksum (all other checksums are written as 0), but it
prevents me from making development process without being able to check =
my
outputs against the reference implementation. I looked around and I =
couldn=92t
find a way to turn off either tool=92s checksum verification. So I=92d =
like to
know how one could turn off checksum verification in the tools, and if
that=92s not currently possible, I=92d like to see that as a feature in =
a future
version of flac. (In that case I would also try to disable the checks in
code permanently, though my solution is most likely not going to be
upstreamable in any capacity.)

=20

FYI, the third-party decoder is highly compliant according to the spec =
test
suite, producing identical audio playback on almost all of the files, =
but it
also doesn=92t verify or error on any checksums. ffplay and ffmpeg both =
accept
the file and can play and transcode it correctly, although they ignore =
the
sample count in the streaminfo header and will read all frames they can
find. The latter leads me to believe that checksums are the actual =
issue,
even though flac reports the generic =93Bad Header=94 and =93Lost =
Sync=94.

=20

Greetings and thanks in advance,

=20

Kleines Filmr=F6llchen


------=_NextPart_000_0025_01D9AAD9.0F1ACCA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1"><meta name=3DGenerator content=3D"Microsoft Word =
15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:"Yu Gothic";
	panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"\@Yu Gothic";
	panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.E-MailFormatvorlage17
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DDE =
link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p =
class=3DMsoNormal>Hello all,<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal><span =
lang=3DEN-US>I&#8217;m trying to use flac and metaflac as tooling to =
analyze the generated FLAC files of a new encoder implementation. =
However, while my own third-party decoder can handle the output just =
fine, flac, metaflac, and other tools discard the output since the frame =
checksum (footer CRC-16) is invalid. This is expected, since I have no =
checksum generation implemented apart from the frame header checksum =
(all other checksums are written as 0), but it prevents me from making =
development process without being able to check my outputs against the =
reference implementation. I looked around and I couldn&#8217;t find a =
way to turn off either tool&#8217;s checksum verification. So I&#8217;d =
like to know how one could turn off checksum verification in the tools, =
and if that&#8217;s not currently possible, I&#8217;d like to see that =
as a feature in a future version of flac. (In that case I would also try =
to disable the checks in code permanently, though my solution is most =
likely not going to be upstreamable in any =
capacity.)<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>FYI, the third-party decoder is highly compliant according =
to the spec test suite, producing identical audio playback on almost all =
of the files, but it also doesn&#8217;t verify or error on any =
checksums. ffplay and ffmpeg both accept the file and can play and =
transcode it correctly, although they ignore the sample count in the =
streaminfo header and will read all frames they can find. The latter =
leads me to believe that checksums are the actual issue, even though =
flac reports the generic &#8220;Bad Header&#8221; and &#8220;Lost =
Sync&#8221;.<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-US>Greetings and thanks in advance,<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US>Kleines =
Filmr=F6llchen<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_0025_01D9AAD9.0F1ACCA0--


--===============3802872562102431215==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev

--===============3802872562102431215==--