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

Playback stops mid-song after a few songs #608

Open
TacoCake opened this issue May 7, 2024 · 10 comments
Open

Playback stops mid-song after a few songs #608

TacoCake opened this issue May 7, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@TacoCake
Copy link
Contributor

TacoCake commented May 7, 2024

Expected Behavior

Playback doesn't stop unless the user tells it to.

Current Behavior

This is especially noticeable when listening to a playlist, after playing a few songs (the number seems random), playback random stops mid-way through a song.

Doesn't happen with the default navidrome web client, and with Tempo (android client).

Steps to Reproduce

  1. Start playlist in shuffle mode
  2. Play a few songs
  3. wait
  4. Notice it stops by itself.

Possible Solution

Might be related to this PR: #538

Context

I've encountered this issue on windows AND Linux.
I've only really tried the Web Audio player

Application version

v0.6.1

Operating System and version

Windows 10 Desktop, Linux (OpenSUSE tumbleweed appimage) Desktop

Server and Version

Navidrome v0.52.0

Node Version (if developing locally)

No response

@TacoCake TacoCake added the bug Something isn't working label May 7, 2024
@archer3cl
Copy link

I want to add that this also happens with the desktop version. Some times the player refuses to keep playing some songs.
I have tested with Navidrome Web UI, playing the same songs and it has the same behavior.
Finally, I downloaded a different desktop client Supersonic and there where no issues with the songs.

All tested songs are FLAC format.

Hope this helps to narrow down the issue.

@iiPythonx
Copy link
Contributor

If you're able to switch to the mpv player, does it still have these issues? Also how many songs are we talking here, I'll gladly throw on a playlist and see if I can replicate it if I know roughly how many to wait for.

@archer3cl
Copy link

If you're able to switch to the mpv player, does it still have these issues? Also how many songs are we talking here, I'll gladly throw on a playlist and see if I can replicate it if I know roughly how many to wait for.

You are right. Switching to MPV fixes the issue.
As for the number of songs, I'm not sure. But once it happens I can play other songs and if I return to one that was failing, it still fails.

Maybe just put a 1hr playlist, it usually happens before that.

@jbren77
Copy link

jbren77 commented Aug 7, 2024

I'm seeing the same issue here on the latest release. Initially, I encountered this problem while running Jellyfin on a Windows 10 LTSC setup, with both the web player and MPV player. Despite migrating my Jellyfin server to a Docker container on a Linux environment, the issue persists. When I use a different music client like Supersonic, this problem does not occur.

Some things I've noticed, sorry if it's not the clearest:

  • The issue manifests after the playback of approximately 5-10 songs within a session.
  • It is triggered by actions such as starting a new track, seeking to a specific timestamp, or adding a track to a playlist. These commands result in a hang time of up to 30 seconds, although it is often shorter.
  • A reliable indicator of the issue is when the album artwork fails to update within 5 seconds of a new track starting. Once the album artwork updates, the commands will go through fine again.
  • When I monitor the jellyfin dashboard while a song is stuck in Feishin, I can actually see the song being served and the timestamp increasing, but it does not play in Feishin.
  • Again, I tried mpv and it seemed better at first but then it started happening again.
  • Skipping forward a song and then back can sometimes jumpstart the player into working again.
  • All songs I have tested are flac files

@jeffvli
Copy link
Owner

jeffvli commented Aug 8, 2024

@jbren77 Try to reproduce it with the browser devtools window open.

  1. On the sidebar, click the file menu button and click Open browser devtools
  2. Switch to the Network tab inside the devtools, and toggle the Preserve log checkbox to on
  3. Keep the devtools open and use the app as you normally would
  4. When the problem happens, look at the devtools window and check which network request the app is stuck on. The status column should show as Pending or similar

When I monitor the jellyfin dashboard while a song is stuck in Feishin, I can actually see the song being served and the timestamp increasing, but it does not play in Feishin.

This doesn't indicate that the song is playing in the client. The jellyfin dashboard listens for the client app's scrobble event which Feishin sends to the Jellyfin, and then Jellyfin automatically increases the current timestamp whether or not the song is actually playing.

@jbren77
Copy link

jbren77 commented Aug 9, 2024

Thanks for the steps & clarification @jeffvli.

The request that gets hung up first has a url like this:
https://jellyfin.my-domain/audio/value/universal?userId=value&deviceId=&audioCodec=aac&apiKey=value&playSessionId=&container=opus,mp3,aac,m4a,m4b,flac,wav,ogg&transcodingContainer=ts&transcodingProtocol=hls

then multiple progress events show up as pending after it. Here's a screenshot:
feishin-pending

then when it loads it looks like this:
feishin-loaded

more info on the event at the top:
feishin-loaded-moredetails

I wouldn't be surprised if it has something to do with my setup honestly. Happy to provide more info just lmk.

@jeffvli
Copy link
Owner

jeffvli commented Aug 9, 2024

@jbren77 Your issue seems similar to #681 (comment). Take a look at your reverse proxy configuration as well as trying to reproduce the issue with the private address to see if it persists.

@jbren77
Copy link

jbren77 commented Aug 9, 2024

Ok yes, this issue looks very identical to what I'm seeing! That is almost certainly the fix. I don't have access to the buffering setting with current setup so I'll look into switching to nginx and modifying that setting when I have some more time.

Thanks a lot for your replies and for working on this player!

@kgarner7
Copy link
Collaborator

kgarner7 commented Sep 9, 2024

Is this issue still reproducible on 0.8.1?

@llek1000
Copy link

llek1000 commented Sep 16, 2024

Hello, I am jumping in here to clear up a few things as I originally reported the #681 issue. I was pretty busy at the time, and did not test this thoroughly enough. The issue still persists, even after modifying my reverse proxy settings. The issue is not present when utilising MPV player instead of the web player, so I think that the issue can be narrowed down to this. I am really sorry for leaving you with a "fix" that does not work. I switched to MPV on my devices, and did not have the energy to further diagnose this.

I reopened the original issue, and edited my comment with the "fix", just to let other people know. The thing is that I am connecting to Navidrome, and @jbren77 is connecting to Jellyfin, but we're experiencing a very similiar, if not the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants