Read "comments" tag for FLAC audio file · Issue #370 · sbooth/SFBAudioEngine · GitHub
Skip to content

Read "comments" tag for FLAC audio file #370

Open

Description

@blezin2205

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

Activity

  1. sbooth commented on Nov 4, 2024

    @sbooth
    Owner

    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.

  2. sbooth commented on Nov 4, 2024

    @sbooth
    Owner

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

  3. Anywhere-Music-Player commented on Nov 4, 2024

    @Anywhere-Music-Player

    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.

  4. sbooth commented on Nov 4, 2024

    @sbooth
    Owner

    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.

  5. Anywhere-Music-Player commented on Nov 17, 2024

    @Anywhere-Music-Player

    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?

  6. sbooth commented on Nov 18, 2024

    @sbooth
    Owner

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions