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

Jellyfin crashes each time after 5 min when playing a video

Open bmillemathias opened this issue 2 years ago • 59 comments

Describe the bug Any video media play ends up by jellyfin crashing and restarting after around 5 min.

To Reproduce

  1. Launch a video
  2. Wait ~ 5 minutes. (YMMV)

Expected behavior Hmmm not crashing :)

Logs Don't know how I can provide you that. tell me where they are and I'll provide them

Screenshots none

System (please complete the following information):

  • Android TV: [e.g. Android 9 or Fire OS 7]
  • Device manufacturer: free.fr (French ISP)
  • Device model: Freebox pop player (spec available https://www.androidtv-guide.com/pay-tv-provider/freebox-pop)
  • Jellyfin server version: 10.7.6

Additional context no problem with 0.11

bmillemathias avatar Aug 01 '21 18:08 bmillemathias

occurs on google tv as well.

acvigue avatar Aug 10 '21 01:08 acvigue

The same thing happens to me, the app restarts, but every 10 minutes or so.

therhenals avatar Aug 10 '21 13:08 therhenals

Similar after a few minutes...

CodeMonkeyUK avatar Aug 11 '21 17:08 CodeMonkeyUK

this seems to be specific to libVLC and the issue is pretty severe, preventing any of our TVs from playing anything

acvigue avatar Aug 11 '21 23:08 acvigue

this seems to be specific to libVLC and the issue is pretty severe, preventing any of our TVs from playing anything

I figured it out about 10 hours ago, I set to ExoPlayer and everything works fine.

therhenals avatar Aug 12 '21 01:08 therhenals

switching to exo doesn't help - seeking doesn't work.

acvigue avatar Aug 12 '21 02:08 acvigue

switching to exo doesn't help - seeking doesn't work.

It helped me!

therhenals avatar Aug 12 '21 16:08 therhenals

Same, for me it usually happens around 7 minutes. Server logs don't show anything related to the crash/video stopping.

Cookie-Monster-Coder avatar Aug 16 '21 07:08 Cookie-Monster-Coder

Attached are the logs from my test session after a fresh restart. jellyfin_atv_0.12.0-beta4.log

I don't have this issue when forcing the app to use ExoPlayer, so I agree it looks like an issue with VLC.

crobibero avatar Aug 22 '21 13:08 crobibero

Attached are the logs from my test session after a fresh restart. jellyfin_atv_0.12.0-beta4.log

I don't have this issue when forcing the app to use ExoPlayer, so I agree it looks like an issue with VLC.

Did you have to do anything special to reproduce?

MrChip53 avatar Aug 25 '21 22:08 MrChip53

Attached are the logs from my test session after a fresh restart. jellyfin_atv_0.12.0-beta4.log I don't have this issue when forcing the app to use ExoPlayer, so I agree it looks like an issue with VLC.

Did you have to do anything special to reproduce?

Nope, just started any playback. Happens every time I use libVLC

crobibero avatar Aug 25 '21 22:08 crobibero

I don't really see anything in the provided logs either...

thornbill avatar Aug 26 '21 16:08 thornbill

Logs from current master running with the debugger attached.. From an outsider looking in, it seems to be

2021-08-26 16:02:53.553 10140-10720/org.jellyfin.androidtv.debug E/VLC: [6cd655b0/29e0] libvlc decoder: Decoder is draining

Just org.jellyfin.androidtv.debug logs

2021-08-26 16:02:50.913 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.553 10140-10720/org.jellyfin.androidtv.debug E/VLC: [6cd655b0/29e0] libvlc decoder: Decoder is draining
2021-08-26 16:02:53.592 10140-10720/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29e0] libvlc decoder: EOS sent, waiting for OutThread
2021-08-26 16:02:53.722 10140-10140/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.921 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.980 10140-10719/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29df] libvlc decoder: EOS received
2021-08-26 16:02:54.398 10140-10721/org.jellyfin.androidtv.debug D/AudioTrack: stop() called with 22872687 frames delivered
2021-08-26 16:02:54.502 10140-10140/org.jellyfin.androidtv.debug D/PlaybackController: On Completion fired
2021-08-26 16:02:54.503 10140-10719/org.jellyfin.androidtv.debug E/NdkMediaCodec: sf error code: -38
2021-08-26 16:02:54.503 10140-10719/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29df] libvlc decoder: AMediaCodec.dequeueOutputBuffer failed
2021-08-26 16:02:54.515 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: ReportPlaybackStopped: Item 9197d589233164b844cb12f99745e52d, Ticks: 4762680000
2021-08-26 16:02:54.522 10140-10140/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Sessions/Playing/Stopped
2021-08-26 16:02:54.523 10140-10140/org.jellyfin.androidtv.debug D/PlaybackController: Moving to next queue item. Index: 1
2021-08-26 16:02:54.530 3455-6812/? I/ActivityManager: START u0 {cmp=org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.nextup.NextUpActivity (has extras)} from uid 10056
2021-08-26 16:02:54.538 10140-10710/org.jellyfin.androidtv.debug D/SurfaceUtils: disconnecting from surface 0x5faa2808, reason disconnectFromSurface
2021-08-26 16:02:54.613 3455-6812/? V/WindowManager: Changing focus from Window{4fb3def u0 org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.PlaybackOverlayActivity} to null Callers=com.android.server.wm.WindowManagerService.setFocusedApp:2585 com.android.server.am.ActivityManagerService.setResumedActivityUncheckLocked:3650 com.android.server.am.ActivityStack.onActivityStateChanged:520 com.android.server.am.TaskRecord.onActivityStateChanged:1818 
2021-08-26 16:02:54.644 10140-10140/org.jellyfin.androidtv.debug W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ec5cf8d
2021-08-26 16:02:54.677 10140-10140/org.jellyfin.androidtv.debug I/AppThemeCallbacks: Applying theme: DARK
2021-08-26 16:02:54.687 10140-10704/org.jellyfin.androidtv.debug D/AudioTrack: stop() called with 0 frames delivered
2021-08-26 16:02:54.727 10140-10140/org.jellyfin.androidtv.debug I/BackgroundService: Adding BackgroundServiceFragment to activity
2021-08-26 16:02:54.736 10140-10191/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Users/2130c095606e49619adcbacfbdabe373/Items/387e76c31f3a3002f797de21511ecbb4?format=json
2021-08-26 16:02:54.796 10140-10140/org.jellyfin.androidtv.debug E/ThemeUtils: View class androidx.appcompat.widget.AppCompatButton is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2021-08-26 16:02:54.822 10140-10140/org.jellyfin.androidtv.debug D/BackgroundServiceFragment: Restoring background drawable
2021-08-26 16:02:54.831 3455-6812/? I/WindowManager: WindowState() - found Launcher @ mAppToken:AppWindowToken{8a2387 token=Token{2397c6 ActivityRecord{8eb49a1 u0 org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.nextup.NextUpActivity t932}}}
2021-08-26 16:02:54.834 3455-6812/? I/NvUtils: onActivityResumed AM packageName = org.jellyfin.androidtv.debug

All logs (from crash)

2021-08-26 16:02:50.913 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.135 3274-10715/? D/NvOsDebugPrintf: NVMEDIA: FrameRate(for last 120 frames) = 23.976043, AvgFrameRate = 23.969893 
2021-08-26 16:02:53.553 10140-10720/org.jellyfin.androidtv.debug E/VLC: [6cd655b0/29e0] libvlc decoder: Decoder is draining
2021-08-26 16:02:53.592 10140-10720/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29e0] libvlc decoder: EOS sent, waiting for OutThread
2021-08-26 16:02:53.593 3274-10713/? D/NvOsDebugPrintf: NVMEDIA: NvMMLiteNVMEDIADecDoWork: 2503: NVMMLITE_NVMEDIA: EOS detected
2021-08-26 16:02:53.722 10140-10140/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.921 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://jellyfin.domain.tld/Sessions/Playing/Progress
2021-08-26 16:02:53.969 3274-10715/? D/NvOsDebugPrintf: NVMEDIA: NVMEDIABufferProcessing: 1241: Processing of EOS 
2021-08-26 16:02:53.974 3274-10715/? D/NvOsDebugPrintf: NVMEDIA: NVMEDIABufferProcessing: 1319: Processing of EOS Done
2021-08-26 16:02:53.980 10140-10719/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29df] libvlc decoder: EOS received
2021-08-26 16:02:54.398 10140-10721/org.jellyfin.androidtv.debug D/AudioTrack: stop() called with 22872687 frames delivered
2021-08-26 16:02:54.411 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.411 3598-4048/? I/chatty: uid=1002(bluetooth) BluetoothAvrcpH identical 10 lines
2021-08-26 16:02:54.411 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.451 3213-10723/? W/AudioFlinger: pause because of UNDERRUN, framesReady = 111,minFrames = 256, mFormat = 0x1
2021-08-26 16:02:54.456 3174-10726/? W/nvaudio_hw: UNDERRUN DETECTED for hdmi-playback ret 0 avail 524 
2021-08-26 16:02:54.456 3213-10723/? W/AudioFlinger: pause because of UNDERRUN, framesReady = 0,minFrames = 256, mFormat = 0x1
2021-08-26 16:02:54.466 3174-6318/? W/nvaudio_hw: stop_output_stream: 4 underruns seen on pcm device hdmi-playback
2021-08-26 16:02:54.502 10140-10140/org.jellyfin.androidtv.debug D/PlaybackController: On Completion fired
2021-08-26 16:02:54.503 10140-10719/org.jellyfin.androidtv.debug E/NdkMediaCodec: sf error code: -38
2021-08-26 16:02:54.503 10140-10719/org.jellyfin.androidtv.debug W/VLC: [6cd655b0/29df] libvlc decoder: AMediaCodec.dequeueOutputBuffer failed
2021-08-26 16:02:54.506 3213-3348/? W/AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x466d4000
2021-08-26 16:02:54.515 10140-10140/org.jellyfin.androidtv.debug I/jellyfin-apiclient: ReportPlaybackStopped: Item 9197d589233164b844cb12f99745e52d, Ticks: 4762680000
2021-08-26 16:02:54.517 3274-10717/? D/NvOsDebugPrintf: NVMEDIA: NVMEDIAFrameStatusReporting: 2011: Closing NVMEDIA Frame Status Thread -------------
2021-08-26 16:02:54.517 3274-10718/? D/NvOsDebugPrintf: NVMEDIA: NVMEDIAVPRFloorSizeSettingThread: 1830: Closing NVMEDIAVPRFloorSizeSettingThread -------------
2021-08-26 16:02:54.517 3274-10716/? D/NvOsDebugPrintf: NVMEDIA: NVMEDIAFrameDelivery: 1866: Closing NVMEDIA Frame Delivery Thread -------------
2021-08-26 16:02:54.522 10140-10140/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Sessions/Playing/Stopped
2021-08-26 16:02:54.523 10140-10140/org.jellyfin.androidtv.debug D/PlaybackController: Moving to next queue item. Index: 1
2021-08-26 16:02:54.529 3274-10713/? D/NvOsDebugPrintf: NVMEDIA: NvMMLiteTVMRDecBlockClose: 3703: Done 
2021-08-26 16:02:54.530 3455-6812/? I/ActivityManager: START u0 {cmp=org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.nextup.NextUpActivity (has extras)} from uid 10056
2021-08-26 16:02:54.538 10140-10710/org.jellyfin.androidtv.debug D/SurfaceUtils: disconnecting from surface 0x5faa2808, reason disconnectFromSurface
2021-08-26 16:02:54.550 3207-3207/? E/powerHAL::common: Unknown power hint: 0x8
2021-08-26 16:02:54.594 3455-6812/? I/MediaFocusControl: abandonAudioFocus() from uid/pid 10056/10140 clientId=android.media.AudioManager@2acff19org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment$6@fb86bde
2021-08-26 16:02:54.596 3455-6812/? I/MediaFocusControl: abandonAudioFocus() from uid/pid 10056/10140 clientId=android.media.AudioManager@2acff19org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment$6@fb86bde
2021-08-26 16:02:54.598 3455-11776/? D/NvThermalService: setAppClose
2021-08-26 16:02:54.613 3455-6812/? V/WindowManager: Changing focus from Window{4fb3def u0 org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.PlaybackOverlayActivity} to null Callers=com.android.server.wm.WindowManagerService.setFocusedApp:2585 com.android.server.am.ActivityManagerService.setResumedActivityUncheckLocked:3650 com.android.server.am.ActivityStack.onActivityStateChanged:520 com.android.server.am.TaskRecord.onActivityStateChanged:1818 
2021-08-26 16:02:54.628 3598-4048/? I/Avrcp: Skipping update due to invalid playback state
2021-08-26 16:02:54.628 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.628 3598-4048/? I/chatty: uid=1002(bluetooth) BluetoothAvrcpH identical 10 lines
2021-08-26 16:02:54.628 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.635 3213-11339/? W/AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x46683a00
2021-08-26 16:02:54.637 3455-11777/? W/NvAppProfileService: App Profiles: Enabled
2021-08-26 16:02:54.644 10140-10140/org.jellyfin.androidtv.debug W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ec5cf8d
2021-08-26 16:02:54.649 4275-4303/? I/android_os_HwBinder: HwBinder: Starting thread pool for default::[email protected]::IPower
2021-08-26 16:02:54.677 10140-10140/org.jellyfin.androidtv.debug I/AppThemeCallbacks: Applying theme: DARK
2021-08-26 16:02:54.681 3213-10723/? W/AudioFlinger: pause because of UNDERRUN, framesReady = 0,minFrames = 256, mFormat = 0x1
2021-08-26 16:02:54.685 3213-10723/? W/AudioFlinger: pause because of UNDERRUN, framesReady = 0,minFrames = 256, mFormat = 0x1
2021-08-26 16:02:54.687 10140-10704/org.jellyfin.androidtv.debug D/AudioTrack: stop() called with 0 frames delivered
2021-08-26 16:02:54.689 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.689 3598-4048/? I/chatty: uid=1002(bluetooth) BluetoothAvrcpH identical 4 lines
2021-08-26 16:02:54.689 3598-4048/? I/bt_btif_avrc: register_notification_rsp: Avrcp device is not connected, handle: 0x0
2021-08-26 16:02:54.727 10140-10140/org.jellyfin.androidtv.debug I/BackgroundService: Adding BackgroundServiceFragment to activity
2021-08-26 16:02:54.736 10140-10191/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://jellyfin.domain.tld/Users/2130c095606e49619adcbacfbdabe373/Items/387e76c31f3a3002f797de21511ecbb4?format=json
2021-08-26 16:02:54.747 3213-3348/? W/AudioFlinger: moveEffectChain_l() effect chain for session 0 not on source thread 0x466d4000
2021-08-26 16:02:54.796 10140-10140/org.jellyfin.androidtv.debug E/ThemeUtils: View class androidx.appcompat.widget.AppCompatButton is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2021-08-26 16:02:54.822 10140-10140/org.jellyfin.androidtv.debug D/BackgroundServiceFragment: Restoring background drawable
2021-08-26 16:02:54.831 3455-6812/? I/WindowManager: WindowState() - found Launcher @ mAppToken:AppWindowToken{8a2387 token=Token{2397c6 ActivityRecord{8eb49a1 u0 org.jellyfin.androidtv.debug/org.jellyfin.androidtv.ui.playback.nextup.NextUpActivity t932}}}
2021-08-26 16:02:54.831 3455-6812/? E/WindowManager: App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
2021-08-26 16:02:54.834 3455-6812/? I/NvUtils: onActivityResumed AM packageName = org.jellyfin.androidtv.debug

crobibero avatar Aug 26 '21 22:08 crobibero

https://gist.github.com/Artiume/1e206bfc42cc3f50f99d0564c9cd2eaa

Here's some more logs for it. I saw it was using libVLC but beyond that, I'm not sure.

Artiume avatar Sep 26 '21 03:09 Artiume

Same here, I've been experiencing this same bug for months now, preventing me from fully migrating from Kodi to Jellyfin... I'd like to add that the tests I made were made with a Nvidia SHIELD's Jellyfin Android app, with a dozen different movies, all of them in 4KHDR x265:

  • With libVLC: it works well but eventually crashes after a few minutes
  • With ExoPlayer: no sound at all and fails to load subtitles
  • With External Player (Kodi or VLC) it also crashes after a few minutes...

This is sad... :'(

cirdanmiriel avatar Sep 26 '21 09:09 cirdanmiriel

Tried version 0.12.1 and still got the same behavior, whatever the backend I use

bmillemathias avatar Oct 08 '21 08:10 bmillemathias

This seems to be a pretty common problem, at least common enough to stave off stalebot from mass-closing them.... (Please @nielsvanvelzen , can we not have this stalebot toxicity, especially on issues that have been tagged?)

Potentially related:

Perhaps the issue should have boundaries drawn and tracked in a single place?

  • #606
  • #1183
  • #1035
  • #277
  • #989
  • #1160
  • #1152
  • #1176
  • #614

douglasg14b avatar Oct 11 '21 00:10 douglasg14b

Thank you for sharing your concerns @douglasg14b. Unfortunately the Android TV team is really small and we don't have the time to properly triage all issues. We're using stalebot to help with this, the bot will only close if an issue becomes stale. Leaving a comment will prevent the bot from closing. I know this is not an ideal solution (I don't like it myself when this happens on another repository either) but we'll have to do it with what we have.

We're 100% aware that there are some major issues with playing video (and audio) in our app. To fix this a complete rewrite of this code is happening as we speak (#1057). The current code is in "maintenance" mode and we will try to fix issues we find (and review/accept pull requests for those fixes and smaller features!). Unfortunately this particular issue is really hard to fix due too the bad state of the code. For example: our implementation using LibVLC is really old and not following the standard API like the official VLC app.

I'll see if I can find time later this week to look trough your list and close duplicate issues as needed. I'm quite busy at the moment.

nielsvanvelzen avatar Oct 11 '21 06:10 nielsvanvelzen

@nielsvanvelzen I appreciate the reply! Thank you for the explanation.

I might suggest making the rewrite a bit more widely known (Pinning can be easily missed, perhaps an issue template thing calling it out?), indicating that these playback issues are known and are probably begin addressed as part of that initiative.

Just knowing that a thing is happening can reduce user frustration and sets reasonable expectations, even if timelines are largely unknown. This by extension can reduce load and frustration for devs who know what's happening, but have to constantly put out fires from those who are not aware.

douglasg14b avatar Oct 11 '21 18:10 douglasg14b

@nielsvanvelzen Thanks for acknowledging the many playback issues. I was getting increasingly frustrated that these reports were seemingly not getting any attention, and it's great to know it's being worked on.

krutburken avatar Oct 12 '21 07:10 krutburken

Thanks for the information. You guys do a good job 👌 Wouldn't it be a good idea to make the exoplayer the default player for the moment? Because it's looks for me like it have less(/no known bugs?) bugs and reduce the amount of issues generating? And when it's fixed the setting could be set back to automatic.

Xyz00777 avatar Oct 14 '21 16:10 Xyz00777

Thanks for the suggestion @Xyz00777. We've discussed this today and agree that it might be better to use ExoPlayer as default until the playback rewrite is ready.

Relevant pull request: #1212

nielsvanvelzen avatar Oct 19 '21 20:10 nielsvanvelzen

i have the exact same issue on a firetv-cube. interestingly not even after 5 minutes, but rather after 1-2 minutes. I am pretty sure, it has something to do with audio-passthrough. as soon as i switch to "direct audio" (no downmixing), and toggle the setting for "dts capable hardware", the issue went away. one sidenote is, that dts-hd-streams (i wish, jellyfin would show and mark the streams correctly in the firetv app, they are all shown equaly) are muted. altough i have a dts-hd-capable av-receiver, the cube is currently connected directly to the tv, and because the tv lacks ARC-support, i feed the audio back to the AV via toslink/spdif. as far as i know, toslink is not capable of transferring hd-audio formats, only plain dts and dd. maybe this issue would be partly solved, when i get rid of the toslink-line.

...maybe this helps abit to narrow the issue down...

zeus86 avatar Dec 28 '21 23:12 zeus86

Have the same issue on firetv stick. Interestingly, happens on exoplayer as well. Though the occurrence is not every five minutes, but random.

Behaviors noticed.

  1. Randomly stops the streams, however, can press resume and continue from where it stopped. No matter which player is used, (exoplayer and libVLC)
  2. Randomly stops the streams, resetting the playback progress for the user to zero, and needs to start from the beginning.

Jellyfin version is 10.8-beta-3 (tried on 10.7 and 2 betas of 10.8)

Couldn’t be reproduced in iOS or web version with the same streams.

The only log I found is to the Progress endpoint with response code 204.

Additional info: Can confirm the websockets working properly in web version.

arunbabucode avatar Jan 01 '22 10:01 arunbabucode

I dunno if it helps, but I have this log on my server (Jellyfin docker 10.8):

[2022-01-02 01:30:26.808 +03:00] [INF] [28] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.12.3" playing "Эпизод 1". Stopped at "7492" ms
[2022-01-02 01:30:40.751 +03:00] [INF] [29] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" request
[2022-01-02 01:30:45.744 +03:00] [INF] [25] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" request
[2022-01-02 01:31:28.930 +03:00] [INF] [22] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2022-01-02 01:31:40.927 +03:00] [INF] [30] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2022-01-02 01:35:59.234 +03:00] [INF] [42] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2022-01-02 01:36:57.996 +03:00] [INF] [39] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/transcodes/6ccc59f2b3ad3567f8e0a932eb986ee7.mkv"
[2022-01-02 01:36:59.745 +03:00] [INF] [42] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.12.3" playing "Эпизод 1". Stopped at "0" ms
[2022-01-02 01:37:00.107 +03:00] [INF] [44] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" closed
[2022-01-02 01:37:00.760 +03:00] [INF] [44] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" request

It seems when an entire video was transcoded it lost any connection to android tv app and remove transcoded file.

Also, I tried to play another video. No transcoding, just playback directly to android TV and got this error log:

[2022-01-02 02:11:59.572 +03:00] [WRN] [54] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "5.18.235.253" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2022-01-02 02:11:59.615 +03:00] [INF] [54] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" closed
[2022-01-02 02:12:02.560 +03:00] [INF] [31] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "5.18.235.253" request

All of it reproduce on last Android TV beta APP and web client just work normal with both video files.

genetus avatar Jan 01 '22 22:01 genetus

It's definitely related to transcoding. Ever since I've started to optimize my media for directplay (audio, video, subtitles), this problem has completely gone away.

krutburken avatar Jan 02 '22 09:01 krutburken

With and without transcoding the same happens here on Shield. Similar error log to @genetus

Sundown89 avatar Jan 04 '22 15:01 Sundown89

Direct Play should behave as normal. In this situation, transcoding means FFMpeg being involved to allow for Remuxing, Direct Steaming or video transcoding. If there's ffmpeg logs being generated, it's going to be impacted by this bug.

Artiume avatar Jan 04 '22 15:01 Artiume

I just switched over from Emby. And I am also affected by this on a AndroidTV and a FireTV Stick. Any updates on this issue?

robingroppe avatar Jan 28 '22 21:01 robingroppe

@robingroppe You can try a build from the latest master. Don't know when it's supposed to be released but this problem seems to have been fixed there

krutburken avatar Jan 29 '22 09:01 krutburken