Any ideas on how to change the reported length (time) of a FLAC file? Basically, I want to hide content at the end of the file.
I think you could edit the samples field in the METADATA_BLOCK_STREAMINFO block:
Some software may still be able to seek to the hidden audio though.
Thanks. That does look like what I'm looking for. But after looking around for tools and trying to open a FLAC in a HEX editor, it's evident that this is currently over my head. Any way I can be pointed in the right direction on how to figure out how to do that?
Right direction meaning an existing tool to do this? I don't know why that would exist. I think you'll have to work it out from the spec or the flac source code.
Thanks again. I figured it out. For reference, the reported length in samples should be the 2nd half of HEX block 15 through 19 (in total 36 bits) in any standard FLAC file.
Unfortunately, what I hoped would be the case, where the player would continue to play beyond the reported length, appears to not be standard player behavior. Oddly, the file integrity scanner does find a reported length mismatch, but appears to ignore all blocks beyond the reported length, finding only a fraction of a second difference despite an actual difference of a few minutes. Also, the displayed bitrate takes into account the entire file and not just the reported length.
Does it have to be at the "rear end"? ;) I wonder if you can hide it in a padding block?
It would be easily lost though.
Edit: METADATA_BLOCK_APPLICATION, maybe? There was an apparently short-lived utility that would attach anything in that block: https://directory.fsf.org/wiki/FlacFile ... and others too, I see.
I was aiming for a kind of "hidden track"-type functionality where the player would report a length but would continue to play beyond said length.