[flac-dev] Strange behaviour --UPDATE--
Martijn van Beurden
mvanb1 at gmail.com
Wed Oct 18 07:25:45 UTC 2023
Hi Federico,
It seems reasonable to assume you've converted the file with Audacity the
first time around. Audacity doesn't store foreign metadata, it converts
part of it and ignores the rest. More specifically, it reads the tags from
the WAV file and stores it as Vorbis comments in the FLAC file. There is no
way FLAC can restore the original metadata, because part of it is lost.
The flac command line tool, when used with the keep foreign metadata
option, does not do any translation, it stores and restores the metadata.
Considering the error message of 1.4.3, that should be improved yes.
Kind regards, Martijn van Beurden
Op wo 18 okt 2023 om 00:12 schreef Federico Miyara <fmiyara at fceia.unr.edu.ar
>:
>
> Dear All,
>
> I've sent yesterday this issue, but as it contained two screenshots, I'm
> not sure if it reached the list. I post it again with some updates.
>
> 1) I had encoded a WAV file three years ago. Examining the FLAC file with
> an HEX/text viewer, i find at the beginning, after some headers, it
> declares
> reference libFLAC 1.3.1 20141125. However, I'm pretty sure I didn't use
> that version since I hadn't it. Besides, now I encoded again the original
> file with 1.3.1, 1.3.2, 1,3.3 and 1.4.3 and none of them shows in a
> human-readable way the version of the codec, so I presume I encoded it
> directly from Audacity, which probably adds such information.
>
> 2) The original WAV file (which I hadn't deleted) contained metadata
> (title, artist, that sort of thing), and the FLAC file, along with the
> version, shows human-readable metadata. Maybe Audacity adds this info when
> exporting?
>
> 3) Now I try to decode it using libFLAC 1.4.3 with the "keep foreign
> metadata" option enabled and I get the following error (Spanish locale):
>
> L:\Mis documentos\Electrónica\DyCE IV\_Clases
> on-line\FLAC\DyCE4_Clase_14_(03_11_2020).flac: ERROR reading foreign
> metadata: invalid WAVE file: missing "fmt " chunk (024)
> Presione una tecla para continuar . . .
>
>
> This is weird since the original file *was* a WAVE file, but if it hadn't
> been the case, the error should have shown when trying to encode, which
> didn't happen. Besides, the "fmt " chunk has nothing to do with any foreign
> metadata, and moreover, I don't think a "fmt " chunk is expected to be
> found by the decoder in a FLAC file. Rather, it should be recreated by the
> decoder when yielding the wave file.
>
> 4) Now, if I remove the "keep foreign metadata" option from the decoding
> settings, the decoding is successful but the audio content is not verbatim
> (even if the waveforms seem to be identical and sound the same as well). A
> possible explanation is that Audacity exports differently to WAV and to FLAC
>
> 5) Next I tried to decode the same file using both libFLAC 1.3.1 and
> libFLAC 1.3.3, again with the "keep foreign metadata" option enabled. The
> result is this error:
>
> DyCE4_Clase_14_(03_11_2020).flac: ERROR reading foreign metadata: no
> foreign metadata found (022)
> Presione una tecla para continuar . . .
>
>
> This message makes a bit more sense since it doesn't make any implication
> about the WAV file. However, it insists there are no foreign metadata, but
> when one examines the file with an HEX/text viewer, the metadata are
> present and are human-readable. Maybe there is metadata but not in a format
> the reference codec recognizes?
>
> 6) Decoding with libFLAC 1.3.3 without "keep foreign metadata" yields the
> same result as with 1.4.3
>
> 7) Encoding again the original WAV using 1.4.3 yields a FLAC file which
> once decoded yields an identical copy of the original WAV file. It is
> slightly smaller than the 1.3.1 FLAC, and viewing it in HEX doesn't show
> any recognizable version of the metadata, in contrast to the 1.3.1. I guess
> now the info is zipped or so.
>
> Finally, with all the other files I had no problem.
>
> I don't think this is relevant, but just in case, the original encoding
> was made on Windows 7 and now I'm working on Windows 10.
>
> Regards,
>
> Federico Miyara
>
>
> Images included in the first post (not sure whether they reach the list, I
> can post them individually at request):
> Beginning of the file viewed as HEX
> Comparison of both files. Right: original WAV file, Left: Decoded WAV file
> from 1.3.1 FLAC file
>
>
>
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Libre
> de virus.www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> <#m_-5172241099702388132_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> _______________________________________________
> flac-dev mailing list
> flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20231018/9e7064c2/attachment.htm>
More information about the flac-dev
mailing list