File xxx cannot be opened for writing

I am getting this error on many FLAC files. But both Tag&Rename and VLC can edit the tags, and their saving the tag then makes the tag editable in Mp3tag. Mp3tag should be as tolerant of whatever this error is as the other programs.

Can you provide an example file so that I can investigate this issue?

Thanks for the example file. It's a corrupted file in the sense that the first PICTURE block appears in front of the STREAMINFO block as block #0.

The FLAC Format specification states, that

STREAMINFO: This block has information about the whole stream, like sample rate, number of channels, total number of samples, etc. It must be present as the first metadata block in the stream. Other metadata blocks may follow, and ones that the decoder doesn't understand, it will skip.

I'm not sure about where to proceed from here. Just wanted to note, that it's not a bug in Mp3tag, but a corrupt file it refuses to write.

Unless I implement a workaround for each and every issue that I encounter, not writing to a file that doesn't conform to the assumed structure still seems like a safe bet to prevent even more damage.

2 Likes

Well, as noted, other packages are able to handle this. Poikosoft's Easy CD-DA Extractor was creating these bad files for years. And not fixing it, means more posts here about this.

I can fix with Tag&Rename, but how to find them? Can I write a filter? Or, for my own header searching, what string is not supposed to be after the other? Easy to look for strings and compare location in the header.

When I have a bad file in Mp3tag, I can see the path when I look at the properties, but I haven't found a way to put the path into the clipboard, so to paste into the address field of Tag&Rename. And fix.

Try a user-defined tool, like this:
Path: C:\Windows\System32\cmd.exe
Parameter: /c echo "%_path%" | clip

1 Like