navidrome / navidrome

🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
https://www.navidrome.org
GNU General Public License v3.0
10.16k stars 783 forks source link

[Bug]: Some FLAC album do not read if not transcoded #2960

Open khalimerot opened 4 weeks ago

khalimerot commented 4 weeks ago

I confirm that:

Version

0.51.1

Current Behavior

Some FLAC album are not playing if no transcoding is selected for the player. If transcode is selected, they play fine.

Expected Behavior

Being able to play all FLAC files without transcoding.

Steps To Reproduce

No response

Environment

- OS:Unraid
- Browser: Firefox / Chrome
- Client:WebUI

How Navidrome is installed?

Docker

Configuration

No response

Relevant log output

Playing the file without transcoding : 
_   _             _     _
| \ | |           (_)   | |
|  \| | __ ___   ___  __| |_ __ ___  _ __ ___   ___
| . ` |/ _` \ \ / / |/ _` | '__/ _ \| '_ ` _ \ / _ \
| |\  | (_| |\ V /| | (_| | | | (_) | | | | | |  __/
\_| \_/\__,_| \_/ |_|\__,_|_|  \___/|_| |_| |_|\___|
                          Version: 0.51.1 (6d253225)

time="2024-04-17T20:03:28Z" level=info msg="goose: no migrations to run. current version: 20240122223340\n"
time="2024-04-17T20:03:28Z" level=info msg="Starting signaler"
time="2024-04-17T20:03:28Z" level=info msg="Configuring Media Folder" name="Music Library" path=/music
time="2024-04-17T20:03:28Z" level=info msg="Creating Image cache" maxSize="500 MB" path=/data/cache/images
time="2024-04-17T20:03:28Z" level=info msg="Starting scheduler"
time="2024-04-17T20:03:28Z" level=info msg="Setting Session Timeout" value=24h
time="2024-04-17T20:03:28Z" level=info msg="Scheduling periodic scan" schedule="@every 24h"
time="2024-04-17T20:03:28Z" level=info msg="Login rate limit set" requestLimit=5 windowLength=2
time="2024-04-17T20:03:28Z" level=info msg="Found ffmpeg" path=/usr/bin/ffmpeg
time="2024-04-17T20:03:28Z" level=info msg="Finished initializing cache" cache=Image elapsedTime=2.9ms maxSize=500MB
time="2024-04-17T20:03:28Z" level=info msg="Mounting Native API routes" path=/api
time="2024-04-17T20:03:28Z" level=info msg="Creating Transcoding cache" maxSize="500 MB" path=/data/cache/transcoding
time="2024-04-17T20:03:28Z" level=info msg="Finished initializing cache" cache=Transcoding elapsedTime="147.291µs" maxSize=500MB
time="2024-04-17T20:03:28Z" level=info msg="Mounting Subsonic API routes" path=/rest
time="2024-04-17T20:03:28Z" level=info msg="Mounting Public Endpoints routes" path=/share
time="2024-04-17T20:03:28Z" level=info msg="Mounting LastFM Auth routes" path=/api/lastfm
time="2024-04-17T20:03:28Z" level=info msg="Mounting ListenBrainz Auth routes" path=/api/listenbrainz
time="2024-04-17T20:03:28Z" level=info msg="Mounting Background images routes" path=/backgrounds
time="2024-04-17T20:03:28Z" level=info msg="Mounting WebUI routes" path=/app
time="2024-04-17T20:03:28Z" level=info msg="----> Navidrome server is ready!" address="0.0.0.0:4533" startupTime=17.7ms tlsEnabled=false
time="2024-04-17T20:09:06Z" level=info msg="Streaming file" artist="Yasushi Ishii" bitRate=0 cached=false format=raw originalBitRate=988 originalFormat=flac requestId=6ed5b7ae8f9f/WbHFQxWjqc-000017 title="Fool Cross Over Nirvana (Grudge Prohibited)" transcoding=false user=khalimerot username=khalimerot

Playing file with transcode : 

| \ | |           (_)   | |
|  \| | __ ___   ___  __| |_ __ ___  _ __ ___   ___
| . ` |/ _` \ \ / / |/ _` | '__/ _ \| '_ ` _ \ / _ \
| |\  | (_| |\ V /| | (_| | | | (_) | | | | | |  __/
\_| \_/\__,_| \_/ |_|\__,_|_|  \___/|_| |_| |_|\___|
                          Version: 0.51.1 (6d253225)

time="2024-04-17T20:10:08Z" level=info msg="goose: no migrations to run. current version: 20240122223340\n"
time="2024-04-17T20:10:08Z" level=info msg="Starting signaler"
time="2024-04-17T20:10:08Z" level=info msg="Configuring Media Folder" name="Music Library" path=/music
time="2024-04-17T20:10:08Z" level=info msg="Creating Image cache" maxSize="500 MB" path=/data/cache/images
time="2024-04-17T20:10:08Z" level=info msg="Starting scheduler"
time="2024-04-17T20:10:08Z" level=info msg="Scheduling periodic scan" schedule="@every 24h"
time="2024-04-17T20:10:08Z" level=info msg="Setting Session Timeout" value=24h
time="2024-04-17T20:10:08Z" level=info msg="Login rate limit set" requestLimit=5 windowLength=2
time="2024-04-17T20:10:08Z" level=info msg="Found ffmpeg" path=/usr/bin/ffmpeg
time="2024-04-17T20:10:08Z" level=info msg="Mounting Native API routes" path=/api
time="2024-04-17T20:10:08Z" level=info msg="Creating Transcoding cache" maxSize="500 MB" path=/data/cache/transcoding
time="2024-04-17T20:10:08Z" level=info msg="Finished initializing cache" cache=Transcoding elapsedTime="146.553µs" maxSize=500MB
time="2024-04-17T20:10:08Z" level=info msg="Mounting Subsonic API routes" path=/rest
time="2024-04-17T20:10:08Z" level=info msg="Mounting Public Endpoints routes" path=/share
time="2024-04-17T20:10:08Z" level=info msg="Finished initializing cache" cache=Image elapsedTime=4.4ms maxSize=500MB
time="2024-04-17T20:10:08Z" level=info msg="Mounting LastFM Auth routes" path=/api/lastfm
time="2024-04-17T20:10:08Z" level=info msg="Mounting ListenBrainz Auth routes" path=/api/listenbrainz
time="2024-04-17T20:10:08Z" level=info msg="Mounting Background images routes" path=/backgrounds
time="2024-04-17T20:10:08Z" level=info msg="Mounting WebUI routes" path=/app
time="2024-04-17T20:10:08Z" level=info msg="----> Navidrome server is ready!" address="0.0.0.0:4533" startupTime=17ms tlsEnabled=false
time="2024-04-17T20:10:51Z" level=info msg="Streaming file" artist="Yasushi Ishii" bitRate=0 cached=false format=raw originalBitRate=967 originalFormat=flac requestId=6ed5b7ae8f9f/7TvWrHXggb-000010 title="The World Without Logos" transcoding=false user=khalimerot username=khalimerot
time="2024-04-17T20:11:22Z" level=info msg="Streaming file" artist="Yasushi Ishii" bitRate=320 cached=false format=Opus originalBitRate=750 originalFormat=flac requestId=6ed5b7ae8f9f/7TvWrHXggb-000102 title="Services to Gods (Do on Our Own Accord)" transcoding=true user=khalimerot username=khalimerot
time="2024-04-17T20:11:23Z" level=info msg="Now Playing" artist="Yasushi Ishii" player="NavidromeUI [Firefox/Windows]" requestId=6ed5b7ae8f9f/7TvWrHXggb-000104 title="Services to Gods (Do on Our Own Accord)" user=khalimerot username=khalimerot

Anything else?

it's not the same file in log, but the whole album as the problem, i have a few album with this problem (it's not a lot of album) I don't know if it is related, but i'm reordering my whole library, everything else seems fine. I tried to remove the cache folder. External players have the same problem (tried with substreamer and symfonium)

File information : image

The player not moving when trying to play without transcoding : image

Code of Conduct

deluan commented 3 weeks ago

If other players are not playing without transcoding, seems that your files have some invalid frames that only ffmpeg can read. Can you attach a sample file so I can take a look? Thanks.

khalimerot commented 3 weeks ago

That's strange, Foobar can read the file without any problem.

here is a link to a sample file : https://drive.google.com/file/d/1OrqYF3ZHzVVUzg5BV6aJs23l-6khZ3_i/view?usp=drive_link

(couldn't upload it because of file format)

deluan commented 3 weeks ago

I just checked the file and it plays correctly without transcoding. Don't know what could be the issue, I can't reproduce it.

That's strange, Foobar can read the file without any problem.

I said "only ffmpeg" in the context of Navidrome and Subsonic clients. I didn't mean that the file do not play anywhere else. ffmpeg is usually very lenient and "forgiving" in terms of invalid files.

Anyway, that does not seem the case, as the file plays normally in the web ui. Have you tried to open the file directly in Chrome to see if it plays?

khalimerot commented 3 weeks ago

I tried reading it from my network share in chrome, it works. I tried renaming the artist name folder, it doesn't change anything. Navidrome was able to play theses files before i moved them. And folders rights permissions are the same. I moved the file in the root network share, same problem.

i've only do quick scan till now, i'll do a full scan, i moved a lot of files, maybe it's the source of the problem

khalimerot commented 3 weeks ago

I tried with other files of the same content, it's working now.

Before that i tried to put log level into debug to check if there was more information but there was nothing related.

Is there a way to check if files are good or not?

Thank you!

deluan commented 3 weeks ago

Is there a way to check if files are good or not?

The simplest way is to add the files to your library and see if they can be played or not. That's how I tested the one you sent me.

molang-sama commented 3 weeks ago

I also have the same problem. Is there any solution. deca8799fa1294e8226765cee3dfaceb

deluan commented 3 weeks ago

@molang-sama :

molang-sama commented 2 weeks ago

@molang-sama:

  • 检查日志,确保是同一个问题。
  • 检查是否可以直接在浏览器中播放该文件。如果没有,您的文件可能已损坏。如果它播放,我们需要日志,最好是示例文件。 Jake Miller - Palm Blvd.zip

How do I output logs and this is my sample file.

molang-sama commented 2 weeks ago

@molang-sama:

  • 检查日志,确保是同一个问题。
  • 检查是否可以直接在浏览器中播放该文件。如果没有,您的文件可能已损坏。如果它播放,我们需要日志,最好是示例文件。 I confirm that my file is not corrupted and my foobar2000 can play it properly.
deluan commented 2 weeks ago

How do I output logs and this is my sample file.

https://www.navidrome.org/docs/faq/#-where-are-the-logs

I confirm that my file is not corrupted and my foobar2000 can play it properly.

The attached file does not play in Chrome, so the Web Player will not work with it as well. Try using transcoding.

Edit: Seems that there is an invalid embedded picture in the file, which may be preventing the browser to play it:

$ ffmpeg -i ~/Downloads/Jake\ Miller\ -\ Palm\ Blvd.flac                                                                                                                        
[flac @ 0x128606030] Invalid picture type: -1.
Input #0, flac, from '/Users/deluan/Downloads/Jake Miller - Palm Blvd.flac':
  Metadata:
    TITLE           : Palm Blvd
    ARTIST          : Jake Miller
    ALBUM           : 2:00am in LA
...
korzhyc commented 2 days ago

Maybe... bump