Skip to content

Not possible to add multiple images to a flac file #780

Open
@sirbeancounter

Description

@sirbeancounter

The manual page for metaflac implies that more than one image can be attached to any given flac file as does RFC9639. However this fails due to error opening the flac file.

The following example shows that I can add album art but adding artist art fails:

metaflac --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac #works
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.

The following example, after removing album art, shows that I can add artist art but adding album art fails, demonstrating that both images are fine and correctly defined:

metaflac --remove --block-number=3 01\ Laundromat\ Blues.flac
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" 01\ Laundromat\ Blues.flac #works
metaflac --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.

The following example, after removing album art, shows a failing attempt to add both images in one command:

metaflac --remove --block-number=3 01\ Laundromat\ Blues.flac
metaflac --import-picture-from="8|image/jpeg|cover|450x550x150/150|artist_art.jpeg" --import-picture-from="3|image/jpeg|cover|1411x1385x72/72|album_art.jpeg" 01\ Laundromat\ Blues.flac
01 Laundromat Blues.flac: ERROR: writing FLAC file, status = "FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"

The FLAC file could not be opened.  Most likely the file does not exist
or is not readable.

It seems to me that the code assumes there can only ever be one image per flac file, unless I have misunderstood the manual page.

Activity

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions