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 extract album art from FLAC files with both ID3 tags and Vorbis annotations #308

Closed
guim31 opened this issue May 21, 2020 · 19 comments
Labels
blocked This issue is blocked by an upstream dependency bug frozen-due-to-age stale

Comments

@guim31
Copy link

guim31 commented May 21, 2020

Hi Deluan !

I'm facing this issue where an album art isn't showing in my library :

https://i.imgur.com/tZcocHD.png

This album art is in the album folder as a cover.jpg image AND is embed in the id3 tags.
This is the only album to have this issue, I manage all my albums with BlissHQ and everything is ok.

I don't understand why every other albums are fine except this one.

Using v 0.19.0 docker container

@deluan
Copy link
Member

deluan commented May 21, 2020

What is the type of the files? mp3? Can you send me one of the files?

(Also just to be clear: Navidrome only gets embedded album art, it does not read album art from external files (cover.jpg))

@guim31
Copy link
Author

guim31 commented May 21, 2020

That are .flac files.

Here is a file
https://droppy.nasdoury.ovh/$/OwUtb

@deluan
Copy link
Member

deluan commented May 21, 2020

After analyzing your file, seems that it contains both ID3 and FLAC tags. The picture is embedded in the FLAC tags, but not in the ID3 tags.

The issue is that the upstream library used to extract the album art is giving precedence to the ID3 tags, and as a result cannot find the embedded art.

Can you confirm this and remove the ID3 tags?

@deluan
Copy link
Member

deluan commented May 21, 2020

Seems to be related to this: dhowden/tag#58

@guim31
Copy link
Author

guim31 commented May 21, 2020

As I'm using only Bliss to tag my files, I don't know how to embed the cover in the id3, or remove the id3 ^^
Everything is automated !

@deluan
Copy link
Member

deluan commented May 21, 2020

If you are comfortable with the command line, you can use ffmpeg to remove tags: https://stackoverflow.com/a/20202233/653632.

Another thing you could try is to remove all tags with Bliss and add it back. If ti does not have an option to remove tags, you can use a tag editor for your platform (maybe Musicbrainz Picard) and remove all tags, then try to tag again with Bliss

@guim31
Copy link
Author

guim31 commented May 21, 2020

I'll have a look later this evening and give you a feedback.
Thanks for the advice !

@guim31
Copy link
Author

guim31 commented May 21, 2020

I just tried 2 things :

  • remove the tags with Picard > then re-add them with Bliss
  • Re-download the album

The album art is still missing :(

No chances Navidrome would look for embed ID3 cover art > if empty > look for a cover.jpg file ?

@deluan
Copy link
Member

deluan commented May 21, 2020

Yes i've been thinking of supporting the cover.jpg file in albums, just don't have an issue opened for that yet, so I'll keep this open to track that. Or maybe until the upstream library fix the issue.

@guim31
Copy link
Author

guim31 commented May 21, 2020

Great 👍 thanks a lot

@deluan
Copy link
Member

deluan commented Jun 25, 2020

Support for cover.jpg (and other files/formats) was implemented in #350. I'll keep this open to track the main issue here: Cannot extract album art from FLAC files with both ID3 tags and Vorbis annotations: dhowden/tag#58 (comment)

@TheForcer
Copy link

TheForcer commented Jul 13, 2020

Hi again, not sure if this is worth opening a new issue.

After now having updated to 0.24, Navidrome does not seem to fetch external Cover Art files for me and shows the default blue vinyl. Most of my collection consists of FLAC files with no embedded image files, but cover.jpg files in the album directories. The albums with embedded artworks show up fine.

For further testing, I also set the ImageCache Option to 0 and and tried ND_COVERARTPRIORITY: "cover.*, folder.*, embedded" as well, but that did not help.
Got an idea what could help?

EDIT: Just seeing this: #350 (comment) Guess the issue comes from that?

Typical request would look like this:

time="2020-07-13T11:39:22Z" level=debug msg="API: New request /rest/getCoverArt" client=NavidromeUI requestId=7975fc3601e2/0L9hnqby8i-000041 username=navidrome_user version=1.8.0
time="2020-07-13T11:39:22Z" level=trace msg="SQL: `SELECT * FROM user WHERE user_name = ?`" args="['navidrome_user']" elapsedTime="577.511µs" requestId=7975fc3601e2/0L9hnqby8i-000041 rowsAffected=1
time="2020-07-13T11:39:22Z" level=trace msg="Looking for media file art" id=not_found requestId=7975fc3601e2/0L9hnqby8i-000041
time="2020-07-13T11:39:22Z" level=trace msg="SQL: `SELECT starred, starred_at, play_count, play_date, rating, media_file.* FROM media_file LEFT JOIN annotation on (annotation.item_id = media_file.id AND annotation.item_type = 'media_file' AND annotation.user_id = 'ab581119-f9ce-495c-bbda-68810307e4e5') WHERE id = ?`" args="['not_found']" elapsedTime="607.437µs" requestId=7975fc3601e2/0L9hnqby8i-000041 rowsAffected=0
time="2020-07-13T11:39:22Z" level=trace msg="Retrieving cover art from file" error="data not found" path= requestId=7975fc3601e2/0L9hnqby8i-000041 size=0
time="2020-07-13T11:39:22Z" level=warning msg="Error extracting image" error="empty path given for cover" path= requestId=7975fc3601e2/0L9hnqby8i-000041 size=0
time="2020-07-13T11:39:22Z" level=debug msg="HTTP: GET http://127.0.0.1:82/rest/getCoverArt?u=navidrome_user&t=61774f36c02222268740133d0a2222a3&s=1594639626716&f=json&v=1.8.0&c=NavidromeUI&id=not_found" elapsedTime=9.986888ms httpStatus=200 remoteAddr=88.152.185.106 requestId=7975fc3601e2/0L9hnqby8i-000041 responseSize=378613 userAgent="Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

@deluan deluan changed the title Album art not showing Cannot extract album art from FLAC files with both ID3 tags and Vorbis annotations Jul 13, 2020
@deluan
Copy link
Member

deluan commented Jul 13, 2020

@TheForcer, the CoverArtPriority should have globs to match the external files, like this: ND_COVERARTPRIORITY: "cover.*, folder.*, embedded" (with the asterisks)

If that does not solve your issue, please move the report to a new issue, and let's continue there. Thanks

@deluan deluan added the blocked This issue is blocked by an upstream dependency label Jul 14, 2020
@mradermaxlol
Copy link

Isn't a flac file with ID3 tags considered invalid? AFAIK flac spec only considers Vorbis tags the "proper" ones.

Even the reference flac encoder will fail if you use it to re-encode a flac file with ID3 tags.

@certuna
Copy link
Contributor

certuna commented Nov 11, 2021

Yeah according to the current specs a FLAC file with id3 tag is invalid. But as with many standards-violating things, they're still done in practice unfortunately, and by the looks of it, the two tag reader libraries that Navidrome uses (Taglib and ffmpeg) both try to gracefully support id3 tags in FLAC anyway.

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the stale label Mar 7, 2023
@3windmill
Copy link

I had the same issue and I fixed it with Easytag . I deleted the embedded image and I inserted a new one.

@deluan
Copy link
Member

deluan commented Mar 11, 2023

This should be fixed by now, as we use ffmpeg as a fallback to extract images from albums. Anyway, the actual solution is to fix the tags as "according to the current specs a FLAC file with id3 tag is invalid".

Closing this now as there are at least two ways to solve this (fix the tag or use a cover.jpg) and maybe ffmpeg can handle such invalid tag combination.

@deluan deluan closed this as completed Mar 11, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked This issue is blocked by an upstream dependency bug frozen-due-to-age stale
Projects
None yet
Development

No branches or pull requests

6 participants