10-31-2018, 04:03 PM
A post mortem
The MP3tag method described in previous posts works well to convert the hybrid-tagged FLAC files to proper FLAC files (as defined by the FLAC spec). MP3tag is available only for Windows but it runs fine in Wine on Mac OS X (or so they claim) and on Linux (I use the PlayOnLinux frontend for convenience).
Once I put third-party tools aside and started looking directly at the files, I could see what the tools had been hiding.
Turns out the troublesome files have both an ID3v2 frame bolted onto the front of the FLAC content and an ID3v1 frame bolted onto the back of the FLAC content. Consistent with ID3 specs, the length of the ID3v2 frame varies while the ID3v1 frame is always 128 bytes.
I've tested that I can convert these to proper FLAC files from the command line with a combination of grep (to find where the FLAC content starts) and dd (to trim from both ends to get just the FLAC content) but it's a process only a believer in the Tao of Unix could love. Creating a command-line script which is user-friendly and file-safe is too much bother.
So how do you know if a FLAC file is hybrid-tagged?
In Windows, MP3tag is useful: if it declares the tagging is "FLAC (FLAC ID3v2)" then it's hybrid. In Linux, the file command is useful: if it declares the file is "Audio file with ID3 version 2.3.0, contains: FLAC audio bitstream data" then it's hybrid. I'm not fluent in Mac OS X but apparently it has the file command too. Alternatively, as I said above, with a little extra effort MP3tag can be made to work in Linux and in Mac OS X. I'm sure these aren't the only solutions but they work.
And I also thank @Dig-It for providing the test files.
Regards,
Kent
PS - The FLAC files created by the Linux trimming method and by MP3tag are the same length and contain the same data. However, at least sometimes MP3tag gratuitously rearranges the order of the metadata tags so the files aren't necessarily byte-for-byte identical. Files created either way play and display their coverart just fine in moOde.
The MP3tag method described in previous posts works well to convert the hybrid-tagged FLAC files to proper FLAC files (as defined by the FLAC spec). MP3tag is available only for Windows but it runs fine in Wine on Mac OS X (or so they claim) and on Linux (I use the PlayOnLinux frontend for convenience).
Once I put third-party tools aside and started looking directly at the files, I could see what the tools had been hiding.
Turns out the troublesome files have both an ID3v2 frame bolted onto the front of the FLAC content and an ID3v1 frame bolted onto the back of the FLAC content. Consistent with ID3 specs, the length of the ID3v2 frame varies while the ID3v1 frame is always 128 bytes.
I've tested that I can convert these to proper FLAC files from the command line with a combination of grep (to find where the FLAC content starts) and dd (to trim from both ends to get just the FLAC content) but it's a process only a believer in the Tao of Unix could love. Creating a command-line script which is user-friendly and file-safe is too much bother.
So how do you know if a FLAC file is hybrid-tagged?
In Windows, MP3tag is useful: if it declares the tagging is "FLAC (FLAC ID3v2)" then it's hybrid. In Linux, the file command is useful: if it declares the file is "Audio file with ID3 version 2.3.0, contains: FLAC audio bitstream data" then it's hybrid. I'm not fluent in Mac OS X but apparently it has the file command too. Alternatively, as I said above, with a little extra effort MP3tag can be made to work in Linux and in Mac OS X. I'm sure these aren't the only solutions but they work.
And I also thank @Dig-It for providing the test files.
Regards,
Kent
PS - The FLAC files created by the Linux trimming method and by MP3tag are the same length and contain the same data. However, at least sometimes MP3tag gratuitously rearranges the order of the metadata tags so the files aren't necessarily byte-for-byte identical. Files created either way play and display their coverart just fine in moOde.