jellyfin-kodi icon indicating copy to clipboard operation
jellyfin-kodi copied to clipboard

Playback fails on LAN

Open faelterman opened this issue 3 years ago • 16 comments

Describe the bug

Hi, since a couple of days I am experiencing constant error on my shield TV. I am running jellyfin in docker, on my server. On the shield I run kodi (stable version). And connect to Jellyfin via the jellyfin-kodi addon in "addon-mode"(connected to ip-addr.). Previously this whole setup performed great. No movies start playing and after a couple of minutes they either stall or they stop completly (returning me to the movies menu). Sometimes I get a notifications that the connection is slow. Note that my shield is hardwired. So I stay inside LAN and the connection is tested and good. When I watch the same movie through the webplayer, all is fine.

I searched for hours and tried few things but nothing seemed to help. I really hope someone here can point me in the right direction, or define this as a bug, because now I haven no idea what so ever.

To Reproduce

  1. Go to 'Movies'
  2. Click on ' a random movie'
  3. Sit back
  4. Relax

Expected behavior Playing through the whole movie till the end.

Logs https://pastebin.com/AitG4zkt System (please complete the following information):

  • OS: Android
  • Jellyfin Version: 10.7.2
  • Kodi Version: 19.0.0
  • Addon Version: 0.7.2+py3
  • Playback Mode: Add-On

faelterman avatar Apr 28 '21 18:04 faelterman

Are there any errors in the server logs at the same time that you try this?

mcarlton00 avatar Apr 28 '21 23:04 mcarlton00

https://pastebin.com/5dVZMJwq Sorry, this is my server log.

faelterman avatar Apr 29 '21 10:04 faelterman

I can confirm that I've been having the same issue for the past couple of days. One interesting thing to note is that in my instance, if you have the "Jellyfin Intros" plugin installed on your server, the intro videos will play. However, the selected media content will fail to play afterwards. I am able to cast the Jellyfin video to Kodi using the Yatse app, which is a nice placebo - but I'm not capable of playing anything from the Kodi menus.

I can confirm that OP's server logs appear very similar to mine.

Edit: Downgraded to version 7.1, and videos play perfectly. My Jellyfin library is on an NFS share for what it's worth.

NovaCyntax avatar Apr 29 '21 20:04 NovaCyntax

Hmm, I'm not able to replicate this, everything seems fine here. And there's no tracebacks in the logs from the addon, which is odd for a playback failure. I was suspecting it was high bitrate issues, but maybe not. The only changes between 0.7.1 and 0.7.2 in regards to playback is one fix for transcoding audio streams and one for maximum allowed bitrate. One thing to try is to adjust the maximum bitrate allowed by the addon.

Addons -> Jellyfin -> Settings -> Playback -> Max stream bitrate. in 0.7.1 and previous, this defaulted to 100, however with the max bitrate fix we implemented in 0.7.2, we increased this to 1000. It's likely your installs are still using the old 100 value. It's unlikely to fix it, but can you try increasing the value to 1000 and playing a video?

mcarlton00 avatar May 01 '21 01:05 mcarlton00

Apologies for the late response. I updated to 0.7.2, and a video I played earlier in the day refused to play (with and without updating bitrate to 1000). You were correct in my case that I was previously using 100, although the change in value doesn't seem to be the culprit. Nothing new appeared in my logs, they're still the same as OP's on both client/server side. After downgrading to 0.7.1+py2 from the Jellyfin repo, the same video played successfully.

NovaCyntax avatar May 02 '21 01:05 NovaCyntax

@NovaCyntax are you on a PC, or also a shield/android TV device?

mcarlton00 avatar May 02 '21 20:05 mcarlton00

I'm running Kodi via OSMC installed on a Vero 4k+. I'm not familiar with Shield/Android TV but OSMC is based on Debian I believe.

NovaCyntax avatar May 03 '21 03:05 NovaCyntax

Can you try installing Kodi and the addon onto a PC and trying to play something there? I'm wondering if it's the interaction between the addon and your servers specifically, or maybe a certain build of Kodi that we're running against.

I've tried both Kodi 18 and 19 on my Arch PC. I've tried Kodi 19 on my phone. I've tried going through http with IP:port and https through my domain. I can't make playback fail. There's something else going on here that I'm not sure how to track down yet.

mcarlton00 avatar May 04 '21 02:05 mcarlton00

@mcarlton00 Apologies for the delay, been busy irl. I'll test that for you tonight on my Ubuntu desktop. Are you still operating under the working theory that numpy is the cause for the playback fails?

Edit: On my Ubuntu system I installed Kodi 18.6, the Jellyfin add-on, and the playback failed. It did experience the same behavior as OSMC, where the Jellyfin Intros plugin will queue and play a pre-roll properly, prior to the selected video file failing. Version 0.7.2 of the add-on functions properly. The selected media is still being accessed via an NFS share, but I'm not sure why that would cause an issue with a transcoding update.

NovaCyntax avatar May 15 '21 01:05 NovaCyntax

If numpy is installed and you're running 0.7.3 (and Kodi 19), then it definitely causes playback failures and triggers no logs. 0.7.2 shouldn't be affected by that issue. Though it makes no sense for numpy to be installed on OSMC, and afaik it's impossible to have it be installed on a shield TV, so it may be a cause, but not the cause for this issue. Especially since you seem to be on Kodi 18/python 2 still.

Though we've just hit something rather interesting in your edit. When you first commented on this issue, you were on 0.7.2 and it wasn't working. Though now you say that 0.7.2 works properly on your Ubuntu box. I'm not sure what that means yet. The mystery unfortunately keeps getting deeper. All I've got left is getting an OSMC image onto one of my Pis and seeing if I can make it fail there, though given my experiences so far I don't give it good odds.

One more odd thing to try. When you go to play a video, right click/long click/press c (just get to the context menu) and select "force transcode". I can't imagine why it would have a difference, but it's worth checking.

Edit: I suppose I'll also have to finally try the intros plugin and see if that's having a factor in this or not.

mcarlton00 avatar May 15 '21 01:05 mcarlton00

@mcarlton00 Pardon, I meant to say 0.7.1 in my previous post, not 0.7.2, so the issue should be the same still thankfully. I'll try what you recommended.

Edit: When playing with "Jellyfin Transcode" (I didn't see a "force transcode" option), the same behavior persists.

NovaCyntax avatar May 15 '21 02:05 NovaCyntax

Presumably 0.7.3 also fails in this case?

mcarlton00 avatar May 16 '21 15:05 mcarlton00

Yes, I tested 0.7.3 on my desktop PC running Ubuntu and the same behavior occurred. I wish I knew whether or not OP's Jellyfin server was accessing files via a mounted network drive. I can probably try testing that theory later, although it might not be for a while.

NovaCyntax avatar May 17 '21 03:05 NovaCyntax

@mcarlton00

Hello,

same issue for me, I use jellyfin in docker, everything is up to date and impossible to play a video on my kodi.

Kodi jellyfin logs:

2021-06-03 18:42:21.303 T:3664    ERROR <general>: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
2021-06-03 18:42:21.303 T:3664    ERROR <general>: CCurlFile::Open failed with code 0 for http://192.168.1.106:8096/Videos/0e36e4ec06d7a88c2258e90040ff40af/stream?static=true&MediaSourceId=0e36e4ec06d7a88c2258e90040ff40af&api_key=0b361add5ecf4d0492e90073aad8e084:
                                                   
2021-06-03 18:42:21.303 T:3664    ERROR <general>: CFileCache::XFILE::CFileCache::Open - <http://192.168.1.106:8096/Videos/0e36e4ec06d7a88c2258e90040ff40af/stream?static=true&MediaSourceId=0e36e4ec06d7a88c2258e90040ff40af&api_key=0b361add5ecf4d0492e90073aad8e084> failed to open
2021-06-03 18:42:21.303 T:3664    ERROR <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.jellyfin/dc977050953f5ea3d8da5a2183da666a/?filename=Cobra.Kai.s01e01.mkv&id=0e36e4ec06d7a88c2258e90040ff40af&dbid=1&mode=play]
2021-06-03 18:42:21.304 T:3664     INFO <general>: CVideoPlayer::OnExit()

Jellyfin logs:

[2021-06-03 18:42:01.549 +02:00] [INF] [66] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Starting User Changes Sync...
[2021-06-03 18:42:01.591 +02:00] [INF] [66] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: "USERSYNC" User "e891f8c95cc64328b32b0fcc9f46e310"("maison") posted 2 Updates: "0e36e4ec06d7a88c2258e90040ff40af,dc977050953f5ea3d8da5a2183da666a"
[2021-06-03 18:42:01.591 +02:00] [INF] [66] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: User Changes Sync Finished Taking "00:00:00.0423796"
[2021-06-03 18:42:18.774 +02:00] [INF] [42] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2021-06-03 18:42:21.729 +02:00] [INF] [69] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Kodi" "0.7.3+py3" playing "Ace Degenerate". Stopped at "0" ms
[2021-06-03 18:42:22.260 +02:00] [INF] [63] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Starting User Changes Sync...
[2021-06-03 18:42:22.310 +02:00] [INF] [63] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: "USERSYNC" User "e891f8c95cc64328b32b0fcc9f46e310"("maison") posted 2 Updates: "0e36e4ec06d7a88c2258e90040ff40af,dc977050953f5ea3d8da5a2183da666a"

Any help?

Edit: still the same with version 0.7.4 Edit2: I tried by installing a new Jellyfin server directly on a raspberry, and I have exxactly the same issue, so impossible to read any file Edit3: it works with transcoding, but I would like to avoid

capic avatar Jun 03 '21 16:06 capic

Recently migrated my Jellyfin server to the device which contains the local copies of the files (as opposed to accessing them via an NFS share) and can confirm that this remains an issue on my end. The older versions of Jellyfin for Kodi continue to work flawlessly

NovaCyntax avatar Nov 29 '21 04:11 NovaCyntax

Update @mcarlton00 - I updated my Jellyfin server to 10.7.7 sometime in the last month or two, and apparently that fixed this issue on my end - all new versions of the add-on work. Nothing else changed. No clue what it was. @faelterman can you check this on your end?

NovaCyntax avatar Jan 14 '22 05:01 NovaCyntax