mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
Can't read certain FLAC files #1968
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jerroder on GitHub (Jul 28, 2020).
Originally assigned to: @gnattu on GitHub.
Describe the bug
I can play all of my FLAC music but I have one album for which I get :
System (please complete the following information):
Logs
Additional context
I passed two different FLAC files (one that works, one that doesn't) through MediaInfo to check if it was a codec or bitrate issue or whatever but they seem identical. The one that works:
The one that doesn't:
@neteroster commented on GitHub (Oct 18, 2020):
I also met the problem and I found that after clearing the cover of the FLAC file, it can be played properly.
@Jerroder commented on GitHub (Oct 18, 2020):
I suspect that the writing library is too old (2007). Re-encoding the file with ffmpeg and
-c:a flachas solved this.@Salamandar commented on GitHub (Feb 1, 2021):
Same issue here. Also, the logs pointed to an artwork issue, and clearing the cover in the audio metadata solved the issue. Here are 2 images :
EDIT : I guess the image file is NOT the issue because i added it back into the flac file metadatas, and it works. I guess the issue is linked to the version of the encoder / metadata editor.
As a matter of fact, the "non-working" files are fully re-written by Easytag, but editing them again is almost instantaneous (like only some part of the file had to be written).
Also, changing ANY metadata in the audio file (in my case, the total track count) solves the issue.
EDIT 2 : I tried using metaflac to remove/add fields, but I could not manage to "make a file work". Removing lyrics, picture, nothing worked. For now, I only have Easytag to solve this.
@Jerroder commented on GitHub (Feb 1, 2021):
Good thing you bring this up, I just checked and after re-encoding with ffmpeg with
-c:a copy, the pixel format went from yuvj420p (for the non-working file) to rgb24 (for the same file, re-encoded) so I guess that is the problem since nothing else changed.@Salamandar commented on GitHub (Feb 1, 2021):
@rderensy The image is not the issue here. I have 2 files with the SAME
metaflac --listoutput (PICTURE block included), but one is working (edited with easytag) the other is not.Although i confirm that for me too, ffmpeg -c:a copy fixes the issue and even converts the image from jpeg to png.
EDIT :
I think all those "buggy" musics are the ones edited by my ancient music player, GMusicBrowser, that added lyrics to the metadatas. Not sure, but if @rderensy had the same software or equivalent, that would validate my theory.
EDIT 2 : Well, editing the tags with Easytag or FFMPEG solves the issue for the web client and Android TV, but the tracks are still unreadable using Gelly (the excellent Android client based on Phonograph). That may be an unrelated issue ?
EDIT 3 : That issue is really weird. But at least I found a way to :
A flac reencode was necessary.
-c:a copywas not enough.This code is untested, i manually used the ffmpeg command:
@stale[bot] commented on GitHub (Jun 2, 2021):
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@Jerroder commented on GitHub (Jun 2, 2021):
Issue still occurring with Firefox ESR 78.11.0 and Jellyfin 10.7.5. It works when reading the file with the windows desktop app, iOS app and Brave (chromium based) though, only Firefox is broken.
@Salamandar commented on GitHub (Jun 3, 2021):
Yeah, still occurs. Editing the metadatas solves the issue so i batch-edited all my flac files but... that's not a solution.
@stale[bot] commented on GitHub (Oct 2, 2021):
This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.
@Jerroder commented on GitHub (Oct 2, 2021):
Still happening on Firefox 91.1.0esr
@seanbruno commented on GitHub (Jul 17, 2022):
I just ran into this today on FreeBSD 102.0 (64-bit). Re-encoding the FLAC files in question does indeed resolve the issue for me. I have posted a "broken" file here for anyone who wants to try and debug/patch further.
@thornbill commented on GitHub (Dec 7, 2022):
Checking that sample, I see
ID3 tags are not supported by the FLAC spec. Most players seem to just ignore them, but Firefox will not play files that contain them.
@AngelPone commented on GitHub (Feb 2, 2023):
Same issue. I fixed it by changing the webp artwork to jpg.
@IrmatDen commented on GitHub (Mar 28, 2023):
Thank a lot for posting this!
@holotone commented on GitHub (Mar 30, 2023):
Changing the artwork doesn't work for me, even made sure it was a JPG. Editing the ID3 tags also did not work. The problem only occurs for me in Firefox, Chrome plays the album with no issue. Only a small percentage of albums are affected, can't figure out what the commonality is.
@Bond-009 commented on GitHub (Mar 30, 2023):
@holotone see @thornbill response
@holotone commented on GitHub (Mar 30, 2023):
@Bond-009 I use the app Mp3Tag to edit what I assume is the ID3 tag on all most all of my FLAC files so I don't think that's it. Only a small minority of albums do not work.
Edit: I take that back, I didn't understand that FLAC files could have multiple types of tags. All of the albums I have that work have FLAC tags, and the ones that don't have FLAC ID3v1 or FLAC ID3v2. When I used mp3tag to remove the FLAC ID3 tags and just use FLAC tags the album plays properly in Firefox.
Thanks for the help!
@knuurr commented on GitHub (Jul 26, 2023):
Just to bump this thread, I've experienced this very issue.
I encountered issue with certain FLAC files (some, but not all) that I just couldn't play inside browser.
I tested them not only through Jellyfin but also through Navidrome, and the same files I checked also wouldn;t play.
I wonder if there is any mitigation for Firefox possible as it seems there is issue with Firefox browser.
@holotone commented on GitHub (Jul 26, 2023):
Heya @knuurr , the problem is caused by FLAC files that are improperly tagged with MP3 ID3 tags. Most browsers ignore it but for some reason Firefox refuses to play them. You can solve the issue by using a tagger to remove the MP3 ID3 tags and replace them with FLAC tags. In the app mp3tag you can just select all the tracks, cut all tags, and paste all tags and it'll paste them back as proper FLAC tags.
Hope that helps!
@Shadowghost commented on GitHub (Jul 26, 2023):
A technical FYI on that: per spec adding ID3 to FLAC is not supported behavior, FLAC only supports VorbisComment. So all in all mp3tag writing it is technically breaking the spec and any browser silently dropping it is accepting incorrect FLAC.
@kwhat commented on GitHub (Nov 6, 2023):
can i get a command line Linux method of making this work? Its pretty disappointing that my first experience with Jellyfin is this error.
@Jerroder commented on GitHub (Nov 6, 2023):
@kwhat assuming you're using bash: cd into the directory with the FLAC files and run
for name in *.flac; do old_name="$name.orig"; mv $name $old_name; ffmpeg -i $old_name -c:a flac -c:v copy $name; doneThen you can
rm *.origif you want to delete the original files (maybe makes sure it works before doing so).@kwhat commented on GitHub (Nov 7, 2023):
@rderensy Thanks for that! I ended up with
find . -name '*.flac' -exec mv '{}' '{}'.orig \; -exec ffmpeg -i '{}'.orig -c:a flac -c:v copy '{}' \; -exec rm '{}'.orig \;and it worked!@twisted-nematic57 commented on GitHub (Apr 20, 2024):
@kwhat your code snippet worked for me, my Firefox is now happily playing my previously-broken FLAC files from a Jellyfin server. (I am posting this comment because it is impossible to react with 'thumbs up' for some reason and I wanted to confirm that the commands work)