Skip to content

FLAC: legacy id3 tags error in flac.save_to write-back #608

Closed

Description

@PandorasFox

Reproducer

https://gist.github.com/PandorasFox/42a651962129e85b19491af8c0abefeb - uses ffmpeg to write out a short silent FLAC file, prepends id3 tags, reproduces when trying to embed a picture tag and write back

Summary

I have some old Pendulum flacs with id3 tags prepended to them - gross, but technically valid. This produces the following behaviors in lofty:

  • parses fine, but then can't write back; errors with 'Attempted to write a tag to a format that does not support it"'
  • if using remove_id3v2, errors with "File missing fLaC stream marker" - I assume something to do with loading back the file before writing when editing in place

Expected behavior

No response

Assets

No response

Activity

  1. added
    bug
    on Feb 14, 2026
  2. changed the title [-]FLAC: legacy id3 tags cause edit/write-back errors[/-] [+]FLAC: legacy id3 tags error in flac.save_to write-back[/+] on Feb 14, 2026
  3. Serial-ATA commented on Feb 14, 2026

    @Serial-ATA
    Owner

    parses fine, but then can't write back; errors with 'Attempted to write a tag to a format that does not support it"'

    This is expected, see https://github.com/Serial-ATA/lofty-rs/tree/main?tab=readme-ov-file#supported-formats. Some tags are read only, as I don't want to support writing tags that aren't officially supported by the format.

    if using remove_id3v2, errors with "File missing fLaC stream marker" - I assume something to do with loading back the file before writing when editing in place

    This isn't expected, though. The picture/Vorbis Comment writer isn't ID3v2 aware, since it's assumed that the ID3v2 tag was stripped before that point. I guess that assumption is wrong, I'll take a look

  4. added this to the 0.23.2 milestone on Feb 14, 2026
  5. Serial-ATA commented on Feb 14, 2026

    @Serial-ATA
    Owner

    @PandorasFox can you test #609? It should fix both of your issues. If all's good I'll release 0.23.2

  6. PandorasFox commented on Feb 14, 2026

    @PandorasFox
    Author

    @PandorasFox can you test #609? It should fix both of your issues. If all's good I'll release 0.23.2

    Looks great! my repro tests pass with those changes.

    Thank you so much; lofty has been wondrously helpful for vorbis-comment-ifying all my music

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions