flac icon indicating copy to clipboard operation
flac copied to clipboard

Cannot empty or delete VORBIS_COMMENT vendor string

Open x0tester0x opened this issue 2 years ago • 13 comments

How can I empty or delete VORBIS_COMMENT vendor string while keeping the comments?

METADATA block #1
  type: 4 (VORBIS_COMMENT)
  is last: true
  length: 83
  vendor string: reference libFLAC 1.4.3 20230623
  comments: 1
    comment[0]:

x0tester0x avatar Jul 26 '23 17:07 x0tester0x

metaflac does not offer a way to do this currently.

Why do you want to remove it?

ktmf01 avatar Jul 26 '23 18:07 ktmf01

I want to remove it, because i do not want that, when I give files to other people, that they can see which tool I used to create the FLAC. So for example if I rip a bluray with MakeMKV, I want to remove, that in the vendor string they can see MakeMKV.

Can you please implement the feature to delete or empty the vendor string?

x0tester0x avatar Jul 27 '23 07:07 x0tester0x

This feature is really important for me and I think that this is not a big change and so not much work to implement. When will this feature be implemented?

x0tester0x avatar Jul 28 '23 08:07 x0tester0x

If you contribute a PR, it could be implemented next week. If not, I won't make any promises. As you can see from the issues list, there are open issues already 5 years old.

ktmf01 avatar Jul 28 '23 09:07 ktmf01

How can I empty or delete VORBIS_COMMENT vendor string while keeping the comments?

From your question I take it that you know how to remove the VORBIS_COMMENT block entire, so here is a work-around. It will leave a vendor string, but not the right one:

Dump the file(s) into Mp3tag Ctrl-x the tags away metaflac --remove --block-type VORBIS_COMMENT In Mp3tag, hit Ctrl-z to undo.

Mp3tag will write back the tags, but not the correct vendor string - it will it will fill in a vendor string of some reference libflac version.

H2Swine avatar Jul 28 '23 14:07 H2Swine

If you contribute a PR, it could be implemented next week. If not, I won't make any promises. As you can see from the issues list, there are open issues already 5 years old.

I am not very good at C programming... so I think I can only wait until this feature will be implemented

x0tester0x avatar Jul 31 '23 09:07 x0tester0x

How can I empty or delete VORBIS_COMMENT vendor string while keeping the comments?

From your question I take it that you know how to remove the VORBIS_COMMENT block entire, so here is a work-around. It will leave a vendor string, but not the right one:

Dump the file(s) into Mp3tag Ctrl-x the tags away metaflac --remove --block-type VORBIS_COMMENT In Mp3tag, hit Ctrl-z to undo.

Mp3tag will write back the tags, but not the correct vendor string - it will it will fill in a vendor string of some reference libflac version.

That is not what I want... I want a empty string or delete the vendor string completely

x0tester0x avatar Jul 31 '23 09:07 x0tester0x

Sure I read that. But it will serve this purpose:

that they can see which tool I used to create the FLAC.

If anonymity is what you seek, then replacing it by something common is more efficient than the empty string.

H2Swine avatar Aug 05 '23 12:08 H2Swine

I cannot find in the code where it will write "vendor string: reference libFLAC 1.4.3 20230623". Can someone show me?

x0tester0x avatar Aug 09 '23 07:08 x0tester0x

Sure. It is right here https://github.com/xiph/flac/blob/31ccd3df31f912bac76e669c2fbf347adf2bf235/src/libFLAC/format.c#L47-L59

ktmf01 avatar Aug 09 '23 07:08 ktmf01

Ok and where in the metaflac code gets this called?

x0tester0x avatar Aug 09 '23 07:08 x0tester0x

That depends on what action metaflac does, specifically. Taking adding a vorbis comment block when there is none as an example, that would be.

Here: https://github.com/xiph/flac/blob/31ccd3df31f912bac76e669c2fbf347adf2bf235/src/metaflac/operations_shorthand_vorbiscomment.c#L63

Then here: https://github.com/xiph/flac/blob/31ccd3df31f912bac76e669c2fbf347adf2bf235/src/libFLAC/metadata_object.c#L468

ktmf01 avatar Aug 09 '23 08:08 ktmf01

I changed, as workaround for myself, the variable FLAC__VENDOR_STRING in the code to an empty string and rebuild the metaflac.exe.

x0tester0x avatar Aug 09 '23 11:08 x0tester0x