Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot empty or delete VORBIS_COMMENT vendor string #640

Open
x0tester0x opened this issue Jul 26, 2023 · 13 comments
Open

Cannot empty or delete VORBIS_COMMENT vendor string #640

x0tester0x opened this issue Jul 26, 2023 · 13 comments

Comments

@x0tester0x
Copy link

x0tester0x commented Jul 26, 2023

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]:
@ktmf01
Copy link
Collaborator

ktmf01 commented Jul 26, 2023

metaflac does not offer a way to do this currently.

Why do you want to remove it?

@x0tester0x
Copy link
Author

x0tester0x commented Jul 27, 2023

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
Copy link
Author

x0tester0x commented Jul 28, 2023

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?

@ktmf01
Copy link
Collaborator

ktmf01 commented Jul 28, 2023

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.

@H2Swine
Copy link

H2Swine commented Jul 28, 2023

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.

@x0tester0x
Copy link
Author

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
Copy link
Author

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

@H2Swine
Copy link

H2Swine commented Aug 5, 2023

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.

@x0tester0x
Copy link
Author

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

@ktmf01
Copy link
Collaborator

ktmf01 commented Aug 9, 2023

Sure. It is right here

#if (defined GIT_COMMIT_HASH && defined GIT_COMMIT_DATE)
# ifdef GIT_COMMIT_TAG
FLAC_API const char *FLAC__VERSION_STRING = GIT_COMMIT_TAG;
FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " GIT_COMMIT_TAG " " GIT_COMMIT_DATE;
# else
FLAC_API const char *FLAC__VERSION_STRING = "git-" GIT_COMMIT_HASH " " GIT_COMMIT_DATE;
FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC git-" GIT_COMMIT_HASH " " GIT_COMMIT_DATE;
# endif
#else
/* PACKAGE_VERSION should come from configure */
FLAC_API const char *FLAC__VERSION_STRING = PACKAGE_VERSION;
FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " PACKAGE_VERSION " 20230623";
#endif

@x0tester0x
Copy link
Author

Ok and where in the metaflac code gets this called?

@ktmf01
Copy link
Collaborator

ktmf01 commented Aug 9, 2023

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:

block = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);

Then here:

if (!copy_bytes_(&object->data.vorbis_comment.vendor_string.entry, (const FLAC__byte*)FLAC__VENDOR_STRING, object->data.vorbis_comment.vendor_string.length+1)) {

@x0tester0x
Copy link
Author

x0tester0x commented Aug 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants