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

Jellyfin crashes each time after 5 min when playing a video #1061

Closed
bmillemathias opened this issue Aug 1, 2021 · 63 comments
Closed

Jellyfin crashes each time after 5 min when playing a video #1061

bmillemathias opened this issue Aug 1, 2021 · 63 comments
Labels
bug Something isn't working playback Issue related to media playback stale

Comments

@bmillemathias
Copy link
Contributor

bmillemathias commented Aug 1, 2021

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):

Additional context
no problem with 0.11

@bmillemathias bmillemathias added the bug Something isn't working label Aug 1, 2021
@bmillemathias bmillemathias changed the title v0.12-beta, Jellyfin crashes after 5 min v0.12-beta, Jellyfin crashes each time after 5 min when playing a video Aug 1, 2021
@acvigue
Copy link
Member

acvigue commented Aug 10, 2021

occurs on google tv as well.

@therhenals
Copy link
Contributor

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

@CodeMonkeyUK
Copy link

Similar after a few minutes...

@acvigue
Copy link
Member

acvigue commented Aug 11, 2021

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

@therhenals
Copy link
Contributor

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.

@acvigue
Copy link
Member

acvigue commented Aug 12, 2021

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

@therhenals
Copy link
Contributor

therhenals commented Aug 12, 2021

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

It helped me!

@Cookie-Monster-Coder
Copy link

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

@crobibero
Copy link
Member

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.

@MrChip53
Copy link
Contributor

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?

@crobibero
Copy link
Member

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

@thornbill
Copy link
Member

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

@crobibero
Copy link
Member

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

@thornbill thornbill added the playback Issue related to media playback label Sep 10, 2021
@nielsvanvelzen nielsvanvelzen changed the title v0.12-beta, Jellyfin crashes each time after 5 min when playing a video Jellyfin crashes each time after 5 min when playing a video Sep 18, 2021
@Artiume
Copy link

Artiume commented Sep 26, 2021

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.

@cirdanmiriel
Copy link

cirdanmiriel commented Sep 26, 2021

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... :'(

@bmillemathias
Copy link
Contributor Author

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

@douglasg14b
Copy link

douglasg14b commented Oct 11, 2021

@nielsvanvelzen
Copy link
Member

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.

@douglasg14b
Copy link

douglasg14b commented Oct 11, 2021

@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.

@krutburken
Copy link

@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.

@Y0ngg4n
Copy link

Y0ngg4n commented Feb 20, 2022

Same issue here. Using Traefik and Android TV

@mueslimak3r
Copy link
Member

Same issue here. Using Traefik and Android TV

Are you using the latest beta?

@Y0ngg4n
Copy link

Y0ngg4n commented Feb 21, 2022

@mueslimak3r the beta fixed it for me. Maybe we should make a release because jellyfin is unusable on androidtv with this bug.

@thornbill
Copy link
Member

A 0.13 release is planned "soon" which is why there are currently beta releases available for testing. 😉

@Y0ngg4n
Copy link

Y0ngg4n commented Feb 21, 2022

@thornbill ok that sounds good :)

@cirdanmiriel
Copy link

That's great to see that u guys took the time to fix this, I might test the beta version if I can, if not I'll wait for the release 👍

@ringus1
Copy link

ringus1 commented Feb 21, 2022

Still happening for me on master (both VLC and Exo):

2022-02-21 18:53:25.201 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:27.301 5305-6129/? I/chromium: [5305:6129:INFO:snr_tracker.cc(50)] snr = 39
2022-02-21 18:53:28.137 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.258 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.419 3533-3533/? E/health2: /sys/block/sda/stat: ReadFileToString failed.
2022-02-21 18:53:31.140 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.220 19086-23179/org.jellyfin.androidtv.debug E/VLC: [b75a2530/5a8b] libvlc decoder: Decoder is draining
2022-02-21 18:53:31.221 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.260 19086-23179/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8b] libvlc decoder: EOS sent, waiting for OutThread
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: mInputTimeStampChanged = true,mLastInputTimeStamp=85314,bufferHdr.nTimeStamp=0
2022-02-21 18:53:31.381 3711-23184/? I/amcodec: codec_set_eos is_eos =1
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: set eos to decoder
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome:      ===mEosStamp 0 ==
2022-02-21 18:53:31.383 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2023, mMaxInputTimeStamp=85314001, mLastTimeStamp=84355001
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome:                mEos = true
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2046, mMaxInputTimeStamp=85314001, mLastTimeStamp=85314001
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: displayThread___eos_fillBufferDone
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: threadLoop is_running == false
2022-02-21 18:53:32.385 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: EOS received
2022-02-21 18:53:32.502 19086-23173/org.jellyfin.androidtv.debug W/VLC: [c0476630/5a85] libvlc video output: picture is too late to be displayed (missing 292 ms)
2022-02-21 18:53:32.561 19086-23182/org.jellyfin.androidtv.debug D/AudioTrack: stop(59): called with 4101120 frames delivered
2022-02-21 18:53:32.610 19086-19086/org.jellyfin.androidtv.debug D/PlaybackController: On Completion fired
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug E/NdkMediaCodec: sf error code: -38
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: AMediaCodec.dequeueOutputBuffer failed
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX_CommandFlush 806 Cmd 0x1 nParam1 0xffffffff
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX.amlogic.hevc.decoder.awesome2: flush input
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: flushInput:1036 >
2022-02-21 18:53:32.613 3711-23176/? V/OMX_WorkerPeer: vendor/omx/omx_framework/WorkerPeer.cpp:flushInput:56 --------------------
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: pause:313 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: mVideo mDisplayTread stop
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: reset:384 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: reset_1
2022-02-21 18:53:32.613 3711-23176/? I/amcodec: AMSTREAM_SET_OMX_RUNNING ret=0
2022-02-21 18:53:32.614 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: ReportPlaybackStopped: Item f9554ec914876a0cb1433b96ae6bb892, Ticks: 23476910000
2022-02-21 18:53:32.617 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Stopped```

@mueslimak3r
Copy link
Member

Still happening for me on master (both VLC and Exo):

2022-02-21 18:53:25.201 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:27.301 5305-6129/? I/chromium: [5305:6129:INFO:snr_tracker.cc(50)] snr = 39
2022-02-21 18:53:28.137 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.258 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.419 3533-3533/? E/health2: /sys/block/sda/stat: ReadFileToString failed.
2022-02-21 18:53:31.140 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.220 19086-23179/org.jellyfin.androidtv.debug E/VLC: [b75a2530/5a8b] libvlc decoder: Decoder is draining
2022-02-21 18:53:31.221 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.260 19086-23179/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8b] libvlc decoder: EOS sent, waiting for OutThread
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: mInputTimeStampChanged = true,mLastInputTimeStamp=85314,bufferHdr.nTimeStamp=0
2022-02-21 18:53:31.381 3711-23184/? I/amcodec: codec_set_eos is_eos =1
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: set eos to decoder
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome:      ===mEosStamp 0 ==
2022-02-21 18:53:31.383 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2023, mMaxInputTimeStamp=85314001, mLastTimeStamp=84355001
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome:                mEos = true
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2046, mMaxInputTimeStamp=85314001, mLastTimeStamp=85314001
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: displayThread___eos_fillBufferDone
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: threadLoop is_running == false
2022-02-21 18:53:32.385 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: EOS received
2022-02-21 18:53:32.502 19086-23173/org.jellyfin.androidtv.debug W/VLC: [c0476630/5a85] libvlc video output: picture is too late to be displayed (missing 292 ms)
2022-02-21 18:53:32.561 19086-23182/org.jellyfin.androidtv.debug D/AudioTrack: stop(59): called with 4101120 frames delivered
2022-02-21 18:53:32.610 19086-19086/org.jellyfin.androidtv.debug D/PlaybackController: On Completion fired
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug E/NdkMediaCodec: sf error code: -38
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: AMediaCodec.dequeueOutputBuffer failed
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX_CommandFlush 806 Cmd 0x1 nParam1 0xffffffff
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX.amlogic.hevc.decoder.awesome2: flush input
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: flushInput:1036 >
2022-02-21 18:53:32.613 3711-23176/? V/OMX_WorkerPeer: vendor/omx/omx_framework/WorkerPeer.cpp:flushInput:56 --------------------
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: pause:313 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: mVideo mDisplayTread stop
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: reset:384 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: reset_1
2022-02-21 18:53:32.613 3711-23176/? I/amcodec: AMSTREAM_SET_OMX_RUNNING ret=0
2022-02-21 18:53:32.614 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: ReportPlaybackStopped: Item f9554ec914876a0cb1433b96ae6bb892, Ticks: 23476910000
2022-02-21 18:53:32.617 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Stopped```

please provide the full log from that session

@ringus1
Copy link

ringus1 commented Feb 22, 2022

Still happening for me on master (both VLC and Exo):

2022-02-21 18:53:25.201 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:27.301 5305-6129/? I/chromium: [5305:6129:INFO:snr_tracker.cc(50)] snr = 39
2022-02-21 18:53:28.137 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.258 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:28.419 3533-3533/? E/health2: /sys/block/sda/stat: ReadFileToString failed.
2022-02-21 18:53:31.140 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.220 19086-23179/org.jellyfin.androidtv.debug E/VLC: [b75a2530/5a8b] libvlc decoder: Decoder is draining
2022-02-21 18:53:31.221 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: Response received from: https://video.mydomain.tld/Sessions/Playing/Progress
2022-02-21 18:53:31.260 19086-23179/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8b] libvlc decoder: EOS sent, waiting for OutThread
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: mInputTimeStampChanged = true,mLastInputTimeStamp=85314,bufferHdr.nTimeStamp=0
2022-02-21 18:53:31.381 3711-23184/? I/amcodec: codec_set_eos is_eos =1
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome: set eos to decoder
2022-02-21 18:53:31.381 3711-23184/? D/AmlogicVideoDecoderAwesome:      ===mEosStamp 0 ==
2022-02-21 18:53:31.383 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2023, mMaxInputTimeStamp=85314001, mLastTimeStamp=84355001
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome:                mEos = true
2022-02-21 18:53:32.382 3711-23183/? D/AmlogicVideoDecoderAwesome: mEosCheckCount=0, mInPutFrameCount=2046, mOutBufferNo=2046, mMaxInputTimeStamp=85314001, mLastTimeStamp=85314001
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: displayThread___eos_fillBufferDone
2022-02-21 18:53:32.383 3711-23183/? D/AmlogicVideoDecoderAwesome: threadLoop is_running == false
2022-02-21 18:53:32.385 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: EOS received
2022-02-21 18:53:32.502 19086-23173/org.jellyfin.androidtv.debug W/VLC: [c0476630/5a85] libvlc video output: picture is too late to be displayed (missing 292 ms)
2022-02-21 18:53:32.561 19086-23182/org.jellyfin.androidtv.debug D/AudioTrack: stop(59): called with 4101120 frames delivered
2022-02-21 18:53:32.610 19086-19086/org.jellyfin.androidtv.debug D/PlaybackController: On Completion fired
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug E/NdkMediaCodec: sf error code: -38
2022-02-21 18:53:32.611 19086-23178/org.jellyfin.androidtv.debug W/VLC: [b75a2530/5a8a] libvlc decoder: AMediaCodec.dequeueOutputBuffer failed
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX_CommandFlush 806 Cmd 0x1 nParam1 0xffffffff
2022-02-21 18:53:32.612 3711-23176/? I/OmxComponent: OMX.amlogic.hevc.decoder.awesome2: flush input
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: flushInput:1036 >
2022-02-21 18:53:32.613 3711-23176/? V/OMX_WorkerPeer: vendor/omx/omx_framework/WorkerPeer.cpp:flushInput:56 --------------------
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: pause:313 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: mVideo mDisplayTread stop
2022-02-21 18:53:32.613 3711-23176/? V/AmlogicVideoDecoderAwesome: reset:384 >
2022-02-21 18:53:32.613 3711-23176/? D/AmlogicVideoDecoderAwesome: reset_1
2022-02-21 18:53:32.613 3711-23176/? I/amcodec: AMSTREAM_SET_OMX_RUNNING ret=0
2022-02-21 18:53:32.614 19086-19086/org.jellyfin.androidtv.debug I/jellyfin-apiclient: ReportPlaybackStopped: Item f9554ec914876a0cb1433b96ae6bb892, Ticks: 23476910000
2022-02-21 18:53:32.617 19086-19086/org.jellyfin.androidtv.debug D/jellyfin-apiclient: Adding request to queue: https://video.mydomain.tld/Sessions/Playing/Stopped```

please provide the full log from that session

Here you go: https://gist.github.com/ringus1/98eb97688918eedfeed27f6eff08dfc2
It doesn't crash the whole app though. Just stops playback as if I exited this particular video (giving me possibility to resume playback exactly where it stopped). Doesn't happen for all videos that are being transcoded though it seems too.

Using it on CCWGTV.

@mueslimak3r
Copy link
Member

I see this in the log:
libvlc demux: cannot find any cluster or chapter, damaged file ?

I wonder how you have your hardware acceleration settings configured on your server, and if perhaps that could be causing an issue.

Doesn't happen for all videos that are being transcoded though it seems too

I don't understand. Does it happen for just this video, some videos, or all videos?
If just this video or some videos, is that only when it's transcoding?

Since this is happening with exoplayer too, can you record some logs of that?

Some details about the media you're playing would be helpful too. You can get that from ffprobe or from the jellyfin web ui

@ringus1
Copy link

ringus1 commented Feb 22, 2022

I'm using 10.8.0alpha with AMD VAAPI. Though, the output file from ffmpeg on server works perfectly fine with local VLC. No stops/incomplete conversion. Same video (with transcoding) works fine via WWW and Kodi.

It's the Jellyfin APK that reports stopping of playback:

[2022-02-22 17:08:45.607 +01:00] [INF] [15] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-ss 00:37:57.000 -init_hw_device vaapi=va:/dev/dri/renderD128 -filter_hw_device va -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 -i file:\"/series/myvideo.mkv\" -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -force_key_frames \"expr:gte(t,n_forced*5)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=format=nv12\" -copyts -avoid_negative_ts disabled -start_at_zero -rc_mode VBR -b:v 4616000 -maxrate 4616000 -bufsize 9232000 -profile:v:0 high -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -ac 6 -ab 384000 -y \"/config/transcodes/91d6af4207aa1632927c7fbed7e10efc.mkv\""
[2022-02-22 17:08:46.718 +01:00] [WRN] [151] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.1.35:8096/videos/f9554ec9-1487-6a0c-b143-3b96ae6bb892/stream.mkv?DeviceId=e940701c219647dcbbd675ac9bc71b3524e29d79&MediaSourceId=f9554ec914876a0cb1433b96ae6bb892&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=4616000&AudioBitrate=384000&StartTimeTicks=22770000000&PlaySessionId=f3388ff3146b489c88d104e83471c70b&api_key=18334f457021449a8c3daf4e09f33fc0&CopyTimestamps=true&RequireAvc=false&Tag=ccd15b76315feff720619c62bf847b65&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=8&mp3-audiochannels=8&TranscodeReasons=ContainerBitrateExceedsLimit&allowVideoStreamCopy=false&allowAudioStreamCopy=false&allowAudioStreamCopy=false" to "192.168.1.60" in 0:00:01.1152535 with Status Code 200
[2022-02-22 17:09:04.937 +01:00] [INF] [151] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2022-02-22 17:09:39.414 +01:00] [INF] [68] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/transcodes/91d6af4207aa1632927c7fbed7e10efc.mkv"
[2022-02-22 17:09:40.933 +01:00] [INF] [193] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.0.0-dev.1" playing "Odcinek 16". Stopped at "2326924" ms
[2022-02-22 17:09:40.990 +01:00] [WRN] [193] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.1.35:8096/Sessions/Playing/Stopped" to "192.168.1.60" in 0:00:01.578605 with Status Code 204

This issue occurs for some transcoded videos. Direct play works fine with every file that's elligible for it.

Some details about the media you're playing would be helpful too. You can get that from ffprobe or from the jellyfin web ui

I've found at least 2 very different files with this issue, here is one:

SOURCE FILE

Input #0, matroska,webm, from 'myvideo.mkv':
  Metadata:
    encoder         : libebml v1.2.0 + libmatroska v1.1.0
    creation_time   : 2011-02-25T22:48:04.000000Z
  Duration: 00:42:20.96, start: 0.000000, bitrate: 4667 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      title           : Myvideo, Episode 16: A
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      title           : Dolby Digital 5.1 @ 384 kbps


OUTPUT FILE

Input #0, matroska,webm, from '91d6af4207aa1632927c7fbed7e10efc.mkv':
  Metadata:
    ENCODER         : Lavf58.76.100
  Duration: 00:42:20.96, start: 2129.979000, bitrate: 765 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      ENCODER         : Lavc58.134.100 h264_vaapi
      DURATION        : 00:42:20.958000000
    Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      ENCODER         : Lavc58.134.100 aac
      DURATION        : 00:42:20.960000000

I'll add also logs from Exoplayer soon.

@ringus1
Copy link

ringus1 commented Feb 22, 2022

Oddly, I can't replicate that with Exo now. Seems I might have had some cached dependencies or something when building from master previously. ExoPlayer seems to be playing those faulty files with no issues now. Problem looks to be limited to VLC which uses stream.mkv way (though, as mentioned only for some videos) unlike Exo fMP4-HLS / HLS (working both with HEVC and H264 encoding).

@mueslimak3r
Copy link
Member

mueslimak3r commented Feb 23, 2022

Problem looks to be limited to VLC which uses stream.mkv

tbh that sounds like this issue since it's transcoded -> mkv:
jellyfin/jellyfin#6957

it's discussed here too:
#1339

I've seen this many times while testing using libVLC, and exo too when I've testing playing mkv transcodes in dev builds.
It's unclear rn why this issue is mostly happening with android-tv. The only thing that stood out to me is that pretty much every other client uses a TS container for transcoding.

I'm going to be testing replacing fMP4 (HLS) with TS (HLS) for exoplayer so we get back AC-3 audio support when transcoding (mp4 doesn't support it). And when I do that I'll also test using TS (http) for libVLC, and perhaps switching away from mkv (http) will fix it.

@ringus1
Copy link

ringus1 commented Feb 23, 2022

Yeah, it looks to be more related to transcoding to MKV issue you mentioned. TS doesn't support HEVC though, right? Please keep that functionality though 🙂
Thanks for the great work!

@cirdanmiriel
Copy link

cirdanmiriel commented Feb 23, 2022

I wanted to try the last beta release, i copied it from a usb key on my Nvidia Shield, but when I try to install it (via ES Explorer), it says "App was not installed"... Should I uninstall the current version first?
PS: I authorized installing apps from untrusted source

@mueslimak3r
Copy link
Member

I wanted to try the last beta release, i copied it from a usb key on my Nvidia Shield, but when I try to install it (via ES Explorer), it says "App was not installed"... Should I uninstall the current version first?
PS: I authorized installing apps from untrusted source

Yeah, if you install the release version from APK you have to uninstall the app store version. You can also sign up for the beta via the app store:
https://play.google.com/apps/testing/org.jellyfin.androidtv

@cirdanmiriel
Copy link

I wanted to try the last beta release, i copied it from a usb key on my Nvidia Shield, but when I try to install it (via ES Explorer), it says "App was not installed"... Should I uninstall the current version first?
PS: I authorized installing apps from untrusted source

Yeah, if you install the release version from APK you have to uninstall the app store version. You can also sign up for the beta via the app store: https://play.google.com/apps/testing/org.jellyfin.androidtv

Well, thanks for the tip, I successfully installed the beta after uninstalling the play store one, and... IT WORKS! congrats and thanks for the fix 😃

but... the only thing is, I can't make subtitle to work now, but I'm not sure if this is relative to the subject (both included SRT and PGS subtitles failed to display)

@mueslimak3r
Copy link
Member

but... the only thing is, I can't make subtitle to work now, but I'm not sure if this is relative to the subject (both included SRT and PGS subtitles failed to display)

please open a new issue for this, and make sure to fully fill out the issue template.

@mueslimak3r
Copy link
Member

mueslimak3r commented Feb 24, 2022

TS doesn't support HEVC though, right? Please keep that functionality though 🙂 Thanks for the great work!

MPEG transport stream (.ts) supports hevc.
MPEG-2 transport stream (.m2ts) does not support HEVC.

Here's a table of containers and codecs they support:
https://en.wikipedia.org/wiki/Comparison_of_video_container_formats#Video_coding_formats_support

I tested using TS instead of MKV for libVLC transcodes, and the issue mentioned above still happens. So a fix won't be as simple as switching containers.

@shaino
Copy link

shaino commented Feb 28, 2022

@mueslimak3r @nielsvanvelzen @bmillemathias
I found a new interesting message.
This issue is related to the server completing the full movie video transcoding.
With the movie playing, the crash occurs in 20 minutes, 10 minutes, 5 minutes, 3 minutes...

Android 5.1.1/7/9 system playback with libVLC is the same issue in Ver0.13 beta4.
Playback crashes occur after the server has completed the full video transcoding.
I have enabled limit transcoding speed in the console. Unfortunately, when the client plays anywhere, the server continues to transcode to the end.Then issues appeared.Curiously, with exoplayer playback, the server will also transcode the full video, but it will not trigger the issue.

The client and server appear to be scheduled incorrectly. The exoPlayer is powerful enough to survive the new version. The libVLC continued to hang up.

@Nothankslads
Copy link

Nothankslads commented Jun 18, 2022

I'm still having this issue, not on android TV. I get it both in the web client and in the mac downloaded client.

The times that the video playback stops seems relatively random, although i think it increases in frequency as the movie gets closer to the end.

Running Jellyfin through unraid via docker.

Logs have some similarity to #1183 "slow http response" "error 204" etc (which was closed as dupe of one above).

Since I'm not on android, swapping to exoplayer etc isnt really an option as I'm getting it across multiple clients and players

Not sure if anyone has any quick fixes before it is resolved?

@DN4IPTV
Copy link

DN4IPTV commented Nov 26, 2022

This is the exact problem that I am experiencing right now.
I installed the v.14.0 (for Android TV) the error occurs every 21 minutes and the recent was at exactly 30 minutes.

@nielsvanvelzen nielsvanvelzen removed the confirmed Issue can be reproduced label Apr 30, 2023
@jellyfin-bot
Copy link
Contributor

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 master branch, 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.

@jellyfin-bot jellyfin-bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@dmchmk
Copy link

dmchmk commented Dec 16, 2023

Hi! Unfortunately, with the version 0.16 issue is back. On previous version 0.15.12 everything worked properly but after upgrade it plays only for 5 minutes and then crashes.

No differ between exoplayer and libvlc and between transcoding or direct steam.

@fiftypfhor
Copy link

By total freak chance I have been able to reproduce this issue, unfortunately I have no way to pull logs from the AndroidTV (though debug is enabled). The Jellyfin host logs only show the same playback stopped event over and over (provided here anyway, slightly scrubbed).

tl;dr
Using two different TVs (running the same versions or Jellyfin-AndroidTV and AndroidTV) and three different remotes, the issue is being caused by a Bluetooth remote when it either disconnects or reconnects. In this case a Sofabaton U1. The other two remotes are OEM and connect to the TV though a built-in dongle (I assume, since it doesn't show up as a normal Bluetooth device and cannot be unpaired). Specs provided anyway below.

I have seen other people posit this issue was caused by using Wifi but I was not able to reproduce this by switching to a wired connection.

Remediation:
Unpair any Bluetooth remotes if you can, for now. Obviously don't leave yourself in a position where you have nothing that can easily control the TV.

Restatement of Issue:
Jellyfin seemingly at random restarts the video from the last known timestamp. This issue also is not present when using other Apps on the TV with the same remote in the same configuration (e.g. Netfilx, Paramount+, Prime, etc.).

Logs from Host:

[2024-03-13 10:36:36.878 -05:00] [INF] Playback stopped reported by app "Android TV" "0.16.6" playing "<VIDEO>". Stopped at "12832502" ms
[2024-03-13 10:36:37.281 -05:00] [INF] User policy for "<USER>". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2024-03-13 10:36:37.281 -05:00] [INF] StreamBuilder.BuildVideoItem( Profile="AndroidTV-libVLC", Path="<PATH>", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/af305917-7de6-0ea2-0e5c-4109f07eae55/stream.mkv?MediaSourceId=af3059177de60ea20e5c4109f07eae55&Static=true&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&api_key=<token>&SubtitleMethod=Encode&Tag=1385e2e0f853a2c8ad24c51e64a188aa"

Logs from Client:
As stated, I do not know how to pull them from AndroidTV, but if it doesn't involve any jailbreaking I can probably get them with instruction since its 100% reproducible on my setup as of 13 March 2024.

Configuration
Host:
Debian 12.5 stable in VM, Proxmox VE 8.1
Jellyfin Version: 10.8.13
Media library served over CIFS
No Other Services

TV 1:
Jellyfin-Android TV 0.16.6
AndroidTV 10 kernel 4.19.75
Bluetooth on, Wifi on (connected), Eth disconnected

TV 2:
Jellyfin-Android TV 0.16.6
AndroidTV 10 kernel 4.19.75
Bluetooth on, Wifi on (disconnected), Eth connected

Sofabaton U1:
Fireware v. 3.3
Hardware v. 3
Prod. Batch 20190404
Bluetooth paired (BT 4.0? I cannot confirm this due to lack of manufacturer information.)

Sony Remote 1, Model: RMF-TX900U (built-in support)
Sony Remote 2, Model: RMF-TX500U (built-in support)

Steps:

  1. Pair the Sofabaton U1 with the TV using the iOS app. Select Bluetooth, not IR.
  2. Load Jellyfin on AndroidTV OR have it already running
  3. Play a video where a restart can easily be observed
  4. Open the back of the remote and remove a battery to simulate the remote going to sleep.
  5. Observe Jellyfin player restart the video from its last saved timestamp. This may be in the middle of at the beginning.
  6. Wait a few seconds with the batteries out.
  7. Replace battery.
  8. Observe same behavior as in Step 5.

Tests
Note: Sony Remotes can only be tested with the TV they shipped with.

  1. TV 1 w/ U1 over BT, player restarted
  2. TV 1 w/ Sony Remote 1, no effect
  3. TV 2 w/ U1, player restarted
  4. TV 2 w/ Sony Remote 2, no effect
  5. TV 1 w/ U1 over IR, no effect (obviously)
  6. TV 2 w/ U1 over IR, no effect (just for completeness sake I guess)

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

No branches or pull requests