<div dir="ltr">
Op wo 2 nov. 2022 om 21:44 schreef David Willmore <<a href="mailto:davidwillmore@gmail.com">davidwillmore@gmail.com</a>>:<br>><br>>
 If a --force-* option fails, shouldn't it error out instead?  Scripts 
aren't going to pick up on a warning, but they should pick up on an 
errored exit code (or they're just not written well enough to care).<br><div>> <br></div><div><br></div><div>I wasn't referring to that force option, that is only for picking a format. The warning would be paired with --keep-foreign-metadata on decoding.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op wo 2 nov. 2022 om 21:54 schreef Federico Miyara <<a href="mailto:fmiyara@fceia.unr.edu.ar">fmiyara@fceia.unr.edu.ar</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <br>
    <font face="Courier New">Considering that <br>
      <br>
      1) audio data is always (I believe...) in a single connected
      block, <br>
      2) its location and length is unambiguously known, <br>
      3) its basic formatting information is at the header, hence
      readily and unambiguously known, and <br>
      4) all metadata, either native or foreign, including the header,
      is before or after the audio data (or both), <br>
      <br>[...]<br>
      <br>
      This would provide bit-for-bit accuracy, even for inconsistent or
      ill-formed metadata, as long as the audio data is consistent, with
      known format and correctly located.</font></div></blockquote><div><br></div><div>Currently FLAC already stores and restores most kinds of metadata corruption without problems, so in most cases the conversion is already bit-accurate. However, there are some kinds of corruption it cannot handle. These are the kinds of corruption that invalidate your considerations. For example, when a chunk length is incorrect, the location and length of the audio data is no longer known. It is also possible the basic formatting information is invalid. In this case, FLAC cannot compress the audio at all, not even without considering foreign metadata, while general purpose compressors (who don't have to discriminate between audio and metadata) have no problem compressing.<br></div></div></div>