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

Read "comments" tag for FLAC audio file #370

Open
blezin2205 opened this issue Nov 4, 2024 · 6 comments
Open

Read "comments" tag for FLAC audio file #370

blezin2205 opened this issue Nov 4, 2024 · 6 comments

Comments

@blezin2205
Copy link

Hello,
I'm working on a sample project to read FLAC audio tags and I'm encountering an issue with the "comments" tag. Despite there being comments in the FLAC files, tags.metadata.comment is returning nil.
I would really appreciate your insights or any suggestions you might have on how to resolve this issue.
Thank you so much for your help!

Example project:
https://drive.google.com/file/d/1k6jun1LG_WM_tDefBiBl4YN9l9xiyUzY/view?usp=sharing

@sbooth
Copy link
Owner

sbooth commented Nov 4, 2024

The issue is that the file contains a field named COMMENT while the canonical name for a comment in a Vorbis comment field is DESCRIPTION. Perhaps it would be better to look for a COMMENT field if a DESCRIPTION field is absent but you can access the other fields via the additionalMetadata dictionary.

@sbooth
Copy link
Owner

sbooth commented Nov 4, 2024

It also seems that Picard uses COMMENT so perhaps DESCRIPTION is outdated despite what the spec says.

@Volodymyr-13
Copy link

The issue is that the file contains a field named COMMENT while the canonical name for a comment in a Vorbis comment field is DESCRIPTION. Perhaps it would be better to look for a COMMENT field if a DESCRIPTION field is absent but you can access the other fields via the additionalMetadata dictionary.

I just wondering why TagLib reads this... so logically its wrapper in this repo should too, but it's not. Maybe as fallback?

Anyway, users reported me this problem, telling me that some files missing that comments filed, but other audio apps reads it.

@sbooth
Copy link
Owner

sbooth commented Nov 4, 2024

It's somewhat a question of mapping. The higher-level TagLib accessor for Xiph comments use DESCRIPTION if found, COMMENT next, or "" if neither are present, joining multiple fields with the same name using /. I use the raw fields directly and follow the Xiph spec with regard to naming.

@Volodymyr-13
Copy link

It's somewhat a question of mapping. The higher-level TagLib accessor for Xiph comments use DESCRIPTION if found, COMMENT next, or "" if neither are present, joining multiple fields with the same name using /. I use the raw fields directly and follow the Xiph spec with regard to naming.

Hey @sbooth, will this issue be resolved anytime soon?

@sbooth
Copy link
Owner

sbooth commented Nov 18, 2024

I suppose I need to be convinced this is an actual issue first.

In the meantime it's simple enough to test if the format is FLAC, and if so, check the additional metadata for the COMMENT field if the DESCRIPTION field is empty.

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

No branches or pull requests

3 participants